(function() { var embededObj; var EmbeddedVR = function() { return new EmbeddedVR.init(); }; EmbeddedVR.init = function() { this.currentScriptUrl = null; this.thumbnailUrl = 'https://irl-sec-theviewer-stage-prod.s3-accelerate.amazonaws.com/Tyler Napolitano/15ac3d62-28ea-4237-91eb-c8b431af8bd6/b0eeaa6e-0f49-4ee8-8b29-fdc6386b429f?timestamp=2019-07-17T04:47:09.006Z'; this.galleryId = '15ac3d62-28ea-4237-91eb-c8b431af8bd6'; this.options = { isFullScreenAvailable : true, isThumbnailAvailable : true, isShareNativeAvailable : true, isVrModeAvailable : true, isFloorPlanAvailable : true, isSharedExperienceAvailable : false, }; window.addEventListener("load", appendExternalScripts); } EmbeddedVR.prototype = { resolveVrView : function() { return this; }, showViewer : function() { setTimeout(function(){ var krpanoDiv = document.getElementById('krpanoViewerId'); if (!krpanoDiv) { EmbeddedVR.prototype.showViewer(); } else { krpanoDiv.classList.add('krpanoViewerTransition'); } },700); }, createThumbnail : function() { var wrapperThumbnail = document.createElement('div'); wrapperThumbnail.className = 'wrapperThumbnail'; var thumbnailDiv = document.createElement('img'); thumbnailDiv.id = 'thumbnail'; thumbnailDiv.className = 'thumbnailDiv'; thumbnailDiv.src = this.thumbnailUrl; thumbnailDiv.onclick = onClickThumbnail.bind(thumbnailDiv); wrapperThumbnail.appendChild(thumbnailDiv); this.parentDiv.appendChild(wrapperThumbnail); return this; }, getCurrentScript : function() { return this.currentScriptUrl; }, resolveCurrentScriptUrl : function() { this.parentDiv = document.currentScript.parentElement; this.currentScriptUrl = document.currentScript.src; this.currentScriptUrl = this.currentScriptUrl.substr(0, this.currentScriptUrl.lastIndexOf("/") + 1); return this; }, appendGtmIframe : function() { var iframe = document.createElement('iframe'); iframe.src = this.getCurrentScript() + 'embedJS?galleryId=15ac3d62-28ea-4237-91eb-c8b431af8bd6&spaceId=2c398821-857c-4ab3-8730-dc1c8bacfb09'; iframe.scrolling = "no"; iframe.frameborder = "0"; iframe.width = "1"; iframe.height = "1"; iframe.style.display = "none"; document.body.appendChild(iframe); } }; function onClickThumbnail(evt) { var krpanoDiv = document.getElementById('krpanoViewerId'); this.parentNode.removeChild(this); initializeViewer(); } function scriptExist(scriptId) { return !(!document.getElementById(scriptId)); } async function appendExternalScripts() { if (!scriptExist("theViewer-krpano")) { let krpanoScript = document.createElement('script'); krpanoScript.id = "theViewer-krpano"; krpanoScript.type = "text/javascript"; krpanoScript.async = true; krpanoScript.src = embededObj.getCurrentScript() +"html/theViewer/script/libs/krpano/krpano.js"; document.head.appendChild(krpanoScript); } if (!scriptExist("theViewer-shareEmbed")) { let requireScript = document.createElement('script'); requireScript.id = "theViewer-shareEmbed"; requireScript.type = "text/javascript"; requireScript.setAttribute('data-main', embededObj.getCurrentScript() + 'html/theViewer/script/req/shareEmbedRequires.js?timestamp=' + Date.now()); requireScript.async = true; requireScript.src = embededObj.getCurrentScript() + "html/theViewer/script/node_modules/requirejs/require.js?timestamp=" + Date.now(); document.head.appendChild(requireScript); } if (!scriptExist("theViewer-font")) { let link = document.createElement('link'); link.id = "theViewer-font"; link.rel = "stylesheet"; link.async = true; link.href = "https://fonts.googleapis.com/css?family=Roboto:100,300,400,700"; document.head.appendChild(link); } if (!scriptExist("theViewer-style")) { let link = document.createElement('link'); link.id = "theViewer-style"; link.rel = "stylesheet"; link.async = true; link.href = "https://fonts.googleapis.com/css?family=Roboto:100,300,400,700"; link.href = embededObj.getCurrentScript() + 'html/theViewer/css/embedViewer.css?timestamp=' + Date.now(); document.head.appendChild(link); } } if (!Array.isArray(window.mainShareFunction)) { window.mainShareFunction = []; } window.mainShareFunction.push((function(thev, thevProxy) { embededObj.krpanoViewer = thev; embededObj.theViewerProxy = thevProxy; if (!embededObj.options.isThumbnailAvailable) { initializeViewer(); } else { embededObj.createThumbnail(); } })); function initializeViewer() { requirejs(["app/utils"], function(utils) { utils.setUrlPrefix(embededObj.getCurrentScript()); requirejs(["app/shareEmbed", "social/socialCounters"], function(share, socialCounters) { window.theViewerAppVersion = 'v3.22'; var theViewerParams = window.theViewer || {}; theViewerParams.GalleryUnparsed = '{\"Id\":null,\"Name\":null,\"Description\":null,\"SpaceId\":null,\"ContentUrl\":null,\"ThumbnailId\":null,\"ThumbnailContentId\":null,\"ThumbnailMime\":null,\"ThumbnailTimestamp\":null,\"ThumbnailVersionId\":null,\"Galleries\":[{\"OrigId\":null,\"Name\":\"Modern Farmhouse\",\"Description\":null,\"ContentUrl\":\"https:\/\/irl-sec-theviewer-stage-prod.s3-accelerate.amazonaws.com\/Tyler Napolitano\/\",\"SpaceName\":\"Tyler Napolitano\",\"SpaceType\":\"UserSpace\",\"Order\":null,\"Timestamp\":null,\"ThumbnailContent\":{\"Id\":\"b0eeaa6e-0f49-4ee8-8b29-fdc6386b429f\",\"OrigId\":null,\"Type\":\"IMAGE\",\"Mime\":\"image\/jpeg\",\"VersionId\":\"aXO.IWZoujsfUehez3tsajEtojncgEEO\",\"Timestamp\":\"2019-07-17T04:47:09.006Z\",\"OriginalName\":null,\"Name\":\"SET 06_11 - Photo - Small.jpg\",\"Size\":null},\"CustomSettings\":null,\"ExtendedView\":null,\"Archived\":false,\"MiniMap\":null,\"Bgm\":null,\"Panos\":[{\"OrigId\":null,\"Name\":\"VR_1 - Panorama.jpg\",\"LandingAngle\":null,\"MultiresolutionData\":null,\"MultiresolutionPath\":null,\"Content\":{\"Id\":\"eeabb92f-286c-4bb3-9cac-7fe55c5fc7e1\",\"OrigId\":null,\"Type\":null,\"Mime\":\"image\/jpeg\",\"VersionId\":\"zCO7t9tVqUg5Cv3QnTXprrqHzsz6sKqi\",\"Timestamp\":\"2019-07-17T04:47:32.611Z\",\"OriginalName\":null,\"Name\":null,\"Size\":null},\"Type\":\"SphericalMonoStandard\",\"Resolution\":4096,\"Order\":null,\"Thumbnail\":null,\"Preview\":{\"Id\":\"preview-eeabb92f-286c-4bb3-9cac-7fe55c5fc7e1\",\"OrigId\":null,\"Type\":\"PANO\",\"Mime\":\"image\/jpeg\",\"VersionId\":\"Atn7JimaCAgzmHwiyJwnX9AA7FtuwNIV\",\"Timestamp\":\"2019-07-17T04:47:32.565Z\",\"OriginalName\":null,\"Name\":\"VR_1 - Panorama.jpg\",\"Size\":null},\"Depthmap\":null,\"Bgm\":null,\"Warps\":[{\"Id\":\"95d15fb1-618c-4b2d-a40d-9c6e578ab168\",\"OrigId\":null,\"Longitude\":-0.38803260794787775,\"Latitude\":-3.276569605613366,\"Radius\":null,\"Size\":null,\"Icon\":null,\"Visible\":true,\"Rx\":null,\"Ry\":null,\"Rz\":null,\"Depth\":null,\"Name\":\"Pool Deck\",\"DestinationId\":\"a9ef2e92-7411-442c-b311-7cefcec73b53\",\"DestinationType\":\"Pano\",\"LandingAngle\":null,\"Style\":null},{\"Id\":\"f145aab0-9d54-490a-aec5-b46d4aff68c2\",\"OrigId\":null,\"Longitude\":176.34958740659113,\"Latitude\":-0.4163446482705369,\"Radius\":null,\"Size\":null,\"Icon\":null,\"Visible\":true,\"Rx\":null,\"Ry\":null,\"Rz\":null,\"Depth\":null,\"Name\":\"Front\",\"DestinationId\":\"55d62a8f-250d-4485-96dd-4c5a5bfd80e9\",\"DestinationType\":\"Pano\",\"LandingAngle\":null,\"Style\":null}],\"InfoSpots\":[],\"SoundSpots\":[],\"MediaSpots\":[],\"AnimationSpots\":[],\"AnimationVideoSpots\":[],\"VideoSpots\":[],\"BoundingBoxes\":[],\"TransparentSpots\":[],\"TransparentPublicSpots\":[],\"DepthmapTransparentSpots\":[],\"CustomSettings\":null,\"AudioSettings\":{\"UseDefaults\":true,\"VideoAudio\":true,\"GalleryAudio\":true,\"PanoAudio\":true},\"Timestamp\":\"2019-07-17T04:47:32.611Z\",\"ContentVersionId\":\"zCO7t9tVqUg5Cv3QnTXprrqHzsz6sKqi\",\"ContentMime\":\"image\/jpeg\",\"ContentId\":\"eeabb92f-286c-4bb3-9cac-7fe55c5fc7e1\",\"Multiresolution\":false,\"Id\":\"3a69d000-08d4-415a-abbb-bd97f522f19c\"},{\"OrigId\":null,\"Name\":\"VR_2 - Panorama.jpg\",\"LandingAngle\":null,\"MultiresolutionData\":null,\"MultiresolutionPath\":null,\"Content\":{\"Id\":\"dd4a2ea7-b715-4aa2-b241-e5e73ab4798b\",\"OrigId\":null,\"Type\":null,\"Mime\":\"image\/jpeg\",\"VersionId\":\"MFwIIKCoZMBmb5K1BWhkjqiStkbyFDji\",\"Timestamp\":\"2019-07-17T04:47:43.681Z\",\"OriginalName\":null,\"Name\":null,\"Size\":null},\"Type\":\"SphericalMonoStandard\",\"Resolution\":4096,\"Order\":null,\"Thumbnail\":null,\"Preview\":{\"Id\":\"preview-dd4a2ea7-b715-4aa2-b241-e5e73ab4798b\",\"OrigId\":null,\"Type\":\"PANO\",\"Mime\":\"image\/jpeg\",\"VersionId\":\"iCJnkh86NRryHUEY3C3ARyRSR_pWm1nh\",\"Timestamp\":\"2019-07-17T04:47:43.598Z\",\"OriginalName\":null,\"Name\":\"VR_2 - Panorama.jpg\",\"Size\":null},\"Depthmap\":null,\"Bgm\":null,\"Warps\":[{\"Id\":\"a1a80c45-5370-4bc6-9244-bcead3559ac6\",\"OrigId\":null,\"Longitude\":0.07957742037740445,\"Latitude\":-1.710405728270367,\"Radius\":null,\"Size\":null,\"Icon\":null,\"Visible\":true,\"Rx\":null,\"Ry\":null,\"Rz\":null,\"Depth\":null,\"Name\":\"Entrance\",\"DestinationId\":\"3a69d000-08d4-415a-abbb-bd97f522f19c\",\"DestinationType\":\"Pano\",\"LandingAngle\":null,\"Style\":null}],\"InfoSpots\":[],\"SoundSpots\":[],\"MediaSpots\":[],\"AnimationSpots\":[],\"AnimationVideoSpots\":[],\"VideoSpots\":[],\"BoundingBoxes\":[],\"TransparentSpots\":[],\"TransparentPublicSpots\":[],\"DepthmapTransparentSpots\":[],\"CustomSettings\":null,\"AudioSettings\":{\"UseDefaults\":true,\"VideoAudio\":true,\"GalleryAudio\":true,\"PanoAudio\":true},\"Timestamp\":\"2019-07-17T04:47:43.681Z\",\"ContentVersionId\":\"MFwIIKCoZMBmb5K1BWhkjqiStkbyFDji\",\"ContentMime\":\"image\/jpeg\",\"ContentId\":\"dd4a2ea7-b715-4aa2-b241-e5e73ab4798b\",\"Multiresolution\":false,\"Id\":\"55d62a8f-250d-4485-96dd-4c5a5bfd80e9\"},{\"OrigId\":null,\"Name\":\"VR_3 - Panorama.jpg\",\"LandingAngle\":null,\"MultiresolutionData\":null,\"MultiresolutionPath\":null,\"Content\":{\"Id\":\"e0aab6b9-5e4c-4c48-8d27-d170042d27f8\",\"OrigId\":null,\"Type\":null,\"Mime\":\"image\/jpeg\",\"VersionId\":\"Q8WEkS45idVfhpiHI4_srbUlRvKzyFkd\",\"Timestamp\":\"2019-07-17T04:47:50.069Z\",\"OriginalName\":null,\"Name\":null,\"Size\":null},\"Type\":\"SphericalMonoStandard\",\"Resolution\":4096,\"Order\":null,\"Thumbnail\":null,\"Preview\":{\"Id\":\"preview-e0aab6b9-5e4c-4c48-8d27-d170042d27f8\",\"OrigId\":null,\"Type\":\"PANO\",\"Mime\":\"image\/jpeg\",\"VersionId\":\"PZC9kkri09E_Uz_DQg.lym3MNrgbicoB\",\"Timestamp\":\"2019-07-17T04:47:50.014Z\",\"OriginalName\":null,\"Name\":\"VR_3 - Panorama.jpg\",\"Size\":null},\"Depthmap\":null,\"Bgm\":null,\"Warps\":[{\"Id\":\"45b83e8e-7c0c-45cb-8579-cee66d201f1a\",\"OrigId\":null,\"Longitude\":175.76630328946044,\"Latitude\":-3.2844750368102016,\"Radius\":null,\"Size\":null,\"Icon\":null,\"Visible\":true,\"Rx\":null,\"Ry\":null,\"Rz\":null,\"Depth\":null,\"Name\":\"Entrance\",\"DestinationId\":\"3a69d000-08d4-415a-abbb-bd97f522f19c\",\"DestinationType\":\"Pano\",\"LandingAngle\":null,\"Style\":null}],\"InfoSpots\":[],\"SoundSpots\":[],\"MediaSpots\":[],\"AnimationSpots\":[],\"AnimationVideoSpots\":[],\"VideoSpots\":[],\"BoundingBoxes\":[],\"TransparentSpots\":[],\"TransparentPublicSpots\":[],\"DepthmapTransparentSpots\":[],\"CustomSettings\":null,\"AudioSettings\":{\"UseDefaults\":true,\"VideoAudio\":true,\"GalleryAudio\":true,\"PanoAudio\":true},\"Timestamp\":\"2019-07-17T04:47:50.069Z\",\"ContentVersionId\":\"Q8WEkS45idVfhpiHI4_srbUlRvKzyFkd\",\"ContentMime\":\"image\/jpeg\",\"ContentId\":\"e0aab6b9-5e4c-4c48-8d27-d170042d27f8\",\"Multiresolution\":false,\"Id\":\"a9ef2e92-7411-442c-b311-7cefcec73b53\"}],\"Videos\":[],\"ThumbnailVersionId\":\"aXO.IWZoujsfUehez3tsajEtojncgEEO\",\"ThumbnailTimestamp\":\"2019-07-17T04:47:09.006Z\",\"ThumbnailId\":\"b0eeaa6e-0f49-4ee8-8b29-fdc6386b429f\",\"ThumbnailMime\":\"image\/jpeg\",\"ShareableType\":\"GALLERY\",\"Id\":\"15ac3d62-28ea-4237-91eb-c8b431af8bd6\"}],\"Projects\":[],\"ExtendedView\":null,\"CustomSettings\":null,\"StatusCode\":0,\"Tier\":\"freelancer\",\"UserInfo\":{\"Tier\":\"freelancer\",\"TierLevel\":\"1000\",\"Name\":\"napolitano.tyler@gmail.com\",\"Locale\":\"en\",\"RootSpaceId\":\"2c398821-857c-4ab3-8730-dc1c8bacfb09\",\"PhotonRegion\":\"eu\",\"Hash\":null,\"ProfileInfo\":{\"Id\":\"e2566026-86b9-4151-a337-102751fb0f81\",\"ContentUrl\":\"https:\/\/irl-sec-theviewer-stage-prod.s3-accelerate.amazonaws.com\/Tyler Napolitano\/\",\"Logo\":null,\"SplashScreen\":null,\"SplashScreenPortrait\":null,\"LandingPano\":null,\"Warp\":null,\"Warp2\":null,\"FloorplanSpot\":null,\"InfoSpot\":null,\"Watermark\":null,\"ImageSpot\":null,\"VideoSpot\":null,\"FovMin\":\"90\",\"FovMax\":\"90\",\"Fov\":\"90\",\"Zoom\":false,\"Autorotate\":false,\"HeatmapActivated\":null,\"AnalyticsNativeActivated\":null,\"AnalyticsWebActivated\":null,\"SharedExpPerUser\":false,\"AllowVR\":false,\"SidePanel\":false,\"NavigatorAutoCenter\":false,\"TransitionAnimation\":\"BLEND(1, easeInCubic)\",\"InfoSpotWidth\":null,\"AutorotateDelay\":12,\"KeybRotateSpeed\":null,\"LikesActivated\":null,\"GeneralSpaceSettings\":{\"SortType\":null},\"Trial\":false},\"UserStatus\":\"ACTIVE\",\"PublicId\":\"2c398821-857c-4ab3-8730-dc1c8bacfb09\",\"Email\":\"napolitano.tyler@gmail.com\",\"Organization\":false,\"MainOrganization\":{\"Code\":\"napolitano.tyler@gmail.com\",\"Name\":\"napolitano.tyler@gmail.com\",\"SpaceId\":\"2c398821-857c-4ab3-8730-dc1c8bacfb09\"},\"AllUserOrganizations\":null,\"UserFullName\":\"Tyler Napolitano\",\"Trial\":false},\"ShareableType\":\"PROJECT\"}'; theViewerParams.isSharedExperienceAvailable = embededObj.options.isSharedExperienceAvailable; theViewerParams.isFullScreenAvailable = embededObj.options.isFullScreenAvailable; theViewerParams.isVrModeAvailable = embededObj.options.isVrModeAvailable; if (embededObj.options.isShareNativeAvailable) { theViewerParams.SpaceId = '2c398821-857c-4ab3-8730-dc1c8bacfb09'; } if (embededObj.parentDiv.id === "") { embededObj.parentDiv.id = embededObj.galleryId; } var krpanoViewerObj = new embededObj.krpanoViewer(embededObj.parentDiv.id, 'krpano-' + utils.generateId(), embededObj.options); var krpanoViewerProxyObj = new embededObj.theViewerProxy(krpanoViewerObj); registerProxy(krpanoViewerObj, krpanoViewerProxyObj); share.runShare(theViewerParams, krpanoViewerObj, krpanoViewerProxyObj); embededObj.appendGtmIframe(); socialCounters.increaseViewCount(embededObj.galleryId, embededObj.getCurrentScript()); }); }); } function registerProxy(krpanoViewer, theVProxy) { if (!window.theViewerProxy) { var map = {}; theVProxy.krpanoViewer = krpanoViewer; map[krpanoViewer.krpanoId] = theVProxy; window.theViewerProxy = { map : map, get : function(id) { return function(mp) { thev = mp[id].krpanoViewer; return mp[id]; }(map); }, set : function(key, value) { this.map[key] = value; } } } else { theVProxy.krpanoViewer = krpanoViewer; window.theViewerProxy.set(krpanoViewer.krpanoId, theVProxy); } } window.fireEventIfConsentGiven = function (eventType, eventData, callback){ if(window.theViewer && window.theViewer.event && window.theViewer.event.fireEvent){ window.theViewer.event.fireEvent(eventType, eventData, callback); } if (typeof callback !== 'undefined'){ callback(); } } window.initDeferredViewerAnalytics = function(callback){ let eventRequireScript = document.createElement('script'); eventRequireScript.id = "theViewer-analytics"; eventRequireScript.async = true; eventRequireScript.src = embededObj.getCurrentScript() + 'html/theViewer/script/req/eventRequiresDeferred.js?buildTimestamp=' + Date.now(); document.head.appendChild(eventRequireScript); if (typeof callback !== 'undefined'){ callback(); } } window.initDeferredViewerAnalytics = function(callback){ let eventRequireScript = document.createElement('script'); eventRequireScript.id = "theViewer-analytics"; eventRequireScript.async = true; eventRequireScript.src = embededObj.getCurrentScript() + 'html/theViewer/script/req/eventRequiresDeferred.js?buildTimestamp=' + Date.now(); document.head.appendChild(eventRequireScript); if (typeof callback !== 'undefined'){ callback(); } } EmbeddedVR.init.prototype = EmbeddedVR.prototype; embededObj = EmbeddedVR(); embededObj .resolveCurrentScriptUrl(); })();