@r2u/javascript-ar-sdk 6.22.4 → 6.22.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ar.bundle.js CHANGED
@@ -859,4 +859,4 @@
859
859
  text-align: center;
860
860
  color: #3d71ba;
861
861
  }
862
- `;var we=()=>{const{closeModal:e}=(0,o.useContext)(g),{t:t}=(0,v.$)();return o.createElement(C,{color:"rgba(0, 0, 0, 0.3)"},o.createElement(xe,null,o.createElement("div",{className:"balloon"},o.createElement("div",{className:"info"},o.createElement("h2",null,t("fallback.social.title")),o.createElement("p",null,t("fallback.social.text")),o.createElement("img",{src:"https://sdk.r2u.io/assets/instruction-open-safari.png",alt:""})),o.createElement("button",{type:"button",onClick:e},t("fallback.social.button")))))};var Ee=({openerElement:e,openerEvent:t})=>o.createElement(b,{openerElement:e,openerEvent:t},o.createElement(we,null)),ye=n(2151);null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported&&self.XRSession.prototype.requestHitTestSource,self.ResizeObserver,self.IntersectionObserver,(()=>{const e=navigator.userAgent||navigator.vendor||self.opera;let t=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)})(),/\bCrOS\b/.test(navigator.userAgent);const ke=/android/i.test(navigator.userAgent),Oe=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;(()=>{const e=document.createElement("a");Boolean(e.relList&&e.relList.supports&&e.relList.supports("ar"))})(),/Safari\//.test(navigator.userAgent),/firefox/i.test(navigator.userAgent),/OculusBrowser/.test(navigator.userAgent),Oe&&/CriOS\//.test(navigator.userAgent);var Ne=function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function l(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((o=o.apply(e,t||[])).next())}))},je=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const Se="#no-ar-fallback",Ce=e=>{var{container:t}=e,n=je(e,["container"]);const a="r2u-feedback-open",i=document.createElement("div");return i.className="feedback",t.appendChild(i),r.render(o.createElement(ve,Object.assign({openerElement:i,openerEvent:a},n)),i),{open:()=>{i.dispatchEvent(new Event(a))},render:()=>{}}};function Le({element:e,event:t="click"}){return Ne(this,void 0,void 0,(function*(){e.dispatchEvent(new Event(t))}))}var Pe={attach:function({sku:e,price:t,element:n,callToAction:u,event:f="click",showInstructions:h="once",showFeedback:g=!0,fallbackOptions:b={alertMessage:"Sentimos muito, mas infelizmente seu dispositivo não é compatível com a visualização em Realidade Aumentada"}}){return Ne(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));const{activateWebXR:v,activateAR:x,WebXREvents:w}=yield a,E=()=>Ne(this,void 0,void 0,(function*(){const e=new URLSearchParams(window.location.search);if(e.has("r2u_ar_mode"))return"webxr"===e.get("r2u_ar_mode");const t=yield p.fm();i.Z.growthbook=new ye.Z({user:{id:t},overrides:i.Z.customer.experiments.overrides});const n="webxr-vs-sceneviewer-v3",{value:o}=i.Z.growthbook.run({key:n,variations:["sceneviewer-v3","webxr-v3"]});return p.KN(n),p.fQ(o),"webxr-v3"===o})),{glb:y,usdz:k,name:O,placement:N,sound:j,resize:S,pdpUrl:C}=yield(0,m.Z)(e),L=S?"resizable":"fixed",[P,z]="pt"===i.Z.customer.language?["pt-BR","BRL"]:["en-US","USD"],A=u?Object.assign(Object.assign({},u),{onClick:()=>{u.onClick(),document.dispatchEvent(new Event("r2u-webxr-close")),p.ar.onClick()}}):void 0,M={glb:y,usdz:k,price:t,placement:N,scale:L,sound:j,callToAction:A,pdpUrl:C,title:O,mode:"ar_preferred"},I=Boolean(i.Z.customer.waterMarkPosition),T=()=>{const e=c("feedback");return g&&!e},W={model:{name:O,description:t?new Intl.NumberFormat(P,{style:"currency",currency:z}).format(Number(t)):"",glb:y,placement:N,resizable:S,url:C,showInstructions:(()=>{switch(h){case"always":return{translate:!0,rotate:!0};case"never":return{translate:!1,rotate:!1};default:const e=l("translate"),t=l("rotate");return{translate:!e,rotate:!t}}})()},beforeClose:e=>{const{open:t}=Ce({container:e,onLike:()=>{p.J1.onLike(),p.XH.onLike()},onDislike:()=>{p.J1.onDislike(),p.XH.onDislike()},onClose:()=>document.dispatchEvent(new Event("r2u-webxr-close")),onOpen:()=>d("feedback")});T()?t():document.dispatchEvent(new Event("r2u-webxr-close"))},callToAction:A,language:i.Z.customer.language};p.J1.componentDidMount();const{open:H,render:X}=(({glb:e,fallbackOptions:t})=>{const n=document.createElement("div"),a="r2u-open-fallback";document.body.appendChild(n);const i=e=>{r.render(o.createElement(R,Object.assign({openerElement:n,openerEvent:a,fallbackOptions:t},e)),n)};return i({glb:e}),{open:()=>{n.dispatchEvent(new Event(a))},render:i}})({fallbackOptions:b,glb:M.glb}),{open:Z,render:$}=(e=>{var{hasWaterMark:t,onOpen:n,activateAR:a,sku:l}=e,s=je(e,["hasWaterMark","onOpen","activateAR","sku"]);const c=document.createElement("div"),d="r2u-open-instructions";document.body.appendChild(c);const m=e=>{r.render(o.createElement(de,Object.assign({openerElement:c,openerEvent:d,onOpen:n,hasWaterMark:t,activateAR:a,customerId:i.Z.customer._id,sku:l},e)),c)};return m(s),{open:()=>{c.dispatchEvent(new Event(d))},render:m}})(Object.assign({hasWaterMark:I,sku:e,activateAR:x,onOpen:()=>d("instructions")},M)),{open:_}=Ce({container:document.body.appendChild(document.createElement("div")),onLike:()=>p.J1.onLike(),onDislike:()=>p.J1.onDislike(),onClose:()=>{},onOpen:()=>d("feedback")}),{open:U}=(()=>{const e=document.createElement("div"),t="r2u-open-social-fallback";return document.body.appendChild(e),r.render(o.createElement(Ee,{openerElement:e,openerEvent:t}),e),{open:()=>{e.dispatchEvent(new Event(t))},render:()=>{}}})(),F=e=>Ne(this,void 0,void 0,(function*(){const t=yield(0,m.Z)(e);M.glb=t.glb,M.usdz=t.usdz,M.placement=t.placement,M.sound=t.sound,M.scale=t.resize?"resizable":"fixed",M.title=t.name,W.model.glb=t.glb,W.model.name=t.name,W.model.placement=t.placement,W.model.url=t.pdpUrl,W.model.resizable=t.resize,$(M),X(M)})),J=()=>Ne(this,void 0,void 0,(function*(){if(Oe&&/instagram|FBAN|FBAV|LinkedInApp/i.test(navigator.userAgent))return void U();var e;ke&&"wall"!==N&&(yield E())?(e=w,p.XH.setSession(),document.addEventListener(e.r2uWebxrSessionStart,p.XH.onSessionStart,{once:!0}),document.addEventListener(e.r2uWebxrSessionEnd,p.XH.onSessionEnd,{once:!0}),document.addEventListener(e.r2uWebxrCompatible,(()=>p.XH.setCompatible(!0)),{once:!0}),document.addEventListener(e.r2uWebxrNotCompatible,(()=>p.XH.setCompatible(!1)),{once:!0}),document.addEventListener(e.r2uWebxrPlaneMapped,p.XH.setPlaneMapped,{once:!0}),document.addEventListener(e.r2uWebxrObjectPlaced,p.XH.setObjectPlaced,{once:!0}),document.addEventListener(e.r2uWebxrShowTranslatingInstructions,(()=>{p.XH.setTranslateInstructions(),s("translate")}),{once:!0}),document.addEventListener(e.r2uWebxrShowRotatingInstructions,(()=>{p.XH.setRotateInstructions(),s("rotate")}),{once:!0}),document.addEventListener(e.r2uWebxrTranslating,(()=>{p.XH.setFirstTranslation(),s("translate")}),{once:!0}),document.addEventListener(e.r2uWebxrRotating,(()=>{p.XH.setFirstRotation(),s("rotate")}),{once:!0}),document.addEventListener(e.r2uWebxrReset,p.XH.setReset,{once:!0}),document.addEventListener(e.r2uWebxrFallbackToSceneviewer,p.XH.onSceneViewerFallback,{once:!0}),window.addEventListener("hashchange",(()=>{window.location.hash===Se&&p.XH.onFallback()}),{once:!0}),document.addEventListener(e.r2uWebxrShare,p.XH.onShare),document.addEventListener(e.r2uWebxrExit,p.XH.onExit),document.addEventListener(e.r2uWebxrCallToAction,p.XH.onCallToAction),document.addEventListener(e.r2uWebxrTranslating,p.XH.onTranslation),document.addEventListener(e.r2uWebxrRotating,p.XH.onRotation),v(W)):(()=>{switch(h){case"always":return!0;case"never":return!1;default:return!c("instructions")}})()?Z():x(M),yield p.J1.onClick();const t=(new Date).getTime(),n=()=>{if(document.hidden)return;const e=(new Date).getTime();p.J1.onSessionTimeCollect(e-t),T()&&_(),document.removeEventListener("visibilitychange",n)},o=()=>{const e=(new Date).getTime();p.J1.onSessionTimeCollect(e-t),document.removeEventListener("r2u-webxr-close",o),document.removeEventListener("visibilitychange",n)};document.addEventListener("r2u-webxr-close",o),document.addEventListener("visibilitychange",n)}));n.addEventListener(f,J);const D=new URL(window.location.href),B="true"===D.searchParams.get("r2u_redirect"),V=D.searchParams.get("r2u_sku");return B&&!i.Z.hasAutoOpenedAR&&(i.Z.hasAutoOpenedAR=!0,V&&(yield F(V)),Le({element:n,event:f})),window.addEventListener("hashchange",(()=>{window.location.hash===Se&&(p.J1.onFallback(),n.removeEventListener(f,J),n.addEventListener(f,H),Le({element:n,event:f}))}),{once:!0}),{setSku:F}}))},open:Le,getLink:function(e){return Ne(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));const t=i.Z.customer._id,n=yield(0,u.U2)(`/sdk-ar/openar-link?customerId=${t}&productSku=${e}`);return Promise.resolve(n)}))}}}}]);
862
+ `;var we=()=>{const{closeModal:e}=(0,o.useContext)(g),{t:t}=(0,v.$)();return o.createElement(C,{color:"rgba(0, 0, 0, 0.3)"},o.createElement(xe,null,o.createElement("div",{className:"balloon"},o.createElement("div",{className:"info"},o.createElement("h2",null,t("fallback.social.title")),o.createElement("p",null,t("fallback.social.text")),o.createElement("img",{src:"https://sdk.r2u.io/assets/instruction-open-safari.png",alt:""})),o.createElement("button",{type:"button",onClick:e},t("fallback.social.button")))))};var Ee=({openerElement:e,openerEvent:t})=>o.createElement(b,{openerElement:e,openerEvent:t},o.createElement(we,null)),ye=n(2151);null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported&&self.XRSession.prototype.requestHitTestSource,self.ResizeObserver,self.IntersectionObserver,(()=>{const e=navigator.userAgent||navigator.vendor||self.opera;let t=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)})(),/\bCrOS\b/.test(navigator.userAgent);const ke=/android/i.test(navigator.userAgent),Oe=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;(()=>{const e=document.createElement("a");Boolean(e.relList&&e.relList.supports&&e.relList.supports("ar"))})(),/Safari\//.test(navigator.userAgent),/firefox/i.test(navigator.userAgent),/OculusBrowser/.test(navigator.userAgent),Oe&&/CriOS\//.test(navigator.userAgent);var Ne=function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function l(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((o=o.apply(e,t||[])).next())}))},je=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const Se="#no-ar-fallback",Ce=e=>{var{container:t}=e,n=je(e,["container"]);const a="r2u-feedback-open",i=document.createElement("div");return i.className="feedback",t.appendChild(i),r.render(o.createElement(ve,Object.assign({openerElement:i,openerEvent:a},n)),i),{open:()=>{i.dispatchEvent(new Event(a))},render:()=>{}}};function Le({element:e,event:t="click"}){return Ne(this,void 0,void 0,(function*(){e.dispatchEvent(new Event(t))}))}var Pe={attach:function({sku:e,price:t,element:n,callToAction:u,event:f="click",showInstructions:h="once",showFeedback:g=!0,fallbackOptions:b={alertMessage:"Sentimos muito, mas infelizmente seu dispositivo não é compatível com a visualização em Realidade Aumentada"},resize:v}){return Ne(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));const{activateWebXR:x,activateAR:w,WebXREvents:E}=yield a,y=()=>Ne(this,void 0,void 0,(function*(){const e=new URLSearchParams(window.location.search);if(e.has("r2u_ar_mode"))return"webxr"===e.get("r2u_ar_mode");const t=yield p.fm();i.Z.growthbook=new ye.Z({user:{id:t},overrides:i.Z.customer.experiments.overrides});const n="webxr-vs-sceneviewer-v3",{value:o}=i.Z.growthbook.run({key:n,variations:["sceneviewer-v3","webxr-v3"]});return p.KN(n),p.fQ(o),"webxr-v3"===o})),{glb:k,usdz:O,name:N,placement:j,sound:S,resize:C,pdpUrl:L}=yield(0,m.Z)(e),P=v||C,z=P?"resizable":"fixed",[A,M]="pt"===i.Z.customer.language?["pt-BR","BRL"]:["en-US","USD"],I=u?Object.assign(Object.assign({},u),{onClick:()=>{u.onClick(),document.dispatchEvent(new Event("r2u-webxr-close")),p.ar.onClick()}}):void 0,T={glb:k,usdz:O,price:t,placement:j,scale:z,sound:S,callToAction:I,pdpUrl:L,title:N,mode:"ar_preferred"},W=Boolean(i.Z.customer.waterMarkPosition),H=()=>{const e=c("feedback");return g&&!e},X={model:{name:N,description:t?new Intl.NumberFormat(A,{style:"currency",currency:M}).format(Number(t)):"",glb:k,placement:j,resizable:P,url:L,showInstructions:(()=>{switch(h){case"always":return{translate:!0,rotate:!0};case"never":return{translate:!1,rotate:!1};default:const e=l("translate"),t=l("rotate");return{translate:!e,rotate:!t}}})()},beforeClose:e=>{const{open:t}=Ce({container:e,onLike:()=>{p.J1.onLike(),p.XH.onLike()},onDislike:()=>{p.J1.onDislike(),p.XH.onDislike()},onClose:()=>document.dispatchEvent(new Event("r2u-webxr-close")),onOpen:()=>d("feedback")});H()?t():document.dispatchEvent(new Event("r2u-webxr-close"))},callToAction:I,language:i.Z.customer.language};p.J1.componentDidMount();const{open:Z,render:$}=(({glb:e,fallbackOptions:t})=>{const n=document.createElement("div"),a="r2u-open-fallback";document.body.appendChild(n);const i=e=>{r.render(o.createElement(R,Object.assign({openerElement:n,openerEvent:a,fallbackOptions:t},e)),n)};return i({glb:e}),{open:()=>{n.dispatchEvent(new Event(a))},render:i}})({fallbackOptions:b,glb:T.glb}),{open:_,render:U}=(e=>{var{hasWaterMark:t,onOpen:n,activateAR:a,sku:l}=e,s=je(e,["hasWaterMark","onOpen","activateAR","sku"]);const c=document.createElement("div"),d="r2u-open-instructions";document.body.appendChild(c);const m=e=>{r.render(o.createElement(de,Object.assign({openerElement:c,openerEvent:d,onOpen:n,hasWaterMark:t,activateAR:a,customerId:i.Z.customer._id,sku:l},e)),c)};return m(s),{open:()=>{c.dispatchEvent(new Event(d))},render:m}})(Object.assign({hasWaterMark:W,sku:e,activateAR:w,onOpen:()=>d("instructions")},T)),{open:F}=Ce({container:document.body.appendChild(document.createElement("div")),onLike:()=>p.J1.onLike(),onDislike:()=>p.J1.onDislike(),onClose:()=>{},onOpen:()=>d("feedback")}),{open:J}=(()=>{const e=document.createElement("div"),t="r2u-open-social-fallback";return document.body.appendChild(e),r.render(o.createElement(Ee,{openerElement:e,openerEvent:t}),e),{open:()=>{e.dispatchEvent(new Event(t))},render:()=>{}}})(),D=e=>Ne(this,void 0,void 0,(function*(){const t=yield(0,m.Z)(e);T.glb=t.glb,T.usdz=t.usdz,T.placement=t.placement,T.sound=t.sound,T.scale=t.resize?"resizable":"fixed",T.title=t.name,X.model.glb=t.glb,X.model.name=t.name,X.model.placement=t.placement,X.model.url=t.pdpUrl,X.model.resizable=t.resize,U(T),$(T)})),B=()=>Ne(this,void 0,void 0,(function*(){if(Oe&&/instagram|FBAN|FBAV|LinkedInApp/i.test(navigator.userAgent))return void J();var e;ke&&"wall"!==j&&(yield y())?(e=E,p.XH.setSession(),document.addEventListener(e.r2uWebxrSessionStart,p.XH.onSessionStart,{once:!0}),document.addEventListener(e.r2uWebxrSessionEnd,p.XH.onSessionEnd,{once:!0}),document.addEventListener(e.r2uWebxrCompatible,(()=>p.XH.setCompatible(!0)),{once:!0}),document.addEventListener(e.r2uWebxrNotCompatible,(()=>p.XH.setCompatible(!1)),{once:!0}),document.addEventListener(e.r2uWebxrPlaneMapped,p.XH.setPlaneMapped,{once:!0}),document.addEventListener(e.r2uWebxrObjectPlaced,p.XH.setObjectPlaced,{once:!0}),document.addEventListener(e.r2uWebxrShowTranslatingInstructions,(()=>{p.XH.setTranslateInstructions(),s("translate")}),{once:!0}),document.addEventListener(e.r2uWebxrShowRotatingInstructions,(()=>{p.XH.setRotateInstructions(),s("rotate")}),{once:!0}),document.addEventListener(e.r2uWebxrTranslating,(()=>{p.XH.setFirstTranslation(),s("translate")}),{once:!0}),document.addEventListener(e.r2uWebxrRotating,(()=>{p.XH.setFirstRotation(),s("rotate")}),{once:!0}),document.addEventListener(e.r2uWebxrReset,p.XH.setReset,{once:!0}),document.addEventListener(e.r2uWebxrFallbackToSceneviewer,p.XH.onSceneViewerFallback,{once:!0}),window.addEventListener("hashchange",(()=>{window.location.hash===Se&&p.XH.onFallback()}),{once:!0}),document.addEventListener(e.r2uWebxrShare,p.XH.onShare),document.addEventListener(e.r2uWebxrExit,p.XH.onExit),document.addEventListener(e.r2uWebxrCallToAction,p.XH.onCallToAction),document.addEventListener(e.r2uWebxrTranslating,p.XH.onTranslation),document.addEventListener(e.r2uWebxrRotating,p.XH.onRotation),x(X)):(()=>{switch(h){case"always":return!0;case"never":return!1;default:return!c("instructions")}})()?_():w(T),yield p.J1.onClick();const t=(new Date).getTime(),n=()=>{if(document.hidden)return;const e=(new Date).getTime();p.J1.onSessionTimeCollect(e-t),H()&&F(),document.removeEventListener("visibilitychange",n)},o=()=>{const e=(new Date).getTime();p.J1.onSessionTimeCollect(e-t),document.removeEventListener("r2u-webxr-close",o),document.removeEventListener("visibilitychange",n)};document.addEventListener("r2u-webxr-close",o),document.addEventListener("visibilitychange",n)}));n.addEventListener(f,B);const V=new URL(window.location.href),q="true"===V.searchParams.get("r2u_redirect"),Y=V.searchParams.get("r2u_sku");return q&&!i.Z.hasAutoOpenedAR&&(i.Z.hasAutoOpenedAR=!0,Y&&(yield D(Y)),Le({element:n,event:f})),window.addEventListener("hashchange",(()=>{window.location.hash===Se&&(p.J1.onFallback(),n.removeEventListener(f,B),n.addEventListener(f,Z),Le({element:n,event:f}))}),{once:!0}),{setSku:D}}))},open:Le,getLink:function(e){return Ne(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));const t=i.Z.customer._id,n=yield(0,u.U2)(`/sdk-ar/openar-link?customerId=${t}&productSku=${e}`);return Promise.resolve(n)}))}}}}]);
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e,n,t,r,o={},u={};function i(e){var n=u[e];if(void 0!==n)return n.exports;var t=u[e]={exports:{}};return o[e].call(t.exports,t,t.exports,i),t.exports}i.m=o,i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var o=Object.create(null);i.r(o);var u={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(e){u[e]=function(){return t[e]}}));return u.default=function(){return t},i.d(o,u),o},i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(n,t){return i.f[t](e,n),n}),[]))},i.u=function(e){return 691===e?"vendors.72e0cdbf51fef996d405.bundle.js":665===e?"vendors.6c46067ffeb7a1054cd1.bundle.js":215===e?"vendors.2864f1aaf3fa743e1983.bundle.js":410===e?"init.bundle.js":497===e?"config.bundle.js":30===e?"vendors.d0043338c48c5993c6a9.bundle.js":10===e?"vendors.f18e74fe48ceb07d8c70.bundle.js":603===e?"vendors.5861a640ff3844504854.bundle.js":593===e?"vendors.6c1cafe4aca342f574f6.bundle.js":850===e?"ar.bundle.js":465===e?"sku.bundle.js":361===e?"vendors.6e3f8af05556e404968a.bundle.js":428===e?"viewer.bundle.js":142===e?"analytics.bundle.js":869===e?"qrCode.bundle.js":void 0},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t={},r="R2U:",i.l=function(e,n,o,u){if(t[e])t[e].push(n);else{var a,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var l=c[f];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==r+o){a=l;break}}a||(d=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",r+o),a.src=e),t[e]=[n];var s=function(n,r){a.onerror=a.onload=null,clearTimeout(b);var o=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((function(e){return e(r)})),n)return n(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),d&&document.head.appendChild(a)}},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://unpkg.com/@r2u/javascript-ar-sdk@6.22.4/dist/",function(){var e={179:0};i.f.j=function(n,t){var r=i.o(e,n)?e[n]:void 0;if(0!==r)if(r)t.push(r[2]);else{var o=new Promise((function(t,o){r=e[n]=[t,o]}));t.push(r[2]=o);var u=i.p+i.u(n),a=new Error;i.l(u,(function(t){if(i.o(e,n)&&(0!==(r=e[n])&&(e[n]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;a.message="Loading chunk "+n+" failed.\n("+o+": "+u+")",a.name="ChunkLoadError",a.type=o,a.request=u,r[1](a)}}),"chunk-"+n,n)}};var n=function(n,t){var r,o,u=t[0],a=t[1],d=t[2],c=0;if(u.some((function(n){return 0!==e[n]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(d)d(i)}for(n&&n(t);c<u.length;c++)o=u[c],i.o(e,o)&&e[o]&&e[o][0](),e[u[c]]=0},t=self.webpackChunkR2U=self.webpackChunkR2U||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var a={};i.r(a),i.d(a,{init:function(){return d},sku:function(){return l},ar:function(){return f},viewer:function(){return s},analytics:function(){return b},qrCode:function(){return h},config:function(){return c}});const d=e=>Promise.all([i.e(691),i.e(665),i.e(215),i.e(410)]).then(i.bind(i,6526)).then((n=>n.default(e))),c={changeLanguage:e=>Promise.all([i.e(665),i.e(497)]).then(i.bind(i,7328)).then((n=>n.default.changeLanguage(e)))},f={open:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.open(e))),attach:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.attach(e))),getLink:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.getLink(e)))},l={isActive:e=>Promise.all([i.e(691),i.e(465)]).then(i.bind(i,6025)).then((n=>n.default.isActive(e))),getData:e=>Promise.all([i.e(691),i.e(465)]).then(i.bind(i,6025)).then((n=>n.default.getData(e)))},s={create:e=>Promise.all([i.e(691),i.e(30),i.e(10),i.e(361),i.e(593),i.e(428)]).then(i.bind(i,8305)).then((n=>n.default.create(e)))},b={send:e=>i.e(142).then(i.bind(i,9448)).then((n=>n.default.send(e)))},h={create:e=>Promise.all([i.e(30),i.e(361),i.e(869)]).then(i.bind(i,5004)).then((n=>n.default.create(e)))};document.dispatchEvent(new CustomEvent("r2u-sdk-loaded")),window.R2U=a}();
1
+ !function(){"use strict";var e,n,t,r,o={},u={};function i(e){var n=u[e];if(void 0!==n)return n.exports;var t=u[e]={exports:{}};return o[e].call(t.exports,t,t.exports,i),t.exports}i.m=o,i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,{a:n}),n},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(t,r){if(1&r&&(t=this(t)),8&r)return t;if("object"==typeof t&&t){if(4&r&&t.__esModule)return t;if(16&r&&"function"==typeof t.then)return t}var o=Object.create(null);i.r(o);var u={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(e){u[e]=function(){return t[e]}}));return u.default=function(){return t},i.d(o,u),o},i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(n,t){return i.f[t](e,n),n}),[]))},i.u=function(e){return 691===e?"vendors.72e0cdbf51fef996d405.bundle.js":665===e?"vendors.6c46067ffeb7a1054cd1.bundle.js":215===e?"vendors.2864f1aaf3fa743e1983.bundle.js":410===e?"init.bundle.js":497===e?"config.bundle.js":30===e?"vendors.d0043338c48c5993c6a9.bundle.js":10===e?"vendors.f18e74fe48ceb07d8c70.bundle.js":603===e?"vendors.5861a640ff3844504854.bundle.js":593===e?"vendors.2b1073deed7fa6ae5a48.bundle.js":850===e?"ar.bundle.js":465===e?"sku.bundle.js":361===e?"vendors.6e3f8af05556e404968a.bundle.js":428===e?"viewer.bundle.js":142===e?"analytics.bundle.js":869===e?"qrCode.bundle.js":void 0},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t={},r="R2U:",i.l=function(e,n,o,u){if(t[e])t[e].push(n);else{var a,d;if(void 0!==o)for(var f=document.getElementsByTagName("script"),c=0;c<f.length;c++){var l=f[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==r+o){a=l;break}}a||(d=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",r+o),a.src=e),t[e]=[n];var s=function(n,r){a.onerror=a.onload=null,clearTimeout(b);var o=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((function(e){return e(r)})),n)return n(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),d&&document.head.appendChild(a)}},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://unpkg.com/@r2u/javascript-ar-sdk@6.22.6/dist/",function(){var e={179:0};i.f.j=function(n,t){var r=i.o(e,n)?e[n]:void 0;if(0!==r)if(r)t.push(r[2]);else{var o=new Promise((function(t,o){r=e[n]=[t,o]}));t.push(r[2]=o);var u=i.p+i.u(n),a=new Error;i.l(u,(function(t){if(i.o(e,n)&&(0!==(r=e[n])&&(e[n]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;a.message="Loading chunk "+n+" failed.\n("+o+": "+u+")",a.name="ChunkLoadError",a.type=o,a.request=u,r[1](a)}}),"chunk-"+n,n)}};var n=function(n,t){var r,o,u=t[0],a=t[1],d=t[2],f=0;if(u.some((function(n){return 0!==e[n]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(d)d(i)}for(n&&n(t);f<u.length;f++)o=u[f],i.o(e,o)&&e[o]&&e[o][0](),e[u[f]]=0},t=self.webpackChunkR2U=self.webpackChunkR2U||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var a={};i.r(a),i.d(a,{init:function(){return d},sku:function(){return l},ar:function(){return c},viewer:function(){return s},analytics:function(){return b},qrCode:function(){return h},config:function(){return f}});const d=e=>Promise.all([i.e(691),i.e(665),i.e(215),i.e(410)]).then(i.bind(i,6526)).then((n=>n.default(e))),f={changeLanguage:e=>Promise.all([i.e(665),i.e(497)]).then(i.bind(i,7328)).then((n=>n.default.changeLanguage(e)))},c={open:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.open(e))),attach:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.attach(e))),getLink:e=>Promise.all([i.e(691),i.e(30),i.e(665),i.e(10),i.e(215),i.e(603),i.e(593),i.e(850)]).then(i.bind(i,9408)).then((n=>n.default.getLink(e)))},l={isActive:e=>Promise.all([i.e(691),i.e(465)]).then(i.bind(i,6025)).then((n=>n.default.isActive(e))),getData:e=>Promise.all([i.e(691),i.e(465)]).then(i.bind(i,6025)).then((n=>n.default.getData(e)))},s={create:e=>Promise.all([i.e(691),i.e(30),i.e(10),i.e(361),i.e(593),i.e(428)]).then(i.bind(i,8305)).then((n=>n.default.create(e)))},b={send:e=>i.e(142).then(i.bind(i,9448)).then((n=>n.default.send(e)))},h={create:e=>Promise.all([i.e(30),i.e(361),i.e(869)]).then(i.bind(i,5004)).then((n=>n.default.create(e)))};document.dispatchEvent(new CustomEvent("r2u-sdk-loaded")),window.R2U=a}();
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[410],{6504:function(e,n,t){t.d(n,{f2:function(){return u}});var i=t(8665),a=t(1580),s=t(5538),r=t(660),o=t(2297),c=t(2367),l=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const u=i.Z.createInstance();n.ZP={init:({language:e})=>l(void 0,void 0,void 0,(function*(){const n=c.Z.customer.language,t=(c.Z.customer.slug,e||n||"en"),i=(0,o.Bv)(),l=["translation"];return new Promise(((e,n)=>{u.use(a.Z).init({debug:!1,react:{useSuspense:!1},lng:t,fallbackLng:!1,supportedLngs:["pt","en","es"],ns:l,defaultNS:"translation",fallbackNS:"translation",load:"currentOnly",preload:[t],interpolation:{escapeValue:!1},backend:{backends:[r.Z,s.Z],backendOptions:[{prefix:"i18next_res_r2u_sdk_",enabled:!0,expirationTime:6048e5},{loadPath:`${i}/locales/{{lng}}/{{ns}}.json`,allowMultiloading:!0}]}},(t=>{t&&n(new Error("R2U - Translation init failed")),e()}))}))}))}},6526:function(e,n,t){t.r(n),t.d(n,{default:function(){return l}});var i=t(2367),a=t(7374),s=t(2297),r=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};var o=t(6504),c=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};function l({customerId:e,language:n,analyticsParams:t={dataLayerIntegration:!0,sessionDuration:30},refreshCache:l=!1}){return c(this,void 0,void 0,(function*(){if(!/^(?=[a-f\d]{24}$)(\d+[a-f]|[a-f]+\d)/i.test(e)&&!/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(e))throw new Error(`Invalid customer '${e}'`);i.Z.init=!0,i.Z.refreshCache=l;const c=yield function(e){return r(this,void 0,void 0,(function*(){return yield(0,s.U2)(`/customers/${e}`)}))}(e),u=yield(0,a.ZP)({client:e,dataLayerIntegration:t.dataLayerIntegration,sessionDurationMinutes:t.sessionDuration});i.Z.analytics=u,i.Z.customer=c,yield Promise.all([o.ZP.init({language:n})])}))}},7374:function(e,n,t){t.d(n,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return f},KN:function(){return w},fQ:function(){return g},hN:function(){return y},lY:function(){return v},G0:function(){return b},fm:function(){return m}});var i=t(2085),a=t(5877),s=t(2367),r=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>s.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>s.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>s.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>s.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>s.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>s.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>s.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{s.Z.analytics.webxrSet(i.D1.session_id,(0,a.v4)())},setCompatible:e=>{s.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([s.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),s.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{s.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{s.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{s.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{s.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{s.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{s.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{s.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},f={onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},y=e=>{s.Z.analytics.set(i.MB.sku,e)},v=e=>{s.Z.analytics.set(i.MB.manufacturer_id,e)},b=e=>{s.Z.analytics.set(i.MB.is_active_3d,`${e}`),s.Z.analytics.send({event:i.U3.product_page_view})},w=e=>{s.Z.analytics.set(i.MB.experiment_id,e)},g=e=>{s.Z.analytics.set(i.MB.variation_id,e)},m=()=>r(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return s.Z.analytics.set(i.MB.fingerprint,e),e}));n.ZP=({client:e,dataLayerIntegration:n,sessionDurationMinutes:t,info:a={}})=>r(void 0,void 0,void 0,(function*(){const s={version:"6.22.4",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:t,dataLayerIntegration:n},r=new i.ZP(s,Object.assign(Object.assign({},a),{[i.MB.client]:e}));return yield r.init(),r}))},2297:function(e,n,t){t.d(n,{U2:function(){return r},v_:function(){return o},Bv:function(){return c}});var i=t(2367),a=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const s="https://api.r2u.io";function r(e){return a(this,void 0,void 0,(function*(){const n={};i.Z.refreshCache&&(n["Cache-Control"]="max-age=0");return(yield fetch(`${s}${e}`,{method:"get",headers:n})).json()}))}function o(e,n){return a(this,void 0,void 0,(function*(){return(yield fetch(`${s}${e}`,{method:"POST",body:JSON.stringify(n)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,n){const t={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,n)=>{},send:({event:e,data:n,scope:t})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};n.Z=t},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.4","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
1
+ "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[410],{6504:function(e,n,t){t.d(n,{f2:function(){return u}});var i=t(8665),a=t(1580),s=t(5538),r=t(660),o=t(2297),c=t(2367),l=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const u=i.Z.createInstance();n.ZP={init:({language:e})=>l(void 0,void 0,void 0,(function*(){const n=c.Z.customer.language,t=(c.Z.customer.slug,e||n||"en"),i=(0,o.Bv)(),l=["translation"];return new Promise(((e,n)=>{u.use(a.Z).init({debug:!1,react:{useSuspense:!1},lng:t,fallbackLng:!1,supportedLngs:["pt","en","es"],ns:l,defaultNS:"translation",fallbackNS:"translation",load:"currentOnly",preload:[t],interpolation:{escapeValue:!1},backend:{backends:[r.Z,s.Z],backendOptions:[{prefix:"i18next_res_r2u_sdk_",enabled:!0,expirationTime:6048e5},{loadPath:`${i}/locales/{{lng}}/{{ns}}.json`,allowMultiloading:!0}]}},(t=>{t&&n(new Error("R2U - Translation init failed")),e()}))}))}))}},6526:function(e,n,t){t.r(n),t.d(n,{default:function(){return l}});var i=t(2367),a=t(7374),s=t(2297),r=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};var o=t(6504),c=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};function l({customerId:e,language:n,analyticsParams:t={dataLayerIntegration:!0,sessionDuration:30},refreshCache:l=!1}){return c(this,void 0,void 0,(function*(){if(!/^(?=[a-f\d]{24}$)(\d+[a-f]|[a-f]+\d)/i.test(e)&&!/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(e))throw new Error(`Invalid customer '${e}'`);i.Z.init=!0,i.Z.refreshCache=l;const c=yield function(e){return r(this,void 0,void 0,(function*(){return yield(0,s.U2)(`/customers/${e}`)}))}(e),u=yield(0,a.ZP)({client:e,dataLayerIntegration:t.dataLayerIntegration,sessionDurationMinutes:t.sessionDuration});i.Z.analytics=u,i.Z.customer=c,yield Promise.all([o.ZP.init({language:n})])}))}},7374:function(e,n,t){t.d(n,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return f},KN:function(){return w},fQ:function(){return g},hN:function(){return y},lY:function(){return v},G0:function(){return b},fm:function(){return m}});var i=t(2085),a=t(5877),s=t(2367),r=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>s.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>s.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>s.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>s.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>s.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>s.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>s.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{s.Z.analytics.webxrSet(i.D1.session_id,(0,a.v4)())},setCompatible:e=>{s.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([s.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),s.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{s.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{s.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{s.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{s.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{s.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{s.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{s.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>s.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},f={onClick:()=>s.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},y=e=>{s.Z.analytics.set(i.MB.sku,e)},v=e=>{s.Z.analytics.set(i.MB.manufacturer_id,e)},b=e=>{s.Z.analytics.set(i.MB.is_active_3d,`${e}`),s.Z.analytics.send({event:i.U3.product_page_view})},w=e=>{s.Z.analytics.set(i.MB.experiment_id,e)},g=e=>{s.Z.analytics.set(i.MB.variation_id,e)},m=()=>r(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return s.Z.analytics.set(i.MB.fingerprint,e),e}));n.ZP=({client:e,dataLayerIntegration:n,sessionDurationMinutes:t,info:a={}})=>r(void 0,void 0,void 0,(function*(){const s={version:"6.22.6",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:t,dataLayerIntegration:n},r=new i.ZP(s,Object.assign(Object.assign({},a),{[i.MB.client]:e}));return yield r.init(),r}))},2297:function(e,n,t){t.d(n,{U2:function(){return r},v_:function(){return o},Bv:function(){return c}});var i=t(2367),a=function(e,n,t,i){return new(t||(t=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,o)}c((i=i.apply(e,n||[])).next())}))};const s="https://api.r2u.io";function r(e){return a(this,void 0,void 0,(function*(){const n={};i.Z.refreshCache&&(n["Cache-Control"]="max-age=0");return(yield fetch(`${s}${e}`,{method:"get",headers:n})).json()}))}function o(e,n){return a(this,void 0,void 0,(function*(){return(yield fetch(`${s}${e}`,{method:"POST",body:JSON.stringify(n)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,n){const t={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,n)=>{},send:({event:e,data:n,scope:t})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};n.Z=t},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.6","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(node -p \\"require(\'./package.json\').version\\") webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[465],{2587:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,r){n=n||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(n);var o=1e3;r&&"number"==typeof r.maxKeys&&(o=r.maxKeys);var c=e.length;o>0&&c>o&&(c=o);for(var l=0;l<c;++l){var u,d,p,f,v=e[l].replace(s,"%20"),y=v.indexOf(i);y>=0?(u=v.substr(0,y),d=v.substr(y+1)):(u=v,d=""),p=decodeURIComponent(u),f=decodeURIComponent(d),t(a,p)?Array.isArray(a[p])?a[p].push(f):a[p]=[a[p],f]:a[p]=f}return a}},2361:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,i,r){return n=n||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var a=encodeURIComponent(t(r))+i;return Array.isArray(e[r])?e[r].map((function(e){return a+encodeURIComponent(t(e))})).join(n):a+encodeURIComponent(t(e[r]))})).filter(Boolean).join(n):r?encodeURIComponent(t(r))+i+encodeURIComponent(t(e)):""}},7673:function(e,t,n){t.decode=t.parse=n(2587),t.encode=t.stringify=n(2361)},6025:function(e,t,n){n.r(t);var i=n(2367),r=n(7523),a=n(7374),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};t.default={isActive:function(e){return s(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));a.hN(e);try{const{isActive:t,manufacturerId:n}=yield(0,r.Z)(e);return n&&a.lY(n),a.G0(t),t}catch(e){return!1}}))},getData:function(e){return s(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));return yield(0,r.Z)(e)}))}}},7374:function(e,t,n){n.d(t,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return f},KN:function(){return m},fQ:function(){return w},hN:function(){return v},lY:function(){return y},G0:function(){return b},fm:function(){return x}});var i=n(2085),r=n(5877),a=n(2367),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>a.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>a.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>a.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>a.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>a.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>a.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>a.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{a.Z.analytics.webxrSet(i.D1.session_id,(0,r.v4)())},setCompatible:e=>{a.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([a.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),a.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{a.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{a.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{a.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{a.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{a.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{a.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{a.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},f={onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},v=e=>{a.Z.analytics.set(i.MB.sku,e)},y=e=>{a.Z.analytics.set(i.MB.manufacturer_id,e)},b=e=>{a.Z.analytics.set(i.MB.is_active_3d,`${e}`),a.Z.analytics.send({event:i.U3.product_page_view})},m=e=>{a.Z.analytics.set(i.MB.experiment_id,e)},w=e=>{a.Z.analytics.set(i.MB.variation_id,e)},x=()=>s(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return a.Z.analytics.set(i.MB.fingerprint,e),e}));t.ZP=({client:e,dataLayerIntegration:t,sessionDurationMinutes:n,info:r={}})=>s(void 0,void 0,void 0,(function*(){const a={version:"6.22.4",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:n,dataLayerIntegration:t},s=new i.ZP(a,Object.assign(Object.assign({},r),{[i.MB.client]:e}));return yield s.init(),s}))},7523:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(2297),r=n(2367),a=n(7673),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};function o(e){return s(this,void 0,void 0,(function*(){if(r.Z.products[e])return Promise.resolve(r.Z.products[e]);const t=a.encode({"product.sku":e,"asset.types":["GLB","USDZ"].join(","),"product_review.status":"RUNNING"}),[n]=yield(0,i.U2)(`/customers/${r.Z.customer._id}/products/assets?${t}`);if(!n)throw new Error("R2U - SKU not found");const s=n.assets||[],o=n.product_reviews||[],c=s.find((e=>"GLB"===e.type)),l=s.find((e=>"USDZ"===e.type)),u={glb:c?c.url:"",usdz:l?l.url:"",isActive:o.length>0,name:n.name,placement:n.placement||"floor",resize:n.resize||!1,sound:n.soundUrl,modelId:n.modelId,manufacturerId:n.manufacturerId,pdpUrl:n.pdpUrl,hdri:n.hdri,exposure:n.exposure,bloom:n.bloom,viewerOptions:n.viewerOptions||{}};return r.Z.products[e]=u,u}))}},2297:function(e,t,n){n.d(t,{U2:function(){return s},v_:function(){return o},Bv:function(){return c}});var i=n(2367),r=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};const a="https://api.r2u.io";function s(e){return r(this,void 0,void 0,(function*(){const t={};i.Z.refreshCache&&(t["Cache-Control"]="max-age=0");return(yield fetch(`${a}${e}`,{method:"get",headers:t})).json()}))}function o(e,t){return r(this,void 0,void 0,(function*(){return(yield fetch(`${a}${e}`,{method:"POST",body:JSON.stringify(t)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,t){const n={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,t)=>{},send:({event:e,data:t,scope:n})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};t.Z=n},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.4","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
1
+ "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[465],{2587:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,r){n=n||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(n);var o=1e3;r&&"number"==typeof r.maxKeys&&(o=r.maxKeys);var c=e.length;o>0&&c>o&&(c=o);for(var l=0;l<c;++l){var u,d,p,f,v=e[l].replace(s,"%20"),y=v.indexOf(i);y>=0?(u=v.substr(0,y),d=v.substr(y+1)):(u=v,d=""),p=decodeURIComponent(u),f=decodeURIComponent(d),t(a,p)?Array.isArray(a[p])?a[p].push(f):a[p]=[a[p],f]:a[p]=f}return a}},2361:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,i,r){return n=n||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var a=encodeURIComponent(t(r))+i;return Array.isArray(e[r])?e[r].map((function(e){return a+encodeURIComponent(t(e))})).join(n):a+encodeURIComponent(t(e[r]))})).filter(Boolean).join(n):r?encodeURIComponent(t(r))+i+encodeURIComponent(t(e)):""}},7673:function(e,t,n){t.decode=t.parse=n(2587),t.encode=t.stringify=n(2361)},6025:function(e,t,n){n.r(t);var i=n(2367),r=n(7523),a=n(7374),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};t.default={isActive:function(e){return s(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));a.hN(e);try{const{isActive:t,manufacturerId:n}=yield(0,r.Z)(e);return n&&a.lY(n),a.G0(t),t}catch(e){return!1}}))},getData:function(e){return s(this,void 0,void 0,(function*(){if(!i.Z.init)return Promise.reject(new Error("R2U - Not initialized"));if(!e)return Promise.reject(new Error("R2U - Missing SKU"));return yield(0,r.Z)(e)}))}}},7374:function(e,t,n){n.d(t,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return f},KN:function(){return m},fQ:function(){return w},hN:function(){return v},lY:function(){return y},G0:function(){return b},fm:function(){return x}});var i=n(2085),r=n(5877),a=n(2367),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>a.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>a.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>a.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>a.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>a.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>a.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>a.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{a.Z.analytics.webxrSet(i.D1.session_id,(0,r.v4)())},setCompatible:e=>{a.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([a.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),a.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{a.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{a.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{a.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{a.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{a.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{a.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{a.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>a.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},f={onClick:()=>a.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},v=e=>{a.Z.analytics.set(i.MB.sku,e)},y=e=>{a.Z.analytics.set(i.MB.manufacturer_id,e)},b=e=>{a.Z.analytics.set(i.MB.is_active_3d,`${e}`),a.Z.analytics.send({event:i.U3.product_page_view})},m=e=>{a.Z.analytics.set(i.MB.experiment_id,e)},w=e=>{a.Z.analytics.set(i.MB.variation_id,e)},x=()=>s(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return a.Z.analytics.set(i.MB.fingerprint,e),e}));t.ZP=({client:e,dataLayerIntegration:t,sessionDurationMinutes:n,info:r={}})=>s(void 0,void 0,void 0,(function*(){const a={version:"6.22.6",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:n,dataLayerIntegration:t},s=new i.ZP(a,Object.assign(Object.assign({},r),{[i.MB.client]:e}));return yield s.init(),s}))},7523:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(2297),r=n(2367),a=n(7673),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};function o(e){return s(this,void 0,void 0,(function*(){if(r.Z.products[e])return Promise.resolve(r.Z.products[e]);const t=a.encode({"product.sku":e,"asset.types":["GLB","USDZ"].join(","),"product_review.status":"RUNNING"}),[n]=yield(0,i.U2)(`/customers/${r.Z.customer._id}/products/assets?${t}`);if(!n)throw new Error("R2U - SKU not found");const s=n.assets||[],o=n.product_reviews||[],c=s.find((e=>"GLB"===e.type)),l=s.find((e=>"USDZ"===e.type)),u={glb:c?c.url:"",usdz:l?l.url:"",isActive:o.length>0,name:n.name,placement:n.placement||"floor",resize:n.resize||!1,sound:n.soundUrl,modelId:n.modelId,manufacturerId:n.manufacturerId,pdpUrl:n.pdpUrl,hdri:n.hdri,exposure:n.exposure,bloom:n.bloom,viewerOptions:n.viewerOptions||{}};return r.Z.products[e]=u,u}))}},2297:function(e,t,n){n.d(t,{U2:function(){return s},v_:function(){return o},Bv:function(){return c}});var i=n(2367),r=function(e,t,n,i){return new(n||(n=Promise))((function(r,a){function s(e){try{c(i.next(e))}catch(e){a(e)}}function o(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}c((i=i.apply(e,t||[])).next())}))};const a="https://api.r2u.io";function s(e){return r(this,void 0,void 0,(function*(){const t={};i.Z.refreshCache&&(t["Cache-Control"]="max-age=0");return(yield fetch(`${a}${e}`,{method:"get",headers:t})).json()}))}function o(e,t){return r(this,void 0,void 0,(function*(){return(yield fetch(`${a}${e}`,{method:"POST",body:JSON.stringify(t)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,t){const n={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,t)=>{},send:({event:e,data:t,scope:n})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};t.Z=n},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.6","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(node -p \\"require(\'./package.json\').version\\") webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
@@ -17,7 +17,7 @@ interface AttachProps extends OpenProps {
17
17
  };
18
18
  }
19
19
  declare function open({ element, event }: OpenProps): Promise<void>;
20
- declare function attach({ sku, price, element, callToAction, event, showInstructions, showFeedback, fallbackOptions, }: AttachProps): Promise<SKUHandler>;
20
+ declare function attach({ sku, price, element, callToAction, event, showInstructions, showFeedback, fallbackOptions, resize: resizeParam, }: AttachProps): Promise<SKUHandler>;
21
21
  declare function getLink(sku: string): Promise<string>;
22
22
  declare const _default: {
23
23
  attach: typeof attach;
@@ -145,7 +145,7 @@ const attachWebXREventListeners = (Events) => {
145
145
  document.addEventListener(Events.r2uWebxrTranslating, analytics.webXR.onTranslation);
146
146
  document.addEventListener(Events.r2uWebxrRotating, analytics.webXR.onRotation);
147
147
  };
148
- function attach({ sku, price, element, callToAction, event = 'click', showInstructions = 'once', showFeedback = true, fallbackOptions = { alertMessage }, }) {
148
+ function attach({ sku, price, element, callToAction, event = 'click', showInstructions = 'once', showFeedback = true, fallbackOptions = { alertMessage }, resize: resizeParam, }) {
149
149
  return __awaiter(this, void 0, void 0, function* () {
150
150
  if (!state.init)
151
151
  return Promise.reject(new Error('R2U - Not initialized'));
@@ -173,7 +173,8 @@ function attach({ sku, price, element, callToAction, event = 'click', showInstru
173
173
  analytics.setVariationId(variationId);
174
174
  return variationId === 'webxr-v3';
175
175
  });
176
- const { glb, usdz, name, placement, sound, resize, pdpUrl } = yield product(sku);
176
+ const { glb, usdz, name, placement, sound, resize: resizeFromProduct, pdpUrl, } = yield product(sku);
177
+ const resize = resizeParam || resizeFromProduct;
177
178
  const scale = resize ? 'resizable' : 'fixed';
178
179
  const [currencyLocale, currencyFormat] = state.customer.language === 'pt' ? ['pt-BR', 'BRL'] : ['en-US', 'USD'];
179
180
  const cta = callToAction
@@ -1 +1 @@
1
- {"version":3,"file":"ar.js","sourceRoot":"","sources":["../../../src/methods/ar.tsx"],"names":[],"m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,uBAAuB,CAAC,CAAC,CAAA;QAC1E,IAAI,CAAC,GAAG;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAE/D,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAA;QAErC,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CACrB,kCAAkC,UAAU,eAAe,GAAG,EAAE,CACjE,CAAW,CAAA;QAEZ,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;CAAA;AAED,eAAe;IACb,MAAM;IACN,IAAI;IACJ,OAAO;CACR,CAAA"}
@@ -19,6 +19,7 @@ export declare type ViewerFunctions = SKUHandler & Omit<ViewerRef, 'getCustomize
19
19
  openAR: (customMaterial?: boolean) => Promise<boolean>;
20
20
  renderQRCode: (element: HTMLElement, customMaterial?: boolean) => Promise<boolean>;
21
21
  getViewerURL: (customMaterial?: boolean) => Promise<string | null>;
22
+ getGlb: (draco?: boolean) => Promise<Blob | null>;
22
23
  };
23
24
  };
24
25
  declare const _default: {
@@ -206,6 +206,11 @@ const create = ({ element, sku, name, popup = true, progressBarPosition = 'top',
206
206
  return;
207
207
  refViewerFunctions.current.downloadGlb(...args);
208
208
  };
209
+ const getCustomizedGlb = (draco) => __awaiter(void 0, void 0, void 0, function* () {
210
+ if (!refViewerFunctions.current)
211
+ return null;
212
+ return refViewerFunctions.current.getCustomizedModel(draco);
213
+ });
209
214
  const waitForFunctions = (callback) => __awaiter(void 0, void 0, void 0, function* () {
210
215
  const interval = setInterval(() => {
211
216
  if (refViewerFunctions.current) {
@@ -287,7 +292,12 @@ const create = ({ element, sku, name, popup = true, progressBarPosition = 'top',
287
292
  focusHotspot,
288
293
  getActiveHotspotId,
289
294
  lookToHotspot,
290
- customization: { openAR, renderQRCode, getViewerURL },
295
+ customization: {
296
+ openAR,
297
+ renderQRCode,
298
+ getViewerURL,
299
+ getGlb: getCustomizedGlb,
300
+ },
291
301
  getSceneTree,
292
302
  playAnimation,
293
303
  pauseAnimation,
@@ -1 +1 @@
1
- {"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../../src/methods/viewer.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,QAAQ,MAAM,WAAW,CAAA;AAEhC,OAAO,MAAM,MAAM,cAAc,CAAA;AAEjC,OAAO,KAAK,MAAM,UAAU,CAAA;AAG5B,OAAO,cAAc,MAAM,4BAA4B,CAAA;AACvD,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,iBAAiB,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAqCnD,MAAM,MAAM,GAAG,CAAO,EACpB,OAAO,EACP,GAAG,EACH,IAAI,EACJ,KAAK,GAAG,IAAI,EACZ,mBAAmB,GAAG,KAAK,EAC3B,gBAAgB,EAChB,MAAM,EACN,UAAU,GAAG,IAAI,EACjB,WAAW,GACJ,EAA4B,EAAE;IACrC,OAAA,IAAI,OAAO,CAAkB,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;QACrD,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAA;QAClE,IAAI,CAAC,GAAG;YAAE,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAEvD,MAAM,EACJ,GAAG,EACH,IAAI,EA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://sdk.r2u.io/assets/r2u-icon.svg');
19
19
  }
20
- `;var a=({position:e})=>i.createElement(r,{position:e},i.createElement("a",{href:"https://r2u.io",target:"_blank",rel:"noopener noreferrer"},i.createElement("img",{alt:""})))},7374:function(e,t,n){n.d(t,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return C},KN:function(){return m},fQ:function(){return g},hN:function(){return v},lY:function(){return f},G0:function(){return w},fm:function(){return h}});var i=n(2085),s=n(5877),r=n(2367),a=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>r.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>r.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>r.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>r.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>r.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>r.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>r.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{r.Z.analytics.webxrSet(i.D1.session_id,(0,s.v4)())},setCompatible:e=>{r.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([r.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),r.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{r.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{r.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{r.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{r.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{r.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{r.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{r.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},C={onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},v=e=>{r.Z.analytics.set(i.MB.sku,e)},f=e=>{r.Z.analytics.set(i.MB.manufacturer_id,e)},w=e=>{r.Z.analytics.set(i.MB.is_active_3d,`${e}`),r.Z.analytics.send({event:i.U3.product_page_view})},m=e=>{r.Z.analytics.set(i.MB.experiment_id,e)},g=e=>{r.Z.analytics.set(i.MB.variation_id,e)},h=()=>a(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return r.Z.analytics.set(i.MB.fingerprint,e),e}));t.ZP=({client:e,dataLayerIntegration:t,sessionDurationMinutes:n,info:s={}})=>a(void 0,void 0,void 0,(function*(){const r={version:"6.22.4",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:n,dataLayerIntegration:t},a=new i.ZP(r,Object.assign(Object.assign({},s),{[i.MB.client]:e}));return yield a.init(),a}))},7523:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(2297),s=n(2367),r=n(7673),a=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};function o(e){return a(this,void 0,void 0,(function*(){if(s.Z.products[e])return Promise.resolve(s.Z.products[e]);const t=r.encode({"product.sku":e,"asset.types":["GLB","USDZ"].join(","),"product_review.status":"RUNNING"}),[n]=yield(0,i.U2)(`/customers/${s.Z.customer._id}/products/assets?${t}`);if(!n)throw new Error("R2U - SKU not found");const a=n.assets||[],o=n.product_reviews||[],c=a.find((e=>"GLB"===e.type)),l=a.find((e=>"USDZ"===e.type)),u={glb:c?c.url:"",usdz:l?l.url:"",isActive:o.length>0,name:n.name,placement:n.placement||"floor",resize:n.resize||!1,sound:n.soundUrl,modelId:n.modelId,manufacturerId:n.manufacturerId,pdpUrl:n.pdpUrl,hdri:n.hdri,exposure:n.exposure,bloom:n.bloom,viewerOptions:n.viewerOptions||{}};return s.Z.products[e]=u,u}))}},2297:function(e,t,n){n.d(t,{U2:function(){return a},v_:function(){return o},Bv:function(){return c}});var i=n(2367),s=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};const r="https://api.r2u.io";function a(e){return s(this,void 0,void 0,(function*(){const t={};i.Z.refreshCache&&(t["Cache-Control"]="max-age=0");return(yield fetch(`${r}${e}`,{method:"get",headers:t})).json()}))}function o(e,t){return s(this,void 0,void 0,(function*(){return(yield fetch(`${r}${e}`,{method:"POST",body:JSON.stringify(t)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,t){const n={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,t)=>{},send:({event:e,data:t,scope:n})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};t.Z=n},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.4","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
20
+ `;var a=({position:e})=>i.createElement(r,{position:e},i.createElement("a",{href:"https://r2u.io",target:"_blank",rel:"noopener noreferrer"},i.createElement("img",{alt:""})))},7374:function(e,t,n){n.d(t,{J1:function(){return u},E9:function(){return d},XH:function(){return p},ar:function(){return C},KN:function(){return m},fQ:function(){return g},hN:function(){return v},lY:function(){return f},G0:function(){return w},fm:function(){return h}});var i=n(2085),s=n(5877),r=n(2367),a=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};const o="ar_link",c="ar_model_viewer",l="cta",u={componentDidMount:()=>r.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:o},scope:"page"}),onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:o}}),onFallback:()=>r.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o}}),onLike:()=>r.Z.analytics.send({event:i.U3.like,data:{[i.MB.placement]:o}}),onDislike:()=>r.Z.analytics.send({event:i.U3.dislike,data:{[i.MB.placement]:o}}),onSessionTimeCollect:e=>r.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:o}})},d={componentDidMount:()=>r.Z.analytics.send({event:i.U3.impression,data:{[i.MB.placement]:c},scope:"page"}),onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:c}}),onSessionTimeCollect:e=>r.Z.analytics.send({event:i.U3.interaction_duration,eventCount:e,data:{[i.MB.placement]:c}})},p={onSessionStart:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.session_start}),onSessionEnd:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.session_end}),setSession:()=>{r.Z.analytics.webxrSet(i.D1.session_id,(0,s.v4)())},setCompatible:e=>{r.Z.analytics.webxrSet(i.D1.compatible,`${e}`)},onSceneViewerFallback:()=>Promise.all([r.Z.analytics.webxrSend({webxrEvent:i.Ui.scene_viewer_fallback}),r.Z.analytics.send({event:i.U3.fallback,data:{[i.MB.placement]:o},context:"webxr"})]),onFallback:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.fallback}),setPlaneMapped:()=>{r.Z.analytics.webxrSet(i.D1.plane_mapped,(new Date).toISOString())},setObjectPlaced:()=>{r.Z.analytics.webxrSet(i.D1.object_placed,(new Date).toISOString())},setTranslateInstructions:()=>{r.Z.analytics.webxrSet(i.D1.translate_instructions,(new Date).toISOString())},setRotateInstructions:()=>{r.Z.analytics.webxrSet(i.D1.rotate_instructions,(new Date).toISOString())},setFirstTranslation:()=>{r.Z.analytics.webxrSet(i.D1.first_translation,(new Date).toISOString())},setFirstRotation:()=>{r.Z.analytics.webxrSet(i.D1.first_rotation,(new Date).toISOString())},setReset:()=>{r.Z.analytics.webxrSet(i.D1.reset,(new Date).toISOString())},onShare:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.share}),onExit:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.exit}),onLike:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.like}),onDislike:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.dislike}),onCallToAction:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.call_to_action}),onTranslation:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.translation}),onRotation:()=>r.Z.analytics.webxrSend({webxrEvent:i.Ui.rotation})},C={onClick:()=>r.Z.analytics.send({event:i.U3.click,data:{[i.MB.placement]:l},context:"cart"})},v=e=>{r.Z.analytics.set(i.MB.sku,e)},f=e=>{r.Z.analytics.set(i.MB.manufacturer_id,e)},w=e=>{r.Z.analytics.set(i.MB.is_active_3d,`${e}`),r.Z.analytics.send({event:i.U3.product_page_view})},m=e=>{r.Z.analytics.set(i.MB.experiment_id,e)},g=e=>{r.Z.analytics.set(i.MB.variation_id,e)},h=()=>a(void 0,void 0,void 0,(function*(){const e=yield(0,i.cE)();return r.Z.analytics.set(i.MB.fingerprint,e),e}));t.ZP=({client:e,dataLayerIntegration:t,sessionDurationMinutes:n,info:s={}})=>a(void 0,void 0,void 0,(function*(){const r={version:"6.22.6",gcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportEvent",webxrGcpAnalyticsUrl:"https://us-central1-r2u-analytics.cloudfunctions.net/reportWebXREvent",debug:!!new URLSearchParams(window.location.search).get("realidade-aumentada-debug"),sessionDurationMinutes:n,dataLayerIntegration:t},a=new i.ZP(r,Object.assign(Object.assign({},s),{[i.MB.client]:e}));return yield a.init(),a}))},7523:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(2297),s=n(2367),r=n(7673),a=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};function o(e){return a(this,void 0,void 0,(function*(){if(s.Z.products[e])return Promise.resolve(s.Z.products[e]);const t=r.encode({"product.sku":e,"asset.types":["GLB","USDZ"].join(","),"product_review.status":"RUNNING"}),[n]=yield(0,i.U2)(`/customers/${s.Z.customer._id}/products/assets?${t}`);if(!n)throw new Error("R2U - SKU not found");const a=n.assets||[],o=n.product_reviews||[],c=a.find((e=>"GLB"===e.type)),l=a.find((e=>"USDZ"===e.type)),u={glb:c?c.url:"",usdz:l?l.url:"",isActive:o.length>0,name:n.name,placement:n.placement||"floor",resize:n.resize||!1,sound:n.soundUrl,modelId:n.modelId,manufacturerId:n.manufacturerId,pdpUrl:n.pdpUrl,hdri:n.hdri,exposure:n.exposure,bloom:n.bloom,viewerOptions:n.viewerOptions||{}};return s.Z.products[e]=u,u}))}},2297:function(e,t,n){n.d(t,{U2:function(){return a},v_:function(){return o},Bv:function(){return c}});var i=n(2367),s=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function o(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))};const r="https://api.r2u.io";function a(e){return s(this,void 0,void 0,(function*(){const t={};i.Z.refreshCache&&(t["Cache-Control"]="max-age=0");return(yield fetch(`${r}${e}`,{method:"get",headers:t})).json()}))}function o(e,t){return s(this,void 0,void 0,(function*(){return(yield fetch(`${r}${e}`,{method:"POST",body:JSON.stringify(t)})).json()}))}const c=()=>"https://sdk.r2u.io"},2367:function(e,t){const n={init:!1,customer:{_id:"",slug:"",language:"en",hdri:null,exposure:null,bloom:null,experiments:{overrides:{}},viewerOptions:{}},analytics:{set:(e,t)=>{},send:({event:e,data:t,scope:n})=>Promise.resolve()},products:{},hasAutoOpenedAR:!1,growthbook:{},refreshCache:!1};t.Z=n},4147:function(e){e.exports=JSON.parse('{"name":"@r2u/javascript-ar-sdk","version":"6.22.6","main":"dist/index.js","unpkg":"dist/index.js","types":"dist/src/index.d.ts","repository":"https://github.com/r2u-io/javascript-ar-sdk","files":["dist"],"scripts":{"dev":"yarn build:dev && webpack serve --mode=development","build:dev":"REACT_APP_VERSION=$(node -p \\"require(\'./package.json\').version\\") webpack --mode=development && yarn build:types","build":"REACT_APP_VERSION=$(jq -r \\".version\\" package.json) webpack --mode=production && yarn build:types","build:types":"tsc && npx tsc-alias","clean":"rm -rf dist/ public/dist/","test":"jest --config ./jest.config.js","stage":"yarn build:dev && gsutil -m cp -R ./public gs://r2u-integrations-bucket/_staging/sdk/","prettier":"prettier --write src","lint":"eslint \\"./src/**/*.{js,ts,tsx}\\"","eject":"rescripts eject"},"peerDependencies":{"react":"^16.13.1","react-dom":"^16.13.1"},"dependencies":{"@r2u/analytics":"^4.3.3","@r2u/react-ar-components":"^5.4.16","@r2u/viewer":"^1.12.3","@types/react-slick":"^0.23.10","i18next":"^20.2.1","i18next-chained-backend":"^2.1.0","i18next-http-backend":"^1.2.1","i18next-localstorage-backend":"^3.1.2","qrcode.react":"^1.0.1","querystring":"^0.2.0","react":"^17.0.2","react-dom":"^17.0.2","react-i18next":"^11.8.13","react-shadow":"^19.0.2","react-slick":"^0.29.0","styled-components":"^5.2.3"},"devDependencies":{"@fingerprintjs/fingerprintjs":"^3.3.0","@growthbook/growthbook":"^0.12.0","@types/jest":"^26.0.15","@types/node":"^13.11.1","@types/qrcode.react":"^1.0.1","@types/react":"^16.9.33","@types/react-dom":"^16.9.6","@types/styled-components":"^5.1.9","@typescript-eslint/eslint-plugin":"^2.3.1","@typescript-eslint/parser":"^2.3.1","eslint":"^7.22.0","eslint-config-prettier":"^6.12.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-jest":"^22.17.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-promise":"^4.1.1","eslint-plugin-react":"^7.14.3","eslint-plugin-standard":"^4.0.0","file-loader":"^6.2.0","jest":"^24.9.0","prettier":"^2.1.2","process":"^0.11.10","three":"^0.131.2","ts-jest":"^26.4.4","ts-loader":"^8.0.17","tsc-alias":"^1.8.11","tsconfig-paths-webpack-plugin":"^3.5.1","typescript":"^3.8.3","util":"^0.12.3","webpack":"^5.24.3","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^4.5.0","webpack-dev-server":"3.10.3"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]}}')}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[428],{8305:function(e,o,t){t.r(o),t.d(o,{default:function(){return z}});var n=t(7294),r=t(3935),i=t(9361),l=t.n(i),a=t(2367),u=t(5060),c=t(3026),s=t(9163);const d=s.default.div`
1
+ "use strict";(self.webpackChunkR2U=self.webpackChunkR2U||[]).push([[428],{8305:function(e,o,t){t.r(o),t.d(o,{default:function(){return z}});var n=t(7294),r=t(3935),i=t(9361),l=t.n(i),u=t(2367),a=t(5060),c=t(3026),s=t(9163);const d=s.default.div`
2
2
  width: 100%;
3
3
  height: 100%;
4
4
 
@@ -120,4 +120,4 @@
120
120
  box-shadow: none;
121
121
  }
122
122
  }
123
- `;var p=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t};const v=(0,n.forwardRef)(((e,o)=>{const{exitImgSrc:t="https://sdk.r2u.io/assets/exit-icon.png",expandImgSrc:r="https://sdk.r2u.io/assets/expand-icon.png",popup:i=!0,children:l=null,waterMarkPosition:a,refViewerPopup:s,ModelViewerElement:v,refViewerFunctions:m}=e,f=p(e,["exitImgSrc","expandImgSrc","popup","children","waterMarkPosition","refViewerPopup","ModelViewerElement","refViewerFunctions"]),[g,b]=(0,n.useState)(!1),h=()=>{b(!1)};(0,n.useEffect)((()=>{s&&s.current&&s.current.addEventListener("mousedown",(e=>(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!1)))}),[s]);const w=(0,n.useRef)(null),[y,x]=(0,n.useState)(!1),[E,k]=(0,n.useState)(f.glbSrc);return(0,n.useImperativeHandle)(o,(()=>({updateGlb:e=>{k(e)}})),[]),n.createElement(d,{expanded:g,bloom:y},n.createElement("div",{className:"viewer-container"},E&&n.createElement(v,Object.assign({ref:m,componentDidMount:f.componentDidMount,onClick:f.onClick,onSessionTimeCollect:f.onSessionTimeCollect},f,{glbSrc:E}),l,i&&n.createElement("button",{className:"expand-button",type:"button",onClick:()=>{b(!0)}},n.createElement("img",{className:"expand-image",alt:"",src:r})),a&&n.createElement(u.Z,{position:a}))),i&&g&&n.createElement("div",{className:"background",onMouseDown:h},n.createElement("div",{className:"viewer-container popup"},E&&n.createElement(v,Object.assign({ref:w,componentDidMount:f.componentDidMount,onClick:f.onClick,onSessionTimeCollect:f.onSessionTimeCollect},f,{enableBloomButton:!1,glbSrc:E}),l,f.bloom&&n.createElement("button",{className:"bloomButton",type:"button",onMouseDown:e=>e.stopPropagation(),onClick:()=>{x(!y),w.current&&w.current.updateBloom(!y)}},y?n.createElement(c.cu,{className:"lamp"}):n.createElement(c.H_,{className:"lamp"})),n.createElement("button",{className:"exit-button",type:"button",onClick:h},n.createElement("img",{alt:"",src:t})),a&&n.createElement(u.Z,{position:a})))))}));v.displayName="R2UModelViewer";var m=v,f=t(1841),g=t.n(f),b=t(7523),h=t(7374),w=t(2297),y=function(e,o,t,n){return new(t||(t=Promise))((function(r,i){function l(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(l,a)}u((n=n.apply(e,o||[])).next())}))};function x(e,o){return y(this,void 0,void 0,(function*(){try{const t=`/viewer-customization/customer/${a.Z.customer._id}/products/${e}?customization=${encodeURI(JSON.stringify(o))}`;return(yield(0,w.U2)(t))||{}}catch(e){return console.error(`Error on getting customized model: ${e.message}`),Promise.reject(e)}}))}function E(e){return y(this,void 0,void 0,(function*(){try{const{status:o}=yield(0,w.U2)(`/job-status/${e}`);return["waiting","processing"].includes(o)?E(e):o}catch(e){return console.error(`Error on retry check conversion: ${e.message}`),Promise.reject(e)}}))}var k=t(5865);const S=({materialSlots:e,modelSlots:o})=>{e.sort(((e,o)=>e.slot>o.slot?1:e.slot<o.slot?-1:0)),o.sort(((e,o)=>e.slot>o.slot?1:e.slot<o.slot?-1:0)),o.forEach((e=>{e.activeModel&&S(e.activeModel)}))};var M=S;class C extends Error{constructor(e){super(e),this.name="ViewerError"}}var P=function(e,o,t,n){return new(t||(t=Promise))((function(r,i){function l(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(l,a)}u((n=n.apply(e,o||[])).next())}))};var z={create:({element:e,sku:o,name:t,popup:i=!0,progressBarPosition:u="top",progressBarColor:c,poster:s,autoRotate:d=!0,viewerProps:p})=>P(void 0,void 0,void 0,(function*(){return new Promise(((v,f)=>P(void 0,void 0,void 0,(function*(){if(!a.Z.init)return f(new Error("R2U - Not initialized"));if(!o)return f(new Error("R2U - Missing SKU"));const{glb:S,name:z,viewerOptions:R}=yield(0,b.Z)(o);let $=S;const O=a.Z.customer.waterMarkPosition,N=R||a.Z.customer.viewerOptions||void 0,j=(0,n.createRef)(),H=(0,n.createRef)(),I=(0,n.createRef)(),U=(0,n.createRef)(),A=e=>P(void 0,void 0,void 0,(function*(){return new Promise(((o,t)=>P(void 0,void 0,void 0,(function*(){var n,r;try{const{glb:t}=yield(0,b.Z)(e);$=t,yield null===(n=I.current)||void 0===n?void 0:n.updateGlb(t),null===(r=U.current)||void 0===r||r.updateGlb(t),o()}catch(e){t(e)}}))))})),B=(...e)=>{var o;null===(o=I.current)||void 0===o||o.insertModelNode(...e)},Z=(...e)=>P(void 0,void 0,void 0,(function*(){var o;yield null===(o=I.current)||void 0===o?void 0:o.insertSlotModelNode(...e)})),V=(...e)=>{var o;null===(o=I.current)||void 0===o||o.deleteModelNode(...e)},T=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateBloom(...e)},D=({sku:e,glb:o})=>P(void 0,void 0,void 0,(function*(){var t,n;if(o)return(null===(t=I.current)||void 0===t?void 0:t.loadMaterials(o))||!1;if(e){const{glb:o}=yield(0,b.Z)(e);return(null===(n=I.current)||void 0===n?void 0:n.loadMaterials(o))||!1}return!1})),F=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setMaterial(...e)},_=(...e)=>{var o;return(null===(o=I.current)||void 0===o?void 0:o.setCustomMaterial(...e))||Promise.resolve(!1)},G=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getAllSlotsMaterials())||null},L=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getAllSlotsModels())||null},J=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setModel(...e)},Q=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setCamera(...e)},q=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateShadow(...e)},K=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateFog(...e)},W=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateBloomProps(...e)},X=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateEnvironment(...e)},Y=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getCamera())||null},ee=(e,t=!0)=>P(void 0,void 0,void 0,(function*(){try{if(!I.current)throw new C("Viewer not completely loaded!");let n=null;try{n=I.current.getCurrentCustomization(e)}catch(e){console.error(`Error on get current customization: ${e.message}`)}if(!n)throw new C("No customization returned!");M(n);const r=yield x(o,n);if(!r.glb){let e=null;try{e=yield I.current.getCustomizedModel(t)}catch(e){console.error(`Error on export the customization glb: ${e.message}`)}if(!e)throw new C("Could not export the customization glb!");r.glb=yield function(e,o,t){return y(this,void 0,void 0,(function*(){try{const n=`/viewer-customization/customer/${a.Z.customer._id}/products/${e}/upload-customization-data?customization=${encodeURI(JSON.stringify(o))}`,r=yield(0,w.U2)(n),i=new File([t],r.filename),l=new FormData;return Object.keys(r.fields).forEach((e=>l.append(e,r.fields[e]))),l.append("file",i),yield fetch(r.url,{method:"POST",body:l}),r.url.concat(r.fields.key)}catch(e){return console.error(`Error on upload customization: ${e.message}`),Promise.reject(e)}}))}(o,n,e)}if(!r.usdz){const e=yield function(e,o){return y(this,void 0,void 0,(function*(){try{const t=`/viewer-customization/customers/${a.Z.customer._id}/products/${e}/convert`;return yield(0,w.v_)(t,{filename:o})}catch(e){return console.error(`Error on request sku conversion: ${e.message}`),Promise.reject(e)}}))}(o,r.glb.split("/").pop());if("success"!==(yield E(e.jobId)))throw new C("Error while converting to usdz!");r.usdz=e.usdz}return x(o,n),r}catch(e){return console.error(`Error getting customization AR: ${e.message}`),Promise.reject(e)}})),oe=(e=!1,o=!0)=>P(void 0,void 0,void 0,(function*(){try{const t=yield ee(e,o);return(0,k.activateAR)({glb:t.glb,usdz:t.usdz,mode:"ar_preferred"}),!0}catch(e){return console.error(`Error opening AR: ${e.message}`),!1}})),te=(e,o=!1,t=!0)=>P(void 0,void 0,void 0,(function*(){try{const i=yield ee(o,t),a=`https://viewer.r2u.io/?customizationUri=${encodeURIComponent(i.glb.replace("https://storage.googleapis.com/","").replace(/\.glb$/,""))}&autoOpen=1`;return r.render(n.createElement(l(),Object.assign({},{"data-url":a},{value:a,style:{width:"100%",height:"100%"},renderAs:"svg"})),e),!0}catch(e){return console.error(`Error generating QR Code: ${e.message}`),!1}})),ne=(e=!1,o=!0)=>P(void 0,void 0,void 0,(function*(){try{const t=yield ee(e,o);return`https://viewer.r2u.io/?customizationUri=${encodeURIComponent(t.glb.replace("https://storage.googleapis.com/","").replace(/\.glb$/,""))}&autoOpen=1`}catch(e){return console.error(`Error generating viewer URL: ${e.message}`),null}})),re=(...e)=>{I.current&&I.current.downloadGlb(...e)},ie=e=>P(void 0,void 0,void 0,(function*(){const o=setInterval((()=>{I.current&&(clearInterval(o),e())}),200);setTimeout((()=>{if(!I.current)throw clearInterval(o),new Error("Internal error: Unable to load viewerRefFunctions.")}),1e4)})),le=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.insertHotspot(...e)}))})),ae=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.updateHotspot(...e)}))})),ue=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.deleteHotspot(...e)}))})),ce=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.showHotspot(...e)}))})),se=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.hideHotspot(...e)}))})),de=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.focusHotspot(...e)}))})),pe=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getActiveHotspotId())||null},ve=(...e)=>P(void 0,void 0,void 0,(function*(){yield ie((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.lookToHotspot(...e)}))})),me=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getSceneTree())||null},fe=(...e)=>{var o;null===(o=I.current)||void 0===o||o.playAnimation(...e)},ge=()=>{var e;null===(e=I.current)||void 0===e||e.pauseAnimation()},be=(...e)=>P(void 0,void 0,void 0,(function*(){var o;null===(o=I.current)||void 0===o||o.stopAnimation(...e)})),he=(...e)=>P(void 0,void 0,void 0,(function*(){var o;return(null===(o=I.current)||void 0===o?void 0:o.takeSnapshot(...e))||null})),we=(...e)=>P(void 0,void 0,void 0,(function*(){var o;null===(o=I.current)||void 0===o||o.updateBackground(...e)}));r.render(n.createElement(m,Object.assign({ref:U,alt:t||z,autoRotate:d,poster:s,refViewer:j,refViewerPopup:H,refViewerFunctions:I,waterMarkPosition:O,progressBarPosition:u,progressBarColor:c,popup:i},N,p,{componentDidMount:h.E9.componentDidMount,onClick:e=>{h.E9.onClick(),(null==p?void 0:p.onClick)&&(null==p||p.onClick(e))},onSessionTimeCollect:h.E9.onSessionTimeCollect,ModelViewerElement:g(),onLoad:()=>{v({setSku:A,insertModelNode:B,insertSlotModelNode:Z,deleteModelNode:V,loadMaterials:D,setMaterial:F,setCustomMaterial:_,getAllSlotsMaterials:G,updateBloom:T,getAllSlotsModels:L,setModel:J,setCamera:Q,updateShadow:q,updateFog:K,updateBloomProps:W,updateEnvironment:X,getCamera:Y,insertHotspot:le,updateHotspot:ae,deleteHotspot:ue,showHotspot:ce,hideHotspot:se,focusHotspot:de,getActiveHotspotId:pe,lookToHotspot:ve,customization:{openAR:oe,renderQRCode:te,getViewerURL:ne},getSceneTree:me,playAnimation:fe,pauseAnimation:ge,stopAnimation:be,downloadGlb:re,takeSnapshot:he,updateBackground:we})},glbSrc:$})),e)}))))}))}},5671:function(e,o,t){function n(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}t.d(o,{Z:function(){return n}})},3144:function(e,o,t){function n(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,o,t){return o&&n(e.prototype,o),t&&n(e,t),e}t.d(o,{Z:function(){return r}})},4942:function(e,o,t){function n(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}t.d(o,{Z:function(){return n}})},1002:function(e,o,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.d(o,{Z:function(){return n}})}}]);
123
+ `;var p=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t};const v=(0,n.forwardRef)(((e,o)=>{const{exitImgSrc:t="https://sdk.r2u.io/assets/exit-icon.png",expandImgSrc:r="https://sdk.r2u.io/assets/expand-icon.png",popup:i=!0,children:l=null,waterMarkPosition:u,refViewerPopup:s,ModelViewerElement:v,refViewerFunctions:m}=e,f=p(e,["exitImgSrc","expandImgSrc","popup","children","waterMarkPosition","refViewerPopup","ModelViewerElement","refViewerFunctions"]),[g,b]=(0,n.useState)(!1),h=()=>{b(!1)};(0,n.useEffect)((()=>{s&&s.current&&s.current.addEventListener("mousedown",(e=>(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!1)))}),[s]);const w=(0,n.useRef)(null),[y,x]=(0,n.useState)(!1),[E,k]=(0,n.useState)(f.glbSrc);return(0,n.useImperativeHandle)(o,(()=>({updateGlb:e=>{k(e)}})),[]),n.createElement(d,{expanded:g,bloom:y},n.createElement("div",{className:"viewer-container"},E&&n.createElement(v,Object.assign({ref:m,componentDidMount:f.componentDidMount,onClick:f.onClick,onSessionTimeCollect:f.onSessionTimeCollect},f,{glbSrc:E}),l,i&&n.createElement("button",{className:"expand-button",type:"button",onClick:()=>{b(!0)}},n.createElement("img",{className:"expand-image",alt:"",src:r})),u&&n.createElement(a.Z,{position:u}))),i&&g&&n.createElement("div",{className:"background",onMouseDown:h},n.createElement("div",{className:"viewer-container popup"},E&&n.createElement(v,Object.assign({ref:w,componentDidMount:f.componentDidMount,onClick:f.onClick,onSessionTimeCollect:f.onSessionTimeCollect},f,{enableBloomButton:!1,glbSrc:E}),l,f.bloom&&n.createElement("button",{className:"bloomButton",type:"button",onMouseDown:e=>e.stopPropagation(),onClick:()=>{x(!y),w.current&&w.current.updateBloom(!y)}},y?n.createElement(c.cu,{className:"lamp"}):n.createElement(c.H_,{className:"lamp"})),n.createElement("button",{className:"exit-button",type:"button",onClick:h},n.createElement("img",{alt:"",src:t})),u&&n.createElement(a.Z,{position:u})))))}));v.displayName="R2UModelViewer";var m=v,f=t(1841),g=t.n(f),b=t(7523),h=t(7374),w=t(2297),y=function(e,o,t,n){return new(t||(t=Promise))((function(r,i){function l(e){try{a(n.next(e))}catch(e){i(e)}}function u(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(l,u)}a((n=n.apply(e,o||[])).next())}))};function x(e,o){return y(this,void 0,void 0,(function*(){try{const t=`/viewer-customization/customer/${u.Z.customer._id}/products/${e}?customization=${encodeURI(JSON.stringify(o))}`;return(yield(0,w.U2)(t))||{}}catch(e){return console.error(`Error on getting customized model: ${e.message}`),Promise.reject(e)}}))}function E(e){return y(this,void 0,void 0,(function*(){try{const{status:o}=yield(0,w.U2)(`/job-status/${e}`);return["waiting","processing"].includes(o)?E(e):o}catch(e){return console.error(`Error on retry check conversion: ${e.message}`),Promise.reject(e)}}))}var k=t(5865);const S=({materialSlots:e,modelSlots:o})=>{e.sort(((e,o)=>e.slot>o.slot?1:e.slot<o.slot?-1:0)),o.sort(((e,o)=>e.slot>o.slot?1:e.slot<o.slot?-1:0)),o.forEach((e=>{e.activeModel&&S(e.activeModel)}))};var M=S;class C extends Error{constructor(e){super(e),this.name="ViewerError"}}var P=function(e,o,t,n){return new(t||(t=Promise))((function(r,i){function l(e){try{a(n.next(e))}catch(e){i(e)}}function u(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(l,u)}a((n=n.apply(e,o||[])).next())}))};var z={create:({element:e,sku:o,name:t,popup:i=!0,progressBarPosition:a="top",progressBarColor:c,poster:s,autoRotate:d=!0,viewerProps:p})=>P(void 0,void 0,void 0,(function*(){return new Promise(((v,f)=>P(void 0,void 0,void 0,(function*(){if(!u.Z.init)return f(new Error("R2U - Not initialized"));if(!o)return f(new Error("R2U - Missing SKU"));const{glb:S,name:z,viewerOptions:R}=yield(0,b.Z)(o);let $=S;const O=u.Z.customer.waterMarkPosition,N=R||u.Z.customer.viewerOptions||void 0,j=(0,n.createRef)(),H=(0,n.createRef)(),I=(0,n.createRef)(),U=(0,n.createRef)(),A=e=>P(void 0,void 0,void 0,(function*(){return new Promise(((o,t)=>P(void 0,void 0,void 0,(function*(){var n,r;try{const{glb:t}=yield(0,b.Z)(e);$=t,yield null===(n=I.current)||void 0===n?void 0:n.updateGlb(t),null===(r=U.current)||void 0===r||r.updateGlb(t),o()}catch(e){t(e)}}))))})),B=(...e)=>{var o;null===(o=I.current)||void 0===o||o.insertModelNode(...e)},Z=(...e)=>P(void 0,void 0,void 0,(function*(){var o;yield null===(o=I.current)||void 0===o?void 0:o.insertSlotModelNode(...e)})),V=(...e)=>{var o;null===(o=I.current)||void 0===o||o.deleteModelNode(...e)},T=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateBloom(...e)},D=({sku:e,glb:o})=>P(void 0,void 0,void 0,(function*(){var t,n;if(o)return(null===(t=I.current)||void 0===t?void 0:t.loadMaterials(o))||!1;if(e){const{glb:o}=yield(0,b.Z)(e);return(null===(n=I.current)||void 0===n?void 0:n.loadMaterials(o))||!1}return!1})),F=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setMaterial(...e)},G=(...e)=>{var o;return(null===(o=I.current)||void 0===o?void 0:o.setCustomMaterial(...e))||Promise.resolve(!1)},_=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getAllSlotsMaterials())||null},L=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getAllSlotsModels())||null},J=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setModel(...e)},Q=(...e)=>{var o;null===(o=I.current)||void 0===o||o.setCamera(...e)},q=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateShadow(...e)},K=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateFog(...e)},W=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateBloomProps(...e)},X=(...e)=>{var o;null===(o=I.current)||void 0===o||o.updateEnvironment(...e)},Y=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getCamera())||null},ee=(e,t=!0)=>P(void 0,void 0,void 0,(function*(){try{if(!I.current)throw new C("Viewer not completely loaded!");let n=null;try{n=I.current.getCurrentCustomization(e)}catch(e){console.error(`Error on get current customization: ${e.message}`)}if(!n)throw new C("No customization returned!");M(n);const r=yield x(o,n);if(!r.glb){let e=null;try{e=yield I.current.getCustomizedModel(t)}catch(e){console.error(`Error on export the customization glb: ${e.message}`)}if(!e)throw new C("Could not export the customization glb!");r.glb=yield function(e,o,t){return y(this,void 0,void 0,(function*(){try{const n=`/viewer-customization/customer/${u.Z.customer._id}/products/${e}/upload-customization-data?customization=${encodeURI(JSON.stringify(o))}`,r=yield(0,w.U2)(n),i=new File([t],r.filename),l=new FormData;return Object.keys(r.fields).forEach((e=>l.append(e,r.fields[e]))),l.append("file",i),yield fetch(r.url,{method:"POST",body:l}),r.url.concat(r.fields.key)}catch(e){return console.error(`Error on upload customization: ${e.message}`),Promise.reject(e)}}))}(o,n,e)}if(!r.usdz){const e=yield function(e,o){return y(this,void 0,void 0,(function*(){try{const t=`/viewer-customization/customers/${u.Z.customer._id}/products/${e}/convert`;return yield(0,w.v_)(t,{filename:o})}catch(e){return console.error(`Error on request sku conversion: ${e.message}`),Promise.reject(e)}}))}(o,r.glb.split("/").pop());if("success"!==(yield E(e.jobId)))throw new C("Error while converting to usdz!");r.usdz=e.usdz}return x(o,n),r}catch(e){return console.error(`Error getting customization AR: ${e.message}`),Promise.reject(e)}})),oe=(e=!1,o=!0)=>P(void 0,void 0,void 0,(function*(){try{const t=yield ee(e,o);return(0,k.activateAR)({glb:t.glb,usdz:t.usdz,mode:"ar_preferred"}),!0}catch(e){return console.error(`Error opening AR: ${e.message}`),!1}})),te=(e,o=!1,t=!0)=>P(void 0,void 0,void 0,(function*(){try{const i=yield ee(o,t),u=`https://viewer.r2u.io/?customizationUri=${encodeURIComponent(i.glb.replace("https://storage.googleapis.com/","").replace(/\.glb$/,""))}&autoOpen=1`;return r.render(n.createElement(l(),Object.assign({},{"data-url":u},{value:u,style:{width:"100%",height:"100%"},renderAs:"svg"})),e),!0}catch(e){return console.error(`Error generating QR Code: ${e.message}`),!1}})),ne=(e=!1,o=!0)=>P(void 0,void 0,void 0,(function*(){try{const t=yield ee(e,o);return`https://viewer.r2u.io/?customizationUri=${encodeURIComponent(t.glb.replace("https://storage.googleapis.com/","").replace(/\.glb$/,""))}&autoOpen=1`}catch(e){return console.error(`Error generating viewer URL: ${e.message}`),null}})),re=(...e)=>{I.current&&I.current.downloadGlb(...e)},ie=e=>P(void 0,void 0,void 0,(function*(){return I.current?I.current.getCustomizedModel(e):null})),le=e=>P(void 0,void 0,void 0,(function*(){const o=setInterval((()=>{I.current&&(clearInterval(o),e())}),200);setTimeout((()=>{if(!I.current)throw clearInterval(o),new Error("Internal error: Unable to load viewerRefFunctions.")}),1e4)})),ue=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.insertHotspot(...e)}))})),ae=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.updateHotspot(...e)}))})),ce=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.deleteHotspot(...e)}))})),se=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.showHotspot(...e)}))})),de=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.hideHotspot(...e)}))})),pe=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.focusHotspot(...e)}))})),ve=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getActiveHotspotId())||null},me=(...e)=>P(void 0,void 0,void 0,(function*(){yield le((()=>{var o;return null===(o=I.current)||void 0===o?void 0:o.lookToHotspot(...e)}))})),fe=()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.getSceneTree())||null},ge=(...e)=>{var o;null===(o=I.current)||void 0===o||o.playAnimation(...e)},be=()=>{var e;null===(e=I.current)||void 0===e||e.pauseAnimation()},he=(...e)=>P(void 0,void 0,void 0,(function*(){var o;null===(o=I.current)||void 0===o||o.stopAnimation(...e)})),we=(...e)=>P(void 0,void 0,void 0,(function*(){var o;return(null===(o=I.current)||void 0===o?void 0:o.takeSnapshot(...e))||null})),ye=(...e)=>P(void 0,void 0,void 0,(function*(){var o;null===(o=I.current)||void 0===o||o.updateBackground(...e)}));r.render(n.createElement(m,Object.assign({ref:U,alt:t||z,autoRotate:d,poster:s,refViewer:j,refViewerPopup:H,refViewerFunctions:I,waterMarkPosition:O,progressBarPosition:a,progressBarColor:c,popup:i},N,p,{componentDidMount:h.E9.componentDidMount,onClick:e=>{h.E9.onClick(),(null==p?void 0:p.onClick)&&(null==p||p.onClick(e))},onSessionTimeCollect:h.E9.onSessionTimeCollect,ModelViewerElement:g(),onLoad:()=>{v({setSku:A,insertModelNode:B,insertSlotModelNode:Z,deleteModelNode:V,loadMaterials:D,setMaterial:F,setCustomMaterial:G,getAllSlotsMaterials:_,updateBloom:T,getAllSlotsModels:L,setModel:J,setCamera:Q,updateShadow:q,updateFog:K,updateBloomProps:W,updateEnvironment:X,getCamera:Y,insertHotspot:ue,updateHotspot:ae,deleteHotspot:ce,showHotspot:se,hideHotspot:de,focusHotspot:pe,getActiveHotspotId:ve,lookToHotspot:me,customization:{openAR:oe,renderQRCode:te,getViewerURL:ne,getGlb:ie},getSceneTree:fe,playAnimation:ge,pauseAnimation:be,stopAnimation:he,downloadGlb:re,takeSnapshot:we,updateBackground:ye})},glbSrc:$})),e)}))))}))}},5671:function(e,o,t){function n(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}t.d(o,{Z:function(){return n}})},3144:function(e,o,t){function n(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,o,t){return o&&n(e.prototype,o),t&&n(e,t),e}t.d(o,{Z:function(){return r}})},4942:function(e,o,t){function n(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}t.d(o,{Z:function(){return n}})},1002:function(e,o,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.d(o,{Z:function(){return n}})}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2u/javascript-ar-sdk",
3
- "version": "6.22.4",
3
+ "version": "6.22.6",
4
4
  "main": "dist/index.js",
5
5
  "unpkg": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "dev": "yarn build:dev && webpack serve --mode=development",
13
- "build:dev": "REACT_APP_VERSION=$(jq -r \".version\" package.json) webpack --mode=development && yarn build:types",
13
+ "build:dev": "REACT_APP_VERSION=$(node -p \"require('./package.json').version\") webpack --mode=development && yarn build:types",
14
14
  "build": "REACT_APP_VERSION=$(jq -r \".version\" package.json) webpack --mode=production && yarn build:types",
15
15
  "build:types": "tsc && npx tsc-alias",
16
16
  "clean": "rm -rf dist/ public/dist/",