1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;a(this,t),this.Modernizr=void 0,this.Modernizr=new u(o);var i,s=p(p({},n),{},{contentPathPrefix:n.contentPathPrefix||"https://rowilab-models.s3.amazonaws.com/orders/",browser:this.Modernizr.browser,isSupported:this.Modernizr.isSupported,unsupportedMessage:this.Modernizr.unsupportedMessage,isEmbedded:window.self!==window.top,isNoStartHelp:!0,preserveDrawingBuffer:n.preserveDrawingBuffer||!1,disableSupersampling:n.disableSupersampling||!1,editorMode:n.editorMode||!1,scale:n.scale||1,dangerouslyRunUserScripts:n.dangerouslyRunUserScripts||!1,debug:p({ShowFPS:!0,ShowCollisionMesh:!1,ShowCursorIntersection:!1,ShowDebugPanorama:!1,ShowActivePanorama:!1,RenderTilePriorities:!1,RenderTilePosition:!1,DisableHalfSizeHack:!1,PostFX:0,EnableSupersampling:!1},r),config:p({},e),components:n.components||[]});return i=n.tour,s.tour=i,s}),d=function(){return c(function t(n){a(this,t),this.props=void 0,this.props=n},[{key:"fonts",value:function(){var t=this.props.ENV.scriptPath;return"@font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n src:\n local('Montserrat Regular'),\n local('Montserrat-Regular'),\n url(".concat(t,"montserrat-regular.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 500;\n src:\n local('Montserrat Medium'),\n local('Montserrat-Medium'),\n url(").concat(t,"montserrat-medium.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 600;\n src:\n local('Montserrat SemiBold'),\n local('Montserrat-SemiBold'),\n url(").concat(t,"montserrat-semibold.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n @font-face {\n font-family: 'Karla';\n font-style: normal;\n font-weight: 400;\n src:\n local('Karla'),\n local('Karla-Regular'),\n url(").concat(t,"karla-regular.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n @font-face {\n font-family: 'Karla';\n font-style: normal;\n font-weight: 600;\n src:\n local('Karla Bold'),\n local('Karla-Bold'),\n url(").concat(t,"karla-bold.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;\n }\n ")}},{key:"splash",value:function(){var t=this.props.ENV.prefix;return".".concat(t,"-splash {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n -webkit-transition: opacity 0.6s, visibility 0.6s;\n -o-transition: opacity 0.6s, visibility 0.6s;\n transition: opacity 0.6s, visibility 0.6s;\n background: rgba(208, 208, 210, 1) 50%;\n background-size: cover;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n z-index: 1;\n }\n .").concat(t,"-splash.is-visible {\n opacity: 1;\n visibility: visible;\n }\n\n .").concat(t,"-play {\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 100;\n background-color: rgba(64, 64, 64, 0.5);\n opacity: 0;\n visibility: hidden;\n }\n .").concat(t,"-play.is-visible {\n opacity: 1;\n visibility: visible;\n cursor: pointer;\n }\n\n @-webkit-keyframes ").concat(t,"-spin {\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes ").concat(t,"-spin {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .").concat(t,"-splash .spinner-wrapper {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 40px;\n height: 40px;\n -webkit-transform: -webkit-translate(-50%, -50%);\n -moz-transform: -moz-translate(-50%, -50%);\n transform: translate(-50%, -50%);\n }\n .").concat(t,"-splash .spinner {\n width: 40px;\n height: 40px;\n display: block;\n border-radius: 50px;\n z-index: 100;\n -webkit-animation: ").concat(t,"-spin 1.5s steps(16) infinite;\n -moz-animation: ").concat(t,"-spin 1.5s steps(16) infinite;\n animation: ").concat(t,"-spin 1.5s steps(16) infinite;\n position: absolute;\n left: 0;\n top: 0;\n -webkit-transform-origin: 50%;\n -moz-transform-origin: 50%;\n transform-origin: 50%;\n }\n .").concat(t,"-splash .spinner > span {\n position: absolute;\n display: block;\n width: 2px;\n height: 15%;\n left: 50%;\n margin-left: -1px;\n border-radius: 2px;\n -webkit-transform-origin: 50% 333.33%;\n -moz-transform-origin: 50% 333.33%;\n transform-origin: 50% 333.33%;\n background: rgba(255, 255, 255, 1);\n }\n\n\n ").concat(function(t){for(var n="",r=1;r<16;r++){var e=r+1,o=Math.floor(255/16*r),i=.5+.5/16*r;n+="\n .".concat(t,"-splash .spinner span:nth-of-type(").concat(e,") {\n -webkit-transform: rotateZ(").concat(22.5*r,"deg);\n -moz-transform: rotateZ(").concat(22.5*r,"deg);\n transform: rotateZ(").concat(22.5*r,"deg);\n background: rgba(").concat(o,", ").concat(o,", ").concat(o,", ").concat(i,");\n }\n ")}return n}(t),"\n ")}},{key:"error",value:function(){var t=this.props.ENV.prefix;return".".concat(t,"-error {\n position: absolute;\n top: 0;\n left: 0;\n background: rgba(50,50,50,0.4);\n height: 100%;\n width: 100%;\n text-align: center;\n z-index: 10;\n -webkit-transition: opacity 0.8s, visibility 0.8s;\n -o-transition: opacity 0.8s, visibility 0.8s;\n transition: opacity 0.8s, visibility 0.8s;\n opacity: 0;\n visibility: hidden;\n pointer-events: auto;\n border-collapse: collapse;\n }\n .").concat(t,"-error.is-visible {\n z-index: 11;\n opacity: 1;\n visibility: visible;\n }\n .").concat(t,"-error__constraint {\n position: relative;\n display: block;\n width: 100%;\n margin: 0 auto;\n max-width: 720px;\n min-height: 200px;\n max-height: 100%;\n color: #fff;\n text-align: left;\n background: rgba(20,20,20,0.8);\n padding: 50px;\n border-radius: 3px;\n overflow: hidden;\n }\n .").concat(t,"-error__icon {\n position: absolute;\n width: 288px;\n height: 254px;\n right: -30px;\n top: -50px;\n stroke: none;\n stroke-width: 1;\n fill: none;\n fill-rule: evenodd;\n opacity: 0.6;\n }\n .").concat(t,"-error__title {\n font-size: 32px;\n font-weight: 400;\n position: relative;\n z-index: 2;\n }\n .").concat(t,"-error__description {\n font-size: 17px;\n line-height: 24px;\n padding-right: 220px;\n margin-top: 30px;\n position: relative;\n z-index: 2;\n }\n .").concat(t,"-error__description p {\n margin: 5px 0 0;\n }\n .").concat(t,"-error a {\n color: #fff;\n }\n .").concat(t,"-error__browser {\n fill: none;\n stroke-width: 1.4;\n stroke: #fff;\n color: #fff;\n text-decoration: none;\n text-align: center;\n padding: 20px 0 12px 0;\n border: 1px solid rgba(255,255,255,0.3);\n -webkit-transition: background 0.2s, stroke 0.2s;\n -o-transition: background 0.2s, stroke 0.2s;\n transition: background 0.2s, stroke 0.2s;\n display: inline-block;\n vertical-align: top;\n }\n .").concat(t,"-error__browser-list_count3 > .").concat(t,"-error__browser {\n width: 33.3%\n }\n .").concat(t,"-error__browser-list_count4 > .").concat(t,"-error__browser {\n width: 25%\n }\n .").concat(t,"-error__browser-list_count5 > .").concat(t,"-error__browser {\n width: 20%\n }\n .").concat(t,"-error__browser:hover {\n background: rgba(0,0,0,0.4);\n }\n .").concat(t,"-error__browser + .").concat(t,"-error__browser {\n border-left: none;\n margin-left: -1px;\n }\n .").concat(t,"-error__browser:first-child {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n .").concat(t,"-error__browser:last-child {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n }\n .").concat(t,"-error__browser-icon {\n display: block;\n }\n .").concat(t,"-error__browser-icon svg {\n width: 50px;\n height: 50px;\n fill-rule: evenodd;\n }\n .").concat(t,"-error__browser-title {\n display: block;\n font-size: 15px;\n }\n .").concat(t,"-error__browser-list {\n margin: 30px -220px 20px 0;\n }\n\n @media (max-width: 760px) {\n .").concat(t,"-error {\n padding: 0;\n background: rgba(20,20,20,0.8);\n }\n .").concat(t,"-error__constraint {\n background: none;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n padding: 0 15px;\n }\n .").concat(t,"-error__icon {\n display: none;\n }\n .").concat(t,"-error__description {\n padding-right: 170px;\n }\n .").concat(t,"-error__title {\n margin-bottom: 18px;\n }\n .").concat(t,"-error__browser-list {\n margin-right: -170px;\n }\n\n }\n\n @media (max-width: 520px) {\n .").concat(t,"-error__description {\n padding-right: 0;\n }\n .").concat(t,"-error__browser-list {\n margin-right: 0;\n }\n .").concat(t,"-error__browser,\n .").concat(t,"-error__browser:first-child,\n .").concat(t,"-error__browser:last-child,\n .").concat(t,"-error__browser + .").concat(t,"-error__browser {\n border: 1px solid rgba(255,255,255,0.3);\n border-radius: 0;\n align-items: center;\n padding: 10px 15px 2px;\n position: relative;\n width: 100% !important;\n display: block;\n }\n .").concat(t,"-error__browser:after {\n position: absolute;\n content: '';\n width: 10px;\n height: 10px;\n border-right: 1px solid;\n border-bottom: 1px solid;\n transform: rotate(-45deg);\n right: 20px;\n top: 50%;\n margin-top: -5px;\n }\n .").concat(t,"-error__browser + .").concat(t,"-error__browser {\n border-top: none;\n margin-left: 0;\n margin-top: -1px;\n }\n .").concat(t,"-error__browser:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n }\n .").concat(t,"-error__browser:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n .").concat(t,"-error__browser-title {\n margin-left: 10px;\n width: 100px;\n margin-right: -20px;\n text-align: left;\n padding-bottom: 5px;\n padding-left: 36px;\n line-height: 40px;\n }\n .").concat(t,"-error__browser-icon {\n position: absolute;\n left: 8px;\n top: 8px;\n }\n .").concat(t,"-error__browser-icon svg {\n width: 42px;\n height: 42px;\n }\n }\n ")}},{key:"general",value:function(){var t=this.props.ENV.prefix;return"\n .".concat(t,"-pre-fonts {\n opacity: 0.01;\n position: absolute;\n font-size: 1px;\n }\n .").concat(t,"-font-montserrat {\n font-family: 'Montserrat', sans-serif;\n }\n .").concat(t,"-font-karla {\n font-size: 113%;\n font-family: 'Karla', 'Montserrat', 'Helvetica', 'Arial', sans-serif;\n }\n .").concat(t,".is-mobile .").concat(t,"-font-karla {\n font-size: 118%;\n }\n .").concat(t,", .").concat(t," * {\n box-sizing: border-box !important;\n }\n .").concat(t," {\n background: #949EA3;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-text-size-adjust: 100%;\n -webkit-user-select: none;\n user-select: none;\n font-family: 'Montserrat', Roboto, Helvetica, sans-serif;\n }\n .").concat(t,".is-only-ui {\n background: url(core-background.jpg);\n background-size: cover;\n }\n .").concat(t,"-wrapper {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n }\n\n ")}},{key:"together",value:function(){return"\n ".concat(this.general(),"\n ").concat(this.splash(),"\n ").concat(this.error(),"\n ")}},{key:"insert",value:function(){var t=this.props.ENV.prefix,n="".concat(t,"-styles");if(!document.getElementById(n)){var r=document.createElement("style");r.id=n,r.innerHTML=this.together(),document.head.appendChild(r)}}},{key:"insertFonts",value:function(){var t=this.props.ENV.prefix,n="".concat(t,"-styles-font");if(!document.getElementById(n)){var r=document.createElement("style");r.id=n,r.innerHTML=this.fonts(),document.head.appendChild(r)}}}])}(),h=function(){return c(function t(n){a(this,t),this.props=void 0,this.width=void 0,this.height=void 0,this.props=n},[{key:"before",value:function(){var t=this.props.ENV.prefix;return'')}},{key:"after",value:function(){return"
"}},{key:"error",value:function(){var t=this.props.ENV,n=t.prefix,r=t.id;return'\n
\n
\n \n \n \n \n \n \n \n \n \n
\n
\n
\n
')}},{key:"preFonts",value:function(){var t=this.props.ENV.prefix;return'\n Montserrat 400 \n Montserrat 500 \n Montserrat 600 \n Karla 400 \n Karla 600 \n
')}},{key:"spinnerElements",value:function(){for(var t="",n=0;n<16;n++)t+=" ";return t}},{key:"splash",value:function(){var t=this.props.ENV,n=t.prefix,r=t.id;return'\n
\n
\n ').concat(this.spinnerElements(),"\n
\n
\n
")}},{key:"play",value:function(){var t=this.props.ENV,n=t.prefix,r=t.id;return'')}},{key:"root",value:function(){var t=this.props.ENV,n=t.prefix,r=t.id;return'
')}},{key:"layout",value:function(){return"\n ".concat(this.before(),"\n ").concat(this.error(),"\n ").concat(this.preFonts(),"\n ").concat(this.splash(),"\n ").concat(this.play(),"\n ").concat(this.root(),"\n ").concat(this.after(),"\n ")}},{key:"handleResize",value:function(){var t=this.props.ENV.element,n=t.offsetWidth,r=t.offsetHeight;this.width===n&&this.height===r||(this.width=n,this.height=r,t.dispatchEvent(new CustomEvent("playerResize"))),window.requestAnimationFrame(this.handleResize.bind(this))}},{key:"insert",value:function(){var t=this.props.ENV,n=t.prefix,r=t.element;r.innerHTML=this.layout();var e=r.className;r.className=e.length>0?"".concat(e," ").concat(n):n,this.handleResize()}}])}(),v=function(){return c(function t(n){a(this,t),this.props=void 0,this.props=n},[{key:"show",value:function(t){var n=this.props.ENV,r=n.prefix,e=n.id;t=t||{};var o={scope:document.getElementById("".concat(r,"-").concat(e,"-error")),title:document.getElementById("".concat(r,"-").concat(e,"-error-title")),desc:document.getElementById("".concat(r,"-").concat(e,"-error-description"))};function i(t){var n="",e={firefox:{title:"Firefox",icon:' ',href:"http://mozilla.org/firefox/new/"},safari:{title:"Safari",icon:' ',href:"https://www.apple.com/safari/"},chrome:{title:"Chrome",icon:' ',href:"https://google.com/chrome"},opera:{title:"Opera",icon:' ',href:"https://opera.com/"},edge:{title:"Edge",icon:' ',href:"https://www.microsoft.com/microsoft-edge"}};return t.forEach(function(t){var o=e[t];n+='\n ').concat(o.icon,' \n ').concat(o.title," \n ")}),'').concat(n,"
")}switch(t.type){case"ios_browser":o.title.innerHTML="iOS 10 or higher is required",o.desc.innerHTML="Please go to Settings → General on your device and update your iOS.
";break;case"mac_firefox":o.title.innerHTML="Your Firefox is too old",o.desc.innerHTML="Please update or use another browser:
",o.desc.innerHTML+=i(["firefox","safari","chrome","opera"]);break;case"mac_browser":o.title.innerHTML="Your browser is not supported",o.desc.innerHTML="Please use one of the following:
",o.desc.innerHTML+=i(["safari","chrome","opera","firefox"]);break;case"win_browser":o.title.innerHTML="Your browser is not supported",o.desc.innerHTML="Please use one of the following:
",o.desc.innerHTML+=i(["chrome","opera","firefox","edge"]);break;case"win_ie":o.title.innerHTML="Your Internet Explorer is too old",o.desc.innerHTML="Please update or use another browser:
",o.desc.innerHTML+=i(["edge","chrome","opera","firefox"]);break;case"webgl_error":o.title.innerHTML="WebGL is not working",o.desc.innerHTML='Please try to restart your browser or see http://get.webgl.org for other instructions
';break;default:o.title.innerHTML=t.title,t.desc?o.desc.innerHTML="".concat(t.desc,"
"):o.desc.parentNode.removeChild(o.desc)}o.scope.className+=" is-visible"}}])}(),g=(r(38781),function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)});function b(){return g()+g()+"-"+g()+"-"+g()+"-"+g()+"-"+g()+g()+g()}var m=function(){return c(function t(n){var r=this;a(this,t),this.props=void 0,this.stop=function(){var t=r.props.ENV,n=t.prefix,e=t.id,o=document.getElementById("".concat(n,"-").concat(e,"-splash")),i=document.getElementById("".concat(n,"-").concat(e,"-spinner"));o&&i&&o.removeChild(i)},this.props=n,this.show=this.show.bind(this)},[{key:"show",value:function(t,n){var r=this.props.ENV,e=r.tour,o=r.prefix,i=r.id,a=r.contentPathPrefix,s=r.scriptPath,c=r.splashPath,u=document.getElementById("".concat(o,"-").concat(i,"-splash")),l=[],p=e+"/preview.jpg?_v="+b(),f=s+"splash-default.jpg?_v="+b(),d="".concat(e,"/").concat(c,"?_v=").concat(b());c&&l.push(a+d),l.push(a+p),l.push(f);var h=0;!function n(r,e,o){var i=new Image;i.onload=function(){u&&(u.style.backgroundImage="url("+r+")",u.style.opacity="1"),e()},i.onerror=function(){h1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(a(this,t),this.readyCallbacks=void 0,this.ENV=void 0,this.Application=void 0,this.Errors=void 0,this.Splash=void 0,this.Layout=void 0,this.Styles=void 0,!((r=n)instanceof Element||r instanceof HTMLDocument))throw new Error("First argument for GCVPlayer(element, options) must be DOM element");if("object"!==e(o))throw new Error("Second argument for GCVPlayer(element, options) must be object");this.ready=this.ready.bind(this),this.Api=this.Api.bind(this),this.Application=null,this.readyCallbacks=[],this.ENV=w(w({},new f(o,i,s,n)),{},{scriptPath:this.getScriptsPath(),element:n,prefix:"gcv-voh",id:this.getRandomID()}),n.addEventListener("contextlost",this.onContextFail.bind(this)),n.addEventListener("tourNotFound",this.onPreviewFail.bind(this)),this.init()},[{key:"setPolyfills",value:function(){if("function"==typeof window.CustomEvent)return!1;var t=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};t.prototype=window.Event.prototype,window.CustomEvent=t}},{key:"getRandomID",value:function(){return String.fromCharCode(65+Math.floor(26*Math.random()))+Date.now()}},{key:"getScriptsPath",value:function(){var t,n="player.js",r=document.getElementsByTagName("script");return[].slice.call(r).forEach(function(r){r.src.indexOf(n)>-1&&(t=r.src.replace(n,""))}),t}},{key:"insertJSDebugger",value:function(){var t=this.ENV.prefix,n="".concat(t,"-debugger");document.getElementById(n)}},{key:"insertApplication",value:function(t){var n=this.ENV,r=n.prefix,e=n.scriptPath,o="".concat(r,"-script");if(document.getElementById(o))return t();var i=document.createElement("script");i.id=o,i.onload=t,i.src="".concat(e,"app.js"),document.body.appendChild(i)}},{key:"startViewer",value:function(){if(this.ENV.isSupported)if(this.ENV.manualStart){var t=this.ENV,n=t.prefix,r=t.id,e="".concat(n,"-").concat(r,"-play"),o=document.getElementById(e);o.classList.add("is-visible"),setTimeout(function(){o.style.transition="opacity 0.6s, visibility 0.6s"},0),o.onclick=function(){o.classList.remove("is-visible"),o.onclick=void 0,this.insertCode()}.bind(this)}else this.insertCode()}},{key:"insertCode",value:function(){var t=this;this.insertJSDebugger(),this.insertApplication(function(){t.Application=new window.GCVApplication({ENV:t.ENV,invokeReadyCallbacks:function(){return t.invokeReadyCallbacks()},stopSpinner:t.Splash.stop})})}},{key:"onPreviewFail",value:function(){throw this.Errors.show({title:"Some error occurred"}),this.Splash.stop(),new Error("Tour not found!")}},{key:"onContextFail",value:function(){this.Errors.show({title:"WebGL Context Lost",desc:"Please, restart the tour"})}},{key:"init",value:function(){var t=this.ENV;this.setPolyfills(),this.Errors=new v({ENV:t}),this.Splash=new m({ENV:t}),this.Layout=new h({ENV:t}),this.Styles=new d({ENV:t}),this.Styles.insert(),this.Layout.insert(),this.startViewer();var n=this.Styles.insertFonts.bind(this.Styles);if(this.Splash.show(n,n),!t.isSupported)throw this.Errors.show({type:t.unsupportedMessage}),this.Splash.stop(),new Error("Unsupported!")}},{key:"invokeReadyCallbacks",value:function(){var t=this;this.readyCallbacks.forEach(function(n,r){n(),delete t.readyCallbacks[r]})}},{key:"ready",value:function(t){this.readyCallbacks.push(t),this.Application&&this.Application.isReady&&this.invokeReadyCallbacks()}},{key:"Api",value:function(){if(!this.Application||!this.Application.isReady)throw new Error("[GCV]: Player isn't ready to perform this action.\n Please, use Player.invokeApi inside the Player.ready function");return this.Application.Api}}])}();window.GCVPlayer=x})();