@car-cutter/wc-webplayer 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +95 -86
- package/dist/index.umd.cjs +3 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1349,10 +1349,10 @@ const qt = (e, t, n) => e + (t - e) * n, lr = (e, t, n, o, i, s = !1) => {
|
|
|
1349
1349
|
default:
|
|
1350
1350
|
return !1;
|
|
1351
1351
|
}
|
|
1352
|
-
}, [M.type, P]), [
|
|
1352
|
+
}, [M.type, P]), [Q, oe] = Ce(1), ee = Z(
|
|
1353
1353
|
(F) => {
|
|
1354
|
-
const se = typeof F == "function" ? F(
|
|
1355
|
-
|
|
1354
|
+
const se = typeof F == "function" ? F(Q) : F;
|
|
1355
|
+
Q !== se && (oe(se), s({
|
|
1356
1356
|
type: "interaction",
|
|
1357
1357
|
current: {
|
|
1358
1358
|
category_id: z,
|
|
@@ -1368,19 +1368,19 @@ const qt = (e, t, n) => e + (t - e) * n, lr = (e, t, n, o, i, s = !1) => {
|
|
|
1368
1368
|
}));
|
|
1369
1369
|
},
|
|
1370
1370
|
[
|
|
1371
|
-
|
|
1371
|
+
Q,
|
|
1372
1372
|
s,
|
|
1373
1373
|
z,
|
|
1374
1374
|
J,
|
|
1375
1375
|
M.type,
|
|
1376
1376
|
k
|
|
1377
1377
|
]
|
|
1378
|
-
), C =
|
|
1378
|
+
), C = Q !== 1, ae = Q < ht, ne = Q > 1, _e = Z(
|
|
1379
1379
|
(F) => {
|
|
1380
|
-
|
|
1380
|
+
ee((se) => at(se + F, 1, ht));
|
|
1381
1381
|
},
|
|
1382
|
-
[
|
|
1383
|
-
), fe = Z(() =>
|
|
1382
|
+
[ee]
|
|
1383
|
+
), fe = Z(() => ee(1), [ee]), $e = Z(() => _e(xt), [_e]), Ue = Z(() => _e(-xt), [_e]), ge = Z(() => {
|
|
1384
1384
|
fe(), ve();
|
|
1385
1385
|
}, [fe, ve]), [we, ye] = Ce(!1), [Pe, Ne] = Ce(), [We, Be] = Ce(!1), Me = Z(
|
|
1386
1386
|
async (F) => {
|
|
@@ -1524,9 +1524,9 @@ const qt = (e, t, n) => e + (t - e) * n, lr = (e, t, n, o, i, s = !1) => {
|
|
|
1524
1524
|
setShownDetails: Ze,
|
|
1525
1525
|
resetShownDetails: ve,
|
|
1526
1526
|
showZoomControls: _,
|
|
1527
|
-
zoom:
|
|
1527
|
+
zoom: Q,
|
|
1528
1528
|
isZooming: C,
|
|
1529
|
-
setZoom:
|
|
1529
|
+
setZoom: ee,
|
|
1530
1530
|
resetZoom: fe,
|
|
1531
1531
|
canZoomIn: ae,
|
|
1532
1532
|
zoomIn: $e,
|
|
@@ -2591,10 +2591,10 @@ const to = ({ className: e }) => /* @__PURE__ */ c(Je, { className: e, customiza
|
|
|
2591
2591
|
const Te = () => {
|
|
2592
2592
|
$ !== null && cancelAnimationFrame($), $ = requestAnimationFrame(() => {
|
|
2593
2593
|
$ = null;
|
|
2594
|
-
const Ze = le.getBoundingClientRect(), ve = re.getBoundingClientRect(), h = S.getBoundingClientRect(), _ = Ze.right - ve.left,
|
|
2595
|
-
let
|
|
2596
|
-
_ >= oe ?
|
|
2597
|
-
(C) => C ===
|
|
2594
|
+
const Ze = le.getBoundingClientRect(), ve = re.getBoundingClientRect(), h = S.getBoundingClientRect(), _ = Ze.right - ve.left, Q = ve.right - Ze.left, oe = h.width;
|
|
2595
|
+
let ee = !1;
|
|
2596
|
+
_ >= oe ? ee = !1 : Q >= oe ? ee = !0 : ee = Q >= _, z(
|
|
2597
|
+
(C) => C === ee ? C : ee
|
|
2598
2598
|
);
|
|
2599
2599
|
});
|
|
2600
2600
|
};
|
|
@@ -2783,10 +2783,10 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2783
2783
|
var f = t.createElement("canvas");
|
|
2784
2784
|
f.style.width = f.style.height = "100%", L.appendChild(f);
|
|
2785
2785
|
var p, a, b, I, k, g, y, E, w, M, P, j, T, H, Y, R;
|
|
2786
|
-
this.init = function(h, _,
|
|
2786
|
+
this.init = function(h, _, Q, oe, ee, C, ae, ne) {
|
|
2787
2787
|
if (_ === n && (_ = "equirectangular"), _ != "equirectangular" && _ != "cubemap" && _ != "multires")
|
|
2788
2788
|
throw console.log("Error: invalid image type specified!"), { type: "config error" };
|
|
2789
|
-
if (M = _, w = h, P =
|
|
2789
|
+
if (M = _, w = h, P = Q, R = ne || {}, p) {
|
|
2790
2790
|
if (b && (a.detachShader(p, b), a.deleteShader(b)), I && (a.detachShader(p, I), a.deleteShader(I)), a.bindBuffer(a.ARRAY_BUFFER, null), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, null), p.texture && a.deleteTexture(p.texture), p.nodeCache)
|
|
2791
2791
|
for (var _e = 0; _e < p.nodeCache.length; _e++)
|
|
2792
2792
|
a.deleteTexture(p.nodeCache[_e].texture);
|
|
@@ -2861,7 +2861,7 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2861
2861
|
var De = v;
|
|
2862
2862
|
M == "cubemap" ? (Oe = a.TEXTURE_CUBE_MAP, De = r) : M == "multires" && (De = m), a.shaderSource(I, De), a.compileShader(I), p = a.createProgram(), a.attachShader(p, b), a.attachShader(p, I), a.linkProgram(p), a.getShaderParameter(b, a.COMPILE_STATUS) || console.log(a.getShaderInfoLog(b)), a.getShaderParameter(I, a.COMPILE_STATUS) || console.log(a.getShaderInfoLog(I)), a.getProgramParameter(p, a.LINK_STATUS) || console.log(a.getProgramInfoLog(p)), a.useProgram(p), p.drawInProgress = !1;
|
|
2863
2863
|
var Re = ne.backgroundColor ? ne.backgroundColor : [0, 0, 0];
|
|
2864
|
-
a.clearColor(Re[0], Re[1], Re[2], 1), a.clear(a.COLOR_BUFFER_BIT), p.texCoordLocation = a.getAttribLocation(p, "a_texCoord"), a.enableVertexAttribArray(p.texCoordLocation), M != "multires" ? (j || (j = a.createBuffer()), a.bindBuffer(a.ARRAY_BUFFER, j), a.bufferData(a.ARRAY_BUFFER, new Float32Array([-1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), a.STATIC_DRAW), a.vertexAttribPointer(p.texCoordLocation, 2, a.FLOAT, !1, 0, 0), p.aspectRatio = a.getUniformLocation(p, "u_aspectRatio"), a.uniform1f(p.aspectRatio, a.drawingBufferWidth / a.drawingBufferHeight), p.psi = a.getUniformLocation(p, "u_psi"), p.theta = a.getUniformLocation(p, "u_theta"), p.f = a.getUniformLocation(p, "u_f"), p.h = a.getUniformLocation(p, "u_h"), p.v = a.getUniformLocation(p, "u_v"), p.vo = a.getUniformLocation(p, "u_vo"), p.rot = a.getUniformLocation(p, "u_rot"), a.uniform1f(p.h, oe / (Math.PI * 2)), a.uniform1f(p.v,
|
|
2864
|
+
a.clearColor(Re[0], Re[1], Re[2], 1), a.clear(a.COLOR_BUFFER_BIT), p.texCoordLocation = a.getAttribLocation(p, "a_texCoord"), a.enableVertexAttribArray(p.texCoordLocation), M != "multires" ? (j || (j = a.createBuffer()), a.bindBuffer(a.ARRAY_BUFFER, j), a.bufferData(a.ARRAY_BUFFER, new Float32Array([-1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), a.STATIC_DRAW), a.vertexAttribPointer(p.texCoordLocation, 2, a.FLOAT, !1, 0, 0), p.aspectRatio = a.getUniformLocation(p, "u_aspectRatio"), a.uniform1f(p.aspectRatio, a.drawingBufferWidth / a.drawingBufferHeight), p.psi = a.getUniformLocation(p, "u_psi"), p.theta = a.getUniformLocation(p, "u_theta"), p.f = a.getUniformLocation(p, "u_f"), p.h = a.getUniformLocation(p, "u_h"), p.v = a.getUniformLocation(p, "u_v"), p.vo = a.getUniformLocation(p, "u_vo"), p.rot = a.getUniformLocation(p, "u_rot"), a.uniform1f(p.h, oe / (Math.PI * 2)), a.uniform1f(p.v, ee / Math.PI), a.uniform1f(p.vo, C / Math.PI * 2), M == "equirectangular" && (p.backgroundColor = a.getUniformLocation(p, "u_backgroundColor"), a.uniform4fv(p.backgroundColor, Re.concat([1]))), p.texture = a.createTexture(), a.bindTexture(Oe, p.texture), M == "cubemap" ? (a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[1]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[3]), a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[4]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[5]), a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[0]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w[2])) : a.texImage2D(Oe, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w), a.texParameteri(Oe, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(Oe, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(Oe, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(Oe, a.TEXTURE_MAG_FILTER, a.LINEAR)) : (p.vertPosLocation = a.getAttribLocation(p, "a_vertCoord"), a.enableVertexAttribArray(p.vertPosLocation), T || (T = a.createBuffer()), H || (H = a.createBuffer()), Y || (Y = a.createBuffer()), a.bindBuffer(a.ARRAY_BUFFER, H), a.bufferData(a.ARRAY_BUFFER, new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), a.STATIC_DRAW), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, Y), a.bufferData(a.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), a.STATIC_DRAW), p.perspUniform = a.getUniformLocation(p, "u_perspMatrix"), p.cubeUniform = a.getUniformLocation(p, "u_cubeMatrix"), p.level = -1, p.currentNodes = [], p.nodeCache = [], p.nodeCacheTimestamp = 0);
|
|
2865
2865
|
var F = a.getError();
|
|
2866
2866
|
if (F !== 0)
|
|
2867
2867
|
throw console.log("Error: Something went wrong with WebGL!", F), { type: "webgl error" };
|
|
@@ -2876,8 +2876,8 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2876
2876
|
f.width = f.clientWidth * h, f.height = f.clientHeight * h, a && (a.getError() == 1286 && ve(), a.viewport(0, 0, a.drawingBufferWidth, a.drawingBufferHeight), M != "multires" && a.uniform1f(p.aspectRatio, f.clientWidth / f.clientHeight));
|
|
2877
2877
|
}, this.resize(), this.setPose = function(h, _) {
|
|
2878
2878
|
E = [h, _];
|
|
2879
|
-
}, this.render = function(h, _,
|
|
2880
|
-
var
|
|
2879
|
+
}, this.render = function(h, _, Q, oe) {
|
|
2880
|
+
var ee, C, ae, ne = 0;
|
|
2881
2881
|
if (oe === n && (oe = {}), oe.roll && (ne = oe.roll), E !== n) {
|
|
2882
2882
|
var _e = E[0], fe = E[1], $e = h, Ue = _, ge = Math.cos(fe) * Math.sin(h) * Math.sin(_e) + Math.cos(h) * (Math.cos(_e) * Math.cos(_) + Math.sin(fe) * Math.sin(_e) * Math.sin(_)), we = -Math.sin(h) * Math.sin(fe) + Math.cos(h) * Math.cos(fe) * Math.sin(_), ye = Math.cos(fe) * Math.cos(_e) * Math.sin(h) + Math.cos(h) * (-Math.cos(_) * Math.sin(_e) + Math.cos(_e) * Math.sin(fe) * Math.sin(_));
|
|
2883
2883
|
h = Math.asin(Math.max(Math.min(ye, 1), -1)), _ = Math.atan2(we, ge);
|
|
@@ -2894,8 +2894,8 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2894
2894
|
l: "translate3d(-" + ae + "px, -" + (ae + 2) + "px, " + (ae + 2) + "px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",
|
|
2895
2895
|
r: "translate3d(" + ae + "px, -" + (ae + 2) + "px, -" + (ae + 2) + "px) rotateY(270deg)"
|
|
2896
2896
|
};
|
|
2897
|
-
|
|
2898
|
-
var Me =
|
|
2897
|
+
ee = 1 / Math.tan(Q / 2);
|
|
2898
|
+
var Me = ee * f.clientWidth / 2 + "px", Se = "perspective(" + Me + ") translateZ(" + Me + ") rotateX(" + h + "rad) rotateY(" + _ + "rad) ", Ve = Object.keys(Be);
|
|
2899
2899
|
for (C = 0; C < 6; C++) {
|
|
2900
2900
|
var Oe = g.querySelector(".pnlm-" + Ve[C] + "face");
|
|
2901
2901
|
Oe && (Oe.style.webkitTransform = Se + Be[Ve[C]], Oe.style.transform = Se + Be[Ve[C]]);
|
|
@@ -2903,11 +2903,11 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2903
2903
|
return;
|
|
2904
2904
|
}
|
|
2905
2905
|
if (M != "multires") {
|
|
2906
|
-
var Xe = 2 * Math.atan(Math.tan(
|
|
2907
|
-
|
|
2906
|
+
var Xe = 2 * Math.atan(Math.tan(Q * 0.5) / (a.drawingBufferWidth / a.drawingBufferHeight));
|
|
2907
|
+
ee = 1 / Math.tan(Xe * 0.5), a.uniform1f(p.psi, _), a.uniform1f(p.theta, h), a.uniform1f(p.rot, ne), a.uniform1f(p.f, ee), P === !0 && M == "equirectangular" && (a.bindTexture(a.TEXTURE_2D, p.texture), a.texImage2D(a.TEXTURE_2D, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, w)), a.drawArrays(a.TRIANGLES, 0, 6);
|
|
2908
2908
|
} else {
|
|
2909
|
-
var De = O(
|
|
2910
|
-
le(
|
|
2909
|
+
var De = O(Q, a.drawingBufferWidth / a.drawingBufferHeight, 0.1, 100);
|
|
2910
|
+
le(Q);
|
|
2911
2911
|
var Re = K();
|
|
2912
2912
|
Re = N(Re, -ne, "z"), Re = N(Re, -h, "x"), Re = N(Re, _, "y"), Re = W(Re), a.uniformMatrix4fv(p.perspUniform, !1, new Float32Array(ie(De))), a.uniformMatrix4fv(p.cubeUniform, !1, new Float32Array(ie(Re)));
|
|
2913
2913
|
var F = $(De, Re);
|
|
@@ -2958,13 +2958,13 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2958
2958
|
p.drawInProgress = !1;
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
|
-
function de(h, _,
|
|
2962
|
-
this.vertices = h, this.side = _, this.level =
|
|
2961
|
+
function de(h, _, Q, oe, ee, C) {
|
|
2962
|
+
this.vertices = h, this.side = _, this.level = Q, this.x = oe, this.y = ee, this.path = C.replace("%s", _).replace("%l", Q).replace("%x", oe).replace("%y", ee);
|
|
2963
2963
|
}
|
|
2964
|
-
function U(h, _,
|
|
2964
|
+
function U(h, _, Q, oe, ee) {
|
|
2965
2965
|
if (Ze(h, _.vertices)) {
|
|
2966
2966
|
var C = _.vertices, ae = C[0] + C[3] + C[6] + C[9], ne = C[1] + C[4] + C[7] + C[10], _e = C[2] + C[5] + C[8] + C[11], fe = Math.sqrt(ae * ae + ne * ne + _e * _e), $e = Math.asin(_e / fe), Ue = Math.atan2(ne, ae), ge = Ue - oe;
|
|
2967
|
-
ge += ge > Math.PI ? -2 * Math.PI : ge < -Math.PI ? 2 * Math.PI : 0, ge = Math.abs(ge), _.diff = Math.acos(Math.sin(
|
|
2967
|
+
ge += ge > Math.PI ? -2 * Math.PI : ge < -Math.PI ? 2 * Math.PI : 0, ge = Math.abs(ge), _.diff = Math.acos(Math.sin(Q) * Math.sin($e) + Math.cos(Q) * Math.cos($e) * Math.cos(ge));
|
|
2968
2968
|
for (var we = !1, ye = 0; ye < p.nodeCache.length; ye++)
|
|
2969
2969
|
if (p.nodeCache[ye].path == _.path) {
|
|
2970
2970
|
we = !0, p.nodeCache[ye].timestamp = p.nodeCacheTimestamp++, p.nodeCache[ye].diff = _.diff, p.currentNodes.push(p.nodeCache[ye]);
|
|
@@ -2978,7 +2978,7 @@ window.libpannellum = (function(e, t, n) {
|
|
|
2978
2978
|
var Se = 1 - Me, Ve = [], Oe, Xe, De = Me, Re = Me, F = Me, se = Se, A = Se, he = Se;
|
|
2979
2979
|
Be < w.tileResolution && (_.x == Ne && _.y != Ne ? (Re = 0.5, A = 0.5, (_.side == "d" || _.side == "u") && (F = 0.5, he = 0.5)) : _.x != Ne && _.y == Ne && (De = 0.5, se = 0.5, (_.side == "l" || _.side == "r") && (F = 0.5, he = 0.5))), We <= w.tileResolution && (_.x == Ne && (De = 0, se = 1, (_.side == "l" || _.side == "r") && (F = 0, he = 1)), _.y == Ne && (Re = 0, A = 1, (_.side == "d" || _.side == "u") && (F = 0, he = 1))), Oe = [C[0], C[1], C[2], C[0] * De + C[3] * se, C[1] * Me + C[4] * Se, C[2] * F + C[5] * he, C[0] * De + C[6] * se, C[1] * Re + C[7] * A, C[2] * F + C[8] * he, C[0] * Me + C[9] * Se, C[1] * Re + C[10] * A, C[2] * F + C[11] * he], Xe = new de(Oe, _.side, _.level + 1, _.x * 2, _.y * 2, w.fullpath), Ve.push(Xe), _.x == Ne && We <= w.tileResolution || (Oe = [C[0] * De + C[3] * se, C[1] * Me + C[4] * Se, C[2] * F + C[5] * he, C[3], C[4], C[5], C[3] * Me + C[6] * Se, C[4] * Re + C[7] * A, C[5] * F + C[8] * he, C[0] * De + C[6] * se, C[1] * Re + C[7] * A, C[2] * F + C[8] * he], Xe = new de(Oe, _.side, _.level + 1, _.x * 2 + 1, _.y * 2, w.fullpath), Ve.push(Xe)), !(_.x == Ne && We <= w.tileResolution) && !(_.y == Ne && We <= w.tileResolution) && (Oe = [C[0] * De + C[6] * se, C[1] * Re + C[7] * A, C[2] * F + C[8] * he, C[3] * Me + C[6] * Se, C[4] * Re + C[7] * A, C[5] * F + C[8] * he, C[6], C[7], C[8], C[9] * De + C[6] * se, C[10] * Me + C[7] * Se, C[11] * F + C[8] * he], Xe = new de(Oe, _.side, _.level + 1, _.x * 2 + 1, _.y * 2 + 1, w.fullpath), Ve.push(Xe)), _.y == Ne && We <= w.tileResolution || (Oe = [C[0] * Me + C[9] * Se, C[1] * Re + C[10] * A, C[2] * F + C[11] * he, C[0] * De + C[6] * se, C[1] * Re + C[7] * A, C[2] * F + C[8] * he, C[9] * De + C[6] * se, C[10] * Me + C[7] * Se, C[11] * F + C[8] * he, C[9], C[10], C[11]], Xe = new de(Oe, _.side, _.level + 1, _.x * 2, _.y * 2 + 1, w.fullpath), Ve.push(Xe));
|
|
2980
2980
|
for (var ke = 0; ke < Ve.length; ke++)
|
|
2981
|
-
U(h, Ve[ke],
|
|
2981
|
+
U(h, Ve[ke], Q, oe);
|
|
2982
2982
|
}
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
@@ -3067,14 +3067,14 @@ window.libpannellum = (function(e, t, n) {
|
|
|
3067
3067
|
function K() {
|
|
3068
3068
|
return [1, 0, 0, 0, 1, 0, 0, 0, 1];
|
|
3069
3069
|
}
|
|
3070
|
-
function N(h, _,
|
|
3071
|
-
var oe = Math.sin(_),
|
|
3072
|
-
if (
|
|
3073
|
-
return [h[0],
|
|
3074
|
-
if (
|
|
3075
|
-
return [
|
|
3076
|
-
if (
|
|
3077
|
-
return [
|
|
3070
|
+
function N(h, _, Q) {
|
|
3071
|
+
var oe = Math.sin(_), ee = Math.cos(_);
|
|
3072
|
+
if (Q == "x")
|
|
3073
|
+
return [h[0], ee * h[1] + oe * h[2], ee * h[2] - oe * h[1], h[3], ee * h[4] + oe * h[5], ee * h[5] - oe * h[4], h[6], ee * h[7] + oe * h[8], ee * h[8] - oe * h[7]];
|
|
3074
|
+
if (Q == "y")
|
|
3075
|
+
return [ee * h[0] - oe * h[2], h[1], ee * h[2] + oe * h[0], ee * h[3] - oe * h[5], h[4], ee * h[5] + oe * h[3], ee * h[6] - oe * h[8], h[7], ee * h[8] + oe * h[6]];
|
|
3076
|
+
if (Q == "z")
|
|
3077
|
+
return [ee * h[0] + oe * h[1], ee * h[1] - oe * h[0], h[2], ee * h[3] + oe * h[4], ee * h[4] - oe * h[3], h[5], ee * h[6] + oe * h[7], ee * h[7] - oe * h[6], h[8]];
|
|
3078
3078
|
}
|
|
3079
3079
|
function W(h) {
|
|
3080
3080
|
return [h[0], h[1], h[2], 0, h[3], h[4], h[5], 0, h[6], h[7], h[8], 0, 0, 0, 0, 1];
|
|
@@ -3082,18 +3082,18 @@ window.libpannellum = (function(e, t, n) {
|
|
|
3082
3082
|
function ie(h) {
|
|
3083
3083
|
return [h[0], h[4], h[8], h[12], h[1], h[5], h[9], h[13], h[2], h[6], h[10], h[14], h[3], h[7], h[11], h[15]];
|
|
3084
3084
|
}
|
|
3085
|
-
function O(h, _,
|
|
3086
|
-
var
|
|
3087
|
-
return [C / _, 0, 0, 0, 0, C, 0, 0, 0, 0, (oe +
|
|
3085
|
+
function O(h, _, Q, oe) {
|
|
3086
|
+
var ee = 2 * Math.atan(Math.tan(h / 2) * a.drawingBufferHeight / a.drawingBufferWidth), C = 1 / Math.tan(ee / 2);
|
|
3087
|
+
return [C / _, 0, 0, 0, 0, C, 0, 0, 0, 0, (oe + Q) / (Q - oe), 2 * oe * Q / (Q - oe), 0, 0, -1, 0];
|
|
3088
3088
|
}
|
|
3089
3089
|
function te(h, _) {
|
|
3090
3090
|
a.bindTexture(a.TEXTURE_2D, _), a.texImage2D(a.TEXTURE_2D, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, h), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.bindTexture(a.TEXTURE_2D, null);
|
|
3091
3091
|
}
|
|
3092
3092
|
var q = [], re = (function() {
|
|
3093
|
-
var h = 4, _ = {},
|
|
3093
|
+
var h = 4, _ = {}, Q;
|
|
3094
3094
|
function oe() {
|
|
3095
3095
|
var ne = this;
|
|
3096
|
-
this.texture = this.callback = null, this.image = new Image(), this.image.crossOrigin =
|
|
3096
|
+
this.texture = this.callback = null, this.image = new Image(), this.image.crossOrigin = Q || "anonymous";
|
|
3097
3097
|
var _e = function() {
|
|
3098
3098
|
ne.image.width > 0 && ne.image.height > 0 ? (te(ne.image, ne.texture), ne.callback(ne.texture, !0)) : ne.callback(ne.texture, !1), C(ne);
|
|
3099
3099
|
};
|
|
@@ -3102,7 +3102,7 @@ window.libpannellum = (function(e, t, n) {
|
|
|
3102
3102
|
oe.prototype.loadTexture = function(ne, _e, fe) {
|
|
3103
3103
|
this.texture = _e, this.callback = fe, this.image.src = ne;
|
|
3104
3104
|
};
|
|
3105
|
-
function
|
|
3105
|
+
function ee(ne, _e, fe, $e) {
|
|
3106
3106
|
this.node = ne, this.src = _e, this.texture = fe, this.callback = $e;
|
|
3107
3107
|
}
|
|
3108
3108
|
function C(ne) {
|
|
@@ -3115,14 +3115,14 @@ window.libpannellum = (function(e, t, n) {
|
|
|
3115
3115
|
for (var ae = 0; ae < h; ae++)
|
|
3116
3116
|
_[ae] = new oe();
|
|
3117
3117
|
return function(ne, _e, fe, $e) {
|
|
3118
|
-
|
|
3118
|
+
Q = $e;
|
|
3119
3119
|
var Ue = a.createTexture();
|
|
3120
|
-
return h ? _[--h].loadTexture(_e, Ue, fe) : q.push(new
|
|
3120
|
+
return h ? _[--h].loadTexture(_e, Ue, fe) : q.push(new ee(ne, _e, Ue, fe)), Ue;
|
|
3121
3121
|
};
|
|
3122
3122
|
})();
|
|
3123
3123
|
function S(h) {
|
|
3124
|
-
re(h, encodeURI(h.path + "." + w.extension), function(_,
|
|
3125
|
-
h.texture = _, h.textureLoaded =
|
|
3124
|
+
re(h, encodeURI(h.path + "." + w.extension), function(_, Q) {
|
|
3125
|
+
h.texture = _, h.textureLoaded = Q ? 2 : 1;
|
|
3126
3126
|
}, R.crossOrigin);
|
|
3127
3127
|
}
|
|
3128
3128
|
function le(h) {
|
|
@@ -3137,17 +3137,17 @@ window.libpannellum = (function(e, t, n) {
|
|
|
3137
3137
|
return [h[0] * _[0] + h[1] * _[1] + h[2] * _[2], h[4] * _[0] + h[5] * _[1] + h[6] * _[2], h[11] + h[8] * _[0] + h[9] * _[1] + h[10] * _[2], 1 / (h[12] * _[0] + h[13] * _[1] + h[14] * _[2])];
|
|
3138
3138
|
}
|
|
3139
3139
|
function Ge(h, _) {
|
|
3140
|
-
var
|
|
3141
|
-
return oe < -1 && (ae[0] = -1), oe > 1 && (ae[0] = 1),
|
|
3140
|
+
var Q = Te(h, _), oe = Q[0] * Q[3], ee = Q[1] * Q[3], C = Q[2] * Q[3], ae = [0, 0, 0];
|
|
3141
|
+
return oe < -1 && (ae[0] = -1), oe > 1 && (ae[0] = 1), ee < -1 && (ae[1] = -1), ee > 1 && (ae[1] = 1), (C < -1 || C > 1) && (ae[2] = 1), ae;
|
|
3142
3142
|
}
|
|
3143
3143
|
function Ze(h, _) {
|
|
3144
|
-
var
|
|
3144
|
+
var Q = Ge(h, _.slice(0, 3)), oe = Ge(h, _.slice(3, 6)), ee = Ge(h, _.slice(6, 9)), C = Ge(h, _.slice(9, 12)), ae = Q[0] + oe[0] + ee[0] + C[0];
|
|
3145
3145
|
if (ae == -4 || ae == 4)
|
|
3146
3146
|
return !1;
|
|
3147
|
-
var ne =
|
|
3147
|
+
var ne = Q[1] + oe[1] + ee[1] + C[1];
|
|
3148
3148
|
if (ne == -4 || ne == 4)
|
|
3149
3149
|
return !1;
|
|
3150
|
-
var _e =
|
|
3150
|
+
var _e = Q[2] + oe[2] + ee[2] + C[2];
|
|
3151
3151
|
return _e != 4;
|
|
3152
3152
|
}
|
|
3153
3153
|
function ve() {
|
|
@@ -3332,7 +3332,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3332
3332
|
function h() {
|
|
3333
3333
|
var l = t.createElement("div");
|
|
3334
3334
|
if (l.innerHTML = "<!--[if lte IE 9]><i></i><![endif]-->", l.getElementsByTagName("i").length == 1) {
|
|
3335
|
-
|
|
3335
|
+
ee();
|
|
3336
3336
|
return;
|
|
3337
3337
|
}
|
|
3338
3338
|
J = r.hfov, de = r.pitch;
|
|
@@ -3348,31 +3348,31 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3348
3348
|
P = r.panorama;
|
|
3349
3349
|
else {
|
|
3350
3350
|
if (r.panorama === n) {
|
|
3351
|
-
|
|
3351
|
+
ee(r.strings.noPanoramaError);
|
|
3352
3352
|
return;
|
|
3353
3353
|
}
|
|
3354
3354
|
P = new Image();
|
|
3355
3355
|
}
|
|
3356
3356
|
if (r.type == "cubemap") {
|
|
3357
3357
|
var G = 6, X = function() {
|
|
3358
|
-
G--, G === 0 &&
|
|
3358
|
+
G--, G === 0 && Q();
|
|
3359
3359
|
}, be = function(He) {
|
|
3360
3360
|
var Ae = t.createElement("a");
|
|
3361
|
-
Ae.href = He.target.src, Ae.textContent = Ae.href,
|
|
3361
|
+
Ae.href = He.target.src, Ae.textContent = Ae.href, ee(r.strings.fileAccessError.replace("%s", Ae.outerHTML));
|
|
3362
3362
|
};
|
|
3363
3363
|
for (d = 0; d < P.length; d++)
|
|
3364
3364
|
x = r.cubeMap[d], x == "null" ? (console.log("Will use background instead of missing cubemap face " + d), X()) : (r.basePath && !_(x) && (x = r.basePath + x), P[d].onload = X, P[d].onerror = be, P[d].src = _t(x));
|
|
3365
3365
|
} else if (r.type == "multires")
|
|
3366
|
-
|
|
3366
|
+
Q();
|
|
3367
3367
|
else if (x = "", r.basePath && (x = r.basePath), r.dynamic !== !0) {
|
|
3368
3368
|
x = _(r.panorama) ? r.panorama : x + r.panorama, P.onload = function() {
|
|
3369
|
-
e.URL.revokeObjectURL(this.src),
|
|
3369
|
+
e.URL.revokeObjectURL(this.src), Q();
|
|
3370
3370
|
};
|
|
3371
3371
|
var pe = new XMLHttpRequest();
|
|
3372
3372
|
pe.onloadend = function() {
|
|
3373
3373
|
if (pe.status != 200) {
|
|
3374
3374
|
var Le = t.createElement("a");
|
|
3375
|
-
Le.href = x, Le.textContent = Le.href,
|
|
3375
|
+
Le.href = x, Le.textContent = Le.href, ee(r.strings.fileAccessError.replace("%s", Le.outerHTML));
|
|
3376
3376
|
}
|
|
3377
3377
|
var He = this.response;
|
|
3378
3378
|
oe(He), S.load.msg.innerHTML = "";
|
|
@@ -3388,7 +3388,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3388
3388
|
try {
|
|
3389
3389
|
pe.open("GET", x, !0);
|
|
3390
3390
|
} catch {
|
|
3391
|
-
|
|
3391
|
+
ee(r.strings.malformedURLError);
|
|
3392
3392
|
}
|
|
3393
3393
|
pe.responseType = "blob", pe.setRequestHeader("Accept", "image/*,*/*;q=0.9"), pe.withCredentials = r.crossOrigin === "use-credentials", pe.send();
|
|
3394
3394
|
}
|
|
@@ -3397,7 +3397,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3397
3397
|
function _(l) {
|
|
3398
3398
|
return new RegExp("^(?:[a-z]+:)?//", "i").test(l) || l[0] == "/" || l.slice(0, 5) == "blob:";
|
|
3399
3399
|
}
|
|
3400
|
-
function
|
|
3400
|
+
function Q() {
|
|
3401
3401
|
v || (v = new libpannellum.renderer(te)), M || (M = !0, q.addEventListener("mousedown", _e, !1), t.addEventListener("mousemove", Ue, !1), t.addEventListener("mouseup", ge, !1), r.mouseZoom && (O.addEventListener("mousewheel", Ve, !1), O.addEventListener("DOMMouseScroll", Ve, !1)), r.doubleClickZoom && q.addEventListener("dblclick", fe, !1), O.addEventListener("mozfullscreenchange", ct, !1), O.addEventListener("webkitfullscreenchange", ct, !1), O.addEventListener("msfullscreenchange", ct, !1), O.addEventListener("fullscreenchange", ct, !1), e.addEventListener("resize", he, !1), e.addEventListener("orientationchange", he, !1), r.disableKeyboardCtrl || (i.addEventListener("keydown", Oe, !1), i.addEventListener("keyup", De, !1), i.addEventListener("blur", Xe, !1)), t.addEventListener("mouseleave", ge, !1), t.documentElement.style.pointerAction === "" && t.documentElement.style.touchAction === "" ? (q.addEventListener("pointerdown", Be, !1), q.addEventListener("pointermove", Me, !1), q.addEventListener("pointerup", Se, !1), q.addEventListener("pointerleave", Se, !1)) : (q.addEventListener("touchstart", we, !1), q.addEventListener("touchmove", ye, !1), q.addEventListener("touchend", Pe, !1)), e.navigator.pointerEnabled && (i.style.touchAction = "none")), mo(), rt(r.hfov), setTimeout(function() {
|
|
3402
3402
|
}, 500);
|
|
3403
3403
|
}
|
|
@@ -3407,7 +3407,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3407
3407
|
var x = d.result;
|
|
3408
3408
|
if (navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)) {
|
|
3409
3409
|
var B = x.indexOf("ÿÂ");
|
|
3410
|
-
(B < 0 || B > 65536) &&
|
|
3410
|
+
(B < 0 || B > 65536) && ee(r.strings.iOS8WebGLError);
|
|
3411
3411
|
}
|
|
3412
3412
|
var G = x.indexOf("<x:xmpmeta");
|
|
3413
3413
|
if (G > -1 && r.ignoreGPanoXMP !== !0) {
|
|
@@ -3429,7 +3429,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3429
3429
|
P.src = e.URL.createObjectURL(l);
|
|
3430
3430
|
}), d.readAsBinaryString !== n ? d.readAsBinaryString(l) : d.readAsText(l);
|
|
3431
3431
|
}
|
|
3432
|
-
function
|
|
3432
|
+
function ee(l) {
|
|
3433
3433
|
l === n && (l = r.strings.genericWebGLError), S.errorMsg.innerHTML = "<p>" + l + "</p>", $.load.style.display = "none", S.load.box.style.display = "none", S.errorMsg.style.display = "table", w = !0, te.style.display = "none", ut("error", l);
|
|
3434
3434
|
}
|
|
3435
3435
|
function C() {
|
|
@@ -3698,11 +3698,11 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3698
3698
|
r.horizonPitch !== n && (l.horizonPitch = r.horizonPitch * Math.PI / 180), r.horizonRoll !== n && (l.horizonRoll = r.horizonRoll * Math.PI / 180), r.backgroundColor !== n && (l.backgroundColor = r.backgroundColor), v.init(P, r.type, r.dynamic, r.haov * Math.PI / 180, r.vaov * Math.PI / 180, r.vOffset * Math.PI / 180, go, l), r.dynamic !== !0 && (P = n);
|
|
3699
3699
|
} catch (d) {
|
|
3700
3700
|
if (d.type == "webgl error" || d.type == "no webgl")
|
|
3701
|
-
|
|
3701
|
+
ee();
|
|
3702
3702
|
else if (d.type == "webgl size error")
|
|
3703
|
-
|
|
3703
|
+
ee(r.strings.textureSizeError.replace("%s", d.width).replace("%s", d.maxWidth));
|
|
3704
3704
|
else
|
|
3705
|
-
throw
|
|
3705
|
+
throw ee(r.strings.unknownError), d;
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
3708
|
function go() {
|
|
@@ -3984,7 +3984,7 @@ window.pannellum = /* @__PURE__ */ (function(e, t, n) {
|
|
|
3984
3984
|
}, this.getRenderer = function() {
|
|
3985
3985
|
return v;
|
|
3986
3986
|
}, this.setUpdate = function(l) {
|
|
3987
|
-
return N = l === !0, v === n ?
|
|
3987
|
+
return N = l === !0, v === n ? Q() : ke(), this;
|
|
3988
3988
|
}, this.mouseEventToCoords = function(l) {
|
|
3989
3989
|
return $e(l);
|
|
3990
3990
|
}, this.loadScene = function(l, d, x, B) {
|
|
@@ -4429,14 +4429,14 @@ const li = ({ className: e }) => /* @__PURE__ */ c(
|
|
|
4429
4429
|
S !== null && (S = null, I(!1), g("default"), Ge());
|
|
4430
4430
|
};
|
|
4431
4431
|
te.addEventListener("mousedown", ve), document.addEventListener("mousemove", h), document.addEventListener("mouseleave", _), document.addEventListener("mouseup", _), document.addEventListener("contextmenu", _);
|
|
4432
|
-
const
|
|
4433
|
-
const ge =
|
|
4432
|
+
const Q = mi / N, oe = () => q.getBoundingClientRect().width, ee = () => q.scrollWidth / 2 - oe() / 2, C = () => {
|
|
4433
|
+
const ge = ee();
|
|
4434
4434
|
q.scrollLeft = ge;
|
|
4435
4435
|
};
|
|
4436
4436
|
C();
|
|
4437
4437
|
const ae = () => {
|
|
4438
|
-
const ge = q.scrollLeft -
|
|
4439
|
-
Math.abs(ge) <
|
|
4438
|
+
const ge = q.scrollLeft - ee();
|
|
4439
|
+
Math.abs(ge) < Q || (ge < 0 !== i ? ie() : O(), C());
|
|
4440
4440
|
};
|
|
4441
4441
|
q.addEventListener("scroll", ae);
|
|
4442
4442
|
let ne = null;
|
|
@@ -4678,25 +4678,25 @@ const li = ({ className: e }) => /* @__PURE__ */ c(
|
|
|
4678
4678
|
U.push(ve), U.length > 20 && U.shift();
|
|
4679
4679
|
}, K = () => {
|
|
4680
4680
|
const ve = (() => {
|
|
4681
|
-
const
|
|
4682
|
-
(_e) =>
|
|
4681
|
+
const ee = Date.now(), C = U.filter(
|
|
4682
|
+
(_e) => ee - _e.timestamp < 50
|
|
4683
4683
|
);
|
|
4684
4684
|
if (C.length < 2)
|
|
4685
4685
|
return 0;
|
|
4686
4686
|
const ae = C[0], ne = C[C.length - 1];
|
|
4687
4687
|
return (ne.value - ae.value) / (1e-3 * Math.max(ne.timestamp - ae.timestamp, 1));
|
|
4688
4688
|
})(), h = Date.now();
|
|
4689
|
-
let _ = 0,
|
|
4689
|
+
let _ = 0, Q = h;
|
|
4690
4690
|
const oe = () => {
|
|
4691
|
-
const
|
|
4692
|
-
const C = Date.now(), ae = (C - h) / 1e3, ne = Math.pow(0.05, ae), _e = ve * ne, fe = (C -
|
|
4691
|
+
const ee = () => {
|
|
4692
|
+
const C = Date.now(), ae = (C - h) / 1e3, ne = Math.pow(0.05, ae), _e = ve * ne, fe = (C - Q) / 1e3;
|
|
4693
4693
|
if (_ += _e * fe, Math.abs(_e) < 5 * J && Math.abs(_) < J) {
|
|
4694
4694
|
M.current = null;
|
|
4695
4695
|
return;
|
|
4696
4696
|
}
|
|
4697
|
-
Math.abs(_) >= J && (_ > 0 !== o ? R() : Y(), _ = 0),
|
|
4697
|
+
Math.abs(_) >= J && (_ > 0 !== o ? R() : Y(), _ = 0), Q = C, oe();
|
|
4698
4698
|
};
|
|
4699
|
-
M.current = requestAnimationFrame(
|
|
4699
|
+
M.current = requestAnimationFrame(ee);
|
|
4700
4700
|
};
|
|
4701
4701
|
oe();
|
|
4702
4702
|
}, N = () => {
|
|
@@ -4749,8 +4749,8 @@ const li = ({ className: e }) => /* @__PURE__ */ c(
|
|
|
4749
4749
|
ve.preventDefault();
|
|
4750
4750
|
const { clientX: _ } = h;
|
|
4751
4751
|
D({ timestamp: Date.now(), value: _ });
|
|
4752
|
-
const
|
|
4753
|
-
|
|
4752
|
+
const Q = _ - de;
|
|
4753
|
+
Q !== 0 && v?.cursor && I(Q < 0 ? "left" : "right"), !(Math.abs(Q) < J) && (Q > 0 !== o ? R() : Y(), de = _);
|
|
4754
4754
|
}, Ze = (ve) => {
|
|
4755
4755
|
!de || !Array.from(ve.changedTouches).some(
|
|
4756
4756
|
({ identifier: _ }) => _ === $
|
|
@@ -5923,8 +5923,8 @@ const Oi = ({
|
|
|
5923
5923
|
let re = te[N].offsetLeft;
|
|
5924
5924
|
const S = O.clientWidth, le = O.scrollWidth - S;
|
|
5925
5925
|
if (y > 1) {
|
|
5926
|
-
const _ = Math.ceil(y),
|
|
5927
|
-
N >=
|
|
5926
|
+
const _ = Math.ceil(y), Q = r.length + (s && !t && y % 1 !== 0 ? 1 : 0);
|
|
5927
|
+
N >= Q - _ && (re = Math.min(re, le));
|
|
5928
5928
|
}
|
|
5929
5929
|
const $ = (_) => {
|
|
5930
5930
|
O.scrollTo({
|
|
@@ -5947,7 +5947,7 @@ const Oi = ({
|
|
|
5947
5947
|
Te();
|
|
5948
5948
|
return;
|
|
5949
5949
|
}
|
|
5950
|
-
const
|
|
5950
|
+
const ee = Math.min(oe / Ze, 1), C = io(ee), ae = qt(q, re, C);
|
|
5951
5951
|
$(ae), h();
|
|
5952
5952
|
};
|
|
5953
5953
|
T.current = requestAnimationFrame(_);
|
|
@@ -6411,8 +6411,17 @@ const Oi = ({
|
|
|
6411
6411
|
if (document.dispatchEvent(Te), y || R) {
|
|
6412
6412
|
const Ge = "POST", Ze = new Headers();
|
|
6413
6413
|
w || (Ze.append("Content-Type", "application/json"), Ze.append("Cache-Control", "no-cache"), E && Ze.append("Authorization", `Bearer ${E}`));
|
|
6414
|
-
const ve = JSON.stringify(le);
|
|
6415
|
-
y &&
|
|
6414
|
+
const ve = JSON.stringify(le), h = [];
|
|
6415
|
+
y && h.push(fetch(y, { method: Ge, headers: Ze, body: ve })), R && h.push(
|
|
6416
|
+
l2({ payload: le, compositionUrl: e })
|
|
6417
|
+
);
|
|
6418
|
+
const _ = await Promise.allSettled(h);
|
|
6419
|
+
if (P)
|
|
6420
|
+
for (const Q of _)
|
|
6421
|
+
Q.status === "rejected" && console.error(
|
|
6422
|
+
"Analytics request failed:",
|
|
6423
|
+
Q.reason
|
|
6424
|
+
);
|
|
6416
6425
|
}
|
|
6417
6426
|
} catch (S) {
|
|
6418
6427
|
if (!P) return;
|