/** * Modules in this bundle * @license * * jquery-module: * license: MIT * author: TSUMIKI INC. * version: 1.0.2 * * events: * license: MIT * author: Irakli Gozalishvili * maintainers: gozala , defunctzombie * homepage: https://github.com/Gozala/events#readme * version: 1.1.0 * * This header is generated by licensify (https://github.com/twada/licensify) */ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.$Module=t()}}(function(){return function t(e,n,i){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!l&&u)return u(s,!0);if(r)return r(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[s]={exports:{}};e[s][0].call(a.exports,function(t){var n=e[s][1][t];return o(n?n:t)},a,a.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;sl?r:s/this.option.aspectRatio,e=t*this.option.aspectRatio,n=-(e/2),o=-(t/2),this.$el.css({width:t,height:e,marginTop:n,marginLeft:o})},t.prototype._loadWindow=function(){var t=this;n(document).ready(function(){t._fit()})},t.prototype._resizeWindow=function(){var t=this;i.on("resize.fit",function(){t._fit()})},t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,n){(function(n){(function(){"use strict";var i,o,r,s,l,u,f,a,c=function(t,e){function n(){this.constructor=t}for(var i in e)h.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("events").EventEmitter,i=n.$,l="modal",r={width:640,height:360,isStylingModal:!0,bodySelector:".js-modal-body"},o=i("body"),a='',f=!1,e.exports=u=function(t){function e(t,n){this.el=t,e.__super__.constructor.call(this),this._configure(this.el,n),this.addOpenEvent()}return c(e,t),e.setBaseElement=function(t){return a=t},e.isAnyOpened=function(){return f},e.prototype.render=function(t){return i(this.opts.bodySelector).append(t),this},e.prototype.open=function(){return f?this:(this._opened=f=!0,this._stylingBodyAtOpen(),this.opts.isStylingModal&&this._stylingModalAtOpen(),this.addCloseEvent(),this.emit("open",this.el,this),this)},e.prototype.close=function(){return this._opened=f=!1,i(".js-modal").hide(),i(".js-modal-wrapper").fadeOut().promise().done(function(t){return function(){return t._removeModalWrapper()}}(this)),this.emit("close",this.el,this),this},e.prototype.addOpenEvent=function(){return this.$el.on("click."+l+":open",function(t){return function(e){return null!=e&&"function"==typeof e.preventDefault&&e.preventDefault(),t.open()}}(this)),this},e.prototype.removeOpenEvent=function(){return this.$el.off("click."+l+":open"),this},e.prototype.addCloseEvent=function(){return i(".js-close-modal, .js-modal-bg").on("click."+l+":close",function(t){return function(e){return null!=e&&"function"==typeof e.preventDefault&&e.preventDefault(),t.close()}}(this)),this},e.prototype._configure=function(t,e){return this.$el=i(t),this.opts=i.extend({},r,e)},e.prototype._removeModalWrapper=function(){return i(".js-modal-wrapper").remove(),this._stylingBodyDefault()},e.prototype._stylingBodyAtOpen=function(){var t;return t=this._getScrollbarWidth(),o.css("margin-right",t).append(a).css("overflow","hidden")},e.prototype._stylingModalAtOpen=function(){return i(".js-modal").css({width:this.opts.width,height:this.opts.height,marginTop:-this.opts.height/2,marginLeft:-this.opts.width/2})},e.prototype._stylingBodyDefault=function(){return o.css({marginRight:0,overflow:"visible"})},e.prototype._getScrollbarWidth=function(){var t,e;return t=document.createElement("div"),t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t),e=t.offsetWidth-t.clientWidth,document.body.removeChild(t),e},e}(s)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{events:11}],4:[function(t,e,n){(function(t){(function(){"use strict";var n,i,o,r;n=t.$,o="popup",i={width:640,height:800,url:null,nameSuffix:"-popup"},e.exports=r=function(){function t(t,e){this.el=t,this._configure(this.el,e),this.bindClick()}return t.open=function(e){return new t(e).open()},t.prototype.open=function(){return window.open(this._url,this._name,this._param),this},t.prototype.bindClick=function(){return this.$el.on("click."+o,function(t){return function(e){return null!=e&&e.preventDefault(),t.open()}}(this)),this},t.prototype.unbindClick=function(){return this.$el.off("click."+o),this},t.prototype._configure=function(t,e){var o;return this.opts=n.extend({},i,e),this.$el=n(t),null!=(o=this.el.getAttribute("href"))?this._url=o:this._url=this.opts.url,this._name=""+window.name+this.opts.nameSuffix,this._setParam()},t.prototype._setParam=function(){var t,e,n,i,o,r;return i=null!=(n=this.el.getAttribute("data-popup-width"))?n:this.opts.width,e=null!=(t=this.el.getAttribute("data-popup-heigt"))?t:this.opts.height,o=(window.screen.width-i)/2,r=(window.screen.height-e)/2,this._param="screenX="+o+",screenY="+r+",left="+o+",top="+r+",width="+i+",height="+e+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes"},t}()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e,n){(function(t){(function(){"use strict";var n,i,o,r;n=t.$,o="rollover",i={strOff:"_off",strOn:"_on",onlyChild:!0,initializationOver:!1},e.exports=r=function(){function t(t,e){this.el=t,this._configure(this.el,e),this._preload(),this.events(),this.opts.initializationOver&&this.toOver()}return t.prototype.toOver=function(){return this.$img.attr("src",this._srcOn),this},t.prototype.toOut=function(){return this.$img.attr("src",this._srcOff),this},t.prototype.events=function(){return this.$el.on("mouseenter."+o,function(t){return function(){return t.toOver()}}(this)),this.$el.on("mouseleave."+o,function(t){return function(){return t.toOut()}}(this)),this},t.prototype.rmEvents=function(){return this.$el.off("mouseenter."+o),this.$el.off("mouseleave."+o),this},t.prototype._preload=function(){return n("").attr("src",this._srcOn)},t.prototype._configure=function(t,e){return this.$el=n(t),this.opts=n.extend({},i,e),this.opts.onlyChild?this.$img=this.$el.children("img"):this.$img=this.$el.find("img"),this._srcOff=this.$img.attr("src"),this._srcOn=this._srcOff.replace(this.opts.strOff,this.opts.strOn)},t}()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(t,e,n){(function(t){(function(){"use strict";var n,i,o,r,s,l=function(t,e){return function(){return t.apply(e,arguments)}};n=t.$,r="smoothscroll",o={speed:700,easingName:"swing",offset:0,onScrollBefore:function(t){},onScrollAfter:function(t){}},i=n("html, body"),e.exports=s=function(){function t(t,e){this.el=t,this._handleClick=l(this._handleClick,this),this._configure(this.el,e),this.bindClick()}return t.addEasing=function(t,e){return n.easing[t+":"+r]=e},t.cancelScroll=function(){return i.stop()},t.prototype.scroll=function(){var t,e,n,o,s,l,u;return null==this.$targetEl?this:(s=this.opts,l=s.speed,t=s.easingName,e=s.offset,o=s.onScrollBefore,n=s.onScrollAfter,o(this),u=this.$targetEl.offset().top-e,this._onWheelCancel(),i.animate({scrollTop:u},{duration:l,easing:"swing"===t?t:t+":"+r}).promise().then(function(t){return function(){return n(t)}}(this)).always(function(t){return function(){return t._offWheelCancel()}}(this)),this)},t.prototype.bindClick=function(){return this.$el.on("click."+r,this._handleClick),this},t.prototype.unbindClick=function(){return this.$el.off("click."+r),this},t.prototype._configure=function(t,e){var i;return this.$el=n(t),this.opts=n.extend({},o,e),i=this.$el.attr("href"),"#"!==i&&""!==i?this.$targetEl=n(i):void 0},t.prototype._handleClick=function(t){return t.preventDefault(),this.scroll()},t.prototype._onWheelCancel=function(){return n(window).on("wheel.cancel"+r,t.cancelScroll)},t.prototype._offWheelCancel=function(){return n(window).off("wheel.cancel"+r)},t}()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(t,e,n){(function(t){"use strict";function e(t){console.log(i),console.log(t)}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=e;var i=t.$}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,e,n){(function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n0?i.attr("content"):a("title").text(),n=(o=a('meta[property="og:url"]')).length>0?o.attr("content"):location.href,"twitter"===t?this._setTwitterURL(e,n):"facebook"===t?this._setFacebookURL(n):"google"===t&&this._setGooglePlusURL(n)}},{key:"_setTwitterURL",value:function(t,e){var n=140-(e.length+1);t.length>n&&(t=t.substr(0,n-3)+"..."),this._url="https://twitter.com/share?url="+encodeURI(e)+"&text="+encodeURI(t)}},{key:"_setFacebookURL",value:function(t){this._url="https://www.facebook.com/sharer.php?u="+t}},{key:"_setGooglePlusURL",value:function(t){t=t.replace(/.*?:\/\//g,""),this._url="https://plus.google.com/share?url="+t}}]),e}(f["default"]);n["default"]=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./popup":8}],10:[function(t,e,n){(function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;nt||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,r,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],l(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),n.apply(this,r)}else if(s(n))for(r=Array.prototype.slice.call(arguments,1),f=n.slice(),i=f.length,u=0;i>u;u++)f[u].apply(this,r);return!0},i.prototype.addListener=function(t,e){var n;if(!o(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,o(e.listener)?e.listener:e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,s(this._events[t])&&!this._events[t].warned&&(n=l(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,r,l;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],r=n.length,i=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(s(n)){for(l=r;l-->0;)if(n[l]===e||n[l].listener&&n[l].listener===e){i=l;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},{}]},{},[1])(1)});