@qispace/vue3-player 0.0.6 → 0.0.7

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.
Files changed (88) hide show
  1. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +471 -3
  2. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +50 -3
  3. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +151 -3
  4. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +66 -3
  5. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +124 -3
  6. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +425 -2
  7. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +154 -3
  8. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +53 -3
  9. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +32 -3
  10. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +41 -4
  11. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +156 -3
  12. package/dist/components/shared/QiFloatingCard.vue.d.ts +17 -3
  13. package/dist/components/shared/QiHoverProbe.vue.d.ts +3 -3
  14. package/dist/components/shared/QiNorthDirection.vue.d.ts +20 -2
  15. package/dist/components/shared/QiZoomBox.vue.d.ts +82 -3
  16. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +3 -3
  17. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +13 -2
  18. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts +72 -3
  19. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts +14 -3
  20. package/dist/components/virtualTourV2/SingleImage.vue.d.ts +25 -3
  21. package/dist/components/virtualTourV2/SocialShare.vue.d.ts +9 -3
  22. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +30 -3
  23. package/dist/entry.css +1 -0
  24. package/dist/{vue3-player.esm.js → vue3-player.mjs} +647 -581
  25. package/dist/vue3-player.umd.js +2 -3
  26. package/package.json +12 -10
  27. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts.map +0 -1
  28. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts.map +0 -1
  29. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts.map +0 -1
  30. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts.map +0 -1
  31. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts.map +0 -1
  32. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts.map +0 -1
  33. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts.map +0 -1
  34. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts.map +0 -1
  35. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts.map +0 -1
  36. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts.map +0 -1
  37. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts.map +0 -1
  38. package/dist/components/shared/QiFloatingCard.vue.d.ts.map +0 -1
  39. package/dist/components/shared/QiHoverProbe.vue.d.ts.map +0 -1
  40. package/dist/components/shared/QiNorthDirection.vue.d.ts.map +0 -1
  41. package/dist/components/shared/QiZoomBox.vue.d.ts.map +0 -1
  42. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts.map +0 -1
  43. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts.map +0 -1
  44. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts.map +0 -1
  45. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts.map +0 -1
  46. package/dist/components/virtualTourV2/SingleImage.vue.d.ts.map +0 -1
  47. package/dist/components/virtualTourV2/SocialShare.vue.d.ts.map +0 -1
  48. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts.map +0 -1
  49. package/dist/lib/virtualTour__/ApartmentConfig.d.ts +0 -27
  50. package/dist/lib/virtualTour__/ApartmentFiles.d.ts +0 -7
  51. package/dist/lib/virtualTour__/MinimapConfig.d.ts +0 -23
  52. package/dist/lib/virtualTour__/impl/HttpApartmentFiles.d.ts +0 -19
  53. package/dist/vue3-player.cjs.js +0 -2
  54. package/dist/vue3-player.iife.js +0 -3
  55. package/src/entry.esm.js +0 -17
  56. package/src/entry.js +0 -13
  57. package/src/entry.ts_ +0 -17
  58. package/src/lib/virtualTour__/ApartmentConfig.ts +0 -80
  59. package/src/lib/virtualTour__/ApartmentFiles.ts +0 -8
  60. package/src/lib/virtualTour__/CameraNavigator.js_ +0 -74
  61. package/src/lib/virtualTour__/CameraSnapshot.js +0 -42
  62. package/src/lib/virtualTour__/CoordConversions.js +0 -43
  63. package/src/lib/virtualTour__/FullscreenModel.js +0 -69
  64. package/src/lib/virtualTour__/MinimapConfig.ts +0 -46
  65. package/src/lib/virtualTour__/PlayerViewModel.js +0 -423
  66. package/src/lib/virtualTour__/config/ApartmentConfig.js +0 -92
  67. package/src/lib/virtualTour__/config/CameraConfig.js +0 -97
  68. package/src/lib/virtualTour__/config/Interaction.js +0 -393
  69. package/src/lib/virtualTour__/config/Panorama.js +0 -78
  70. package/src/lib/virtualTour__/config/PlayerConfig.js +0 -812
  71. package/src/lib/virtualTour__/config/rawinflate.export.js +0 -833
  72. package/src/lib/virtualTour__/config/shaders.js +0 -24
  73. package/src/lib/virtualTour__/impl/HttpApartmentFiles.ts +0 -57
  74. package/src/lib/virtualTour__/index.js +0 -1
  75. package/src/lib/virtualTour__/textures/arrow.png +0 -0
  76. package/src/lib/virtualTour__/textures/compass-bg.png +0 -0
  77. package/src/lib/virtualTour__/textures/compass-needle.png +0 -0
  78. package/src/lib/virtualTour__/textures/compass-north.png +0 -0
  79. package/src/lib/virtualTour__/textures/floor-1.svg +0 -4
  80. package/src/lib/virtualTour__/textures/floor-2.svg +0 -4
  81. package/src/lib/virtualTour__/textures/marker.png +0 -0
  82. package/src/lib/virtualTour__/textures/tod-sun.png +0 -0
  83. package/src/main.ts_ +0 -24
  84. package/src/shims-png.d.ts +0 -4
  85. package/src/shims-tsx.d.ts +0 -11
  86. package/src/shims-vue.d.ts +0 -4
  87. package/src/style.css +0 -0
  88. package/src/vite-env.d.ts +0 -5
