@plattar/plattar-ar-adapter 2.5.1 → 2.7.1

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.
@@ -25,8 +25,6 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
25
25
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
26
26
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
27
27
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
28
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
29
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
30
28
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
31
29
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
32
30
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
@@ -34,6 +32,9 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
34
32
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
35
33
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
36
34
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
35
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
36
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
37
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
37
38
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
38
39
  (function (f) {
39
40
  if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
@@ -109,7 +110,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
109
110
  _classCallCheck(this, ConfiguratorAR);
110
111
  _this = _callSuper(this, ConfiguratorAR);
111
112
  // analytics instance
112
- _this._analytics = null;
113
+ _defineProperty(_this, "_analytics", null);
114
+ _defineProperty(_this, "_options", void 0);
115
+ // this thing controls the actual AR view
116
+ // this is setup via .init() function
117
+ _defineProperty(_this, "_ar", void 0);
113
118
  if (!options.state) {
114
119
  throw new Error("ConfiguratorAR.constructor(state) - state must be defined");
115
120
  }
@@ -155,12 +160,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
155
160
  key: "_Compose",
156
161
  value: (function () {
157
162
  var _Compose2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(output) {
158
- var type, url, response, data, _t;
163
+ var type, serverLocation, url, response, data, _t;
159
164
  return _regenerator().w(function (_context) {
160
165
  while (1) switch (_context.p = _context.n) {
161
166
  case 0:
162
167
  type = output === 'glb' ? "viewer" : "reality";
163
- url = "https://xrutils.plattar.com/v3/scene/".concat(this._options.state.scene.id, "/").concat(type); // grab our existing scene-graph from the saved API
168
+ serverLocation = plattar_api_1.Server.location().type === 'staging' ? 'https://xrutils.plattar.space/v3/scene' : 'https://xrutils.plattar.com/v3/scene';
169
+ url = "".concat(serverLocation, "/").concat(this._options.state.scene.id, "/").concat(type); // grab our existing scene-graph from the saved API
164
170
  _context.p = 1;
165
171
  _context.n = 2;
166
172
  return fetch(url, {
@@ -348,6 +354,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
348
354
  var LauncherAR = /*#__PURE__*/function () {
349
355
  function LauncherAR() {
350
356
  _classCallCheck(this, LauncherAR);
357
+ _defineProperty(this, "_opt", void 0);
351
358
  this._opt = {
352
359
  anchor: "horizontal_vertical",
353
360
  banner: null
@@ -420,7 +427,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
420
427
  _classCallCheck(this, ModelAR);
421
428
  _this2 = _callSuper(this, ModelAR);
422
429
  // analytics instance
423
- _this2._analytics = null;
430
+ _defineProperty(_this2, "_analytics", null);
431
+ // model ID
432
+ _defineProperty(_this2, "_options", void 0);
433
+ // this thing controls the actual AR view
434
+ // this is setup via .init() function
435
+ _defineProperty(_this2, "_ar", void 0);
424
436
  if (!options.modelID) {
425
437
  throw new Error("ModelAR.constructor(modelID) - modelID must be defined");
426
438
  }
@@ -586,24 +598,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
586
598
  * Performs AR functionality related to Plattar Products and Variation types
587
599
  */
588
600
  var ProductAR = /*#__PURE__*/function (_launcher_ar_1$Launch3) {
589
- /*
590
- constructor(productID: string | undefined | null = null, variationID: string | undefined | null = null, variationSKU: string | undefined | null = null) {
591
- super();
592
- if (!productID) {
593
- throw new Error("ProductAR.constructor(productID, variationID) - productID must be defined");
594
- }
595
- this._productID = productID;
596
- this._variationSKU = variationSKU;
597
- this._variationID = variationID ? variationID : (variationSKU ? null : "default");
598
- this._ar = null;
599
- }
600
- */
601
601
  function ProductAR(options) {
602
602
  var _this4;
603
603
  _classCallCheck(this, ProductAR);
604
604
  _this4 = _callSuper(this, ProductAR);
605
605
  // analytics instance
606
- _this4._analytics = null;
606
+ _defineProperty(_this4, "_analytics", null);
607
+ _defineProperty(_this4, "_options", void 0);
608
+ // this thing controls the actual AR view
609
+ // this is setup via .init() function
610
+ _defineProperty(_this4, "_ar", void 0);
607
611
  if (!options.productID) {
608
612
  throw new Error("ProductAR.constructor(productID, variationID) - productID must be defined");
609
613
  }
@@ -841,8 +845,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
841
845
  var _this6;
842
846
  _classCallCheck(this, RawAR);
843
847
  _this6 = _callSuper(this, RawAR);
848
+ // model location
849
+ _defineProperty(_this6, "_options", void 0);
850
+ // this thing controls the actual AR view
851
+ // this is setup via .init() function
852
+ _defineProperty(_this6, "_ar", void 0);
844
853
  // analytics instance
845
- _this6._analytics = null;
854
+ _defineProperty(_this6, "_analytics", null);
846
855
  if (!options.modelLocation) {
847
856
  throw new Error("RawAR.constructor(modelLocation) - modelLocation must be defined");
848
857
  }
@@ -1031,7 +1040,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1031
1040
  _classCallCheck(this, SceneAR);
1032
1041
  _this9 = _callSuper(this, SceneAR);
1033
1042
  // analytics instance
1034
- _this9._analytics = null;
1043
+ _defineProperty(_this9, "_analytics", null);
1044
+ // scene and selected variation IDs
1045
+ _defineProperty(_this9, "_options", void 0);
1046
+ // this thing controls the actual AR view
1047
+ // this is setup via .init() function
1048
+ _defineProperty(_this9, "_ar", void 0);
1035
1049
  if (!options.sceneID) {
1036
1050
  throw new Error("SceneAR.constructor(sceneID) - sceneID must be defined");
1037
1051
  }
@@ -1275,7 +1289,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1275
1289
  _classCallCheck(this, SceneGraphAR);
1276
1290
  _this10 = _callSuper(this, SceneGraphAR);
1277
1291
  // analytics instance
1278
- _this10._analytics = null;
1292
+ _defineProperty(_this10, "_analytics", null);
1293
+ _defineProperty(_this10, "_options", void 0);
1294
+ // this thing controls the actual AR view
1295
+ // this is setup via .init() function
1296
+ _defineProperty(_this10, "_ar", void 0);
1279
1297
  _this10._options = options;
1280
1298
  _this10._ar = null;
1281
1299
  return _this10;
@@ -1332,12 +1350,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1332
1350
  key: "_Compose",
1333
1351
  value: (function () {
1334
1352
  var _Compose3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(output) {
1335
- var type, url, response, data, _t2;
1353
+ var type, serverLocation, url, response, data, _t2;
1336
1354
  return _regenerator().w(function (_context5) {
1337
1355
  while (1) switch (_context5.p = _context5.n) {
1338
1356
  case 0:
1339
1357
  type = output === 'glb' ? "viewer" : "reality";
1340
- url = "https://xrutils.plattar.com/v3/scene/".concat(this._options.sceneID, "/").concat(type, "/").concat(this._options.id); // grab our existing scene-graph from the saved API
1358
+ serverLocation = plattar_api_1.Server.location().type === 'staging' ? 'https://xrutils.plattar.space/v3/scene' : 'https://xrutils.plattar.com/v3/scene';
1359
+ url = "".concat(serverLocation, "/").concat(this._options.sceneID, "/").concat(type, "/").concat(this._options.id); // grab our existing scene-graph from the saved API
1341
1360
  _context5.p = 1;
1342
1361
  _context5.n = 2;
1343
1362
  return fetch(url, {
@@ -1530,10 +1549,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1530
1549
  function SceneProductAR(options) {
1531
1550
  var _this11;
1532
1551
  _classCallCheck(this, SceneProductAR);
1533
- //super(sceneProductID, variationID, variationSKU);
1534
1552
  _this11 = _callSuper(this, SceneProductAR, [options]);
1553
+ _defineProperty(_this11, "_sceneProductID", void 0);
1535
1554
  // this is evaluated in the init() function
1536
- _this11._attachedProductID = null;
1555
+ _defineProperty(_this11, "_attachedProductID", null);
1537
1556
  if (!options.productID) {
1538
1557
  throw new Error("SceneProductAR.constructor(sceneProductID, variationID) - sceneProductID must be defined");
1539
1558
  }
@@ -1602,8 +1621,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1602
1621
  function ConfiguratorController() {
1603
1622
  var _this13;
1604
1623
  _classCallCheck(this, ConfiguratorController);
1605
- _this13 = _callSuper(this, ConfiguratorController, arguments);
1606
- _this13._cachedConfigState = null;
1624
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1625
+ args[_key] = arguments[_key];
1626
+ }
1627
+ _this13 = _callSuper(this, ConfiguratorController, [].concat(args));
1628
+ _defineProperty(_this13, "_cachedConfigState", null);
1607
1629
  return _this13;
1608
1630
  }
1609
1631
  _inherits(ConfiguratorController, _plattar_controller_);
@@ -1774,7 +1796,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1774
1796
  value: function () {
1775
1797
  var _startViewerQRCode = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(options) {
1776
1798
  var _this14 = this;
1777
- var opt, sceneID, configState, dState, product, controller, viewer, width, height, dst, showAR, showUI, showBanner, sceneGraphID, _t4;
1799
+ var opt, sceneID, configState, dState, product, controller, viewer, width, height, dst, showAR, showUI, showBanner, sceneGraphID, _t4, _t5, _t6;
1778
1800
  return _regenerator().w(function (_context0) {
1779
1801
  while (1) switch (_context0.p = _context0.n) {
1780
1802
  case 0:
@@ -1835,6 +1857,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1835
1857
  height = this.getAttribute("height") || "500px";
1836
1858
  viewer.setAttribute("width", width);
1837
1859
  viewer.setAttribute("height", height);
1860
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
1838
1861
  if (opt.color) {
1839
1862
  viewer.setAttribute("color", opt.color);
1840
1863
  }
@@ -1845,14 +1868,36 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1845
1868
  viewer.setAttribute("qr-type", opt.qrType);
1846
1869
  }
1847
1870
  viewer.setAttribute("shorten", opt.shorten && (opt.shorten === true || opt.shorten === "true") ? "true" : "false");
1848
- dst = plattar_api_1.Server.location().base + "renderer/configurator.html?scene_id=" + sceneID;
1871
+ dst = "https://renderer.plattar.com/configurator.html?scene_id=".concat(sceneID);
1872
+ _t5 = plattar_api_1.Server.location().type;
1873
+ _context0.n = _t5 === 'review' ? 8 : _t5 === 'staging' ? 9 : 10;
1874
+ break;
1875
+ case 8:
1876
+ dst = "https://renderer-review.plattar.com/configurator.html?scene_id=".concat(sceneID);
1877
+ return _context0.a(3, 10);
1878
+ case 9:
1879
+ dst = "https://renderer.plattar.space/configurator.html?scene_id=".concat(sceneID);
1880
+ return _context0.a(3, 10);
1881
+ case 10:
1849
1882
  showAR = this.getAttribute("show-ar");
1850
1883
  showUI = this.getAttribute("show-ui");
1851
1884
  showBanner = this.getAttribute("show-ar-banner");
1852
1885
  sceneGraphID = this.getAttribute("scene-graph-id");
1853
- if (showUI && showUI === "true") {
1854
- dst = plattar_api_1.Server.location().base + "configurator/dist/index.html?scene_id=" + sceneID;
1886
+ if (!(showUI && showUI === "true")) {
1887
+ _context0.n = 13;
1888
+ break;
1855
1889
  }
1890
+ dst = "https://configurator.plattar.com/index.html?scene_id=".concat(sceneID);
1891
+ _t6 = plattar_api_1.Server.location().type;
1892
+ _context0.n = _t6 === 'review' ? 11 : _t6 === 'staging' ? 12 : 13;
1893
+ break;
1894
+ case 11:
1895
+ dst = "https://configurator-review.plattar.com/configurator.html?scene_id=".concat(sceneID);
1896
+ return _context0.a(3, 13);
1897
+ case 12:
1898
+ dst = "https://configurator.plattar.space/configurator.html?scene_id=".concat(sceneID);
1899
+ return _context0.a(3, 13);
1900
+ case 13:
1856
1901
  if (configState) {
1857
1902
  dst += "&config_state=" + configState;
1858
1903
  }
@@ -1868,7 +1913,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1868
1913
  viewer.setAttribute("url", opt.url || dst);
1869
1914
  this._prevQROpt = opt;
1870
1915
  if (opt.detached) {
1871
- _context0.n = 8;
1916
+ _context0.n = 14;
1872
1917
  break;
1873
1918
  }
1874
1919
  this._state = plattar_controller_1.ControllerState.QRCode;
@@ -1878,7 +1923,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1878
1923
  };
1879
1924
  _this14.append(viewer);
1880
1925
  }));
1881
- case 8:
1926
+ case 14:
1882
1927
  return _context0.a(2, new Promise(function (accept, reject) {
1883
1928
  return accept(viewer);
1884
1929
  }));
@@ -1895,7 +1940,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1895
1940
  value: function () {
1896
1941
  var _startRenderer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
1897
1942
  var _this15 = this;
1898
- var sceneID, configState, dState, product, controller, width, height, server, viewer, showAR, showUI, encodedState, _t5;
1943
+ var sceneID, configState, dState, product, controller, width, height, server, viewer, showAR, showUI, encodedState, _t7;
1899
1944
  return _regenerator().w(function (_context1) {
1900
1945
  while (1) switch (_context1.p = _context1.n) {
1901
1946
  case 0:
@@ -1942,14 +1987,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1942
1987
  break;
1943
1988
  case 6:
1944
1989
  _context1.p = 6;
1945
- _t5 = _context1.v;
1990
+ _t7 = _context1.v;
1946
1991
  // config state is not available
1947
1992
  configState = null;
1948
1993
  case 7:
1949
1994
  // required attributes with defaults for plattar-configurator node
1950
1995
  width = this.getAttribute("width") || "500px";
1951
1996
  height = this.getAttribute("height") || "500px";
1952
- server = this.getAttribute("server") || "production";
1997
+ server = plattar_api_1.Server.location().type;
1953
1998
  viewer = document.createElement("plattar-configurator");
1954
1999
  this._element = viewer;
1955
2000
  viewer.setAttribute("width", width);
@@ -1989,7 +2034,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1989
2034
  key: "initAR",
1990
2035
  value: function () {
1991
2036
  var _initAR = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
1992
- var dState, product, controller, arMode, _t6, _t7;
2037
+ var dState, product, controller, arMode, _t8, _t9;
1993
2038
  return _regenerator().w(function (_context10) {
1994
2039
  while (1) switch (_context10.p = _context10.n) {
1995
2040
  case 0:
@@ -2029,11 +2074,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2029
2074
  break;
2030
2075
  case 5:
2031
2076
  _context10.p = 5;
2032
- _t6 = _context10.v;
2077
+ _t8 = _context10.v;
2033
2078
  case 6:
2034
2079
  arMode = this.getAttribute("ar-mode") || "generated";
2035
- _t7 = arMode.toLowerCase();
2036
- _context10.n = _t7 === "inherited" ? 7 : _t7 === "generated" ? 8 : 8;
2080
+ _t9 = arMode.toLowerCase();
2081
+ _context10.n = _t9 === "inherited" ? 7 : _t9 === "generated" ? 8 : 8;
2037
2082
  break;
2038
2083
  case 7:
2039
2084
  return _context10.a(2, this._InitARInherited());
@@ -2104,7 +2149,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2104
2149
  key: "_InitARGenerated",
2105
2150
  value: (function () {
2106
2151
  var _InitARGenerated2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
2107
- var sceneID, graphID, _configAR, configAR, _t8, _t9, _t0, _t1;
2152
+ var sceneID, graphID, _configAR, configAR, _t0, _t1, _t10, _t11;
2108
2153
  return _regenerator().w(function (_context12) {
2109
2154
  while (1) switch (_context12.n) {
2110
2155
  case 0:
@@ -2127,17 +2172,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2127
2172
  });
2128
2173
  return _context12.a(2, _configAR.init());
2129
2174
  case 2:
2130
- _t8 = configurator_ar_1.ConfiguratorAR;
2175
+ _t0 = configurator_ar_1.ConfiguratorAR;
2131
2176
  _context12.n = 3;
2132
2177
  return this.getConfiguratorState();
2133
2178
  case 3:
2134
- _t9 = _context12.v;
2135
- _t0 = this.getBooleanAttribute("show-ar-banner");
2136
- _t1 = {
2137
- state: _t9,
2138
- useARBanner: _t0
2179
+ _t1 = _context12.v;
2180
+ _t10 = this.getBooleanAttribute("show-ar-banner");
2181
+ _t11 = {
2182
+ state: _t1,
2183
+ useARBanner: _t10
2139
2184
  };
2140
- configAR = new _t8(_t1);
2185
+ configAR = new _t0(_t11);
2141
2186
  return _context12.a(2, configAR.init());
2142
2187
  }
2143
2188
  }, _callee12, this);
@@ -2179,8 +2224,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2179
2224
  function GalleryController() {
2180
2225
  var _this16;
2181
2226
  _classCallCheck(this, GalleryController);
2182
- _this16 = _callSuper(this, GalleryController, arguments);
2183
- _this16._cachedConfigState = null;
2227
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2228
+ args[_key2] = arguments[_key2];
2229
+ }
2230
+ _this16 = _callSuper(this, GalleryController, [].concat(args));
2231
+ _defineProperty(_this16, "_cachedConfigState", null);
2184
2232
  return _this16;
2185
2233
  }
2186
2234
  _inherits(GalleryController, _plattar_controller_2);
@@ -2265,7 +2313,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2265
2313
  value: function () {
2266
2314
  var _startViewerQRCode2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(options) {
2267
2315
  var _this17 = this;
2268
- var opt, sceneID, viewer, width, height, dst;
2316
+ var opt, sceneID, viewer, width, height, dst, _t12;
2269
2317
  return _regenerator().w(function (_context15) {
2270
2318
  while (1) switch (_context15.n) {
2271
2319
  case 0:
@@ -2289,6 +2337,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2289
2337
  height = this.getAttribute("height") || "500px";
2290
2338
  viewer.setAttribute("width", width);
2291
2339
  viewer.setAttribute("height", height);
2340
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
2292
2341
  if (opt.color) {
2293
2342
  viewer.setAttribute("color", opt.color);
2294
2343
  }
@@ -2299,11 +2348,21 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2299
2348
  viewer.setAttribute("qr-type", opt.qrType);
2300
2349
  }
2301
2350
  viewer.setAttribute("shorten", opt.shorten && (opt.shorten === true || opt.shorten === "true") ? "true" : "false");
2302
- dst = plattar_api_1.Server.location().base + "renderer/gallery.html?scene_id=" + sceneID;
2351
+ dst = "https://renderer.plattar.com/gallery.html?scene_id=".concat(sceneID);
2352
+ _t12 = plattar_api_1.Server.location().type;
2353
+ _context15.n = _t12 === 'review' ? 2 : _t12 === 'staging' ? 3 : 4;
2354
+ break;
2355
+ case 2:
2356
+ dst = "https://renderer-review.plattar.com/gallery.html?scene_id=".concat(sceneID);
2357
+ return _context15.a(3, 4);
2358
+ case 3:
2359
+ dst = "https://renderer.plattar.space/gallery.html?scene_id=".concat(sceneID);
2360
+ return _context15.a(3, 4);
2361
+ case 4:
2303
2362
  viewer.setAttribute("url", opt.url || dst);
2304
2363
  this._prevQROpt = opt;
2305
2364
  if (opt.detached) {
2306
- _context15.n = 2;
2365
+ _context15.n = 5;
2307
2366
  break;
2308
2367
  }
2309
2368
  this._state = plattar_controller_1.ControllerState.QRCode;
@@ -2313,7 +2372,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2313
2372
  };
2314
2373
  _this17.append(viewer);
2315
2374
  }));
2316
- case 2:
2375
+ case 5:
2317
2376
  return _context15.a(2, new Promise(function (accept, reject) {
2318
2377
  return accept(viewer);
2319
2378
  }));
@@ -2415,8 +2474,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2415
2474
  function LauncherController() {
2416
2475
  var _this19;
2417
2476
  _classCallCheck(this, LauncherController);
2418
- _this19 = _callSuper(this, LauncherController, arguments);
2419
- _this19._cachedConfigState = null;
2477
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2478
+ args[_key3] = arguments[_key3];
2479
+ }
2480
+ _this19 = _callSuper(this, LauncherController, [].concat(args));
2481
+ _defineProperty(_this19, "_cachedConfigState", null);
2420
2482
  return _this19;
2421
2483
  }
2422
2484
  _inherits(LauncherController, _plattar_controller_3);
@@ -2500,7 +2562,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2500
2562
  key: "startARQRCode",
2501
2563
  value: function () {
2502
2564
  var _startARQRCode2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20(options) {
2503
- var dState, product, controller, _t10;
2565
+ var dState, product, controller, _t13;
2504
2566
  return _regenerator().w(function (_context20) {
2505
2567
  while (1) switch (_context20.p = _context20.n) {
2506
2568
  case 0:
@@ -2534,7 +2596,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2534
2596
  break;
2535
2597
  case 4:
2536
2598
  _context20.p = 4;
2537
- _t10 = _context20.v;
2599
+ _t13 = _context20.v;
2538
2600
  case 5:
2539
2601
  return _context20.a(2, _superPropGet(LauncherController, "startARQRCode", this, 3)([options]));
2540
2602
  }
@@ -2566,7 +2628,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2566
2628
  value: function () {
2567
2629
  var _startRenderer3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
2568
2630
  var _this20 = this;
2569
- var sceneID, configState, qrOptions, embedType, productID, sceneProductID, variationID, variationSKU, arMode, showBanner, sceneGraphID, width, height, server, viewer, _sceneGraphID, _t11;
2631
+ var sceneID, configState, qrOptions, embedType, productID, sceneProductID, variationID, variationSKU, arMode, showBanner, sceneGraphID, width, height, server, viewer, _sceneGraphID, _t14;
2570
2632
  return _regenerator().w(function (_context22) {
2571
2633
  while (1) switch (_context22.p = _context22.n) {
2572
2634
  case 0:
@@ -2645,10 +2707,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2645
2707
  break;
2646
2708
  case 6:
2647
2709
  _context22.p = 6;
2648
- _t11 = _context22.v;
2710
+ _t14 = _context22.v;
2649
2711
  // scene graph ID not available for some reason
2650
2712
  // we will generate a new one
2651
- console.error(_t11);
2713
+ console.error(_t14);
2652
2714
  case 7:
2653
2715
  return _context22.a(2, new Promise(function (accept, reject) {
2654
2716
  _this20.append(viewer);
@@ -2669,7 +2731,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2669
2731
  key: "initAR",
2670
2732
  value: function () {
2671
2733
  var _initAR3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee23() {
2672
- var dState, product, controller, arMode, _t12, _t13;
2734
+ var dState, product, controller, arMode, _t15, _t16;
2673
2735
  return _regenerator().w(function (_context23) {
2674
2736
  while (1) switch (_context23.p = _context23.n) {
2675
2737
  case 0:
@@ -2709,11 +2771,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2709
2771
  break;
2710
2772
  case 5:
2711
2773
  _context23.p = 5;
2712
- _t12 = _context23.v;
2774
+ _t15 = _context23.v;
2713
2775
  case 6:
2714
2776
  arMode = this.getAttribute("ar-mode") || "generated";
2715
- _t13 = arMode.toLowerCase();
2716
- _context23.n = _t13 === "inherited" ? 7 : _t13 === "generated" ? 8 : 8;
2777
+ _t16 = arMode.toLowerCase();
2778
+ _context23.n = _t16 === "inherited" ? 7 : _t16 === "generated" ? 8 : 8;
2717
2779
  break;
2718
2780
  case 7:
2719
2781
  return _context23.a(2, this._InitARInherited());
@@ -2784,7 +2846,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2784
2846
  key: "_InitARGenerated",
2785
2847
  value: (function () {
2786
2848
  var _InitARGenerated3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee25() {
2787
- var sceneID, graphID, _configAR2, configAR, _t14, _t15, _t16, _t17;
2849
+ var sceneID, graphID, _configAR2, configAR, _t17, _t18, _t19, _t20;
2788
2850
  return _regenerator().w(function (_context25) {
2789
2851
  while (1) switch (_context25.n) {
2790
2852
  case 0:
@@ -2807,17 +2869,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2807
2869
  });
2808
2870
  return _context25.a(2, _configAR2.init());
2809
2871
  case 2:
2810
- _t14 = configurator_ar_1.ConfiguratorAR;
2872
+ _t17 = configurator_ar_1.ConfiguratorAR;
2811
2873
  _context25.n = 3;
2812
2874
  return this.getConfiguratorState();
2813
2875
  case 3:
2814
- _t15 = _context25.v;
2815
- _t16 = this.getBooleanAttribute("show-ar-banner");
2816
- _t17 = {
2817
- state: _t15,
2818
- useARBanner: _t16
2876
+ _t18 = _context25.v;
2877
+ _t19 = this.getBooleanAttribute("show-ar-banner");
2878
+ _t20 = {
2879
+ state: _t18,
2880
+ useARBanner: _t19
2819
2881
  };
2820
- configAR = new _t14(_t17);
2882
+ configAR = new _t17(_t20);
2821
2883
  return _context25.a(2, configAR.init());
2822
2884
  }
2823
2885
  }, _callee25, this);
@@ -2863,12 +2925,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2863
2925
  var PlattarController = /*#__PURE__*/function () {
2864
2926
  function PlattarController(parent) {
2865
2927
  _classCallCheck(this, PlattarController);
2866
- this._state = ControllerState.None;
2867
- this._element = null;
2868
- this._prevQROpt = null;
2869
- this._selectVariationObserver = null;
2870
- this._selectVariationIDObserver = null;
2871
- this._selectVariationSKUObserver = null;
2928
+ _defineProperty(this, "_parent", void 0);
2929
+ _defineProperty(this, "_state", ControllerState.None);
2930
+ _defineProperty(this, "_element", null);
2931
+ _defineProperty(this, "_prevQROpt", null);
2932
+ _defineProperty(this, "_selectVariationObserver", null);
2933
+ _defineProperty(this, "_selectVariationIDObserver", null);
2934
+ _defineProperty(this, "_selectVariationSKUObserver", null);
2872
2935
  this._parent = parent;
2873
2936
  }
2874
2937
  /**
@@ -2897,7 +2960,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2897
2960
  key: "createConfiguratorState",
2898
2961
  value: (function () {
2899
2962
  var _createConfiguratorState = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee26() {
2900
- var sceneID, configState, variationIDs, variationSKUs, decodedState, variationIDList, variationSKUList, _t18;
2963
+ var sceneID, configState, variationIDs, variationSKUs, decodedState, variationIDList, variationSKUList, _t21;
2901
2964
  return _regenerator().w(function (_context26) {
2902
2965
  while (1) switch (_context26.n) {
2903
2966
  case 0:
@@ -2919,16 +2982,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2919
2982
  _context26.n = 2;
2920
2983
  return configurator_state_1.ConfiguratorState.decodeState(sceneID, configState);
2921
2984
  case 2:
2922
- _t18 = _context26.v;
2985
+ _t21 = _context26.v;
2923
2986
  _context26.n = 5;
2924
2987
  break;
2925
2988
  case 3:
2926
2989
  _context26.n = 4;
2927
2990
  return configurator_state_1.ConfiguratorState.decodeScene(sceneID);
2928
2991
  case 4:
2929
- _t18 = _context26.v;
2992
+ _t21 = _context26.v;
2930
2993
  case 5:
2931
- decodedState = _t18;
2994
+ decodedState = _t21;
2932
2995
  // change the ID's and SKU's (if any) of the default configuration state
2933
2996
  variationIDList = variationIDs ? variationIDs.split(",") : [];
2934
2997
  variationSKUList = variationSKUs ? variationSKUs.split(",") : [];
@@ -3037,13 +3100,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3037
3100
  key: "startQRCode",
3038
3101
  value: (function () {
3039
3102
  var _startQRCode = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee28(options) {
3040
- var qrType, _t19;
3103
+ var qrType, _t22;
3041
3104
  return _regenerator().w(function (_context28) {
3042
3105
  while (1) switch (_context28.n) {
3043
3106
  case 0:
3044
3107
  qrType = this.getAttribute("qr-type") || "viewer";
3045
- _t19 = qrType.toLowerCase();
3046
- _context28.n = _t19 === "ar" ? 1 : _t19 === "viewer" ? 2 : 2;
3108
+ _t22 = qrType.toLowerCase();
3109
+ _context28.n = _t22 === "ar" ? 1 : _t22 === "viewer" ? 2 : 2;
3047
3110
  break;
3048
3111
  case 1:
3049
3112
  return _context28.a(2, this.startARQRCode(options));
@@ -3070,7 +3133,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3070
3133
  value: (function () {
3071
3134
  var _startARQRCode3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee29(options) {
3072
3135
  var _this21 = this;
3073
- var opt, viewer, width, height, qrOptions, dst, sceneID, embedType, productID, sceneProductID, variationID, variationSKU, arMode, showBanner, sceneGraphID, _sceneGraphID2, _t20;
3136
+ var opt, viewer, width, height, qrOptions, dst, sceneID, embedType, productID, sceneProductID, variationID, variationSKU, arMode, showBanner, sceneGraphID, _sceneGraphID2, _t23, _t24;
3074
3137
  return _regenerator().w(function (_context29) {
3075
3138
  while (1) switch (_context29.p = _context29.n) {
3076
3139
  case 0:
@@ -3085,6 +3148,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3085
3148
  height = this.getAttribute("height") || "500px";
3086
3149
  viewer.setAttribute("width", width);
3087
3150
  viewer.setAttribute("height", height);
3151
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
3088
3152
  if (opt.color) {
3089
3153
  viewer.setAttribute("color", opt.color);
3090
3154
  }
@@ -3096,7 +3160,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3096
3160
  }
3097
3161
  viewer.setAttribute("shorten", opt.shorten && (opt.shorten === true || opt.shorten === "true") ? "true" : "false");
3098
3162
  qrOptions = btoa(JSON.stringify(opt));
3099
- dst = plattar_api_1.Server.location().base + "renderer/launcher.html?qr_options=" + qrOptions; //let configState: string | null = null;
3163
+ dst = "https://renderer.plattar.com/launcher.html?qr_options=".concat(qrOptions);
3164
+ _t23 = plattar_api_1.Server.location().type;
3165
+ _context29.n = _t23 === 'review' ? 1 : _t23 === 'staging' ? 2 : 3;
3166
+ break;
3167
+ case 1:
3168
+ dst = "https://renderer-review.plattar.com/launcher.html?qr_options=".concat(qrOptions);
3169
+ return _context29.a(3, 3);
3170
+ case 2:
3171
+ dst = "https://renderer.plattar.space/launcher.html?qr_options=".concat(qrOptions);
3172
+ return _context29.a(3, 3);
3173
+ case 3:
3174
+ //let configState: string | null = null;
3100
3175
  sceneID = this.getAttribute("scene-id");
3101
3176
  embedType = this.getAttribute("embed-type");
3102
3177
  productID = this.getAttribute("product-id");
@@ -3131,35 +3206,35 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3131
3206
  dst += "&show_ar_banner=" + showBanner;
3132
3207
  }
3133
3208
  if (!sceneGraphID) {
3134
- _context29.n = 1;
3209
+ _context29.n = 4;
3135
3210
  break;
3136
3211
  }
3137
3212
  dst += "&scene_graph_id=" + sceneGraphID;
3138
- _context29.n = 5;
3213
+ _context29.n = 8;
3139
3214
  break;
3140
- case 1:
3141
- _context29.p = 1;
3142
- _context29.n = 2;
3215
+ case 4:
3216
+ _context29.p = 4;
3217
+ _context29.n = 5;
3143
3218
  return this.getConfiguratorState();
3144
- case 2:
3145
- _context29.n = 3;
3219
+ case 5:
3220
+ _context29.n = 6;
3146
3221
  return _context29.v.state.encodeSceneGraphID();
3147
- case 3:
3222
+ case 6:
3148
3223
  _sceneGraphID2 = _context29.v;
3149
3224
  dst += "&scene_graph_id=" + _sceneGraphID2;
3150
- _context29.n = 5;
3225
+ _context29.n = 8;
3151
3226
  break;
3152
- case 4:
3153
- _context29.p = 4;
3154
- _t20 = _context29.v;
3227
+ case 7:
3228
+ _context29.p = 7;
3229
+ _t24 = _context29.v;
3155
3230
  // scene graph ID not available for some reason
3156
3231
  // we will generate a new one
3157
- console.error(_t20);
3158
- case 5:
3232
+ console.error(_t24);
3233
+ case 8:
3159
3234
  viewer.setAttribute("url", opt.url || dst);
3160
3235
  this._prevQROpt = opt;
3161
3236
  if (opt.detached) {
3162
- _context29.n = 6;
3237
+ _context29.n = 9;
3163
3238
  break;
3164
3239
  }
3165
3240
  this._state = ControllerState.QRCode;
@@ -3169,12 +3244,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3169
3244
  return accept(viewer);
3170
3245
  };
3171
3246
  }));
3172
- case 6:
3247
+ case 9:
3173
3248
  return _context29.a(2, new Promise(function (accept, reject) {
3174
3249
  return accept(viewer);
3175
3250
  }));
3176
3251
  }
3177
- }, _callee29, this, [[1, 4]]);
3252
+ }, _callee29, this, [[4, 7]]);
3178
3253
  }));
3179
3254
  function startARQRCode(_x10) {
3180
3255
  return _startARQRCode3.apply(this, arguments);
@@ -3390,6 +3465,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3390
3465
  var height = _this22.getAttribute("height") || "500px";
3391
3466
  viewer.setAttribute("width", width);
3392
3467
  viewer.setAttribute("height", height);
3468
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
3393
3469
  if (opt.color) {
3394
3470
  viewer.setAttribute("color", opt.color);
3395
3471
  }
@@ -3404,7 +3480,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3404
3480
  var variationID = _this22.getAttribute("variation-id");
3405
3481
  var variationSKU = _this22.getAttribute("variation-sku");
3406
3482
  var showAR = _this22.getAttribute("show-ar");
3407
- var dst = plattar_api_1.Server.location().base + "renderer/product.html?product_id=" + productID;
3483
+ var dst = "https://renderer.plattar.com/product.html?product_id=".concat(productID);
3484
+ switch (plattar_api_1.Server.location().type) {
3485
+ case 'review':
3486
+ dst = "https://renderer-review.plattar.com/product.html?product_id=".concat(productID);
3487
+ break;
3488
+ case 'staging':
3489
+ dst = "https://renderer.plattar.space/product.html?product_id=".concat(productID);
3490
+ break;
3491
+ }
3408
3492
  if (variationID) {
3409
3493
  dst += "&variationId=" + variationID;
3410
3494
  }
@@ -3447,6 +3531,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3447
3531
  var height = _this23.getAttribute("height") || "500px";
3448
3532
  viewer.setAttribute("width", width);
3449
3533
  viewer.setAttribute("height", height);
3534
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
3450
3535
  if (opt.color) {
3451
3536
  viewer.setAttribute("color", opt.color);
3452
3537
  }
@@ -3458,7 +3543,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3458
3543
  }
3459
3544
  viewer.setAttribute("shorten", opt.shorten && (opt.shorten === true || opt.shorten === "true") ? "true" : "false");
3460
3545
  var qrOptions = btoa(JSON.stringify(opt));
3461
- var dst = plattar_api_1.Server.location().base + "renderer/launcher.html?qr_options=" + qrOptions;
3546
+ var dst = "https://renderer.plattar.com/launcher.html?qr_options=".concat(qrOptions);
3547
+ switch (plattar_api_1.Server.location().type) {
3548
+ case 'review':
3549
+ dst = "https://renderer-review.plattar.com/launcher.html?qr_options=".concat(qrOptions);
3550
+ break;
3551
+ case 'staging':
3552
+ dst = "https://renderer.plattar.space/launcher.html?qr_options=".concat(qrOptions);
3553
+ break;
3554
+ }
3462
3555
  var sceneID = _this23.getAttribute("scene-id");
3463
3556
  var configState = _this23.getAttribute("config-state");
3464
3557
  var embedType = _this23.getAttribute("embed-type");
@@ -3607,8 +3700,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3607
3700
  function VTOController() {
3608
3701
  var _this26;
3609
3702
  _classCallCheck(this, VTOController);
3610
- _this26 = _callSuper(this, VTOController, arguments);
3611
- _this26._cachedConfigState = null;
3703
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
3704
+ args[_key4] = arguments[_key4];
3705
+ }
3706
+ _this26 = _callSuper(this, VTOController, [].concat(args));
3707
+ _defineProperty(_this26, "_cachedConfigState", null);
3612
3708
  return _this26;
3613
3709
  }
3614
3710
  _inherits(VTOController, _plattar_controller_5);
@@ -3730,7 +3826,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3730
3826
  value: function () {
3731
3827
  var _startViewerQRCode4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee34(options) {
3732
3828
  var _this27 = this;
3733
- var opt, sceneID, viewer, width, height, dst, configState, showAR, productID, sceneProductID, variationID, _t21;
3829
+ var opt, sceneID, viewer, width, height, dst, configState, showAR, productID, sceneProductID, variationID, _t25, _t26;
3734
3830
  return _regenerator().w(function (_context34) {
3735
3831
  while (1) switch (_context34.p = _context34.n) {
3736
3832
  case 0:
@@ -3754,6 +3850,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3754
3850
  height = this.getAttribute("height") || "500px";
3755
3851
  viewer.setAttribute("width", width);
3756
3852
  viewer.setAttribute("height", height);
3853
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
3757
3854
  if (opt.color) {
3758
3855
  viewer.setAttribute("color", opt.color);
3759
3856
  }
@@ -3764,21 +3861,32 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3764
3861
  viewer.setAttribute("qr-type", opt.qrType);
3765
3862
  }
3766
3863
  viewer.setAttribute("shorten", opt.shorten && (opt.shorten === true || opt.shorten === "true") ? "true" : "false");
3767
- dst = plattar_api_1.Server.location().base + "renderer/facear.html?scene_id=" + sceneID; // optional attributes
3864
+ dst = "https://renderer.plattar.com/facear.html?scene_id=".concat(sceneID);
3865
+ _t25 = plattar_api_1.Server.location().type;
3866
+ _context34.n = _t25 === 'review' ? 2 : _t25 === 'staging' ? 3 : 4;
3867
+ break;
3868
+ case 2:
3869
+ dst = "https://renderer-review.plattar.com/facear.html?scene_id=".concat(sceneID);
3870
+ return _context34.a(3, 4);
3871
+ case 3:
3872
+ dst = "https://renderer.plattar.space/facear.html?scene_id=".concat(sceneID);
3873
+ return _context34.a(3, 4);
3874
+ case 4:
3875
+ // optional attributes
3768
3876
  configState = null;
3769
- _context34.p = 2;
3770
- _context34.n = 3;
3877
+ _context34.p = 5;
3878
+ _context34.n = 6;
3771
3879
  return this.getConfiguratorState();
3772
- case 3:
3880
+ case 6:
3773
3881
  configState = _context34.v;
3774
- _context34.n = 5;
3882
+ _context34.n = 8;
3775
3883
  break;
3776
- case 4:
3777
- _context34.p = 4;
3778
- _t21 = _context34.v;
3884
+ case 7:
3885
+ _context34.p = 7;
3886
+ _t26 = _context34.v;
3779
3887
  // config state is not available
3780
3888
  configState = null;
3781
- case 5:
3889
+ case 8:
3782
3890
  showAR = this.getAttribute("show-ar");
3783
3891
  productID = this.getAttribute("product-id");
3784
3892
  sceneProductID = this.getAttribute("scene-product-id");
@@ -3801,7 +3909,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3801
3909
  viewer.setAttribute("url", opt.url || dst);
3802
3910
  this._prevQROpt = opt;
3803
3911
  if (opt.detached) {
3804
- _context34.n = 6;
3912
+ _context34.n = 9;
3805
3913
  break;
3806
3914
  }
3807
3915
  this._state = plattar_controller_1.ControllerState.QRCode;
@@ -3811,12 +3919,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3811
3919
  };
3812
3920
  _this27.append(viewer);
3813
3921
  }));
3814
- case 6:
3922
+ case 9:
3815
3923
  return _context34.a(2, new Promise(function (accept, reject) {
3816
3924
  return accept(viewer);
3817
3925
  }));
3818
3926
  }
3819
- }, _callee34, this, [[2, 4]]);
3927
+ }, _callee34, this, [[5, 7]]);
3820
3928
  }));
3821
3929
  function startViewerQRCode(_x13) {
3822
3930
  return _startViewerQRCode4.apply(this, arguments);
@@ -3828,7 +3936,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3828
3936
  value: function () {
3829
3937
  var _startRenderer4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee35() {
3830
3938
  var _this28 = this;
3831
- var sceneID, width, height, server, viewer, configState, showAR, productID, sceneProductID, variationID, _t22;
3939
+ var sceneID, width, height, server, viewer, configState, showAR, productID, sceneProductID, variationID, _t27;
3832
3940
  return _regenerator().w(function (_context35) {
3833
3941
  while (1) switch (_context35.p = _context35.n) {
3834
3942
  case 0:
@@ -3863,7 +3971,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3863
3971
  break;
3864
3972
  case 4:
3865
3973
  _context35.p = 4;
3866
- _t22 = _context35.v;
3974
+ _t27 = _context35.v;
3867
3975
  // config state not available
3868
3976
  configState = null;
3869
3977
  case 5:
@@ -3905,7 +4013,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3905
4013
  key: "initAR",
3906
4014
  value: function () {
3907
4015
  var _initAR4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee36() {
3908
- var arMode, _t23;
4016
+ var arMode, _t28;
3909
4017
  return _regenerator().w(function (_context36) {
3910
4018
  while (1) switch (_context36.n) {
3911
4019
  case 0:
@@ -3922,8 +4030,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3922
4030
  throw new Error("VTOController.initAR() - cannot proceed as VTO AR only available on IOS Mobile devices");
3923
4031
  case 2:
3924
4032
  arMode = this.getAttribute("ar-mode") || "generated";
3925
- _t23 = arMode.toLowerCase();
3926
- _context36.n = _t23 === "inherited" ? 3 : _t23 === "generated" ? 4 : 4;
4033
+ _t28 = arMode.toLowerCase();
4034
+ _context36.n = _t28 === "inherited" ? 3 : _t28 === "generated" ? 4 : 4;
3927
4035
  break;
3928
4036
  case 3:
3929
4037
  return _context36.a(2, this._InitARInherited());
@@ -3993,7 +4101,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3993
4101
  key: "_InitARGenerated",
3994
4102
  value: (function () {
3995
4103
  var _InitARGenerated4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee38() {
3996
- var sceneID, configAR, _t24, _t25, _t26, _t27;
4104
+ var sceneID, configAR, _t29, _t30, _t31, _t32;
3997
4105
  return _regenerator().w(function (_context38) {
3998
4106
  while (1) switch (_context38.n) {
3999
4107
  case 0:
@@ -4004,17 +4112,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4004
4112
  }
4005
4113
  throw new Error("VTOController.initAR() - generated AR minimum required attributes not set, use scene-id as a minimum");
4006
4114
  case 1:
4007
- _t24 = configurator_ar_1.ConfiguratorAR;
4115
+ _t29 = configurator_ar_1.ConfiguratorAR;
4008
4116
  _context38.n = 2;
4009
4117
  return this.getConfiguratorState();
4010
4118
  case 2:
4011
- _t25 = _context38.v;
4012
- _t26 = this.getBooleanAttribute("show-ar-banner");
4013
- _t27 = {
4014
- state: _t25,
4015
- useARBanner: _t26
4119
+ _t30 = _context38.v;
4120
+ _t31 = this.getBooleanAttribute("show-ar-banner");
4121
+ _t32 = {
4122
+ state: _t30,
4123
+ useARBanner: _t31
4016
4124
  };
4017
- configAR = new _t24(_t27);
4125
+ configAR = new _t29(_t32);
4018
4126
  return _context38.a(2, configAR.init());
4019
4127
  }
4020
4128
  }, _callee38, this);
@@ -4046,6 +4154,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4046
4154
  value: true
4047
4155
  });
4048
4156
  exports.WebXRController = void 0;
4157
+ var plattar_api_1 = require("@plattar/plattar-api");
4049
4158
  var util_1 = require("../../util/util");
4050
4159
  var plattar_controller_1 = require("./plattar-controller");
4051
4160
  /**
@@ -4055,8 +4164,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4055
4164
  function WebXRController() {
4056
4165
  var _this29;
4057
4166
  _classCallCheck(this, WebXRController);
4058
- _this29 = _callSuper(this, WebXRController, arguments);
4059
- _this29._cachedConfigState = null;
4167
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
4168
+ args[_key5] = arguments[_key5];
4169
+ }
4170
+ _this29 = _callSuper(this, WebXRController, [].concat(args));
4171
+ _defineProperty(_this29, "_cachedConfigState", null);
4060
4172
  return _this29;
4061
4173
  }
4062
4174
  _inherits(WebXRController, _plattar_controller_6);
@@ -4209,6 +4321,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4209
4321
  height = this.getAttribute("height") || "500px";
4210
4322
  viewer.setAttribute("width", width);
4211
4323
  viewer.setAttribute("height", height);
4324
+ viewer.setAttribute("server", plattar_api_1.Server.location().type);
4212
4325
  if (opt.color) {
4213
4326
  viewer.setAttribute("color", opt.color);
4214
4327
  }
@@ -4314,7 +4427,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4314
4427
  exports.WebXRController = WebXRController;
4315
4428
  }, {
4316
4429
  "../../util/util": 19,
4317
- "./plattar-controller": 12
4430
+ "./plattar-controller": 12,
4431
+ "@plattar/plattar-api": 48
4318
4432
  }],
4319
4433
  16: [function (require, module, exports) {
4320
4434
  "use strict";
@@ -4361,12 +4475,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4361
4475
  _classCallCheck(this, PlattarEmbed);
4362
4476
  _this32 = _callSuper(this, PlattarEmbed);
4363
4477
  // this is the current embed type, viewer by default
4364
- _this32._currentType = EmbedType.None;
4365
- _this32._observerState = ObserverState.Unlocked;
4366
- _this32._controller = null;
4367
- _this32._currentSceneID = null;
4368
- _this32._currentServer = null;
4369
- _this32._observer = null;
4478
+ _defineProperty(_this32, "_currentType", EmbedType.None);
4479
+ _defineProperty(_this32, "_observerState", ObserverState.Unlocked);
4480
+ _defineProperty(_this32, "_controller", null);
4481
+ _defineProperty(_this32, "_currentSceneID", null);
4482
+ _defineProperty(_this32, "_currentServer", null);
4483
+ _defineProperty(_this32, "_observer", null);
4370
4484
  return _this32;
4371
4485
  }
4372
4486
  _inherits(PlattarEmbed, _HTMLElement);
@@ -4844,7 +4958,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4844
4958
  "./util/util": 19,
4845
4959
  "./version": 20,
4846
4960
  "@plattar/plattar-qrcode": 117,
4847
- "@plattar/plattar-web": 138
4961
+ "@plattar/plattar-web": 139
4848
4962
  }],
4849
4963
  18: [function (require, module, exports) {
4850
4964
  "use strict";
@@ -4862,6 +4976,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4862
4976
  function ConfiguratorState() {
4863
4977
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
4864
4978
  _classCallCheck(this, ConfiguratorState);
4979
+ _defineProperty(this, "_state", void 0);
4980
+ // This maps Variation ID against a Scene Product ID - populated by decodeScene() function
4981
+ _defineProperty(this, "_mappedVariationIDValues", void 0);
4982
+ // This maps Variation SKU against a Variation ID - populated by decodeScene() function
4983
+ _defineProperty(this, "_mappedVariationSKUValues", void 0);
4865
4984
  this._mappedVariationIDValues = new Map();
4866
4985
  this._mappedVariationSKUValues = new Map();
4867
4986
  var defaultState = {
@@ -5245,14 +5364,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5245
5364
  key: "encodeSceneGraphID",
5246
5365
  value: function () {
5247
5366
  var _encodeSceneGraphID = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee48() {
5248
- var graph, url, response, data, _t28;
5367
+ var graph, url, response, data, _t33;
5249
5368
  return _regenerator().w(function (_context48) {
5250
5369
  while (1) switch (_context48.p = _context48.n) {
5251
5370
  case 0:
5252
5371
  graph = this.sceneGraph; // some scene-graphs are very large in size, we store it remotely
5253
5372
  // this storage will expire in 10 minutes so this is a non-permanent version
5254
5373
  // and is designed for quick ar
5255
- url = "https://c.plattar.com/v3/redir/store"; // finally send our scene-graph to the backend to generate the AR file and return
5374
+ url = plattar_api_1.Server.location().type === 'staging' ? 'https://c.plattar.space/v3/redir/store' : 'https://c.plattar.com/v3/redir/store'; // finally send our scene-graph to the backend to generate the AR file and return
5256
5375
  _context48.p = 1;
5257
5376
  _context48.n = 2;
5258
5377
  return fetch(url, {
@@ -5283,8 +5402,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5283
5402
  return _context48.a(2, data.data.id);
5284
5403
  case 5:
5285
5404
  _context48.p = 5;
5286
- _t28 = _context48.v;
5287
- throw new Error("ConfiguratorState.encodeSceneGraphID() - there was a request error to ".concat(url, ", error was ").concat(_t28.message));
5405
+ _t33 = _context48.v;
5406
+ throw new Error("ConfiguratorState.encodeSceneGraphID() - there was a request error to ".concat(url, ", error was ").concat(_t33.message));
5288
5407
  case 6:
5289
5408
  return _context48.a(2);
5290
5409
  }
@@ -5624,7 +5743,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5624
5743
  Object.defineProperty(exports, "__esModule", {
5625
5744
  value: true
5626
5745
  });
5627
- exports["default"] = "2.5.1";
5746
+ exports["default"] = "2.7.1";
5628
5747
  }, {}],
5629
5748
  21: [function (require, module, exports) {
5630
5749
  "use strict";
@@ -5636,6 +5755,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5636
5755
  var ARViewer = /*#__PURE__*/function () {
5637
5756
  function ARViewer() {
5638
5757
  _classCallCheck(this, ARViewer);
5758
+ _defineProperty(this, "modelUrl", void 0);
5759
+ _defineProperty(this, "banner", void 0);
5639
5760
  this.modelUrl = null;
5640
5761
  this.banner = null;
5641
5762
  }
@@ -5682,6 +5803,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5682
5803
  }
5683
5804
  var anchor = document.createElement("a");
5684
5805
  anchor.setAttribute("rel", "ar");
5806
+ anchor.setAttribute("allowsContentScaling", "0");
5685
5807
  anchor.appendChild(document.createElement("img"));
5686
5808
  var banner = this.banner;
5687
5809
  var url = this.modelUrl;
@@ -5737,6 +5859,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5737
5859
  }
5738
5860
  var anchor = document.createElement("a");
5739
5861
  anchor.setAttribute("rel", "ar");
5862
+ anchor.setAttribute("allowsContentScaling", "0");
5740
5863
  anchor.appendChild(document.createElement("img"));
5741
5864
  anchor.setAttribute("href", this.modelUrl);
5742
5865
  anchor.click();
@@ -5759,7 +5882,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5759
5882
  var _this37;
5760
5883
  _classCallCheck(this, SceneViewer);
5761
5884
  _this37 = _callSuper(this, SceneViewer);
5762
- _this37.isVertical = false;
5885
+ _defineProperty(_this37, "isVertical", false);
5763
5886
  _this37.isVertical = false;
5764
5887
  return _this37;
5765
5888
  }
@@ -5790,6 +5913,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
5790
5913
  if (this.isVertical) {
5791
5914
  intent += '&enable_vertical_placement=true';
5792
5915
  }
5916
+ // avoid allowing content to be resized
5917
+ intent += '&resizable=false';
5793
5918
  intent += '&a=b#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;';
5794
5919
  intent += "S.browser_fallback_url=".concat(linkOverride, ";end;");
5795
5920
  var anchor = document.createElement("a");
@@ -6173,8 +6298,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
6173
6298
 
6174
6299
  // execute the desired function on all available stacks
6175
6300
  return function () {
6176
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6177
- args[_key] = arguments[_key];
6301
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
6302
+ args[_key6] = arguments[_key6];
6178
6303
  }
6179
6304
  var interfaces = target._interfaces;
6180
6305
  var promises = [];
@@ -6285,8 +6410,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
6285
6410
  return _createClass(WrappedLocalFunction, [{
6286
6411
  key: "_execute",
6287
6412
  value: function _execute() {
6288
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
6289
- args[_key2] = arguments[_key2];
6413
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
6414
+ args[_key7] = arguments[_key7];
6290
6415
  }
6291
6416
  var rData = this._value.apply(this, args);
6292
6417
  if (this._callback) {
@@ -6303,8 +6428,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
6303
6428
  key: "exec",
6304
6429
  value: function exec() {
6305
6430
  var _this39 = this;
6306
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
6307
- args[_key3] = arguments[_key3];
6431
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
6432
+ args[_key8] = arguments[_key8];
6308
6433
  }
6309
6434
  return new Promise(function (accept, reject) {
6310
6435
  if (!_this39._value) {
@@ -7061,8 +7186,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7061
7186
  key: "exec",
7062
7187
  value: function exec() {
7063
7188
  var _this44 = this;
7064
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
7065
- args[_key4] = arguments[_key4];
7189
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
7190
+ args[_key9] = arguments[_key9];
7066
7191
  }
7067
7192
  var instanceID = Util.id();
7068
7193
 
@@ -7165,6 +7290,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7165
7290
  var AnalyticsData = /*#__PURE__*/function () {
7166
7291
  function AnalyticsData() {
7167
7292
  _classCallCheck(this, AnalyticsData);
7293
+ _defineProperty(this, "_map", void 0);
7168
7294
  this._map = new Map();
7169
7295
  this.push("source", "embed");
7170
7296
  this.push("pageTitle", document.title);
@@ -7240,13 +7366,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7240
7366
  function Analytics(applicationID) {
7241
7367
  var _this45 = this;
7242
7368
  _classCallCheck(this, Analytics);
7243
- this._pageTime = null;
7244
- this.origin = "production";
7245
- this.event = "track";
7369
+ _defineProperty(this, "_applicationID", void 0);
7370
+ _defineProperty(this, "_handlePageHide", void 0);
7371
+ _defineProperty(this, "_data", void 0);
7372
+ _defineProperty(this, "_ga", void 0);
7373
+ _defineProperty(this, "_pageTime", null);
7374
+ _defineProperty(this, "origin", "production");
7375
+ _defineProperty(this, "event", "track");
7246
7376
  /**
7247
7377
  * Use HTTP Request to write analytics, otherwise will use beacons
7248
7378
  */
7249
- this.isBeacon = false;
7379
+ _defineProperty(this, "isBeacon", false);
7250
7380
  this._applicationID = applicationID;
7251
7381
  this._data = new analytics_data_1.AnalyticsData();
7252
7382
  this._ga = new google_analytics_1.GoogleAnalytics();
@@ -7280,7 +7410,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7280
7410
  if (!_query) {
7281
7411
  return reject(new Error("Analytics.query() - provided query was null"));
7282
7412
  }
7283
- var url = _this46.origin === "dev" ? "https://localhost:3008/v3/read" : "https://analytics.plattar.com/v3/read";
7413
+ var url = 'https://analytics.plattar.com/v3/read';
7414
+ switch (_this46.origin) {
7415
+ case 'dev':
7416
+ url = 'https://localhost:3008/v3/read';
7417
+ break;
7418
+ case 'staging':
7419
+ url = 'https://analytics.plattar.space/v3/read';
7420
+ break;
7421
+ }
7284
7422
  var data = {
7285
7423
  data: {
7286
7424
  attributes: {
@@ -7301,7 +7439,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7301
7439
  var _this47 = this;
7302
7440
  return new Promise(function (accept, reject) {
7303
7441
  var data = _this47._data;
7304
- var url = _this47.origin === "dev" ? "https://localhost:3008/v3/write" : "https://analytics.plattar.com/v3/write";
7442
+ var url = 'https://analytics.plattar.com/v3/write';
7443
+ switch (_this47.origin) {
7444
+ case 'dev':
7445
+ url = 'https://localhost:3008/v3/write';
7446
+ break;
7447
+ case 'staging':
7448
+ url = 'https://analytics.plattar.space/v3/write';
7449
+ break;
7450
+ }
7305
7451
  data.push("applicationId", _this47._applicationID);
7306
7452
  var sendData = {
7307
7453
  data: {
@@ -7353,6 +7499,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7353
7499
  var GoogleAnalytics = /*#__PURE__*/function () {
7354
7500
  function GoogleAnalytics() {
7355
7501
  _classCallCheck(this, GoogleAnalytics);
7502
+ _defineProperty(this, "_tokens", void 0);
7356
7503
  this._tokens = new Set();
7357
7504
  }
7358
7505
  return _createClass(GoogleAnalytics, [{
@@ -7363,7 +7510,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7363
7510
  return;
7364
7511
  }
7365
7512
  this._tokens.add(gaToken);
7366
- var gInstance = gtag;
7513
+ var gInstance = typeof gtag !== "undefined" ? gtag : undefined;
7367
7514
  if (gInstance) {
7368
7515
  gInstance("config", gaToken, {
7369
7516
  "custom_map": {
@@ -7385,7 +7532,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7385
7532
  return;
7386
7533
  }
7387
7534
  this._tokens.add(gaToken);
7388
- var gInstance = gtag;
7535
+ var gInstance = typeof gtag !== "undefined" ? gtag : undefined;
7389
7536
  if (gInstance) {
7390
7537
  gInstance("config", gaToken, {
7391
7538
  "custom_map": {
@@ -7402,7 +7549,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7402
7549
  return;
7403
7550
  }
7404
7551
  this._tokens.forEach(function (token) {
7405
- var gInstance = gtag;
7552
+ var gInstance = typeof gtag !== "undefined" ? gtag : undefined;
7406
7553
  if (gInstance) {
7407
7554
  var eventCategory = data.get("eventCategory"); // 0
7408
7555
  var eventAction = data.get("eventAction"); // 1
@@ -7455,13 +7602,23 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7455
7602
  } : function (o, v) {
7456
7603
  o["default"] = v;
7457
7604
  });
7458
- var __importStar = this && this.__importStar || function (mod) {
7459
- if (mod && mod.__esModule) return mod;
7460
- var result = {};
7461
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7462
- __setModuleDefault(result, mod);
7463
- return result;
7464
- };
7605
+ var __importStar = this && this.__importStar || function () {
7606
+ var _ownKeys2 = function ownKeys(o) {
7607
+ _ownKeys2 = Object.getOwnPropertyNames || function (o) {
7608
+ var ar = [];
7609
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
7610
+ return ar;
7611
+ };
7612
+ return _ownKeys2(o);
7613
+ };
7614
+ return function (mod) {
7615
+ if (mod && mod.__esModule) return mod;
7616
+ var result = {};
7617
+ if (mod != null) for (var k = _ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
7618
+ __setModuleDefault(result, mod);
7619
+ return result;
7620
+ };
7621
+ }();
7465
7622
  var __importDefault = this && this.__importDefault || function (mod) {
7466
7623
  return mod && mod.__esModule ? mod : {
7467
7624
  "default": mod
@@ -7600,13 +7757,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7600
7757
  exports.Util = Util;
7601
7758
  }, {}],
7602
7759
  47: [function (require, module, exports) {
7603
- "use strict";
7604
-
7605
- Object.defineProperty(exports, "__esModule", {
7606
- value: true
7607
- });
7608
- exports["default"] = "1.152.2";
7609
- }, {}],
7760
+ arguments[4][20][0].apply(exports, arguments);
7761
+ }, {
7762
+ "dup": 20
7763
+ }],
7610
7764
  48: [function (require, module, exports) {
7611
7765
  "use strict";
7612
7766
 
@@ -8256,7 +8410,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
8256
8410
  module.exports = PlattarQuery;
8257
8411
  }, {
8258
8412
  "../util/plattar-util.js": 113,
8259
- "node-fetch": 144
8413
+ "node-fetch": 145
8260
8414
  }],
8261
8415
  50: [function (require, module, exports) {
8262
8416
  (function (process) {
@@ -8399,24 +8553,26 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
8399
8553
  */
8400
8554
  PlattarServer.match = function (serverName) {
8401
8555
  switch (serverName.toLowerCase()) {
8556
+ case "cms.plattar.space":
8402
8557
  case "staging.plattar.space":
8403
- case "cdn-staging.plattar.space":
8558
+ case "cdn.plattar.space":
8404
8559
  case "staging":
8405
8560
  return {
8406
- base: "https://staging.plattar.space/",
8561
+ base: "https://cms.plattar.space/",
8407
8562
  api_read: "https://api.plattar.space/v3/",
8408
8563
  api_write: "https://api.plattar.space/v3/",
8409
- cdn: "https://cdn-staging.plattar.space/",
8564
+ cdn: "https://cdn.plattar.space/",
8410
8565
  cdn_image: "https://images.plattar.space/",
8411
8566
  analytics: "https://c.plattar.space/api/v2/analytics",
8412
8567
  type: "staging"
8413
8568
  };
8414
8569
  case "app.plattar.com":
8570
+ case "cms.plattar.com":
8415
8571
  case "cdn.plattar.com":
8416
8572
  case "prod":
8417
8573
  case "production":
8418
8574
  return {
8419
- base: "https://app.plattar.com/",
8575
+ base: "https://cms.plattar.com/",
8420
8576
  api_read: "https://api.plattar.com/v3/",
8421
8577
  api_write: "https://api.plattar.com/v3/",
8422
8578
  cdn: "https://cdn.plattar.com/",
@@ -8424,11 +8580,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
8424
8580
  analytics: "https://c.plattar.space/api/v2/analytics",
8425
8581
  type: "production"
8426
8582
  };
8583
+ case "cms-review.plattar.com":
8427
8584
  case "review.plattar.com":
8428
8585
  case "review":
8429
8586
  case "qa":
8430
8587
  return {
8431
- base: "https://review.plattar.com/",
8588
+ base: "https://cms-review.plattar.com/",
8432
8589
  api_read: "https://review-api.plattar.com/v3/",
8433
8590
  api_write: "https://review-api.plattar.com/v3/",
8434
8591
  cdn: "https://cdn.plattar.com/",
@@ -8477,8 +8634,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
8477
8634
  }).call(this);
8478
8635
  }).call(this, require('_process'));
8479
8636
  }, {
8480
- "_process": 146,
8481
- "node-fetch": 144
8637
+ "_process": 147,
8638
+ "node-fetch": 145
8482
8639
  }],
8483
8640
  51: [function (require, module, exports) {
8484
8641
  var PlattarBase = require("./interfaces/plattar-base.js");
@@ -9117,8 +9274,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9117
9274
  * Includes this query with the next GET operation
9118
9275
  */
9119
9276
  function include() {
9120
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
9121
- args[_key5] = arguments[_key5];
9277
+ for (var _len0 = arguments.length, args = new Array(_len0), _key0 = 0; _key0 < _len0; _key0++) {
9278
+ args[_key0] = arguments[_key0];
9122
9279
  }
9123
9280
  this._query._include(args);
9124
9281
  return this;
@@ -9142,8 +9299,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9142
9299
  key: "include",
9143
9300
  value: function include() {
9144
9301
  var _this58 = this;
9145
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
9146
- args[_key6] = arguments[_key6];
9302
+ for (var _len1 = arguments.length, args = new Array(_len1), _key1 = 0; _key1 < _len1; _key1++) {
9303
+ args[_key1] = arguments[_key1];
9147
9304
  }
9148
9305
  if (!args || args.length <= 0) {
9149
9306
  return [];
@@ -10404,7 +10561,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10404
10561
  "../types/trigger/trigger-image.js": 112
10405
10562
  }],
10406
10563
  114: [function (require, module, exports) {
10407
- module.exports = "1.186.3";
10564
+ module.exports = "2.7.1";
10408
10565
  }, {}],
10409
10566
  115: [function (require, module, exports) {
10410
10567
  var QRCodeStyling = require("qr-code-styling");
@@ -10645,7 +10802,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10645
10802
  }
10646
10803
  try {
10647
10804
  var b64Link = btoa(url);
10648
- fetch("https://c.plattar.com/shorten", {
10805
+ var serverType = _this64.hasAttribute("server") ? _this64.getAttribute("server") : "production";
10806
+ fetch(serverType === "staging" ? "https://c.plattar.space/shorten" : "https://c.plattar.com/shorten", {
10649
10807
  cache: "no-store",
10650
10808
  method: "POST",
10651
10809
  headers: {
@@ -10678,8 +10836,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10678
10836
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
10679
10837
  module.exports = BaseElement;
10680
10838
  }, {
10681
- "object-hash": 145,
10682
- "qr-code-styling": 147
10839
+ "object-hash": 146,
10840
+ "qr-code-styling": 148
10683
10841
  }],
10684
10842
  116: [function (require, module, exports) {
10685
10843
  var BaseElement = require("./base/base-element.js");
@@ -10714,8 +10872,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10714
10872
  "./version": 118
10715
10873
  }],
10716
10874
  118: [function (require, module, exports) {
10717
- module.exports = "1.178.1";
10718
- }, {}],
10875
+ arguments[4][114][0].apply(exports, arguments);
10876
+ }, {
10877
+ "dup": 114
10878
+ }],
10719
10879
  119: [function (require, module, exports) {
10720
10880
  "use strict";
10721
10881
 
@@ -10734,10 +10894,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10734
10894
  var Configurator = /*#__PURE__*/function () {
10735
10895
  function Configurator() {
10736
10896
  _classCallCheck(this, Configurator);
10737
- this.quality = 100;
10738
- this.output = "glb";
10739
- this.server = "production";
10740
- this.retry = 0;
10897
+ _defineProperty(this, "_maps", void 0);
10898
+ _defineProperty(this, "_attrHash", void 0);
10899
+ _defineProperty(this, "quality", 100);
10900
+ _defineProperty(this, "output", "glb");
10901
+ _defineProperty(this, "server", "production");
10902
+ _defineProperty(this, "retry", 0);
10741
10903
  this._maps = [];
10742
10904
  this._attrHash = [];
10743
10905
  }
@@ -10904,7 +11066,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10904
11066
  }, {
10905
11067
  "./remote-request": 121,
10906
11068
  "@plattar/plattar-api": 48,
10907
- "object-hash": 145
11069
+ "object-hash": 146
10908
11070
  }],
10909
11071
  120: [function (require, module, exports) {
10910
11072
  "use strict";
@@ -10924,11 +11086,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10924
11086
  var ModelConverter = /*#__PURE__*/function () {
10925
11087
  function ModelConverter() {
10926
11088
  _classCallCheck(this, ModelConverter);
10927
- this._model = null;
10928
- this.quality = 100;
10929
- this.output = "glb";
10930
- this.server = "production";
10931
- this.retry = 0;
11089
+ _defineProperty(this, "_attrHash", void 0);
11090
+ _defineProperty(this, "_model", null);
11091
+ _defineProperty(this, "quality", 100);
11092
+ _defineProperty(this, "output", "glb");
11093
+ _defineProperty(this, "server", "production");
11094
+ _defineProperty(this, "retry", 0);
10932
11095
  this._attrHash = [];
10933
11096
  }
10934
11097
  return _createClass(ModelConverter, [{
@@ -10985,21 +11148,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10985
11148
  }, {
10986
11149
  "./remote-request": 121,
10987
11150
  "@plattar/plattar-api": 48,
10988
- "object-hash": 145
11151
+ "object-hash": 146
10989
11152
  }],
10990
11153
  121: [function (require, module, exports) {
10991
11154
  "use strict";
10992
11155
 
10993
- var __importDefault = this && this.__importDefault || function (mod) {
10994
- return mod && mod.__esModule ? mod : {
10995
- "default": mod
10996
- };
10997
- };
10998
11156
  Object.defineProperty(exports, "__esModule", {
10999
11157
  value: true
11000
11158
  });
11001
11159
  exports.RemoteRequest = void 0;
11002
- var node_fetch_1 = __importDefault(require("node-fetch"));
11003
11160
  /**
11004
11161
  * This is used by the core types to perform remote requests
11005
11162
  */
@@ -11042,7 +11199,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11042
11199
  },
11043
11200
  body: JSON.stringify(payload)
11044
11201
  };
11045
- (0, node_fetch_1["default"])(endpoint, reqopts).then(function (res) {
11202
+ fetch(endpoint, reqopts).then(function (res) {
11046
11203
  if (res.ok) {
11047
11204
  try {
11048
11205
  return res.json();
@@ -11063,9 +11220,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11063
11220
  }]);
11064
11221
  }();
11065
11222
  exports.RemoteRequest = RemoteRequest;
11066
- }, {
11067
- "node-fetch": 144
11068
- }],
11223
+ }, {}],
11069
11224
  122: [function (require, module, exports) {
11070
11225
  "use strict";
11071
11226
 
@@ -11094,18 +11249,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11094
11249
  o["default"] = v;
11095
11250
  });
11096
11251
  var __importStar = this && this.__importStar || function () {
11097
- var _ownKeys2 = function ownKeys(o) {
11098
- _ownKeys2 = Object.getOwnPropertyNames || function (o) {
11252
+ var _ownKeys3 = function ownKeys(o) {
11253
+ _ownKeys3 = Object.getOwnPropertyNames || function (o) {
11099
11254
  var ar = [];
11100
11255
  for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
11101
11256
  return ar;
11102
11257
  };
11103
- return _ownKeys2(o);
11258
+ return _ownKeys3(o);
11104
11259
  };
11105
11260
  return function (mod) {
11106
11261
  if (mod && mod.__esModule) return mod;
11107
11262
  var result = {};
11108
- if (mod != null) for (var k = _ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
11263
+ if (mod != null) for (var k = _ownKeys3(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
11109
11264
  __setModuleDefault(result, mod);
11110
11265
  return result;
11111
11266
  };
@@ -11147,9 +11302,78 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11147
11302
  Object.defineProperty(exports, "__esModule", {
11148
11303
  value: true
11149
11304
  });
11150
- exports["default"] = "1.186.1";
11305
+ exports["default"] = "2.7.2";
11151
11306
  }, {}],
11152
11307
  124: [function (require, module, exports) {
11308
+ var BaseElement = require("./base/base-element.js");
11309
+ var AdhocElement = /*#__PURE__*/function (_BaseElement2) {
11310
+ function AdhocElement() {
11311
+ _classCallCheck(this, AdhocElement);
11312
+ return _callSuper(this, AdhocElement);
11313
+ }
11314
+ _inherits(AdhocElement, _BaseElement2);
11315
+ return _createClass(AdhocElement, [{
11316
+ key: "permissions",
11317
+ get: function get() {
11318
+ return ["autoplay"];
11319
+ }
11320
+ }, {
11321
+ key: "elementType",
11322
+ get: function get() {
11323
+ return "adhoc";
11324
+ }
11325
+ }, {
11326
+ key: "elementFullLocation",
11327
+ get: function get() {
11328
+ if (this.hasAttribute("type")) {
11329
+ var type = this.getAttribute("type");
11330
+ var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
11331
+ switch (server) {
11332
+ case "production":
11333
+ return "https://renderer.plattar.com/".concat(type, ".html").concat(this.allMappedAttributesQuery);
11334
+ case "staging":
11335
+ return "https://renderer.plattar.space/".concat(type, ".html").concat(this.allMappedAttributesQuery);
11336
+ case "review":
11337
+ return "https://renderer-review.plattar.com/".concat(type, ".html").concat(this.allMappedAttributesQuery);
11338
+ case "dev":
11339
+ return "https://localhost/renderer/".concat(type, ".html").concat(this.allMappedAttributesQuery);
11340
+ default:
11341
+ throw new Error("AdhocElement.elementFullLocation - attribute \"server\" must be one of \"production\", \"staging\", \"review\" or \"dev\" but was \"".concat(server, "\""));
11342
+ }
11343
+ }
11344
+ throw new Error("AdhocElement.elementFullLocation - attribute \"type\" is required");
11345
+ }
11346
+ }, {
11347
+ key: "optionalAttributes",
11348
+ get: function get() {
11349
+ if (this.hasAttribute("properties")) {
11350
+ var properties = this.getAttribute("properties");
11351
+ if (properties) {
11352
+ var splitProperties = properties.split(",");
11353
+ var props = [];
11354
+ splitProperties.forEach(function (prop) {
11355
+ props.push({
11356
+ key: prop,
11357
+ map: prop.replaceAll('-', '_')
11358
+ });
11359
+ });
11360
+ return props;
11361
+ }
11362
+ }
11363
+ return [];
11364
+ }
11365
+ }, {
11366
+ key: "coreAttributes",
11367
+ get: function get() {
11368
+ return [];
11369
+ }
11370
+ }]);
11371
+ }(BaseElement);
11372
+ module.exports = AdhocElement;
11373
+ }, {
11374
+ "./base/base-element.js": 125
11375
+ }],
11376
+ 125: [function (require, module, exports) {
11153
11377
  var Util = require("../../util/util");
11154
11378
  var ElementController = require("../controllers/element-controller");
11155
11379
  var _require = require("@plattar/context-messenger"),
@@ -11343,18 +11567,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11343
11567
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
11344
11568
  module.exports = BaseElement;
11345
11569
  }, {
11346
- "../../util/util": 139,
11347
- "../controllers/element-controller": 126,
11570
+ "../../util/util": 140,
11571
+ "../controllers/element-controller": 127,
11348
11572
  "@plattar/context-messenger": 25
11349
11573
  }],
11350
- 125: [function (require, module, exports) {
11574
+ 126: [function (require, module, exports) {
11351
11575
  var BaseElement = require("./base/base-element.js");
11352
- var ConfiguratorElement = /*#__PURE__*/function (_BaseElement2) {
11576
+ var ConfiguratorElement = /*#__PURE__*/function (_BaseElement3) {
11353
11577
  function ConfiguratorElement() {
11354
11578
  _classCallCheck(this, ConfiguratorElement);
11355
11579
  return _callSuper(this, ConfiguratorElement);
11356
11580
  }
11357
- _inherits(ConfiguratorElement, _BaseElement2);
11581
+ _inherits(ConfiguratorElement, _BaseElement3);
11358
11582
  return _createClass(ConfiguratorElement, [{
11359
11583
  key: "permissions",
11360
11584
  get: function get() {
@@ -11376,7 +11600,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11376
11600
  case "production":
11377
11601
  return "https://configurator.plattar.com/index.html".concat(this.allMappedAttributesQuery);
11378
11602
  case "staging":
11379
- return "https://configurator-staging.plattar.com/index.html".concat(this.allMappedAttributesQuery);
11603
+ return "https://configurator.plattar.space/index.html".concat(this.allMappedAttributesQuery);
11380
11604
  case "review":
11381
11605
  return "https://configurator-review.plattar.com/index.html".concat(this.allMappedAttributesQuery);
11382
11606
  case "dev":
@@ -11406,9 +11630,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11406
11630
  }(BaseElement);
11407
11631
  module.exports = ConfiguratorElement;
11408
11632
  }, {
11409
- "./base/base-element.js": 124
11633
+ "./base/base-element.js": 125
11410
11634
  }],
11411
- 126: [function (require, module, exports) {
11635
+ 127: [function (require, module, exports) {
11412
11636
  var Util = require("../../util/util.js");
11413
11637
  var _require2 = require("@plattar/context-messenger"),
11414
11638
  messenger = _require2.messenger;
@@ -11506,11 +11730,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11506
11730
  }();
11507
11731
  module.exports = ElementController;
11508
11732
  }, {
11509
- "../../util/util.js": 139,
11510
- "./iframe-controller.js": 127,
11733
+ "../../util/util.js": 140,
11734
+ "./iframe-controller.js": 128,
11511
11735
  "@plattar/context-messenger": 25
11512
11736
  }],
11513
- 127: [function (require, module, exports) {
11737
+ 128: [function (require, module, exports) {
11514
11738
  var Util = require("../../util/util.js");
11515
11739
  var IFrameController = /*#__PURE__*/function () {
11516
11740
  function IFrameController(element, src, id) {
@@ -11606,16 +11830,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11606
11830
  }();
11607
11831
  module.exports = IFrameController;
11608
11832
  }, {
11609
- "../../util/util.js": 139
11833
+ "../../util/util.js": 140
11610
11834
  }],
11611
- 128: [function (require, module, exports) {
11835
+ 129: [function (require, module, exports) {
11612
11836
  var BaseElement = require("./base/base-element.js");
11613
- var EditorElement = /*#__PURE__*/function (_BaseElement3) {
11837
+ var EditorElement = /*#__PURE__*/function (_BaseElement4) {
11614
11838
  function EditorElement() {
11615
11839
  _classCallCheck(this, EditorElement);
11616
11840
  return _callSuper(this, EditorElement);
11617
11841
  }
11618
- _inherits(EditorElement, _BaseElement3);
11842
+ _inherits(EditorElement, _BaseElement4);
11619
11843
  return _createClass(EditorElement, [{
11620
11844
  key: "permissions",
11621
11845
  get: function get() {
@@ -11630,16 +11854,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11630
11854
  }(BaseElement);
11631
11855
  module.exports = EditorElement;
11632
11856
  }, {
11633
- "./base/base-element.js": 124
11857
+ "./base/base-element.js": 125
11634
11858
  }],
11635
- 129: [function (require, module, exports) {
11859
+ 130: [function (require, module, exports) {
11636
11860
  var BaseElement = require("./base/base-element.js");
11637
- var EWallElement = /*#__PURE__*/function (_BaseElement4) {
11861
+ var EWallElement = /*#__PURE__*/function (_BaseElement5) {
11638
11862
  function EWallElement() {
11639
11863
  _classCallCheck(this, EWallElement);
11640
11864
  return _callSuper(this, EWallElement);
11641
11865
  }
11642
- _inherits(EWallElement, _BaseElement4);
11866
+ _inherits(EWallElement, _BaseElement5);
11643
11867
  return _createClass(EWallElement, [{
11644
11868
  key: "permissions",
11645
11869
  get: function get() {
@@ -11654,16 +11878,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11654
11878
  }(BaseElement);
11655
11879
  module.exports = EWallElement;
11656
11880
  }, {
11657
- "./base/base-element.js": 124
11881
+ "./base/base-element.js": 125
11658
11882
  }],
11659
- 130: [function (require, module, exports) {
11883
+ 131: [function (require, module, exports) {
11660
11884
  var BaseElement = require("./base/base-element.js");
11661
- var FaceARElement = /*#__PURE__*/function (_BaseElement5) {
11885
+ var FaceARElement = /*#__PURE__*/function (_BaseElement6) {
11662
11886
  function FaceARElement() {
11663
11887
  _classCallCheck(this, FaceARElement);
11664
11888
  return _callSuper(this, FaceARElement);
11665
11889
  }
11666
- _inherits(FaceARElement, _BaseElement5);
11890
+ _inherits(FaceARElement, _BaseElement6);
11667
11891
  return _createClass(FaceARElement, [{
11668
11892
  key: "permissions",
11669
11893
  get: function get() {
@@ -11698,16 +11922,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11698
11922
  }(BaseElement);
11699
11923
  module.exports = FaceARElement;
11700
11924
  }, {
11701
- "./base/base-element.js": 124
11925
+ "./base/base-element.js": 125
11702
11926
  }],
11703
- 131: [function (require, module, exports) {
11927
+ 132: [function (require, module, exports) {
11704
11928
  var BaseElement = require("./base/base-element.js");
11705
- var GalleryElement = /*#__PURE__*/function (_BaseElement6) {
11929
+ var GalleryElement = /*#__PURE__*/function (_BaseElement7) {
11706
11930
  function GalleryElement() {
11707
11931
  _classCallCheck(this, GalleryElement);
11708
11932
  return _callSuper(this, GalleryElement);
11709
11933
  }
11710
- _inherits(GalleryElement, _BaseElement6);
11934
+ _inherits(GalleryElement, _BaseElement7);
11711
11935
  return _createClass(GalleryElement, [{
11712
11936
  key: "permissions",
11713
11937
  get: function get() {
@@ -11727,16 +11951,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11727
11951
  }(BaseElement);
11728
11952
  module.exports = GalleryElement;
11729
11953
  }, {
11730
- "./base/base-element.js": 124
11954
+ "./base/base-element.js": 125
11731
11955
  }],
11732
- 132: [function (require, module, exports) {
11956
+ 133: [function (require, module, exports) {
11733
11957
  var BaseElement = require("./base/base-element.js");
11734
- var LauncherElement = /*#__PURE__*/function (_BaseElement7) {
11958
+ var LauncherElement = /*#__PURE__*/function (_BaseElement8) {
11735
11959
  function LauncherElement() {
11736
11960
  _classCallCheck(this, LauncherElement);
11737
11961
  return _callSuper(this, LauncherElement);
11738
11962
  }
11739
- _inherits(LauncherElement, _BaseElement7);
11963
+ _inherits(LauncherElement, _BaseElement8);
11740
11964
  return _createClass(LauncherElement, [{
11741
11965
  key: "permissions",
11742
11966
  get: function get() {
@@ -11786,16 +12010,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11786
12010
  }(BaseElement);
11787
12011
  module.exports = LauncherElement;
11788
12012
  }, {
11789
- "./base/base-element.js": 124
12013
+ "./base/base-element.js": 125
11790
12014
  }],
11791
- 133: [function (require, module, exports) {
12015
+ 134: [function (require, module, exports) {
11792
12016
  var BaseElement = require("./base/base-element.js");
11793
- var ModelElement = /*#__PURE__*/function (_BaseElement8) {
12017
+ var ModelElement = /*#__PURE__*/function (_BaseElement9) {
11794
12018
  function ModelElement() {
11795
12019
  _classCallCheck(this, ModelElement);
11796
12020
  return _callSuper(this, ModelElement);
11797
12021
  }
11798
- _inherits(ModelElement, _BaseElement8);
12022
+ _inherits(ModelElement, _BaseElement9);
11799
12023
  return _createClass(ModelElement, [{
11800
12024
  key: "permissions",
11801
12025
  get: function get() {
@@ -11829,16 +12053,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11829
12053
  }(BaseElement);
11830
12054
  module.exports = ModelElement;
11831
12055
  }, {
11832
- "./base/base-element.js": 124
12056
+ "./base/base-element.js": 125
11833
12057
  }],
11834
- 134: [function (require, module, exports) {
12058
+ 135: [function (require, module, exports) {
11835
12059
  var BaseElement = require("./base/base-element.js");
11836
- var ProductElement = /*#__PURE__*/function (_BaseElement9) {
12060
+ var ProductElement = /*#__PURE__*/function (_BaseElement0) {
11837
12061
  function ProductElement() {
11838
12062
  _classCallCheck(this, ProductElement);
11839
12063
  return _callSuper(this, ProductElement);
11840
12064
  }
11841
- _inherits(ProductElement, _BaseElement9);
12065
+ _inherits(ProductElement, _BaseElement0);
11842
12066
  return _createClass(ProductElement, [{
11843
12067
  key: "permissions",
11844
12068
  get: function get() {
@@ -11875,16 +12099,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11875
12099
  }(BaseElement);
11876
12100
  module.exports = ProductElement;
11877
12101
  }, {
11878
- "./base/base-element.js": 124
12102
+ "./base/base-element.js": 125
11879
12103
  }],
11880
- 135: [function (require, module, exports) {
12104
+ 136: [function (require, module, exports) {
11881
12105
  var BaseElement = require("./base/base-element.js");
11882
- var StudioElement = /*#__PURE__*/function (_BaseElement0) {
12106
+ var StudioElement = /*#__PURE__*/function (_BaseElement1) {
11883
12107
  function StudioElement() {
11884
12108
  _classCallCheck(this, StudioElement);
11885
12109
  return _callSuper(this, StudioElement);
11886
12110
  }
11887
- _inherits(StudioElement, _BaseElement0);
12111
+ _inherits(StudioElement, _BaseElement1);
11888
12112
  return _createClass(StudioElement, [{
11889
12113
  key: "permissions",
11890
12114
  get: function get() {
@@ -11910,16 +12134,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11910
12134
  }(BaseElement);
11911
12135
  module.exports = StudioElement;
11912
12136
  }, {
11913
- "./base/base-element.js": 124
12137
+ "./base/base-element.js": 125
11914
12138
  }],
11915
- 136: [function (require, module, exports) {
12139
+ 137: [function (require, module, exports) {
11916
12140
  var BaseElement = require("./base/base-element.js");
11917
- var ViewerElement = /*#__PURE__*/function (_BaseElement1) {
12141
+ var ViewerElement = /*#__PURE__*/function (_BaseElement10) {
11918
12142
  function ViewerElement() {
11919
12143
  _classCallCheck(this, ViewerElement);
11920
12144
  return _callSuper(this, ViewerElement);
11921
12145
  }
11922
- _inherits(ViewerElement, _BaseElement1);
12146
+ _inherits(ViewerElement, _BaseElement10);
11923
12147
  return _createClass(ViewerElement, [{
11924
12148
  key: "permissions",
11925
12149
  get: function get() {
@@ -11951,16 +12175,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11951
12175
  }(BaseElement);
11952
12176
  module.exports = ViewerElement;
11953
12177
  }, {
11954
- "./base/base-element.js": 124
12178
+ "./base/base-element.js": 125
11955
12179
  }],
11956
- 137: [function (require, module, exports) {
12180
+ 138: [function (require, module, exports) {
11957
12181
  var BaseElement = require("./base/base-element.js");
11958
- var WebXRElement = /*#__PURE__*/function (_BaseElement10) {
12182
+ var WebXRElement = /*#__PURE__*/function (_BaseElement11) {
11959
12183
  function WebXRElement() {
11960
12184
  _classCallCheck(this, WebXRElement);
11961
12185
  return _callSuper(this, WebXRElement);
11962
12186
  }
11963
- _inherits(WebXRElement, _BaseElement10);
12187
+ _inherits(WebXRElement, _BaseElement11);
11964
12188
  return _createClass(WebXRElement, [{
11965
12189
  key: "permissions",
11966
12190
  get: function get() {
@@ -11975,9 +12199,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11975
12199
  }(BaseElement);
11976
12200
  module.exports = WebXRElement;
11977
12201
  }, {
11978
- "./base/base-element.js": 124
12202
+ "./base/base-element.js": 125
11979
12203
  }],
11980
- 138: [function (require, module, exports) {
12204
+ 139: [function (require, module, exports) {
11981
12205
  "use strict";
11982
12206
 
11983
12207
  var WebXRElement = require("./elements/webxr-element.js");
@@ -11991,6 +12215,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11991
12215
  var ConfiguratorElement = require("./elements/configurator-element.js");
11992
12216
  var LauncherElement = require("./elements/launcher-element.js");
11993
12217
  var GalleryElement = require("./elements/gallery-element.js");
12218
+ var AdhocElement = require("./elements/adhoc-element.js");
11994
12219
  var Version = require("./version");
11995
12220
  if (customElements.get("plattar-webxr") === undefined) {
11996
12221
  customElements.define("plattar-webxr", WebXRElement);
@@ -12025,25 +12250,29 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12025
12250
  if (customElements.get("plattar-launcher") === undefined) {
12026
12251
  customElements.define("plattar-launcher", LauncherElement);
12027
12252
  }
12253
+ if (customElements.get("plattar-adhoc") === undefined) {
12254
+ customElements.define("plattar-adhoc", AdhocElement);
12255
+ }
12028
12256
  console.log("using @plattar/plattar-web v" + Version);
12029
12257
  module.exports = {
12030
12258
  version: Version
12031
12259
  };
12032
12260
  }, {
12033
- "./elements/configurator-element.js": 125,
12034
- "./elements/editor-element.js": 128,
12035
- "./elements/ewall-element.js": 129,
12036
- "./elements/facear-element.js": 130,
12037
- "./elements/gallery-element.js": 131,
12038
- "./elements/launcher-element.js": 132,
12039
- "./elements/model-element.js": 133,
12040
- "./elements/product-element.js": 134,
12041
- "./elements/studio-element.js": 135,
12042
- "./elements/viewer-element.js": 136,
12043
- "./elements/webxr-element.js": 137,
12044
- "./version": 140
12261
+ "./elements/adhoc-element.js": 124,
12262
+ "./elements/configurator-element.js": 126,
12263
+ "./elements/editor-element.js": 129,
12264
+ "./elements/ewall-element.js": 130,
12265
+ "./elements/facear-element.js": 131,
12266
+ "./elements/gallery-element.js": 132,
12267
+ "./elements/launcher-element.js": 133,
12268
+ "./elements/model-element.js": 134,
12269
+ "./elements/product-element.js": 135,
12270
+ "./elements/studio-element.js": 136,
12271
+ "./elements/viewer-element.js": 137,
12272
+ "./elements/webxr-element.js": 138,
12273
+ "./version": 141
12045
12274
  }],
12046
- 139: [function (require, module, exports) {
12275
+ 140: [function (require, module, exports) {
12047
12276
  var Util = /*#__PURE__*/function () {
12048
12277
  function Util() {
12049
12278
  _classCallCheck(this, Util);
@@ -12055,7 +12284,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12055
12284
  case "production":
12056
12285
  return "https://renderer.plattar.com/";
12057
12286
  case "staging":
12058
- return "https://renderer-staging.plattar.com/";
12287
+ return "https://renderer.plattar.space/";
12059
12288
  case "review":
12060
12289
  return "https://renderer-review.plattar.com/";
12061
12290
  case "dev":
@@ -12087,6 +12316,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12087
12316
  case "gallery":
12088
12317
  case "model":
12089
12318
  case "configurator":
12319
+ case "adhoc":
12090
12320
  case "webxr":
12091
12321
  return true;
12092
12322
  default:
@@ -12114,10 +12344,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12114
12344
  }();
12115
12345
  module.exports = Util;
12116
12346
  }, {}],
12117
- 140: [function (require, module, exports) {
12118
- module.exports = "2.5.3";
12119
- }, {}],
12120
12347
  141: [function (require, module, exports) {
12348
+ module.exports = "2.7.2";
12349
+ }, {}],
12350
+ 142: [function (require, module, exports) {
12121
12351
  'use strict';
12122
12352
 
12123
12353
  exports.byteLength = byteLength;
@@ -12223,7 +12453,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
12223
12453
  return parts.join('');
12224
12454
  }
12225
12455
  }, {}],
12226
- 142: [function (require, module, exports) {
12456
+ 143: [function (require, module, exports) {
12227
12457
  (function (Buffer) {
12228
12458
  (function () {
12229
12459
  /*!
@@ -13721,11 +13951,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
13721
13951
  }).call(this);
13722
13952
  }).call(this, require("buffer").Buffer);
13723
13953
  }, {
13724
- "base64-js": 141,
13725
- "buffer": 142,
13726
- "ieee754": 143
13954
+ "base64-js": 142,
13955
+ "buffer": 143,
13956
+ "ieee754": 144
13727
13957
  }],
13728
- 143: [function (require, module, exports) {
13958
+ 144: [function (require, module, exports) {
13729
13959
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
13730
13960
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
13731
13961
  var e, m;
@@ -13801,7 +14031,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
13801
14031
  buffer[offset + i - d] |= s * 128;
13802
14032
  };
13803
14033
  }, {}],
13804
- 144: [function (require, module, exports) {
14034
+ 145: [function (require, module, exports) {
13805
14035
  (function (global) {
13806
14036
  (function () {
13807
14037
  "use strict";
@@ -13835,7 +14065,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
13835
14065
  }).call(this);
13836
14066
  }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
13837
14067
  }, {}],
13838
- 145: [function (require, module, exports) {
14068
+ 146: [function (require, module, exports) {
13839
14069
  (function (global) {
13840
14070
  (function () {
13841
14071
  !function (e) {
@@ -14835,7 +15065,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
14835
15065
  }).call(this);
14836
15066
  }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
14837
15067
  }, {}],
14838
- 146: [function (require, module, exports) {
15068
+ 147: [function (require, module, exports) {
14839
15069
  // shim for using process in browser
14840
15070
  var process = module.exports = {};
14841
15071
 
@@ -15012,7 +15242,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
15012
15242
  return 0;
15013
15243
  };
15014
15244
  }, {}],
15015
- 147: [function (require, module, exports) {
15245
+ 148: [function (require, module, exports) {
15016
15246
  (function (Buffer) {
15017
15247
  (function () {
15018
15248
  !function (t, e) {
@@ -15024,8 +15254,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
15024
15254
  var i,
15025
15255
  r,
15026
15256
  n = function () {
15027
- var t = function t(_t29, e) {
15028
- var i = _t29,
15257
+ var t = function t(_t34, e) {
15258
+ var i = _t34,
15029
15259
  r = s[e],
15030
15260
  n = null,
15031
15261
  o = 0,
@@ -15837,12 +16067,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
15837
16067
  return $;
15838
16068
  }
15839
16069
  });
15840
- var t = function t(_t30) {
15841
- return !!_t30 && "object" == _typeof(_t30) && !Array.isArray(_t30);
16070
+ var t = function t(_t35) {
16071
+ return !!_t35 && "object" == _typeof(_t35) && !Array.isArray(_t35);
15842
16072
  };
15843
16073
  function e(i) {
15844
- for (var _len7 = arguments.length, r = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) {
15845
- r[_key7 - 1] = arguments[_key7];
16074
+ for (var _len10 = arguments.length, r = new Array(_len10 > 1 ? _len10 - 1 : 0), _key10 = 1; _key10 < _len10; _key10++) {
16075
+ r[_key10 - 1] = arguments[_key10];
15846
16076
  }
15847
16077
  if (!r.length) return i;
15848
16078
  var n = r.shift();
@@ -16436,7 +16666,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16436
16666
  value: function () {
16437
16667
  var _drawQR = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee51(t) {
16438
16668
  var _this83 = this;
16439
- var e, i, r, n, s, _this$_options, _t31, _i2, _r5, _a, _t32;
16669
+ var e, i, r, n, s, _this$_options, _t36, _i2, _r5, _a, _t37;
16440
16670
  return _regenerator().w(function (_context51) {
16441
16671
  while (1) switch (_context51.n) {
16442
16672
  case 0:
@@ -16460,7 +16690,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16460
16690
  }
16461
16691
  return _context51.a(2);
16462
16692
  case 2:
16463
- _this$_options = this._options, _t31 = _this$_options.imageOptions, _i2 = _this$_options.qrOptions, _r5 = _t31.imageSize * o[_i2.errorCorrectionLevel], _a = Math.floor(_r5 * e * e);
16693
+ _this$_options = this._options, _t36 = _this$_options.imageOptions, _i2 = _this$_options.qrOptions, _r5 = _t36.imageSize * o[_i2.errorCorrectionLevel], _a = Math.floor(_r5 * e * e);
16464
16694
  s = function (_ref16) {
16465
16695
  var t = _ref16.originalHeight,
16466
16696
  e = _ref16.originalWidth,
@@ -16502,8 +16732,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16502
16732
  return !(_this83._options.imageOptions.hideBackgroundDots && t >= (e - s.hideYDots) / 2 && t < (e + s.hideYDots) / 2 && i >= (e - s.hideXDots) / 2 && i < (e + s.hideXDots) / 2 || (null === (r = f[t]) || void 0 === r ? void 0 : r[i]) || (null === (n = f[t - e + 7]) || void 0 === n ? void 0 : n[i]) || (null === (o = f[t]) || void 0 === o ? void 0 : o[i - e + 7]) || (null === (a = w[t]) || void 0 === a ? void 0 : a[i]) || (null === (h = w[t - e + 7]) || void 0 === h ? void 0 : h[i]) || (null === (d = w[t]) || void 0 === d ? void 0 : d[i - e + 7]));
16503
16733
  });
16504
16734
  this.drawCorners();
16505
- _t32 = this._options.image;
16506
- if (!_t32) {
16735
+ _t37 = this._options.image;
16736
+ if (!_t37) {
16507
16737
  _context51.n = 4;
16508
16738
  break;
16509
16739
  }
@@ -16536,8 +16766,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16536
16766
  var s = n.height,
16537
16767
  _a2 = n.width;
16538
16768
  if (_r6 || _o) {
16539
- var _t33 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
16540
- this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (s = _a2 = Math.min(n.width, n.height), _t33.setAttribute("rx", String(s / 2 * n.backgroundOptions.round))), _t33.setAttribute("x", String(this._roundSize((n.width - _a2) / 2))), _t33.setAttribute("y", String(this._roundSize((n.height - s) / 2))), _t33.setAttribute("width", String(_a2)), _t33.setAttribute("height", String(s)), this._backgroundClipPath.appendChild(_t33), this._createColor({
16769
+ var _t38 = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect");
16770
+ this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color-".concat(this._instanceId)), this._defs.appendChild(this._backgroundClipPath), (null === (i = n.backgroundOptions) || void 0 === i ? void 0 : i.round) && (s = _a2 = Math.min(n.width, n.height), _t38.setAttribute("rx", String(s / 2 * n.backgroundOptions.round))), _t38.setAttribute("x", String(this._roundSize((n.width - _a2) / 2))), _t38.setAttribute("y", String(this._roundSize((n.height - s) / 2))), _t38.setAttribute("width", String(_a2)), _t38.setAttribute("height", String(s)), this._backgroundClipPath.appendChild(_t38), this._createColor({
16541
16771
  options: _r6,
16542
16772
  color: _o,
16543
16773
  additionalRotation: 0,
@@ -16593,29 +16823,29 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16593
16823
  _loop2(_e3);
16594
16824
  }
16595
16825
  if (r.shape === g) {
16596
- var _t34 = this._roundSize((o / h - n) / 2),
16597
- _e4 = n + 2 * _t34,
16598
- _i3 = d - _t34 * h,
16599
- _r7 = u - _t34 * h,
16826
+ var _t39 = this._roundSize((o / h - n) / 2),
16827
+ _e4 = n + 2 * _t39,
16828
+ _i3 = d - _t39 * h,
16829
+ _r7 = u - _t39 * h,
16600
16830
  s = [],
16601
16831
  _a3 = this._roundSize(_e4 / 2);
16602
16832
  for (var _i4 = 0; _i4 < _e4; _i4++) {
16603
16833
  s[_i4] = [];
16604
- for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t34 - 1 && _i4 <= _e4 - _t34 && _r8 >= _t34 - 1 && _r8 <= _e4 - _t34 || Math.sqrt((_i4 - _a3) * (_i4 - _a3) + (_r8 - _a3) * (_r8 - _a3)) > _a3 ? s[_i4][_r8] = 0 : s[_i4][_r8] = this._qr.isDark(_r8 - 2 * _t34 < 0 ? _r8 : _r8 >= n ? _r8 - 2 * _t34 : _r8 - _t34, _i4 - 2 * _t34 < 0 ? _i4 : _i4 >= n ? _i4 - 2 * _t34 : _i4 - _t34) ? 1 : 0;
16834
+ for (var _r8 = 0; _r8 < _e4; _r8++) _i4 >= _t39 - 1 && _i4 <= _e4 - _t39 && _r8 >= _t39 - 1 && _r8 <= _e4 - _t39 || Math.sqrt((_i4 - _a3) * (_i4 - _a3) + (_r8 - _a3) * (_r8 - _a3)) > _a3 ? s[_i4][_r8] = 0 : s[_i4][_r8] = this._qr.isDark(_r8 - 2 * _t39 < 0 ? _r8 : _r8 >= n ? _r8 - 2 * _t39 : _r8 - _t39, _i4 - 2 * _t39 < 0 ? _i4 : _i4 >= n ? _i4 - 2 * _t39 : _i4 - _t39) ? 1 : 0;
16605
16835
  }
16606
- var _loop3 = function _loop3(_t35) {
16836
+ var _loop3 = function _loop3(_t40) {
16607
16837
  var _loop4 = function _loop4(_n) {
16608
- s[_t35][_n] && (c.draw(_i3 + _n * h, _r7 + _t35 * h, h, function (e, i) {
16838
+ s[_t40][_n] && (c.draw(_i3 + _n * h, _r7 + _t40 * h, h, function (e, i) {
16609
16839
  var r;
16610
- return !!(null === (r = s[_t35 + i]) || void 0 === r ? void 0 : r[_n + e]);
16840
+ return !!(null === (r = s[_t40 + i]) || void 0 === r ? void 0 : r[_n + e]);
16611
16841
  }), c._element && _this84._dotsClipPath && _this84._dotsClipPath.appendChild(c._element));
16612
16842
  };
16613
16843
  for (var _n = 0; _n < _e4; _n++) {
16614
16844
  _loop4(_n);
16615
16845
  }
16616
16846
  };
16617
- for (var _t35 = 0; _t35 < _e4; _t35++) {
16618
- _loop3(_t35);
16847
+ for (var _t40 = 0; _t40 < _e4; _t40++) {
16848
+ _loop3(_t40);
16619
16849
  }
16620
16850
  }
16621
16851
  }
@@ -16655,24 +16885,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16655
16885
  width: a,
16656
16886
  name: "corners-square-color-".concat(t, "-").concat(r, "-").concat(_this85._instanceId)
16657
16887
  })), (null === (y = e.cornersSquareOptions) || void 0 === y ? void 0 : y.type) && h.includes(e.cornersSquareOptions.type)) {
16658
- var _t36 = new d({
16888
+ var _t41 = new d({
16659
16889
  svg: _this85._element,
16660
16890
  type: e.cornersSquareOptions.type,
16661
16891
  window: _this85._window
16662
16892
  });
16663
- _t36.draw(z, B, a, n), _t36._element && P && P.appendChild(_t36._element);
16893
+ _t41.draw(z, B, a, n), _t41._element && P && P.appendChild(_t41._element);
16664
16894
  } else {
16665
- var _t37 = new s({
16895
+ var _t42 = new s({
16666
16896
  svg: _this85._element,
16667
16897
  type: (null === (x = e.cornersSquareOptions) || void 0 === x ? void 0 : x.type) || e.dotsOptions.type,
16668
16898
  window: _this85._window
16669
16899
  });
16670
16900
  var _loop6 = function _loop6(_e5) {
16671
16901
  var _loop7 = function _loop7(_i5) {
16672
- (null === (S = f[_e5]) || void 0 === S ? void 0 : S[_i5]) && (_t37.draw(z + _i5 * o, B + _e5 * o, o, function (t, r) {
16902
+ (null === (S = f[_e5]) || void 0 === S ? void 0 : S[_i5]) && (_t42.draw(z + _i5 * o, B + _e5 * o, o, function (t, r) {
16673
16903
  var n;
16674
16904
  return !!(null === (n = f[_e5 + r]) || void 0 === n ? void 0 : n[_i5 + t]);
16675
- }), _t37._element && P && P.appendChild(_t37._element));
16905
+ }), _t42._element && P && P.appendChild(_t42._element));
16676
16906
  };
16677
16907
  for (var _i5 = 0; _i5 < f[_e5].length; _i5++) {
16678
16908
  _loop7(_i5);
@@ -16692,24 +16922,24 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16692
16922
  width: u,
16693
16923
  name: "corners-dot-color-".concat(t, "-").concat(r, "-").concat(_this85._instanceId)
16694
16924
  })), (null === (O = e.cornersDotOptions) || void 0 === O ? void 0 : O.type) && c.includes(e.cornersDotOptions.type)) {
16695
- var _t38 = new l({
16925
+ var _t43 = new l({
16696
16926
  svg: _this85._element,
16697
16927
  type: e.cornersDotOptions.type,
16698
16928
  window: _this85._window
16699
16929
  });
16700
- _t38.draw(z + 2 * o, B + 2 * o, u, n), _t38._element && I && I.appendChild(_t38._element);
16930
+ _t43.draw(z + 2 * o, B + 2 * o, u, n), _t43._element && I && I.appendChild(_t43._element);
16701
16931
  } else {
16702
- var _t39 = new s({
16932
+ var _t44 = new s({
16703
16933
  svg: _this85._element,
16704
16934
  type: (null === (D = e.cornersDotOptions) || void 0 === D ? void 0 : D.type) || e.dotsOptions.type,
16705
16935
  window: _this85._window
16706
16936
  });
16707
16937
  var _loop8 = function _loop8(_e6) {
16708
16938
  var _loop9 = function _loop9(_i6) {
16709
- (null === (k = w[_e6]) || void 0 === k ? void 0 : k[_i6]) && (_t39.draw(z + _i6 * o, B + _e6 * o, o, function (t, r) {
16939
+ (null === (k = w[_e6]) || void 0 === k ? void 0 : k[_i6]) && (_t44.draw(z + _i6 * o, B + _e6 * o, o, function (t, r) {
16710
16940
  var n;
16711
16941
  return !!(null === (n = w[_e6 + r]) || void 0 === n ? void 0 : n[_i6 + t]);
16712
- }), _t39._element && I && I.appendChild(_t39._element));
16942
+ }), _t44._element && I && I.appendChild(_t44._element));
16713
16943
  };
16714
16944
  for (var _i6 = 0; _i6 < w[_e6].length; _i6++) {
16715
16945
  _loop9(_i6);
@@ -16732,19 +16962,19 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16732
16962
  if (null === (i = r.nodeCanvas) || void 0 === i ? void 0 : i.loadImage) r.nodeCanvas.loadImage(r.image).then(function (e) {
16733
16963
  var i, n;
16734
16964
  if (_this86._image = e, _this86._options.imageOptions.saveAsBlob) {
16735
- var _t40 = null === (i = r.nodeCanvas) || void 0 === i ? void 0 : i.createCanvas(_this86._image.width, _this86._image.height);
16736
- null === (n = null == _t40 ? void 0 : _t40.getContext("2d")) || void 0 === n || n.drawImage(e, 0, 0), _this86._imageUri = null == _t40 ? void 0 : _t40.toDataURL();
16965
+ var _t45 = null === (i = r.nodeCanvas) || void 0 === i ? void 0 : i.createCanvas(_this86._image.width, _this86._image.height);
16966
+ null === (n = null == _t45 ? void 0 : _t45.getContext("2d")) || void 0 === n || n.drawImage(e, 0, 0), _this86._imageUri = null == _t45 ? void 0 : _t45.toDataURL();
16737
16967
  }
16738
16968
  t();
16739
16969
  })["catch"](e);else {
16740
16970
  var _e7 = new _this86._window.Image();
16741
16971
  "string" == typeof r.imageOptions.crossOrigin && (_e7.crossOrigin = r.imageOptions.crossOrigin), _this86._image = _e7, _e7.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee53() {
16742
- var _t41;
16972
+ var _t46;
16743
16973
  return _regenerator().w(function (_context53) {
16744
16974
  while (1) switch (_context53.n) {
16745
16975
  case 0:
16746
- _t41 = _this86._options.imageOptions.saveAsBlob;
16747
- if (!_t41) {
16976
+ _t46 = _this86._options.imageOptions.saveAsBlob;
16977
+ if (!_t46) {
16748
16978
  _context53.n = 2;
16749
16979
  break;
16750
16980
  }
@@ -16843,7 +17073,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16843
17073
  var v = p,
16844
17074
  _ = "canvas",
16845
17075
  m = {};
16846
- for (var _t42 = 0; _t42 <= 40; _t42++) m[_t42] = _t42;
17076
+ for (var _t47 = 0; _t47 <= 40; _t47++) m[_t47] = _t47;
16847
17077
  var b = {
16848
17078
  type: _,
16849
17079
  shape: "square",
@@ -16946,12 +17176,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16946
17176
  t.width = _this89._options.width, t.height = _this89._options.height, null === (i = null === (e = _this89._nodeCanvas) || void 0 === e ? void 0 : e.getContext("2d")) || void 0 === i || i.drawImage(t, 0, 0);
16947
17177
  });
16948
17178
  {
16949
- var _t43 = new _this89._window.Image();
17179
+ var _t48 = new _this89._window.Image();
16950
17180
  return new Promise(function (e) {
16951
- _t43.onload = function () {
17181
+ _t48.onload = function () {
16952
17182
  var i, r;
16953
- null === (r = null === (i = _this89._domCanvas) || void 0 === i ? void 0 : i.getContext("2d")) || void 0 === r || r.drawImage(_t43, 0, 0), e();
16954
- }, _t43.src = n;
17183
+ null === (r = null === (i = _this89._domCanvas) || void 0 === i ? void 0 : i.getContext("2d")) || void 0 === r || r.drawImage(_t48, 0, 0), e();
17184
+ }, _t48.src = n;
16955
17185
  });
16956
17186
  }
16957
17187
  }));
@@ -16962,7 +17192,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16962
17192
  var _getElement2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee55() {
16963
17193
  var t,
16964
17194
  _args55 = arguments,
16965
- _t44;
17195
+ _t49;
16966
17196
  return _regenerator().w(function (_context55) {
16967
17197
  while (1) switch (_context55.n) {
16968
17198
  case 0:
@@ -16981,7 +17211,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16981
17211
  _context55.n = 2;
16982
17212
  return this._svgDrawingPromise;
16983
17213
  case 2:
16984
- _t44 = this._svg;
17214
+ _t49 = this._svg;
16985
17215
  _context55.n = 5;
16986
17216
  break;
16987
17217
  case 3:
@@ -16989,9 +17219,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
16989
17219
  _context55.n = 4;
16990
17220
  return this._canvasDrawingPromise;
16991
17221
  case 4:
16992
- _t44 = this._domCanvas || this._nodeCanvas;
17222
+ _t49 = this._domCanvas || this._nodeCanvas;
16993
17223
  case 5:
16994
- return _context55.a(2, _t44);
17224
+ return _context55.a(2, _t49);
16995
17225
  }
16996
17226
  }, _callee55, this);
16997
17227
  }));
@@ -17040,7 +17270,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
17040
17270
  var t,
17041
17271
  e,
17042
17272
  i,
17043
- _t45,
17273
+ _t50,
17044
17274
  _args56 = arguments;
17045
17275
  return _regenerator().w(function (_context56) {
17046
17276
  while (1) switch (_context56.n) {
@@ -17067,8 +17297,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
17067
17297
  _context56.n = 4;
17068
17298
  break;
17069
17299
  }
17070
- _t45 = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n".concat(new this._window.XMLSerializer().serializeToString(e));
17071
- return _context56.a(2, "undefined" == typeof Blob || this._options.jsdom ? Buffer.from(_t45) : new Blob([_t45], {
17300
+ _t50 = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n".concat(new this._window.XMLSerializer().serializeToString(e));
17301
+ return _context56.a(2, "undefined" == typeof Blob || this._options.jsdom ? Buffer.from(_t50) : new Blob([_t50], {
17072
17302
  type: i
17073
17303
  }));
17074
17304
  case 4:
@@ -17093,7 +17323,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
17093
17323
  key: "download",
17094
17324
  value: function () {
17095
17325
  var _download = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee57(t) {
17096
- var e, i, r, _t46;
17326
+ var e, i, r, _t51;
17097
17327
  return _regenerator().w(function (_context57) {
17098
17328
  while (1) switch (_context57.n) {
17099
17329
  case 0:
@@ -17116,8 +17346,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
17116
17346
  case 3:
17117
17347
  r = _context57.v;
17118
17348
  if (r) if ("svg" === e.toLowerCase()) {
17119
- _t46 = new XMLSerializer().serializeToString(r);
17120
- _t46 = '<?xml version="1.0" standalone="no"?>\r\n' + _t46, n("data:".concat(A(e), ";charset=utf-8,").concat(encodeURIComponent(_t46)), "".concat(i, ".svg"));
17349
+ _t51 = new XMLSerializer().serializeToString(r);
17350
+ _t51 = '<?xml version="1.0" standalone="no"?>\r\n' + _t51, n("data:".concat(A(e), ";charset=utf-8,").concat(encodeURIComponent(_t51)), "".concat(i, ".svg"));
17121
17351
  } else n(r.toDataURL(A(e)), "".concat(i, ".").concat(e));
17122
17352
  case 4:
17123
17353
  return _context57.a(2);
@@ -17143,7 +17373,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
17143
17373
  }).call(this);
17144
17374
  }).call(this, require("buffer").Buffer);
17145
17375
  }, {
17146
- "buffer": 142
17376
+ "buffer": 143
17147
17377
  }]
17148
17378
  }, {}, [17])(17);
17149
17379
  });