UNPKG

meshkraft-viewer

Version:

Web viewer SDK for Meshkraft Platform

12 lines (11 loc) 44.5 kB
const e={ERROR:"ar-error",BANNER_PRESS:"add-to-cart"};null!=navigator.xr&&null!=self.XRSession&&navigator.xr.isSessionSupported;const t=(()=>{const e=navigator.userAgent||navigator.vendor||self.opera;let t=!1;return(/(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),t})();/\bCrOS\b/.test(navigator.userAgent);const i=/android/i.test(navigator.userAgent),n=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);const r=/firefox/i.test(navigator.userAgent),s=/OculusBrowser/.test(navigator.userAgent);n&&/CriOS\//.test(navigator.userAgent);const o=Boolean(window.webkit&&window.webkit.messageHandlers),a=i&&!r&&!s,c=(()=>{if(n){if(o)return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));{const e=document.createElement("a");return Boolean(e.relList&&e.relList.supports&&e.relList.supports("ar"))}}return!1})();let u;var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var d,f,g=(d=function(e,t){e.exports=function e(t,i,n){function r(o,a){if(!i[o]){if(!t[o]){if(!a&&h)return h(o);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[o]={exports:{}};t[o][0].call(u.exports,(function(e){return r(t[o][1][e]||e)}),u,u.exports,e,t,i,n)}return i[o].exports}for(var s=h,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.create=i.visible=void 0;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.createElement("div");return i.innerHTML=e.trim(),!0===t?i.children:i.firstChild},r=function(e,t){var i=e.children;return 1===i.length&&i[0].tagName===t},s=function(e){return null!=(e=e||document.querySelector(".basicLightbox"))&&!0===e.ownerDocument.body.contains(e)};i.visible=s,i.create=function(e,t){var i=function(e,t){var i=n('\n\t\t<div class="basicLightbox '.concat(t.className,'">\n\t\t\t<div class="basicLightbox__placeholder" role="dialog"></div>\n\t\t</div>\n\t')),s=i.querySelector(".basicLightbox__placeholder");e.forEach((function(e){return s.appendChild(e)}));var o=r(s,"IMG"),a=r(s,"VIDEO"),c=r(s,"IFRAME");return!0===o&&i.classList.add("basicLightbox--img"),!0===a&&i.classList.add("basicLightbox--video"),!0===c&&i.classList.add("basicLightbox--iframe"),i}(e=function(e){var t="string"==typeof e,i=e instanceof HTMLElement==1;if(!1===t&&!1===i)throw new Error("Content must be a DOM element/node or string");return!0===t?Array.from(n(e,!0)):"TEMPLATE"===e.tagName?[e.content.cloneNode(!0)]:Array.from(e.children)}(e),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==(e=Object.assign({},e)).closable&&(e.closable=!0),null==e.className&&(e.className=""),null==e.onShow&&(e.onShow=function(){}),null==e.onClose&&(e.onClose=function(){}),"boolean"!=typeof e.closable)throw new Error("Property `closable` must be a boolean");if("string"!=typeof e.className)throw new Error("Property `className` must be a string");if("function"!=typeof e.onShow)throw new Error("Property `onShow` must be a function");if("function"!=typeof e.onClose)throw new Error("Property `onClose` must be a function");return e}(t)),o=function(e){return!1!==t.onClose(a)&&function(e,t){return e.classList.remove("basicLightbox--visible"),setTimeout((function(){return!1===s(e)||e.parentElement.removeChild(e),t()}),410),!0}(i,(function(){if("function"==typeof e)return e(a)}))};!0===t.closable&&i.addEventListener("click",(function(e){e.target===i&&o()}));var a={element:function(){return i},visible:function(){return s(i)},show:function(e){return!1!==t.onShow(a)&&function(e,t){return document.body.appendChild(e),setTimeout((function(){requestAnimationFrame((function(){return e.classList.add("basicLightbox--visible"),t()}))}),10),!0}(i,(function(){if("function"==typeof e)return e(a)}))},close:o};return a}},{}]},{},[1])(1)},d(f={exports:{}},f.exports),f.exports);let p=null;class m{}m.render=function(e,t){p(e,t)},self.QrCreator=m,function(e){function t(t,i,n,r){var s={},o=e(n,i);o.u(t),o.J(),r=r||0;var a=o.h(),c=o.h()+2*r;return s.text=t,s.level=i,s.version=n,s.O=c,s.a=function(e,t){return t-=r,!(0>(e-=r)||e>=a||0>t||t>=a)&&o.a(e,t)},s}function i(e,t,i,n,r,s,o,a,c,u){function l(t,i,n,r,o,a,c){t?(e.lineTo(i+a,n+c),e.arcTo(i,n,r,o,s)):e.lineTo(i,n)}o?e.moveTo(t+s,i):e.moveTo(t,i),l(a,n,i,n,r,-s,0),l(c,n,r,t,r,0,-s),l(u,t,r,t,i,s,0),l(o,t,i,n,i,0,s)}function n(e,t,i,n,r,s,o,a,c,u){function l(t,i,n,r){e.moveTo(t+n,i),e.lineTo(t,i),e.lineTo(t,i+r),e.arcTo(t,i,t+n,i,s)}o&&l(t,i,s,s),a&&l(n,i,-s,s),c&&l(n,r,-s,-s),u&&l(t,r,s,-s)}function r(e,r){e:{var s=r.text,o=r.v,a=r.N,c=r.K,u=r.P;for(a=Math.max(1,a||1),c=Math.min(40,c||40);a<=c;a+=1)try{var l=t(s,o,a,u);break e}catch(e){}l=void 0}if(!l)return null;for(s=e.getContext("2d"),r.background&&(s.fillStyle=r.background,s.fillRect(r.left,r.top,r.size,r.size)),o=l.O,c=r.size/o,s.beginPath(),u=0;u<o;u+=1)for(a=0;a<o;a+=1){var h=s,d=r.left+a*c,f=r.top+u*c,g=u,p=a,m=l.a,w=d+c,b=f+c,v=g-1,A=g+1,S=p-1,k=p+1,y=Math.floor(Math.min(.5,Math.max(0,r.R))*c),x=m(g,p),_=m(v,S),P=m(v,p);v=m(v,k);var C=m(g,k);k=m(A,k),p=m(A,p),A=m(A,S),g=m(g,S),d=Math.round(d),f=Math.round(f),w=Math.round(w),b=Math.round(b),x?i(h,d,f,w,b,y,!P&&!g,!P&&!C,!p&&!C,!p&&!g):n(h,d,f,w,b,y,P&&g&&_,P&&C&&v,p&&C&&k,p&&g&&A)}return function(e,t){var i=t.fill;if("string"==typeof i)e.fillStyle=i;else{var n=i.type,r=i.colorStops;if(i=i.position.map((e=>Math.round(e*t.size))),"linear-gradient"===n)var s=e.createLinearGradient.apply(e,i);else{if("radial-gradient"!==n)throw Error("Unsupported fill");s=e.createRadialGradient.apply(e,i)}r.forEach((([e,t])=>{s.addColorStop(e,t)})),e.fillStyle=s}}(s,r),s.fill(),e}var s={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};p=function(e,t){var i={};Object.assign(i,s,e),i.N=i.minVersion,i.K=i.maxVersion,i.v=i.ecLevel,i.left=i.left,i.top=i.top,i.size=i.size,i.fill=i.fill,i.background=i.background,i.text=i.text,i.R=i.radius,i.P=i.quiet,t instanceof HTMLCanvasElement?(t.width===i.size&&t.height===i.size||(t.width=i.size,t.height=i.size),t.getContext("2d").clearRect(0,0,t.width,t.height),r(t,i)):((e=document.createElement("canvas")).width=i.size,e.height=i.size,i=r(e,i),t.appendChild(i))}}(function(){function e(r,o){function a(e,t){for(var i=-1;7>=i;i+=1)if(!(-1>=e+i||h<=e+i))for(var n=-1;7>=n;n+=1)-1>=t+n||h<=t+n||(l[e+i][t+n]=0<=i&&6>=i&&(0==n||6==n)||0<=n&&6>=n&&(0==i||6==i)||2<=i&&4>=i&&2<=n&&4>=n)}function c(e,i){for(var o=h=4*r+17,c=Array(o),g=0;g<o;g+=1){c[g]=Array(o);for(var p=0;p<o;p+=1)c[g][p]=null}for(l=c,a(0,0),a(h-7,0),a(0,h-7),o=n.G(r),c=0;c<o.length;c+=1)for(g=0;g<o.length;g+=1){p=o[c];var m=o[g];if(null==l[p][m])for(var w=-2;2>=w;w+=1)for(var b=-2;2>=b;b+=1)l[p+w][m+b]=-2==w||2==w||-2==b||2==b||0==w&&0==b}for(o=8;o<h-8;o+=1)null==l[o][6]&&(l[o][6]=0==o%2);for(o=8;o<h-8;o+=1)null==l[6][o]&&(l[6][o]=0==o%2);for(o=n.w(u<<3|i),c=0;15>c;c+=1)g=!e&&1==(o>>c&1),l[6>c?c:8>c?c+1:h-15+c][8]=g,l[8][8>c?h-c-1:9>c?15-c:14-c]=g;if(l[h-8][8]=!e,7<=r){for(o=n.A(r),c=0;18>c;c+=1)g=!e&&1==(o>>c&1),l[Math.floor(c/3)][c%3+h-8-3]=g;for(c=0;18>c;c+=1)g=!e&&1==(o>>c&1),l[c%3+h-8-3][Math.floor(c/3)]=g}if(null==d){for(e=s.I(r,u),o=function(){var e=[],t=0,i={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var n=0;n<t;n+=1)i.m(1==(e>>>t-n-1&1))},f:function(){return t},m:function(i){var n=Math.floor(t/8);e.length<=n&&e.push(0),i&&(e[n]|=128>>>t%8),t+=1}};return i}(),c=0;c<f.length;c+=1)g=f[c],o.put(4,4),o.put(g.b(),n.f(4,r)),g.write(o);for(c=g=0;c<e.length;c+=1)g+=e[c].j;if(o.f()>8*g)throw Error("code length overflow. ("+o.f()+">"+8*g+")");for(o.f()+4<=8*g&&o.put(0,4);0!=o.f()%8;)o.m(!1);for(;!(o.f()>=8*g)&&(o.put(236,8),!(o.f()>=8*g));)o.put(17,8);var v=0;for(g=c=0,p=Array(e.length),m=Array(e.length),w=0;w<e.length;w+=1){var A=e[w].j,S=e[w].o-A;for(c=Math.max(c,A),g=Math.max(g,S),p[w]=Array(A),b=0;b<p[w].length;b+=1)p[w][b]=255&o.B()[b+v];for(v+=A,b=n.C(S),A=t(p[w],b.b()-1).l(b),m[w]=Array(b.b()-1),b=0;b<m[w].length;b+=1)S=b+A.b()-m[w].length,m[w][b]=0<=S?A.c(S):0}for(b=o=0;b<e.length;b+=1)o+=e[b].o;for(o=Array(o),b=v=0;b<c;b+=1)for(w=0;w<e.length;w+=1)b<p[w].length&&(o[v]=p[w][b],v+=1);for(b=0;b<g;b+=1)for(w=0;w<e.length;w+=1)b<m[w].length&&(o[v]=m[w][b],v+=1);d=o}for(e=d,o=-1,c=h-1,g=7,p=0,i=n.F(i),m=h-1;0<m;m-=2)for(6==m&&--m;;){for(w=0;2>w;w+=1)null==l[c][m-w]&&(b=!1,p<e.length&&(b=1==(e[p]>>>g&1)),i(c,m-w)&&(b=!b),l[c][m-w]=b,-1==--g&&(p+=1,g=7));if(0>(c+=o)||h<=c){c-=o,o=-o;break}}}var u=i[o],l=null,h=0,d=null,f=[],g={u:function(t){t=function(t){var i=e.s(t);return{S:function(){return 4},b:function(){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}}}(t),f.push(t),d=null},a:function(e,t){if(0>e||h<=e||0>t||h<=t)throw Error(e+","+t);return l[e][t]},h:function(){return h},J:function(){for(var e=0,t=0,i=0;8>i;i+=1){c(!0,i);var r=n.D(g);(0==i||e>r)&&(e=r,t=i)}c(!1,t)}};return g}function t(e,i){if(void 0===e.length)throw Error(e.length+"/"+i);var n=function(){for(var t=0;t<e.length&&0==e[t];)t+=1;for(var n=Array(e.length-t+i),r=0;r<e.length-t;r+=1)n[r]=e[r+t];return n}(),s={c:function(e){return n[e]},b:function(){return n.length},multiply:function(e){for(var i=Array(s.b()+e.b()-1),n=0;n<s.b();n+=1)for(var o=0;o<e.b();o+=1)i[n+o]^=r.i(r.g(s.c(n))+r.g(e.c(o)));return t(i,0)},l:function(e){if(0>s.b()-e.b())return s;for(var i=r.g(s.c(0))-r.g(e.c(0)),n=Array(s.b()),o=0;o<s.b();o+=1)n[o]=s.c(o);for(o=0;o<e.b();o+=1)n[o]^=r.i(r.g(e.c(o))+i);return t(n,0).l(e)}};return s}e.s=function(e){for(var t=[],i=0;i<e.length;i++){var n=e.charCodeAt(i);128>n?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||57344<=n?t.push(224|n>>12,128|n>>6&63,128|63&n):(i++,n=65536+((1023&n)<<10|1023&e.charCodeAt(i)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t};var i={L:1,M:0,Q:3,H:2},n=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var i=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n={w:function(t){for(var i=t<<10;0<=e(i)-e(1335);)i^=1335<<e(i)-e(1335);return 21522^(t<<10|i)},A:function(t){for(var i=t<<12;0<=e(i)-e(7973);)i^=7973<<e(i)-e(7973);return t<<12|i},G:function(e){return i[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var i=t([1],0),n=0;n<e;n+=1)i=i.multiply(t([1,r.i(n)],0));return i},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){for(var t=e.h(),i=0,n=0;n<t;n+=1)for(var r=0;r<t;r+=1){for(var s=0,o=e.a(n,r),a=-1;1>=a;a+=1)if(!(0>n+a||t<=n+a))for(var c=-1;1>=c;c+=1)0>r+c||t<=r+c||(0!=a||0!=c)&&o==e.a(n+a,r+c)&&(s+=1);5<s&&(i+=3+s-5)}for(n=0;n<t-1;n+=1)for(r=0;r<t-1;r+=1)s=0,e.a(n,r)&&(s+=1),e.a(n+1,r)&&(s+=1),e.a(n,r+1)&&(s+=1),e.a(n+1,r+1)&&(s+=1),(0==s||4==s)&&(i+=3);for(n=0;n<t;n+=1)for(r=0;r<t-6;r+=1)e.a(n,r)&&!e.a(n,r+1)&&e.a(n,r+2)&&e.a(n,r+3)&&e.a(n,r+4)&&!e.a(n,r+5)&&e.a(n,r+6)&&(i+=40);for(r=0;r<t;r+=1)for(n=0;n<t-6;n+=1)e.a(n,r)&&!e.a(n+1,r)&&e.a(n+2,r)&&e.a(n+3,r)&&e.a(n+4,r)&&!e.a(n+5,r)&&e.a(n+6,r)&&(i+=40);for(r=s=0;r<t;r+=1)for(n=0;n<t;n+=1)e.a(n,r)&&(s+=1);return i+Math.abs(100*s/t/t-50)/5*10}};return n}(),r=function(){for(var e=Array(256),t=Array(256),i=0;8>i;i+=1)e[i]=1<<i;for(i=8;256>i;i+=1)e[i]=e[i-4]^e[i-5]^e[i-6]^e[i-8];for(i=0;255>i;i+=1)t[e[i]]=i;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),s=function(){function e(e,n){switch(n){case i.L:return t[4*(e-1)];case i.M:return t[4*(e-1)+1];case i.Q:return t[4*(e-1)+2];case i.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],n={I:function(t,i){var n=e(t,i);if(void 0===n)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+i);t=n.length/3,i=[];for(var r=0;r<t;r+=1)for(var s=n[3*r],o=n[3*r+1],a=n[3*r+2],c=0;c<s;c+=1){var u=a,l={};l.o=o,l.j=u,i.push(l)}return i}};return n}();return e}());var w=QrCreator; /*! * device-uuid.js v1.0.4 (https://github.com/biggora/device-uuid/) * Copyright 2016-2017 Alexey Gordeyev * Licensed under MIT (https://github.com/biggora/device-uuid/blob/master/LICENSE) */!function(e){var t=new RegExp("^.*("+["\\+https:\\/\\/developers.google.com\\/\\+\\/web\\/snippet\\/","googlebot","baiduspider","gurujibot","yandexbot","slurp","msnbot","bingbot","facebookexternalhit","linkedinbot","twitterbot","slackbot","telegrambot","applebot","pingdom","tumblr ","Embedly","spbot"].join("|")+").*$"),i=function(e){e=e||{};var n={version:!1,language:!1,platform:!0,os:!0,pixelDepth:!0,colorDepth:!0,resolution:!1,isAuthoritative:!0,silkAccelerated:!0,isKindleFire:!0,isDesktop:!0,isMobile:!0,isTablet:!0,isWindows:!0,isLinux:!0,isLinux64:!0,isChromeOS:!0,isMac:!0,isiPad:!0,isiPhone:!0,isiPod:!0,isAndroid:!0,isSamsung:!0,isSmartTV:!0,isRaspberry:!0,isBlackberry:!0,isTouchScreen:!0,isOpera:!1,isIE:!1,isEdge:!1,isIECompatibilityMode:!1,isSafari:!1,isFirefox:!1,isWebkit:!1,isChrome:!1,isKonqueror:!1,isOmniWeb:!1,isSeaMonkey:!1,isFlock:!1,isAmaya:!1,isPhantomJS:!1,isEpiphany:!1,source:!1,cpuCores:!1};for(var r in e)e.hasOwnProperty(r)&&void 0!==n[r]&&(n[r]=e[r]);return this.options=n,this.version="1.0.0",this._Versions={Edge:/Edge\/([\d\w\.\-]+)/i,Firefox:/firefox\/([\d\w\.\-]+)/i,IE:/msie\s([\d\.]+[\d])|trident\/\d+\.\d+;.*[rv:]+(\d+\.\d)/i,Chrome:/chrome\/([\d\w\.\-]+)/i,Chromium:/(?:chromium|crios)\/([\d\w\.\-]+)/i,Safari:/version\/([\d\w\.\-]+)/i,Opera:/version\/([\d\w\.\-]+)|OPR\/([\d\w\.\-]+)/i,Ps3:/([\d\w\.\-]+)\)\s*$/i,Psp:/([\d\w\.\-]+)\)?\s*$/i,Amaya:/amaya\/([\d\w\.\-]+)/i,SeaMonkey:/seamonkey\/([\d\w\.\-]+)/i,OmniWeb:/omniweb\/v([\d\w\.\-]+)/i,Flock:/flock\/([\d\w\.\-]+)/i,Epiphany:/epiphany\/([\d\w\.\-]+)/i,WinJs:/msapphost\/([\d\w\.\-]+)/i,PhantomJS:/phantomjs\/([\d\w\.\-]+)/i,UC:/UCBrowser\/([\d\w\.]+)/i},this._Browsers={Edge:/edge/i,Amaya:/amaya/i,Konqueror:/konqueror/i,Epiphany:/epiphany/i,SeaMonkey:/seamonkey/i,Flock:/flock/i,OmniWeb:/omniweb/i,Chromium:/chromium|crios/i,Chrome:/chrome/i,Safari:/safari/i,IE:/msie|trident/i,Opera:/opera|OPR/i,PS3:/playstation 3/i,PSP:/playstation portable/i,Firefox:/firefox/i,WinJs:/msapphost/i,PhantomJS:/phantomjs/i,UC:/UCBrowser/i},this._OS={Windows10:/windows nt 10\.0/i,Windows81:/windows nt 6\.3/i,Windows8:/windows nt 6\.2/i,Windows7:/windows nt 6\.1/i,UnknownWindows:/windows nt 6\.\d+/i,WindowsVista:/windows nt 6\.0/i,Windows2003:/windows nt 5\.2/i,WindowsXP:/windows nt 5\.1/i,Windows2000:/windows nt 5\.0/i,WindowsPhone8:/windows phone 8\./,OSXCheetah:/os x 10[._]0/i,OSXPuma:/os x 10[._]1(\D|$)/i,OSXJaguar:/os x 10[._]2/i,OSXPanther:/os x 10[._]3/i,OSXTiger:/os x 10[._]4/i,OSXLeopard:/os x 10[._]5/i,OSXSnowLeopard:/os x 10[._]6/i,OSXLion:/os x 10[._]7/i,OSXMountainLion:/os x 10[._]8/i,OSXMavericks:/os x 10[._]9/i,OSXYosemite:/os x 10[._]10/i,OSXElCapitan:/os x 10[._]11/i,OSXSierra:/os x 10[._]12/i,Mac:/os x/i,Linux:/linux/i,Linux64:/linux x86_64/i,ChromeOS:/cros/i,Wii:/wii/i,PS3:/playstation 3/i,PSP:/playstation portable/i,iPad:/\(iPad.*os (\d+)[._](\d+)/i,iPhone:/\(iPhone.*os (\d+)[._](\d+)/i,Bada:/Bada\/(\d+)\.(\d+)/i,Curl:/curl\/(\d+)\.(\d+)\.(\d+)/i},this._Platform={Windows:/windows nt/i,WindowsPhone:/windows phone/i,Mac:/macintosh/i,Linux:/linux/i,Wii:/wii/i,Playstation:/playstation/i,iPad:/ipad/i,iPod:/ipod/i,iPhone:/iphone/i,Android:/android/i,Blackberry:/blackberry/i,Samsung:/samsung/i,Curl:/curl/i},this.DefaultAgent={isAuthoritative:!0,isMobile:!1,isTablet:!1,isiPad:!1,isiPod:!1,isiPhone:!1,isAndroid:!1,isBlackberry:!1,isOpera:!1,isIE:!1,isEdge:!1,isIECompatibilityMode:!1,isSafari:!1,isFirefox:!1,isWebkit:!1,isChrome:!1,isKonqueror:!1,isOmniWeb:!1,isSeaMonkey:!1,isFlock:!1,isAmaya:!1,isPhantomJS:!1,isEpiphany:!1,isDesktop:!1,isWindows:!1,isLinux:!1,isLinux64:!1,isMac:!1,isChromeOS:!1,isBada:!1,isSamsung:!1,isRaspberry:!1,isBot:!1,isCurl:!1,isAndroidTablet:!1,isWinJs:!1,isKindleFire:!1,isSilk:!1,isCaptive:!1,isSmartTV:!1,isUC:!1,isTouchScreen:!1,silkAccelerated:!1,colorDepth:-1,pixelDepth:-1,resolution:[],cpuCores:-1,language:"unknown",browser:"unknown",version:"unknown",os:"unknown",platform:"unknown",geoIp:{},source:"",hashInt:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t<i;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},hashMD5:function(e){function t(e,t){return e<<t|e>>>32-t}function i(e,t){var i,n,r,s,o;return r=2147483648&e,s=2147483648&t,o=(1073741823&e)+(1073741823&t),(i=1073741824&e)&(n=1073741824&t)?2147483648^o^r^s:i|n?1073741824&o?3221225472^o^r^s:1073741824^o^r^s:o^r^s}function n(e,n,r,s,o,a,c){return e=i(e,i(i(function(e,t,i){return e&t|~e&i}(n,r,s),o),c)),i(t(e,a),n)}function r(e,n,r,s,o,a,c){return e=i(e,i(i(function(e,t,i){return e&i|t&~i}(n,r,s),o),c)),i(t(e,a),n)}function s(e,n,r,s,o,a,c){return e=i(e,i(i(function(e,t,i){return e^t^i}(n,r,s),o),c)),i(t(e,a),n)}function o(e,n,r,s,o,a,c){return e=i(e,i(i(function(e,t,i){return t^(e|~i)}(n,r,s),o),c)),i(t(e,a),n)}function a(e){var t,i="",n="";for(t=0;t<=3;t++)i+=(n="0"+(e>>>8*t&255).toString(16)).substr(n.length-2,2);return i}var c,u,l,h,d,f,g,p,m,w;for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(e),c=function(e){for(var t,i=e.length,n=i+8,r=16*((n-n%64)/64+1),s=new Array(r-1),o=0,a=0;a<i;)o=a%4*8,s[t=(a-a%4)/4]=s[t]|e.charCodeAt(a)<<o,a++;return o=a%4*8,s[t=(a-a%4)/4]=s[t]|128<<o,s[r-2]=i<<3,s[r-1]=i>>>29,s}(e),g=1732584193,p=4023233417,m=2562383102,w=271733878,u=0;u<c.length;u+=16)l=g,h=p,d=m,f=w,g=n(g,p,m,w,c[u+0],7,3614090360),w=n(w,g,p,m,c[u+1],12,3905402710),m=n(m,w,g,p,c[u+2],17,606105819),p=n(p,m,w,g,c[u+3],22,3250441966),g=n(g,p,m,w,c[u+4],7,4118548399),w=n(w,g,p,m,c[u+5],12,1200080426),m=n(m,w,g,p,c[u+6],17,2821735955),p=n(p,m,w,g,c[u+7],22,4249261313),g=n(g,p,m,w,c[u+8],7,1770035416),w=n(w,g,p,m,c[u+9],12,2336552879),m=n(m,w,g,p,c[u+10],17,4294925233),p=n(p,m,w,g,c[u+11],22,2304563134),g=n(g,p,m,w,c[u+12],7,1804603682),w=n(w,g,p,m,c[u+13],12,4254626195),m=n(m,w,g,p,c[u+14],17,2792965006),g=r(g,p=n(p,m,w,g,c[u+15],22,1236535329),m,w,c[u+1],5,4129170786),w=r(w,g,p,m,c[u+6],9,3225465664),m=r(m,w,g,p,c[u+11],14,643717713),p=r(p,m,w,g,c[u+0],20,3921069994),g=r(g,p,m,w,c[u+5],5,3593408605),w=r(w,g,p,m,c[u+10],9,38016083),m=r(m,w,g,p,c[u+15],14,3634488961),p=r(p,m,w,g,c[u+4],20,3889429448),g=r(g,p,m,w,c[u+9],5,568446438),w=r(w,g,p,m,c[u+14],9,3275163606),m=r(m,w,g,p,c[u+3],14,4107603335),p=r(p,m,w,g,c[u+8],20,1163531501),g=r(g,p,m,w,c[u+13],5,2850285829),w=r(w,g,p,m,c[u+2],9,4243563512),m=r(m,w,g,p,c[u+7],14,1735328473),g=s(g,p=r(p,m,w,g,c[u+12],20,2368359562),m,w,c[u+5],4,4294588738),w=s(w,g,p,m,c[u+8],11,2272392833),m=s(m,w,g,p,c[u+11],16,1839030562),p=s(p,m,w,g,c[u+14],23,4259657740),g=s(g,p,m,w,c[u+1],4,2763975236),w=s(w,g,p,m,c[u+4],11,1272893353),m=s(m,w,g,p,c[u+7],16,4139469664),p=s(p,m,w,g,c[u+10],23,3200236656),g=s(g,p,m,w,c[u+13],4,681279174),w=s(w,g,p,m,c[u+0],11,3936430074),m=s(m,w,g,p,c[u+3],16,3572445317),p=s(p,m,w,g,c[u+6],23,76029189),g=s(g,p,m,w,c[u+9],4,3654602809),w=s(w,g,p,m,c[u+12],11,3873151461),m=s(m,w,g,p,c[u+15],16,530742520),g=o(g,p=s(p,m,w,g,c[u+2],23,3299628645),m,w,c[u+0],6,4096336452),w=o(w,g,p,m,c[u+7],10,1126891415),m=o(m,w,g,p,c[u+14],15,2878612391),p=o(p,m,w,g,c[u+5],21,4237533241),g=o(g,p,m,w,c[u+12],6,1700485571),w=o(w,g,p,m,c[u+3],10,2399980690),m=o(m,w,g,p,c[u+10],15,4293915773),p=o(p,m,w,g,c[u+1],21,2240044497),g=o(g,p,m,w,c[u+8],6,1873313359),w=o(w,g,p,m,c[u+15],10,4264355552),m=o(m,w,g,p,c[u+6],15,2734768916),p=o(p,m,w,g,c[u+13],21,1309151649),g=o(g,p,m,w,c[u+4],6,4149444226),w=o(w,g,p,m,c[u+11],10,3174756917),m=o(m,w,g,p,c[u+2],15,718787259),p=o(p,m,w,g,c[u+9],21,3951481745),g=i(g,l),p=i(p,h),m=i(m,d),w=i(w,f);return(a(g)+a(p)+a(m)+a(w)).toLowerCase()}},this.Agent={},this.getBrowser=function(e){switch(!0){case this._Browsers.Edge.test(e):return this.Agent.isEdge=!0,"Edge";case this._Browsers.PhantomJS.test(e):return this.Agent.isPhantomJS=!0,"PhantomJS";case this._Browsers.Konqueror.test(e):return this.Agent.isKonqueror=!0,"Konqueror";case this._Browsers.Amaya.test(e):return this.Agent.isAmaya=!0,"Amaya";case this._Browsers.Epiphany.test(e):return this.Agent.isEpiphany=!0,"Epiphany";case this._Browsers.SeaMonkey.test(e):return this.Agent.isSeaMonkey=!0,"SeaMonkey";case this._Browsers.Flock.test(e):return this.Agent.isFlock=!0,"Flock";case this._Browsers.OmniWeb.test(e):return this.Agent.isOmniWeb=!0,"OmniWeb";case this._Browsers.Opera.test(e):return this.Agent.isOpera=!0,"Opera";case this._Browsers.Chromium.test(e):return this.Agent.isChrome=!0,"Chromium";case this._Browsers.Chrome.test(e):return this.Agent.isChrome=!0,"Chrome";case this._Browsers.Safari.test(e):return this.Agent.isSafari=!0,"Safari";case this._Browsers.WinJs.test(e):return this.Agent.isWinJs=!0,"WinJs";case this._Browsers.IE.test(e):return this.Agent.isIE=!0,"IE";case this._Browsers.PS3.test(e):return"ps3";case this._Browsers.PSP.test(e):return"psp";case this._Browsers.Firefox.test(e):return this.Agent.isFirefox=!0,"Firefox";case this._Browsers.UC.test(e):return this.Agent.isUC=!0,"UCBrowser";default:return 0!==e.indexOf("Mozilla")&&/^([\d\w\-\.]+)\/[\d\w\.\-]+/i.test(e)?(this.Agent.isAuthoritative=!1,RegExp.$1):"unknown"}},this.getBrowserVersion=function(e){switch(this.Agent.browser){case"Edge":if(this._Versions.Edge.test(e))return RegExp.$1;break;case"PhantomJS":if(this._Versions.PhantomJS.test(e))return RegExp.$1;break;case"Chrome":if(this._Versions.Chrome.test(e))return RegExp.$1;break;case"Chromium":if(this._Versions.Chromium.test(e))return RegExp.$1;break;case"Safari":if(this._Versions.Safari.test(e))return RegExp.$1;break;case"Opera":if(this._Versions.Opera.test(e))return RegExp.$1?RegExp.$1:RegExp.$2;break;case"Firefox":if(this._Versions.Firefox.test(e))return RegExp.$1;break;case"WinJs":if(this._Versions.WinJs.test(e))return RegExp.$1;break;case"IE":if(this._Versions.IE.test(e))return RegExp.$2?RegExp.$2:RegExp.$1;break;case"ps3":if(this._Versions.Ps3.test(e))return RegExp.$1;break;case"psp":if(this._Versions.Psp.test(e))return RegExp.$1;break;case"Amaya":if(this._Versions.Amaya.test(e))return RegExp.$1;break;case"Epiphany":if(this._Versions.Epiphany.test(e))return RegExp.$1;break;case"SeaMonkey":if(this._Versions.SeaMonkey.test(e))return RegExp.$1;break;case"Flock":if(this._Versions.Flock.test(e))return RegExp.$1;break;case"OmniWeb":if(this._Versions.OmniWeb.test(e))return RegExp.$1;break;case"UCBrowser":if(this._Versions.UC.test(e))return RegExp.$1;break;default:if("unknown"!==this.Agent.browser&&new RegExp(this.Agent.browser+"[\\/ ]([\\d\\w\\.\\-]+)","i").test(e))return RegExp.$1}},this.getOS=function(e){switch(!0){case this._OS.WindowsVista.test(e):return this.Agent.isWindows=!0,"Windows Vista";case this._OS.Windows7.test(e):return this.Agent.isWindows=!0,"Windows 7";case this._OS.Windows8.test(e):return this.Agent.isWindows=!0,"Windows 8";case this._OS.Windows81.test(e):return this.Agent.isWindows=!0,"Windows 8.1";case this._OS.Windows10.test(e):return this.Agent.isWindows=!0,"Windows 10.0";case this._OS.Windows2003.test(e):return this.Agent.isWindows=!0,"Windows 2003";case this._OS.WindowsXP.test(e):return this.Agent.isWindows=!0,"Windows XP";case this._OS.Windows2000.test(e):return this.Agent.isWindows=!0,"Windows 2000";case this._OS.WindowsPhone8.test(e):return"Windows Phone 8";case this._OS.Linux64.test(e):return this.Agent.isLinux=!0,this.Agent.isLinux64=!0,"Linux 64";case this._OS.Linux.test(e):return this.Agent.isLinux=!0,"Linux";case this._OS.ChromeOS.test(e):return this.Agent.isChromeOS=!0,"Chrome OS";case this._OS.Wii.test(e):return"Wii";case this._OS.PS3.test(e):case this._OS.PSP.test(e):return"Playstation";case this._OS.OSXCheetah.test(e):return this.Agent.isMac=!0,"OS X Cheetah";case this._OS.OSXPuma.test(e):return this.Agent.isMac=!0,"OS X Puma";case this._OS.OSXJaguar.test(e):return this.Agent.isMac=!0,"OS X Jaguar";case this._OS.OSXPanther.test(e):return this.Agent.isMac=!0,"OS X Panther";case this._OS.OSXTiger.test(e):return this.Agent.isMac=!0,"OS X Tiger";case this._OS.OSXLeopard.test(e):return this.Agent.isMac=!0,"OS X Leopard";case this._OS.OSXSnowLeopard.test(e):return this.Agent.isMac=!0,"OS X Snow Leopard";case this._OS.OSXLion.test(e):return this.Agent.isMac=!0,"OS X Lion";case this._OS.OSXMountainLion.test(e):return this.Agent.isMac=!0,"OS X Mountain Lion";case this._OS.OSXMavericks.test(e):return this.Agent.isMac=!0,"OS X Mavericks";case this._OS.OSXYosemite.test(e):return this.Agent.isMac=!0,"OS X Yosemite";case this._OS.OSXElCapitan.test(e):return this.Agent.isMac=!0,"OS X El Capitan";case this._OS.OSXSierra.test(e):return this.Agent.isMac=!0,"macOS Sierra";case this._OS.Mac.test(e):return this.Agent.isMac=!0,"OS X";case this._OS.iPad.test(e):return this.Agent.isiPad=!0,e.match(this._OS.iPad)[0].replace("_",".");case this._OS.iPhone.test(e):return this.Agent.isiPhone=!0,e.match(this._OS.iPhone)[0].replace("_",".");case this._OS.Bada.test(e):return this.Agent.isBada=!0,"Bada";case this._OS.Curl.test(e):return this.Agent.isCurl=!0,"Curl";default:return"unknown"}},this.getPlatform=function(e){switch(!0){case this._Platform.Windows.test(e):return"Microsoft Windows";case this._Platform.WindowsPhone.test(e):return this.Agent.isWindowsPhone=!0,"Microsoft Windows Phone";case this._Platform.Mac.test(e):return"Apple Mac";case this._Platform.Curl.test(e):return"Curl";case this._Platform.Android.test(e):return this.Agent.isAndroid=!0,"Android";case this._Platform.Blackberry.test(e):return this.Agent.isBlackberry=!0,"Blackberry";case this._Platform.Linux.test(e):return"Linux";case this._Platform.Wii.test(e):return"Wii";case this._Platform.Playstation.test(e):return"Playstation";case this._Platform.iPad.test(e):return this.Agent.isiPad=!0,"iPad";case this._Platform.iPod.test(e):return this.Agent.isiPod=!0,"iPod";case this._Platform.iPhone.test(e):return this.Agent.isiPhone=!0,"iPhone";case this._Platform.Samsung.test(e):return this.Agent.isiSamsung=!0,"Samsung";default:return"unknown"}},this.testCompatibilityMode=function(){var e=this;if(this.Agent.isIE&&/Trident\/(\d)\.0/i.test(e.Agent.source)){var t=parseInt(RegExp.$1,10),i=parseInt(e.Agent.version,10);7===i&&7===t&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=11),7===i&&6===t&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=10),7===i&&5===t&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=9),7===i&&4===t&&(e.Agent.isIECompatibilityMode=!0,e.Agent.version=8)}},this.testSilk=function(){if(!0===new RegExp("silk","gi").test(this.Agent.source))this.Agent.isSilk=!0;return/Silk-Accelerated=true/gi.test(this.Agent.source)&&(this.Agent.SilkAccelerated=!0),!!this.Agent.isSilk&&"Silk"},this.testKindleFire=function(){var e=this;switch(!0){case/KFOT/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire";case/KFTT/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD";case/KFJWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9";case/KFJWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 8.9 4G";case/KFSOWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HD 7";case/KFTHWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7";case/KFTHWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 7 4G";case/KFAPWI/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9";case/KFAPWA/gi.test(e.Agent.source):return this.Agent.isKindleFire=!0,"Kindle Fire HDX 8.9 4G";default:return!1}},this.testCaptiveNetwork=function(){var e=this;return!0===/CaptiveNetwork/gi.test(e.Agent.source)&&(e.Agent.isCaptive=!0,e.Agent.isMac=!0,e.Agent.platform="Apple Mac","CaptiveNetwork")},this.testMobile=function(){var e=this;switch(!0){case e.Agent.isWindows:case e.Agent.isLinux:case e.Agent.isMac:case e.Agent.isChromeOS:e.Agent.isDesktop=!0;break;case e.Agent.isAndroid:case e.Agent.isSamsung:e.Agent.isMobile=!0,e.Agent.isDesktop=!1}switch(!0){case e.Agent.isiPad:case e.Agent.isiPod:case e.Agent.isiPhone:case e.Agent.isBada:case e.Agent.isBlackberry:case e.Agent.isAndroid:case e.Agent.isWindowsPhone:e.Agent.isMobile=!0,e.Agent.isDesktop=!1}/mobile/i.test(e.Agent.source)&&(e.Agent.isMobile=!0,e.Agent.isDesktop=!1)},this.testTablet=function(){var e=this;switch(!0){case e.Agent.isiPad:case e.Agent.isAndroidTablet:case e.Agent.isKindleFire:e.Agent.isTablet=!0}/tablet/i.test(e.Agent.source)&&(e.Agent.isTablet=!0)},this.testNginxGeoIP=function(e){var t=this;Object.keys(e).forEach((function(i){/^GEOIP/i.test(i)&&(t.Agent.geoIp[i]=e[i])}))},this.testBot=function(){var e=this,i=t.exec(e.Agent.source.toLowerCase());i?e.Agent.isBot=i[1]:e.Agent.isAuthoritative||(e.Agent.isBot=/bot/i.test(e.Agent.source))},this.testSmartTV=function(){var e=new RegExp("smart-tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv","gi").exec(this.Agent.source.toLowerCase());e&&(this.Agent.isSmartTV=e[1])},this.testAndroidTablet=function(){var e=this;e.Agent.isAndroid&&!/mobile/i.test(e.Agent.source)&&(e.Agent.isAndroidTablet=!0)},this.testTouchSupport=function(){this.Agent.isTouchScreen="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},this.getLaguage=function(){this.Agent.language=(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||"").toLowerCase()},this.getColorDepth=function(){this.Agent.colorDepth=screen.colorDepth||-1},this.getScreenResolution=function(){this.Agent.resolution=[screen.availWidth,screen.availHeight]},this.getPixelDepth=function(){this.Agent.pixelDepth=screen.pixelDepth||-1},this.getCPU=function(){this.Agent.cpuCores=navigator.hardwareConcurrency||-1},this.reset=function(){var e=this;for(var t in e.DefaultAgent)e.DefaultAgent.hasOwnProperty(t)&&(e.Agent[t]=e.DefaultAgent[t]);return e},this.parse=function(e){e=e||navigator.userAgent;var t=new i;return t.Agent.source=e.replace(/^\s*/,"").replace(/\s*$/,""),t.Agent.os=t.getOS(t.Agent.source),t.Agent.platform=t.getPlatform(t.Agent.source),t.Agent.browser=t.getBrowser(t.Agent.source),t.Agent.version=t.getBrowserVersion(t.Agent.source),t.testBot(),t.testSmartTV(),t.testMobile(),t.testAndroidTablet(),t.testTablet(),t.testCompatibilityMode(),t.testSilk(),t.testKindleFire(),t.testCaptiveNetwork(),t.testTouchSupport(),t.getLaguage(),t.getColorDepth(),t.getPixelDepth(),t.getScreenResolution(),t.getCPU(),t.Agent},this.get=function(e){var t=this.parse(),i=[];for(var n in this.options)this.options.hasOwnProperty(n)&&!0===this.options[n]&&i.push(t[n]);e&&i.push(e),!this.options.resolution&&t.isMobile&&i.push(t.resolution);var r=t.hashMD5(i.join(":"));return[r.slice(0,8),r.slice(8,12),"4"+r.slice(12,15),"b"+r.slice(15,18),r.slice(20)].join("-")},this.Agent=this.DefaultAgent,this};e.DeviceUUID=i,new i(navigator.userAgent)}(l); /*! * Meshkraft AR Button SDK * (c) 2021 ART Labs */ let b,v,A,S,k,y,x,_={debugMode:!1,showBanner:!1,bannerType:"default",title:null,subtitle:null,price:null},P=!1,C=W;const O=[];async function E(e=A){if(!e||!v)return console.warn("Meshkraft AR :: fetchProduct Error. SKU or Key not found");const t=new Headers;t.append("Content-Type","application/json");const i=await fetch(`https://api.artlabs.ai/product/${e}?token=${v}${_.debugMode?"&drafts=true":""}`,{headers:t});if(!i.ok)return 404===i.status?Promise.reject():Promise.reject("API Error :: "+i.statusText);return await i.json()}function M(){var e=document.createElement("a");if(e.href=document.location,e.hash.includes("#meshkraft-quick-ar")){return(e=>{var t,i,n=e.split("&"),r={};for(t=0;t<n.length;t++)(i=n[t].split("=")).length<2&&i.push(""),r[decodeURIComponent(i[0])]=decodeURIComponent(i[1]);return r})(e.hash)["#meshkraft-quick-ar"]}return!1}function L(e=A){const t=new URL(document.location);t.hash=`#meshkraft-quick-ar=${e}`,(e=>{const t=document.createElement("style");t.textContent=e,document.head.append(t)})(".basicLightbox{font-family:'Arial';position:fixed;display:flex;justify-content:center;align-items:center;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,.8);opacity:.01;transition:opacity .4s ease;z-index:1000;will-change:opacity}.basicLightbox--visible{opacity:1}.basicLightbox__placeholder{max-width:40%;transform:scale(.9);transition:transform .4s ease;z-index:1;will-change:transform}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{display:block;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;max-width:95%;max-height:95%}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{pointer-events:auto}.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{width:auto;height:auto}.basicLightbox--iframe .basicLightbox__placeholder,.basicLightbox--img .basicLightbox__placeholder,.basicLightbox--video .basicLightbox__placeholder{width:100%;height:100%;pointer-events:none}.basicLightbox--visible .basicLightbox__placeholder{transform:scale(1)}.meshkraft-modal{background-color: white;padding: 1.8em;display: flex;flex-direction: column;justify-content: center;align-items: center;}.meshkraft-modal h1,.meshkraft-modal p{color: #000;margin-bottom:20px;padding-left:10px;padding-right:10px;text-align:center}");g.create('<div class="meshkraft-modal">\n<h1>Scan QR Code</h1>\n<p>Point your mobile phone camera to the QR code below to experience in <br/>Augmented Reality</p>\n<canvas id="meshkraft-qr-canvas"></canvas>\n</div>').show(),w.render({text:t.href,radius:.5,ecLevel:"H",fill:"#000",background:null,size:250},document.querySelector("#meshkraft-qr-canvas"));R({name:"SHOW_DESKTOP_QR",sku:e,token:v})}function W(t=S){const{showBanner:i,bannerType:n,title:r=S.name,subtitle:s,price:o}=_;if(!t)return console.warn("MeshkraftAR :: Product is not ready");const{assets:a={}}=t||{},c={name:"START_AR",sku:t.SKU,token:v},l={name:"BANNER_CLICK",sku:t.SKU,token:v};if("quick-look"===P){if(!a?.usdz?.url)return console.debug("MeshkraftAR :: USDZ couldnt found");let h=a?.usdz?.url;!0===i&&(h=a?.usdz?.url+function(e,t){switch(e){case"apple-pay":return`#applePayButtonType=buy&checkoutTitle=${encodeURIComponent(t.name)}&checkoutSubtitle=${encodeURIComponent(t.description||"1 Item")}&price=${t.price}`;case"custom":return`#custom=https://meshkraft-banners.pages.dev/${t.path}`;default:return`#callToAction=${encodeURIComponent(t.callToAction||"Add to Cart")}&checkoutTitle=${encodeURIComponent(t.name||"-")}&checkoutSubtitle=${encodeURIComponent(t.description||"-")}&price=${t.price||"-"}`}}(n,{name:r,description:s,price:o,path:v}));return((e,t)=>{const i=e;u=document.createElement("a"),u.addEventListener("message",(function(e){"_apple_ar_quicklook_button_tapped"==e.data&&"function"==typeof t&&t()})),u.setAttribute("rel","ar"),u.setAttribute("href",i);const n=document.createElement("img");u.appendChild(n),u.click(),u.removeChild(n)})(h,(()=>{let i=new CustomEvent(e.BANNER_PRESS,{detail:{sku:t.SKU}});var n;n=i,b&&b.dispatchEvent(n),O.forEach((e=>{e.event===n.type&&"function"==typeof e.callback&&e.callback(n)})),R(l)})),R(c)}if("scene-viewer"===P){const e=t.assets.glb;return e?(((e,t="",i={})=>{const n=e,r=self.location.toString(),s=new URL(r),o=new URL(n,r);s.hash="#model-viewer-no-ar-fallback";const a=`intent://arvr.google.com/scene-viewer/1.2?file=${o.toString()}&title=${t}&enable_vertical_placement=${"Vertical"===i.orientation}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(s.toString())};end;`,c=document.createElement("a");c.setAttribute("href",a),c.click()})(e.url,r,t.category&&t.category.config),R(c)):console.debug("No GLB for SceneViewer")}}async function R({name:e,sku:t,token:i}){x||(k=(new window.DeviceUUID).parse(),y=[k.language,k.platform,k.os,k.cpuCores,k.isAuthoritative,k.silkAccelerated,k.isKindleFire,k.isDesktop,k.isMobile,k.isTablet,k.isWindows,k.isLinux,k.isLinux64,k.isMac,k.isiPad,k.isiPhone,k.isiPod,k.isSmartTV,k.pixelDepth,k.isTouchScreen],x=k.hashMD5(y.join(":")));try{if(x&&k){const n={key:e,count:1,segmentation:{sku:t,token:i,platform:"web"},dow:(new Date).getDay(),hour:(new Date).getHours()},r={device_id:x,event:n,source:"ar-sdk",token:i};return fetch("https://events.artlabs.ai",{method:"POST",headers:{"Content-Type":"application/json","X-Custom-PSK":"zzkZ58VcHc&xH%#"},body:JSON.stringify(r)}).catch((e=>console.log("Couldnt send event",e)))}}catch(e){console.log("Couldnt send event",e)}}!function(){if(function(){const e=document.querySelector("[data-meshkraft-key]");if(!e)return console.warn("MeshkraftAR :: data-meshkraft-key attribute is missing. Please check your integration to discard this warning.");const{meshkraftKey:t}=e.dataset;v=t}(),!t)return void(C=L);if(a&&(P="scene-viewer"),c&&(P="quick-look"),!P)return console.warn("MeshkraftAR :: Device is not AR compatible");!function(){if(b=document.querySelector("[data-meshkraft-sku]"),!b)return null;const{meshkraftSku:e,meshkraftConfig:t}=b.dataset;try{_=JSON.parse(t),A=e}catch(e){}}();const e=M();(e||A)&&E(e||A).then((t=>{S=t,b&&b.addEventListener("click",C),e&&W(S)})).catch((()=>console.warn("MeshkraftAR :: Fetch failed")))}(),exports.addEventListener=function(t,i){Object.values(e).includes(t)&&O.push({event:t,callback:i})},exports.init=function({token:e,config:t}){if(!e)return console.warn("MeshkraftVTO :: Token required.");v=e,R({name:"INIT",token:e}),t&&null!=t&&"object"==typeof t&&!Array.isArray(t)&&(_={..._,...t});const i=M();i&&E(i).then((e=>{S=e,b&&b.addEventListener("click",C),i&&W(S)})).catch((()=>console.warn("MeshkraftAR :: Fetch failed")))},exports.setApiKey=function(e){if(!e)return new Error("API Key is required");v=e},exports.setConfig=function(e){if(!e||"object"!=typeof e)return console.warn("Config is required and must be an object");_={..._,...e}},exports.startAR=function(e,i=(()=>{})){return e?t?void E(e).then((e=>{if(!e)return i(new Error("Product not found"));W(e)})).catch((()=>{i(new Error("Product not found"))})):L(e):new Error("SKU is required")};