@@ -1,3 +1,2 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("@media (hover: hover){.hover-check[data-v-e4729353]{display:none}}#canvas[data-v-3bbbc77b]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}#canvas-mask[data-v-3bbbc77b]{position:absolute;top:0;max-width:100%;z-index:4;-webkit-user-select:none;user-select:none}@media only screen and (min-width: 1280px){#canvas[data-v-3bbbc77b]{border-radius:10px}}#container[data-v-82a61864]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}.svg-container[data-v-82a61864]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-82a61864],svg[data-v-82a61864]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-82a61864] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}@media only screen and (min-width: 1280px){#canvas[data-v-82a61864]{border-radius:10px}}.v-btn[data-v-129ef905]{background-color:#fff}.frame-container[data-v-e6481f8e]{position:relative;max-width:100%;top:0;left:0;bottom:185px;padding-top:56%;z-index:1;overflow:hidden}.frame-image[data-v-e6481f8e]{position:absolute;top:0;width:100%;height:100%}.frame-image img[data-v-e6481f8e]{min-width:100%;max-width:100%;z-index:0}#image-stack picture[data-v-e6481f8e]{visibility:hidden}#image-stack picture.show[data-v-e6481f8e]{visibility:visible}.fill-parent[data-v-e6481f8e]{position:absolute;top:0;bottom:0;left:0;right:0}.floating-card[data-v-b74de171]{position:absolute;left:0;top:0;z-index:10;display:flex}.is-not-hoverable[data-v-b74de171]{position:relative;width:100%}.top-left[data-v-b74de171]{transform-origin:top left;transform:translate(8px) translateY(8px) scale(.9)}.top-right[data-v-b74de171]{transform-origin:top right;transform:translate(-100%) translate(-8px) translateY(8px) scale(.9)}.bottom-left[data-v-b74de171]{transform-origin:bottom left;transform:translateY(-100%) translate(8px) translateY(-8px) scale(.9)}.bottom-right[data-v-b74de171]{transform-origin:bottom right;transform:translateY(-100%) translate(-100%) translate(-8px) translateY(-8px) scale(.9)}.v-dialog__content[data-v-b74de171]{align-items:flex-start}.zoom-box-container[data-v-83bfd28a]{position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none}.zoom-box[data-v-83bfd28a]{width:100%;height:100%;-webkit-user-select:none;user-select:none;touch-action:none}.interactive-viewer[data-v-3a1121f3]{padding-top:56.65%;position:relative}.fill-parent[data-v-3a1121f3]{position:absolute;top:0;bottom:0;left:0;right:0}.navigation[data-v-3a1121f3]{position:absolute;width:100%;bottom:32px;z-index:99;padding:0 20px;display:flex;justify-content:center}@media only screen and (max-width: 600px){.navigation[data-v-3a1121f3]{bottom:12px}}.sunsim-time-label[data-v-1fba3edd]{color:#000;vertical-align:top}.sunsim-date[data-v-1fba3edd]{background:#fff;border-radius:30px;min-height:36px;min-width:170px;display:flex;align-content:center;white-space:nowrap}.day-selector[data-v-1fba3edd]{margin-top:0}.day-selector[data-v-1fba3edd] .v-field__outline{display:none}.day-selector[data-v-1fba3edd] .v-field__input{padding-top:2px}.day-selector[data-v-1fba3edd] .v-field__append-inner{padding-top:5px!important}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:before{border-style:none}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:after{border-style:none}.sunsim-slider[data-v-1fba3edd] .v-slider-track__background{background:linear-gradient(270deg,#8183c2,#ffb9b9 20.01%,#b2dfff 40.1%,#b2dfff 59.85%,#ffba96 79.96%,#8183c2)!important}.sunsim-bar-wrapper{display:flex;position:absolute;width:60%;min-width:400px;top:12px;left:0;z-index:3;touch-action:none;pointer-events:none}.sunsim-wrapper{width:100%;background:#fff;border-radius:30px;padding:5px;min-height:16px;z-index:3}.sunsim-bar-wrapper .sunsim-date{margin-right:12px;margin-left:12px}.sunsim-wrapper,.sunsim-date{touch-action:auto;pointer-events:all}.sunsim-wrapper .mdi-white-balance-sunny{color:#ffab02;vertical-align:baseline;font-size:20px}@media only screen and (max-width: 980px) and (min-width: 500px){.sunsim-bar-wrapper{top:101%;width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){.sunsim-bar-wrapper{top:calc(100% + 8px);width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{box-shadow:0 0 7px 1px #aaa}}@media only screen and (max-width: 500px){.sunsim-bar-wrapper{height:calc(100% + 84px);top:0;width:100%;flex-direction:column;justify-content:space-between;margin:-42px 0 0;padding:0;left:0;z-index:0;min-width:100%}.sunsim-bar-wrapper .sunsim-date{margin-right:0;margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{width:100%;border-radius:0;left:0;margin-left:0!important;box-shadow:0 0 7px 1px #aaa}}.image-instance[data-v-fad48118]{position:absolute;width:100%;opacity:0}.image-instance.active[data-v-fad48118]{opacity:1}.north-indicator[data-v-0a2cec1f]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-0a2cec1f]{position:relative}.image-instances[data-v-0a2cec1f]{position:relative;width:100%;height:100%}canvas[data-v-0a2cec1f]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-0a2cec1f]{position:absolute;top:0;bottom:0;left:0;right:0}.svg-container[data-v-0a2cec1f]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-0a2cec1f],svg[data-v-0a2cec1f]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-0a2cec1f] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}svg g.restricted[data-v-0a2cec1f] path{cursor:default!important}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-0a2cec1f]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-0a2cec1f]{margin-top:44px;margin-bottom:44px}}.overlay[data-v-9a90fa2f]{z-index:1!important;opacity:1;transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.north-indicator[data-v-08f2ea1e]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-08f2ea1e]{position:relative}.image-instances[data-v-08f2ea1e]{position:relative;width:100%;height:100%}canvas[data-v-08f2ea1e]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-08f2ea1e]{position:absolute;top:0;bottom:0;left:0;right:0}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-08f2ea1e]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-08f2ea1e]{margin-top:44px;margin-bottom:44px}}.v-card[data-v-f4e6ce2e]{transition:box-shadow .3s ease-in-out;border:2px solid transparent}[data-v-f4e6ce2e] .v-slide-group__content{justify-content:center}[data-v-f4e6ce2e] .v-slide-group__next--disabled,[data-v-f4e6ce2e] .v-slide-group__prev--disabled{pointer-events:all!important}.carousel-button[data-v-f4e6ce2e]{height:108px!important;min-width:54px!important;padding:0!important;z-index:2;background-color:#fff!important;border:2px solid #d2d2d2;color:#d2d2d2!important}.carousel-button.mobile[data-v-f4e6ce2e]{height:58px!important;min-width:38px!important}.carousel-button[data-v-f4e6ce2e]:hover{border:2px solid #999!important;color:#999!important}.carousel-button[data-v-f4e6ce2e]:hover:before,.carousel-button[data-v-f4e6ce2e]:hover:after{background-color:#fff!important}.align-baseline[data-v-f4e6ce2e]{align-items:baseline}.active-apt[data-v-f4e6ce2e]{border:4px solid #4caf50!important}.v-image[data-v-f4e6ce2e]{border-radius:0!important}#share-btns-wrapper button[data-v-3560cd03]{margin:0 8px}.v-btn[data-v-3560cd03]{background-color:#fff;pointer-events:all}.disclaimer[data-v-6e4f02d6]{padding:4px 10px;text-align:center;background-color:#00000040;border-radius:5px;line-height:20px}.disclaimer span[data-v-6e4f02d6]{cursor:pointer;color:#fff;text-decoration:underline;pointer-events:all}#player-wrapper[data-v-1dab1ac3]{position:relative;overflow:hidden}#player-sizer[data-v-1dab1ac3]{display:flex;justify-content:center;align-items:center;overflow:hidden}.player-control[data-v-1dab1ac3]{display:flex;position:absolute;z-index:3}#controls-top-left[data-v-1dab1ac3]{top:10px;left:10px}#controls-top-center[data-v-1dab1ac3]{top:10px;left:50%;transform:translate(-50%);z-index:4}#controls-top-right[data-v-1dab1ac3]{top:10px;right:10px;justify-content:flex-end;align-content:flex-end}#controls-center-left[data-v-1dab1ac3]{left:10px;top:50%;transform:translateY(-50%)}#controls-center-center[data-v-1dab1ac3]{top:50%;left:50%;transform:translate(-50%,-50%);align-items:center;justify-content:space-around;z-index:20}#controls-center-right[data-v-1dab1ac3]{top:50%;right:10px;transform:translateY(-50%);justify-content:flex-end;align-items:center}#controls-bottom-left[data-v-1dab1ac3]{bottom:10px;left:10px;z-index:5}#controls-bottom-center[data-v-1dab1ac3]{bottom:10px;left:50%;transform:translate(-50%);align-items:flex-end;justify-content:space-around;z-index:4}#controls-bottom-right[data-v-1dab1ac3]{bottom:10px;right:10px;justify-content:flex-end;align-content:flex-end;align-items:flex-end;z-index:5}.img-div[data-v-b418cf51]{position:absolute;display:block;height:100%;width:100%;background-size:cover;background-position:center center;z-index:2;left:0;top:0}.static-image-wrapper[data-v-b418cf51]{background:#fff}.compass-wrapper[data-v-e2117d1e]{width:50px}.player-and-components-wrapper[data-v-e2117d1e]{position:relative}.static-image[data-v-e2117d1e]{position:absolute;top:0;left:0;width:100%;height:auto}button.v-btn[data-v-e2117d1e]{background:#fff}.waypoint-carousel.full-screen[data-v-e2117d1e]{scale:.5}div#controls-bottom-center>div[data-v-e2117d1e]{display:flex;flex-direction:column;align-items:center}.player-error[data-v-e2117d1e]{min-height:400px;display:flex;align-items:center;justify-content:space-around;background:#ededed}@media only screen and (max-width: 600px){#btn-fullscreen[data-v-e2117d1e]{display:none}}@media all and (orientation: landscape) and (max-height: 499px){#btn-fullscreen[data-v-e2117d1e]{display:none}}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(v,e){typeof exports=="object"&&typeof module<"u"?module.exports=e(require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["axios","vue"],e):(v=typeof globalThis<"u"?globalThis:v||self,v.Vue3Player=e(v.axios,v.Vue))})(this,function(v,e){"use strict";var Q=document.createElement("style");Q.textContent=`@media (hover: hover){.hover-check[data-v-e4729353]{display:none}}#canvas[data-v-3bbbc77b]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}#canvas-mask[data-v-3bbbc77b]{position:absolute;top:0;max-width:100%;z-index:4;-webkit-user-select:none;user-select:none}@media only screen and (min-width: 1280px){#canvas[data-v-3bbbc77b]{border-radius:10px}}#container[data-v-82a61864]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}.svg-container[data-v-82a61864]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-82a61864],svg[data-v-82a61864]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-82a61864] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}@media only screen and (min-width: 1280px){#canvas[data-v-82a61864]{border-radius:10px}}.v-btn[data-v-129ef905]{background-color:#fff}.frame-container[data-v-e6481f8e]{position:relative;max-width:100%;top:0;left:0;bottom:185px;padding-top:56%;z-index:1;overflow:hidden}.frame-image[data-v-e6481f8e]{position:absolute;top:0;width:100%;height:100%}.frame-image img[data-v-e6481f8e]{min-width:100%;max-width:100%;z-index:0}#image-stack picture[data-v-e6481f8e]{visibility:hidden}#image-stack picture.show[data-v-e6481f8e]{visibility:visible}.fill-parent[data-v-e6481f8e]{position:absolute;top:0;bottom:0;left:0;right:0}.floating-card[data-v-b74de171]{position:absolute;left:0;top:0;z-index:10;display:flex}.is-not-hoverable[data-v-b74de171]{position:relative;width:100%}.top-left[data-v-b74de171]{transform-origin:top left;transform:translate(8px) translateY(8px) scale(.9)}.top-right[data-v-b74de171]{transform-origin:top right;transform:translate(-100%) translate(-8px) translateY(8px) scale(.9)}.bottom-left[data-v-b74de171]{transform-origin:bottom left;transform:translateY(-100%) translate(8px) translateY(-8px) scale(.9)}.bottom-right[data-v-b74de171]{transform-origin:bottom right;transform:translateY(-100%) translate(-100%) translate(-8px) translateY(-8px) scale(.9)}.v-dialog__content[data-v-b74de171]{align-items:flex-start}.zoom-box-container[data-v-83bfd28a]{position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none}.zoom-box[data-v-83bfd28a]{width:100%;height:100%;-webkit-user-select:none;user-select:none;touch-action:none}.interactive-viewer[data-v-3a1121f3]{padding-top:56.65%;position:relative}.fill-parent[data-v-3a1121f3]{position:absolute;top:0;bottom:0;left:0;right:0}.navigation[data-v-3a1121f3]{position:absolute;width:100%;bottom:32px;z-index:99;padding:0 20px;display:flex;justify-content:center}@media only screen and (max-width: 600px){.navigation[data-v-3a1121f3]{bottom:12px}}.sunsim-time-label[data-v-1fba3edd]{color:#000;vertical-align:top}.sunsim-date[data-v-1fba3edd]{background:#fff;border-radius:30px;min-height:36px;min-width:170px;display:flex;align-content:center;white-space:nowrap}.day-selector[data-v-1fba3edd]{margin-top:0}.day-selector[data-v-1fba3edd] .v-field__outline{display:none}.day-selector[data-v-1fba3edd] .v-field__input{padding-top:2px}.day-selector[data-v-1fba3edd] .v-field__append-inner{padding-top:5px!important}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:before{border-style:none}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:after{border-style:none}.sunsim-slider[data-v-1fba3edd] .v-slider-track__background{background:linear-gradient(270deg,#8183c2,#ffb9b9 20.01%,#b2dfff 40.1%,#b2dfff 59.85%,#ffba96 79.96%,#8183c2)!important}.sunsim-bar-wrapper{display:flex;position:absolute;width:60%;min-width:400px;top:12px;left:0;z-index:3;touch-action:none;pointer-events:none}.sunsim-wrapper{width:100%;background:#fff;border-radius:30px;padding:5px;min-height:16px;z-index:3}.sunsim-bar-wrapper .sunsim-date{margin-right:12px;margin-left:12px}.sunsim-wrapper,.sunsim-date{touch-action:auto;pointer-events:all}.sunsim-wrapper .mdi-white-balance-sunny{color:#ffab02;vertical-align:baseline;font-size:20px}@media only screen and (max-width: 980px) and (min-width: 500px){.sunsim-bar-wrapper{top:101%;width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){.sunsim-bar-wrapper{top:calc(100% + 8px);width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{box-shadow:0 0 7px 1px #aaa}}@media only screen and (max-width: 500px){.sunsim-bar-wrapper{height:calc(100% + 84px);top:0;width:100%;flex-direction:column;justify-content:space-between;margin:-42px 0 0;padding:0;left:0;z-index:0;min-width:100%}.sunsim-bar-wrapper .sunsim-date{margin-right:0;margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{width:100%;border-radius:0;left:0;margin-left:0!important;box-shadow:0 0 7px 1px #aaa}}.image-instance[data-v-fad48118]{position:absolute;width:100%;opacity:0}.image-instance.active[data-v-fad48118]{opacity:1}.north-indicator[data-v-0a2cec1f]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-0a2cec1f]{position:relative}.image-instances[data-v-0a2cec1f]{position:relative;width:100%;height:100%}canvas[data-v-0a2cec1f]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-0a2cec1f]{position:absolute;top:0;bottom:0;left:0;right:0}.svg-container[data-v-0a2cec1f]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-0a2cec1f],svg[data-v-0a2cec1f]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-0a2cec1f] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}svg g.restricted[data-v-0a2cec1f] path{cursor:default!important}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-0a2cec1f]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-0a2cec1f]{margin-top:44px;margin-bottom:44px}}.overlay[data-v-9a90fa2f]{z-index:1!important;opacity:1;transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.north-indicator[data-v-08f2ea1e]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-08f2ea1e]{position:relative}.image-instances[data-v-08f2ea1e]{position:relative;width:100%;height:100%}canvas[data-v-08f2ea1e]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-08f2ea1e]{position:absolute;top:0;bottom:0;left:0;right:0}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-08f2ea1e]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-08f2ea1e]{margin-top:44px;margin-bottom:44px}}.v-card[data-v-f4e6ce2e]{transition:box-shadow .3s ease-in-out;border:2px solid transparent}[data-v-f4e6ce2e] .v-slide-group__content{justify-content:center}[data-v-f4e6ce2e] .v-slide-group__next--disabled,[data-v-f4e6ce2e] .v-slide-group__prev--disabled{pointer-events:all!important}.carousel-button[data-v-f4e6ce2e]{height:108px!important;min-width:54px!important;padding:0!important;z-index:2;background-color:#fff!important;border:2px solid #d2d2d2;color:#d2d2d2!important}.carousel-button.mobile[data-v-f4e6ce2e]{height:58px!important;min-width:38px!important}.carousel-button[data-v-f4e6ce2e]:hover{border:2px solid #999!important;color:#999!important}.carousel-button[data-v-f4e6ce2e]:hover:before,.carousel-button[data-v-f4e6ce2e]:hover:after{background-color:#fff!important}.align-baseline[data-v-f4e6ce2e]{align-items:baseline}.active-apt[data-v-f4e6ce2e]{border:4px solid #4caf50!important}.v-image[data-v-f4e6ce2e]{border-radius:0!important}#share-btns-wrapper button[data-v-3560cd03]{margin:0 8px}.v-btn[data-v-3560cd03]{background-color:#fff;pointer-events:all}.disclaimer[data-v-6e4f02d6]{padding:4px 10px;text-align:center;background-color:#00000040;border-radius:5px;line-height:20px}.disclaimer span[data-v-6e4f02d6]{cursor:pointer;color:#fff;text-decoration:underline;pointer-events:all}#player-wrapper[data-v-1dab1ac3]{position:relative;overflow:hidden}#player-sizer[data-v-1dab1ac3]{display:flex;justify-content:center;align-items:center;overflow:hidden}.player-control[data-v-1dab1ac3]{display:flex;position:absolute;z-index:3}#controls-top-left[data-v-1dab1ac3]{top:10px;left:10px}#controls-top-center[data-v-1dab1ac3]{top:10px;left:50%;transform:translate(-50%);z-index:4}#controls-top-right[data-v-1dab1ac3]{top:10px;right:10px;justify-content:flex-end;align-content:flex-end}#controls-center-left[data-v-1dab1ac3]{left:10px;top:50%;transform:translateY(-50%)}#controls-center-center[data-v-1dab1ac3]{top:50%;left:50%;transform:translate(-50%,-50%);align-items:center;justify-content:space-around;z-index:20}#controls-center-right[data-v-1dab1ac3]{top:50%;right:10px;transform:translateY(-50%);justify-content:flex-end;align-items:center}#controls-bottom-left[data-v-1dab1ac3]{bottom:10px;left:10px;z-index:5}#controls-bottom-center[data-v-1dab1ac3]{bottom:10px;left:50%;transform:translate(-50%);align-items:flex-end;justify-content:space-around;z-index:4}#controls-bottom-right[data-v-1dab1ac3]{bottom:10px;right:10px;justify-content:flex-end;align-content:flex-end;align-items:flex-end;z-index:5}.img-div[data-v-b418cf51]{position:absolute;display:block;height:100%;width:100%;background-size:cover;background-position:center center;z-index:2;left:0;top:0}.static-image-wrapper[data-v-b418cf51]{background:#fff}.compass-wrapper[data-v-e2117d1e]{width:50px}.player-and-components-wrapper[data-v-e2117d1e]{position:relative}.static-image[data-v-e2117d1e]{position:absolute;top:0;left:0;width:100%;height:auto}button.v-btn[data-v-e2117d1e]{background:#fff}.waypoint-carousel.full-screen[data-v-e2117d1e]{scale:.5}div#controls-bottom-center>div[data-v-e2117d1e]{display:flex;flex-direction:column;align-items:center}.player-error[data-v-e2117d1e]{min-height:400px;display:flex;align-items:center;justify-content:space-around;background:#ededed}@media only screen and (max-width: 600px){#btn-fullscreen[data-v-e2117d1e]{display:none}}@media all and (orientation: landscape) and (max-height: 499px){#btn-fullscreen[data-v-e2117d1e]{display:none}}
3
- `,document.head.appendChild(Q);function D(t,n,i,a){function o(r){return r instanceof i?r:new i(function(s){s(r)})}return new(i||(i=Promise))(function(r,s){function l(m){try{c(a.next(m))}catch(f){s(f)}}function d(m){try{c(a.throw(m))}catch(f){s(f)}}function c(m){m.done?r(m.value):o(m.value).then(l,d)}c((a=a.apply(t,n||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;class y{async loadJson(n){return(await v.get(n)).data}async loadImage(n){return new Promise((i,a)=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>{i(o)},o.onerror=a,o.src=n})}async loadImageData(n){const i=await this.loadImage(n),a=document.createElement("canvas");try{const o=a.getContext("2d");return a.width=i.width,a.height=i.height,o.drawImage(i,0,0),a.toDataURL("image/png")}finally{a.remove()}}}const g=(t,n)=>{const i=t.__vccOpts||t;for(const[a,o]of n)i[a]=o;return i},te={name:"QiHoverProbe",computed:{isHoverEnabled(){return window.getComputedStyle(this.$refs.hoverCheck).display==="none"}}},ne={ref:"hoverCheck",class:"hover-check"};function ie(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("div",ne,null,512)}const w=g(te,[["render",ie],["__scopeId","data-v-e4729353"]]),L={methods:{throttle(t,n){let i=!0;return function(...a){i&&(i=!1,t.apply(this,a),setTimeout(()=>i=!0,n))}}}},oe={name:"QiApartmentChooserRaster",components:{QiHoverProbe:w},mixins:[L],props:{cdnFileResolver:{type:Function,required:!0},viewModel:{type:Object,required:!0},selectedUnitId:{type:String,default:null},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},sceneData:{type:Array,default:[]},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null}},emits:["select-unit","go-to-unit","hover-over","hover-out"],data(){return{pos:{x:0,y:0,width:0,height:0},canvas:null,canvasBg:null,canvasWidth:0,canvasHeight:0,context:null,contextBg:null,image:null,imageData:null,originalImageData:null,hoverApartmentIndex:-1,showApartmentCard:!1,cursorX:null,cursorY:null,rasterImages:{},vueCanvasCursor:"auto",timeout:null,windowListener:void 0,resourceLoader:new y,apartmentIndexRasterMap:{}}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},rasterUrl(){return this.cdnFileResolver(`/scenedata${this.viewModel.currentScene}.png`)},rasterImage(){return this.rasterUrl in this.rasterImages?this.rasterImages[this.rasterUrl]:null},hoverApartment(){if(this.hoverApartmentIndex<0)return!1;const t=this.sceneData.find(n=>n.index===this.hoverApartmentIndex);return t?this.unitCallback?this.unitCallback(t.apartmentId):t.apartmentId:!1},canvasStyle(){return{width:this.canvasWidth+"px",height:this.canvasHeight+"px",cursor:this.vueCanvasCursor}},hoverBehaviourIdentifier(){return`hover-${this.showApartmentCard?"over":"out"}-${this.hoverApartment?typeof this.hoverApartment=="object"&&"unitId"in this.hoverApartment?this.hoverApartment.unitId:this.hoverApartment:""}`}},watch:{rasterUrl:{handler(){this.rasterImages[this.rasterUrl]||this.resourceLoader.loadImageData(this.rasterUrl).then(t=>{this.rasterImages=Object.assign(Object.assign({},this.rasterImages),{[this.rasterUrl]:t})})},immediate:!0},rasterImage(){this.rasterImage&&this.init()},"viewModel.currentScene":{handler(){this.draw()},immediate:!0},"viewModel.isRotating"(){this.draw()},drawObserver(){this.draw()},selectedUnitId(){this.draw()},hoverApartment(){this.draw(),this.hoverApartment?this.vueCanvasCursor="pointer":this.vueCanvasCursor="auto"},hoverBehaviourIdentifier(){this.$emit(this.showApartmentCard?"hover-over":"hover-out",{hoverApartment:this.hoverApartment,closeHandler:()=>this.closeDialog()})},pos(){this.$emit("pos",this.pos)}},mounted(){this.windowListener=()=>{clearTimeout(this.timeout),this.updateCanvasSize(),this.timeout=setTimeout(()=>{this.updateCanvasSize()},50)},window.addEventListener("resize",this.windowListener),this.updateCanvasSize()},beforeUnmount(){window.removeEventListener("resize",this.windowListener);for(const t in this.rasterImages)URL.revokeObjectURL(this.rasterImages[t])},methods:{init(){this.canvas=this.$refs.canvasMask,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.image=new Image,this.image.onload=()=>{this.setupDraw(),this.canvas.addEventListener("mousemove",this.throttle(this.handleMouseMove,50))},this.image.src=this.rasterImage},handleMouseMove(t){const n=this.getApartmentIndexByCursorPosition(t.offsetX,t.offsetY);this.showApartmentCard=n>=0,this.hoverApartmentIndex=n,this.pos={x:t.offsetX,y:t.offsetY,width:this.canvasWidth,height:this.canvasHeight}},clickCanvas(t){const n=this.getApartmentIndexByCursorPosition(t.offsetX,t.offsetY);n<0||this.isHoverable&&this.goToApartmentByIndex(n)},setImageData(){if(this.image&&this.image.width){this.canvas.width=this.image.width,this.canvas.height=this.image.height,this.context.drawImage(this.image,0,0,this.image.width,this.image.height),this.originalImageData=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),this.imageData=this.context.getImageData(0,0,this.canvas.width,this.canvas.height);const t=this.originalImageData.data;this.apartmentIndexRasterMap={};for(let n=0;n<t.length;n+=4)this.apartmentIndexRasterMap[t[n]]=[];for(let n=3;n<t.length;n+=4)t[n]===255&&t[n-3]in this.apartmentIndexRasterMap&&this.apartmentIndexRasterMap[t[n-3]].push(n-3)}},getApartmentIndexByCursorPosition(t,n){this.cursorX=t,this.cursorY=n;const i=this.canvas.offsetWidth/this.canvas.width,a=this.canvas.offsetHeight/this.canvas.height,o=(t/i).toFixed(),s=(n/a).toFixed()*(this.canvas.width*4)+o*4,l=this.originalImageData.data[s];return this.originalImageData.data[s+3]>0?l:-1},getApartmentIndexById(t){const n=this.sceneData.find(i=>i.apartmentId===t);return n?n.index:-1},highlightApartments(){this.getApartmentsInRaster().forEach(n=>{if(n.index>=0){const i=this.getApartmentPixelsByIndex(n.index),a=this.getApartmentIdByIndex(n.index);let o="idle";!this.hoverApartment&&this.selectedUnitId&&a===this.selectedUnitId?o="selected":this.hoverApartment&&this.hoverApartmentIndex===n.index&&(o="hover");const r=this.unitCallback?this.unitCallback(a):a;if(r){const s=this.colorCallback(r,o);if(s)for(let l=0;l<i.length;l++)this.imageData.data[i[l]]=s.r,this.imageData.data[i[l]+1]=s.g,this.imageData.data[i[l]+2]=s.b,this.imageData.data[i[l]+3]=s.a}}})},getApartmentPixelsByIndex(t){return this.originalImageData?this.apartmentIndexRasterMap[t]:!1},getApartmentIdByIndex(t){const n=this.sceneData.find(i=>i.index===t);return n&&n.apartmentId},getApartmentsInRaster(){if(this.originalImageData){const t=Object.keys(this.apartmentIndexRasterMap).map(i=>parseInt(i));return this.sceneData.filter(i=>t.includes(i.index))}else return[]},goToApartmentByIndex(t){const n=this.getApartmentIdByIndex(t);this.goToApartmentById(n)},goToApartmentById(t){const n=this.unitCallback?this.unitCallback(t):t;this.$emit("select-unit",n),n&&this.canGoToUnitCallback(n)&&this.$emit("go-to-unit",n)},setAlpha(t=0){if(!this.imageData)return;const n=this.imageData.data;for(let i=3;i<n.length;i+=4)n[i]=t},updateCanvasSize(){if(!this.$el)return!1;this.canvasWidth=this.$el.offsetWidth,this.canvasHeight=this.$el.offsetHeight},setupDraw(){this.setImageData(),this.draw()},draw(){this.setAlpha(),this.highlightApartments(),this.context&&this.imageData&&this.context.putImageData(this.imageData,0,0)},closeDialog(){this.showApartmentCard=!1}}},ae={id:"canvas"};function re(t,n,i,a,o,r){const s=e.resolveComponent("qi-hover-probe");return e.openBlock(),e.createElementBlock("div",ae,[e.withDirectives(e.createElementVNode("canvas",{id:"canvas-mask",ref:"canvasMask",style:e.normalizeStyle(r.canvasStyle),onClick:n[0]||(n[0]=(...l)=>r.clickCanvas&&r.clickCanvas(...l))},null,4),[[e.vShow,!i.viewModel.isRotating]]),e.createVNode(s,{ref:"hoverProbe"},null,512)])}const E=g(oe,[["render",re],["__scopeId","data-v-3bbbc77b"]]),se={name:"QiApartmentChooserSvg",components:{QiHoverProbe:w},mixins:[L],props:{cdnFileResolver:{type:Function,required:!0},viewModel:{type:Object,required:!0},selectedUnitId:{type:String,default:null},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},sceneData:{type:Array,default:[]},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null}},emits:["select-unit","go-to-unit","hover-over","hover-out"],data(){return{pos:{x:0,y:0,width:0,height:0},hoverApartmentIndex:-1,svgImages:{},currentSvgImage:null,resourceLoader:new y}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled}},watch:{"viewModel.currentScene":{handler(){this.viewModel.currentScene in this.svgImages&&(this.currentSvgImage=this.svgImages[this.viewModel.currentScene])},immediate:!0},svgImages:{handler(){this.viewModel.currentScene in this.svgImages&&(this.currentSvgImage=this.svgImages[this.viewModel.currentScene])},immediate:!0},pos(){this.$emit("pos",this.pos)},hoverApartmentIndex(t,n){if(t>=0){const i=this.getApartmentByIndex(t);this.$emit("hover-over",{hoverApartment:i,closeHandler:()=>{this.hoverApartmentIndex=-1}})}else{const i=this.getApartmentByIndex(n);this.$emit("hover-out",{hoverApartment:i,closeHandler:()=>{this.hoverApartmentIndex=-1}})}}},mounted(){for(let t=1;t<=4;t++){const n=this.cdnFileResolver(`/scenedata${t}.svg`),i={};this.resourceLoader.loadJson(n).then(a=>{i.markup=a;const r=new DOMParser().parseFromString(a,"image/svg+xml").getElementsByTagName("svg")[0];i.viewBox=r.getAttribute("viewBox"),i.svgObjects=Array.from(r.querySelectorAll("*[data-index]")).map(s=>({index:parseInt(s.getAttribute("data-index")),svg:s.innerHTML})),this.svgImages=Object.assign(Object.assign({},this.svgImages),{[t]:i})})}this.$refs.container.addEventListener("mousemove",this.throttle(this.handleMouseMove,50))},methods:{handleMouseMove(t){this.pos={x:t.offsetX,y:t.offsetY,width:this.$el.offsetWidth,height:this.$el.offsetHeight}},getApartmentIdByIndex(t){var n;return(n=this.sceneData.find(i=>i.index===parseInt(t)))===null||n===void 0?void 0:n.apartmentId},getApartmentByIndex(t){const n=this.getApartmentIdByIndex(t);return this.unitCallback?this.unitCallback(n):n},mouseEnter(t){this.isHoverable&&(this.hoverApartmentIndex=t)},mouseLeave(){this.isHoverable&&(this.hoverApartmentIndex=-1)},click(t){const n=this.getApartmentByIndex(t);this.$emit("select-unit",n),this.isHoverable&&n&&this.canGoToUnitCallback(n)?this.$emit("go-to-unit",n):this.hoverApartmentIndex=t},getGClass(t){const n=this.getApartmentIdByIndex(t),i=this.getApartmentByIndex(t);let a="idle";this.hoverApartmentIndex<0&&this.selectedUnitId&&n===this.selectedUnitId?a="selected":this.hoverApartmentIndex>=0&&this.hoverApartmentIndex===t&&(a="hover");const o=this.colorCallback(i,a);if(o){const{r,g:s,b:l,a:d,s:c}=o;return{strokeWidth:c!==void 0?c:2,stroke:`rgb(${r}, ${s}, ${l})`,strokeOpacity:1,fill:`rgb(${r}, ${s}, ${l})`,fillOpacity:d/255,cursor:`${this.canGoToUnitCallback(i)?"cursor":"default"} !important`}}else return{strokeWidth:0,stroke:"white",strokeOpacity:0,fill:"white",fillOpacity:0,cursor:"default !important"}}}},le={id:"container",ref:"container"},de=["viewBox"],ce=["innerHTML","onMouseenter","onMouseleave","onClick"];function he(t,n,i,a,o,r){const s=e.resolveComponent("qi-hover-probe");return e.openBlock(),e.createElementBlock("div",le,[e.withDirectives(e.createElementVNode("div",{class:"svg-container",style:e.normalizeStyle({opacity:!o.currentSvgImage||!o.currentSvgImage.svgObjects?0:1})},[o.currentSvgImage&&o.currentSvgImage.svgObjects?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:o.currentSvgImage.viewBox},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.currentSvgImage.svgObjects,({index:l,svg:d})=>(e.openBlock(),e.createElementBlock("g",{key:l,innerHTML:d,style:e.normalizeStyle(r.getGClass(l)),onMouseenter:c=>r.mouseEnter(l),onMouseleave:c=>r.mouseLeave(l),onClick:c=>r.click(l)},null,44,ce))),128))],8,de)):e.createCommentVNode("",!0)],4),[[e.vShow,!i.viewModel.isRotating]]),e.createVNode(s,{ref:"hoverProbe"},null,512)],512)}const A=g(se,[["render",he],["__scopeId","data-v-82a61864"]]),me={name:"QiApartmentChooserNavigation",inject:["i18n"],props:{canGoToUnitCallback:{type:Function,default:()=>!0},selectedUnit:{type:Object,default:null},prevUnit:{type:Object,default:null},nextUnit:{type:Object,default:null},viewModel:{type:Object,required:!0}},mounted(){window.addEventListener("keydown",this.keyNavigate)},beforeUnmount(){window.removeEventListener("keydown",this.keyNavigate)},methods:{keyNavigate(t){t.keyCode===37?this.prevUnit&&this.$emit("prev-unit"):t.keyCode===39&&this.nextUnit&&this.$emit("next-unit")}}},ue={key:0,class:"d-none d-md-flex"};function pe(t,n,i,a,o,r){const s=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{elevation:"1",icon:"mdi-rotate-right",class:"black darken-1",onClick:n[0]||(n[0]=l=>i.viewModel.rotateClockwise())}),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-chevron-left",class:"mr-sm-4 ml-sm-8 mr-3 ml-3 black darken-1",disabled:!i.prevUnit,onClick:n[1]||(n[1]=l=>t.$emit("prev-unit"))},null,8,["disabled"]),e.createVNode(s,{color:"success darken-2",elevation:"1",rounded:"",plain:"",disabled:!i.selectedUnit||!i.canGoToUnitCallback(i.selectedUnit),onClick:n[2]||(n[2]=l=>t.$emit("go-to-unit",i.selectedUnit))},{default:e.withCtx(()=>[i.selectedUnit&&i.canGoToUnitCallback(i.selectedUnit)?(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(r.i18n.getLabel("see-apartment"))+"  ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(i.selectedUnit&&"title"in i.selectedUnit?i.selectedUnit.title:"-"),1)]),_:1},8,["disabled"]),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-chevron-right",class:"mr-sm-8 ml-sm-4 mr-3 ml-3 black darken-1",disabled:!i.nextUnit,onClick:n[3]||(n[3]=l=>t.$emit("next-unit"))},null,8,["disabled"]),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-rotate-left",class:"black darken-1",onClick:n[4]||(n[4]=l=>i.viewModel.rotateCounterClockwise())})])}const O=g(me,[["render",pe],["__scopeId","data-v-129ef905"]]);class V{constructor(n){this._numParts=n,this._loadedCount=0,this._isError=!1,this._finishedAction=()=>{},this._errorAction=()=>{},this._loadProgressAction=()=>{}}onLoadFinished(n){return this._finishedAction=n,this}onLoadError(n){return this._errorAction=n,this}onLoadProgress(n){return this._loadProgressAction=n,this}partLoaded(){this.isFinished||(this._loadedCount++,this._loadProgressAction(this.percentLoaded),this.isFinished&&this._finishedAction())}errorDetected(){this._isError||(this._isError=!0,this._errorAction())}get isFinished(){return this._loadedCount>=this._numParts}get isError(){return this._isError}get percentLoaded(){return Math.round(this._loadedCount*100/this._numParts)}}class U{constructor(n,i,a,o){this._rotator=n,this._direction=i,this._frameIndex=a,this._sceneCount=o}get atEnd(){return this._sceneCount===0}get frameIndex(){return this._frameIndex}nextFrame(){const n=this._rotator.clampFrameIndex(this._frameIndex+this._direction),i=this._rotator.isCardinalFrame(n)?this._sceneCount-1:this._sceneCount;return new U(this._rotator,this._direction,n,i)}}class G{constructor(n,i){this._cardinalFrames=n,this._totalFrameCount=i}start(n,i,a){const o=this.startFrameIndexForScene(i);return new U(this,n,o,a)}isCardinalFrame(n){return this._cardinalFrames.includes(n)}clampFrameIndex(n){return(this._totalFrameCount+n)%this._totalFrameCount}startFrameIndexForScene(n){return this._cardinalFrames[n]}}const X=64,_=4,ge=120,fe={name:"QiApartmentChooserRotator",props:{viewModel:{type:Object,required:!0},build:{type:String,default:""},cdnFileResolver:{type:Function,required:!0},cardinalFrames:{type:Array,required:!0}},emits:["loaded","error","progress"],data(){const t=this.createFrames();return{loadTracker:new V(t.length).onLoadFinished(()=>this.$emit("loaded")).onLoadProgress(n=>this.$emit("progress",n)).onLoadError(()=>this.$emit("error")),sceneRotator:new G(this.cardinalFrames,X),images:t,isPreloaded:!1}},computed:{activeFrame(){return this.images.find(t=>t.show)}},watch:{"viewModel.currentScene"(t,n){const i=this.getDirection(n,t),a=this.getSceneCountBetween(n,t);this.rotateInDirection(n,i,a)}},created(){this.rotateComplete()},methods:{rotateInDirection(t,n,i){this.viewModel.isRotating||(this.viewModel.isRotating=!0,this.rotationStep(this.sceneRotator.start(n,t%_,i)))},rotationStep(t){setTimeout(()=>{this.images[t.frameIndex].show=!1;const n=t.nextFrame();this.images[n.frameIndex].show=!0,n.atEnd?this.rotateComplete():window.requestAnimationFrame(()=>this.rotationStep(n))},1e3/ge)},rotateComplete(){const t=this.sceneRotator.startFrameIndexForScene(this.viewModel.currentScene%_);t in this.images&&(this.images[t].show=!0),this.viewModel.isRotating=!1},createFrames(){const t=[];for(let n=0;n<X;n++){const{sourceSet:i,defaultPath:a}=this.frameImageSource(n);t.push({index:n,sourceSet:i,defaultPath:a,show:!1})}return t},frameImageSource(t){const n=("0000"+(t+1)).slice(-4),i=this.build?`?v=${this.build}`:"",a=[`${this.cdnFileResolver(`/480/${n}.jpg${i}`)} 480w`,`${this.cdnFileResolver(`/960/${n}.jpg${i}`)} 960w`,`${this.cdnFileResolver(`/1280/${n}.jpg${i}`)} 1280w`].join(","),o=this.cdnFileResolver(`/480/${n}.jpg${i}`);return{sourceSet:a,defaultPath:o}},getSceneCountBetween(t,n){const i=_/2,a=Math.abs(t-n);return a>i?_-a:a},getDirection(t,n){if(t===n)return 0;const a=Math.abs(t-n)<_/2;return a&&t<n||!a&&t>n?1:-1}}},be={key:0,class:"fill-parent d-flex justify-center align-center blue-grey lighten-5"},ve={key:1,class:"frame-container"},ye={class:"frame-image"},we=["srcset","type"],ke=["src"],Ce={key:2,id:"image-stack",class:"frame-container"},xe=["alt"],_e=["srcset"],Be=["src"];function Ie(t,n,i,a,o,r){const s=e.resolveComponent("v-icon");return e.openBlock(),e.createElementBlock("div",null,[o.loadTracker.isError?(e.openBlock(),e.createElementBlock("div",be,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):o.isPreloaded?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,l=>(e.openBlock(),e.createElementBlock("picture",{key:l.index,alt:l.index,class:e.normalizeClass({"frame-image":!0,show:l.show})},[e.createElementVNode("source",{srcset:l.sourceSet,type:"image/jpeg"},null,8,_e),e.createElementVNode("img",{src:l.defaultPath,alt:"Building image",onLoad:n[2]||(n[2]=d=>o.loadTracker.partLoaded()),onError:n[3]||(n[3]=d=>o.loadTracker.errorDetected())},null,40,Be)],10,xe))),128))])):(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("picture",ye,[e.createElementVNode("source",{srcset:r.activeFrame.sourceSet,type:r.activeFrame.type},null,8,we),e.createElementVNode("img",{src:r.activeFrame.defaultPath,onLoad:n[0]||(n[0]=l=>o.isPreloaded=!0),onError:n[1]||(n[1]=l=>o.loadTracker.errorDetected())},null,40,ke)])]))])}const $=g(fe,[["render",Ie],["__scopeId","data-v-e6481f8e"]]),Se={name:"FloatingCard",props:{pos:{type:Object,required:!0},isHoverable:Boolean},computed:{q(){const t=this.pos.x<=this.pos.width/2?"left":"right";return`${this.pos.y<=this.pos.height/2?"top":"bottom"}-${t}`}}};function De(t,n,i,a,o,r){const s=e.resolveComponent("v-dialog"),l=e.resolveComponent("v-fade-transition");return e.openBlock(),e.createBlock(l,{origin:r.q.replace("-"," ")+" "+i.pos.x+" "+i.pos.y},{default:e.withCtx(()=>[i.isHoverable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["floating-card",r.q]),style:e.normalizeStyle({left:`${i.pos.x}px`,top:`${i.pos.y}px`,pointerEvents:"none"})},[e.renderSlot(t.$slots,"default",{isHoverable:i.isHoverable},void 0,!0)],6)):(e.openBlock(),e.createBlock(s,{key:1,value:!0,width:"auto","onClick:outside":n[0]||(n[0]=d=>t.$emit("outside",d))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{isHoverable:i.isHoverable},void 0,!0)]),_:3}))]),_:3},8,["origin"])}const B=g(Se,[["render",De],["__scopeId","data-v-b74de171"]]),Ee={name:"QiZoomBox",props:{desktop:{type:Boolean,default:!0},mobile:{type:Boolean,default:!0},maxScale:{type:Number,default:10},consumeMouseClickWhenMoved:{type:Boolean,default:!0},consumeMouseUpWhenMoved:{type:Boolean,default:!0}},data(){return{zoom:100,originX:0,originY:0,moving:!1,scaling:!1,lastEvent:void 0,moved:!1}},computed:{transform(){return`translateX(${this.originX}px) translateY(${this.originY}px) scale(${this.scale})`},scale(){return this.zoom/100},actualMaxScale(){return this.maxScale*100}},watch:{scale(){this.emitUpdate()},originX(){this.emitUpdate()},originY(){this.emitUpdate()},desktop(){this.desktop?this.addDesktopHandlers():this.removeDesktopHandlers()},mobile(){this.mobile?this.addMobileHandlers():this.removeMobileHandlers()}},mounted(){this.desktop&&this.addDesktopHandlers(),this.mobile&&this.addMobileHandlers()},beforeUnmount(){this.desktop&&this.removeDesktopHandlers(),this.mobile&&this.removeMobileHandlers()},methods:{addDesktopHandlers(){this.$refs.box.addEventListener("wheel",this.wheelHandler,{capture:!0}),this.$refs.box.addEventListener("mousedown",this.mouseDownHandler,{capture:!0}),this.$refs.box.addEventListener("mousemove",this.mouseMoveHandler,{capture:!0}),window.addEventListener("mouseup",this.mouseUpHandler,{capture:!0}),window.addEventListener("click",this.mouseClickHandler,{capture:!0})},addMobileHandlers(){this.$refs.box.addEventListener("touchstart",this.touchStartHandler,{capture:!0}),this.$refs.box.addEventListener("touchmove",this.touchMoveHandler,{capture:!0}),window.addEventListener("touchend",this.touchEndHandler,{capture:!0}),window.addEventListener("touchcancel",this.touchEndHandler,{capture:!0})},removeDesktopHandlers(){this.$refs.box.removeEventListener("wheel",this.wheelHandler,{capture:!0}),this.$refs.box.removeEventListener("mousedown",this.mouseDownHandler,{capture:!0}),this.$refs.box.removeEventListener("mousemove",this.mouseMoveHandler,{capture:!0}),window.removeEventListener("mouseup",this.mouseUpHandler,{capture:!0}),window.removeEventListener("click",this.mouseClickHandler,{capture:!0})},removeMobileHandlers(){this.$refs.box.removeEventListener("touchstart",this.touchStartHandler,{capture:!0}),this.$refs.box.removeEventListener("touchmove",this.touchMoveHandler,{capture:!0}),window.removeEventListener("touchend",this.touchEndHandler,{capture:!0}),window.removeEventListener("touchcancel",this.touchEndHandler,{capture:!0})},wheelHandler(t){const{x:n,y:i}=this.getOffsetCoordinates(t);this.adjustZoom(-t.deltaY/10,n,i),t.preventDefault()},mouseDownHandler(t){this.moving=!0,this.moved=!1,this.lastEvent=t},mouseMoveHandler(t){if(this.moving){const{x:n,y:i}=this.getOffsetCoordinates(t),{x:a,y:o}=this.getOffsetCoordinates(this.lastEvent),r={x:n-a,y:i-o};this.adjustTranslateX(r.x),this.adjustTranslateY(r.y),this.moved=!0,this.lastEvent=t}},mouseUpHandler(t){this.moving&&this.moved&&this.consumeMouseUpWhenMoved&&(t.preventDefault(),t.stopImmediatePropagation())},mouseClickHandler(t){this.moving&&(this.moved&&this.consumeMouseClickWhenMoved&&(t.preventDefault(),t.stopImmediatePropagation()),this.moving=!1)},touchStartHandler(t){this.moving=t.touches.length===1,this.scaling=t.touches.length===2,this.lastEvent=t},touchMoveHandler(t){if(this.moving){const{x:n,y:i}=this.getOffsetCoordinates(t.touches[0]),{x:a,y:o}=this.getOffsetCoordinates(this.lastEvent.touches[0]),r={x:n-a,y:i-o};this.adjustTranslateX(r.x),this.adjustTranslateY(r.y)}else if(this.scaling&&t.touches.length===2){const{x:n,y:i}=this.getOffsetCoordinates(t.touches[0]),{x:a,y:o}=this.getOffsetCoordinates(this.lastEvent.touches[0]),{x:r,y:s}=this.getOffsetCoordinates(t.touches[1]),{x:l,y:d}=this.getOffsetCoordinates(this.lastEvent.touches[1]),c=Math.hypot(a-l,o-d),m=Math.hypot(n-r,i-s),f=(r+n)/2,u=(s+i)/2;this.adjustZoom(m-c,f,u)}this.lastEvent=t},touchEndHandler(){this.moving=!1,this.scaling=!1},getOffsetCoordinates(t){const{left:n,top:i}=this.$refs.box.getBoundingClientRect();return{x:t.clientX-n,y:t.clientY-i}},adjustTranslateX(t){const n=this.$refs.box.clientWidth,i=n*this.scale;this.originX=Math.max(Math.min(0,this.originX+t),-(i-n))},adjustTranslateY(t){const n=this.$refs.box.clientHeight,i=n*this.scale;this.originY=Math.max(Math.min(0,this.originY+t),-(i-n))},adjustZoom(t,n,i){const a=this.$refs.box.clientWidth,o=this.$refs.box.clientHeight,r=a*this.scale,s=o*this.scale;this.zoom=Math.min(Math.max(100,this.zoom+t),this.actualMaxScale);const l=a*this.scale,d=o*this.scale,c=l-r,m=d-s;this.originX-=n/a*c,this.originY-=i/o*m,this.adjustTranslateX(0),this.adjustTranslateY(0)},emitUpdate(){this.$emit("update",{scale:this.scale,x:this.originX,y:this.originY,resolve:(t,n)=>{const i=this.$refs.box.clientWidth,a=this.$refs.box.clientHeight,o=this.originX/-this.scale,r=this.originY/-this.scale,s=o+i/this.scale,l=r+a/this.scale,d=t/i*(s-o)+o,c=n/a*(l-r)+r;return{x:d,y:c}}})}}},Ae={ref:"box",class:"zoom-box-container"};function Ve(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",{style:e.normalizeStyle({"transform-origin":"top left",transform:r.transform}),class:"zoom-box"},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)],512)}const I=g(Ee,[["render",Ve],["__scopeId","data-v-83bfd28a"]]),z=4;function W(t){return t<z?t+1:1}function Me(t){return t>1?t-1:z}class K{constructor(n){this._state={isRotating:!1,currentScene:n}}get isRotating(){return this._state.isRotating}set isRotating(n){this._state.isRotating=n}get navigator(){return this._navigator}get sceneModel(){return this._sceneModel}unlessRotatingDo(n){this.isRotating||n()}get currentScene(){return this._state.currentScene}set currentScene(n){this._state.currentScene=n}rotateCounterClockwise(){this.unlessRotatingDo(()=>{this.currentScene=W(this.currentScene)})}rotateClockwise(){this.unlessRotatingDo(()=>{this.currentScene=Me(this.currentScene)})}}const Ne={interior:"Interiør","see-a-selection-of-the-options-in-the-project":"Se et utvalg av tilvalgsmulighetene i prosjektet.","floor-plan":"Planløsning","all-illustrations-are-indicative-deviations-may-occur":{nb:"Alle illustrasjoner er veiledende. Avvik kan forekomme.",en:"All illustrations are indicative. Discrepancies may exist."},"read-more-here":"Les mer her","i-understand":{nb:"Jeg forstår",en:"I understand"},share:"Share","share-to-facebook":"Share to Facebook","share-to-linkedin":"Share to Linkedin","share-to-twitter":"Share to Twitter","share-via-email":"Share via Email","copy-link":"Copy link","virtual-view":"Virtuell Visning","slide-show":"Slide Show",room:"Room",floor:"Floor","see-apartments":"See apartments","see-apartment":"See apartment","click-and-drag-to-look-around":{en:"Click and drag to look around",nb:"Klikk og dra for å se deg rundt"},"click-on-the-cricles-to-move-around":{en:"Click on the circles to move around",nb:"Klikk på sirkelene for å gå rundt"},"use-the-mouse-wheel-to-zoom":{en:"Use the mouse wheel to zoom",nb:"Bruk mushjulet for å zoome"},"you-can-also-use-the-arrow-keys-to-move-around":{en:"You can also use the arrow keys to move around",nb:"Du kan også bruke pilene på tastaturet for å gå rundt"},"tap-and-drag-to-look-around":{en:"Tap and drag to look around",nb:"Trykk og dra for å se deg rundt"},"tap-on-the-circles-to-move-around":{en:"Tap on the circles to move around",nb:"Trykk på sirkelene for å gå rundt"},"use-two-fingers-to-zoom":{en:"Use two fingers to zoom",nb:"Bruk to fingre for å zoome"},"dont-show-again":{en:"Don't Show Again",nb:"Ikke vis igjen"}};class b{constructor(n,i){this._labels={...Ne,...n||{}},this._language=i||"en"}getLabel(n){return n in this._labels?this.get(this._labels[n]):n}get(n){if(typeof n=="string")return n;if(this._language in n&&n[this._language])return n[this._language];for(const i in n)if(n[i])return n[i];return""}}const Re=4,Fe=[0,16,32,48],Te={name:"QiApartmentChooser",components:{QiApartmentChooserRaster:E,QiApartmentChooserSvg:A,QiApartmentChooserNavigation:O,QiApartmentChooserRotator:$,QiFloatingCard:B,QiHoverProbe:w,QiZoomBox:I},provide(){return{i18n:this.i18n?new b(this.i18n.labels,this.i18n.language):new b}},emits:["select-unit","go-to-unit","nav-unit","hover-over-unit","hover-out-unit","initialized"],props:{i18n:{type:Object,default:void 0},showCards:{type:Boolean,default:!0},build:{type:String,default:""},buildingSceneDataResolver:{type:Function,default:null},buildingScenesByApartmentResolver:{type:Function,default:null},cdnFileResolver:{type:Function,required:!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},selectedUnitId:{type:String,default:null},nextUnit:{type:Object,default:null},prevUnit:{type:Object,default:null},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},useSvg:{type:Boolean,default:!1}},data(){return{loadState:{isReady:!1,isError:!1,progress:void 0},scenesByApartment:null,sceneData:null,scenes:null,viewModel:void 0,resourceLoader:new y,pos:{x:0,y:0,width:0,height:0},closeHandler:void 0,hoverApartment:void 0}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},selectedUnit(){return this.unitCallback?this.unitCallback(this.selectedUnitId):this.selectedUnitId},overlayComponent(){return this.useSvg?A:E}},watch:{selectedUnitId:{handler(){if(this.selectedUnitId&&this.viewModel){const t=this.scenesByApartment[this.selectedUnitId];t&&(this.viewModel.currentScene=t)}},immediate:!0}},mounted(){return D(this,void 0,void 0,function*(){let t=null;try{t=yield this.resourceLoader.loadJson(this.cdnFileResolver("/apartmentChooser.json"))}catch{console.info("apartmentChooser.json not found")}const n=t&&t.startScene!==void 0?t.startScene:Re;this.scenes=t&&t.scenes!==void 0?t.scenes:Fe,this.sceneData=t&&t.sceneData!==void 0?t.sceneData.map(o=>({apartmentId:o.apartmentID,index:o.index})):this.buildingSceneDataResolver?yield this.buildingSceneDataResolver():[],this.scenesByApartment=t&&t.sceneData!==void 0?t.sceneData.map(o=>{const r=o.bestScene===0?4:o.bestScene;return{unitId:o.apartmentID,scene:r}}).reduce((o,r)=>Object.assign(Object.assign({},o),{[r.unitId]:r.scene}),{}):this.buildingScenesByApartmentResolver?yield this.buildingScenesByApartmentResolver():[];const i=(o,r="unitId")=>{let s=n,l=[];for(let d=0;d<z;d++)l.push(s),s=W(s);return o.sort((d,c)=>{const m=l.findIndex(u=>u===this.scenesByApartment[d[r]]),f=l.findIndex(u=>u===this.scenesByApartment[c[r]]);return m<f?-1:m>f?1:0}),o},a=o=>{this.viewModel=new K(o)};this.$emit("initialized",{scene:n,scenes:this.scenes,sceneData:this.sceneData,scenesByApartment:this.scenesByApartment,unitsSceneSort:i,initialize:a})})},methods:{onPos(t){this.pos=t},hoverOver({hoverApartment:t,closeHandler:n}){this.hoverApartment=t,this.closeHandler=n,this.$emit("hover-over-unit",t)},hoverOut({hoverApartment:t,closeHandler:n}){this.hoverApartment=null,this.closeHandler=n,this.$emit("hover-out-unit",t)}}},He={key:0},Le={class:"interactive-viewer"},Oe={class:"fill-parent"},Ue={key:0},$e={key:1,class:"navigation"},ze={key:2};function je(t,n,i,a,o,r){const s=e.resolveComponent("qi-apartment-chooser-rotator"),l=e.resolveComponent("qi-zoom-box"),d=e.resolveComponent("qi-floating-card"),c=e.resolveComponent("qi-apartment-chooser-navigation"),m=e.resolveComponent("v-progress-linear"),f=e.resolveComponent("qi-hover-probe");return o.viewModel?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",Le,[e.createElementVNode("div",Oe,[e.createVNode(l,{desktop:o.loadState.isReady&&i.interactiveDesktop,mobile:o.loadState.isReady&&i.interactiveMobile},{default:e.withCtx(()=>[e.createVNode(s,{"cdn-file-resolver":i.cdnFileResolver,"view-model":o.viewModel,"cardinal-frames":o.scenes,build:i.build,onProgress:n[0]||(n[0]=u=>o.loadState.progress=u),onLoaded:n[1]||(n[1]=u=>o.loadState.isReady=!0),onError:n[2]||(n[2]=u=>o.loadState.isError=!0)},null,8,["cdn-file-resolver","view-model","cardinal-frames","build"]),o.loadState.isReady?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.overlayComponent),{"cdn-file-resolver":i.cdnFileResolver,"view-model":o.viewModel,"selected-unit-id":i.selectedUnitId,"scene-data":o.sceneData,"color-callback":i.colorCallback,"unit-callback":i.unitCallback,"can-go-to-unit-callback":i.canGoToUnitCallback,"draw-observer":i.drawObserver,onSelectUnit:n[3]||(n[3]=u=>t.$emit("select-unit",u)),onGoToUnit:n[4]||(n[4]=u=>t.$emit("go-to-unit",u)),onHoverOver:r.hoverOver,onHoverOut:r.hoverOut,onPos:r.onPos},{default:e.withCtx(u=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(u)),void 0,!0)]),_:3},40,["cdn-file-resolver","view-model","selected-unit-id","scene-data","color-callback","unit-callback","can-go-to-unit-callback","draw-observer","onHoverOver","onHoverOut","onPos"]))])):e.createCommentVNode("",!0)]),_:3},8,["desktop","mobile"]),o.hoverApartment&&i.showCards?(e.openBlock(),e.createBlock(d,{key:0,"is-hoverable":r.isHoverable,pos:o.pos,onOutside:o.closeHandler},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{unit:o.hoverApartment,canGoToUnit:i.canGoToUnitCallback(o.hoverApartment),goToUnit:()=>i.canGoToUnitCallback(o.hoverApartment)&&t.$emit("go-to-unit",o.hoverApartment),pos:o.pos,isHoverable:r.isHoverable,close:o.closeHandler},void 0,!0)]),_:3},8,["is-hoverable","pos","onOutside"])):e.createCommentVNode("",!0),o.loadState.isReady?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(c,{"can-go-to-unit-callback":i.canGoToUnitCallback,"selected-unit":r.selectedUnit,"prev-unit":i.prevUnit,"next-unit":i.nextUnit,"view-model":o.viewModel,onGoToUnit:n[5]||(n[5]=u=>t.$emit("go-to-unit",u)),onPrevUnit:n[6]||(n[6]=u=>t.$emit("nav-unit",i.prevUnit)),onNextUnit:n[7]||(n[7]=u=>t.$emit("nav-unit",i.nextUnit))},null,8,["can-go-to-unit-callback","selected-unit","prev-unit","next-unit","view-model"])])):o.loadState.isError?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(m,{indeterminate:!o.loadState.progress,value:o.loadState.progress},null,8,["indeterminate","value"])]))])]),e.createVNode(f,{ref:"hoverProbe"},null,512)])):e.createCommentVNode("",!0)}const Z=g(Te,[["render",je],["__scopeId","data-v-3a1121f3"]]),qe="data:image/png;base64,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",Ye={name:"QiNorthDirection",props:{longitude:{type:Number,default:()=>0}},data(){return{compassNeedle:qe}},computed:{needleRotation(){return{transform:`rotate(${90-this.longitude}deg)`,transition:" transform 0.5s ease-in"}}}};function Pe(t,n,i,a,o,r){const s=e.resolveComponent("v-img");return e.openBlock(),e.createBlock(s,{src:o.compassNeedle,style:e.normalizeStyle(r.needleRotation)},null,8,["src","style"])}const M=g(Ye,[["render",Pe]]);function j(t){return t.toLocaleString("en-no",{month:"short",day:"numeric"})}const Qe=e.defineComponent({setup(){},name:"QiBuildingChooserSunSimControl",props:{modelValue:{type:Number,required:!0},dateSelector:{type:Object,required:!0},isLoading:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{currentValue:this.modelValue,currentDate:null}},computed:{currentValueString(){const t=Math.floor(this.currentValue/2).toString().padStart(2,"0"),n=this.currentValue%2===0?"00":"30";return`${t}:${n}`},dates(){return this.dateSelector.dates.map(j)},selectedDate:{get(){return j(this.dateSelector.selectedDate)},set(t){this.dateSelector.selectIndex(this.dates.indexOf(t))}}},watch:{currentValue(t){this.$emit("update:modelValue",t)},modelValue(t){this.currentValue=Math.floor(t)},dates:{handler(t){this.currentDate=j(this.dateSelector.selectedDate)},immediate:!0},currentDate(t){this.dateSelector.selectIndex(this.dates.indexOf(t))}},methods:{}}),Ge={class:"sunsim-bar-wrapper"},Xe={class:"sunsim-date d-flex align-center pl-5 pr-5"},We={key:1,class:"text-center text-body-1"},Ke={class:"sunsim-wrapper d-flex align-center px-3"},Ze={class:"sunsim-time-label text-body-1 font-weight-normal ml-2"};function Je(t,n,i,a,o,r){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("v-select"),d=e.resolveComponent("v-progress-linear"),c=e.resolveComponent("v-slider");return e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",Xe,[e.createVNode(s,{color:"black",class:"mr-2",icon:"mdi-calendar-blank-outline"}),t.dateSelector.hasMultipleDates?(e.openBlock(),e.createBlock(l,{key:0,modelValue:t.currentDate,"onUpdate:modelValue":n[0]||(n[0]=m=>t.currentDate=m),items:t.dates,density:"compact",variant:"underlined","hide-details":"",class:"day-selector"},null,8,["modelValue","items"])):(e.openBlock(),e.createElementBlock("span",We,e.toDisplayString(t.selectedDate),1))]),e.createElementVNode("div",Ke,[e.createElementVNode("span",Ze,e.toDisplayString(t.currentValueString),1),e.createVNode(s,{medium:"",class:"ml-2 mr-2 icon"},{default:e.withCtx(()=>[e.createTextVNode("mdi-white-balance-sunny")]),_:1}),t.isLoading?(e.openBlock(),e.createBlock(d,{key:0,indeterminate:"",rounded:"",height:"6",color:"grey lighten-1",class:"mr-2"})):(e.openBlock(),e.createBlock(c,{key:1,modelValue:t.currentValue,"onUpdate:modelValue":n[1]||(n[1]=m=>t.currentValue=m),min:0,max:47,step:1,"thumb-label":!1,"hide-details":!0,"thumb-color":"white","thumb-size":"25","track-size":"7","track-fill-color":"transparent",class:"sunsim-slider mr-1"},null,8,["modelValue"]))])])}const N=g(Qe,[["render",Je],["__scopeId","data-v-1fba3edd"]]),et=e.defineComponent({setup(){},name:"QiBuildingChooserSceneImageStack",props:{imageUrls:{type:Array,required:!0},activeIndex:{type:Number,required:!0}},emits:["resize","ready","preloaded","reset"],data(){return{state:"init",activeStates:["preloaded","loaded"],loadTracker:new V(0)}},watch:{imageUrls(t){this.$emit("reset"),this.loadImages(t)}},mounted(){this.loadImages(this.imageUrls),new ResizeObserver(t=>{window.requestAnimationFrame(()=>{const n=t[0].contentRect.width,i=t[0].contentRect.height;this.$emit("resize",{width:n,height:i})})}).observe(this.$refs.baseImage)},methods:{onPreloaded(){this.state="preloaded",this.$emit("preloaded")},loadImages(t){this.state="init",this.$refs.baseImage.src=t[0],this.loadTracker=new V(t.length).onLoadFinished(()=>{this.state="loaded",this.$emit("ready")})}}}),tt={key:0},nt=["src"];function it(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("img",{ref:"baseImage",class:"image-instance zero",style:{opacity:1,borderRadius:50},onLoad:n[0]||(n[0]=(...s)=>t.onPreloaded&&t.onPreloaded(...s))},null,544),t.state==="preloaded"||t.state==="loaded"?e.withDirectives((e.openBlock(),e.createElementBlock("div",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.imageUrls,(s,l)=>(e.openBlock(),e.createElementBlock("img",{key:l,class:e.normalizeClass({"image-instance":!0,active:l===t.activeIndex}),src:s,onLoad:n[1]||(n[1]=d=>t.loadTracker.partLoaded())},null,42,nt))),128)),e.createTextVNode(" Here ")],512)),[[e.vShow,t.state==="loaded"]]):e.createCommentVNode("",!0)])}const R=g(et,[["render",it],["__scopeId","data-v-fad48118"]]),ot="buildingChooser.json",at=180;class q{constructor(n){this._cdnFileResolver=n,this._resourceLoader=new y}constructFileUrl(n){return this._cdnFileResolver?this._cdnFileResolver(`/${n}`):null}loadConfigFile(){const n=this.constructFileUrl(ot);return n?this._resourceLoader.loadJson(n):null}loadBuildingMapImage(n){const i=this.constructFileUrl(n.lookupFilename);return i?this._resourceLoader.loadImage(i):null}getViewLongitude(n){return n.cameraRotation&&n.cameraRotation.y+270}getBuildingData(n){const i=n?n.buildings:[],a=i.map(r=>r.id),o=i.map(r=>({id:r.id,url:this.constructFileUrl(r.overlayFilename)}));return{buildingIds:a,buildingOverlays:o}}getBackgroundImageData(n){return"days"in n?this.processMultipleDays(n.days):[this.processTimeSamples(at,n.timeSamples)]}processMultipleDays(n){return n.map(i=>this.processTimeSamples(i.dayOfYear,i.timeSamples))}processTimeSamples(n,i){return{urls:i.map(o=>this.constructFileUrl(o.filename)),referenceDate:this.makeReferenceDate(n)}}makeReferenceDate(n){const i=new Date(0);return i.setUTCDate(n),i}async loadBuildingChooser(){try{const n=await this.loadConfigFile();if(n){const i=await this.loadBuildingMapImage(n);if(i){const a=this.getViewLongitude(n),{buildingIds:o,buildingOverlays:r}=this.getBuildingData(n),s=this.getBackgroundImageData(n);return{mapImage:i,viewLongitude:a,buildingIds:o,buildingOverlays:r,backgrounds:s}}}return null}catch{return null}}}class C{static empty(){return new C([])}constructor(n){this._buildingIds=n}getBuildingId(n,i,a){const o=this._getBuildingIndex(n,i,a);if(o!==void 0)return this._buildingIds[o]}_getBuildingIndex(n,i,a){const[o,r,s,l]=n.getPixel(i,a);if(l===255&&o===r&&r===s)return o}}class x{static empty(){return new x(null)}constructor(n){this._mapImage=n,this._context=null}update(n){this._mapImage&&(this._context=n.getContext("2d",{willReadFrequently:!0}),this._context.drawImage(this._mapImage,0,0,n.width,n.height))}getPixel(n,i){try{return this._context?this._context.getImageData(n,i,1,1).data:[0,0,0,0]}catch{return[0,0,0,0]}}}const rt=new Date(0);class S{static empty(){return new S([{referenceDate:rt,urls:[]}])}constructor(n){this._imagesByDay=n,this._state={selectedIndex:0}}selectIndex(n){n<this._imagesByDay.length&&(this._state.selectedIndex=n)}get dates(){return this._imagesByDay.map(n=>n.referenceDate)}get hasMultipleDates(){return this._imagesByDay.length>1}get selectedIndex(){return this._state.selectedIndex}get selectedDate(){return this._imagesByDay[this.selectedIndex].referenceDate}get imageUrls(){return this._imagesByDay[this.selectedIndex].urls}}const st=e.defineComponent({setup(){e.ref({})},name:"QiBuildingChooserSvg",components:{QiBuildingChooserSunSimControl:N,QiBuildingChooserSceneImageStack:R,QiNorthDirection:M,QiFloatingCard:B,QiHoverProbe:w,QiZoomBox:I},emits:["go-to-building","hover-over-building","hover-out-building"],provide(){return{i18n:this.i18n?new b(this.i18n.labels,this.i18n.language):new b}},props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},canGoToBuildingCallback:{type:Function,default:()=>!0},buildingChooserTimeOfDay:{type:String,default:null},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},customOverlayContent:{type:String,default:""}},data(){return{sceneState:{preloaded:!1,ready:!1},canvasDimensions:{width:0,height:0},pos:{x:0,y:0,width:0,height:0},pickerData:void 0,hoverBuildingId:void 0,halfHourMark:new Date().getHours()*2+(new Date().getMinutes()<30?0:1),error:!1,resourceLoader:new y,svgObjects:void 0,svgViewBox:"0 0 0 0"}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},hoverBuilding(){return this.getBuildingData(this.hoverBuildingId)}},watch:{buildingChooserTimeOfDay:{handler(){if(this.buildingChooserTimeOfDay){const[t,n,i]=/^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay),a=parseInt(i);this.halfHourMark=parseInt(n)*2+(a<15?0:a>45?2:1)}},immediate:!0},hoverBuildingId(t,n){t?this.$emit("hover-over-building",this.getBuildingData(t)):this.$emit("hover-out-building",this.getBuildingData(n))}},mounted(){return D(this,void 0,void 0,function*(){const n=yield new q(this.cdnFileResolver).loadBuildingChooser();if(n){this.canvasRaster=new x(n.mapImage),this.buildingMap=new C(n.buildingIds),this.daysOfYear=new S(n.backgrounds),this.pickerData={buildingOverlays:n.buildingOverlays,sceneLongitude:n.viewLongitude};const i=[];for(let{id:a,url:o}of n.buildingOverlays)this.resourceLoader.loadJson(o.replace(".png",".svg")).then(r=>{const l=new DOMParser().parseFromString(r,"image/svg+xml").getElementsByTagName("svg")[0];this.svgViewBox=l.getAttribute("viewBox"),i.push({id:a,svg:l.innerHTML})});this.svgObjects=i}else this.error=!0})},methods:{resizeScene({width:t,height:n}){this.canvasDimensions.width=t,this.canvasDimensions.height=n},sceneReset(){this.sceneState={preloaded:!1,ready:!1}},getBuildingData(t){return this.buildingCallback?this.buildingCallback(t):t},getColor(t){return this.colorCallback(this.getBuildingData(t),t===this.hoverBuildingId?"hover":"idle")},getGClass(t){const n=this.getBuildingData(t),i=this.colorCallback(n,t===this.hoverBuildingId?"hover":"idle"),a=[];return t===this.hoverBuildingId?a.push("hover"):a.push("idle"),i&&this.canGoToBuildingCallback(n)?a.push("clickable"):a.push("restricted"),a.join(" ")},getGStyle(t){const n=this.getBuildingData(t),i=this.colorCallback(n,t===this.hoverBuildingId?"hover":"idle");if(i){const{r:a,g:o,b:r,a:s,s:l}=i;return{strokeWidth:l!==void 0?l:2,stroke:`rgb(${a}, ${o}, ${r})`,strokeOpacity:1,fill:`rgb(${a}, ${o}, ${r})`,fillOpacity:s/255,cursor:`${this.canGoToBuildingCallback(n)?"cursor":"default"} !important`}}else return{strokeWidth:0,stroke:"white",strokeOpacity:0,fill:"white",fillOpacity:0,cursor:"default !important"}},onBuildingMouseOver(t,n){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height},this.hoverBuildingId=n,this.$emit("hover-over-building",this.getBuildingData(n)))},onBuildingMouseOut(t,n){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height},this.hoverBuildingId=void 0,this.$emit("hover-out-building",this.getBuildingData(n)))},onBuildingMouseMove(t){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height})},onBuildingClick(t){this.hoverBuildingId=t,this.isHoverable&&this.hoverBuilding&&this.canGoToBuildingCallback(this.hoverBuilding)&&this.$emit("go-to-building",this.hoverBuilding)}}}),lt={key:0,style:{height:"50vh"},class:"d-flex justify-center align-center blue-grey lighten-5"},dt={class:"image-instances"},ct={key:0},ht={class:"svg-container"},mt=["viewBox"],ut=["innerHTML","data-building-id","onMouseover","onMouseout","onMousemove","onClick"],pt=["innerHTML"];function gt(t,n,i,a,o,r){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("qi-building-chooser-scene-image-stack"),d=e.resolveComponent("qi-zoom-box"),c=e.resolveComponent("qi-north-direction"),m=e.resolveComponent("qi-building-chooser-sun-sim-control"),f=e.resolveComponent("qi-floating-card"),u=e.resolveComponent("qi-hover-probe");return t.error?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):t.pickerData?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`height: ${t.canvasDimensions.height}px; position: relative`),class:"image-container"},[e.createVNode(d,{desktop:t.interactiveDesktop,mobile:t.interactiveMobile},{default:e.withCtx(()=>[e.createElementVNode("div",dt,[e.createVNode(l,{"image-urls":t.daysOfYear.imageUrls,"active-index":t.halfHourMark,onResize:t.resizeScene,onPreloaded:n[0]||(n[0]=p=>t.sceneState.preloaded=!0),onReady:n[1]||(n[1]=p=>t.sceneState.ready=!0),onReset:t.sceneReset},null,8,["image-urls","active-index","onResize","onReset"]),t.svgObjects?e.withDirectives((e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("div",ht,[(e.openBlock(),e.createElementBlock("svg",{viewBox:t.svgViewBox},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.svgObjects,({id:p,svg:h},H)=>(e.openBlock(),e.createElementBlock("g",{key:H,innerHTML:h,"data-building-id":p,class:e.normalizeClass(t.getGClass(p)),style:e.normalizeStyle(t.getGStyle(p)),onMouseover:k=>t.onBuildingMouseOver(k,p),onMouseout:k=>t.onBuildingMouseOut(k,p),onMousemove:k=>t.onBuildingMouseMove(k,p),onClick:k=>t.onBuildingClick(p)},null,46,ut))),128))],8,mt))])],512)),[[e.vShow,t.sceneState.preloaded]]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:"custom-overlay-layer",innerHTML:t.customOverlayContent},null,8,pt),[[e.vShow,t.sceneState.preloaded]])])]),_:1},8,["desktop","mobile"]),e.withDirectives(e.createElementVNode("div",null,[t.pickerData.sceneLongitude?(e.openBlock(),e.createBlock(c,{key:0,class:"north-indicator",longitude:t.pickerData.sceneLongitude},null,8,["longitude"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:t.halfHourMark,"onUpdate:modelValue":n[2]||(n[2]=p=>t.halfHourMark=p),"date-selector":t.daysOfYear,"is-loading":!t.sceneState.ready},null,8,["modelValue","date-selector","is-loading"])],512),[[e.vShow,t.sceneState.preloaded]]),t.showCards&&t.hoverBuilding?(e.openBlock(),e.createBlock(f,{key:0,"is-hoverable":t.isHoverable,pos:t.pos,onOutside:n[3]||(n[3]=()=>t.hoverBuildingId=void 0)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{building:t.hoverBuilding,canGoToBuilding:t.canGoToBuildingCallback(t.hoverBuilding),goToBuilding:()=>t.canGoToBuildingCallback(t.hoverBuilding)&&t.$emit("go-to-building",t.hoverBuilding),pos:t.pos,isHoverable:t.isHoverable,close:()=>t.hoverBuildingId=void 0},void 0,!0)]),_:3},8,["is-hoverable","pos"])):e.createCommentVNode("",!0),e.createVNode(u,{ref:"hoverProbe"},null,512)],4)):e.createCommentVNode("",!0)}const F=g(st,[["render",gt],["__scopeId","data-v-0a2cec1f"]]),ft={name:"QiBuildingChooserRasterOverlay",props:{imageUrl:{type:String,required:!0},dimensions:{type:Object,required:!0},color:{type:Object,default:()=>({r:108,g:0,b:108,a:144,s:2})}},data(){return{isLoaded:!1,overlayImage:void 0,resourceLoader:new y,context:void 0,imageData:void 0,imageDataIndices:[]}},watch:{color(t,n){(t.r!==n.r||t.g!==n.g||t.b!==n.b||t.a!==n.a)&&this.draw()}},mounted(){return D(this,void 0,void 0,function*(){this.overlayImage=yield this.resourceLoader.loadImage(this.imageUrl),this.setupDraw()})},methods:{setupDraw(){if(!this.overlayImage||!this.$refs.canvas)return;const{width:t,height:n}=this.dimensions;if(!(t===0||n===0)){this.context=this.$refs.canvas.getContext("2d",{willReadFrequently:!0}),this.context.drawImage(this.overlayImage,0,0,t,n),this.imageData=this.context.getImageData(0,0,t,n);for(let i=3;i<this.imageData.data.length;i+=4)this.imageData.data[i]!==0&&this.imageDataIndices.push(i);this.draw(),this.isLoaded=!0}},draw(){this.context&&this.imageData&&(this.applyColor(),this.context.putImageData(this.imageData,0,0))},applyColor(){if(this.color)for(let t=0;t<this.imageDataIndices.length;t++)this.imageData.data[this.imageDataIndices[t]-3]=this.color.r,this.imageData.data[this.imageDataIndices[t]-2]=this.color.g,this.imageData.data[this.imageDataIndices[t]-1]=this.color.b,this.imageData.data[this.imageDataIndices[t]]=this.color.a}}};function bt(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("canvas",e.mergeProps({ref:"canvas",class:"overlay"},i.dimensions),null,16)}const Y=g(ft,[["render",bt],["__scopeId","data-v-9a90fa2f"]]),vt=e.defineComponent({setup(){e.ref({})},name:"QiBuildingChooserRaster",components:{QiBuildingChooserRasterOverlay:Y,QiBuildingChooserSunSimControl:N,QiBuildingChooserSceneImageStack:R,QiNorthDirection:M,QiFloatingCard:B,QiHoverProbe:w,QiZoomBox:I},emits:["go-to-building","hover-over-building","hover-out-building"],provide(){return{i18n:this.i18n?new b(this.i18n.labels,this.i18n.language):new b}},props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},canGoToBuildingCallback:{type:Function,default:()=>!0},buildingChooserTimeOfDay:{type:String,default:null},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},customOverlayContent:{type:String,default:""}},data(){return{sceneState:{preloaded:!1,ready:!1},canvasDimensions:{width:0,height:0},pos:{x:0,y:0,width:0,height:0},pickerData:void 0,buildingMap:C.empty(),canvasRaster:x.empty(),selectedBuildingId:void 0,halfHourMark:new Date().getHours()*2+(new Date().getMinutes()<30?0:1),viewResolver:(t,n)=>({x:t,y:n}),error:!1}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},selectedBuilding(){return this.getBuildingData(this.selectedBuildingId)}},watch:{buildingChooserTimeOfDay:{handler(){if(this.buildingChooserTimeOfDay){const[t,n,i]=/^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay),a=parseInt(i);this.halfHourMark=parseInt(n)*2+(a<15?0:a>45?2:1)}},immediate:!0},selectedBuildingId(t,n){t?this.$emit("hover-over-building",this.getBuildingData(t)):this.$emit("hover-out-building",this.getBuildingData(n))}},mounted(){return D(this,void 0,void 0,function*(){const n=yield new q(this.cdnFileResolver).loadBuildingChooser();n?(this.canvasRaster=new x(n.mapImage),this.buildingMap=new C(n.buildingIds),this.daysOfYear=new S(n.backgrounds),this.pickerData={buildingOverlays:n.buildingOverlays,sceneLongitude:n.viewLongitude},this.resizeImages()):this.error=!0})},methods:{resizeScene({width:t,height:n}){this.canvasDimensions.width=t,this.canvasDimensions.height=n,this.$nextTick(this.resizeImages)},sceneReset(){this.sceneState={preloaded:!1,ready:!1}},getBuildingData(t){return this.buildingCallback?this.buildingCallback(t):t},getBuildingId(t){const{x:n,y:i}=this.viewResolver(t.layerX,t.layerY);return this.buildingMap.getBuildingId(this.canvasRaster,n,i)},resizeImages(){if(this.$refs.canvas&&(this.canvasRaster.update(this.$refs.canvas),this.$refs.overlays))for(const t of this.$refs.overlays)t.setupDraw()},onMove(t){this.isHoverable&&(this.selectedBuildingId=this.getBuildingId(t),this.selectedBuildingId!==void 0&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height}))},onClick(t){this.selectedBuildingId=this.getBuildingId(t),this.isHoverable&&this.selectedBuilding&&this.$emit("go-to-building",this.selectedBuilding)},getColor(t){return this.colorCallback(this.getBuildingData(t),t===this.selectedBuildingId?"hover":"idle")},updateView({resolve:t}){this.viewResolver=t}}}),yt={key:0,style:{height:"50vh"},class:"d-flex justify-center align-center blue-grey lighten-5"},wt={class:"image-instances"},kt=["innerHTML"];function Ct(t,n,i,a,o,r){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("qi-building-chooser-scene-image-stack"),d=e.resolveComponent("qi-building-chooser-raster-overlay"),c=e.resolveComponent("qi-zoom-box"),m=e.resolveComponent("qi-north-direction"),f=e.resolveComponent("qi-building-chooser-sun-sim-control"),u=e.resolveComponent("qi-floating-card"),p=e.resolveComponent("qi-hover-probe");return t.error?(e.openBlock(),e.createElementBlock("div",yt,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):t.pickerData?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`cursor: ${t.selectedBuildingId?"pointer":"auto"};height: ${t.canvasDimensions.height}px; position: relative`),class:"image-container"},[e.createVNode(c,{desktop:t.interactiveDesktop,mobile:t.interactiveMobile,onUpdate:t.updateView},{default:e.withCtx(()=>[e.createElementVNode("div",wt,[e.createVNode(l,{"image-urls":t.daysOfYear.imageUrls,"active-index":t.halfHourMark,onResize:t.resizeScene,onPreloaded:n[0]||(n[0]=h=>t.sceneState.preloaded=!0),onReady:n[1]||(n[1]=h=>t.sceneState.ready=!0),onReset:t.sceneReset},null,8,["image-urls","active-index","onResize","onReset"]),e.withDirectives(e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pickerData.buildingOverlays,h=>(e.openBlock(),e.createBlock(d,{ref_for:!0,ref:"overlays",key:h.id,"image-url":h.url,dimensions:t.canvasDimensions,color:t.getColor(h.id)},null,8,["image-url","dimensions","color"]))),128))],512),[[e.vShow,t.sceneState.preloaded]])]),e.createElementVNode("canvas",e.mergeProps(t.canvasDimensions,{ref:"canvas",class:{hover:!!t.selectedBuildingId},onClick:n[2]||(n[2]=(...h)=>t.onClick&&t.onClick(...h)),onMousemove:n[3]||(n[3]=(...h)=>t.onMove&&t.onMove(...h))}),null,16),e.withDirectives(e.createElementVNode("div",{class:"custom-overlay-layer",innerHTML:t.customOverlayContent},null,8,kt),[[e.vShow,t.sceneState.preloaded]])]),_:1},8,["desktop","mobile","onUpdate"]),e.withDirectives(e.createElementVNode("div",null,[t.pickerData.sceneLongitude?(e.openBlock(),e.createBlock(m,{key:0,class:"north-indicator",longitude:t.pickerData.sceneLongitude},null,8,["longitude"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:t.halfHourMark,"onUpdate:modelValue":n[4]||(n[4]=h=>t.halfHourMark=h),"date-selector":t.daysOfYear,"is-loading":!t.sceneState.ready},null,8,["modelValue","date-selector","is-loading"])],512),[[e.vShow,t.sceneState.preloaded]]),t.showCards&&t.selectedBuilding?(e.openBlock(),e.createBlock(u,{key:0,"is-hoverable":t.isHoverable,pos:t.pos,onOutside:n[5]||(n[5]=()=>t.selectedBuildingId=void 0)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{building:t.selectedBuilding,canGoToBuilding:t.canGoToBuildingCallback(t.selectedBuilding),goToBuilding:()=>t.canGoToBuildingCallback(t.selectedBuilding)&&t.$emit("go-to-building",t.selectedBuilding),pos:t.pos,isHoverable:t.isHoverable,close:()=>t.selectedBuildingId=void 0},void 0,!0)]),_:3},8,["is-hoverable","pos"])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"hoverProbe"},null,512)],4)):e.createCommentVNode("",!0)}const T=g(vt,[["render",Ct],["__scopeId","data-v-08f2ea1e"]]),xt={name:"QiBuildingChooser",components:{QiBuildingChooserSvg:F,QiBuildingChooserRaster:T},emits:["go-to-building","hover-over-building","hover-out-building"],props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},useSvg:{type:Boolean,default:!1},buildingChooserTimeOfDay:{type:String,default:null},canGoToBuildingCallback:{type:Function,default:()=>!0},customOverlayContent:{type:String,default:""}},computed:{component(){return this.useSvg?F:T}}};function _t(t,n,i,a,o,r){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),{"show-cards":i.showCards,"color-callback":i.colorCallback,"building-callback":i.buildingCallback,"cdn-file-resolver":i.cdnFileResolver,i18n:i.i18n,"interactive-desktop":i.interactiveDesktop,"interactive-mobile":i.interactiveMobile,"building-chooser-time-of-day":i.buildingChooserTimeOfDay,"can-go-to-building-callback":i.canGoToBuildingCallback,"custom-overlay-content":i.customOverlayContent,onGoToBuilding:n[0]||(n[0]=s=>t.$emit("go-to-building",s)),onHoverOverBuilding:n[1]||(n[1]=s=>t.$emit("hover-over-building",s)),onHoverOutBuilding:n[2]||(n[2]=s=>t.$emit("hover-out-building",s))},e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),s=>({name:s,fn:e.withCtx(l=>[e.renderSlot(t.$slots,s,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1064,["show-cards","color-callback","building-callback","cdn-file-resolver","i18n","interactive-desktop","interactive-mobile","building-chooser-time-of-day","can-go-to-building-callback","custom-overlay-content"])}const J=g(xt,[["render",_t]]),Bt=37,It=39,St={name:"WaypointCarousel",props:{thumbnails:{type:Array,required:!0},active:{type:Number,required:!0}},data(){return{activeThumb:0}},computed:{activeIndex:{get(){return this.active},set(t){this.activeThumb=t}},isMobile(){return/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(window.navigator.userAgent)}},mounted(){window.addEventListener("keydown",this.keyNavigate)},beforeUnmount(){window.removeEventListener("keydown",this.keyNavigate)},methods:{keyNavigate(t){switch(t.keyCode){case t.keyCode===Bt:this.$emit("previous");case t.keyCode===It:this.$emit("next");default:return}},goToCamera(t,n){n(),this.$emit("goto",t)}}},Dt={class:"waypoint-carousel"};function Et(t,n,i,a,o,r){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("v-btn"),d=e.resolveComponent("v-hover"),c=e.resolveComponent("v-img"),m=e.resolveComponent("v-card"),f=e.resolveComponent("v-slide-group-item"),u=e.resolveComponent("v-slide-group");return e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(u,{modelValue:r.activeIndex,"onUpdate:modelValue":n[2]||(n[2]=p=>r.activeIndex=p),"active-class":"active-apt","selected-class":"active-apt","show-arrows":"","center-active":"",mandatory:""},{prev:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(({hover:p})=>[e.createVNode(l,{elevation:"0",class:e.normalizeClass(["carousel-button",{mobile:r.isMobile}]),onClick:n[0]||(n[0]=h=>t.$emit("previous"))},{default:e.withCtx(()=>[e.createVNode(s,{color:p?"#999":"#d2d2d2","x-large":""},{default:e.withCtx(()=>[e.createTextVNode(" mdi-chevron-left ")]),_:2},1032,["color"])]),_:2},1032,["class"])]),_:1})]),next:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(({hover:p})=>[e.createVNode(l,{elevation:"0",class:e.normalizeClass(["carousel-button",{mobile:r.isMobile}]),onClick:n[1]||(n[1]=h=>t.$emit("next"))},{default:e.withCtx(()=>[e.createVNode(s,{color:p?"#999":"#d2d2d2","x-large":""},{default:e.withCtx(()=>[e.createTextVNode(" mdi-chevron-right ")]),_:2},1032,["color"])]),_:2},1032,["class"])]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.thumbnails,p=>(e.openBlock(),e.createBlock(f,{key:p.id},{default:e.withCtx(({toggle:h,selectedClass:H})=>[e.createVNode(m,{class:e.normalizeClass(["ma-2",H]),align:"center",justify:"center",height:r.isMobile?50:100,width:r.isMobile?80:160,elevation:"0",style:{overflow:"hidden"},onClick:k=>r.goToCamera(p.id,h)},{default:e.withCtx(()=>[e.createVNode(c,{"max-height":"100","max-width":"160",src:p.thumbnailUrl},null,8,["src"])]),_:2},1032,["class","height","width","onClick"])]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const At=g(St,[["render",Et],["__scopeId","data-v-f4e6ce2e"]]),Vt={name:"QiVirtualTourSocialShare",inject:["i18n"],data(){return{showSocialShare:!1,currentURL:location.href}},methods:{shareToFacebook(){return window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(location.href),"facebook-share-dialog","width=626,height=436"),!1},shareToTwitter(){return window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(location.href),"twiter-share-dialog","width=626,height=436"),!1},shareToLinkedin(){return window.open("https://www.linkedin.com/sharing/share-offsite/?url="+encodeURIComponent(location.href),"linkedin-share-dialog","width=626,height=736"),!1},copyLink(){navigator.clipboard.writeText(location.href)}}},Mt={id:"share-btns-wrapper",class:"text-center"};function Nt(t,n,i,a,o,r){const s=e.resolveComponent("v-btn"),l=e.resolveComponent("v-tooltip"),d=e.resolveComponent("v-toolbar-title"),c=e.resolveComponent("v-spacer"),m=e.resolveComponent("v-toolbar"),f=e.resolveComponent("v-card-text"),u=e.resolveComponent("v-card"),p=e.resolveComponent("v-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(l,{elevation:"2",top:"",attach:""},{activator:e.withCtx(({on:h})=>[e.createVNode(s,e.mergeProps({density:"comfortable",elevation:"1",icon:"mdi-share-variant",onClick:n[0]||(n[0]=H=>o.showSocialShare=!o.showSocialShare)},e.toHandlers(Object.assign({},h))),null,16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("share")),1)]),_:1}),e.createVNode(p,{id:"share-box",width:"400",modelValue:o.showSocialShare,"onUpdate:modelValue":n[2]||(n[2]=h=>o.showSocialShare=h)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(m,{elevation:"0"},{default:e.withCtx(()=>[e.createVNode(s,{size:"x-small",icon:"mdi-close",onClick:n[1]||(n[1]=h=>o.showSocialShare=!1)}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.i18n.getLabel("share")),1)]),_:1}),e.createVNode(c)]),_:1}),e.createVNode(f,{class:"mt-5"},{default:e.withCtx(()=>[e.createElementVNode("p",Mt,[e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-facebook"},h,{onClick:r.shareToFacebook}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("share-to-facebook")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-linkedin"},h,{onClick:r.shareToLinkedin}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("share-to-linkedin")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-twitter"},h,{onClick:r.shareToTwitter}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("share-to-twitter")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-email",link:"",href:`mailto:?body=${o.currentURL}`},h),null,16,["href"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("share-via-email")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-content-copy",onClick:r.copyLink},h),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(r.i18n.getLabel("copy-link")),1)]),_:1}),e.createVNode(c)])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Rt=g(Vt,[["render",Nt],["__scopeId","data-v-3560cd03"]]);class Ft{constructor(n,i){this._doc=n,this._elemId=i,this._state={isActive:!1}}get isActive(){return this._state.isActive}setup(){const n=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"],i=this._getElement();n.forEach(a=>{i.addEventListener(a,this._toggle.bind(this),!1)})}toggle(){this.isActive?this._exit():this._enter()}_enter(){const n=this._getElement(),i=n.requestFullscreen||n.webkitRequestFullscreen||n.mozRequestFullscreen||n.msRequestFullscreen;i&&i.apply(n)}_exit(){const n=this._doc.exitFullscreen||this._doc.webkitExitFullscreen||this._doc.mozExitFullscreen||this._doc.document.msExitFullscreen;n&&n.apply(document)}_getElement(){return this._doc.getElementById(this._elemId)}_toggle(){const n=!!(this._doc.fullscreenElement||this._doc.webkitFullscreenElement||this._doc.mozFullscreenElement||this._doc.msFullscreenElement);this._state.isActive=n}}const Tt={props:{isFullScreen:{type:Boolean,required:!0}},emits:["toggle-fullscreen"]},Ht={id:"btn-fullscreen",class:"btn-placeholder mr-2"};function Lt(t,n,i,a,o,r){const s=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",Ht,[e.createVNode(s,{density:"comfortable",elevation:"3",icon:i.isFullScreen?"mdi-fullscreen-exit":"mdi-fullscreen",onClick:n[0]||(n[0]=l=>t.$emit("toggle-fullscreen"))},null,8,["icon"])])}const Ot=g(Tt,[["render",Lt]]),Ut={name:"Disclaimer",inject:["i18n"],data(){return{isVisible:!0}}},$t={key:0,class:"text-white disclaimer caption"};function zt(t,n,i,a,o,r){return e.openBlock(),e.createBlock(e.Transition,{name:"fade-transition"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",$t,[e.createTextVNode(e.toDisplayString(r.i18n.getLabel("all-illustrations-are-indicative-deviations-may-occur"))+" ",1),e.createElementVNode("span",{onClick:n[0]||(n[0]=s=>o.isVisible=!1),class:"link-text text-decoration-underline"},e.toDisplayString(r.i18n.getLabel("i-understand")),1)])):e.createCommentVNode("",!0)]),_:1})}const jt=g(Ut,[["render",zt],["__scopeId","data-v-6e4f02d6"]]),qt={name:"ManualSlideShowImage",props:{isFullScreen:{type:Boolean,required:!0}},data(){return{}},watch:{},mounted(){window.addEventListener("resize",this.setPlayerSize),this.setPlayerSize()},methods:{findClosestAncestor(t,n){let i=t,a=t;for(;(i=i.parentNode)&&i.className.indexOf(n)<0;);return a=i,a},setPlayerSize(){let t=1.7777777777777777,n=document.querySelector("#player-sizer");if(!n)return;let i=n.offsetWidth,a=i*(1/t);(window.innerWidth<=600||i<=600)&&(a=window.innerHeight*.75,i=a*(1/t)),n.style.height=a+"px",n.style.width=i+"px",this.$emit("new-size-callback",i,a)}}},Yt={id:"player-wrapper"},Pt={id:"player-sizer"},Qt={class:"player-control",id:"controls-top-left"},Gt={class:"player-control",id:"controls-top-center"},Xt={class:"player-control",id:"controls-top-right"},Wt={class:"player-control",id:"controls-center-left"},Kt={class:"player-control",id:"controls-center-center"},Zt={class:"player-control",id:"controls-center-right"},Jt={class:"player-control",id:"controls-bottom-left"},en={class:"player-control",id:"controls-bottom-center"},tn={class:"player-control",id:"controls-bottom-right"};function nn(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("div",Yt,[e.createElementVNode("div",Pt,[e.renderSlot(t.$slots,"slideshow-image",{},void 0,!0),e.createElementVNode("div",Qt,[e.renderSlot(t.$slots,"top-left",{},void 0,!0)]),e.createElementVNode("div",Gt,[e.renderSlot(t.$slots,"top-center",{},void 0,!0)]),e.createElementVNode("div",Xt,[e.renderSlot(t.$slots,"top-right",{},void 0,!0)]),e.createElementVNode("div",Wt,[e.renderSlot(t.$slots,"center-left",{},void 0,!0)]),e.createElementVNode("div",Kt,[e.renderSlot(t.$slots,"center-center",{},void 0,!0)]),e.createElementVNode("div",Zt,[e.renderSlot(t.$slots,"center-right",{},void 0,!0)]),e.createElementVNode("div",Jt,[e.renderSlot(t.$slots,"bottom-left",{},void 0,!0)]),e.createElementVNode("div",en,[e.renderSlot(t.$slots,"bottom-center",{},void 0,!0)]),e.createElementVNode("div",tn,[e.renderSlot(t.$slots,"bottom-right",{},void 0,!0)])])])}const on=g(qt,[["render",nn],["__scopeId","data-v-1dab1ac3"]]),an={name:"StaticImage",props:{image:{type:String,required:!0},aspectRatio:{type:String,default:()=>"wide"}},computed:{style(){return{"background-image":`url("${encodeURI(this.image)}")`}}}},rn={class:"static-image-wrapper"};function sn(t,n,i,a,o,r){return e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",{class:e.normalizeClass(["img-div",[i.aspectRatio]]),style:e.normalizeStyle(r.style)},null,6)])}const ln={name:"ManualSlideShow",components:{WaypointCarousel:At,SingleImage:g(an,[["render",sn],["__scopeId","data-v-b418cf51"]]),SocialShare:Rt,FullScreenButton:Ot,Disclaimer:jt,ManualSlideShowPlayer:on},provide(){return{i18n:this.i18n?new b(this.i18n.labels,this.i18n.language):new b}},props:{images:{type:Array,required:!0},websiteUrl:{type:String,default:()=>{}},i18n:{type:Object,default:void 0},showFullScreen:{type:Boolean,default:()=>!0},showShare:{type:Boolean,default:()=>!0},defaultWaypointIndex:{type:Number,default:()=>0}},data(){return{loading:!0,error:!1,currentIndex:0,currentImageId:void 0,fullScreen:new Ft(document,"player-wrapper")}},computed:{imagesWithThumbnails(){return this.images.map(t=>Object.assign(Object.assign({},t),{thumbnailUrl:t.url}))},currentImage(){return this.images[this.currentIndex].url}},mounted(){this.fullScreen.setup()},methods:{toggleFullscreen(){this.fullScreen.toggle(),window.scrollTo({top:150,behavior:"smooth"})},nextImage(){let t=this.currentIndex+1;t>=this.images.length&&(t=0),this.currentIndex=t},previousImage(){let t=this.currentIndex-1;t<0&&(t=this.images.length-1),this.currentIndex=t},goToImage(t,n=!0){let i=this.images.findIndex(a=>a.id===t);i!=-1&&(this.currentIndex=i)}}},dn={class:"virtual-tour-v2-wrapper"},cn={class:"player-and-components-wrapper"},hn={key:1,class:"btn-placeholder"};function mn(t,n,i,a,o,r){const s=e.resolveComponent("single-image"),l=e.resolveComponent("disclaimer"),d=e.resolveComponent("v-icon"),c=e.resolveComponent("v-btn"),m=e.resolveComponent("full-screen-button"),f=e.resolveComponent("social-share"),u=e.resolveComponent("waypoint-carousel"),p=e.resolveComponent("manual-slide-show-player");return e.openBlock(),e.createElementBlock("div",dn,[e.createElementVNode("div",cn,[e.createElementVNode("div",null,[e.createVNode(p,{isFullScreen:o.fullScreen.isActive},{"slideshow-image":e.withCtx(()=>[e.createVNode(s,{image:r.currentImage},null,8,["image"])]),"top-left":e.withCtx(()=>[]),"top-center":e.withCtx(()=>[e.createVNode(l,{"return-url":i.websiteUrl},null,8,["return-url"])]),"top-right":e.withCtx(()=>[]),"center-left":e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-x-transition"},{default:e.withCtx(()=>[e.createVNode(c,{elevation:"1",rounded:"",plain:"",icon:"",onClick:r.previousImage},{default:e.withCtx(()=>[e.createVNode(d,{color:"black darken-1"},{default:e.withCtx(()=>[e.createTextVNode("mdi-chevron-left")]),_:1})]),_:1},8,["onClick"])]),_:1})]),"center-center":e.withCtx(()=>[]),"center-right":e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-x-reverse-transition"},{default:e.withCtx(()=>[e.createVNode(c,{elevation:"1",rounded:"",plain:"",icon:"",onClick:r.nextImage},{default:e.withCtx(()=>[e.createVNode(d,{color:"black darken-1"},{default:e.withCtx(()=>[e.createTextVNode("mdi-chevron-right")]),_:1})]),_:1},8,["onClick"])]),_:1})]),"bottom-left":e.withCtx(()=>[i.showFullScreen?(e.openBlock(),e.createBlock(m,{key:0,isFullScreen:o.fullScreen.isActive,class:"btn-fullscreen",onToggleFullscreen:r.toggleFullscreen},null,8,["isFullScreen","onToggleFullscreen"])):e.createCommentVNode("",!0),i.showShare?(e.openBlock(),e.createElementBlock("div",hn,[e.createVNode(f)])):e.createCommentVNode("",!0)]),"bottom-center":e.withCtx(()=>[e.createElementVNode("div",null,[o.fullScreen.isActive?(e.openBlock(),e.createBlock(u,{key:0,class:e.normalizeClass([o.fullScreen.isActive?"full-screen":""]),thumbnails:r.imagesWithThumbnails,active:o.currentIndex,onNext:r.nextImage,onPrevious:r.previousImage,onGoto:r.goToImage},null,8,["class","thumbnails","active","onNext","onPrevious","onGoto"])):e.createCommentVNode("",!0)])]),"bottom-right":e.withCtx(()=>[]),_:1},8,["isFullScreen"]),e.createVNode(u,{thumbnails:r.imagesWithThumbnails,active:o.currentIndex,onNext:r.nextImage,onPrevious:r.previousImage,onGoto:r.goToImage},null,8,["thumbnails","active","onNext","onPrevious","onGoto"])])])])}const ee=g(ln,[["render",mn],["__scopeId","data-v-e2117d1e"]]),un=Object.freeze(Object.defineProperty({__proto__:null,ManualSlideShow:ee,QiApartmentChooser:Z,QiApartmentChooserNavigation:O,QiApartmentChooserRaster:E,QiApartmentChooserRotator:$,QiApartmentChooserSvg:A,QiBuildingChooser:J,QiBuildingChooserRaster:T,QiBuildingChooserRasterOverlay:Y,QiBuildingChooserSceneImageStack:R,QiBuildingChooserSunSimControl:N,QiBuildingChooserSvg:F,QiFloatingCard:B,QiHoverProbe:w,QiNorthDirection:M,QiZoomBox:I},Symbol.toStringTag,{value:"Module"}));class pn{constructor(n){this._data=n}getPixel(n,i){const a=this._data[n][i];if(a!==" "){const o=Number.parseInt(a);return[o,o,o,255]}else return[0,0,0,0]}}const P=function(n){Object.entries(un).forEach(([i,a])=>{n.component(i,a)})};return Object.entries(Object.freeze(Object.defineProperty({__proto__:null,BatchLoadTracker:V,BuildingMap:C,BuildingPickerResourceProvider:q,BuildingViewerModel:K,CanvasRaster:x,DayOfYearSelector:S,I18N:b,ManualSlideShow:ee,QiApartmentChooser:Z,QiApartmentChooserNavigation:O,QiApartmentChooserRaster:E,QiApartmentChooserRotator:$,QiApartmentChooserSvg:A,QiBuildingChooser:J,QiBuildingChooserRaster:T,QiBuildingChooserRasterOverlay:Y,QiBuildingChooserSceneImageStack:R,QiBuildingChooserSunSimControl:N,QiBuildingChooserSvg:F,QiFloatingCard:B,QiHoverProbe:w,QiNorthDirection:M,QiZoomBox:I,ResourceLoader:y,SampleRaster:pn,SceneRotator:G,default:P,throttle:L},Symbol.toStringTag,{value:"Module"}))).forEach(([t,n])=>{t!=="default"&&(P[t]=n)}),P});
1
+ (function(c,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],x):(c=typeof globalThis<"u"?globalThis:c||self,x(c.Vue3Player={},c.axios,c.Vue))})(this,function(c,x,e){"use strict";var P=document.createElement("style");P.textContent=`@media (hover: hover){.hover-check[data-v-e4729353]{display:none}}#canvas[data-v-3bbbc77b]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}#canvas-mask[data-v-3bbbc77b]{position:absolute;top:0;max-width:100%;z-index:4;-webkit-user-select:none;user-select:none}@media only screen and (min-width: 1280px){#canvas[data-v-3bbbc77b]{border-radius:10px}}#container[data-v-82a61864]{position:absolute;top:0;width:100%;-webkit-user-select:none;user-select:none;touch-action:none;padding-top:56.25%}.svg-container[data-v-82a61864]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-82a61864],svg[data-v-82a61864]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-82a61864] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}@media only screen and (min-width: 1280px){#canvas[data-v-82a61864]{border-radius:10px}}.v-btn[data-v-129ef905]{background-color:#fff}.frame-container[data-v-e6481f8e]{position:relative;max-width:100%;top:0;left:0;bottom:185px;padding-top:56%;z-index:1;overflow:hidden}.frame-image[data-v-e6481f8e]{position:absolute;top:0;width:100%;height:100%}.frame-image img[data-v-e6481f8e]{min-width:100%;max-width:100%;z-index:0}#image-stack picture[data-v-e6481f8e]{visibility:hidden}#image-stack picture.show[data-v-e6481f8e]{visibility:visible}.fill-parent[data-v-e6481f8e]{position:absolute;top:0;bottom:0;left:0;right:0}.floating-card[data-v-b74de171]{position:absolute;left:0;top:0;z-index:10;display:flex}.is-not-hoverable[data-v-b74de171]{position:relative;width:100%}.top-left[data-v-b74de171]{transform-origin:top left;transform:translate(8px) translateY(8px) scale(.9)}.top-right[data-v-b74de171]{transform-origin:top right;transform:translate(-100%) translate(-8px) translateY(8px) scale(.9)}.bottom-left[data-v-b74de171]{transform-origin:bottom left;transform:translateY(-100%) translate(8px) translateY(-8px) scale(.9)}.bottom-right[data-v-b74de171]{transform-origin:bottom right;transform:translateY(-100%) translate(-100%) translate(-8px) translateY(-8px) scale(.9)}.v-dialog__content[data-v-b74de171]{align-items:flex-start}.zoom-box-container[data-v-83bfd28a]{position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden;-webkit-user-select:none;user-select:none;touch-action:none}.zoom-box[data-v-83bfd28a]{width:100%;height:100%;-webkit-user-select:none;user-select:none;touch-action:none}.interactive-viewer[data-v-3a1121f3]{padding-top:56.65%;position:relative}.fill-parent[data-v-3a1121f3]{position:absolute;top:0;bottom:0;left:0;right:0}.navigation[data-v-3a1121f3]{position:absolute;width:100%;bottom:32px;z-index:99;padding:0 20px;display:flex;justify-content:center}@media only screen and (max-width: 600px){.navigation[data-v-3a1121f3]{bottom:12px}}.sunsim-time-label[data-v-1fba3edd]{color:#000;vertical-align:top}.sunsim-date[data-v-1fba3edd]{background:#fff;border-radius:30px;min-height:36px;min-width:170px;display:flex;align-content:center;white-space:nowrap}.day-selector[data-v-1fba3edd]{margin-top:0}.day-selector[data-v-1fba3edd] .v-field__outline{display:none}.day-selector[data-v-1fba3edd] .v-field__input{padding-top:2px}.day-selector[data-v-1fba3edd] .v-field__append-inner{padding-top:5px!important}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:before{border-style:none}.day-selector.v-text-field[data-v-1fba3edd] .v-input__control>.v-input__slot:after{border-style:none}.sunsim-slider[data-v-1fba3edd] .v-slider-track__background{background:linear-gradient(270deg,#8183c2,#ffb9b9 20.01%,#b2dfff 40.1%,#b2dfff 59.85%,#ffba96 79.96%,#8183c2)!important}.sunsim-bar-wrapper{display:flex;position:absolute;width:60%;min-width:400px;top:12px;left:0;z-index:3;touch-action:none;pointer-events:none}.sunsim-wrapper{width:100%;background:#fff;border-radius:30px;padding:5px;min-height:16px;z-index:3}.sunsim-bar-wrapper .sunsim-date{margin-right:12px;margin-left:12px}.sunsim-wrapper,.sunsim-date{touch-action:auto;pointer-events:all}.sunsim-wrapper .mdi-white-balance-sunny{color:#ffab02;vertical-align:baseline;font-size:20px}@media only screen and (max-width: 980px) and (min-width: 500px){.sunsim-bar-wrapper{top:101%;width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){.sunsim-bar-wrapper{top:calc(100% + 8px);width:100%}.sunsim-bar-wrapper .sunsim-date{margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{box-shadow:0 0 7px 1px #aaa}}@media only screen and (max-width: 500px){.sunsim-bar-wrapper{height:calc(100% + 84px);top:0;width:100%;flex-direction:column;justify-content:space-between;margin:-42px 0 0;padding:0;left:0;z-index:0;min-width:100%}.sunsim-bar-wrapper .sunsim-date{margin-right:0;margin-left:0}.sunsim-bar-wrapper .sunsim-date,.sunsim-bar-wrapper .sunsim-wrapper{width:100%;border-radius:0;left:0;margin-left:0!important;box-shadow:0 0 7px 1px #aaa}}.image-instance[data-v-fad48118]{position:absolute;width:100%;opacity:0}.image-instance.active[data-v-fad48118]{opacity:1}.north-indicator[data-v-0a2cec1f]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-0a2cec1f]{position:relative}.image-instances[data-v-0a2cec1f]{position:relative;width:100%;height:100%}canvas[data-v-0a2cec1f]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-0a2cec1f]{position:absolute;top:0;bottom:0;left:0;right:0}.svg-container[data-v-0a2cec1f]{transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.svg-container[data-v-0a2cec1f],svg[data-v-0a2cec1f]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10000}svg g[data-v-0a2cec1f] path{cursor:pointer;stroke-width:inherit!important;stroke-opacity:inherit!important;stroke:inherit!important;fill:inherit!important;fill-opacity:inherit!important;transition-property:fill-opacity,fill;transition-duration:.25s;transition-timing-function:ease-in-out}svg g.restricted[data-v-0a2cec1f] path{cursor:default!important}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-0a2cec1f]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-0a2cec1f]{margin-top:44px;margin-bottom:44px}}.overlay[data-v-9a90fa2f]{z-index:1!important;opacity:1;transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-in-out}.north-indicator[data-v-08f2ea1e]{position:absolute;right:0;top:0;height:42px;width:42px;margin-top:12px;margin-right:8px}.image-container[data-v-08f2ea1e]{position:relative}.image-instances[data-v-08f2ea1e]{position:relative;width:100%;height:100%}canvas[data-v-08f2ea1e]{position:absolute;left:0;top:0;z-index:2;opacity:0}.fill-parent[data-v-08f2ea1e]{position:absolute;top:0;bottom:0;left:0;right:0}@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape){div.image-container[data-v-08f2ea1e]{margin-top:44px}}@media only screen and (max-width: 500px){div.image-container[data-v-08f2ea1e]{margin-top:44px;margin-bottom:44px}}.v-card[data-v-f4e6ce2e]{transition:box-shadow .3s ease-in-out;border:2px solid transparent}[data-v-f4e6ce2e] .v-slide-group__content{justify-content:center}[data-v-f4e6ce2e] .v-slide-group__next--disabled,[data-v-f4e6ce2e] .v-slide-group__prev--disabled{pointer-events:all!important}.carousel-button[data-v-f4e6ce2e]{height:108px!important;min-width:54px!important;padding:0!important;z-index:2;background-color:#fff!important;border:2px solid #d2d2d2;color:#d2d2d2!important}.carousel-button.mobile[data-v-f4e6ce2e]{height:58px!important;min-width:38px!important}.carousel-button[data-v-f4e6ce2e]:hover{border:2px solid #999!important;color:#999!important}.carousel-button[data-v-f4e6ce2e]:hover:before,.carousel-button[data-v-f4e6ce2e]:hover:after{background-color:#fff!important}.align-baseline[data-v-f4e6ce2e]{align-items:baseline}.active-apt[data-v-f4e6ce2e]{border:4px solid #4caf50!important}.v-image[data-v-f4e6ce2e]{border-radius:0!important}#share-btns-wrapper button[data-v-3560cd03]{margin:0 8px}.v-btn[data-v-3560cd03]{background-color:#fff;pointer-events:all}.disclaimer[data-v-6e4f02d6]{padding:4px 10px;text-align:center;background-color:#00000040;border-radius:5px;line-height:20px}.disclaimer span[data-v-6e4f02d6]{cursor:pointer;color:#fff;text-decoration:underline;pointer-events:all}#player-wrapper[data-v-1dab1ac3]{position:relative;overflow:hidden}#player-sizer[data-v-1dab1ac3]{display:flex;justify-content:center;align-items:center;overflow:hidden}.player-control[data-v-1dab1ac3]{display:flex;position:absolute;z-index:3}#controls-top-left[data-v-1dab1ac3]{top:10px;left:10px}#controls-top-center[data-v-1dab1ac3]{top:10px;left:50%;transform:translate(-50%);z-index:4}#controls-top-right[data-v-1dab1ac3]{top:10px;right:10px;justify-content:flex-end;align-content:flex-end}#controls-center-left[data-v-1dab1ac3]{left:10px;top:50%;transform:translateY(-50%)}#controls-center-center[data-v-1dab1ac3]{top:50%;left:50%;transform:translate(-50%,-50%);align-items:center;justify-content:space-around;z-index:20}#controls-center-right[data-v-1dab1ac3]{top:50%;right:10px;transform:translateY(-50%);justify-content:flex-end;align-items:center}#controls-bottom-left[data-v-1dab1ac3]{bottom:10px;left:10px;z-index:5}#controls-bottom-center[data-v-1dab1ac3]{bottom:10px;left:50%;transform:translate(-50%);align-items:flex-end;justify-content:space-around;z-index:4}#controls-bottom-right[data-v-1dab1ac3]{bottom:10px;right:10px;justify-content:flex-end;align-content:flex-end;align-items:flex-end;z-index:5}.img-div[data-v-b418cf51]{position:absolute;display:block;height:100%;width:100%;background-size:cover;background-position:center center;z-index:2;left:0;top:0}.static-image-wrapper[data-v-b418cf51]{background:#fff}.compass-wrapper[data-v-e2117d1e]{width:50px}.player-and-components-wrapper[data-v-e2117d1e]{position:relative}.static-image[data-v-e2117d1e]{position:absolute;top:0;left:0;width:100%;height:auto}button.v-btn[data-v-e2117d1e]{background:#fff}.waypoint-carousel.full-screen[data-v-e2117d1e]{scale:.5}div#controls-bottom-center>div[data-v-e2117d1e]{display:flex;flex-direction:column;align-items:center}.player-error[data-v-e2117d1e]{min-height:400px;display:flex;align-items:center;justify-content:space-around;background:#ededed}@media only screen and (max-width: 600px){#btn-fullscreen[data-v-e2117d1e]{display:none}}@media all and (orientation: landscape) and (max-height: 499px){#btn-fullscreen[data-v-e2117d1e]{display:none}}
2
+ `,document.head.appendChild(P);class y{async loadJson(n){return(await x.get(n)).data}async loadImage(n){return new Promise((i,r)=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>{i(o)},o.onerror=r,o.src=n})}async loadImageData(n){const i=await this.loadImage(n),r=document.createElement("canvas");try{const o=r.getContext("2d");return r.width=i.width,r.height=i.height,o.drawImage(i,0,0),r.toDataURL("image/png")}finally{r.remove()}}}const g=(t,n)=>{const i=t.__vccOpts||t;for(const[r,o]of n)i[r]=o;return i},ee={name:"QiHoverProbe",computed:{isHoverEnabled(){return window.getComputedStyle(this.$refs.hoverCheck).display==="none"}}},te={ref:"hoverCheck",class:"hover-check"};function ne(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("div",te,null,512)}const w=g(ee,[["render",ne],["__scopeId","data-v-e4729353"]]),L={methods:{throttle(t,n){let i=!0;return function(...r){i&&(i=!1,t.apply(this,r),setTimeout(()=>i=!0,n))}}}},ie={name:"QiApartmentChooserRaster",components:{QiHoverProbe:w},mixins:[L],props:{cdnFileResolver:{type:Function,required:!0},viewModel:{type:Object,required:!0},selectedUnitId:{type:String,default:null},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},sceneData:{type:Array,default:[]},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null}},emits:["select-unit","go-to-unit","hover-over","hover-out"],data(){return{pos:{x:0,y:0,width:0,height:0},canvas:null,canvasBg:null,canvasWidth:0,canvasHeight:0,context:null,contextBg:null,image:null,imageData:null,originalImageData:null,hoverApartmentIndex:-1,showApartmentCard:!1,cursorX:null,cursorY:null,rasterImages:{},vueCanvasCursor:"auto",timeout:null,windowListener:void 0,resourceLoader:new y,apartmentIndexRasterMap:{}}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},rasterUrl(){return this.cdnFileResolver(`/scenedata${this.viewModel.currentScene}.png`)},rasterImage(){return this.rasterUrl in this.rasterImages?this.rasterImages[this.rasterUrl]:null},hoverApartment(){if(this.hoverApartmentIndex<0)return!1;const t=this.sceneData.find(n=>n.index===this.hoverApartmentIndex);return t?this.unitCallback?this.unitCallback(t.apartmentId):t.apartmentId:!1},canvasStyle(){return{width:this.canvasWidth+"px",height:this.canvasHeight+"px",cursor:this.vueCanvasCursor}},hoverBehaviourIdentifier(){return`hover-${this.showApartmentCard?"over":"out"}-${this.hoverApartment?typeof this.hoverApartment=="object"&&"unitId"in this.hoverApartment?this.hoverApartment.unitId:this.hoverApartment:""}`}},watch:{rasterUrl:{handler(){this.rasterImages[this.rasterUrl]||this.resourceLoader.loadImageData(this.rasterUrl).then(t=>{this.rasterImages={...this.rasterImages,[this.rasterUrl]:t}})},immediate:!0},rasterImage(){this.rasterImage&&this.init()},"viewModel.currentScene":{handler(){this.draw()},immediate:!0},"viewModel.isRotating"(){this.draw()},drawObserver(){this.draw()},selectedUnitId(){this.draw()},hoverApartment(){this.draw(),this.hoverApartment?this.vueCanvasCursor="pointer":this.vueCanvasCursor="auto"},hoverBehaviourIdentifier(){this.$emit(this.showApartmentCard?"hover-over":"hover-out",{hoverApartment:this.hoverApartment,closeHandler:()=>this.closeDialog()})},pos(){this.$emit("pos",this.pos)}},mounted(){this.windowListener=()=>{clearTimeout(this.timeout),this.updateCanvasSize(),this.timeout=setTimeout(()=>{this.updateCanvasSize()},50)},window.addEventListener("resize",this.windowListener),this.updateCanvasSize()},beforeUnmount(){window.removeEventListener("resize",this.windowListener);for(const t in this.rasterImages)URL.revokeObjectURL(this.rasterImages[t])},methods:{init(){this.canvas=this.$refs.canvasMask,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.image=new Image,this.image.onload=()=>{this.setupDraw(),this.canvas.addEventListener("mousemove",this.throttle(this.handleMouseMove,50))},this.image.src=this.rasterImage},handleMouseMove(t){const n=this.getApartmentIndexByCursorPosition(t.offsetX,t.offsetY);this.showApartmentCard=n>=0,this.hoverApartmentIndex=n,this.pos={x:t.offsetX,y:t.offsetY,width:this.canvasWidth,height:this.canvasHeight}},clickCanvas(t){const n=this.getApartmentIndexByCursorPosition(t.offsetX,t.offsetY);n<0||this.isHoverable&&this.goToApartmentByIndex(n)},setImageData(){if(this.image&&this.image.width){this.canvas.width=this.image.width,this.canvas.height=this.image.height,this.context.drawImage(this.image,0,0,this.image.width,this.image.height),this.originalImageData=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),this.imageData=this.context.getImageData(0,0,this.canvas.width,this.canvas.height);const t=this.originalImageData.data;this.apartmentIndexRasterMap={};for(let n=0;n<t.length;n+=4)this.apartmentIndexRasterMap[t[n]]=[];for(let n=3;n<t.length;n+=4)t[n]===255&&t[n-3]in this.apartmentIndexRasterMap&&this.apartmentIndexRasterMap[t[n-3]].push(n-3)}},getApartmentIndexByCursorPosition(t,n){this.cursorX=t,this.cursorY=n;const i=this.canvas.offsetWidth/this.canvas.width,r=this.canvas.offsetHeight/this.canvas.height,o=(t/i).toFixed(),s=(n/r).toFixed()*(this.canvas.width*4)+o*4,l=this.originalImageData.data[s];return this.originalImageData.data[s+3]>0?l:-1},getApartmentIndexById(t){const n=this.sceneData.find(i=>i.apartmentId===t);return n?n.index:-1},highlightApartments(){this.getApartmentsInRaster().forEach(n=>{if(n.index>=0){const i=this.getApartmentPixelsByIndex(n.index),r=this.getApartmentIdByIndex(n.index);let o="idle";!this.hoverApartment&&this.selectedUnitId&&r===this.selectedUnitId?o="selected":this.hoverApartment&&this.hoverApartmentIndex===n.index&&(o="hover");const a=this.unitCallback?this.unitCallback(r):r;if(a){const s=this.colorCallback(a,o);if(s)for(let l=0;l<i.length;l++)this.imageData.data[i[l]]=s.r,this.imageData.data[i[l]+1]=s.g,this.imageData.data[i[l]+2]=s.b,this.imageData.data[i[l]+3]=s.a}}})},getApartmentPixelsByIndex(t){return this.originalImageData?this.apartmentIndexRasterMap[t]:!1},getApartmentIdByIndex(t){const n=this.sceneData.find(i=>i.index===t);return n&&n.apartmentId},getApartmentsInRaster(){if(this.originalImageData){const t=Object.keys(this.apartmentIndexRasterMap).map(i=>parseInt(i));return this.sceneData.filter(i=>t.includes(i.index))}else return[]},goToApartmentByIndex(t){const n=this.getApartmentIdByIndex(t);this.goToApartmentById(n)},goToApartmentById(t){const n=this.unitCallback?this.unitCallback(t):t;this.$emit("select-unit",n),n&&this.canGoToUnitCallback(n)&&this.$emit("go-to-unit",n)},setAlpha(t=0){if(!this.imageData)return;const n=this.imageData.data;for(let i=3;i<n.length;i+=4)n[i]=t},updateCanvasSize(){if(!this.$el)return!1;this.canvasWidth=this.$el.offsetWidth,this.canvasHeight=this.$el.offsetHeight},setupDraw(){this.setImageData(),this.draw()},draw(){this.setAlpha(),this.highlightApartments(),this.context&&this.imageData&&this.context.putImageData(this.imageData,0,0)},closeDialog(){this.showApartmentCard=!1}}},oe={id:"canvas"};function ae(t,n,i,r,o,a){const s=e.resolveComponent("qi-hover-probe");return e.openBlock(),e.createElementBlock("div",oe,[e.withDirectives(e.createElementVNode("canvas",{id:"canvas-mask",ref:"canvasMask",style:e.normalizeStyle(a.canvasStyle),onClick:n[0]||(n[0]=(...l)=>a.clickCanvas&&a.clickCanvas(...l))},null,4),[[e.vShow,!i.viewModel.isRotating]]),e.createVNode(s,{ref:"hoverProbe"},null,512)])}const A=g(ie,[["render",ae],["__scopeId","data-v-3bbbc77b"]]),re={name:"QiApartmentChooserSvg",components:{QiHoverProbe:w},mixins:[L],props:{cdnFileResolver:{type:Function,required:!0},viewModel:{type:Object,required:!0},selectedUnitId:{type:String,default:null},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},sceneData:{type:Array,default:[]},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null}},emits:["select-unit","go-to-unit","hover-over","hover-out"],data(){return{pos:{x:0,y:0,width:0,height:0},hoverApartmentIndex:-1,svgImages:{},currentSvgImage:null,resourceLoader:new y}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled}},watch:{"viewModel.currentScene":{handler(){this.viewModel.currentScene in this.svgImages&&(this.currentSvgImage=this.svgImages[this.viewModel.currentScene])},immediate:!0},svgImages:{handler(){this.viewModel.currentScene in this.svgImages&&(this.currentSvgImage=this.svgImages[this.viewModel.currentScene])},immediate:!0},pos(){this.$emit("pos",this.pos)},hoverApartmentIndex(t,n){if(t>=0){const i=this.getApartmentByIndex(t);this.$emit("hover-over",{hoverApartment:i,closeHandler:()=>{this.hoverApartmentIndex=-1}})}else{const i=this.getApartmentByIndex(n);this.$emit("hover-out",{hoverApartment:i,closeHandler:()=>{this.hoverApartmentIndex=-1}})}}},mounted(){for(let t=1;t<=4;t++){const n=this.cdnFileResolver(`/scenedata${t}.svg`),i={};this.resourceLoader.loadJson(n).then(r=>{i.markup=r;const a=new DOMParser().parseFromString(r,"image/svg+xml").getElementsByTagName("svg")[0];i.viewBox=a.getAttribute("viewBox"),i.svgObjects=Array.from(a.querySelectorAll("*[data-index]")).map(s=>({index:parseInt(s.getAttribute("data-index")),svg:s.innerHTML})),this.svgImages={...this.svgImages,[t]:i}})}this.$refs.container.addEventListener("mousemove",this.throttle(this.handleMouseMove,50))},methods:{handleMouseMove(t){this.pos={x:t.offsetX,y:t.offsetY,width:this.$el.offsetWidth,height:this.$el.offsetHeight}},getApartmentIdByIndex(t){var n;return(n=this.sceneData.find(i=>i.index===parseInt(t)))==null?void 0:n.apartmentId},getApartmentByIndex(t){const n=this.getApartmentIdByIndex(t);return this.unitCallback?this.unitCallback(n):n},mouseEnter(t){this.isHoverable&&(this.hoverApartmentIndex=t)},mouseLeave(){this.isHoverable&&(this.hoverApartmentIndex=-1)},click(t){const n=this.getApartmentByIndex(t);this.$emit("select-unit",n),this.isHoverable&&n&&this.canGoToUnitCallback(n)?this.$emit("go-to-unit",n):this.hoverApartmentIndex=t},getGClass(t){const n=this.getApartmentIdByIndex(t),i=this.getApartmentByIndex(t);let r="idle";this.hoverApartmentIndex<0&&this.selectedUnitId&&n===this.selectedUnitId?r="selected":this.hoverApartmentIndex>=0&&this.hoverApartmentIndex===t&&(r="hover");const o=this.colorCallback(i,r);if(o){const{r:a,g:s,b:l,a:d,s:u}=o;return{strokeWidth:u!==void 0?u:2,stroke:`rgb(${a}, ${s}, ${l})`,strokeOpacity:1,fill:`rgb(${a}, ${s}, ${l})`,fillOpacity:d/255,cursor:`${this.canGoToUnitCallback(i)?"cursor":"default"} !important`}}else return{strokeWidth:0,stroke:"white",strokeOpacity:0,fill:"white",fillOpacity:0,cursor:"default !important"}}}},se={id:"container",ref:"container"},le=["viewBox"],de=["innerHTML","onMouseenter","onMouseleave","onClick"];function ce(t,n,i,r,o,a){const s=e.resolveComponent("qi-hover-probe");return e.openBlock(),e.createElementBlock("div",se,[e.withDirectives(e.createElementVNode("div",{class:"svg-container",style:e.normalizeStyle({opacity:!o.currentSvgImage||!o.currentSvgImage.svgObjects?0:1})},[o.currentSvgImage&&o.currentSvgImage.svgObjects?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:o.currentSvgImage.viewBox},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.currentSvgImage.svgObjects,({index:l,svg:d})=>(e.openBlock(),e.createElementBlock("g",{key:l,innerHTML:d,style:e.normalizeStyle(a.getGClass(l)),onMouseenter:u=>a.mouseEnter(l),onMouseleave:u=>a.mouseLeave(l),onClick:u=>a.click(l)},null,44,de))),128))],8,le)):e.createCommentVNode("",!0)],4),[[e.vShow,!i.viewModel.isRotating]]),e.createVNode(s,{ref:"hoverProbe"},null,512)],512)}const E=g(re,[["render",ce],["__scopeId","data-v-82a61864"]]),he={name:"QiApartmentChooserNavigation",inject:["i18n"],props:{canGoToUnitCallback:{type:Function,default:()=>!0},selectedUnit:{type:Object,default:null},prevUnit:{type:Object,default:null},nextUnit:{type:Object,default:null},viewModel:{type:Object,required:!0}},mounted(){window.addEventListener("keydown",this.keyNavigate)},beforeUnmount(){window.removeEventListener("keydown",this.keyNavigate)},methods:{keyNavigate(t){t.keyCode===37?this.prevUnit&&this.$emit("prev-unit"):t.keyCode===39&&this.nextUnit&&this.$emit("next-unit")}}},me={key:0,class:"d-none d-md-flex"};function ue(t,n,i,r,o,a){const s=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{elevation:"1",icon:"mdi-rotate-right",class:"black darken-1",onClick:n[0]||(n[0]=l=>i.viewModel.rotateClockwise())}),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-chevron-left",class:"mr-sm-4 ml-sm-8 mr-3 ml-3 black darken-1",disabled:!i.prevUnit,onClick:n[1]||(n[1]=l=>t.$emit("prev-unit"))},null,8,["disabled"]),e.createVNode(s,{color:"success darken-2",elevation:"1",rounded:"",plain:"",disabled:!i.selectedUnit||!i.canGoToUnitCallback(i.selectedUnit),onClick:n[2]||(n[2]=l=>t.$emit("go-to-unit",i.selectedUnit))},{default:e.withCtx(()=>[i.selectedUnit&&i.canGoToUnitCallback(i.selectedUnit)?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(a.i18n.getLabel("see-apartment"))+"  ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(i.selectedUnit&&"title"in i.selectedUnit?i.selectedUnit.title:"-"),1)]),_:1},8,["disabled"]),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-chevron-right",class:"mr-sm-8 ml-sm-4 mr-3 ml-3 black darken-1",disabled:!i.nextUnit,onClick:n[3]||(n[3]=l=>t.$emit("next-unit"))},null,8,["disabled"]),e.createVNode(s,{elevation:"1",plain:"",icon:"mdi-rotate-left",class:"black darken-1",onClick:n[4]||(n[4]=l=>i.viewModel.rotateCounterClockwise())})])}const U=g(he,[["render",ue],["__scopeId","data-v-129ef905"]]);class V{constructor(n){this._numParts=n,this._loadedCount=0,this._isError=!1,this._finishedAction=()=>{},this._errorAction=()=>{},this._loadProgressAction=()=>{}}onLoadFinished(n){return this._finishedAction=n,this}onLoadError(n){return this._errorAction=n,this}onLoadProgress(n){return this._loadProgressAction=n,this}partLoaded(){this.isFinished||(this._loadedCount++,this._loadProgressAction(this.percentLoaded),this.isFinished&&this._finishedAction())}errorDetected(){this._isError||(this._isError=!0,this._errorAction())}get isFinished(){return this._loadedCount>=this._numParts}get isError(){return this._isError}get percentLoaded(){return Math.round(this._loadedCount*100/this._numParts)}}class ${constructor(n,i,r,o){this._rotator=n,this._direction=i,this._frameIndex=r,this._sceneCount=o}get atEnd(){return this._sceneCount===0}get frameIndex(){return this._frameIndex}nextFrame(){const n=this._rotator.clampFrameIndex(this._frameIndex+this._direction),i=this._rotator.isCardinalFrame(n)?this._sceneCount-1:this._sceneCount;return new $(this._rotator,this._direction,n,i)}}class Q{constructor(n,i){this._cardinalFrames=n,this._totalFrameCount=i}start(n,i,r){const o=this.startFrameIndexForScene(i);return new $(this,n,o,r)}isCardinalFrame(n){return this._cardinalFrames.includes(n)}clampFrameIndex(n){return(this._totalFrameCount+n)%this._totalFrameCount}startFrameIndexForScene(n){return this._cardinalFrames[n]}}const G=64,B=4,pe=120,ge={name:"QiApartmentChooserRotator",props:{viewModel:{type:Object,required:!0},build:{type:String,default:""},cdnFileResolver:{type:Function,required:!0},cardinalFrames:{type:Array,required:!0}},emits:["loaded","error","progress"],data(){const t=this.createFrames();return{loadTracker:new V(t.length).onLoadFinished(()=>this.$emit("loaded")).onLoadProgress(n=>this.$emit("progress",n)).onLoadError(()=>this.$emit("error")),sceneRotator:new Q(this.cardinalFrames,G),images:t,isPreloaded:!1}},computed:{activeFrame(){return this.images.find(t=>t.show)}},watch:{"viewModel.currentScene"(t,n){const i=this.getDirection(n,t),r=this.getSceneCountBetween(n,t);this.rotateInDirection(n,i,r)}},created(){this.rotateComplete()},methods:{rotateInDirection(t,n,i){this.viewModel.isRotating||(this.viewModel.isRotating=!0,this.rotationStep(this.sceneRotator.start(n,t%B,i)))},rotationStep(t){setTimeout(()=>{this.images[t.frameIndex].show=!1;const n=t.nextFrame();this.images[n.frameIndex].show=!0,n.atEnd?this.rotateComplete():window.requestAnimationFrame(()=>this.rotationStep(n))},1e3/pe)},rotateComplete(){const t=this.sceneRotator.startFrameIndexForScene(this.viewModel.currentScene%B);t in this.images&&(this.images[t].show=!0),this.viewModel.isRotating=!1},createFrames(){const t=[];for(let n=0;n<G;n++){const{sourceSet:i,defaultPath:r}=this.frameImageSource(n);t.push({index:n,sourceSet:i,defaultPath:r,show:!1})}return t},frameImageSource(t){const n=("0000"+(t+1)).slice(-4),i=this.build?`?v=${this.build}`:"",r=[`${this.cdnFileResolver(`/480/${n}.jpg${i}`)} 480w`,`${this.cdnFileResolver(`/960/${n}.jpg${i}`)} 960w`,`${this.cdnFileResolver(`/1280/${n}.jpg${i}`)} 1280w`].join(","),o=this.cdnFileResolver(`/480/${n}.jpg${i}`);return{sourceSet:r,defaultPath:o}},getSceneCountBetween(t,n){const i=B/2,r=Math.abs(t-n);return r>i?B-r:r},getDirection(t,n){if(t===n)return 0;const r=Math.abs(t-n)<B/2;return r&&t<n||!r&&t>n?1:-1}}},fe={key:0,class:"fill-parent d-flex justify-center align-center blue-grey lighten-5"},be={key:1,class:"frame-container"},ve={class:"frame-image"},ye=["srcset","type"],we=["src"],ke={key:2,id:"image-stack",class:"frame-container"},Ce=["alt"],_e=["srcset"],xe=["src"];function Be(t,n,i,r,o,a){const s=e.resolveComponent("v-icon");return e.openBlock(),e.createElementBlock("div",null,[o.loadTracker.isError?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):o.isPreloaded?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.images,l=>(e.openBlock(),e.createElementBlock("picture",{key:l.index,alt:l.index,class:e.normalizeClass({"frame-image":!0,show:l.show})},[e.createElementVNode("source",{srcset:l.sourceSet,type:"image/jpeg"},null,8,_e),e.createElementVNode("img",{src:l.defaultPath,alt:"Building image",onLoad:n[2]||(n[2]=d=>o.loadTracker.partLoaded()),onError:n[3]||(n[3]=d=>o.loadTracker.errorDetected())},null,40,xe)],10,Ce))),128))])):(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("picture",ve,[e.createElementVNode("source",{srcset:a.activeFrame.sourceSet,type:a.activeFrame.type},null,8,ye),e.createElementVNode("img",{src:a.activeFrame.defaultPath,onLoad:n[0]||(n[0]=l=>o.isPreloaded=!0),onError:n[1]||(n[1]=l=>o.loadTracker.errorDetected())},null,40,we)])]))])}const O=g(ge,[["render",Be],["__scopeId","data-v-e6481f8e"]]),Ie={name:"FloatingCard",props:{pos:{type:Object,required:!0},isHoverable:Boolean},computed:{q(){const t=this.pos.x<=this.pos.width/2?"left":"right";return`${this.pos.y<=this.pos.height/2?"top":"bottom"}-${t}`}}};function Se(t,n,i,r,o,a){const s=e.resolveComponent("v-dialog"),l=e.resolveComponent("v-fade-transition");return e.openBlock(),e.createBlock(l,{origin:a.q.replace("-"," ")+" "+i.pos.x+" "+i.pos.y},{default:e.withCtx(()=>[i.isHoverable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["floating-card",a.q]),style:e.normalizeStyle({left:`${i.pos.x}px`,top:`${i.pos.y}px`,pointerEvents:"none"})},[e.renderSlot(t.$slots,"default",{isHoverable:i.isHoverable},void 0,!0)],6)):(e.openBlock(),e.createBlock(s,{key:1,value:!0,width:"auto","onClick:outside":n[0]||(n[0]=d=>t.$emit("outside",d))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{isHoverable:i.isHoverable},void 0,!0)]),_:3}))]),_:3},8,["origin"])}const I=g(Ie,[["render",Se],["__scopeId","data-v-b74de171"]]),De={name:"QiZoomBox",props:{desktop:{type:Boolean,default:!0},mobile:{type:Boolean,default:!0},maxScale:{type:Number,default:10},consumeMouseClickWhenMoved:{type:Boolean,default:!0},consumeMouseUpWhenMoved:{type:Boolean,default:!0}},data(){return{zoom:100,originX:0,originY:0,moving:!1,scaling:!1,lastEvent:void 0,moved:!1}},computed:{transform(){return`translateX(${this.originX}px) translateY(${this.originY}px) scale(${this.scale})`},scale(){return this.zoom/100},actualMaxScale(){return this.maxScale*100}},watch:{scale(){this.emitUpdate()},originX(){this.emitUpdate()},originY(){this.emitUpdate()},desktop(){this.desktop?this.addDesktopHandlers():this.removeDesktopHandlers()},mobile(){this.mobile?this.addMobileHandlers():this.removeMobileHandlers()}},mounted(){this.desktop&&this.addDesktopHandlers(),this.mobile&&this.addMobileHandlers()},beforeUnmount(){this.desktop&&this.removeDesktopHandlers(),this.mobile&&this.removeMobileHandlers()},methods:{addDesktopHandlers(){this.$refs.box.addEventListener("wheel",this.wheelHandler,{capture:!0}),this.$refs.box.addEventListener("mousedown",this.mouseDownHandler,{capture:!0}),this.$refs.box.addEventListener("mousemove",this.mouseMoveHandler,{capture:!0}),window.addEventListener("mouseup",this.mouseUpHandler,{capture:!0}),window.addEventListener("click",this.mouseClickHandler,{capture:!0})},addMobileHandlers(){this.$refs.box.addEventListener("touchstart",this.touchStartHandler,{capture:!0}),this.$refs.box.addEventListener("touchmove",this.touchMoveHandler,{capture:!0}),window.addEventListener("touchend",this.touchEndHandler,{capture:!0}),window.addEventListener("touchcancel",this.touchEndHandler,{capture:!0})},removeDesktopHandlers(){this.$refs.box.removeEventListener("wheel",this.wheelHandler,{capture:!0}),this.$refs.box.removeEventListener("mousedown",this.mouseDownHandler,{capture:!0}),this.$refs.box.removeEventListener("mousemove",this.mouseMoveHandler,{capture:!0}),window.removeEventListener("mouseup",this.mouseUpHandler,{capture:!0}),window.removeEventListener("click",this.mouseClickHandler,{capture:!0})},removeMobileHandlers(){this.$refs.box.removeEventListener("touchstart",this.touchStartHandler,{capture:!0}),this.$refs.box.removeEventListener("touchmove",this.touchMoveHandler,{capture:!0}),window.removeEventListener("touchend",this.touchEndHandler,{capture:!0}),window.removeEventListener("touchcancel",this.touchEndHandler,{capture:!0})},wheelHandler(t){const{x:n,y:i}=this.getOffsetCoordinates(t);this.adjustZoom(-t.deltaY/10,n,i),t.preventDefault()},mouseDownHandler(t){this.moving=!0,this.moved=!1,this.lastEvent=t},mouseMoveHandler(t){if(this.moving){const{x:n,y:i}=this.getOffsetCoordinates(t),{x:r,y:o}=this.getOffsetCoordinates(this.lastEvent),a={x:n-r,y:i-o};this.adjustTranslateX(a.x),this.adjustTranslateY(a.y),this.moved=!0,this.lastEvent=t}},mouseUpHandler(t){this.moving&&this.moved&&this.consumeMouseUpWhenMoved&&(t.preventDefault(),t.stopImmediatePropagation())},mouseClickHandler(t){this.moving&&(this.moved&&this.consumeMouseClickWhenMoved&&(t.preventDefault(),t.stopImmediatePropagation()),this.moving=!1)},touchStartHandler(t){this.moving=t.touches.length===1,this.scaling=t.touches.length===2,this.lastEvent=t},touchMoveHandler(t){if(this.moving){const{x:n,y:i}=this.getOffsetCoordinates(t.touches[0]),{x:r,y:o}=this.getOffsetCoordinates(this.lastEvent.touches[0]),a={x:n-r,y:i-o};this.adjustTranslateX(a.x),this.adjustTranslateY(a.y)}else if(this.scaling&&t.touches.length===2){const{x:n,y:i}=this.getOffsetCoordinates(t.touches[0]),{x:r,y:o}=this.getOffsetCoordinates(this.lastEvent.touches[0]),{x:a,y:s}=this.getOffsetCoordinates(t.touches[1]),{x:l,y:d}=this.getOffsetCoordinates(this.lastEvent.touches[1]),u=Math.hypot(r-l,o-d),f=Math.hypot(n-a,i-s),b=(a+n)/2,m=(s+i)/2;this.adjustZoom(f-u,b,m)}this.lastEvent=t},touchEndHandler(){this.moving=!1,this.scaling=!1},getOffsetCoordinates(t){const{left:n,top:i}=this.$refs.box.getBoundingClientRect();return{x:t.clientX-n,y:t.clientY-i}},adjustTranslateX(t){const n=this.$refs.box.clientWidth,i=n*this.scale;this.originX=Math.max(Math.min(0,this.originX+t),-(i-n))},adjustTranslateY(t){const n=this.$refs.box.clientHeight,i=n*this.scale;this.originY=Math.max(Math.min(0,this.originY+t),-(i-n))},adjustZoom(t,n,i){const r=this.$refs.box.clientWidth,o=this.$refs.box.clientHeight,a=r*this.scale,s=o*this.scale;this.zoom=Math.min(Math.max(100,this.zoom+t),this.actualMaxScale);const l=r*this.scale,d=o*this.scale,u=l-a,f=d-s;this.originX-=n/r*u,this.originY-=i/o*f,this.adjustTranslateX(0),this.adjustTranslateY(0)},emitUpdate(){this.$emit("update",{scale:this.scale,x:this.originX,y:this.originY,resolve:(t,n)=>{const i=this.$refs.box.clientWidth,r=this.$refs.box.clientHeight,o=this.originX/-this.scale,a=this.originY/-this.scale,s=o+i/this.scale,l=a+r/this.scale,d=t/i*(s-o)+o,u=n/r*(l-a)+a;return{x:d,y:u}}})}}},Ae={ref:"box",class:"zoom-box-container"};function Ee(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",{style:e.normalizeStyle({"transform-origin":"top left",transform:a.transform}),class:"zoom-box"},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)],512)}const S=g(De,[["render",Ee],["__scopeId","data-v-83bfd28a"]]),z=4;function X(t){return t<z?t+1:1}function Ve(t){return t>1?t-1:z}class W{constructor(n){this._state={isRotating:!1,currentScene:n}}get isRotating(){return this._state.isRotating}set isRotating(n){this._state.isRotating=n}get navigator(){return this._navigator}get sceneModel(){return this._sceneModel}unlessRotatingDo(n){this.isRotating||n()}get currentScene(){return this._state.currentScene}set currentScene(n){this._state.currentScene=n}rotateCounterClockwise(){this.unlessRotatingDo(()=>{this.currentScene=X(this.currentScene)})}rotateClockwise(){this.unlessRotatingDo(()=>{this.currentScene=Ve(this.currentScene)})}}const Me={interior:"Interiør","see-a-selection-of-the-options-in-the-project":"Se et utvalg av tilvalgsmulighetene i prosjektet.","floor-plan":"Planløsning","all-illustrations-are-indicative-deviations-may-occur":{nb:"Alle illustrasjoner er veiledende. Avvik kan forekomme.",en:"All illustrations are indicative. Discrepancies may exist."},"read-more-here":"Les mer her","i-understand":{nb:"Jeg forstår",en:"I understand"},share:"Share","share-to-facebook":"Share to Facebook","share-to-linkedin":"Share to Linkedin","share-to-twitter":"Share to Twitter","share-via-email":"Share via Email","copy-link":"Copy link","virtual-view":"Virtuell Visning","slide-show":"Slide Show",room:"Room",floor:"Floor","see-apartments":"See apartments","see-apartment":"See apartment","click-and-drag-to-look-around":{en:"Click and drag to look around",nb:"Klikk og dra for å se deg rundt"},"click-on-the-cricles-to-move-around":{en:"Click on the circles to move around",nb:"Klikk på sirkelene for å gå rundt"},"use-the-mouse-wheel-to-zoom":{en:"Use the mouse wheel to zoom",nb:"Bruk mushjulet for å zoome"},"you-can-also-use-the-arrow-keys-to-move-around":{en:"You can also use the arrow keys to move around",nb:"Du kan også bruke pilene på tastaturet for å gå rundt"},"tap-and-drag-to-look-around":{en:"Tap and drag to look around",nb:"Trykk og dra for å se deg rundt"},"tap-on-the-circles-to-move-around":{en:"Tap on the circles to move around",nb:"Trykk på sirkelene for å gå rundt"},"use-two-fingers-to-zoom":{en:"Use two fingers to zoom",nb:"Bruk to fingre for å zoome"},"dont-show-again":{en:"Don't Show Again",nb:"Ikke vis igjen"}};class v{constructor(n,i){this._labels={...Me,...n||{}},this._language=i||"en"}getLabel(n){return n in this._labels?this.get(this._labels[n]):n}get(n){if(typeof n=="string")return n;if(this._language in n&&n[this._language])return n[this._language];for(const i in n)if(n[i])return n[i];return""}}const Ne=4,Re=[0,16,32,48],Fe={name:"QiApartmentChooser",components:{QiApartmentChooserRaster:A,QiApartmentChooserSvg:E,QiApartmentChooserNavigation:U,QiApartmentChooserRotator:O,QiFloatingCard:I,QiHoverProbe:w,QiZoomBox:S},provide(){return{i18n:this.i18n?new v(this.i18n.labels,this.i18n.language):new v}},emits:["select-unit","go-to-unit","nav-unit","hover-over-unit","hover-out-unit","initialized"],props:{i18n:{type:Object,default:void 0},showCards:{type:Boolean,default:!0},build:{type:String,default:""},buildingSceneDataResolver:{type:Function,default:null},buildingScenesByApartmentResolver:{type:Function,default:null},cdnFileResolver:{type:Function,required:!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},unitCallback:{type:Function,default:t=>t},canGoToUnitCallback:{type:Function,default:()=>!0},selectedUnitId:{type:String,default:null},nextUnit:{type:Object,default:null},prevUnit:{type:Object,default:null},drawObserver:{type:[Object,Array,String,Number,Boolean],default:null},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},useSvg:{type:Boolean,default:!1}},data(){return{loadState:{isReady:!1,isError:!1,progress:void 0},scenesByApartment:null,sceneData:null,scenes:null,viewModel:void 0,resourceLoader:new y,pos:{x:0,y:0,width:0,height:0},closeHandler:void 0,hoverApartment:void 0}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},selectedUnit(){return this.unitCallback?this.unitCallback(this.selectedUnitId):this.selectedUnitId},overlayComponent(){return this.useSvg?E:A}},watch:{selectedUnitId:{handler(){if(this.selectedUnitId&&this.viewModel){const t=this.scenesByApartment[this.selectedUnitId];t&&(this.viewModel.currentScene=t)}},immediate:!0}},async mounted(){let t=null;try{t=await this.resourceLoader.loadJson(this.cdnFileResolver("/apartmentChooser.json"))}catch{console.info("apartmentChooser.json not found")}const n=t&&t.startScene!==void 0?t.startScene:Ne;this.scenes=t&&t.scenes!==void 0?t.scenes:Re,this.sceneData=t&&t.sceneData!==void 0?t.sceneData.map(o=>({apartmentId:o.apartmentID,index:o.index})):this.buildingSceneDataResolver?await this.buildingSceneDataResolver():[],this.scenesByApartment=t&&t.sceneData!==void 0?t.sceneData.map(o=>{const a=o.bestScene===0?4:o.bestScene;return{unitId:o.apartmentID,scene:a}}).reduce((o,a)=>({...o,[a.unitId]:a.scene}),{}):this.buildingScenesByApartmentResolver?await this.buildingScenesByApartmentResolver():[];const i=(o,a="unitId")=>{let s=n,l=[];for(let d=0;d<z;d++)l.push(s),s=X(s);return o.sort((d,u)=>{const f=l.findIndex(m=>m===this.scenesByApartment[d[a]]),b=l.findIndex(m=>m===this.scenesByApartment[u[a]]);return f<b?-1:f>b?1:0}),o},r=o=>{this.viewModel=new W(o)};this.$emit("initialized",{scene:n,scenes:this.scenes,sceneData:this.sceneData,scenesByApartment:this.scenesByApartment,unitsSceneSort:i,initialize:r})},methods:{onPos(t){this.pos=t},hoverOver({hoverApartment:t,closeHandler:n}){this.hoverApartment=t,this.closeHandler=n,this.$emit("hover-over-unit",t)},hoverOut({hoverApartment:t,closeHandler:n}){this.hoverApartment=null,this.closeHandler=n,this.$emit("hover-out-unit",t)}}},Te={key:0},He={class:"interactive-viewer"},Le={class:"fill-parent"},Ue={key:0},$e={key:1,class:"navigation"},Oe={key:2};function ze(t,n,i,r,o,a){const s=e.resolveComponent("qi-apartment-chooser-rotator"),l=e.resolveComponent("qi-zoom-box"),d=e.resolveComponent("qi-floating-card"),u=e.resolveComponent("qi-apartment-chooser-navigation"),f=e.resolveComponent("v-progress-linear"),b=e.resolveComponent("qi-hover-probe");return o.viewModel?(e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("div",He,[e.createElementVNode("div",Le,[e.createVNode(l,{desktop:o.loadState.isReady&&i.interactiveDesktop,mobile:o.loadState.isReady&&i.interactiveMobile},{default:e.withCtx(()=>[e.createVNode(s,{"cdn-file-resolver":i.cdnFileResolver,"view-model":o.viewModel,"cardinal-frames":o.scenes,build:i.build,onProgress:n[0]||(n[0]=m=>o.loadState.progress=m),onLoaded:n[1]||(n[1]=m=>o.loadState.isReady=!0),onError:n[2]||(n[2]=m=>o.loadState.isError=!0)},null,8,["cdn-file-resolver","view-model","cardinal-frames","build"]),o.loadState.isReady?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.overlayComponent),{"cdn-file-resolver":i.cdnFileResolver,"view-model":o.viewModel,"selected-unit-id":i.selectedUnitId,"scene-data":o.sceneData,"color-callback":i.colorCallback,"unit-callback":i.unitCallback,"can-go-to-unit-callback":i.canGoToUnitCallback,"draw-observer":i.drawObserver,onSelectUnit:n[3]||(n[3]=m=>t.$emit("select-unit",m)),onGoToUnit:n[4]||(n[4]=m=>t.$emit("go-to-unit",m)),onHoverOver:a.hoverOver,onHoverOut:a.hoverOut,onPos:a.onPos},{default:e.withCtx(m=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)]),_:3},40,["cdn-file-resolver","view-model","selected-unit-id","scene-data","color-callback","unit-callback","can-go-to-unit-callback","draw-observer","onHoverOver","onHoverOut","onPos"]))])):e.createCommentVNode("",!0)]),_:3},8,["desktop","mobile"]),o.hoverApartment&&i.showCards?(e.openBlock(),e.createBlock(d,{key:0,"is-hoverable":a.isHoverable,pos:o.pos,onOutside:o.closeHandler},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{unit:o.hoverApartment,canGoToUnit:i.canGoToUnitCallback(o.hoverApartment),goToUnit:()=>i.canGoToUnitCallback(o.hoverApartment)&&t.$emit("go-to-unit",o.hoverApartment),pos:o.pos,isHoverable:a.isHoverable,close:o.closeHandler},void 0,!0)]),_:3},8,["is-hoverable","pos","onOutside"])):e.createCommentVNode("",!0),o.loadState.isReady?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(u,{"can-go-to-unit-callback":i.canGoToUnitCallback,"selected-unit":a.selectedUnit,"prev-unit":i.prevUnit,"next-unit":i.nextUnit,"view-model":o.viewModel,onGoToUnit:n[5]||(n[5]=m=>t.$emit("go-to-unit",m)),onPrevUnit:n[6]||(n[6]=m=>t.$emit("nav-unit",i.prevUnit)),onNextUnit:n[7]||(n[7]=m=>t.$emit("nav-unit",i.nextUnit))},null,8,["can-go-to-unit-callback","selected-unit","prev-unit","next-unit","view-model"])])):o.loadState.isError?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(f,{indeterminate:!o.loadState.progress,value:o.loadState.progress},null,8,["indeterminate","value"])]))])]),e.createVNode(b,{ref:"hoverProbe"},null,512)])):e.createCommentVNode("",!0)}const K=g(Fe,[["render",ze],["__scopeId","data-v-3a1121f3"]]),qe="data:image/png;base64,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",je={name:"QiNorthDirection",props:{longitude:{type:Number,default:()=>0}},data(){return{compassNeedle:qe}},computed:{needleRotation(){return{transform:`rotate(${90-this.longitude}deg)`,transition:" transform 0.5s ease-in"}}}};function Ye(t,n,i,r,o,a){const s=e.resolveComponent("v-img");return e.openBlock(),e.createBlock(s,{src:o.compassNeedle,style:e.normalizeStyle(a.needleRotation)},null,8,["src","style"])}const M=g(je,[["render",Ye]]);function q(t){return t.toLocaleString("en-no",{month:"short",day:"numeric"})}const Pe=e.defineComponent({setup(){},name:"QiBuildingChooserSunSimControl",props:{modelValue:{type:Number,required:!0},dateSelector:{type:Object,required:!0},isLoading:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{currentValue:this.modelValue,currentDate:null}},computed:{currentValueString(){const t=Math.floor(this.currentValue/2).toString().padStart(2,"0"),n=this.currentValue%2===0?"00":"30";return`${t}:${n}`},dates(){return this.dateSelector.dates.map(q)},selectedDate:{get(){return q(this.dateSelector.selectedDate)},set(t){this.dateSelector.selectIndex(this.dates.indexOf(t))}}},watch:{currentValue(t){this.$emit("update:modelValue",t)},modelValue(t){this.currentValue=Math.floor(t)},dates:{handler(t){this.currentDate=q(this.dateSelector.selectedDate)},immediate:!0},currentDate(t){this.dateSelector.selectIndex(this.dates.indexOf(t))}},methods:{}}),Qe={class:"sunsim-bar-wrapper"},Ge={class:"sunsim-date d-flex align-center pl-5 pr-5"},Xe={key:1,class:"text-center text-body-1"},We={class:"sunsim-wrapper d-flex align-center px-3"},Ke={class:"sunsim-time-label text-body-1 font-weight-normal ml-2"};function Ze(t,n,i,r,o,a){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("v-select"),d=e.resolveComponent("v-progress-linear"),u=e.resolveComponent("v-slider");return e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",Ge,[e.createVNode(s,{color:"black",class:"mr-2",icon:"mdi-calendar-blank-outline"}),t.dateSelector.hasMultipleDates?(e.openBlock(),e.createBlock(l,{key:0,modelValue:t.currentDate,"onUpdate:modelValue":n[0]||(n[0]=f=>t.currentDate=f),items:t.dates,density:"compact",variant:"underlined","hide-details":"",class:"day-selector"},null,8,["modelValue","items"])):(e.openBlock(),e.createElementBlock("span",Xe,e.toDisplayString(t.selectedDate),1))]),e.createElementVNode("div",We,[e.createElementVNode("span",Ke,e.toDisplayString(t.currentValueString),1),e.createVNode(s,{medium:"",class:"ml-2 mr-2 icon"},{default:e.withCtx(()=>[e.createTextVNode("mdi-white-balance-sunny")]),_:1}),t.isLoading?(e.openBlock(),e.createBlock(d,{key:0,indeterminate:"",rounded:"",height:"6",color:"grey lighten-1",class:"mr-2"})):(e.openBlock(),e.createBlock(u,{key:1,modelValue:t.currentValue,"onUpdate:modelValue":n[1]||(n[1]=f=>t.currentValue=f),min:0,max:47,step:1,"thumb-label":!1,"hide-details":!0,"thumb-color":"white","thumb-size":"25","track-size":"7","track-fill-color":"transparent",class:"sunsim-slider mr-1"},null,8,["modelValue"]))])])}const N=g(Pe,[["render",Ze],["__scopeId","data-v-1fba3edd"]]),Je=e.defineComponent({setup(){},name:"QiBuildingChooserSceneImageStack",props:{imageUrls:{type:Array,required:!0},activeIndex:{type:Number,required:!0}},emits:["resize","ready","preloaded","reset"],data(){return{state:"init",activeStates:["preloaded","loaded"],loadTracker:new V(0)}},watch:{imageUrls(t){this.$emit("reset"),this.loadImages(t)}},mounted(){this.loadImages(this.imageUrls),new ResizeObserver(t=>{window.requestAnimationFrame(()=>{const n=t[0].contentRect.width,i=t[0].contentRect.height;this.$emit("resize",{width:n,height:i})})}).observe(this.$refs.baseImage)},methods:{onPreloaded(){this.state="preloaded",this.$emit("preloaded")},loadImages(t){this.state="init",this.$refs.baseImage.src=t[0],this.loadTracker=new V(t.length).onLoadFinished(()=>{this.state="loaded",this.$emit("ready")})}}}),et={key:0},tt=["src"];function nt(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("img",{ref:"baseImage",class:"image-instance zero",style:{opacity:1,borderRadius:50},onLoad:n[0]||(n[0]=(...s)=>t.onPreloaded&&t.onPreloaded(...s))},null,544),t.state==="preloaded"||t.state==="loaded"?e.withDirectives((e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.imageUrls,(s,l)=>(e.openBlock(),e.createElementBlock("img",{key:l,class:e.normalizeClass({"image-instance":!0,active:l===t.activeIndex}),src:s,onLoad:n[1]||(n[1]=d=>t.loadTracker.partLoaded())},null,42,tt))),128)),e.createTextVNode(" Here ")],512)),[[e.vShow,t.state==="loaded"]]):e.createCommentVNode("",!0)])}const R=g(Je,[["render",nt],["__scopeId","data-v-fad48118"]]),it="buildingChooser.json",ot=180;class j{constructor(n){this._cdnFileResolver=n,this._resourceLoader=new y}constructFileUrl(n){return this._cdnFileResolver?this._cdnFileResolver(`/${n}`):null}loadConfigFile(){const n=this.constructFileUrl(it);return n?this._resourceLoader.loadJson(n):null}loadBuildingMapImage(n){const i=this.constructFileUrl(n.lookupFilename);return i?this._resourceLoader.loadImage(i):null}getViewLongitude(n){return n.cameraRotation&&n.cameraRotation.y+270}getBuildingData(n){const i=n?n.buildings:[],r=i.map(a=>a.id),o=i.map(a=>({id:a.id,url:this.constructFileUrl(a.overlayFilename)}));return{buildingIds:r,buildingOverlays:o}}getBackgroundImageData(n){return"days"in n?this.processMultipleDays(n.days):[this.processTimeSamples(ot,n.timeSamples)]}processMultipleDays(n){return n.map(i=>this.processTimeSamples(i.dayOfYear,i.timeSamples))}processTimeSamples(n,i){return{urls:i.map(o=>this.constructFileUrl(o.filename)),referenceDate:this.makeReferenceDate(n)}}makeReferenceDate(n){const i=new Date(0);return i.setUTCDate(n),i}async loadBuildingChooser(){try{const n=await this.loadConfigFile();if(n){const i=await this.loadBuildingMapImage(n);if(i){const r=this.getViewLongitude(n),{buildingIds:o,buildingOverlays:a}=this.getBuildingData(n),s=this.getBackgroundImageData(n);return{mapImage:i,viewLongitude:r,buildingIds:o,buildingOverlays:a,backgrounds:s}}}return null}catch{return null}}}class C{static empty(){return new C([])}constructor(n){this._buildingIds=n}getBuildingId(n,i,r){const o=this._getBuildingIndex(n,i,r);if(o!==void 0)return this._buildingIds[o]}_getBuildingIndex(n,i,r){const[o,a,s,l]=n.getPixel(i,r);if(l===255&&o===a&&a===s)return o}}class _{static empty(){return new _(null)}constructor(n){this._mapImage=n,this._context=null}update(n){this._mapImage&&(this._context=n.getContext("2d",{willReadFrequently:!0}),this._context.drawImage(this._mapImage,0,0,n.width,n.height))}getPixel(n,i){try{return this._context?this._context.getImageData(n,i,1,1).data:[0,0,0,0]}catch{return[0,0,0,0]}}}const at=new Date(0);class D{static empty(){return new D([{referenceDate:at,urls:[]}])}constructor(n){this._imagesByDay=n,this._state={selectedIndex:0}}selectIndex(n){n<this._imagesByDay.length&&(this._state.selectedIndex=n)}get dates(){return this._imagesByDay.map(n=>n.referenceDate)}get hasMultipleDates(){return this._imagesByDay.length>1}get selectedIndex(){return this._state.selectedIndex}get selectedDate(){return this._imagesByDay[this.selectedIndex].referenceDate}get imageUrls(){return this._imagesByDay[this.selectedIndex].urls}}const rt=e.defineComponent({setup(){e.ref({})},name:"QiBuildingChooserSvg",components:{QiBuildingChooserSunSimControl:N,QiBuildingChooserSceneImageStack:R,QiNorthDirection:M,QiFloatingCard:I,QiHoverProbe:w,QiZoomBox:S},emits:["go-to-building","hover-over-building","hover-out-building"],provide(){return{i18n:this.i18n?new v(this.i18n.labels,this.i18n.language):new v}},props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},canGoToBuildingCallback:{type:Function,default:()=>!0},buildingChooserTimeOfDay:{type:String,default:null},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},customOverlayContent:{type:String,default:""}},data(){return{sceneState:{preloaded:!1,ready:!1},canvasDimensions:{width:0,height:0},pos:{x:0,y:0,width:0,height:0},pickerData:void 0,hoverBuildingId:void 0,halfHourMark:new Date().getHours()*2+(new Date().getMinutes()<30?0:1),error:!1,resourceLoader:new y,svgObjects:void 0,svgViewBox:"0 0 0 0"}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},hoverBuilding(){return this.getBuildingData(this.hoverBuildingId)}},watch:{buildingChooserTimeOfDay:{handler(){if(this.buildingChooserTimeOfDay){const[t,n,i]=/^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay),r=parseInt(i);this.halfHourMark=parseInt(n)*2+(r<15?0:r>45?2:1)}},immediate:!0},hoverBuildingId(t,n){t?this.$emit("hover-over-building",this.getBuildingData(t)):this.$emit("hover-out-building",this.getBuildingData(n))}},async mounted(){const n=await new j(this.cdnFileResolver).loadBuildingChooser();if(n){this.canvasRaster=new _(n.mapImage),this.buildingMap=new C(n.buildingIds),this.daysOfYear=new D(n.backgrounds),this.pickerData={buildingOverlays:n.buildingOverlays,sceneLongitude:n.viewLongitude};const i=[];for(let{id:r,url:o}of n.buildingOverlays)this.resourceLoader.loadJson(o.replace(".png",".svg")).then(a=>{const l=new DOMParser().parseFromString(a,"image/svg+xml").getElementsByTagName("svg")[0];this.svgViewBox=l.getAttribute("viewBox"),i.push({id:r,svg:l.innerHTML})});this.svgObjects=i}else this.error=!0},methods:{resizeScene({width:t,height:n}){this.canvasDimensions.width=t,this.canvasDimensions.height=n},sceneReset(){this.sceneState={preloaded:!1,ready:!1}},getBuildingData(t){return this.buildingCallback?this.buildingCallback(t):t},getColor(t){return this.colorCallback(this.getBuildingData(t),t===this.hoverBuildingId?"hover":"idle")},getGClass(t){const n=this.getBuildingData(t),i=this.colorCallback(n,t===this.hoverBuildingId?"hover":"idle"),r=[];return t===this.hoverBuildingId?r.push("hover"):r.push("idle"),i&&this.canGoToBuildingCallback(n)?r.push("clickable"):r.push("restricted"),r.join(" ")},getGStyle(t){const n=this.getBuildingData(t),i=this.colorCallback(n,t===this.hoverBuildingId?"hover":"idle");if(i){const{r,g:o,b:a,a:s,s:l}=i;return{strokeWidth:l!==void 0?l:2,stroke:`rgb(${r}, ${o}, ${a})`,strokeOpacity:1,fill:`rgb(${r}, ${o}, ${a})`,fillOpacity:s/255,cursor:`${this.canGoToBuildingCallback(n)?"cursor":"default"} !important`}}else return{strokeWidth:0,stroke:"white",strokeOpacity:0,fill:"white",fillOpacity:0,cursor:"default !important"}},onBuildingMouseOver(t,n){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height},this.hoverBuildingId=n,this.$emit("hover-over-building",this.getBuildingData(n)))},onBuildingMouseOut(t,n){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height},this.hoverBuildingId=void 0,this.$emit("hover-out-building",this.getBuildingData(n)))},onBuildingMouseMove(t){this.isHoverable&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height})},onBuildingClick(t){this.hoverBuildingId=t,this.isHoverable&&this.hoverBuilding&&this.canGoToBuildingCallback(this.hoverBuilding)&&this.$emit("go-to-building",this.hoverBuilding)}}}),st={key:0,style:{height:"50vh"},class:"d-flex justify-center align-center blue-grey lighten-5"},lt={class:"image-instances"},dt={key:0},ct={class:"svg-container"},ht=["viewBox"],mt=["innerHTML","data-building-id","onMouseover","onMouseout","onMousemove","onClick"],ut=["innerHTML"];function pt(t,n,i,r,o,a){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("qi-building-chooser-scene-image-stack"),d=e.resolveComponent("qi-zoom-box"),u=e.resolveComponent("qi-north-direction"),f=e.resolveComponent("qi-building-chooser-sun-sim-control"),b=e.resolveComponent("qi-floating-card"),m=e.resolveComponent("qi-hover-probe");return t.error?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):t.pickerData?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`height: ${t.canvasDimensions.height}px; position: relative`),class:"image-container"},[e.createVNode(d,{desktop:t.interactiveDesktop,mobile:t.interactiveMobile},{default:e.withCtx(()=>[e.createElementVNode("div",lt,[e.createVNode(l,{"image-urls":t.daysOfYear.imageUrls,"active-index":t.halfHourMark,onResize:t.resizeScene,onPreloaded:n[0]||(n[0]=p=>t.sceneState.preloaded=!0),onReady:n[1]||(n[1]=p=>t.sceneState.ready=!0),onReset:t.sceneReset},null,8,["image-urls","active-index","onResize","onReset"]),t.svgObjects?e.withDirectives((e.openBlock(),e.createElementBlock("div",dt,[e.createElementVNode("div",ct,[(e.openBlock(),e.createElementBlock("svg",{viewBox:t.svgViewBox},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.svgObjects,({id:p,svg:h},H)=>(e.openBlock(),e.createElementBlock("g",{key:H,innerHTML:h,"data-building-id":p,class:e.normalizeClass(t.getGClass(p)),style:e.normalizeStyle(t.getGStyle(p)),onMouseover:k=>t.onBuildingMouseOver(k,p),onMouseout:k=>t.onBuildingMouseOut(k,p),onMousemove:k=>t.onBuildingMouseMove(k,p),onClick:k=>t.onBuildingClick(p)},null,46,mt))),128))],8,ht))])],512)),[[e.vShow,t.sceneState.preloaded]]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:"custom-overlay-layer",innerHTML:t.customOverlayContent},null,8,ut),[[e.vShow,t.sceneState.preloaded]])])]),_:1},8,["desktop","mobile"]),e.withDirectives(e.createElementVNode("div",null,[t.pickerData.sceneLongitude?(e.openBlock(),e.createBlock(u,{key:0,class:"north-indicator",longitude:t.pickerData.sceneLongitude},null,8,["longitude"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:t.halfHourMark,"onUpdate:modelValue":n[2]||(n[2]=p=>t.halfHourMark=p),"date-selector":t.daysOfYear,"is-loading":!t.sceneState.ready},null,8,["modelValue","date-selector","is-loading"])],512),[[e.vShow,t.sceneState.preloaded]]),t.showCards&&t.hoverBuilding?(e.openBlock(),e.createBlock(b,{key:0,"is-hoverable":t.isHoverable,pos:t.pos,onOutside:n[3]||(n[3]=()=>t.hoverBuildingId=void 0)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{building:t.hoverBuilding,canGoToBuilding:t.canGoToBuildingCallback(t.hoverBuilding),goToBuilding:()=>t.canGoToBuildingCallback(t.hoverBuilding)&&t.$emit("go-to-building",t.hoverBuilding),pos:t.pos,isHoverable:t.isHoverable,close:()=>t.hoverBuildingId=void 0},void 0,!0)]),_:3},8,["is-hoverable","pos"])):e.createCommentVNode("",!0),e.createVNode(m,{ref:"hoverProbe"},null,512)],4)):e.createCommentVNode("",!0)}const F=g(rt,[["render",pt],["__scopeId","data-v-0a2cec1f"]]),gt={name:"QiBuildingChooserRasterOverlay",props:{imageUrl:{type:String,required:!0},dimensions:{type:Object,required:!0},color:{type:Object,default:()=>({r:108,g:0,b:108,a:144,s:2})}},data(){return{isLoaded:!1,overlayImage:void 0,resourceLoader:new y,context:void 0,imageData:void 0,imageDataIndices:[]}},watch:{color(t,n){(t.r!==n.r||t.g!==n.g||t.b!==n.b||t.a!==n.a)&&this.draw()}},async mounted(){this.overlayImage=await this.resourceLoader.loadImage(this.imageUrl),this.setupDraw()},methods:{setupDraw(){if(!this.overlayImage||!this.$refs.canvas)return;const{width:t,height:n}=this.dimensions;if(!(t===0||n===0)){this.context=this.$refs.canvas.getContext("2d",{willReadFrequently:!0}),this.context.drawImage(this.overlayImage,0,0,t,n),this.imageData=this.context.getImageData(0,0,t,n);for(let i=3;i<this.imageData.data.length;i+=4)this.imageData.data[i]!==0&&this.imageDataIndices.push(i);this.draw(),this.isLoaded=!0}},draw(){this.context&&this.imageData&&(this.applyColor(),this.context.putImageData(this.imageData,0,0))},applyColor(){if(this.color)for(let t=0;t<this.imageDataIndices.length;t++)this.imageData.data[this.imageDataIndices[t]-3]=this.color.r,this.imageData.data[this.imageDataIndices[t]-2]=this.color.g,this.imageData.data[this.imageDataIndices[t]-1]=this.color.b,this.imageData.data[this.imageDataIndices[t]]=this.color.a}}};function ft(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("canvas",e.mergeProps({ref:"canvas",class:"overlay"},i.dimensions),null,16)}const Y=g(gt,[["render",ft],["__scopeId","data-v-9a90fa2f"]]),bt=e.defineComponent({setup(){e.ref({})},name:"QiBuildingChooserRaster",components:{QiBuildingChooserRasterOverlay:Y,QiBuildingChooserSunSimControl:N,QiBuildingChooserSceneImageStack:R,QiNorthDirection:M,QiFloatingCard:I,QiHoverProbe:w,QiZoomBox:S},emits:["go-to-building","hover-over-building","hover-out-building"],provide(){return{i18n:this.i18n?new v(this.i18n.labels,this.i18n.language):new v}},props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},canGoToBuildingCallback:{type:Function,default:()=>!0},buildingChooserTimeOfDay:{type:String,default:null},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},customOverlayContent:{type:String,default:""}},data(){return{sceneState:{preloaded:!1,ready:!1},canvasDimensions:{width:0,height:0},pos:{x:0,y:0,width:0,height:0},pickerData:void 0,buildingMap:C.empty(),canvasRaster:_.empty(),selectedBuildingId:void 0,halfHourMark:new Date().getHours()*2+(new Date().getMinutes()<30?0:1),viewResolver:(t,n)=>({x:t,y:n}),error:!1}},computed:{isHoverable(){return this.$refs.hoverProbe.isHoverEnabled},selectedBuilding(){return this.getBuildingData(this.selectedBuildingId)}},watch:{buildingChooserTimeOfDay:{handler(){if(this.buildingChooserTimeOfDay){const[t,n,i]=/^(\d\d):(\d\d)$/.exec(this.buildingChooserTimeOfDay),r=parseInt(i);this.halfHourMark=parseInt(n)*2+(r<15?0:r>45?2:1)}},immediate:!0},selectedBuildingId(t,n){t?this.$emit("hover-over-building",this.getBuildingData(t)):this.$emit("hover-out-building",this.getBuildingData(n))}},async mounted(){const n=await new j(this.cdnFileResolver).loadBuildingChooser();n?(this.canvasRaster=new _(n.mapImage),this.buildingMap=new C(n.buildingIds),this.daysOfYear=new D(n.backgrounds),this.pickerData={buildingOverlays:n.buildingOverlays,sceneLongitude:n.viewLongitude},this.resizeImages()):this.error=!0},methods:{resizeScene({width:t,height:n}){this.canvasDimensions.width=t,this.canvasDimensions.height=n,this.$nextTick(this.resizeImages)},sceneReset(){this.sceneState={preloaded:!1,ready:!1}},getBuildingData(t){return this.buildingCallback?this.buildingCallback(t):t},getBuildingId(t){const{x:n,y:i}=this.viewResolver(t.layerX,t.layerY);return this.buildingMap.getBuildingId(this.canvasRaster,n,i)},resizeImages(){if(this.$refs.canvas&&(this.canvasRaster.update(this.$refs.canvas),this.$refs.overlays))for(const t of this.$refs.overlays)t.setupDraw()},onMove(t){this.isHoverable&&(this.selectedBuildingId=this.getBuildingId(t),this.selectedBuildingId!==void 0&&(this.pos={x:t.layerX,y:t.layerY,width:this.canvasDimensions.width,height:this.canvasDimensions.height}))},onClick(t){this.selectedBuildingId=this.getBuildingId(t),this.isHoverable&&this.selectedBuilding&&this.$emit("go-to-building",this.selectedBuilding)},getColor(t){return this.colorCallback(this.getBuildingData(t),t===this.selectedBuildingId?"hover":"idle")},updateView({resolve:t}){this.viewResolver=t}}}),vt={key:0,style:{height:"50vh"},class:"d-flex justify-center align-center blue-grey lighten-5"},yt={class:"image-instances"},wt=["innerHTML"];function kt(t,n,i,r,o,a){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("qi-building-chooser-scene-image-stack"),d=e.resolveComponent("qi-building-chooser-raster-overlay"),u=e.resolveComponent("qi-zoom-box"),f=e.resolveComponent("qi-north-direction"),b=e.resolveComponent("qi-building-chooser-sun-sim-control"),m=e.resolveComponent("qi-floating-card"),p=e.resolveComponent("qi-hover-probe");return t.error?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(s,{"x-large":""},{default:e.withCtx(()=>[e.createTextVNode("mdi-alert-circle-outline")]),_:1})])):t.pickerData?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`cursor: ${t.selectedBuildingId?"pointer":"auto"};height: ${t.canvasDimensions.height}px; position: relative`),class:"image-container"},[e.createVNode(u,{desktop:t.interactiveDesktop,mobile:t.interactiveMobile,onUpdate:t.updateView},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[e.createVNode(l,{"image-urls":t.daysOfYear.imageUrls,"active-index":t.halfHourMark,onResize:t.resizeScene,onPreloaded:n[0]||(n[0]=h=>t.sceneState.preloaded=!0),onReady:n[1]||(n[1]=h=>t.sceneState.ready=!0),onReset:t.sceneReset},null,8,["image-urls","active-index","onResize","onReset"]),e.withDirectives(e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pickerData.buildingOverlays,h=>(e.openBlock(),e.createBlock(d,{ref_for:!0,ref:"overlays",key:h.id,"image-url":h.url,dimensions:t.canvasDimensions,color:t.getColor(h.id)},null,8,["image-url","dimensions","color"]))),128))],512),[[e.vShow,t.sceneState.preloaded]])]),e.createElementVNode("canvas",e.mergeProps(t.canvasDimensions,{ref:"canvas",class:{hover:!!t.selectedBuildingId},onClick:n[2]||(n[2]=(...h)=>t.onClick&&t.onClick(...h)),onMousemove:n[3]||(n[3]=(...h)=>t.onMove&&t.onMove(...h))}),null,16),e.withDirectives(e.createElementVNode("div",{class:"custom-overlay-layer",innerHTML:t.customOverlayContent},null,8,wt),[[e.vShow,t.sceneState.preloaded]])]),_:1},8,["desktop","mobile","onUpdate"]),e.withDirectives(e.createElementVNode("div",null,[t.pickerData.sceneLongitude?(e.openBlock(),e.createBlock(f,{key:0,class:"north-indicator",longitude:t.pickerData.sceneLongitude},null,8,["longitude"])):e.createCommentVNode("",!0),e.createVNode(b,{modelValue:t.halfHourMark,"onUpdate:modelValue":n[4]||(n[4]=h=>t.halfHourMark=h),"date-selector":t.daysOfYear,"is-loading":!t.sceneState.ready},null,8,["modelValue","date-selector","is-loading"])],512),[[e.vShow,t.sceneState.preloaded]]),t.showCards&&t.selectedBuilding?(e.openBlock(),e.createBlock(m,{key:0,"is-hoverable":t.isHoverable,pos:t.pos,onOutside:n[5]||(n[5]=()=>t.selectedBuildingId=void 0)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{building:t.selectedBuilding,canGoToBuilding:t.canGoToBuildingCallback(t.selectedBuilding),goToBuilding:()=>t.canGoToBuildingCallback(t.selectedBuilding)&&t.$emit("go-to-building",t.selectedBuilding),pos:t.pos,isHoverable:t.isHoverable,close:()=>t.selectedBuildingId=void 0},void 0,!0)]),_:3},8,["is-hoverable","pos"])):e.createCommentVNode("",!0),e.createVNode(p,{ref:"hoverProbe"},null,512)],4)):e.createCommentVNode("",!0)}const T=g(bt,[["render",kt],["__scopeId","data-v-08f2ea1e"]]),Ct={name:"QiBuildingChooser",components:{QiBuildingChooserSvg:F,QiBuildingChooserRaster:T},emits:["go-to-building","hover-over-building","hover-out-building"],props:{showCards:{type:Boolean,default:()=>!0},colorCallback:{type:Function,default:()=>({r:108,g:0,b:108,a:144,s:2})},buildingCallback:{type:Function,default:t=>t},cdnFileResolver:{type:Function,required:!0},i18n:{type:Object,default:void 0},interactiveDesktop:{type:Boolean,default:!0},interactiveMobile:{type:Boolean,default:!0},useSvg:{type:Boolean,default:!1},buildingChooserTimeOfDay:{type:String,default:null},canGoToBuildingCallback:{type:Function,default:()=>!0},customOverlayContent:{type:String,default:""}},computed:{component(){return this.useSvg?F:T}}};function _t(t,n,i,r,o,a){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{"show-cards":i.showCards,"color-callback":i.colorCallback,"building-callback":i.buildingCallback,"cdn-file-resolver":i.cdnFileResolver,i18n:i.i18n,"interactive-desktop":i.interactiveDesktop,"interactive-mobile":i.interactiveMobile,"building-chooser-time-of-day":i.buildingChooserTimeOfDay,"can-go-to-building-callback":i.canGoToBuildingCallback,"custom-overlay-content":i.customOverlayContent,onGoToBuilding:n[0]||(n[0]=s=>t.$emit("go-to-building",s)),onHoverOverBuilding:n[1]||(n[1]=s=>t.$emit("hover-over-building",s)),onHoverOutBuilding:n[2]||(n[2]=s=>t.$emit("hover-out-building",s))},e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),s=>({name:s,fn:e.withCtx(l=>[e.renderSlot(t.$slots,s,e.normalizeProps(e.guardReactiveProps(l)))])}))]),1064,["show-cards","color-callback","building-callback","cdn-file-resolver","i18n","interactive-desktop","interactive-mobile","building-chooser-time-of-day","can-go-to-building-callback","custom-overlay-content"])}const Z=g(Ct,[["render",_t]]),xt=37,Bt=39,It={name:"WaypointCarousel",props:{thumbnails:{type:Array,required:!0},active:{type:Number,required:!0}},data(){return{activeThumb:0}},computed:{activeIndex:{get(){return this.active},set(t){this.activeThumb=t}},isMobile(){return/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(window.navigator.userAgent)}},mounted(){window.addEventListener("keydown",this.keyNavigate)},beforeUnmount(){window.removeEventListener("keydown",this.keyNavigate)},methods:{keyNavigate(t){switch(t.keyCode){case t.keyCode===xt:this.$emit("previous");case t.keyCode===Bt:this.$emit("next");default:return}},goToCamera(t,n){n(),this.$emit("goto",t)}}},St={class:"waypoint-carousel"};function Dt(t,n,i,r,o,a){const s=e.resolveComponent("v-icon"),l=e.resolveComponent("v-btn"),d=e.resolveComponent("v-hover"),u=e.resolveComponent("v-img"),f=e.resolveComponent("v-card"),b=e.resolveComponent("v-slide-group-item"),m=e.resolveComponent("v-slide-group");return e.openBlock(),e.createElementBlock("div",St,[e.createVNode(m,{modelValue:a.activeIndex,"onUpdate:modelValue":n[2]||(n[2]=p=>a.activeIndex=p),"active-class":"active-apt","selected-class":"active-apt","show-arrows":"","center-active":"",mandatory:""},{prev:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(({hover:p})=>[e.createVNode(l,{elevation:"0",class:e.normalizeClass(["carousel-button",{mobile:a.isMobile}]),onClick:n[0]||(n[0]=h=>t.$emit("previous"))},{default:e.withCtx(()=>[e.createVNode(s,{color:p?"#999":"#d2d2d2","x-large":""},{default:e.withCtx(()=>[e.createTextVNode(" mdi-chevron-left ")]),_:2},1032,["color"])]),_:2},1032,["class"])]),_:1})]),next:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(({hover:p})=>[e.createVNode(l,{elevation:"0",class:e.normalizeClass(["carousel-button",{mobile:a.isMobile}]),onClick:n[1]||(n[1]=h=>t.$emit("next"))},{default:e.withCtx(()=>[e.createVNode(s,{color:p?"#999":"#d2d2d2","x-large":""},{default:e.withCtx(()=>[e.createTextVNode(" mdi-chevron-right ")]),_:2},1032,["color"])]),_:2},1032,["class"])]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.thumbnails,p=>(e.openBlock(),e.createBlock(b,{key:p.id},{default:e.withCtx(({toggle:h,selectedClass:H})=>[e.createVNode(f,{class:e.normalizeClass(["ma-2",H]),align:"center",justify:"center",height:a.isMobile?50:100,width:a.isMobile?80:160,elevation:"0",style:{overflow:"hidden"},onClick:k=>a.goToCamera(p.id,h)},{default:e.withCtx(()=>[e.createVNode(u,{"max-height":"100","max-width":"160",src:p.thumbnailUrl},null,8,["src"])]),_:2},1032,["class","height","width","onClick"])]),_:2},1024))),128))]),_:1},8,["modelValue"])])}const At=g(It,[["render",Dt],["__scopeId","data-v-f4e6ce2e"]]),Et={name:"QiVirtualTourSocialShare",inject:["i18n"],data(){return{showSocialShare:!1,currentURL:location.href}},methods:{shareToFacebook(){return window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(location.href),"facebook-share-dialog","width=626,height=436"),!1},shareToTwitter(){return window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(location.href),"twiter-share-dialog","width=626,height=436"),!1},shareToLinkedin(){return window.open("https://www.linkedin.com/sharing/share-offsite/?url="+encodeURIComponent(location.href),"linkedin-share-dialog","width=626,height=736"),!1},copyLink(){navigator.clipboard.writeText(location.href)}}},Vt={id:"share-btns-wrapper",class:"text-center"};function Mt(t,n,i,r,o,a){const s=e.resolveComponent("v-btn"),l=e.resolveComponent("v-tooltip"),d=e.resolveComponent("v-toolbar-title"),u=e.resolveComponent("v-spacer"),f=e.resolveComponent("v-toolbar"),b=e.resolveComponent("v-card-text"),m=e.resolveComponent("v-card"),p=e.resolveComponent("v-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(l,{elevation:"2",top:"",attach:""},{activator:e.withCtx(({on:h})=>[e.createVNode(s,e.mergeProps({density:"comfortable",elevation:"1",icon:"mdi-share-variant",onClick:n[0]||(n[0]=H=>o.showSocialShare=!o.showSocialShare)},e.toHandlers({...h})),null,16)]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("share")),1)]),_:1}),e.createVNode(p,{id:"share-box",width:"400",modelValue:o.showSocialShare,"onUpdate:modelValue":n[2]||(n[2]=h=>o.showSocialShare=h)},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(f,{elevation:"0"},{default:e.withCtx(()=>[e.createVNode(s,{size:"x-small",icon:"mdi-close",onClick:n[1]||(n[1]=h=>o.showSocialShare=!1)}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.i18n.getLabel("share")),1)]),_:1}),e.createVNode(u)]),_:1}),e.createVNode(b,{class:"mt-5"},{default:e.withCtx(()=>[e.createElementVNode("p",Vt,[e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-facebook"},h,{onClick:a.shareToFacebook}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("share-to-facebook")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-linkedin"},h,{onClick:a.shareToLinkedin}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("share-to-linkedin")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-twitter"},h,{onClick:a.shareToTwitter}),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("share-to-twitter")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-email",link:"",href:`mailto:?body=${o.currentURL}`},h),null,16,["href"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("share-via-email")),1)]),_:1}),e.createVNode(l,{location:"top"},{activator:e.withCtx(({props:h})=>[e.createVNode(s,e.mergeProps({depressed:"",fab:"",light:"",icon:"mdi-content-copy",onClick:a.copyLink},h),null,16,["onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.i18n.getLabel("copy-link")),1)]),_:1}),e.createVNode(u)])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const Nt=g(Et,[["render",Mt],["__scopeId","data-v-3560cd03"]]);class Rt{constructor(n,i){this._doc=n,this._elemId=i,this._state={isActive:!1}}get isActive(){return this._state.isActive}setup(){const n=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"],i=this._getElement();n.forEach(r=>{i.addEventListener(r,this._toggle.bind(this),!1)})}toggle(){this.isActive?this._exit():this._enter()}_enter(){const n=this._getElement(),i=n.requestFullscreen||n.webkitRequestFullscreen||n.mozRequestFullscreen||n.msRequestFullscreen;i&&i.apply(n)}_exit(){const n=this._doc.exitFullscreen||this._doc.webkitExitFullscreen||this._doc.mozExitFullscreen||this._doc.document.msExitFullscreen;n&&n.apply(document)}_getElement(){return this._doc.getElementById(this._elemId)}_toggle(){const n=!!(this._doc.fullscreenElement||this._doc.webkitFullscreenElement||this._doc.mozFullscreenElement||this._doc.msFullscreenElement);this._state.isActive=n}}const Ft={props:{isFullScreen:{type:Boolean,required:!0}},emits:["toggle-fullscreen"]},Tt={id:"btn-fullscreen",class:"btn-placeholder mr-2"};function Ht(t,n,i,r,o,a){const s=e.resolveComponent("v-btn");return e.openBlock(),e.createElementBlock("div",Tt,[e.createVNode(s,{density:"comfortable",elevation:"3",icon:i.isFullScreen?"mdi-fullscreen-exit":"mdi-fullscreen",onClick:n[0]||(n[0]=l=>t.$emit("toggle-fullscreen"))},null,8,["icon"])])}const Lt=g(Ft,[["render",Ht]]),Ut={name:"Disclaimer",inject:["i18n"],data(){return{isVisible:!0}}},$t={key:0,class:"text-white disclaimer caption"};function Ot(t,n,i,r,o,a){return e.openBlock(),e.createBlock(e.Transition,{name:"fade-transition"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",$t,[e.createTextVNode(e.toDisplayString(a.i18n.getLabel("all-illustrations-are-indicative-deviations-may-occur"))+" ",1),e.createElementVNode("span",{onClick:n[0]||(n[0]=s=>o.isVisible=!1),class:"link-text text-decoration-underline"},e.toDisplayString(a.i18n.getLabel("i-understand")),1)])):e.createCommentVNode("",!0)]),_:1})}const zt=g(Ut,[["render",Ot],["__scopeId","data-v-6e4f02d6"]]),qt={name:"ManualSlideShowImage",props:{isFullScreen:{type:Boolean,required:!0}},data(){return{}},watch:{},mounted(){window.addEventListener("resize",this.setPlayerSize),this.setPlayerSize()},methods:{findClosestAncestor(t,n){let i=t,r=t;for(;(i=i.parentNode)&&i.className.indexOf(n)<0;);return r=i,r},setPlayerSize(){let t=1.7777777777777777,n=document.querySelector("#player-sizer");if(!n)return;let i=n.offsetWidth,r=i*(1/t);(window.innerWidth<=600||i<=600)&&(r=window.innerHeight*.75,i=r*(1/t)),n.style.height=r+"px",n.style.width=i+"px",this.$emit("new-size-callback",i,r)}}},jt={id:"player-wrapper"},Yt={id:"player-sizer"},Pt={class:"player-control",id:"controls-top-left"},Qt={class:"player-control",id:"controls-top-center"},Gt={class:"player-control",id:"controls-top-right"},Xt={class:"player-control",id:"controls-center-left"},Wt={class:"player-control",id:"controls-center-center"},Kt={class:"player-control",id:"controls-center-right"},Zt={class:"player-control",id:"controls-bottom-left"},Jt={class:"player-control",id:"controls-bottom-center"},en={class:"player-control",id:"controls-bottom-right"};function tn(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("div",jt,[e.createElementVNode("div",Yt,[e.renderSlot(t.$slots,"slideshow-image",{},void 0,!0),e.createElementVNode("div",Pt,[e.renderSlot(t.$slots,"top-left",{},void 0,!0)]),e.createElementVNode("div",Qt,[e.renderSlot(t.$slots,"top-center",{},void 0,!0)]),e.createElementVNode("div",Gt,[e.renderSlot(t.$slots,"top-right",{},void 0,!0)]),e.createElementVNode("div",Xt,[e.renderSlot(t.$slots,"center-left",{},void 0,!0)]),e.createElementVNode("div",Wt,[e.renderSlot(t.$slots,"center-center",{},void 0,!0)]),e.createElementVNode("div",Kt,[e.renderSlot(t.$slots,"center-right",{},void 0,!0)]),e.createElementVNode("div",Zt,[e.renderSlot(t.$slots,"bottom-left",{},void 0,!0)]),e.createElementVNode("div",Jt,[e.renderSlot(t.$slots,"bottom-center",{},void 0,!0)]),e.createElementVNode("div",en,[e.renderSlot(t.$slots,"bottom-right",{},void 0,!0)])])])}const nn=g(qt,[["render",tn],["__scopeId","data-v-1dab1ac3"]]),on={name:"StaticImage",props:{image:{type:String,required:!0},aspectRatio:{type:String,default:()=>"wide"}},computed:{style(){return{"background-image":`url("${encodeURI(this.image)}")`}}}},an={class:"static-image-wrapper"};function rn(t,n,i,r,o,a){return e.openBlock(),e.createElementBlock("div",an,[e.createElementVNode("div",{class:e.normalizeClass(["img-div",[i.aspectRatio]]),style:e.normalizeStyle(a.style)},null,6)])}const sn={name:"ManualSlideShow",components:{WaypointCarousel:At,SingleImage:g(on,[["render",rn],["__scopeId","data-v-b418cf51"]]),SocialShare:Nt,FullScreenButton:Lt,Disclaimer:zt,ManualSlideShowPlayer:nn},provide(){return{i18n:this.i18n?new v(this.i18n.labels,this.i18n.language):new v}},props:{images:{type:Array,required:!0},websiteUrl:{type:String,default:()=>{}},i18n:{type:Object,default:void 0},showFullScreen:{type:Boolean,default:()=>!0},showShare:{type:Boolean,default:()=>!0},defaultWaypointIndex:{type:Number,default:()=>0}},data(){return{loading:!0,error:!1,currentIndex:0,currentImageId:void 0,fullScreen:new Rt(document,"player-wrapper")}},computed:{imagesWithThumbnails(){return this.images.map(t=>({...t,thumbnailUrl:t.url}))},currentImage(){return this.images[this.currentIndex].url}},mounted(){this.fullScreen.setup()},methods:{toggleFullscreen(){this.fullScreen.toggle(),window.scrollTo({top:150,behavior:"smooth"})},nextImage(){let t=this.currentIndex+1;t>=this.images.length&&(t=0),this.currentIndex=t},previousImage(){let t=this.currentIndex-1;t<0&&(t=this.images.length-1),this.currentIndex=t},goToImage(t,n=!0){let i=this.images.findIndex(r=>r.id===t);i!=-1&&(this.currentIndex=i)}}},ln={class:"virtual-tour-v2-wrapper"},dn={class:"player-and-components-wrapper"},cn={key:1,class:"btn-placeholder"};function hn(t,n,i,r,o,a){const s=e.resolveComponent("single-image"),l=e.resolveComponent("disclaimer"),d=e.resolveComponent("v-icon"),u=e.resolveComponent("v-btn"),f=e.resolveComponent("full-screen-button"),b=e.resolveComponent("social-share"),m=e.resolveComponent("waypoint-carousel"),p=e.resolveComponent("manual-slide-show-player");return e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",dn,[e.createElementVNode("div",null,[e.createVNode(p,{isFullScreen:o.fullScreen.isActive},{"slideshow-image":e.withCtx(()=>[e.createVNode(s,{image:a.currentImage},null,8,["image"])]),"top-left":e.withCtx(()=>[]),"top-center":e.withCtx(()=>[e.createVNode(l,{"return-url":i.websiteUrl},null,8,["return-url"])]),"top-right":e.withCtx(()=>[]),"center-left":e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-x-transition"},{default:e.withCtx(()=>[e.createVNode(u,{elevation:"1",rounded:"",plain:"",icon:"",onClick:a.previousImage},{default:e.withCtx(()=>[e.createVNode(d,{color:"black darken-1"},{default:e.withCtx(()=>[e.createTextVNode("mdi-chevron-left")]),_:1})]),_:1},8,["onClick"])]),_:1})]),"center-center":e.withCtx(()=>[]),"center-right":e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-x-reverse-transition"},{default:e.withCtx(()=>[e.createVNode(u,{elevation:"1",rounded:"",plain:"",icon:"",onClick:a.nextImage},{default:e.withCtx(()=>[e.createVNode(d,{color:"black darken-1"},{default:e.withCtx(()=>[e.createTextVNode("mdi-chevron-right")]),_:1})]),_:1},8,["onClick"])]),_:1})]),"bottom-left":e.withCtx(()=>[i.showFullScreen?(e.openBlock(),e.createBlock(f,{key:0,isFullScreen:o.fullScreen.isActive,class:"btn-fullscreen",onToggleFullscreen:a.toggleFullscreen},null,8,["isFullScreen","onToggleFullscreen"])):e.createCommentVNode("",!0),i.showShare?(e.openBlock(),e.createElementBlock("div",cn,[e.createVNode(b)])):e.createCommentVNode("",!0)]),"bottom-center":e.withCtx(()=>[e.createElementVNode("div",null,[o.fullScreen.isActive?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass([o.fullScreen.isActive?"full-screen":""]),thumbnails:a.imagesWithThumbnails,active:o.currentIndex,onNext:a.nextImage,onPrevious:a.previousImage,onGoto:a.goToImage},null,8,["class","thumbnails","active","onNext","onPrevious","onGoto"])):e.createCommentVNode("",!0)])]),"bottom-right":e.withCtx(()=>[]),_:1},8,["isFullScreen"]),e.createVNode(m,{thumbnails:a.imagesWithThumbnails,active:o.currentIndex,onNext:a.nextImage,onPrevious:a.previousImage,onGoto:a.goToImage},null,8,["thumbnails","active","onNext","onPrevious","onGoto"])])])])}const J=g(sn,[["render",hn],["__scopeId","data-v-e2117d1e"]]),mn=Object.freeze(Object.defineProperty({__proto__:null,ManualSlideShow:J,QiApartmentChooser:K,QiApartmentChooserNavigation:U,QiApartmentChooserRaster:A,QiApartmentChooserRotator:O,QiApartmentChooserSvg:E,QiBuildingChooser:Z,QiBuildingChooserRaster:T,QiBuildingChooserRasterOverlay:Y,QiBuildingChooserSceneImageStack:R,QiBuildingChooserSunSimControl:N,QiBuildingChooserSvg:F,QiFloatingCard:I,QiHoverProbe:w,QiNorthDirection:M,QiZoomBox:S},Symbol.toStringTag,{value:"Module"}));class un{constructor(n){this._data=n}getPixel(n,i){const r=this._data[n][i];if(r!==" "){const o=Number.parseInt(r);return[o,o,o,255]}else return[0,0,0,0]}}const pn=function(n){Object.entries(mn).forEach(([i,r])=>{n.component(i,r)})};c.BatchLoadTracker=V,c.BuildingMap=C,c.BuildingPickerResourceProvider=j,c.BuildingViewerModel=W,c.CanvasRaster=_,c.DayOfYearSelector=D,c.I18N=v,c.ManualSlideShow=J,c.QiApartmentChooser=K,c.QiApartmentChooserNavigation=U,c.QiApartmentChooserRaster=A,c.QiApartmentChooserRotator=O,c.QiApartmentChooserSvg=E,c.QiBuildingChooser=Z,c.QiBuildingChooserRaster=T,c.QiBuildingChooserRasterOverlay=Y,c.QiBuildingChooserSceneImageStack=R,c.QiBuildingChooserSunSimControl=N,c.QiBuildingChooserSvg=F,c.QiFloatingCard=I,c.QiHoverProbe=w,c.QiNorthDirection=M,c.QiZoomBox=S,c.ResourceLoader=y,c.SampleRaster=un,c.SceneRotator=Q,c.default=pn,c.throttle=L,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "@qispace/vue3-player",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "config": {
5
5
  "tag-version-prefix": "v"
6
6
  },
7
- "main": "dist/vue3-player.esm.js",
8
- "module": "dist/vue3-player.esm.js",
9
- "browser": "dist/vue3-player.esm.js",
10
- "unpkg": "dist/vue3-player.iife.js",
7
+ "main": "dist/vue3-player.umd.js",
8
+ "module": "dist/vue3-player.mjs",
11
9
  "files": [
12
- "dist/*",
13
- "src/**/*",
14
- "README.md"
10
+ "dist",
11
+ "src/components/",
12
+ "src/lib/"
15
13
  ],
16
14
  "types": "./dist/index.d.ts",
17
15
  "exports": {
18
16
  ".": {
19
- "import": "./dist/vue3-player.js",
20
- "require": "./dist/vue3-player.umd.cjs"
17
+ "import": "./dist/vue3-player.mjs",
18
+ "require": "./dist/vue3-player.umd.js"
19
+ },
20
+ "./dist/style.css": {
21
+ "import": "./dist/entry.css",
22
+ "require": "./dist/entry.css"
21
23
  }
22
24
  },
23
25
  "scripts": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiApartmentChooser.vue.d.ts","sourceRoot":"","sources":["../../../src/components/apartmentChooser/QiApartmentChooser.vue"],"names":[],"mappings":"AAkUA,OAAO,kJAAkJ,CAAA;;AAGzJ,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiApartmentChooserNavigation.vue.d.ts","sourceRoot":"","sources":["../../../src/components/apartmentChooser/QiApartmentChooserNavigation.vue"],"names":[],"mappings":"AAwFA,OAAO,4JAA4J,CAAA;;AAGnK,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiApartmentChooserRaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/apartmentChooser/QiApartmentChooserRaster.vue"],"names":[],"mappings":"AAyYA,OAAO,wJAAwJ,CAAA;;AAG/J,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiApartmentChooserRotator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/apartmentChooser/QiApartmentChooserRotator.vue"],"names":[],"mappings":"AAyMA,OAAO,yJAAyJ,CAAA;;AAGhK,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiApartmentChooserSvg.vue.d.ts","sourceRoot":"","sources":["../../../src/components/apartmentChooser/QiApartmentChooserSvg.vue"],"names":[],"mappings":"AAwOA,OAAO,qJAAqJ,CAAA;;AAG5J,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooser.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooser.vue"],"names":[],"mappings":";AAiEA,wBAA4E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooserRaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooserRaster.vue"],"names":[],"mappings":"AAmTA,OAAO,qJAAqJ,CAAA;;AAG5J,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooserRasterOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue"],"names":[],"mappings":"AA2FA,OAAO,4JAA4J,CAAA;;AAGnK,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooserSceneImageStack.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue"],"names":[],"mappings":"AAqFA,OAAO,8JAA8J,CAAA;;AAGrK,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooserSunSimControl.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooserSunSimControl.vue"],"names":[],"mappings":"AA8IA,OAAO,4JAA4J,CAAA;AACnK,OAAO,4IAA4I,CAAA;;AAGnJ,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiBuildingChooserSvg.vue.d.ts","sourceRoot":"","sources":["../../../src/components/buildingPicker/QiBuildingChooserSvg.vue"],"names":[],"mappings":"AA2XA,OAAO,kJAAkJ,CAAA;;AAGzJ,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiFloatingCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/shared/QiFloatingCard.vue"],"names":[],"mappings":"AAkDA,OAAO,oIAAoI,CAAA;;AAG3I,wBAA4G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"QiHoverProbe.vue.d.ts","sourceRoot":"","sources":["../../../src/components/shared/QiHoverProbe.vue"],"names":[],"mappings":"AAsBA,OAAO,kIAAkI,CAAA;;AAGzI,wBAA4G"}