{
  "version": 3,
  "sources": ["/cdn/shop/t/181/assets/custom-z9-spin-viewer.js?x=1315"],
  "sourcesContent": ["/* Z9 360 viewer with a pulsing light (markup: snippets/custom-z9-spin-viewer.liquid). Tested\n   on the review page bactrack-z9-spin-pulse (bactrack-site design-exploration/z9-spin-pulse-test),\n   where Robert picked the pulse on 2026-11-19: 3 seconds, the light dimming by 75 percent.\n\n   Two clear-background videos hold the same 300-frame turn: the lights on, and the lights off.\n   A drag seeks both to the frame under the finger; neither ever plays. The page shows neither\n   video itself. It keeps a picture of each at the frame they both stand on and draws the two\n   into one canvas as a cross-fade: the lit picture at 1 - p and the unlit one at p, added, so\n   the device, its clear mouthpiece and the floor shadow keep their own opacity at every p. A\n   plain overlay of the unlit video would darken the shadow and the mouthpiece as it fades in.\n\n   The pictures are taken only when every loaded video has reported the same frame, so the two\n   states can never be a frame apart on the screen, however fast the drag.\n\n   At rest the pulse needs no video: it cross-fades two stills of the start frame, the lit poster\n   and an unlit still (data-still-unlit, about 55 kB). The videos (about 15 MB at full size)\n   download only when someone reaches for the device: the first drag, view button, key, focus or\n   mouse hover (2026-11-19, page speed: most visitors never turn it). Phones whose stage shows\n   800 px or less get the 800 px files (data-src-small). The lit video downloads first and the\n   viewer turns with it alone; the unlit video follows, and the pulse comes back when it has\n   arrived. With motion turned off on the device (prefers-reduced-motion) the light stays on.\n\n   iPhone Safari loads only the metadata of a video that has never played, so prime() plays and\n   pauses each muted video once: right after its download, and again on the first drag, view\n   button or key if that was blocked (Low Power Mode blocks it). */\n\nconst PER_TURN = 1.1; // a drag across 1.1 stage widths turns the device once\nconst reduced = matchMedia('(prefers-reduced-motion: reduce)');\n\nclass Z9SpinViewer extends HTMLElement {\n  connectedCallback() {\n    if (this.stage) return;\n    this.stage = this.querySelector('[data-z9-spin-stage]');\n    this.frames = parseInt(this.dataset.frames, 10) || 300;\n    this.fps = parseInt(this.dataset.fps, 10) || 30;\n    this.thumbs = [...this.querySelectorAll('[data-z9-spin-view]')];\n    this.start = this.wrap(parseInt(this.dataset.start, 10) || 0);\n    // One pulse, lit to its darkest point and back, in seconds; the darkest point as the share\n    // of the unlit picture (1 is the lights fully off, 0 is no pulse).\n    this.pulseSeconds = Math.max(0.5, parseFloat(this.dataset.pulseSeconds) || 3);\n    this.pulseDepth = this.dataset.pulseDepth === undefined ? 0.75 : Math.min(1, Math.max(0, parseFloat(this.dataset.pulseDepth) || 0));\n    this.pos = 0;\n    this.want = 0;\n    this.anim = 0;\n    this.loop = 0;\n    this.videos = []; // the lit one, then the unlit one\n    this.buffers = new Map(); // each video's picture at the shown frame\n    this.have = []; // the videos whose pictures hold the shown frame\n    this.pending = new Set(); // the videos that have not reported their seek back\n    this.urls = [];\n    this.visible = false;\n    this.loading = false;\n    this.stills = null; // the lit poster and the unlit still, at the start frame\n\n    this.canvas = document.createElement('canvas');\n    this.canvas.setAttribute('aria-hidden', 'true');\n    this.context = this.canvas.getContext('2d');\n    this.stage.prepend(this.canvas);\n    this.lit = this.addVideo();\n    this.unlit = null;\n\n    this.bindDrag();\n    this.stage.addEventListener('keydown', (e) => this.onKey(e));\n    this.thumbs.forEach((t) =>\n      t.addEventListener('click', () => {\n        this.load();\n        this.primeAll();\n        this.turnTo(Number(t.dataset.z9SpinView));\n      })\n    );\n    this.stage.addEventListener('focus', () => this.load());\n    this.addEventListener('pointerenter', (e) => {\n      if (e.pointerType === 'mouse') this.load();\n    });\n    this.moveTo(this.start);\n\n    // The stills for the resting pulse, when the viewer is near the screen.\n    this.io = new IntersectionObserver(\n      (entries) => {\n        if (!entries.some((e) => e.isIntersecting)) return;\n        this.io.disconnect();\n        this.loadStills();\n      },\n      { rootMargin: '200px' }\n    );\n    this.io.observe(this);\n    // The pulse runs only while the stage is on the screen and the tab is in front.\n    this.seen = new IntersectionObserver((entries) => {\n      this.visible = entries.some((e) => e.isIntersecting);\n      this.run();\n    });\n    this.seen.observe(this.stage);\n    this.onShow = () => this.run();\n    document.addEventListener('visibilitychange', this.onShow);\n    reduced.addEventListener('change', this.onShow);\n    this.sized = new ResizeObserver(() => this.resize());\n    this.sized.observe(this.stage);\n  }\n\n  disconnectedCallback() {\n    this.stop();\n    cancelAnimationFrame(this.loop);\n    if (this.io) this.io.disconnect();\n    if (this.seen) this.seen.disconnect();\n    if (this.sized) this.sized.disconnect();\n    document.removeEventListener('visibilitychange', this.onShow);\n    reduced.removeEventListener('change', this.onShow);\n    this.urls.forEach((url) => URL.revokeObjectURL(url));\n  }\n\n  wrap(n) {\n    return ((n % this.frames) + this.frames) % this.frames;\n  }\n\n  addVideo() {\n    const video = document.createElement('video');\n    video.muted = true;\n    video.playsInline = true;\n    video.preload = 'auto';\n    video.setAttribute('muted', '');\n    video.setAttribute('playsinline', '');\n    video.setAttribute('aria-hidden', 'true');\n    video.addEventListener('seeked', () => this.onSeeked(video));\n    video.addEventListener('loadeddata', () => this.seek(true));\n    this.stage.prepend(video);\n    this.videos.push(video);\n    this.buffers.set(video, document.createElement('canvas'));\n    return video;\n  }\n\n  /* The resting pulse: the poster (already on the page) and the unlit still of the same frame. */\n  async loadStills() {\n    const poster = this.stage.querySelector('.z9-spin__poster');\n    const src = this.dataset.stillUnlit;\n    if (!poster || !src) return;\n    const unlit = new Image();\n    unlit.decoding = 'async';\n    unlit.src = src;\n    try {\n      await Promise.all([poster.decode(), unlit.decode()]);\n    } catch (error) {\n      return; // the poster stays, without a pulse, until the videos come\n    }\n    if (this.have.includes(this.lit)) return; // the videos came first\n    this.stills = { lit: poster, unlit };\n    this.pulseFrom = performance.now();\n    this.resize();\n    this.stage.dataset.state = 'ready';\n    this.stage.dataset.pulse = 'on';\n    this.paint();\n    this.run();\n  }\n\n  /* Pick the first source this browser can play, at 800 px when the stage shows no more. Download\n     its lit video whole and show it; then its unlit video, for the pulse. Both play from memory. */\n  async load() {\n    if (this.loading) return;\n    this.loading = true;\n    const sources = [...this.querySelectorAll('[data-z9-spin-source]')];\n    const pick = sources.find((s) => this.lit.canPlayType(s.dataset.type)) || sources[sources.length - 1];\n    if (!pick) return;\n    const box = this.stage.getBoundingClientRect();\n    const shown = Math.min(box.width, box.height) * Math.min(window.devicePixelRatio || 1, 2);\n    const small = shown <= 820 && pick.dataset.srcSmall && pick.dataset.srcUnlitSmall;\n    const litSrc = small ? pick.dataset.srcSmall : pick.dataset.src;\n    const unlitSrc = small ? pick.dataset.srcUnlitSmall : pick.dataset.srcUnlit;\n    this.stage.dataset.source = pick.dataset.format + (small ? '-small' : '');\n    try {\n      await this.fill(this.lit, litSrc, pick.dataset.blobType);\n    } catch (error) {\n      // The poster stays; the view buttons and drag do nothing visible.\n      this.stage.dataset.state = 'failed';\n      return;\n    }\n    if (!unlitSrc) return;\n    const unlit = this.addVideo();\n    try {\n      await this.fill(unlit, unlitSrc, pick.dataset.blobType);\n      this.unlit = unlit;\n    } catch (error) {\n      // No pulse: the lit turn stays as it is.\n      this.videos = this.videos.filter((video) => video !== unlit);\n      this.pending.delete(unlit);\n      unlit.remove();\n      this.stage.dataset.pulse = 'failed';\n    }\n  }\n\n  async fill(video, src, type) {\n    const response = await fetch(src);\n    if (!response.ok) throw new Error(String(response.status));\n    const url = URL.createObjectURL(new Blob([await response.arrayBuffer()], { type }));\n    this.urls.push(url);\n    video.src = url;\n    this.prime(video);\n  }\n\n  /* Play and pause once so iPhone Safari loads the frames (see the note at the top). Call it\n     inside a tap handler as well: a play() that starts from a tap is always allowed. */\n  prime(video) {\n    if (video.primed || !video.src || video.readyState >= 2) return;\n    const playing = video.play();\n    if (!playing) return;\n    video.primed = true;\n    playing.then(\n      () => {\n        video.pause();\n        this.pending.delete(video); // a seek sent before the frames loaded may never report back\n        this.seek(true);\n      },\n      () => {\n        video.primed = false; // blocked; the next tap tries again\n      }\n    );\n  }\n\n  primeAll() {\n    this.videos.forEach((video) => this.prime(video));\n  }\n\n  /* Seek every loaded video to the newest wanted frame, together. While they seek, only the\n     latest request is kept; the next seek starts when all of them have reported back. */\n  seek(force) {\n    // A seek that never reports back (a video whose frames a phone has not loaded) must not hold\n    // the other video for good.\n    if (this.pending.size && performance.now() - this.sought > 1500) this.pending.clear();\n    if (this.pending.size) return;\n    // The unlit video joins when it has a frame to show; the lit one as soon as it knows its length.\n    const loaded = this.videos.filter((video) => video.readyState >= (video === this.lit ? 1 : 2));\n    if (!loaded.length) return;\n    this.sought = performance.now();\n    const t = (this.want + 0.5) / this.fps;\n    const behind = loaded.filter((video) => force || Math.abs(video.currentTime - t) >= 0.001);\n    behind.forEach((video) => {\n      this.pending.add(video);\n      video.currentTime = t;\n    });\n  }\n\n  onSeeked(video) {\n    this.pending.delete(video);\n    if (this.pending.size) return;\n    // They all stand on one frame: keep their pictures, then go on to the newest request.\n    this.capture();\n    this.seek();\n    // At rest, take the pictures once more: a browser may report the seek a moment before the\n    // new frame is the one a canvas gets.\n    if (!this.pending.size) {\n      requestAnimationFrame(() => {\n        if (!this.pending.size) this.capture();\n      });\n    }\n  }\n\n  /* The canvas is square, as the videos are, and as large as the stage shows it. */\n  resize() {\n    const box = this.stage.getBoundingClientRect();\n    const shown = Math.round(Math.min(box.width, box.height) * Math.min(window.devicePixelRatio || 1, 2));\n    const size = Math.max(1, Math.min(shown, this.lit.videoWidth || shown));\n    if (size === this.canvas.width) return;\n    this.canvas.width = this.canvas.height = size;\n    if (!this.pending.size) this.capture();\n    if (this.stills) this.paint(); // a resized canvas is blank until drawn again\n  }\n\n  /* Keep each loaded video's frame as a picture, and draw. */\n  capture() {\n    if (!this.canvas.width || (this.lit.videoWidth && this.canvas.width > this.lit.videoWidth)) this.resize();\n    const size = this.canvas.width;\n    const have = [];\n    try {\n      for (const video of this.videos) {\n        if (video.readyState < 2) continue;\n        const buffer = this.buffers.get(video);\n        if (buffer.width !== size) buffer.width = buffer.height = size;\n        const context = buffer.getContext('2d');\n        context.clearRect(0, 0, size, size);\n        context.drawImage(video, 0, 0, size, size);\n        have.push(video);\n      }\n    } catch (error) {\n      // No canvas for this video: show the lit video itself, without a pulse.\n      this.stage.dataset.canvas = 'failed';\n      this.stage.dataset.state = 'ready';\n      return;\n    }\n    if (!have.includes(this.lit)) return;\n    const pulsed = this.have.includes(this.unlit);\n    this.have = have;\n    this.stills = null; // the videos take over from the stills\n    this.stage.dataset.state = 'ready';\n    if (this.unlit && have.includes(this.unlit)) {\n      // The pulse starts from the lit picture.\n      if (!pulsed) this.pulseFrom = performance.now();\n      this.stage.dataset.pulse = 'on';\n    } else {\n      this.stage.dataset.pulse = 'loading';\n    }\n    this.paint();\n    this.run();\n  }\n\n  /* The two pictures to draw, lit then unlit (null when there is none): the videos' frames once\n     the lit video has one, before that the stills. */\n  pictures() {\n    if (this.have.includes(this.lit)) {\n      return [this.buffers.get(this.lit), this.unlit && this.have.includes(this.unlit) ? this.buffers.get(this.unlit) : null];\n    }\n    return this.stills ? [this.stills.lit, this.stills.unlit] : null;\n  }\n\n  /* How much of the unlit picture shows now: 0 with the lights on, pulseDepth at the darkest. */\n  level() {\n    const pictures = this.pictures();\n    if (!pictures || !pictures[1] || reduced.matches || !this.pulseDepth) return 0;\n    const turn = ((performance.now() - this.pulseFrom) / 1000 / this.pulseSeconds) % 1;\n    return this.pulseDepth * (0.5 - 0.5 * Math.cos(2 * Math.PI * turn));\n  }\n\n  paint() {\n    const pictures = this.pictures();\n    if (!pictures) return;\n    const context = this.context;\n    const size = this.canvas.width;\n    const level = this.level();\n    context.globalCompositeOperation = 'copy';\n    context.globalAlpha = 1 - level;\n    context.drawImage(pictures[0], 0, 0, size, size);\n    if (level > 0) {\n      context.globalCompositeOperation = 'lighter';\n      context.globalAlpha = level;\n      context.drawImage(pictures[1], 0, 0, size, size);\n    }\n  }\n\n  pulsing() {\n    const pictures = this.pictures();\n    return (\n      this.visible && !document.hidden && !reduced.matches && this.pulseDepth > 0 &&\n      Boolean(pictures && pictures[1])\n    );\n  }\n\n  run() {\n    if (this.loop) return;\n    if (!this.pulsing()) {\n      this.paint(); // the steady lit picture, when the pulse has just stopped\n      return;\n    }\n    const tick = () => {\n      this.loop = 0;\n      if (!this.pulsing()) {\n        this.paint();\n        return;\n      }\n      this.paint();\n      this.loop = requestAnimationFrame(tick);\n    };\n    this.loop = requestAnimationFrame(tick);\n  }\n\n  moveTo(p) {\n    this.pos = p;\n    this.want = this.wrap(Math.round(this.pos));\n    this.seek();\n    const deg = Math.round((this.wrap(-this.want) / this.frames) * 360) % 360; // grows with ArrowRight, as a slider's value\n    this.stage.setAttribute('aria-valuenow', String(deg));\n    this.stage.setAttribute('aria-valuetext', deg === 0\n      ? this.dataset.labelFront || 'Front'\n      : (this.dataset.labelTurned || 'Turned [degrees] degrees').replace('[degrees]', String(deg)));\n    this.thumbs.forEach((t) =>\n      t.setAttribute('aria-pressed', String(Number(t.dataset.z9SpinView) === this.want))\n    );\n  }\n\n  stop() {\n    cancelAnimationFrame(this.anim);\n    this.anim = 0;\n  }\n\n  /* Animated turns (view buttons, keys): the shortest way round, eased out. */\n  turnTo(frame) {\n    this.stop();\n    let delta = this.wrap(frame - this.pos);\n    if (delta > this.frames / 2) delta -= this.frames;\n    if (reduced.matches || Math.abs(delta) < 0.5) {\n      this.moveTo(frame);\n      return;\n    }\n    const from = this.pos;\n    const start = performance.now();\n    const ms = 350 + Math.abs(delta) * 3;\n    const step = (now) => {\n      const t = Math.min(1, (now - start) / ms);\n      this.moveTo(from + delta * (1 - Math.pow(1 - t, 3)));\n      this.anim = t < 1 ? requestAnimationFrame(step) : 0;\n    };\n    this.anim = requestAnimationFrame(step);\n  }\n\n  /* Drag. Dragging left brings the right side round, as if the finger pushed the device.\n     touch-action: pan-y in the CSS keeps vertical page scrolling on phones. */\n  bindDrag() {\n    const stage = this.stage;\n    let drag = null;\n    let vel = 0;\n    const perPx = () => this.frames / (stage.clientWidth * PER_TURN);\n    stage.addEventListener('pointerdown', (e) => {\n      if (e.button !== 0) return;\n      this.load();\n      this.primeAll();\n      this.stop();\n      drag = { x: e.clientX, t: e.timeStamp };\n      vel = 0;\n      stage.setPointerCapture(e.pointerId);\n      stage.dataset.touched = 'true';\n      stage.dataset.dragging = 'true';\n    });\n    stage.addEventListener('pointermove', (e) => {\n      if (!drag) return;\n      const d = -(e.clientX - drag.x) * perPx();\n      const dt = Math.max(1, e.timeStamp - drag.t);\n      vel = 0.7 * (d / dt) + 0.3 * vel; // frames per ms, smoothed\n      drag = { x: e.clientX, t: e.timeStamp };\n      this.moveTo(this.pos + d);\n    });\n    const release = (e) => {\n      if (!drag) return;\n      const idle = e.timeStamp - drag.t;\n      drag = null;\n      delete stage.dataset.dragging;\n      if (reduced.matches || idle > 80 || Math.abs(vel) < 0.02) {\n        this.moveTo(Math.round(this.pos));\n        return;\n      }\n      // Coast after a flick, slowing to a stop.\n      let last = performance.now();\n      const coast = (now) => {\n        const dt = now - last;\n        last = now;\n        vel *= Math.pow(0.994, dt);\n        this.moveTo(this.pos + vel * dt);\n        if (Math.abs(vel) > 0.008) {\n          this.anim = requestAnimationFrame(coast);\n        } else {\n          this.moveTo(Math.round(this.pos));\n          this.anim = 0;\n        }\n      };\n      this.anim = requestAnimationFrame(coast);\n    };\n    stage.addEventListener('pointerup', release);\n    stage.addEventListener('pointercancel', release);\n    stage.addEventListener('lostpointercapture', release);\n  }\n\n  /* Keys, as an ARIA slider on the degree value: Right and Up add 5 degrees (the same turn as a\n     drag to the left), Left and Down take 5 away, Page Up and Page Down 30, Home goes to 0\n     (front) and End to 359. Steps count from the shown value, so a step and its reverse land\n     back on the same frame. */\n  onKey(e) {\n    this.load();\n    this.primeAll();\n    const value = Number(this.stage.getAttribute('aria-valuenow')) || 0;\n    const step = { ArrowRight: 5, ArrowUp: 5, ArrowLeft: -5, ArrowDown: -5, PageUp: 30, PageDown: -30 }[e.key];\n    let next = null;\n    if (step) next = (((value + step) % 360) + 360) % 360;\n    if (e.key === 'Home') next = 0;\n    if (e.key === 'End') next = 359;\n    if (next === null) return;\n    e.preventDefault();\n    this.stage.dataset.touched = 'true';\n    this.turnTo((-next * this.frames) / 360);\n  }\n}\n\nif (!customElements.get('z9-spin-viewer')) customElements.define('z9-spin-viewer', Z9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