!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("viewerjs")):"function"==typeof define&&define.amd?define(["viewerjs"],t):"object"==typeof exports?exports.VueViewer=t(require("viewerjs")):e.VueViewer=t(e.Viewer)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),o=n(5),u=function(t,i){function u(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.nextTick(function(){i||!e["$"+p]?(s(e),e["$"+p]=new r.a(e,n),l("viewer created")):(e["$"+p].update(),l("viewer updated"))})}function c(t,n,i,r){f(t);var o=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver;if(!o)return void l("observer not supported");var u=new o(function(e){e.forEach(function(e){l("viewer mutation:"+e.type),i(t,n,r)})}),c={attributes:!0,childList:!0,characterData:!0,subtree:!0};u.observe(t,c),t.$viewerMutationObserver=u,l("observer created")}function a(e,t,n,i){var r=t.expression,o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;if(!r||!o.test(r))return void l("only simple dot-delimited paths can create watcher");e.$viewerUnwatch=n.context.$watch(r,function(t,n){l("change detected by watcher: ",r),i(e,t,!0)},{deep:!0}),l("watcher created, expression: ",r)}function s(e){e["$"+p]&&(e["$"+p].destroy(),delete e["$"+p],l("viewer destroyed"))}function f(e){e.$viewerMutationObserver&&(e.$viewerMutationObserver.disconnect(),delete e.$viewerMutationObserver,l("observer destroyed"))}function d(e){e.$viewerUnwatch&&(e.$viewerUnwatch(),delete e.$viewerUnwatch,l("watcher destroyed"))}function l(){var e;h&&(e=console).log.apply(e,arguments)}var v=i.name,p=void 0===v?"viewer":v,w=i.debug,h=void 0!==w&&w;t.directive("viewer",{bind:function(e,t,i){l("viewer bind");var r=n.i(o.a)(50,u);r(e,t.value),a(e,t,i,r),t.modifiers.static||c(e,t.value,r,t.modifiers.rebuild)},unbind:function(e,t){l("viewer unbind"),f(e),d(e),s(e)}})};t.a={install:u}}).call(t,n(7))},function(e,t,n){"use strict";function i(){var e={},t=!1,n=0,r=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);n1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,c=void 0===r?"viewer":r,s=t.debug,f=void 0!==s&&s,d=t.defaultOptions;a.a.setDefaults(d),e.component(c,n.i(i.a)(o.a,{name:c})),e.use(u.a,{name:c,debug:f})},setDefaults:function(e){a.a.setDefaults(e)}}},function(e,t,n){"use strict";function i(e,t,n,i){function r(){c&&clearTimeout(c)}function o(){r(),a=!0}function u(){function o(){s=Date.now(),n.apply(f,l)}function u(){c=void 0}var f=this,d=Date.now()-s,l=arguments;a||(i&&!c&&o(),r(),void 0===i&&d>e?o():!0!==t&&(c=setTimeout(i?u:o,void 0===i?e-d:e)))}var c,a=!1,s=0;return"boolean"!=typeof t&&(i=n,n=t,t=void 0),u.cancel=o,u}function r(e,t,n){return void 0===n?i(e,t,!1):i(e,n,!1!==t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n.n(i);t.default={props:{images:{type:Array},rebuild:{type:Boolean,default:!1},trigger:{},options:{type:Object}},data:function(){return{}},computed:{},methods:{onChange:function(){this.rebuild?this.rebuildViewer():this.updateViewer()},rebuildViewer:function(){this.destroyViewer(),this.createViewer()},updateViewer:function(){this.$viewer?(this.$viewer.update(),this.$emit("inited",this.$viewer)):this.createViewer()},destroyViewer:function(){this.$viewer&&this.$viewer.destroy()},createViewer:function(){this.$viewer=new r.a(this.$el,this.options),this.$emit("inited",this.$viewer)}},watch:{images:function(){var e=this;this.$nextTick(function(){e.onChange()})},trigger:{handler:function(){var e=this;this.$nextTick(function(){e.onChange()})},deep:!0},options:{handler:function(){var e=this;this.$nextTick(function(){e.rebuildViewer()})},deep:!0}},mounted:function(){this.createViewer()},destroyed:function(){this.destroyViewer()}}},function(e,t){var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t,n,i){var r,o=e=e||{},u=typeof e.default;"object"!==u&&"function"!==u||(r=e,o=e.default);var c="function"==typeof o?o.options:o;if(t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns),n&&(c._scopeId=n),i){var a=Object.create(c.computed||null);Object.keys(i).forEach(function(e){var t=i[e];a[e]=function(){return t}}),c.computed=a}return{esModule:r,exports:o,options:c}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default",null,{images:e.images,options:e.options})],2)},staticRenderFns:[]}}])});