{"version":3,"sources":["webpack:/// [synthetic:util/global] ","webpack:/// [synthetic:es6/symbol] ","webpack:///Drift.min.js","webpack:///webpack/bootstrap","webpack:///./src/js/Drift.js","webpack:///./src/js/injectBaseStylesheet.js","webpack:///./src/js/ZoomPane.js","webpack:///./src/js/Trigger.js","webpack:///./src/js/BoundingBox.js","webpack:///./src/js/util/dom.js","webpack:///./src/js/util/throwIfMissing.js","webpack:///./src/js/Drift-browser.js"],"names":["$jscomp.global","window","this","global","v","$jscomp.initSymbol","Symbol","$jscomp.Symbol","$jscomp.symbolCounter_","A","r","$jscomp.SYMBOL_PREFIX","modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","__webpack_require__.d","name","getter","o","Object","defineProperty","enumerable","get","__webpack_require__.r","toStringTag","value","t","__webpack_require__.t","mode","__esModule","ns","create","key","bind","n","__webpack_require__.n","getDefault","getModuleExports","__webpack_require__.o","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","constructor","Drift_Drift","triggerEl","options","destroy","isDOMElement","TypeError","namespace","showWhitespaceAtEdges","containInline","inlineOffsetX","inlineOffsetY","inlineContainer","document","body","sourceAttribute","zoomFactor","paneContainer","undefined","inlinePane","handleTouch","onShow","onHide","injectBaseStyles","hoverDelay","touchDelay","hoverBoundingBox","touchBoundingBox","boundingBoxContainer","settings","querySelector","styleEl","createElement","type","classList","add","appendChild","createTextNode","RULES","head","insertBefore","firstChild","_buildZoomPane","_buildTrigger","ZoomPane_ZoomPane","_completeShow","_completeHide","_handleLoad","isShowing","container","a","J","f","throwIfMissing","inline","U","j","P","I","K","L","w","openClasses","_buildClasses","openingClasses","closingClasses","inlineClasses","loadingClasses","_buildElement","Trigger_Trigger","_show","_hide","_handleEntry","_handleMovement","b","el","zoomPane","R","C","O","N","F","D","G","H","boundingBox","BoundingBox_BoundingBox","containerEl","enabled","_bindEvents","S","obj","HAS_DOM_2","HTMLElement","nodeType","nodeName","addClasses","classNames","forEach","className","removeClasses","remove","Error","q","g","suffix","classes","push","h","show","zoomPaneWidth","zoomPaneHeight","style","width","Math","round","height","W","hide","removeChild","setPosition","percentageOffsetX","percentageOffsetY","triggerRect","pageXOffset","pageYOffset","inlineLeft","left","clientWidth","inlineTop","top","clientHeight","_preventDefault","event","preventDefault","u","_preventDefaultAllowTouchScroll","_isTouchEvent","V","touches","M","addEventListener","ca","_unbindEvents","removeEventListener","e","_lastMovement","entryTimeout","setTimeout","getAttribute","touchActivated","B","clearTimeout","movementX","firstTouch","clientX","movementY","clientY","rect","getBoundingClientRect","$jscomp.global.Object.defineProperties","defineProperties","configurable","divStyle","HAS_ANIMATION","ha","loaderEl","imgEl","X","_setImageURL","imageURL","setAttribute","Z","_setImageSize","triggerWidth","triggerHeight","imgElWidth","offsetWidth","imgElHeight","offsetHeight","elWidth","elHeight","differenceBetweenContainerWidthAndImgWidth","differenceBetweenContainerHeightAndImgHeight","isContainerLargerThanImgX","isContainerLargerThanImgY","minLeft","minTop","maxLeft","maxTop","parentElement","scrollX","scrollY","transform","webkitTransform","_removeListenersAndResetClasses","_isInline","_showInline","_showInContainer","aa","$","ia","innerWidth","trigger","setZoomImageURL","disable","enable","set","zf","Drift"],"mappings":"AA2CA,IAAAA,EAb2B,oBAAVC,QAAyBA,SAaPC,UAXX,oBAAVC,QAAmC,MAAVA,OAAkBA,OAWtBD,KChBd,SAAAE,IAEnBC,EAAqB,aAEhBL,EAAAM,SACHN,EAAAM,OAA2BC,GAM/B,IAAAC,EAAyB,EASR,SAAAC,EAASC,GACxB,MA5BsBC,kBA6BOD,GAAmB,IAAOF,KCjD/C,SAASI,GCInBC,WAAAC,GAGA,GAAAC,EAAAD,GACA,OAACC,EAADD,GAAAE,EAGA,IAAAC,EAAAF,EAAAD,GAAA,CACAI,GAAAJ,EACAK,IAAA,EACAH,EAAA,IAUA,OANAJ,EAAAE,GAAAM,KAAAH,EAAAD,EAAAC,IAAAD,EAAAH,GAGAI,EAAAE,IAAA,EAGCF,EAADD,EAvBA,IAAAD,EAAA,G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AzGeI,EA4Gf,CAAA8G,cAAA,EAAA3L,YAAA,EAAAC,IAAAwC,WACA,OAAArE,KAAAkF,EAAAb,GAGA+L,IAAA/L,SAAAgM,GACArQ,KAAAkF,EAAAb,EAAAgM,EACArQ,KAAAiI,EAAA/C,EAAAb,EAAAgM,EACArQ,KAAAgQ,EAAA9K,EAAAb,EAAAgM,EACArQ,KAAA0I,EAAAxD,EAAAb,EAAAgM,MAuDA3O,OAAAC,eAAsB2B,EAAAN,UAAK,aAC3BnB,eACA,OAAA7B,KAAAqG,KAGA3E,OAAAC,eAAsB2B,EAAAN,UAAK,cAC3BnB,eACA,OAAA7B,KAAAqE,GAEA+L,aAAApO,GACAhC,KAAAqE,EAAArC,KAGAsB,EAAAN,UAAAiN,gBAAqC3M,EAAAN,UAAAiN,EACrC3M,EAAAN,UAAAkN,QAA6B5M,EAAAN,UAAAkN,EAC7B5M,EAAAN,UAAAmN,OAA4B7M,EAAAN,UAAAmN,EAC5B7M,EAAAN,UAAAS,QAA6BH,EAAAN,UAAAS,EO7L7B1D,OAAAuQ,MAAkBhN","file":"Drift.min.js","sourcesContent":[null,null,"/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./src/js/util/dom.js\n// This is not really a perfect check, but works fine.\n// From http://stackoverflow.com/questions/384286\nconst HAS_DOM_2 = typeof HTMLElement === \"object\";\n\nfunction isDOMElement(obj) {\n return HAS_DOM_2\n ? obj instanceof HTMLElement\n : obj && typeof obj === \"object\" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === \"string\";\n}\n\nfunction addClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.add(className);\n });\n}\n\nfunction removeClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.remove(className);\n });\n}\n\n// CONCATENATED MODULE: ./src/js/injectBaseStylesheet.js\n/* UNMINIFIED RULES\n\nconst RULES = `\n@keyframes noop {\n 0% { zoom: 1; }\n}\n\n@-webkit-keyframes noop {\n 0% { zoom: 1; }\n}\n\n.drift-zoom-pane.drift-open {\n display: block;\n}\n\n.drift-zoom-pane.drift-opening, .drift-zoom-pane.drift-closing {\n animation: noop 1ms;\n -webkit-animation: noop 1ms;\n}\n\n.drift-zoom-pane {\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n pointer-events: none;\n}\n\n.drift-zoom-pane-loader {\n display: none;\n}\n\n.drift-zoom-pane img {\n position: absolute;\n display: block;\n max-width: none;\n max-height: none;\n}\n\n.drift-bounding-box {\n position: absolute;\n pointer-events: none;\n}\n`;\n\n*/\n\nconst RULES =\n \".drift-bounding-box,.drift-zoom-pane{position:absolute;pointer-events:none}@keyframes noop{0%{zoom:1}}@-webkit-keyframes noop{0%{zoom:1}}.drift-zoom-pane.drift-open{display:block}.drift-zoom-pane.drift-closing,.drift-zoom-pane.drift-opening{animation:noop 1ms;-webkit-animation:noop 1ms}.drift-zoom-pane{overflow:hidden;width:100%;height:100%;top:0;left:0}.drift-zoom-pane-loader{display:none}.drift-zoom-pane img{position:absolute;display:block;max-width:none;max-height:none}\";\n\nfunction injectBaseStylesheet() {\n if (document.querySelector(\".drift-base-styles\")) {\n return;\n }\n\n const styleEl = document.createElement(\"style\");\n styleEl.type = \"text/css\";\n styleEl.classList.add(\"drift-base-styles\");\n\n styleEl.appendChild(document.createTextNode(RULES));\n\n const head = document.head;\n head.insertBefore(styleEl, head.firstChild);\n}\n\n// CONCATENATED MODULE: ./src/js/util/throwIfMissing.js\nfunction throwIfMissing() {\n throw new Error(\"Missing parameter\");\n}\n\n// CONCATENATED MODULE: ./src/js/BoundingBox.js\n\n\n\nclass BoundingBox_BoundingBox {\n constructor(options) {\n this.isShowing = false;\n\n const { namespace = null, zoomFactor = throwIfMissing(), containerEl = throwIfMissing() } = options;\n\n this.settings = { namespace, zoomFactor, containerEl };\n\n this.openClasses = this._buildClasses(\"open\");\n\n this._buildElement();\n }\n\n _buildClasses(suffix) {\n const classes = [`drift-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"bounding-box\"));\n }\n\n show(zoomPaneWidth, zoomPaneHeight) {\n this.isShowing = true;\n\n this.settings.containerEl.appendChild(this.el);\n\n const style = this.el.style;\n style.width = `${Math.round(zoomPaneWidth / this.settings.zoomFactor)}px`;\n style.height = `${Math.round(zoomPaneHeight / this.settings.zoomFactor)}px`;\n\n addClasses(this.el, this.openClasses);\n }\n\n hide() {\n if (this.isShowing) {\n this.settings.containerEl.removeChild(this.el);\n }\n\n this.isShowing = false;\n\n removeClasses(this.el, this.openClasses);\n }\n\n setPosition(percentageOffsetX, percentageOffsetY, triggerRect) {\n const pageXOffset = window.pageXOffset;\n const pageYOffset = window.pageYOffset;\n\n let inlineLeft = triggerRect.left + percentageOffsetX * triggerRect.width - this.el.clientWidth / 2 + pageXOffset;\n let inlineTop = triggerRect.top + percentageOffsetY * triggerRect.height - this.el.clientHeight / 2 + pageYOffset;\n\n if (inlineLeft < triggerRect.left + pageXOffset) {\n inlineLeft = triggerRect.left + pageXOffset;\n } else if (inlineLeft + this.el.clientWidth > triggerRect.left + triggerRect.width + pageXOffset) {\n inlineLeft = triggerRect.left + triggerRect.width - this.el.clientWidth + pageXOffset;\n }\n\n if (inlineTop < triggerRect.top + pageYOffset) {\n inlineTop = triggerRect.top + pageYOffset;\n } else if (inlineTop + this.el.clientHeight > triggerRect.top + triggerRect.height + pageYOffset) {\n inlineTop = triggerRect.top + triggerRect.height - this.el.clientHeight + pageYOffset;\n }\n\n this.el.style.left = `${inlineLeft}px`;\n this.el.style.top = `${inlineTop}px`;\n }\n}\n\n// CONCATENATED MODULE: ./src/js/Trigger.js\n\n\n\nclass Trigger_Trigger {\n constructor(options = {}) {\n this._show = this._show.bind(this);\n this._hide = this._hide.bind(this);\n this._handleEntry = this._handleEntry.bind(this);\n this._handleMovement = this._handleMovement.bind(this);\n\n const {\n el = throwIfMissing(),\n zoomPane = throwIfMissing(),\n sourceAttribute = throwIfMissing(),\n handleTouch = throwIfMissing(),\n onShow = null,\n onHide = null,\n hoverDelay = 0,\n touchDelay = 0,\n hoverBoundingBox = throwIfMissing(),\n touchBoundingBox = throwIfMissing(),\n namespace = null,\n zoomFactor = throwIfMissing(),\n boundingBoxContainer = throwIfMissing()\n } = options;\n\n this.settings = {\n el,\n zoomPane,\n sourceAttribute,\n handleTouch,\n onShow,\n onHide,\n hoverDelay,\n touchDelay,\n hoverBoundingBox,\n touchBoundingBox,\n namespace,\n zoomFactor,\n boundingBoxContainer\n };\n\n if (this.settings.hoverBoundingBox || this.settings.touchBoundingBox) {\n this.boundingBox = new BoundingBox_BoundingBox({\n namespace: this.settings.namespace,\n zoomFactor: this.settings.zoomFactor,\n containerEl: this.settings.boundingBoxContainer\n });\n }\n\n this.enabled = true;\n\n this._bindEvents();\n }\n\n get isShowing() {\n return this.settings.zoomPane.isShowing;\n }\n\n _preventDefault(event) {\n event.preventDefault();\n }\n\n _preventDefaultAllowTouchScroll(event) {\n if (!this.settings.touchDelay || !this._isTouchEvent(event) || this.isShowing) {\n event.preventDefault();\n }\n }\n\n _isTouchEvent(event) {\n return !!event.touches;\n }\n\n _bindEvents() {\n this.settings.el.addEventListener(\"mouseenter\", this._handleEntry, false);\n this.settings.el.addEventListener(\"mouseleave\", this._hide, false);\n this.settings.el.addEventListener(\"mousemove\", this._handleMovement, false);\n\n if (this.settings.handleTouch) {\n this.settings.el.addEventListener(\"touchstart\", this._handleEntry, false);\n this.settings.el.addEventListener(\"touchend\", this._hide, false);\n this.settings.el.addEventListener(\"touchmove\", this._handleMovement, false);\n } else {\n this.settings.el.addEventListener(\"touchstart\", this._preventDefault, false);\n this.settings.el.addEventListener(\"touchend\", this._preventDefault, false);\n this.settings.el.addEventListener(\"touchmove\", this._preventDefault, false);\n }\n }\n\n _unbindEvents() {\n this.settings.el.removeEventListener(\"mouseenter\", this._handleEntry, false);\n this.settings.el.removeEventListener(\"mouseleave\", this._hide, false);\n this.settings.el.removeEventListener(\"mousemove\", this._handleMovement, false);\n\n if (this.settings.handleTouch) {\n this.settings.el.removeEventListener(\"touchstart\", this._handleEntry, false);\n this.settings.el.removeEventListener(\"touchend\", this._hide, false);\n this.settings.el.removeEventListener(\"touchmove\", this._handleMovement, false);\n } else {\n this.settings.el.removeEventListener(\"touchstart\", this._preventDefault, false);\n this.settings.el.removeEventListener(\"touchend\", this._preventDefault, false);\n this.settings.el.removeEventListener(\"touchmove\", this._preventDefault, false);\n }\n }\n\n _handleEntry(e) {\n this._preventDefaultAllowTouchScroll(e);\n this._lastMovement = e;\n\n if (e.type == \"mouseenter\" && this.settings.hoverDelay) {\n this.entryTimeout = setTimeout(this._show, this.settings.hoverDelay);\n } else if (this.settings.touchDelay) {\n this.entryTimeout = setTimeout(this._show, this.settings.touchDelay);\n } else {\n this._show();\n }\n }\n\n _show() {\n if (!this.enabled) {\n return;\n }\n\n const onShow = this.settings.onShow;\n if (onShow && typeof onShow === \"function\") {\n onShow();\n }\n\n this.settings.zoomPane.show(\n this.settings.el.getAttribute(this.settings.sourceAttribute),\n this.settings.el.clientWidth,\n this.settings.el.clientHeight\n );\n\n if (this._lastMovement) {\n const touchActivated = this._lastMovement.touches;\n if ((touchActivated && this.settings.touchBoundingBox) || (!touchActivated && this.settings.hoverBoundingBox)) {\n this.boundingBox.show(this.settings.zoomPane.el.clientWidth, this.settings.zoomPane.el.clientHeight);\n }\n }\n\n this._handleMovement();\n }\n\n _hide(e) {\n if (e) {\n this._preventDefaultAllowTouchScroll(e);\n }\n\n this._lastMovement = null;\n\n if (this.entryTimeout) {\n clearTimeout(this.entryTimeout);\n }\n\n if (this.boundingBox) {\n this.boundingBox.hide();\n }\n\n const onHide = this.settings.onHide;\n if (onHide && typeof onHide === \"function\") {\n onHide();\n }\n\n this.settings.zoomPane.hide();\n }\n\n _handleMovement(e) {\n if (e) {\n this._preventDefaultAllowTouchScroll(e);\n this._lastMovement = e;\n } else if (this._lastMovement) {\n e = this._lastMovement;\n } else {\n return;\n }\n\n let movementX;\n let movementY;\n\n if (e.touches) {\n const firstTouch = e.touches[0];\n movementX = firstTouch.clientX;\n movementY = firstTouch.clientY;\n } else {\n movementX = e.clientX;\n movementY = e.clientY;\n }\n\n const el = this.settings.el;\n const rect = el.getBoundingClientRect();\n const offsetX = movementX - rect.left;\n const offsetY = movementY - rect.top;\n\n const percentageOffsetX = offsetX / this.settings.el.clientWidth;\n const percentageOffsetY = offsetY / this.settings.el.clientHeight;\n\n if (this.boundingBox) {\n this.boundingBox.setPosition(percentageOffsetX, percentageOffsetY, rect);\n }\n\n this.settings.zoomPane.setPosition(percentageOffsetX, percentageOffsetY, rect);\n }\n}\n\n// CONCATENATED MODULE: ./src/js/ZoomPane.js\n\n\n\n// All officially-supported browsers have this, but it's easy to\n// account for, just in case.\nconst divStyle = document.createElement(\"div\").style;\n\nconst HAS_ANIMATION =\n typeof document === \"undefined\" ? false : \"animation\" in divStyle || \"webkitAnimation\" in divStyle;\n\nclass ZoomPane_ZoomPane {\n constructor(options = {}) {\n this._completeShow = this._completeShow.bind(this);\n this._completeHide = this._completeHide.bind(this);\n this._handleLoad = this._handleLoad.bind(this);\n\n this.isShowing = false;\n\n const {\n container = null,\n zoomFactor = throwIfMissing(),\n inline = throwIfMissing(),\n namespace = null,\n showWhitespaceAtEdges = throwIfMissing(),\n containInline = throwIfMissing(),\n inlineOffsetX = 0,\n inlineOffsetY = 0,\n inlineContainer = document.body\n } = options;\n\n this.settings = {\n container,\n zoomFactor,\n inline,\n namespace,\n showWhitespaceAtEdges,\n containInline,\n inlineOffsetX,\n inlineOffsetY,\n inlineContainer\n };\n\n this.openClasses = this._buildClasses(\"open\");\n this.openingClasses = this._buildClasses(\"opening\");\n this.closingClasses = this._buildClasses(\"closing\");\n this.inlineClasses = this._buildClasses(\"inline\");\n this.loadingClasses = this._buildClasses(\"loading\");\n\n this._buildElement();\n }\n\n _buildClasses(suffix) {\n const classes = [`drift-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"zoom-pane\"));\n\n const loaderEl = document.createElement(\"div\");\n addClasses(loaderEl, this._buildClasses(\"zoom-pane-loader\"));\n this.el.appendChild(loaderEl);\n\n this.imgEl = document.createElement(\"img\");\n this.el.appendChild(this.imgEl);\n }\n\n _setImageURL(imageURL) {\n this.imgEl.setAttribute(\"src\", imageURL);\n }\n\n _setImageSize(triggerWidth, triggerHeight) {\n this.imgEl.style.width = `${triggerWidth * this.settings.zoomFactor}px`;\n this.imgEl.style.height = `${triggerHeight * this.settings.zoomFactor}px`;\n }\n\n // `percentageOffsetX` and `percentageOffsetY` must be percentages\n // expressed as floats between `0' and `1`.\n setPosition(percentageOffsetX, percentageOffsetY, triggerRect) {\n const imgElWidth = this.imgEl.offsetWidth;\n const imgElHeight = this.imgEl.offsetHeight;\n const elWidth = this.el.offsetWidth;\n const elHeight = this.el.offsetHeight;\n\n const centreOfContainerX = elWidth / 2;\n const centreOfContainerY = elHeight / 2;\n\n const targetImgXToBeCentre = imgElWidth * percentageOffsetX;\n const targetImgYToBeCentre = imgElHeight * percentageOffsetY;\n\n let left = centreOfContainerX - targetImgXToBeCentre;\n let top = centreOfContainerY - targetImgYToBeCentre;\n\n const differenceBetweenContainerWidthAndImgWidth = elWidth - imgElWidth;\n const differenceBetweenContainerHeightAndImgHeight = elHeight - imgElHeight;\n const isContainerLargerThanImgX = differenceBetweenContainerWidthAndImgWidth > 0;\n const isContainerLargerThanImgY = differenceBetweenContainerHeightAndImgHeight > 0;\n\n const minLeft = isContainerLargerThanImgX ? differenceBetweenContainerWidthAndImgWidth / 2 : 0;\n const minTop = isContainerLargerThanImgY ? differenceBetweenContainerHeightAndImgHeight / 2 : 0;\n\n const maxLeft = isContainerLargerThanImgX\n ? differenceBetweenContainerWidthAndImgWidth / 2\n : differenceBetweenContainerWidthAndImgWidth;\n const maxTop = isContainerLargerThanImgY\n ? differenceBetweenContainerHeightAndImgHeight / 2\n : differenceBetweenContainerHeightAndImgHeight;\n\n if (this.el.parentElement === this.settings.inlineContainer) {\n // This may be needed in the future to deal with browser event\n // inconsistencies, but it's difficult to tell for sure.\n // let scrollX = isTouch ? 0 : window.scrollX;\n // let scrollY = isTouch ? 0 : window.scrollY;\n const scrollX = window.pageXOffset;\n const scrollY = window.pageYOffset;\n\n let inlineLeft =\n triggerRect.left + percentageOffsetX * triggerRect.width - elWidth / 2 + this.settings.inlineOffsetX + scrollX;\n let inlineTop =\n triggerRect.top + percentageOffsetY * triggerRect.height - elHeight / 2 + this.settings.inlineOffsetY + scrollY;\n\n if (this.settings.containInline) {\n if (inlineLeft < triggerRect.left + scrollX) {\n inlineLeft = triggerRect.left + scrollX;\n } else if (inlineLeft + elWidth > triggerRect.left + triggerRect.width + scrollX) {\n inlineLeft = triggerRect.left + triggerRect.width - elWidth + scrollX;\n }\n\n if (inlineTop < triggerRect.top + scrollY) {\n inlineTop = triggerRect.top + scrollY;\n } else if (inlineTop + elHeight > triggerRect.top + triggerRect.height + scrollY) {\n inlineTop = triggerRect.top + triggerRect.height - elHeight + scrollY;\n }\n }\n\n this.el.style.left = `${inlineLeft}px`;\n this.el.style.top = `${inlineTop}px`;\n }\n\n if (!this.settings.showWhitespaceAtEdges) {\n if (left > minLeft) {\n left = minLeft;\n } else if (left < maxLeft) {\n left = maxLeft;\n }\n\n if (top > minTop) {\n top = minTop;\n } else if (top < maxTop) {\n top = maxTop;\n }\n }\n\n this.imgEl.style.transform = `translate(${left}px, ${top}px)`;\n this.imgEl.style.webkitTransform = `translate(${left}px, ${top}px)`;\n }\n\n get _isInline() {\n const inline = this.settings.inline;\n\n return inline === true || (typeof inline === \"number\" && window.innerWidth <= inline);\n }\n\n _removeListenersAndResetClasses() {\n this.el.removeEventListener(\"animationend\", this._completeShow, false);\n this.el.removeEventListener(\"animationend\", this._completeHide, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n }\n\n show(imageURL, triggerWidth, triggerHeight) {\n this._removeListenersAndResetClasses();\n this.isShowing = true;\n\n addClasses(this.el, this.openClasses);\n\n if (this.imgEl.getAttribute(\"src\") != imageURL) {\n addClasses(this.el, this.loadingClasses);\n this.imgEl.addEventListener(\"load\", this._handleLoad, false);\n this._setImageURL(imageURL);\n }\n\n this._setImageSize(triggerWidth, triggerHeight);\n\n if (this._isInline) {\n this._showInline();\n } else {\n this._showInContainer();\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeShow, false);\n this.el.addEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n addClasses(this.el, this.openingClasses);\n }\n }\n\n _showInline() {\n this.settings.inlineContainer.appendChild(this.el);\n addClasses(this.el, this.inlineClasses);\n }\n\n _showInContainer() {\n this.settings.container.appendChild(this.el);\n }\n\n hide() {\n this._removeListenersAndResetClasses();\n this.isShowing = false;\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeHide, false);\n this.el.addEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n addClasses(this.el, this.closingClasses);\n } else {\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.inlineClasses);\n }\n }\n\n _completeShow() {\n this.el.removeEventListener(\"animationend\", this._completeShow, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n\n removeClasses(this.el, this.openingClasses);\n }\n\n _completeHide() {\n this.el.removeEventListener(\"animationend\", this._completeHide, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n removeClasses(this.el, this.inlineClasses);\n\n this.el.setAttribute(\"style\", \"\");\n\n // The window could have been resized above or below `inline`\n // limits since the ZoomPane was shown. Because of this, we\n // can't rely on `this._isInline` here.\n if (this.el.parentElement === this.settings.container) {\n this.settings.container.removeChild(this.el);\n } else if (this.el.parentElement === this.settings.inlineContainer) {\n this.settings.inlineContainer.removeChild(this.el);\n }\n }\n\n _handleLoad() {\n this.imgEl.removeEventListener(\"load\", this._handleLoad, false);\n removeClasses(this.el, this.loadingClasses);\n }\n}\n\n// CONCATENATED MODULE: ./src/js/Drift.js\n\n\n\n\n\n\nclass Drift_Drift {\n constructor(triggerEl, options = {}) {\n this.VERSION = \"1.4.0\";\n this.triggerEl = triggerEl;\n\n this.destroy = this.destroy.bind(this);\n\n if (!isDOMElement(this.triggerEl)) {\n throw new TypeError(\"`new Drift` requires a DOM element as its first argument.\");\n }\n\n // Prefix for generated element class names (e.g. `my-ns` will\n // result in classes such as `my-ns-pane`. Default `drift-`\n // prefixed classes will always be added as well.\n const namespace = options[\"namespace\"] || null;\n // Whether the ZoomPane should show whitespace when near the edges.\n const showWhitespaceAtEdges = options[\"showWhitespaceAtEdges\"] || false;\n // Whether the inline ZoomPane should stay inside\n // the bounds of its image.\n const containInline = options[\"containInline\"] || false;\n // How much to offset the ZoomPane from the\n // interaction point when inline.\n const inlineOffsetX = options[\"inlineOffsetX\"] || 0;\n const inlineOffsetY = options[\"inlineOffsetY\"] || 0;\n // A DOM element to append the inline ZoomPane to\n const inlineContainer = options[\"inlineContainer\"] || document.body;\n // Which trigger attribute to pull the ZoomPane image source from.\n const sourceAttribute = options[\"sourceAttribute\"] || \"data-zoom\";\n // How much to magnify the trigger by in the ZoomPane.\n // (e.g., `zoomFactor: 3` will result in a 900 px wide ZoomPane imag\n // if the trigger is displayed at 300 px wide)\n const zoomFactor = options[\"zoomFactor\"] || 3;\n // A DOM element to append the non-inline ZoomPane to.\n // Required if `inlinePane !== true`.\n const paneContainer = options[\"paneContainer\"] === undefined ? document.body : options[\"paneContainer\"];\n // When to switch to an inline ZoomPane. This can be a boolean or\n // an integer. If `true`, the ZoomPane will always be inline,\n // if `false`, it will switch to inline when `windowWidth <= inlinePane`\n const inlinePane = options[\"inlinePane\"] || 375;\n // If `true`, touch events will trigger the zoom, like mouse events.\n const handleTouch = \"handleTouch\" in options ? !!options[\"handleTouch\"] : true;\n // If present (and a function), this will be called\n // whenever the ZoomPane is shown.\n const onShow = options[\"onShow\"] || null;\n // If present (and a function), this will be called\n // whenever the ZoomPane is hidden.\n const onHide = options[\"onHide\"] || null;\n // Add base styles to the page. See the \"Theming\"\n // section of README.md for more information.\n const injectBaseStyles = \"injectBaseStyles\" in options ? !!options[\"injectBaseStyles\"] : true;\n // An optional number that determines how long to wait before\n // showing the ZoomPane because of a `mouseenter` event.\n const hoverDelay = options[\"hoverDelay\"] || 0;\n // An optional number that determines how long to wait before\n // showing the ZoomPane because of a `touchstart` event.\n // It's unlikely that you would want to use this option, since\n // \"tap and hold\" is much more intentional than a hover event.\n const touchDelay = options[\"touchDelay\"] || 0;\n // If true, a bounding box will show the area currently being previewed\n // during mouse hover\n const hoverBoundingBox = options[\"hoverBoundingBox\"] || false;\n // If true, a bounding box will show the area currently being previewed\n // during touch events\n const touchBoundingBox = options[\"touchBoundingBox\"] || false;\n // A DOM element to append the bounding box to.\n const boundingBoxContainer = options[\"boundingBoxContainer\"] || document.body;\n\n if (inlinePane !== true && !isDOMElement(paneContainer)) {\n throw new TypeError(\"`paneContainer` must be a DOM element when `inlinePane !== true`\");\n }\n if (!isDOMElement(inlineContainer)) {\n throw new TypeError(\"`inlineContainer` must be a DOM element\");\n }\n\n this.settings = {\n namespace,\n showWhitespaceAtEdges,\n containInline,\n inlineOffsetX,\n inlineOffsetY,\n inlineContainer,\n sourceAttribute,\n zoomFactor,\n paneContainer,\n inlinePane,\n handleTouch,\n onShow,\n onHide,\n injectBaseStyles,\n hoverDelay,\n touchDelay,\n hoverBoundingBox,\n touchBoundingBox,\n boundingBoxContainer\n };\n\n if (this.settings.injectBaseStyles) {\n injectBaseStylesheet();\n }\n\n this._buildZoomPane();\n this._buildTrigger();\n }\n\n get isShowing() {\n return this.zoomPane.isShowing;\n }\n\n get zoomFactor() {\n return this.settings.zoomFactor;\n }\n\n set zoomFactor(zf) {\n this.settings.zoomFactor = zf;\n this.zoomPane.settings.zoomFactor = zf;\n this.trigger.settings.zoomFactor = zf;\n this.boundingBox.settings.zoomFactor = zf;\n }\n\n _buildZoomPane() {\n this.zoomPane = new ZoomPane_ZoomPane({\n container: this.settings.paneContainer,\n zoomFactor: this.settings.zoomFactor,\n showWhitespaceAtEdges: this.settings.showWhitespaceAtEdges,\n containInline: this.settings.containInline,\n inline: this.settings.inlinePane,\n namespace: this.settings.namespace,\n inlineOffsetX: this.settings.inlineOffsetX,\n inlineOffsetY: this.settings.inlineOffsetY,\n inlineContainer: this.settings.inlineContainer\n });\n }\n\n _buildTrigger() {\n this.trigger = new Trigger_Trigger({\n el: this.triggerEl,\n zoomPane: this.zoomPane,\n handleTouch: this.settings.handleTouch,\n onShow: this.settings.onShow,\n onHide: this.settings.onHide,\n sourceAttribute: this.settings.sourceAttribute,\n hoverDelay: this.settings.hoverDelay,\n touchDelay: this.settings.touchDelay,\n hoverBoundingBox: this.settings.hoverBoundingBox,\n touchBoundingBox: this.settings.touchBoundingBox,\n namespace: this.settings.namespace,\n zoomFactor: this.settings.zoomFactor,\n boundingBoxContainer: this.settings.boundingBoxContainer\n });\n }\n\n setZoomImageURL(imageURL) {\n this.zoomPane._setImageURL(imageURL);\n }\n\n disable() {\n this.trigger.enabled = false;\n }\n\n enable() {\n this.trigger.enabled = true;\n }\n\n destroy() {\n this.trigger._hide();\n this.trigger._unbindEvents();\n }\n}\n\n// Public API\n/* eslint-disable no-self-assign */\nObject.defineProperty(Drift_Drift.prototype, \"isShowing\", {\n get: function() {\n return this.isShowing;\n }\n});\nObject.defineProperty(Drift_Drift.prototype, \"zoomFactor\", {\n get: function() {\n return this.zoomFactor;\n },\n set: function(value) {\n this.zoomFactor = value;\n }\n});\nDrift_Drift.prototype[\"setZoomImageURL\"] = Drift_Drift.prototype.setZoomImageURL;\nDrift_Drift.prototype[\"disable\"] = Drift_Drift.prototype.disable;\nDrift_Drift.prototype[\"enable\"] = Drift_Drift.prototype.enable;\nDrift_Drift.prototype[\"destroy\"] = Drift_Drift.prototype.destroy;\n/* eslint-enable no-self-assign */\n\n// CONCATENATED MODULE: ./src/js/Drift-browser.js\n// This file is used for the standalone browser build\n\n\n\nwindow[\"Drift\"] = Drift_Drift;\n\n\n/***/ })\n/******/ ]);"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import { isDOMElement } from \"./util/dom\";\nimport injectBaseStylesheet from \"./injectBaseStylesheet\";\n\nimport Trigger from \"./Trigger\";\nimport ZoomPane from \"./ZoomPane\";\n\nexport default class Drift {\n constructor(triggerEl, options = {}) {\n this.VERSION = \"1.4.0\";\n this.triggerEl = triggerEl;\n\n this.destroy = this.destroy.bind(this);\n\n if (!isDOMElement(this.triggerEl)) {\n throw new TypeError(\"`new Drift` requires a DOM element as its first argument.\");\n }\n\n // Prefix for generated element class names (e.g. `my-ns` will\n // result in classes such as `my-ns-pane`. Default `drift-`\n // prefixed classes will always be added as well.\n const namespace = options[\"namespace\"] || null;\n // Whether the ZoomPane should show whitespace when near the edges.\n const showWhitespaceAtEdges = options[\"showWhitespaceAtEdges\"] || false;\n // Whether the inline ZoomPane should stay inside\n // the bounds of its image.\n const containInline = options[\"containInline\"] || false;\n // How much to offset the ZoomPane from the\n // interaction point when inline.\n const inlineOffsetX = options[\"inlineOffsetX\"] || 0;\n const inlineOffsetY = options[\"inlineOffsetY\"] || 0;\n // A DOM element to append the inline ZoomPane to\n const inlineContainer = options[\"inlineContainer\"] || document.body;\n // Which trigger attribute to pull the ZoomPane image source from.\n const sourceAttribute = options[\"sourceAttribute\"] || \"data-zoom\";\n // How much to magnify the trigger by in the ZoomPane.\n // (e.g., `zoomFactor: 3` will result in a 900 px wide ZoomPane imag\n // if the trigger is displayed at 300 px wide)\n const zoomFactor = options[\"zoomFactor\"] || 3;\n // A DOM element to append the non-inline ZoomPane to.\n // Required if `inlinePane !== true`.\n const paneContainer = options[\"paneContainer\"] === undefined ? document.body : options[\"paneContainer\"];\n // When to switch to an inline ZoomPane. This can be a boolean or\n // an integer. If `true`, the ZoomPane will always be inline,\n // if `false`, it will switch to inline when `windowWidth <= inlinePane`\n const inlinePane = options[\"inlinePane\"] || 375;\n // If `true`, touch events will trigger the zoom, like mouse events.\n const handleTouch = \"handleTouch\" in options ? !!options[\"handleTouch\"] : true;\n // If present (and a function), this will be called\n // whenever the ZoomPane is shown.\n const onShow = options[\"onShow\"] || null;\n // If present (and a function), this will be called\n // whenever the ZoomPane is hidden.\n const onHide = options[\"onHide\"] || null;\n // Add base styles to the page. See the \"Theming\"\n // section of README.md for more information.\n const injectBaseStyles = \"injectBaseStyles\" in options ? !!options[\"injectBaseStyles\"] : true;\n // An optional number that determines how long to wait before\n // showing the ZoomPane because of a `mouseenter` event.\n const hoverDelay = options[\"hoverDelay\"] || 0;\n // An optional number that determines how long to wait before\n // showing the ZoomPane because of a `touchstart` event.\n // It's unlikely that you would want to use this option, since\n // \"tap and hold\" is much more intentional than a hover event.\n const touchDelay = options[\"touchDelay\"] || 0;\n // If true, a bounding box will show the area currently being previewed\n // during mouse hover\n const hoverBoundingBox = options[\"hoverBoundingBox\"] || false;\n // If true, a bounding box will show the area currently being previewed\n // during touch events\n const touchBoundingBox = options[\"touchBoundingBox\"] || false;\n // A DOM element to append the bounding box to.\n const boundingBoxContainer = options[\"boundingBoxContainer\"] || document.body;\n\n if (inlinePane !== true && !isDOMElement(paneContainer)) {\n throw new TypeError(\"`paneContainer` must be a DOM element when `inlinePane !== true`\");\n }\n if (!isDOMElement(inlineContainer)) {\n throw new TypeError(\"`inlineContainer` must be a DOM element\");\n }\n\n this.settings = {\n namespace,\n showWhitespaceAtEdges,\n containInline,\n inlineOffsetX,\n inlineOffsetY,\n inlineContainer,\n sourceAttribute,\n zoomFactor,\n paneContainer,\n inlinePane,\n handleTouch,\n onShow,\n onHide,\n injectBaseStyles,\n hoverDelay,\n touchDelay,\n hoverBoundingBox,\n touchBoundingBox,\n boundingBoxContainer\n };\n\n if (this.settings.injectBaseStyles) {\n injectBaseStylesheet();\n }\n\n this._buildZoomPane();\n this._buildTrigger();\n }\n\n get isShowing() {\n return this.zoomPane.isShowing;\n }\n\n get zoomFactor() {\n return this.settings.zoomFactor;\n }\n\n set zoomFactor(zf) {\n this.settings.zoomFactor = zf;\n this.zoomPane.settings.zoomFactor = zf;\n this.trigger.settings.zoomFactor = zf;\n this.boundingBox.settings.zoomFactor = zf;\n }\n\n _buildZoomPane() {\n this.zoomPane = new ZoomPane({\n container: this.settings.paneContainer,\n zoomFactor: this.settings.zoomFactor,\n showWhitespaceAtEdges: this.settings.showWhitespaceAtEdges,\n containInline: this.settings.containInline,\n inline: this.settings.inlinePane,\n namespace: this.settings.namespace,\n inlineOffsetX: this.settings.inlineOffsetX,\n inlineOffsetY: this.settings.inlineOffsetY,\n inlineContainer: this.settings.inlineContainer\n });\n }\n\n _buildTrigger() {\n this.trigger = new Trigger({\n el: this.triggerEl,\n zoomPane: this.zoomPane,\n handleTouch: this.settings.handleTouch,\n onShow: this.settings.onShow,\n onHide: this.settings.onHide,\n sourceAttribute: this.settings.sourceAttribute,\n hoverDelay: this.settings.hoverDelay,\n touchDelay: this.settings.touchDelay,\n hoverBoundingBox: this.settings.hoverBoundingBox,\n touchBoundingBox: this.settings.touchBoundingBox,\n namespace: this.settings.namespace,\n zoomFactor: this.settings.zoomFactor,\n boundingBoxContainer: this.settings.boundingBoxContainer\n });\n }\n\n setZoomImageURL(imageURL) {\n this.zoomPane._setImageURL(imageURL);\n }\n\n disable() {\n this.trigger.enabled = false;\n }\n\n enable() {\n this.trigger.enabled = true;\n }\n\n destroy() {\n this.trigger._hide();\n this.trigger._unbindEvents();\n }\n}\n\n// Public API\n/* eslint-disable no-self-assign */\nObject.defineProperty(Drift.prototype, \"isShowing\", {\n get: function() {\n return this.isShowing;\n }\n});\nObject.defineProperty(Drift.prototype, \"zoomFactor\", {\n get: function() {\n return this.zoomFactor;\n },\n set: function(value) {\n this.zoomFactor = value;\n }\n});\nDrift.prototype[\"setZoomImageURL\"] = Drift.prototype.setZoomImageURL;\nDrift.prototype[\"disable\"] = Drift.prototype.disable;\nDrift.prototype[\"enable\"] = Drift.prototype.enable;\nDrift.prototype[\"destroy\"] = Drift.prototype.destroy;\n/* eslint-enable no-self-assign */\n","/* UNMINIFIED RULES\n\nconst RULES = `\n@keyframes noop {\n 0% { zoom: 1; }\n}\n\n@-webkit-keyframes noop {\n 0% { zoom: 1; }\n}\n\n.drift-zoom-pane.drift-open {\n display: block;\n}\n\n.drift-zoom-pane.drift-opening, .drift-zoom-pane.drift-closing {\n animation: noop 1ms;\n -webkit-animation: noop 1ms;\n}\n\n.drift-zoom-pane {\n position: absolute;\n overflow: hidden;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n pointer-events: none;\n}\n\n.drift-zoom-pane-loader {\n display: none;\n}\n\n.drift-zoom-pane img {\n position: absolute;\n display: block;\n max-width: none;\n max-height: none;\n}\n\n.drift-bounding-box {\n position: absolute;\n pointer-events: none;\n}\n`;\n\n*/\n\nconst RULES =\n \".drift-bounding-box,.drift-zoom-pane{position:absolute;pointer-events:none}@keyframes noop{0%{zoom:1}}@-webkit-keyframes noop{0%{zoom:1}}.drift-zoom-pane.drift-open{display:block}.drift-zoom-pane.drift-closing,.drift-zoom-pane.drift-opening{animation:noop 1ms;-webkit-animation:noop 1ms}.drift-zoom-pane{overflow:hidden;width:100%;height:100%;top:0;left:0}.drift-zoom-pane-loader{display:none}.drift-zoom-pane img{position:absolute;display:block;max-width:none;max-height:none}\";\n\nexport default function injectBaseStylesheet() {\n if (document.querySelector(\".drift-base-styles\")) {\n return;\n }\n\n const styleEl = document.createElement(\"style\");\n styleEl.type = \"text/css\";\n styleEl.classList.add(\"drift-base-styles\");\n\n styleEl.appendChild(document.createTextNode(RULES));\n\n const head = document.head;\n head.insertBefore(styleEl, head.firstChild);\n}\n","import throwIfMissing from \"./util/throwIfMissing\";\nimport { addClasses, removeClasses } from \"./util/dom\";\n\n// All officially-supported browsers have this, but it's easy to\n// account for, just in case.\nconst divStyle = document.createElement(\"div\").style;\n\nconst HAS_ANIMATION =\n typeof document === \"undefined\" ? false : \"animation\" in divStyle || \"webkitAnimation\" in divStyle;\n\nexport default class ZoomPane {\n constructor(options = {}) {\n this._completeShow = this._completeShow.bind(this);\n this._completeHide = this._completeHide.bind(this);\n this._handleLoad = this._handleLoad.bind(this);\n\n this.isShowing = false;\n\n const {\n container = null,\n zoomFactor = throwIfMissing(),\n inline = throwIfMissing(),\n namespace = null,\n showWhitespaceAtEdges = throwIfMissing(),\n containInline = throwIfMissing(),\n inlineOffsetX = 0,\n inlineOffsetY = 0,\n inlineContainer = document.body\n } = options;\n\n this.settings = {\n container,\n zoomFactor,\n inline,\n namespace,\n showWhitespaceAtEdges,\n containInline,\n inlineOffsetX,\n inlineOffsetY,\n inlineContainer\n };\n\n this.openClasses = this._buildClasses(\"open\");\n this.openingClasses = this._buildClasses(\"opening\");\n this.closingClasses = this._buildClasses(\"closing\");\n this.inlineClasses = this._buildClasses(\"inline\");\n this.loadingClasses = this._buildClasses(\"loading\");\n\n this._buildElement();\n }\n\n _buildClasses(suffix) {\n const classes = [`drift-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"zoom-pane\"));\n\n const loaderEl = document.createElement(\"div\");\n addClasses(loaderEl, this._buildClasses(\"zoom-pane-loader\"));\n this.el.appendChild(loaderEl);\n\n this.imgEl = document.createElement(\"img\");\n this.el.appendChild(this.imgEl);\n }\n\n _setImageURL(imageURL) {\n this.imgEl.setAttribute(\"src\", imageURL);\n }\n\n _setImageSize(triggerWidth, triggerHeight) {\n this.imgEl.style.width = `${triggerWidth * this.settings.zoomFactor}px`;\n this.imgEl.style.height = `${triggerHeight * this.settings.zoomFactor}px`;\n }\n\n // `percentageOffsetX` and `percentageOffsetY` must be percentages\n // expressed as floats between `0' and `1`.\n setPosition(percentageOffsetX, percentageOffsetY, triggerRect) {\n const imgElWidth = this.imgEl.offsetWidth;\n const imgElHeight = this.imgEl.offsetHeight;\n const elWidth = this.el.offsetWidth;\n const elHeight = this.el.offsetHeight;\n\n const centreOfContainerX = elWidth / 2;\n const centreOfContainerY = elHeight / 2;\n\n const targetImgXToBeCentre = imgElWidth * percentageOffsetX;\n const targetImgYToBeCentre = imgElHeight * percentageOffsetY;\n\n let left = centreOfContainerX - targetImgXToBeCentre;\n let top = centreOfContainerY - targetImgYToBeCentre;\n\n const differenceBetweenContainerWidthAndImgWidth = elWidth - imgElWidth;\n const differenceBetweenContainerHeightAndImgHeight = elHeight - imgElHeight;\n const isContainerLargerThanImgX = differenceBetweenContainerWidthAndImgWidth > 0;\n const isContainerLargerThanImgY = differenceBetweenContainerHeightAndImgHeight > 0;\n\n const minLeft = isContainerLargerThanImgX ? differenceBetweenContainerWidthAndImgWidth / 2 : 0;\n const minTop = isContainerLargerThanImgY ? differenceBetweenContainerHeightAndImgHeight / 2 : 0;\n\n const maxLeft = isContainerLargerThanImgX\n ? differenceBetweenContainerWidthAndImgWidth / 2\n : differenceBetweenContainerWidthAndImgWidth;\n const maxTop = isContainerLargerThanImgY\n ? differenceBetweenContainerHeightAndImgHeight / 2\n : differenceBetweenContainerHeightAndImgHeight;\n\n if (this.el.parentElement === this.settings.inlineContainer) {\n // This may be needed in the future to deal with browser event\n // inconsistencies, but it's difficult to tell for sure.\n // let scrollX = isTouch ? 0 : window.scrollX;\n // let scrollY = isTouch ? 0 : window.scrollY;\n const scrollX = window.pageXOffset;\n const scrollY = window.pageYOffset;\n\n let inlineLeft =\n triggerRect.left + percentageOffsetX * triggerRect.width - elWidth / 2 + this.settings.inlineOffsetX + scrollX;\n let inlineTop =\n triggerRect.top + percentageOffsetY * triggerRect.height - elHeight / 2 + this.settings.inlineOffsetY + scrollY;\n\n if (this.settings.containInline) {\n if (inlineLeft < triggerRect.left + scrollX) {\n inlineLeft = triggerRect.left + scrollX;\n } else if (inlineLeft + elWidth > triggerRect.left + triggerRect.width + scrollX) {\n inlineLeft = triggerRect.left + triggerRect.width - elWidth + scrollX;\n }\n\n if (inlineTop < triggerRect.top + scrollY) {\n inlineTop = triggerRect.top + scrollY;\n } else if (inlineTop + elHeight > triggerRect.top + triggerRect.height + scrollY) {\n inlineTop = triggerRect.top + triggerRect.height - elHeight + scrollY;\n }\n }\n\n this.el.style.left = `${inlineLeft}px`;\n this.el.style.top = `${inlineTop}px`;\n }\n\n if (!this.settings.showWhitespaceAtEdges) {\n if (left > minLeft) {\n left = minLeft;\n } else if (left < maxLeft) {\n left = maxLeft;\n }\n\n if (top > minTop) {\n top = minTop;\n } else if (top < maxTop) {\n top = maxTop;\n }\n }\n\n this.imgEl.style.transform = `translate(${left}px, ${top}px)`;\n this.imgEl.style.webkitTransform = `translate(${left}px, ${top}px)`;\n }\n\n get _isInline() {\n const inline = this.settings.inline;\n\n return inline === true || (typeof inline === \"number\" && window.innerWidth <= inline);\n }\n\n _removeListenersAndResetClasses() {\n this.el.removeEventListener(\"animationend\", this._completeShow, false);\n this.el.removeEventListener(\"animationend\", this._completeHide, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n }\n\n show(imageURL, triggerWidth, triggerHeight) {\n this._removeListenersAndResetClasses();\n this.isShowing = true;\n\n addClasses(this.el, this.openClasses);\n\n if (this.imgEl.getAttribute(\"src\") != imageURL) {\n addClasses(this.el, this.loadingClasses);\n this.imgEl.addEventListener(\"load\", this._handleLoad, false);\n this._setImageURL(imageURL);\n }\n\n this._setImageSize(triggerWidth, triggerHeight);\n\n if (this._isInline) {\n this._showInline();\n } else {\n this._showInContainer();\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeShow, false);\n this.el.addEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n addClasses(this.el, this.openingClasses);\n }\n }\n\n _showInline() {\n this.settings.inlineContainer.appendChild(this.el);\n addClasses(this.el, this.inlineClasses);\n }\n\n _showInContainer() {\n this.settings.container.appendChild(this.el);\n }\n\n hide() {\n this._removeListenersAndResetClasses();\n this.isShowing = false;\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeHide, false);\n this.el.addEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n addClasses(this.el, this.closingClasses);\n } else {\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.inlineClasses);\n }\n }\n\n _completeShow() {\n this.el.removeEventListener(\"animationend\", this._completeShow, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeShow, false);\n\n removeClasses(this.el, this.openingClasses);\n }\n\n _completeHide() {\n this.el.removeEventListener(\"animationend\", this._completeHide, false);\n this.el.removeEventListener(\"webkitAnimationEnd\", this._completeHide, false);\n\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n removeClasses(this.el, this.inlineClasses);\n\n this.el.setAttribute(\"style\", \"\");\n\n // The window could have been resized above or below `inline`\n // limits since the ZoomPane was shown. Because of this, we\n // can't rely on `this._isInline` here.\n if (this.el.parentElement === this.settings.container) {\n this.settings.container.removeChild(this.el);\n } else if (this.el.parentElement === this.settings.inlineContainer) {\n this.settings.inlineContainer.removeChild(this.el);\n }\n }\n\n _handleLoad() {\n this.imgEl.removeEventListener(\"load\", this._handleLoad, false);\n removeClasses(this.el, this.loadingClasses);\n }\n}\n","import throwIfMissing from \"./util/throwIfMissing\";\nimport BoundingBox from \"./BoundingBox\";\n\nexport default class Trigger {\n constructor(options = {}) {\n this._show = this._show.bind(this);\n this._hide = this._hide.bind(this);\n this._handleEntry = this._handleEntry.bind(this);\n this._handleMovement = this._handleMovement.bind(this);\n\n const {\n el = throwIfMissing(),\n zoomPane = throwIfMissing(),\n sourceAttribute = throwIfMissing(),\n handleTouch = throwIfMissing(),\n onShow = null,\n onHide = null,\n hoverDelay = 0,\n touchDelay = 0,\n hoverBoundingBox = throwIfMissing(),\n touchBoundingBox = throwIfMissing(),\n namespace = null,\n zoomFactor = throwIfMissing(),\n boundingBoxContainer = throwIfMissing()\n } = options;\n\n this.settings = {\n el,\n zoomPane,\n sourceAttribute,\n handleTouch,\n onShow,\n onHide,\n hoverDelay,\n touchDelay,\n hoverBoundingBox,\n touchBoundingBox,\n namespace,\n zoomFactor,\n boundingBoxContainer\n };\n\n if (this.settings.hoverBoundingBox || this.settings.touchBoundingBox) {\n this.boundingBox = new BoundingBox({\n namespace: this.settings.namespace,\n zoomFactor: this.settings.zoomFactor,\n containerEl: this.settings.boundingBoxContainer\n });\n }\n\n this.enabled = true;\n\n this._bindEvents();\n }\n\n get isShowing() {\n return this.settings.zoomPane.isShowing;\n }\n\n _preventDefault(event) {\n event.preventDefault();\n }\n\n _preventDefaultAllowTouchScroll(event) {\n if (!this.settings.touchDelay || !this._isTouchEvent(event) || this.isShowing) {\n event.preventDefault();\n }\n }\n\n _isTouchEvent(event) {\n return !!event.touches;\n }\n\n _bindEvents() {\n this.settings.el.addEventListener(\"mouseenter\", this._handleEntry, false);\n this.settings.el.addEventListener(\"mouseleave\", this._hide, false);\n this.settings.el.addEventListener(\"mousemove\", this._handleMovement, false);\n\n if (this.settings.handleTouch) {\n this.settings.el.addEventListener(\"touchstart\", this._handleEntry, false);\n this.settings.el.addEventListener(\"touchend\", this._hide, false);\n this.settings.el.addEventListener(\"touchmove\", this._handleMovement, false);\n } else {\n this.settings.el.addEventListener(\"touchstart\", this._preventDefault, false);\n this.settings.el.addEventListener(\"touchend\", this._preventDefault, false);\n this.settings.el.addEventListener(\"touchmove\", this._preventDefault, false);\n }\n }\n\n _unbindEvents() {\n this.settings.el.removeEventListener(\"mouseenter\", this._handleEntry, false);\n this.settings.el.removeEventListener(\"mouseleave\", this._hide, false);\n this.settings.el.removeEventListener(\"mousemove\", this._handleMovement, false);\n\n if (this.settings.handleTouch) {\n this.settings.el.removeEventListener(\"touchstart\", this._handleEntry, false);\n this.settings.el.removeEventListener(\"touchend\", this._hide, false);\n this.settings.el.removeEventListener(\"touchmove\", this._handleMovement, false);\n } else {\n this.settings.el.removeEventListener(\"touchstart\", this._preventDefault, false);\n this.settings.el.removeEventListener(\"touchend\", this._preventDefault, false);\n this.settings.el.removeEventListener(\"touchmove\", this._preventDefault, false);\n }\n }\n\n _handleEntry(e) {\n this._preventDefaultAllowTouchScroll(e);\n this._lastMovement = e;\n\n if (e.type == \"mouseenter\" && this.settings.hoverDelay) {\n this.entryTimeout = setTimeout(this._show, this.settings.hoverDelay);\n } else if (this.settings.touchDelay) {\n this.entryTimeout = setTimeout(this._show, this.settings.touchDelay);\n } else {\n this._show();\n }\n }\n\n _show() {\n if (!this.enabled) {\n return;\n }\n\n const onShow = this.settings.onShow;\n if (onShow && typeof onShow === \"function\") {\n onShow();\n }\n\n this.settings.zoomPane.show(\n this.settings.el.getAttribute(this.settings.sourceAttribute),\n this.settings.el.clientWidth,\n this.settings.el.clientHeight\n );\n\n if (this._lastMovement) {\n const touchActivated = this._lastMovement.touches;\n if ((touchActivated && this.settings.touchBoundingBox) || (!touchActivated && this.settings.hoverBoundingBox)) {\n this.boundingBox.show(this.settings.zoomPane.el.clientWidth, this.settings.zoomPane.el.clientHeight);\n }\n }\n\n this._handleMovement();\n }\n\n _hide(e) {\n if (e) {\n this._preventDefaultAllowTouchScroll(e);\n }\n\n this._lastMovement = null;\n\n if (this.entryTimeout) {\n clearTimeout(this.entryTimeout);\n }\n\n if (this.boundingBox) {\n this.boundingBox.hide();\n }\n\n const onHide = this.settings.onHide;\n if (onHide && typeof onHide === \"function\") {\n onHide();\n }\n\n this.settings.zoomPane.hide();\n }\n\n _handleMovement(e) {\n if (e) {\n this._preventDefaultAllowTouchScroll(e);\n this._lastMovement = e;\n } else if (this._lastMovement) {\n e = this._lastMovement;\n } else {\n return;\n }\n\n let movementX;\n let movementY;\n\n if (e.touches) {\n const firstTouch = e.touches[0];\n movementX = firstTouch.clientX;\n movementY = firstTouch.clientY;\n } else {\n movementX = e.clientX;\n movementY = e.clientY;\n }\n\n const el = this.settings.el;\n const rect = el.getBoundingClientRect();\n const offsetX = movementX - rect.left;\n const offsetY = movementY - rect.top;\n\n const percentageOffsetX = offsetX / this.settings.el.clientWidth;\n const percentageOffsetY = offsetY / this.settings.el.clientHeight;\n\n if (this.boundingBox) {\n this.boundingBox.setPosition(percentageOffsetX, percentageOffsetY, rect);\n }\n\n this.settings.zoomPane.setPosition(percentageOffsetX, percentageOffsetY, rect);\n }\n}\n","import throwIfMissing from \"./util/throwIfMissing\";\nimport { addClasses, removeClasses } from \"./util/dom\";\n\nexport default class BoundingBox {\n constructor(options) {\n this.isShowing = false;\n\n const { namespace = null, zoomFactor = throwIfMissing(), containerEl = throwIfMissing() } = options;\n\n this.settings = { namespace, zoomFactor, containerEl };\n\n this.openClasses = this._buildClasses(\"open\");\n\n this._buildElement();\n }\n\n _buildClasses(suffix) {\n const classes = [`drift-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"bounding-box\"));\n }\n\n show(zoomPaneWidth, zoomPaneHeight) {\n this.isShowing = true;\n\n this.settings.containerEl.appendChild(this.el);\n\n const style = this.el.style;\n style.width = `${Math.round(zoomPaneWidth / this.settings.zoomFactor)}px`;\n style.height = `${Math.round(zoomPaneHeight / this.settings.zoomFactor)}px`;\n\n addClasses(this.el, this.openClasses);\n }\n\n hide() {\n if (this.isShowing) {\n this.settings.containerEl.removeChild(this.el);\n }\n\n this.isShowing = false;\n\n removeClasses(this.el, this.openClasses);\n }\n\n setPosition(percentageOffsetX, percentageOffsetY, triggerRect) {\n const pageXOffset = window.pageXOffset;\n const pageYOffset = window.pageYOffset;\n\n let inlineLeft = triggerRect.left + percentageOffsetX * triggerRect.width - this.el.clientWidth / 2 + pageXOffset;\n let inlineTop = triggerRect.top + percentageOffsetY * triggerRect.height - this.el.clientHeight / 2 + pageYOffset;\n\n if (inlineLeft < triggerRect.left + pageXOffset) {\n inlineLeft = triggerRect.left + pageXOffset;\n } else if (inlineLeft + this.el.clientWidth > triggerRect.left + triggerRect.width + pageXOffset) {\n inlineLeft = triggerRect.left + triggerRect.width - this.el.clientWidth + pageXOffset;\n }\n\n if (inlineTop < triggerRect.top + pageYOffset) {\n inlineTop = triggerRect.top + pageYOffset;\n } else if (inlineTop + this.el.clientHeight > triggerRect.top + triggerRect.height + pageYOffset) {\n inlineTop = triggerRect.top + triggerRect.height - this.el.clientHeight + pageYOffset;\n }\n\n this.el.style.left = `${inlineLeft}px`;\n this.el.style.top = `${inlineTop}px`;\n }\n}\n","// This is not really a perfect check, but works fine.\n// From http://stackoverflow.com/questions/384286\nconst HAS_DOM_2 = typeof HTMLElement === \"object\";\n\nexport function isDOMElement(obj) {\n return HAS_DOM_2\n ? obj instanceof HTMLElement\n : obj && typeof obj === \"object\" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === \"string\";\n}\n\nexport function addClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.add(className);\n });\n}\n\nexport function removeClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.remove(className);\n });\n}\n","export default function throwIfMissing() {\n throw new Error(\"Missing parameter\");\n}\n","// This file is used for the standalone browser build\n\nimport Drift from \"./Drift\";\n\nwindow[\"Drift\"] = Drift;\n"],"sourceRoot":""}