ireland-trip-site/dist/js/storymap.js.map
Chandler Swift 08c1048604
Add custom StoryMapJS build
From StoryMapJS@3a009d50ca0ee1392c790e77bf756a94f97dc169, which includes
these commits on top of upstream:

    commit 3a009d50ca0ee1392c790e77bf756a94f97dc169
    Author: Chandler Swift <chandler@chandlerswift.com>
    Date:   Sun Dec 22 22:28:46 2024 -0600

        Add support for HTML5 video element

    commit 6ade0d609203fe3063b26fff23602b0b3caf7e38
    Author: Chandler Swift <chandler@chandlerswift.com>
    Date:   Sun Dec 22 22:26:37 2024 -0600

        Re-enable scroll-to-zoom on map

    commit ce2220d6f7325c2fa5f3f9963a56daf1e8b6c90f
    Author: Chandler Swift <chandler@chandlerswift.com>
    Date:   Sun Dec 22 22:25:58 2024 -0600

        Add lightbox for image links

Fixes #3
2024-12-22 22:48:29 -06:00

1 line
824 KiB
Plaintext

{"version":3,"file":"storymap.js","mappings":"0CAAA,SAKC,SAAUA,EAAQC,EAAUC,GAC7B,IAoDMC,EACAC,EArDFC,EAAOL,EAAOM,EACdA,EAAI,CAAC,EAETA,EAAEC,QAAU,QAGgD,iBAAnBC,EAAOC,QAC/CD,EAAOC,QAAUH,GAIT,qBAAR,KAAQ,sCAKTA,EAAEI,WAAa,WAEd,OADAV,EAAOM,EAAID,EACJM,IACR,EAEAX,EAAOM,EAAIA,EAOXA,EAAEM,KAAO,CACRC,OAAQ,SAAUC,GACjB,IACIC,EAAGC,EAAGC,EAAKC,EADXC,EAAUC,MAAMC,UAAUC,MAAMC,KAAKC,UAAW,GAGpD,IAAKR,EAAI,EAAGC,EAAME,EAAQM,OAAQT,EAAIC,EAAKD,IAE1C,IAAKD,KADLG,EAAMC,EAAQH,IAAM,CAAC,EAEhBE,EAAIQ,eAAeX,KACtBD,EAAKC,GAAKG,EAAIH,IAIjB,OAAOD,CACR,EAEAa,KAAM,SAAUC,EAAIC,GACnB,IAAIC,EAAON,UAAUC,OAAS,EAAIL,MAAMC,UAAUC,MAAMC,KAAKC,UAAW,GAAK,KAC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E,MAAM,wCAGlB,EACAN,EAAYO,KAAK,MAAOtpD,GACxB+oD,EAAYQ,MAChB,EAUIpD,SAAUA,IAEdxqE,OAAOmkD,IAAM,GAGb,MAAM0pB,GAAc5tE,SAASoQ,cAAc,OAC3Cw9D,GAAYj2C,aAAa,KAAK,YAC9B33B,SAASgP,KAAKqB,YAAYu9D,IAG1BA,GAAYrlE,iBAAiB,SAAS,IAAMqlE,GAAYnjE,MAAMuuB,QAAU,Q","sources":["webpack://KLStoryMap/./node_modules/leaflet/dist/leaflet-src.js","webpack://KLStoryMap/./src/js/language/locale/ sync ^\\.\\/.*\\.json$","webpack://KLStoryMap/webpack/bootstrap","webpack://KLStoryMap/webpack/runtime/define property getters","webpack://KLStoryMap/webpack/runtime/hasOwnProperty shorthand","webpack://KLStoryMap/webpack/runtime/make namespace object","webpack://KLStoryMap/./src/js/core/Browser.js","webpack://KLStoryMap/./src/js/core/Util.js","webpack://KLStoryMap/./src/js/library/Emoji.js","webpack://KLStoryMap/./src/js/core/Load.js","webpack://KLStoryMap/./src/js/dom/Dom.js","webpack://KLStoryMap/./src/js/animation/Ease.js","webpack://KLStoryMap/./src/js/language/Language.js","webpack://KLStoryMap/./src/js/core/Events.js","webpack://KLStoryMap/./src/js/dom/DomMixins.js","webpack://KLStoryMap/./src/js/map/Map.js","webpack://KLStoryMap/./src/js/map/leaflet/extensions/Leaflet.TileLayer.Zoomify.js","webpack://KLStoryMap/./src/js/map/leaflet/extensions/Leaflet.MiniMap.js","webpack://KLStoryMap/./src/js/map/MapMarker.js","webpack://KLStoryMap/./src/js/map/leaflet/MapMarker.Leaflet.js","webpack://KLStoryMap/./src/js/map/tile/TileLayer.Stamen.js","webpack://KLStoryMap/./src/js/map/leaflet/Map.Leaflet.js","webpack://KLStoryMap/./src/js/ui/Draggable.js","webpack://KLStoryMap/./src/js/dom/DomEvent.js","webpack://KLStoryMap/./src/js/ui/MenuBar.js","webpack://KLStoryMap/./src/js/animation/Animate.js","webpack://KLStoryMap/./src/js/slider/SlideNav.js","webpack://KLStoryMap/./src/js/ui/Message.js","webpack://KLStoryMap/./src/js/media/Media.js","webpack://KLStoryMap/./src/js/media/types/Image.js","webpack://KLStoryMap/./src/js/media/types/YouTube.js","webpack://KLStoryMap/./src/js/media/types/Blockquote.js","webpack://KLStoryMap/./src/js/media/types/Wikipedia.js","webpack://KLStoryMap/./src/js/media/types/SoundCloud.js","webpack://KLStoryMap/./src/js/media/types/Vimeo.js","webpack://KLStoryMap/./src/js/media/types/DailyMotion.js","webpack://KLStoryMap/./src/js/media/types/Vine.js","webpack://KLStoryMap/./src/js/media/types/Twitter.js","webpack://KLStoryMap/./src/js/media/types/Flickr.js","webpack://KLStoryMap/./src/js/media/types/GoogleDoc.js","webpack://KLStoryMap/./src/js/media/types/Slider.js","webpack://KLStoryMap/./src/js/media/types/IFrame.js","webpack://KLStoryMap/./src/js/media/types/Website.js","webpack://KLStoryMap/./src/js/media/types/Video.js","webpack://KLStoryMap/./src/js/media/MediaType.js","webpack://KLStoryMap/./src/js/media/types/Text.js","webpack://KLStoryMap/./src/js/slider/Slide.js","webpack://KLStoryMap/./src/js/ui/Swipable.js","webpack://KLStoryMap/./src/js/slider/StorySlider.js","webpack://KLStoryMap/./src/js/storymap/StoryMap.js","webpack://KLStoryMap/./src/js/index.js"],"sourcesContent":["/*\n Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com\n (c) 2010-2013, Vladimir Agafonkin\n (c) 2010-2011, CloudMade\n*/\n(function (window, document, undefined) {\r\nvar oldL = window.L,\r\n L = {};\r\n\r\nL.version = '0.7.7';\r\n\r\n// define Leaflet for Node module pattern loaders, including Browserify\r\nif (typeof module === 'object' && typeof module.exports === 'object') {\r\n\tmodule.exports = L;\r\n\r\n// define Leaflet as an AMD module\r\n} else if (typeof define === 'function' && define.amd) {\r\n\tdefine(L);\r\n}\r\n\r\n// define Leaflet as a global L variable, saving the original L to restore later if needed\r\n\r\nL.noConflict = function () {\r\n\twindow.L = oldL;\r\n\treturn this;\r\n};\r\n\r\nwindow.L = L;\r\n\n\n/*\r\n * L.Util contains various utility functions used throughout Leaflet code.\r\n */\r\n\r\nL.Util = {\r\n\textend: function (dest) { // (Object[, Object, ...]) ->\r\n\t\tvar sources = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, j, len, src;\r\n\r\n\t\tfor (j = 0, len = sources.length; j < len; j++) {\r\n\t\t\tsrc = sources[j] || {};\r\n\t\t\tfor (i in src) {\r\n\t\t\t\tif (src.hasOwnProperty(i)) {\r\n\t\t\t\t\tdest[i] = src[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dest;\r\n\t},\r\n\r\n\tbind: function (fn, obj) { // (Function, Object) -> Function\r\n\t\tvar args = arguments.length > 2 ? Array.prototype.slice.call(arguments, 2) : null;\r\n\t\treturn function () {\r\n\t\t\treturn fn.apply(obj, args || arguments);\r\n\t\t};\r\n\t},\r\n\r\n\tstamp: (function () {\r\n\t\tvar lastId = 0,\r\n\t\t key = '_leaflet_id';\r\n\t\treturn function (obj) {\r\n\t\t\tobj[key] = obj[key] || ++lastId;\r\n\t\t\treturn obj[key];\r\n\t\t};\r\n\t}()),\r\n\r\n\tinvokeEach: function (obj, method, context) {\r\n\t\tvar i, args;\r\n\r\n\t\tif (typeof obj === 'object') {\r\n\t\t\targs = Array.prototype.slice.call(arguments, 3);\r\n\r\n\t\t\tfor (i in obj) {\r\n\t\t\t\tmethod.apply(context, [i, obj[i]].concat(args));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\tlimitExecByInterval: function (fn, time, context) {\r\n\t\tvar lock, execOnUnlock;\r\n\r\n\t\treturn function wrapperFn() {\r\n\t\t\tvar args = arguments;\r\n\r\n\t\t\tif (lock) {\r\n\t\t\t\texecOnUnlock = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlock = true;\r\n\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tlock = false;\r\n\r\n\t\t\t\tif (execOnUnlock) {\r\n\t\t\t\t\twrapperFn.apply(context, args);\r\n\t\t\t\t\texecOnUnlock = false;\r\n\t\t\t\t}\r\n\t\t\t}, time);\r\n\r\n\t\t\tfn.apply(context, args);\r\n\t\t};\r\n\t},\r\n\r\n\tfalseFn: function () {\r\n\t\treturn false;\r\n\t},\r\n\r\n\tformatNum: function (num, digits) {\r\n\t\tvar pow = Math.pow(10, digits || 5);\r\n\t\treturn Math.round(num * pow) / pow;\r\n\t},\r\n\r\n\ttrim: function (str) {\r\n\t\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n\t},\r\n\r\n\tsplitWords: function (str) {\r\n\t\treturn L.Util.trim(str).split(/\\s+/);\r\n\t},\r\n\r\n\tsetOptions: function (obj, options) {\r\n\t\tobj.options = L.extend({}, obj.options, options);\r\n\t\treturn obj.options;\r\n\t},\r\n\r\n\tgetParamString: function (obj, existingUrl, uppercase) {\r\n\t\tvar params = [];\r\n\t\tfor (var i in obj) {\r\n\t\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t\t}\r\n\t\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n\t},\r\n\ttemplate: function (str, data) {\r\n\t\treturn str.replace(/\\{ *([\\w_]+) *\\}/g, function (str, key) {\r\n\t\t\tvar value = data[key];\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tthrow new Error('No value provided for variable ' + str);\r\n\t\t\t} else if (typeof value === 'function') {\r\n\t\t\t\tvalue = value(data);\r\n\t\t\t}\r\n\t\t\treturn value;\r\n\t\t});\r\n\t},\r\n\r\n\tisArray: Array.isArray || function (obj) {\r\n\t\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n\t},\r\n\r\n\temptyImageUrl: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='\r\n};\r\n\r\n(function () {\r\n\r\n\t// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\n\tfunction getPrefixed(name) {\r\n\t\tvar i, fn,\r\n\t\t prefixes = ['webkit', 'moz', 'o', 'ms'];\r\n\r\n\t\tfor (i = 0; i < prefixes.length && !fn; i++) {\r\n\t\t\tfn = window[prefixes[i] + name];\r\n\t\t}\r\n\r\n\t\treturn fn;\r\n\t}\r\n\r\n\tvar lastTime = 0;\r\n\r\n\tfunction timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}\r\n\r\n\tvar requestFn = window.requestAnimationFrame ||\r\n\t getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\n\r\n\tvar cancelFn = window.cancelAnimationFrame ||\r\n\t getPrefixed('CancelAnimationFrame') ||\r\n\t getPrefixed('CancelRequestAnimationFrame') ||\r\n\t function (id) { window.clearTimeout(id); };\r\n\r\n\r\n\tL.Util.requestAnimFrame = function (fn, context, immediate, element) {\r\n\t\tfn = L.bind(fn, context);\r\n\r\n\t\tif (immediate && requestFn === timeoutDefer) {\r\n\t\t\tfn();\r\n\t\t} else {\r\n\t\t\treturn requestFn.call(window, fn, element);\r\n\t\t}\r\n\t};\r\n\r\n\tL.Util.cancelAnimFrame = function (id) {\r\n\t\tif (id) {\r\n\t\t\tcancelFn.call(window, id);\r\n\t\t}\r\n\t};\r\n\r\n}());\r\n\r\n// shortcuts for most used utility functions\r\nL.extend = L.Util.extend;\r\nL.bind = L.Util.bind;\r\nL.stamp = L.Util.stamp;\r\nL.setOptions = L.Util.setOptions;\r\n\n\n/*\r\n * L.Class powers the OOP facilities of the library.\r\n * Thanks to John Resig and Dean Edwards for inspiration!\r\n */\r\n\r\nL.Class = function () {};\r\n\r\nL.Class.extend = function (props) {\r\n\r\n\t// extended class with the new prototype\r\n\tvar NewClass = function () {\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tif (this._initHooks) {\r\n\t\t\tthis.callInitHooks();\r\n\t\t}\r\n\t};\r\n\r\n\t// instantiate class without calling constructor\r\n\tvar F = function () {};\r\n\tF.prototype = this.prototype;\r\n\r\n\tvar proto = new F();\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t//inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (this.hasOwnProperty(i) && i !== 'prototype') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\tL.extend(NewClass, props.statics);\r\n\t\tdelete props.statics;\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tL.Util.extend.apply(null, [proto].concat(props.includes));\r\n\t\tdelete props.includes;\r\n\t}\r\n\r\n\t// merge options\r\n\tif (props.options && proto.options) {\r\n\t\tprops.options = L.extend({}, proto.options, props.options);\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\tL.extend(proto, props);\r\n\r\n\tproto._initHooks = [];\r\n\r\n\tvar parent = this;\r\n\t// jshint camelcase: false\r\n\tNewClass.__super__ = parent.prototype;\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parent.prototype.callInitHooks) {\r\n\t\t\tparent.prototype.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// method for adding properties to prototype\r\nL.Class.include = function (props) {\r\n\tL.extend(this.prototype, props);\r\n};\r\n\r\n// merge new default options to the Class\r\nL.Class.mergeOptions = function (options) {\r\n\tL.extend(this.prototype.options, options);\r\n};\r\n\r\n// add a constructor hook\r\nL.Class.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n};\r\n\n\n/*\r\n * L.Mixin.Events is used to add custom events functionality to Leaflet classes.\r\n */\r\n\r\nvar eventsKey = '_leaflet_events';\r\n\r\nL.Mixin = {};\r\n\r\nL.Mixin.Events = {\r\n\r\n\taddEventListener: function (types, fn, context) { // (String, Function[, Object]) or (Object[, Object])\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (L.Util.invokeEach(types, this.addEventListener, this, fn, context)) { return this; }\r\n\r\n\t\tvar events = this[eventsKey] = this[eventsKey] || {},\r\n\t\t contextId = context && context !== this && L.stamp(context),\r\n\t\t i, len, event, type, indexKey, indexLenKey, typeIndex;\r\n\r\n\t\t// types can be a string of space-separated words\r\n\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\tfor (i = 0, len = types.length; i < len; i++) {\r\n\t\t\tevent = {\r\n\t\t\t\taction: fn,\r\n\t\t\t\tcontext: context || this\r\n\t\t\t};\r\n\t\t\ttype = types[i];\r\n\r\n\t\t\tif (contextId) {\r\n\t\t\t\t// store listeners of a particular context in a separate hash (if it has an id)\r\n\t\t\t\t// gives a major performance boost when removing thousands of map layers\r\n\r\n\t\t\t\tindexKey = type + '_idx';\r\n\t\t\t\tindexLenKey = indexKey + '_len';\r\n\r\n\t\t\t\ttypeIndex = events[indexKey] = events[indexKey] || {};\r\n\r\n\t\t\t\tif (!typeIndex[contextId]) {\r\n\t\t\t\t\ttypeIndex[contextId] = [];\r\n\r\n\t\t\t\t\t// keep track of the number of keys in the index to quickly check if it's empty\r\n\t\t\t\t\tevents[indexLenKey] = (events[indexLenKey] || 0) + 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttypeIndex[contextId].push(event);\r\n\r\n\r\n\t\t\t} else {\r\n\t\t\t\tevents[type] = events[type] || [];\r\n\t\t\t\tevents[type].push(event);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\thasEventListeners: function (type) { // (String) -> Boolean\r\n\t\tvar events = this[eventsKey];\r\n\t\treturn !!events && ((type in events && events[type].length > 0) ||\r\n\t\t (type + '_idx' in events && events[type + '_idx_len'] > 0));\r\n\t},\r\n\r\n\tremoveEventListener: function (types, fn, context) { // ([String, Function, Object]) or (Object[, Object])\r\n\r\n\t\tif (!this[eventsKey]) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!types) {\r\n\t\t\treturn this.clearAllEventListeners();\r\n\t\t}\r\n\r\n\t\tif (L.Util.invokeEach(types, this.removeEventListener, this, fn, context)) { return this; }\r\n\r\n\t\tvar events = this[eventsKey],\r\n\t\t contextId = context && context !== this && L.stamp(context),\r\n\t\t i, len, type, listeners, j, indexKey, indexLenKey, typeIndex, removed;\r\n\r\n\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\tfor (i = 0, len = types.length; i < len; i++) {\r\n\t\t\ttype = types[i];\r\n\t\t\tindexKey = type + '_idx';\r\n\t\t\tindexLenKey = indexKey + '_len';\r\n\r\n\t\t\ttypeIndex = events[indexKey];\r\n\r\n\t\t\tif (!fn) {\r\n\t\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\t\tdelete events[type];\r\n\t\t\t\tdelete events[indexKey];\r\n\t\t\t\tdelete events[indexLenKey];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tlisteners = contextId && typeIndex ? typeIndex[contextId] : events[type];\r\n\r\n\t\t\t\tif (listeners) {\r\n\t\t\t\t\tfor (j = listeners.length - 1; j >= 0; j--) {\r\n\t\t\t\t\t\tif ((listeners[j].action === fn) && (!context || (listeners[j].context === context))) {\r\n\t\t\t\t\t\t\tremoved = listeners.splice(j, 1);\r\n\t\t\t\t\t\t\t// set the old action to a no-op, because it is possible\r\n\t\t\t\t\t\t\t// that the listener is being iterated over as part of a dispatch\r\n\t\t\t\t\t\t\tremoved[0].action = L.Util.falseFn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (context && typeIndex && (listeners.length === 0)) {\r\n\t\t\t\t\t\tdelete typeIndex[contextId];\r\n\t\t\t\t\t\tevents[indexLenKey]--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclearAllEventListeners: function () {\r\n\t\tdelete this[eventsKey];\r\n\t\treturn this;\r\n\t},\r\n\r\n\tfireEvent: function (type, data) { // (String[, Object])\r\n\t\tif (!this.hasEventListeners(type)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar event = L.Util.extend({}, data, { type: type, target: this });\r\n\r\n\t\tvar events = this[eventsKey],\r\n\t\t listeners, i, len, typeIndex, contextId;\r\n\r\n\t\tif (events[type]) {\r\n\t\t\t// make sure adding/removing listeners inside other listeners won't cause infinite loop\r\n\t\t\tlisteners = events[type].slice();\r\n\r\n\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\tlisteners[i].action.call(listeners[i].context, event);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// fire event for the context-indexed listeners as well\r\n\t\ttypeIndex = events[type + '_idx'];\r\n\r\n\t\tfor (contextId in typeIndex) {\r\n\t\t\tlisteners = typeIndex[contextId].slice();\r\n\r\n\t\t\tif (listeners) {\r\n\t\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tlisteners[i].action.call(listeners[i].context, event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\taddOneTimeEventListener: function (types, fn, context) {\r\n\r\n\t\tif (L.Util.invokeEach(types, this.addOneTimeEventListener, this, fn, context)) { return this; }\r\n\r\n\t\tvar handler = L.bind(function () {\r\n\t\t\tthis\r\n\t\t\t .removeEventListener(types, fn, context)\r\n\t\t\t .removeEventListener(types, handler, context);\r\n\t\t}, this);\r\n\r\n\t\treturn this\r\n\t\t .addEventListener(types, fn, context)\r\n\t\t .addEventListener(types, handler, context);\r\n\t}\r\n};\r\n\r\nL.Mixin.Events.on = L.Mixin.Events.addEventListener;\r\nL.Mixin.Events.off = L.Mixin.Events.removeEventListener;\r\nL.Mixin.Events.once = L.Mixin.Events.addOneTimeEventListener;\r\nL.Mixin.Events.fire = L.Mixin.Events.fireEvent;\r\n\n\n/*\r\n * L.Browser handles different browser and feature detections for internal Leaflet use.\r\n */\r\n\r\n(function () {\r\n\r\n\tvar ie = 'ActiveXObject' in window,\r\n\t\tielt9 = ie && !document.addEventListener,\r\n\r\n\t // terrible browser detection to work around Safari / iOS / Android browser bugs\r\n\t ua = navigator.userAgent.toLowerCase(),\r\n\t webkit = ua.indexOf('webkit') !== -1,\r\n\t chrome = ua.indexOf('chrome') !== -1,\r\n\t phantomjs = ua.indexOf('phantom') !== -1,\r\n\t android = ua.indexOf('android') !== -1,\r\n\t android23 = ua.search('android [23]') !== -1,\r\n\t\tgecko = ua.indexOf('gecko') !== -1,\r\n\r\n\t mobile = typeof orientation !== undefined + '',\r\n\t msPointer = !window.PointerEvent && window.MSPointerEvent,\r\n\t\tpointer = (window.PointerEvent && window.navigator.pointerEnabled) ||\r\n\t\t\t\t msPointer,\r\n\t retina = ('devicePixelRatio' in window && window.devicePixelRatio > 1) ||\r\n\t ('matchMedia' in window && window.matchMedia('(min-resolution:144dpi)') &&\r\n\t window.matchMedia('(min-resolution:144dpi)').matches),\r\n\r\n\t doc = document.documentElement,\r\n\t ie3d = ie && ('transition' in doc.style),\r\n\t webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23,\r\n\t gecko3d = 'MozPerspective' in doc.style,\r\n\t opera3d = 'OTransition' in doc.style,\r\n\t any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d || opera3d) && !phantomjs;\r\n\r\n\tvar touch = !window.L_NO_TOUCH && !phantomjs && (pointer || 'ontouchstart' in window ||\r\n\t\t(window.DocumentTouch && document instanceof window.DocumentTouch));\r\n\r\n\tL.Browser = {\r\n\t\tie: ie,\r\n\t\tielt9: ielt9,\r\n\t\twebkit: webkit,\r\n\t\tgecko: gecko && !webkit && !window.opera && !ie,\r\n\r\n\t\tandroid: android,\r\n\t\tandroid23: android23,\r\n\r\n\t\tchrome: chrome,\r\n\r\n\t\tie3d: ie3d,\r\n\t\twebkit3d: webkit3d,\r\n\t\tgecko3d: gecko3d,\r\n\t\topera3d: opera3d,\r\n\t\tany3d: any3d,\r\n\r\n\t\tmobile: mobile,\r\n\t\tmobileWebkit: mobile && webkit,\r\n\t\tmobileWebkit3d: mobile && webkit3d,\r\n\t\tmobileOpera: mobile && window.opera,\r\n\r\n\t\ttouch: touch,\r\n\t\tmsPointer: msPointer,\r\n\t\tpointer: pointer,\r\n\r\n\t\tretina: retina\r\n\t};\r\n\r\n}());\r\n\n\n/*\r\n * L.Point represents a point with x and y coordinates.\r\n */\r\n\r\nL.Point = function (/*Number*/ x, /*Number*/ y, /*Boolean*/ round) {\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\tthis.y = (round ? Math.round(y) : y);\r\n};\r\n\r\nL.Point.prototype = {\r\n\r\n\tclone: function () {\r\n\t\treturn new L.Point(this.x, this.y);\r\n\t},\r\n\r\n\t// non-destructive, returns a new point\r\n\tadd: function (point) {\r\n\t\treturn this.clone()._add(L.point(point));\r\n\t},\r\n\r\n\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t_add: function (point) {\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsubtract: function (point) {\r\n\t\treturn this.clone()._subtract(L.point(point));\r\n\t},\r\n\r\n\t_subtract: function (point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdivideBy: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\tmultiplyBy: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tfloor: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdistanceTo: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t y = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t},\r\n\r\n\tequals: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t point.y === this.y;\r\n\t},\r\n\r\n\tcontains: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t Math.abs(point.y) <= Math.abs(this.y);\r\n\t},\r\n\r\n\ttoString: function () {\r\n\t\treturn 'Point(' +\r\n\t\t L.Util.formatNum(this.x) + ', ' +\r\n\t\t L.Util.formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\nL.point = function (x, y, round) {\r\n\tif (x instanceof L.Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (L.Util.isArray(x)) {\r\n\t\treturn new L.Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\treturn new L.Point(x, y, round);\r\n};\r\n\n\n/*\r\n * L.Bounds represents a rectangular area on the screen in pixel coordinates.\r\n */\r\n\r\nL.Bounds = function (a, b) { //(Point, Point) or Point[]\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n};\r\n\r\nL.Bounds.prototype = {\r\n\t// extend the bounds to contain the given point\r\n\textend: function (point) { // (Point)\r\n\t\tpoint = L.point(point);\r\n\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = point.clone();\r\n\t\t\tthis.max = point.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(point.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(point.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(point.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(point.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetCenter: function (round) { // (Boolean) -> Point\r\n\t\treturn new L.Point(\r\n\t\t (this.min.x + this.max.x) / 2,\r\n\t\t (this.min.y + this.max.y) / 2, round);\r\n\t},\r\n\r\n\tgetBottomLeft: function () { // -> Point\r\n\t\treturn new L.Point(this.min.x, this.max.y);\r\n\t},\r\n\r\n\tgetTopRight: function () { // -> Point\r\n\t\treturn new L.Point(this.max.x, this.min.y);\r\n\t},\r\n\r\n\tgetSize: function () {\r\n\t\treturn this.max.subtract(this.min);\r\n\t},\r\n\r\n\tcontains: function (obj) { // (Bounds) or (Point) -> Boolean\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof L.Point) {\r\n\t\t\tobj = L.point(obj);\r\n\t\t} else {\r\n\t\t\tobj = L.bounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof L.Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t (max.x <= this.max.x) &&\r\n\t\t (min.y >= this.min.y) &&\r\n\t\t (max.y <= this.max.y);\r\n\t},\r\n\r\n\tintersects: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = L.bounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t},\r\n\r\n\tisValid: function () {\r\n\t\treturn !!(this.min && this.max);\r\n\t}\r\n};\r\n\r\nL.bounds = function (a, b) { // (Bounds) or (Point, Point) or (Point[])\r\n\tif (!a || a instanceof L.Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new L.Bounds(a, b);\r\n};\r\n\n\n/*\r\n * L.Transformation is an utility class to perform simple point transformations through a 2d-matrix.\r\n */\r\n\r\nL.Transformation = function (a, b, c, d) {\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n};\r\n\r\nL.Transformation.prototype = {\r\n\ttransform: function (point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t},\r\n\r\n\t// destructive transform (faster)\r\n\t_transform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t},\r\n\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new L.Point(\r\n\t\t (point.x / scale - this._b) / this._a,\r\n\t\t (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n\n\n/*\r\n * L.DomUtil contains various utility functions for working with DOM.\r\n */\r\n\r\nL.DomUtil = {\r\n\tget: function (id) {\r\n\t\treturn (typeof id === 'string' ? document.getElementById(id) : id);\r\n\t},\r\n\r\n\tgetStyle: function (el, style) {\r\n\r\n\t\tvar value = el.style[style];\r\n\r\n\t\tif (!value && el.currentStyle) {\r\n\t\t\tvalue = el.currentStyle[style];\r\n\t\t}\r\n\r\n\t\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\t\tvalue = css ? css[style] : null;\r\n\t\t}\r\n\r\n\t\treturn value === 'auto' ? null : value;\r\n\t},\r\n\r\n\tgetViewportOffset: function (element) {\r\n\r\n\t\tvar top = 0,\r\n\t\t left = 0,\r\n\t\t el = element,\r\n\t\t docBody = document.body,\r\n\t\t docEl = document.documentElement,\r\n\t\t pos;\r\n\r\n\t\tdo {\r\n\t\t\ttop += el.offsetTop || 0;\r\n\t\t\tleft += el.offsetLeft || 0;\r\n\r\n\t\t\t//add borders\r\n\t\t\ttop += parseInt(L.DomUtil.getStyle(el, 'borderTopWidth'), 10) || 0;\r\n\t\t\tleft += parseInt(L.DomUtil.getStyle(el, 'borderLeftWidth'), 10) || 0;\r\n\r\n\t\t\tpos = L.DomUtil.getStyle(el, 'position');\r\n\r\n\t\t\tif (el.offsetParent === docBody && pos === 'absolute') { break; }\r\n\r\n\t\t\tif (pos === 'fixed') {\r\n\t\t\t\ttop += docBody.scrollTop || docEl.scrollTop || 0;\r\n\t\t\t\tleft += docBody.scrollLeft || docEl.scrollLeft || 0;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (pos === 'relative' && !el.offsetLeft) {\r\n\t\t\t\tvar width = L.DomUtil.getStyle(el, 'width'),\r\n\t\t\t\t maxWidth = L.DomUtil.getStyle(el, 'max-width'),\r\n\t\t\t\t r = el.getBoundingClientRect();\r\n\r\n\t\t\t\tif (width !== 'none' || maxWidth !== 'none') {\r\n\t\t\t\t\tleft += r.left + el.clientLeft;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//calculate full y offset since we're breaking out of the loop\r\n\t\t\t\ttop += r.top + (docBody.scrollTop || docEl.scrollTop || 0);\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tel = el.offsetParent;\r\n\r\n\t\t} while (el);\r\n\r\n\t\tel = element;\r\n\r\n\t\tdo {\r\n\t\t\tif (el === docBody) { break; }\r\n\r\n\t\t\ttop -= el.scrollTop || 0;\r\n\t\t\tleft -= el.scrollLeft || 0;\r\n\r\n\t\t\tel = el.parentNode;\r\n\t\t} while (el);\r\n\r\n\t\treturn new L.Point(left, top);\r\n\t},\r\n\r\n\tdocumentIsLtr: function () {\r\n\t\tif (!L.DomUtil._docIsLtrCached) {\r\n\t\t\tL.DomUtil._docIsLtrCached = true;\r\n\t\t\tL.DomUtil._docIsLtr = L.DomUtil.getStyle(document.body, 'direction') === 'ltr';\r\n\t\t}\r\n\t\treturn L.DomUtil._docIsLtr;\r\n\t},\r\n\r\n\tcreate: function (tagName, className, container) {\r\n\r\n\t\tvar el = document.createElement(tagName);\r\n\t\tel.className = className;\r\n\r\n\t\tif (container) {\r\n\t\t\tcontainer.appendChild(el);\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t},\r\n\r\n\thasClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\treturn el.classList.contains(name);\r\n\t\t}\r\n\t\tvar className = L.DomUtil._getClass(el);\r\n\t\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n\t},\r\n\r\n\taddClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\tvar classes = L.Util.splitWords(name);\r\n\t\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\t\tel.classList.add(classes[i]);\r\n\t\t\t}\r\n\t\t} else if (!L.DomUtil.hasClass(el, name)) {\r\n\t\t\tvar className = L.DomUtil._getClass(el);\r\n\t\t\tL.DomUtil._setClass(el, (className ? className + ' ' : '') + name);\r\n\t\t}\r\n\t},\r\n\r\n\tremoveClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\tel.classList.remove(name);\r\n\t\t} else {\r\n\t\t\tL.DomUtil._setClass(el, L.Util.trim((' ' + L.DomUtil._getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t\t}\r\n\t},\r\n\r\n\t_setClass: function (el, name) {\r\n\t\tif (el.className.baseVal === undefined) {\r\n\t\t\tel.className = name;\r\n\t\t} else {\r\n\t\t\t// in case of SVG element\r\n\t\t\tel.className.baseVal = name;\r\n\t\t}\r\n\t},\r\n\r\n\t_getClass: function (el) {\r\n\t\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n\t},\r\n\r\n\tsetOpacity: function (el, value) {\r\n\r\n\t\tif ('opacity' in el.style) {\r\n\t\t\tel.style.opacity = value;\r\n\r\n\t\t} else if ('filter' in el.style) {\r\n\r\n\t\t\tvar filter = false,\r\n\t\t\t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t\t\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\t\t\ttry {\r\n\t\t\t\tfilter = el.filters.item(filterName);\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t\t\t// it isn't needed and breaks transparent pngs.\r\n\t\t\t\tif (value === 1) { return; }\r\n\t\t\t}\r\n\r\n\t\t\tvalue = Math.round(value * 100);\r\n\r\n\t\t\tif (filter) {\r\n\t\t\t\tfilter.Enabled = (value !== 100);\r\n\t\t\t\tfilter.Opacity = value;\r\n\t\t\t} else {\r\n\t\t\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\ttestProp: function (props) {\r\n\r\n\t\tvar style = document.documentElement.style;\r\n\r\n\t\tfor (var i = 0; i < props.length; i++) {\r\n\t\t\tif (props[i] in style) {\r\n\t\t\t\treturn props[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetTranslateString: function (point) {\r\n\t\t// on WebKit browsers (Chrome/Safari/iOS Safari/Android) using translate3d instead of translate\r\n\t\t// makes animation smoother as it ensures HW accel is used. Firefox 13 doesn't care\r\n\t\t// (same speed either way), Opera 12 doesn't support translate3d\r\n\r\n\t\tvar is3d = L.Browser.webkit3d,\r\n\t\t open = 'translate' + (is3d ? '3d' : '') + '(',\r\n\t\t close = (is3d ? ',0' : '') + ')';\r\n\r\n\t\treturn open + point.x + 'px,' + point.y + 'px' + close;\r\n\t},\r\n\r\n\tgetScaleString: function (scale, origin) {\r\n\r\n\t\tvar preTranslateStr = L.DomUtil.getTranslateString(origin.add(origin.multiplyBy(-1 * scale))),\r\n\t\t scaleStr = ' scale(' + scale + ') ';\r\n\r\n\t\treturn preTranslateStr + scaleStr;\r\n\t},\r\n\r\n\tsetPosition: function (el, point, disable3D) { // (HTMLElement, Point[, Boolean])\r\n\r\n\t\t// jshint camelcase: false\r\n\t\tel._leaflet_pos = point;\r\n\r\n\t\tif (!disable3D && L.Browser.any3d) {\r\n\t\t\tel.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString(point);\r\n\t\t} else {\r\n\t\t\tel.style.left = point.x + 'px';\r\n\t\t\tel.style.top = point.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\tgetPosition: function (el) {\r\n\t\t// this method is only used for elements previously positioned using setPosition,\r\n\t\t// so it's safe to cache the position for performance\r\n\r\n\t\t// jshint camelcase: false\r\n\t\treturn el._leaflet_pos;\r\n\t}\r\n};\r\n\r\n\r\n// prefix style property names\r\n\r\nL.DomUtil.TRANSFORM = L.DomUtil.testProp(\r\n ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\nL.DomUtil.TRANSITION = L.DomUtil.testProp(\r\n ['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\nL.DomUtil.TRANSITION_END =\r\n L.DomUtil.TRANSITION === 'webkitTransition' || L.DomUtil.TRANSITION === 'OTransition' ?\r\n L.DomUtil.TRANSITION + 'End' : 'transitionend';\r\n\r\n(function () {\r\n if ('onselectstart' in document) {\r\n L.extend(L.DomUtil, {\r\n disableTextSelection: function () {\r\n L.DomEvent.on(window, 'selectstart', L.DomEvent.preventDefault);\r\n },\r\n\r\n enableTextSelection: function () {\r\n L.DomEvent.off(window, 'selectstart', L.DomEvent.preventDefault);\r\n }\r\n });\r\n } else {\r\n var userSelectProperty = L.DomUtil.testProp(\r\n ['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n L.extend(L.DomUtil, {\r\n disableTextSelection: function () {\r\n if (userSelectProperty) {\r\n var style = document.documentElement.style;\r\n this._userSelect = style[userSelectProperty];\r\n style[userSelectProperty] = 'none';\r\n }\r\n },\r\n\r\n enableTextSelection: function () {\r\n if (userSelectProperty) {\r\n document.documentElement.style[userSelectProperty] = this._userSelect;\r\n delete this._userSelect;\r\n }\r\n }\r\n });\r\n }\r\n\r\n\tL.extend(L.DomUtil, {\r\n\t\tdisableImageDrag: function () {\r\n\t\t\tL.DomEvent.on(window, 'dragstart', L.DomEvent.preventDefault);\r\n\t\t},\r\n\r\n\t\tenableImageDrag: function () {\r\n\t\t\tL.DomEvent.off(window, 'dragstart', L.DomEvent.preventDefault);\r\n\t\t}\r\n\t});\r\n})();\r\n\n\n/*\r\n * L.LatLng represents a geographical point with latitude and longitude coordinates.\r\n */\r\n\r\nL.LatLng = function (lat, lng, alt) { // (Number, Number, Number)\r\n\tlat = parseFloat(lat);\r\n\tlng = parseFloat(lng);\r\n\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\tthis.lat = lat;\r\n\tthis.lng = lng;\r\n\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = parseFloat(alt);\r\n\t}\r\n};\r\n\r\nL.extend(L.LatLng, {\r\n\tDEG_TO_RAD: Math.PI / 180,\r\n\tRAD_TO_DEG: 180 / Math.PI,\r\n\tMAX_MARGIN: 1.0E-9 // max margin of error for the \"equals\" check\r\n});\r\n\r\nL.LatLng.prototype = {\r\n\tequals: function (obj) { // (LatLng) -> Boolean\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = L.latLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t Math.abs(this.lat - obj.lat),\r\n\t\t Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= L.LatLng.MAX_MARGIN;\r\n\t},\r\n\r\n\ttoString: function (precision) { // (Number) -> String\r\n\t\treturn 'LatLng(' +\r\n\t\t L.Util.formatNum(this.lat, precision) + ', ' +\r\n\t\t L.Util.formatNum(this.lng, precision) + ')';\r\n\t},\r\n\r\n\t// Haversine distance formula, see http://en.wikipedia.org/wiki/Haversine_formula\r\n\t// TODO move to projection code, LatLng shouldn't know about Earth\r\n\tdistanceTo: function (other) { // (LatLng) -> Number\r\n\t\tother = L.latLng(other);\r\n\r\n\t\tvar R = 6378137, // earth radius in meters\r\n\t\t d2r = L.LatLng.DEG_TO_RAD,\r\n\t\t dLat = (other.lat - this.lat) * d2r,\r\n\t\t dLon = (other.lng - this.lng) * d2r,\r\n\t\t lat1 = this.lat * d2r,\r\n\t\t lat2 = other.lat * d2r,\r\n\t\t sin1 = Math.sin(dLat / 2),\r\n\t\t sin2 = Math.sin(dLon / 2);\r\n\r\n\t\tvar a = sin1 * sin1 + sin2 * sin2 * Math.cos(lat1) * Math.cos(lat2);\r\n\r\n\t\treturn R * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n\t},\r\n\r\n\twrap: function (a, b) { // (Number, Number) -> LatLng\r\n\t\tvar lng = this.lng;\r\n\r\n\t\ta = a || -180;\r\n\t\tb = b || 180;\r\n\r\n\t\tlng = (lng + b) % (b - a) + (lng < a || lng === b ? b : a);\r\n\r\n\t\treturn new L.LatLng(this.lat, lng);\r\n\t}\r\n};\r\n\r\nL.latLng = function (a, b) { // (LatLng) or ([Number, Number]) or (Number, Number)\r\n\tif (a instanceof L.LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (L.Util.isArray(a)) {\r\n\t\tif (typeof a[0] === 'number' || typeof a[0] === 'string') {\r\n\t\t\treturn new L.LatLng(a[0], a[1], a[2]);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new L.LatLng(a.lat, 'lng' in a ? a.lng : a.lon);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new L.LatLng(a, b);\r\n};\r\n\r\n\n\n/*\r\n * L.LatLngBounds represents a rectangular area on the map in geographical coordinates.\r\n */\r\n\r\nL.LatLngBounds = function (southWest, northEast) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!southWest) { return; }\r\n\r\n\tvar latlngs = northEast ? [southWest, northEast] : southWest;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n};\r\n\r\nL.LatLngBounds.prototype = {\r\n\t// extend the bounds to contain the given point or bounds\r\n\textend: function (obj) { // (LatLng) or (LatLngBounds)\r\n\t\tif (!obj) { return this; }\r\n\r\n\t\tvar latLng = L.latLng(obj);\r\n\t\tif (latLng !== null) {\r\n\t\t\tobj = latLng;\r\n\t\t} else {\r\n\t\t\tobj = L.latLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof L.LatLng) {\r\n\t\t\tif (!this._southWest && !this._northEast) {\r\n\t\t\t\tthis._southWest = new L.LatLng(obj.lat, obj.lng);\r\n\t\t\t\tthis._northEast = new L.LatLng(obj.lat, obj.lng);\r\n\t\t\t} else {\r\n\t\t\t\tthis._southWest.lat = Math.min(obj.lat, this._southWest.lat);\r\n\t\t\t\tthis._southWest.lng = Math.min(obj.lng, this._southWest.lng);\r\n\r\n\t\t\t\tthis._northEast.lat = Math.max(obj.lat, this._northEast.lat);\r\n\t\t\t\tthis._northEast.lng = Math.max(obj.lng, this._northEast.lng);\r\n\t\t\t}\r\n\t\t} else if (obj instanceof L.LatLngBounds) {\r\n\t\t\tthis.extend(obj._southWest);\r\n\t\t\tthis.extend(obj._northEast);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// extend the bounds by a percentage\r\n\tpad: function (bufferRatio) { // (Number) -> LatLngBounds\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new L.LatLngBounds(\r\n\t\t new L.LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t new L.LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t},\r\n\r\n\tgetCenter: function () { // -> LatLng\r\n\t\treturn new L.LatLng(\r\n\t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t (this._southWest.lng + this._northEast.lng) / 2);\r\n\t},\r\n\r\n\tgetSouthWest: function () {\r\n\t\treturn this._southWest;\r\n\t},\r\n\r\n\tgetNorthEast: function () {\r\n\t\treturn this._northEast;\r\n\t},\r\n\r\n\tgetNorthWest: function () {\r\n\t\treturn new L.LatLng(this.getNorth(), this.getWest());\r\n\t},\r\n\r\n\tgetSouthEast: function () {\r\n\t\treturn new L.LatLng(this.getSouth(), this.getEast());\r\n\t},\r\n\r\n\tgetWest: function () {\r\n\t\treturn this._southWest.lng;\r\n\t},\r\n\r\n\tgetSouth: function () {\r\n\t\treturn this._southWest.lat;\r\n\t},\r\n\r\n\tgetEast: function () {\r\n\t\treturn this._northEast.lng;\r\n\t},\r\n\r\n\tgetNorth: function () {\r\n\t\treturn this._northEast.lat;\r\n\t},\r\n\r\n\tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof L.LatLng) {\r\n\t\t\tobj = L.latLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = L.latLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof L.LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t},\r\n\r\n\tintersects: function (bounds) { // (LatLngBounds)\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t},\r\n\r\n\ttoBBoxString: function () {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t},\r\n\r\n\tequals: function (bounds) { // (LatLngBounds)\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest()) &&\r\n\t\t this._northEast.equals(bounds.getNorthEast());\r\n\t},\r\n\r\n\tisValid: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n//TODO International date line?\r\n\r\nL.latLngBounds = function (a, b) { // (LatLngBounds) or (LatLng, LatLng)\r\n\tif (!a || a instanceof L.LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new L.LatLngBounds(a, b);\r\n};\r\n\n\n/*\r\n * L.Projection contains various geographical projections used by CRS classes.\r\n */\r\n\r\nL.Projection = {};\r\n\n\n/*\r\n * Spherical Mercator is the most popular map projection, used by EPSG:3857 CRS used by default.\r\n */\r\n\r\nL.Projection.SphericalMercator = {\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) { // (LatLng) -> Point\r\n\t\tvar d = L.LatLng.DEG_TO_RAD,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t x = latlng.lng * d,\r\n\t\t y = lat * d;\r\n\r\n\t\ty = Math.log(Math.tan((Math.PI / 4) + (y / 2)));\r\n\r\n\t\treturn new L.Point(x, y);\r\n\t},\r\n\r\n\tunproject: function (point) { // (Point, Boolean) -> LatLng\r\n\t\tvar d = L.LatLng.RAD_TO_DEG,\r\n\t\t lng = point.x * d,\r\n\t\t lat = (2 * Math.atan(Math.exp(point.y)) - (Math.PI / 2)) * d;\r\n\r\n\t\treturn new L.LatLng(lat, lng);\r\n\t}\r\n};\r\n\n\n/*\r\n * Simple equirectangular (Plate Carree) projection, used by CRS like EPSG:4326 and Simple.\r\n */\r\n\r\nL.Projection.LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new L.Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\treturn new L.LatLng(point.y, point.x);\r\n\t}\r\n};\r\n\n\n/*\r\n * L.CRS is a base object for all defined CRS (Coordinate Reference Systems) in Leaflet.\r\n */\r\n\r\nL.CRS = {\r\n\tlatLngToPoint: function (latlng, zoom) { // (LatLng, Number) -> Point\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t scale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t},\r\n\r\n\tpointToLatLng: function (point, zoom) { // (Point, Number[, Boolean]) -> LatLng\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t},\r\n\r\n\tproject: function (latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t},\r\n\r\n\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(2, zoom);\r\n\t},\r\n\r\n\tgetSize: function (zoom) {\r\n\t\tvar s = this.scale(zoom);\r\n\t\treturn L.point(s, s);\r\n\t}\r\n};\r\n\n\n/*\n * A simple CRS that can be used for flat non-Earth maps like panoramas or game maps.\n */\n\nL.CRS.Simple = L.extend({}, L.CRS, {\n\tprojection: L.Projection.LonLat,\n\ttransformation: new L.Transformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t}\n});\n\n\n/*\r\n * L.CRS.EPSG3857 (Spherical Mercator) is the most common CRS for web mapping\r\n * and is used by Leaflet by default.\r\n */\r\n\r\nL.CRS.EPSG3857 = L.extend({}, L.CRS, {\r\n\tcode: 'EPSG:3857',\r\n\r\n\tprojection: L.Projection.SphericalMercator,\r\n\ttransformation: new L.Transformation(0.5 / Math.PI, 0.5, -0.5 / Math.PI, 0.5),\r\n\r\n\tproject: function (latlng) { // (LatLng) -> Point\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t earthRadius = 6378137;\r\n\t\treturn projectedPoint.multiplyBy(earthRadius);\r\n\t}\r\n});\r\n\r\nL.CRS.EPSG900913 = L.extend({}, L.CRS.EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\r\n\n\n/*\r\n * L.CRS.EPSG4326 is a CRS popular among advanced GIS specialists.\r\n */\r\n\r\nL.CRS.EPSG4326 = L.extend({}, L.CRS, {\r\n\tcode: 'EPSG:4326',\r\n\r\n\tprojection: L.Projection.LonLat,\r\n\ttransformation: new L.Transformation(1 / 360, 0.5, -1 / 360, 0.5)\r\n});\r\n\n\n/*\r\n * L.Map is the central class of the API - it is used to create a map.\r\n */\r\n\r\nL.Map = L.Class.extend({\r\n\r\n\tincludes: L.Mixin.Events,\r\n\r\n\toptions: {\r\n\t\tcrs: L.CRS.EPSG3857,\r\n\r\n\t\t/*\r\n\t\tcenter: LatLng,\r\n\t\tzoom: Number,\r\n\t\tlayers: Array,\r\n\t\t*/\r\n\r\n\t\tfadeAnimation: L.DomUtil.TRANSITION && !L.Browser.android23,\r\n\t\ttrackResize: true,\r\n\t\tmarkerZoomAnimation: L.DomUtil.TRANSITION && L.Browser.any3d\r\n\t},\r\n\r\n\tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = L.setOptions(this, options);\r\n\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = L.bind(this._onResize, this);\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(L.latLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis._handlers = [];\r\n\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._tileLayersNum = 0;\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\tthis._addLayers(options.layers);\r\n\t},\r\n\r\n\r\n\t// public methods that modify map state\r\n\r\n\t// replaced by animation-powered implementation in Map.PanAnimation.js\r\n\tsetView: function (center, zoom) {\r\n\t\tzoom = zoom === undefined ? this.getZoom() : zoom;\r\n\t\tthis._resetView(L.latLng(center), this._limitZoom(zoom));\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetZoom: function (zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = this._limitZoom(zoom);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t},\r\n\r\n\tzoomIn: function (delta, options) {\r\n\t\treturn this.setZoom(this._zoom + (delta || 1), options);\r\n\t},\r\n\r\n\tzoomOut: function (delta, options) {\r\n\t\treturn this.setZoom(this._zoom - (delta || 1), options);\r\n\t},\r\n\r\n\tsetZoomAround: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t containerPoint = latlng instanceof L.Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t},\r\n\r\n\tfitBounds: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : L.latLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = L.point(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = L.point(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (options.maxZoom) ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn this.setView(center, zoom, options);\r\n\t},\r\n\r\n\tfitWorld: function (options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t},\r\n\r\n\tpanTo: function (center, options) { // (LatLng)\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t},\r\n\r\n\tpanBy: function (offset) { // (Point)\r\n\t\t// replaced with animated panBy in Map.PanAnimation.js\r\n\t\tthis.fire('movestart');\r\n\r\n\t\tthis._rawPanBy(L.point(offset));\r\n\r\n\t\tthis.fire('move');\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\tsetMaxBounds: function (bounds) {\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (!bounds) {\r\n\t\t\treturn this.off('moveend', this._panInsideMaxBounds, this);\r\n\t\t}\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds, this);\r\n\t},\r\n\r\n\tpanInsideBounds: function (bounds, options) {\r\n\t\tvar center = this.getCenter(),\r\n\t\t\tnewCenter = this._limitCenter(center, this._zoom, bounds);\r\n\r\n\t\tif (center.equals(newCenter)) { return this; }\r\n\r\n\t\treturn this.panTo(newCenter, options);\r\n\t},\r\n\r\n\taddLayer: function (layer) {\r\n\t\t// TODO method is too big, refactor\r\n\r\n\t\tvar id = L.stamp(layer);\r\n\r\n\t\tif (this._layers[id]) { return this; }\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\t// TODO getMaxZoom, getMinZoom in ILayer (instead of options)\r\n\t\tif (layer.options && (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom))) {\r\n\t\t\tthis._zoomBoundLayers[id] = layer;\r\n\t\t\tthis._updateZoomLevels();\r\n\t\t}\r\n\r\n\t\t// TODO looks ugly, refactor!!!\r\n\t\tif (this.options.zoomAnimation && L.TileLayer && (layer instanceof L.TileLayer)) {\r\n\t\t\tthis._tileLayersNum++;\r\n\t\t\tthis._tileLayersToLoad++;\r\n\t\t\tlayer.on('load', this._onTileLayerLoad, this);\r\n\t\t}\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._layerAdd(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = L.stamp(layer);\r\n\r\n\t\tif (!this._layers[id]) { return this; }\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tlayer.onRemove(this);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis.fire('layerremove', {layer: layer});\r\n\t\t}\r\n\r\n\t\tif (this._zoomBoundLayers[id]) {\r\n\t\t\tdelete this._zoomBoundLayers[id];\r\n\t\t\tthis._updateZoomLevels();\r\n\t\t}\r\n\r\n\t\t// TODO looks ugly, refactor\r\n\t\tif (this.options.zoomAnimation && L.TileLayer && (layer instanceof L.TileLayer)) {\r\n\t\t\tthis._tileLayersNum--;\r\n\t\t\tthis._tileLayersToLoad--;\r\n\t\t\tlayer.off('load', this._onTileLayerLoad, this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\thasLayer: function (layer) {\r\n\t\tif (!layer) { return false; }\r\n\r\n\t\treturn (L.stamp(layer) in this._layers);\r\n\t},\r\n\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tinvalidateSize: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = L.extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._initialCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t oldCenter = oldSize.divideBy(2).round(),\r\n\t\t newCenter = newSize.divideBy(2).round(),\r\n\t\t offset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize: oldSize,\r\n\t\t\tnewSize: newSize\r\n\t\t});\r\n\t},\r\n\r\n\t// TODO handler.addTo\r\n\taddHandler: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremove: function () {\r\n\t\tif (this._loaded) {\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tthis._initEvents('off');\r\n\r\n\t\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet;\r\n\t\t} catch (e) {\r\n\t\t\tthis._container._leaflet = undefined;\r\n\t\t}\r\n\r\n\t\tthis._clearPanes();\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\r\n\t// public methods for getting map state\r\n\r\n\tgetCenter: function () { // (Boolean) -> LatLng\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._initialCenter && !this._moved()) {\r\n\t\t\treturn this._initialCenter;\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\tgetZoom: function () {\r\n\t\treturn this._zoom;\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t ne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new L.LatLngBounds(sw, ne);\r\n\t},\r\n\r\n\tgetMinZoom: function () {\r\n\t\treturn this.options.minZoom === undefined ?\r\n\t\t\t(this._layersMinZoom === undefined ? 0 : this._layersMinZoom) :\r\n\t\t\tthis.options.minZoom;\r\n\t},\r\n\r\n\tgetMaxZoom: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\r\n\t},\r\n\r\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tvar zoom = this.getMinZoom() - (inside ? 1 : 0),\r\n\t\t maxZoom = this.getMaxZoom(),\r\n\t\t size = this.getSize(),\r\n\r\n\t\t nw = bounds.getNorthWest(),\r\n\t\t se = bounds.getSouthEast(),\r\n\r\n\t\t zoomNotFound = true,\r\n\t\t boundsSize;\r\n\r\n\t\tpadding = L.point(padding || [0, 0]);\r\n\r\n\t\tdo {\r\n\t\t\tzoom++;\r\n\t\t\tboundsSize = this.project(se, zoom).subtract(this.project(nw, zoom)).add(padding);\r\n\t\t\tzoomNotFound = !inside ? size.contains(boundsSize) : boundsSize.x < size.x || boundsSize.y < size.y;\r\n\r\n\t\t} while (zoomNotFound && zoom <= maxZoom);\r\n\r\n\t\tif (zoomNotFound && inside) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn inside ? zoom : zoom - 1;\r\n\t},\r\n\r\n\tgetSize: function () {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new L.Point(\r\n\t\t\t\tthis._container.clientWidth,\r\n\t\t\t\tthis._container.clientHeight);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t},\r\n\r\n\tgetPixelBounds: function () {\r\n\t\tvar topLeftPoint = this._getTopLeftPoint();\r\n\t\treturn new L.Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t},\r\n\r\n\tgetPixelOrigin: function () {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._initialTopLeftPoint;\r\n\t},\r\n\r\n\tgetPanes: function () {\r\n\t\treturn this._panes;\r\n\t},\r\n\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\r\n\t// TODO replace with universal implementation after refactoring projections\r\n\r\n\tgetZoomScale: function (toZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\treturn crs.scale(toZoom) / crs.scale(this._zoom);\r\n\t},\r\n\r\n\tgetScaleZoom: function (scale) {\r\n\t\treturn this._zoom + (Math.log(scale) / Math.LN2);\r\n\t},\r\n\r\n\r\n\t// conversion methods\r\n\r\n\tproject: function (latlng, zoom) { // (LatLng[, Number]) -> Point\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(L.latLng(latlng), zoom);\r\n\t},\r\n\r\n\tunproject: function (point, zoom) { // (Point[, Number]) -> LatLng\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(L.point(point), zoom);\r\n\t},\r\n\r\n\tlayerPointToLatLng: function (point) { // (Point)\r\n\t\tvar projectedPoint = L.point(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t},\r\n\r\n\tlatLngToLayerPoint: function (latlng) { // (LatLng)\r\n\t\tvar projectedPoint = this.project(L.latLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t},\r\n\r\n\tcontainerPointToLayerPoint: function (point) { // (Point)\r\n\t\treturn L.point(point).subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\tlayerPointToContainerPoint: function (point) { // (Point)\r\n\t\treturn L.point(point).add(this._getMapPanePos());\r\n\t},\r\n\r\n\tcontainerPointToLatLng: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(L.point(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t},\r\n\r\n\tlatLngToContainerPoint: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(L.latLng(latlng)));\r\n\t},\r\n\r\n\tmouseEventToContainerPoint: function (e) { // (MouseEvent)\r\n\t\treturn L.DomEvent.getMousePosition(e, this._container);\r\n\t},\r\n\r\n\tmouseEventToLayerPoint: function (e) { // (MouseEvent)\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar container = this._container = L.DomUtil.get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\tcontainer._leaflet = true;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tL.DomUtil.addClass(container, 'leaflet-container' +\r\n\t\t\t(L.Browser.touch ? ' leaflet-touch' : '') +\r\n\t\t\t(L.Browser.retina ? ' leaflet-retina' : '') +\r\n\t\t\t(L.Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(this.options.fadeAnimation ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = L.DomUtil.getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t},\r\n\r\n\t_initPanes: function () {\r\n\t\tvar panes = this._panes = {};\r\n\r\n\t\tthis._mapPane = panes.mapPane = this._createPane('leaflet-map-pane', this._container);\r\n\r\n\t\tthis._tilePane = panes.tilePane = this._createPane('leaflet-tile-pane', this._mapPane);\r\n\t\tpanes.objectsPane = this._createPane('leaflet-objects-pane', this._mapPane);\r\n\t\tpanes.shadowPane = this._createPane('leaflet-shadow-pane');\r\n\t\tpanes.overlayPane = this._createPane('leaflet-overlay-pane');\r\n\t\tpanes.markerPane = this._createPane('leaflet-marker-pane');\r\n\t\tpanes.popupPane = this._createPane('leaflet-popup-pane');\r\n\r\n\t\tvar zoomHide = ' leaflet-zoom-hide';\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\tL.DomUtil.addClass(panes.markerPane, zoomHide);\r\n\t\t\tL.DomUtil.addClass(panes.shadowPane, zoomHide);\r\n\t\t\tL.DomUtil.addClass(panes.popupPane, zoomHide);\r\n\t\t}\r\n\t},\r\n\r\n\t_createPane: function (className, container) {\r\n\t\treturn L.DomUtil.create('div', className, container || this._panes.objectsPane);\r\n\t},\r\n\r\n\t_clearPanes: function () {\r\n\t\tthis._container.removeChild(this._mapPane);\r\n\t},\r\n\r\n\t_addLayers: function (layers) {\r\n\t\tlayers = layers ? (L.Util.isArray(layers) ? layers : [layers]) : [];\r\n\r\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\r\n\t\t\tthis.addLayer(layers[i]);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t_resetView: function (center, zoom, preserveMapOffset, afterZoomAnim) {\r\n\r\n\t\tvar zoomChanged = (this._zoom !== zoom);\r\n\r\n\t\tif (!afterZoomAnim) {\r\n\t\t\tthis.fire('movestart');\r\n\r\n\t\t\tif (zoomChanged) {\r\n\t\t\t\tthis.fire('zoomstart');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._initialCenter = center;\r\n\r\n\t\tthis._initialTopLeftPoint = this._getNewTopLeftPoint(center);\r\n\r\n\t\tif (!preserveMapOffset) {\r\n\t\t\tL.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\r\n\t\t} else {\r\n\t\t\tthis._initialTopLeftPoint._add(this._getMapPanePos());\r\n\t\t}\r\n\r\n\t\tthis._tileLayersToLoad = this._tileLayersNum;\r\n\r\n\t\tvar loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\r\n\t\tthis.fire('viewreset', {hard: !preserveMapOffset});\r\n\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t\tthis.eachLayer(this._layerAdd, this);\r\n\t\t}\r\n\r\n\t\tthis.fire('move');\r\n\r\n\t\tif (zoomChanged || afterZoomAnim) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\tthis.fire('moveend', {hard: !preserveMapOffset});\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tL.DomUtil.setPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_updateZoomLevels: function () {\r\n\t\tvar i,\r\n\t\t\tminZoom = Infinity,\r\n\t\t\tmaxZoom = -Infinity,\r\n\t\t\toldZoomSpan = this._getZoomSpan();\r\n\r\n\t\tfor (i in this._zoomBoundLayers) {\r\n\t\t\tvar layer = this._zoomBoundLayers[i];\r\n\t\t\tif (!isNaN(layer.options.minZoom)) {\r\n\t\t\t\tminZoom = Math.min(minZoom, layer.options.minZoom);\r\n\t\t\t}\r\n\t\t\tif (!isNaN(layer.options.maxZoom)) {\r\n\t\t\t\tmaxZoom = Math.max(maxZoom, layer.options.maxZoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (i === undefined) { // we have no tilelayers\r\n\t\t\tthis._layersMaxZoom = this._layersMinZoom = undefined;\r\n\t\t} else {\r\n\t\t\tthis._layersMaxZoom = maxZoom;\r\n\t\t\tthis._layersMinZoom = minZoom;\r\n\t\t}\r\n\r\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\t\t}\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\r\n\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t},\r\n\r\n\t_checkIfLoaded: function () {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t},\r\n\r\n\t// map events\r\n\r\n\t_initEvents: function (onOff) {\r\n\t\tif (!L.DomEvent) { return; }\r\n\r\n\t\tonOff = onOff || 'on';\r\n\r\n\t\tL.DomEvent[onOff](this._container, 'click', this._onMouseClick, this);\r\n\r\n\t\tvar events = ['dblclick', 'mousedown', 'mouseup', 'mouseenter',\r\n\t\t 'mouseleave', 'mousemove', 'contextmenu'],\r\n\t\t i, len;\r\n\r\n\t\tfor (i = 0, len = events.length; i < len; i++) {\r\n\t\t\tL.DomEvent[onOff](this._container, events[i], this._fireMouseEvent, this);\r\n\t\t}\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tL.DomEvent[onOff](window, 'resize', this._onResize, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_onResize: function () {\r\n\t\tL.Util.cancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = L.Util.requestAnimFrame(\r\n\t\t function () { this.invalidateSize({debounceMoveend: true}); }, this, false, this._container);\r\n\t},\r\n\r\n\t_onMouseClick: function (e) {\r\n\t\tif (!this._loaded || (!e._simulated &&\r\n\t\t ((this.dragging && this.dragging.moved()) ||\r\n\t\t (this.boxZoom && this.boxZoom.moved()))) ||\r\n\t\t L.DomEvent._skipped(e)) { return; }\r\n\r\n\t\tthis.fire('preclick');\r\n\t\tthis._fireMouseEvent(e);\r\n\t},\r\n\r\n\t_fireMouseEvent: function (e) {\r\n\t\tif (!this._loaded || L.DomEvent._skipped(e)) { return; }\r\n\r\n\t\tvar type = e.type;\r\n\r\n\t\ttype = (type === 'mouseenter' ? 'mouseover' : (type === 'mouseleave' ? 'mouseout' : type));\r\n\r\n\t\tif (!this.hasEventListeners(type)) { return; }\r\n\r\n\t\tif (type === 'contextmenu') {\r\n\t\t\tL.DomEvent.preventDefault(e);\r\n\t\t}\r\n\r\n\t\tvar containerPoint = this.mouseEventToContainerPoint(e),\r\n\t\t layerPoint = this.containerPointToLayerPoint(containerPoint),\r\n\t\t latlng = this.layerPointToLatLng(layerPoint);\r\n\r\n\t\tthis.fire(type, {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tlayerPoint: layerPoint,\r\n\t\t\tcontainerPoint: containerPoint,\r\n\t\t\toriginalEvent: e\r\n\t\t});\r\n\t},\r\n\r\n\t_onTileLayerLoad: function () {\r\n\t\tthis._tileLayersToLoad--;\r\n\t\tif (this._tileLayersNum && !this._tileLayersToLoad) {\r\n\t\t\tthis.fire('tilelayersload');\r\n\t\t}\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].disable();\r\n\t\t}\r\n\t},\r\n\r\n\twhenReady: function (callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, this);\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_layerAdd: function (layer) {\r\n\t\tlayer.onAdd(this);\r\n\t\tthis.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos: function () {\r\n\t\treturn L.DomUtil.getPosition(this._mapPane);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function () {\r\n\t\treturn this.getPixelOrigin().subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t_getNewTopLeftPoint: function (center, zoom) {\r\n\t\tvar viewHalf = this.getSize()._divideBy(2);\r\n\t\t// TODO round on display, not calculation to increase precision?\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._round();\r\n\t},\r\n\r\n\t_latLngToNewLayerPoint: function (latlng, newZoom, newCenter) {\r\n\t\tvar topLeft = this._getNewTopLeftPoint(newCenter, newZoom).add(this._getMapPanePos());\r\n\t\treturn this.project(latlng, newZoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint: function () {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t},\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset: function (latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t viewBounds = new L.Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t},\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t newBounds = new L.Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t},\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar nwOffset = this.project(maxBounds.getNorthWest(), zoom).subtract(pxBounds.min),\r\n\t\t seOffset = this.project(maxBounds.getSouthEast(), zoom).subtract(pxBounds.max),\r\n\r\n\t\t dx = this._rebound(nwOffset.x, -seOffset.x),\r\n\t\t dy = this._rebound(nwOffset.y, -seOffset.y);\r\n\r\n\t\treturn new L.Point(dx, dy);\r\n\t},\r\n\r\n\t_rebound: function (left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t},\r\n\r\n\t_limitZoom: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom();\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t}\r\n});\r\n\r\nL.map = function (id, options) {\r\n\treturn new L.Map(id, options);\r\n};\r\n\n\n/*\r\n * Mercator projection that takes into account that the Earth is not a perfect sphere.\r\n * Less popular than spherical mercator; used by projections like EPSG:3395.\r\n */\r\n\r\nL.Projection.Mercator = {\r\n\tMAX_LATITUDE: 85.0840591556,\r\n\r\n\tR_MINOR: 6356752.314245179,\r\n\tR_MAJOR: 6378137,\r\n\r\n\tproject: function (latlng) { // (LatLng) -> Point\r\n\t\tvar d = L.LatLng.DEG_TO_RAD,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t r = this.R_MAJOR,\r\n\t\t r2 = this.R_MINOR,\r\n\t\t x = latlng.lng * d * r,\r\n\t\t y = lat * d,\r\n\t\t tmp = r2 / r,\r\n\t\t eccent = Math.sqrt(1.0 - tmp * tmp),\r\n\t\t con = eccent * Math.sin(y);\r\n\r\n\t\tcon = Math.pow((1 - con) / (1 + con), eccent * 0.5);\r\n\r\n\t\tvar ts = Math.tan(0.5 * ((Math.PI * 0.5) - y)) / con;\r\n\t\ty = -r * Math.log(ts);\r\n\r\n\t\treturn new L.Point(x, y);\r\n\t},\r\n\r\n\tunproject: function (point) { // (Point, Boolean) -> LatLng\r\n\t\tvar d = L.LatLng.RAD_TO_DEG,\r\n\t\t r = this.R_MAJOR,\r\n\t\t r2 = this.R_MINOR,\r\n\t\t lng = point.x * d / r,\r\n\t\t tmp = r2 / r,\r\n\t\t eccent = Math.sqrt(1 - (tmp * tmp)),\r\n\t\t ts = Math.exp(- point.y / r),\r\n\t\t phi = (Math.PI / 2) - 2 * Math.atan(ts),\r\n\t\t numIter = 15,\r\n\t\t tol = 1e-7,\r\n\t\t i = numIter,\r\n\t\t dphi = 0.1,\r\n\t\t con;\r\n\r\n\t\twhile ((Math.abs(dphi) > tol) && (--i > 0)) {\r\n\t\t\tcon = eccent * Math.sin(phi);\r\n\t\t\tdphi = (Math.PI / 2) - 2 * Math.atan(ts *\r\n\t\t\t Math.pow((1.0 - con) / (1.0 + con), 0.5 * eccent)) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new L.LatLng(phi * d, lng);\r\n\t}\r\n};\r\n\n\n\r\nL.CRS.EPSG3395 = L.extend({}, L.CRS, {\r\n\tcode: 'EPSG:3395',\r\n\r\n\tprojection: L.Projection.Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar m = L.Projection.Mercator,\r\n\t\t r = m.R_MAJOR,\r\n\t\t scale = 0.5 / (Math.PI * r);\r\n\r\n\t\treturn new L.Transformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\n\n/*\r\n * L.TileLayer is used for standard xyz-numbered tile layers.\r\n */\r\n\r\nL.TileLayer = L.Class.extend({\r\n\tincludes: L.Mixin.Events,\r\n\r\n\toptions: {\r\n\t\tminZoom: 0,\r\n\t\tmaxZoom: 18,\r\n\t\ttileSize: 256,\r\n\t\tsubdomains: 'abc',\r\n\t\terrorTileUrl: '',\r\n\t\tattribution: '',\r\n\t\tzoomOffset: 0,\r\n\t\topacity: 1,\r\n\t\t/*\r\n\t\tmaxNativeZoom: null,\r\n\t\tzIndex: null,\r\n\t\ttms: false,\r\n\t\tcontinuousWorld: false,\r\n\t\tnoWrap: false,\r\n\t\tzoomReverse: false,\r\n\t\tdetectRetina: false,\r\n\t\treuseTiles: false,\r\n\t\tbounds: false,\r\n\t\t*/\r\n\t\tunloadInvisibleTiles: L.Browser.mobile,\r\n\t\tupdateWhenIdle: L.Browser.mobile\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\t\toptions = L.setOptions(this, options);\r\n\r\n\t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n\t\tif (options.detectRetina && L.Browser.retina && options.maxZoom > 0) {\r\n\r\n\t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\t\t\toptions.zoomOffset++;\r\n\r\n\t\t\tif (options.minZoom > 0) {\r\n\t\t\t\toptions.minZoom--;\r\n\t\t\t}\r\n\t\t\tthis.options.maxZoom--;\r\n\t\t}\r\n\r\n\t\tif (options.bounds) {\r\n\t\t\toptions.bounds = L.latLngBounds(options.bounds);\r\n\t\t}\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar subdomains = this.options.subdomains;\r\n\r\n\t\tif (typeof subdomains === 'string') {\r\n\t\t\tthis.options.subdomains = subdomains.split('');\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\t\tthis._animated = map._zoomAnimated;\r\n\r\n\t\t// create a container div for tiles\r\n\t\tthis._initContainer();\r\n\r\n\t\t// set up events\r\n\t\tmap.on({\r\n\t\t\t'viewreset': this._reset,\r\n\t\t\t'moveend': this._update\r\n\t\t}, this);\r\n\r\n\t\tif (this._animated) {\r\n\t\t\tmap.on({\r\n\t\t\t\t'zoomanim': this._animateZoom,\r\n\t\t\t\t'zoomend': this._endZoomAnim\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tif (!this.options.updateWhenIdle) {\r\n\t\t\tthis._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this);\r\n\t\t\tmap.on('move', this._limitedUpdate, this);\r\n\t\t}\r\n\r\n\t\tthis._reset();\r\n\t\tthis._update();\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tthis._container.parentNode.removeChild(this._container);\r\n\r\n\t\tmap.off({\r\n\t\t\t'viewreset': this._reset,\r\n\t\t\t'moveend': this._update\r\n\t\t}, this);\r\n\r\n\t\tif (this._animated) {\r\n\t\t\tmap.off({\r\n\t\t\t\t'zoomanim': this._animateZoom,\r\n\t\t\t\t'zoomend': this._endZoomAnim\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tif (!this.options.updateWhenIdle) {\r\n\t\t\tmap.off('move', this._limitedUpdate, this);\r\n\t\t}\r\n\r\n\t\tthis._container = null;\r\n\t\tthis._map = null;\r\n\t},\r\n\r\n\tbringToFront: function () {\r\n\t\tvar pane = this._map._panes.tilePane;\r\n\r\n\t\tif (this._container) {\r\n\t\t\tpane.appendChild(this._container);\r\n\t\t\tthis._setAutoZIndex(pane, Math.max);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tbringToBack: function () {\r\n\t\tvar pane = this._map._panes.tilePane;\r\n\r\n\t\tif (this._container) {\r\n\t\t\tpane.insertBefore(this._container, pane.firstChild);\r\n\t\t\tthis._setAutoZIndex(pane, Math.min);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetAttribution: function () {\r\n\t\treturn this.options.attribution;\r\n\t},\r\n\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetZIndex: function (zIndex) {\r\n\t\tthis.options.zIndex = zIndex;\r\n\t\tthis._updateZIndex();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetUrl: function (url, noRedraw) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tredraw: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset({hard: true});\r\n\t\t\tthis._update();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateZIndex: function () {\r\n\t\tif (this._container && this.options.zIndex !== undefined) {\r\n\t\t\tthis._container.style.zIndex = this.options.zIndex;\r\n\t\t}\r\n\t},\r\n\r\n\t_setAutoZIndex: function (pane, compare) {\r\n\r\n\t\tvar layers = pane.children,\r\n\t\t edgeZIndex = -compare(Infinity, -Infinity), // -Infinity for max, Infinity for min\r\n\t\t zIndex, i, len;\r\n\r\n\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\r\n\t\t\tif (layers[i] !== this._container) {\r\n\t\t\t\tzIndex = parseInt(layers[i].style.zIndex, 10);\r\n\r\n\t\t\t\tif (!isNaN(zIndex)) {\r\n\t\t\t\t\tedgeZIndex = compare(edgeZIndex, zIndex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.options.zIndex = this._container.style.zIndex =\r\n\t\t (isFinite(edgeZIndex) ? edgeZIndex : 0) + compare(1, -1);\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tvar i,\r\n\t\t tiles = this._tiles;\r\n\r\n\t\tif (L.Browser.ielt9) {\r\n\t\t\tfor (i in tiles) {\r\n\t\t\t\tL.DomUtil.setOpacity(tiles[i], this.options.opacity);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tL.DomUtil.setOpacity(this._container, this.options.opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_initContainer: function () {\r\n\t\tvar tilePane = this._map._panes.tilePane;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._container = L.DomUtil.create('div', 'leaflet-layer');\r\n\r\n\t\t\tthis._updateZIndex();\r\n\r\n\t\t\tif (this._animated) {\r\n\t\t\t\tvar className = 'leaflet-tile-container';\r\n\r\n\t\t\t\tthis._bgBuffer = L.DomUtil.create('div', className, this._container);\r\n\t\t\t\tthis._tileContainer = L.DomUtil.create('div', className, this._container);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis._tileContainer = this._container;\r\n\t\t\t}\r\n\r\n\t\t\ttilePane.appendChild(this._container);\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_reset: function (e) {\r\n\t\tfor (var key in this._tiles) {\r\n\t\t\tthis.fire('tileunload', {tile: this._tiles[key]});\r\n\t\t}\r\n\r\n\t\tthis._tiles = {};\r\n\t\tthis._tilesToLoad = 0;\r\n\r\n\t\tif (this.options.reuseTiles) {\r\n\t\t\tthis._unusedTiles = [];\r\n\t\t}\r\n\r\n\t\tthis._tileContainer.innerHTML = '';\r\n\r\n\t\tif (this._animated && e && e.hard) {\r\n\t\t\tthis._clearBgBuffer();\r\n\t\t}\r\n\r\n\t\tthis._initContainer();\r\n\t},\r\n\r\n\t_getTileSize: function () {\r\n\t\tvar map = this._map,\r\n\t\t zoom = map.getZoom() + this.options.zoomOffset,\r\n\t\t zoomN = this.options.maxNativeZoom,\r\n\t\t tileSize = this.options.tileSize;\r\n\r\n\t\tif (zoomN && zoom > zoomN) {\r\n\t\t\ttileSize = Math.round(map.getZoomScale(zoom) / map.getZoomScale(zoomN) * tileSize);\r\n\t\t}\r\n\r\n\t\treturn tileSize;\r\n\t},\r\n\r\n\t_update: function () {\r\n\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar map = this._map,\r\n\t\t bounds = map.getPixelBounds(),\r\n\t\t zoom = map.getZoom(),\r\n\t\t tileSize = this._getTileSize();\r\n\r\n\t\tif (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tileBounds = L.bounds(\r\n\t\t bounds.min.divideBy(tileSize)._floor(),\r\n\t\t bounds.max.divideBy(tileSize)._floor());\r\n\r\n\t\tthis._addTilesFromCenterOut(tileBounds);\r\n\r\n\t\tif (this.options.unloadInvisibleTiles || this.options.reuseTiles) {\r\n\t\t\tthis._removeOtherTiles(tileBounds);\r\n\t\t}\r\n\t},\r\n\r\n\t_addTilesFromCenterOut: function (bounds) {\r\n\t\tvar queue = [],\r\n\t\t center = bounds.getCenter();\r\n\r\n\t\tvar j, i, point;\r\n\r\n\t\tfor (j = bounds.min.y; j <= bounds.max.y; j++) {\r\n\t\t\tfor (i = bounds.min.x; i <= bounds.max.x; i++) {\r\n\t\t\t\tpoint = new L.Point(i, j);\r\n\r\n\t\t\t\tif (this._tileShouldBeLoaded(point)) {\r\n\t\t\t\t\tqueue.push(point);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar tilesToLoad = queue.length;\r\n\r\n\t\tif (tilesToLoad === 0) { return; }\r\n\r\n\t\t// load tiles in order of their distance to center\r\n\t\tqueue.sort(function (a, b) {\r\n\t\t\treturn a.distanceTo(center) - b.distanceTo(center);\r\n\t\t});\r\n\r\n\t\tvar fragment = document.createDocumentFragment();\r\n\r\n\t\t// if its the first batch of tiles to load\r\n\t\tif (!this._tilesToLoad) {\r\n\t\t\tthis.fire('loading');\r\n\t\t}\r\n\r\n\t\tthis._tilesToLoad += tilesToLoad;\r\n\r\n\t\tfor (i = 0; i < tilesToLoad; i++) {\r\n\t\t\tthis._addTile(queue[i], fragment);\r\n\t\t}\r\n\r\n\t\tthis._tileContainer.appendChild(fragment);\r\n\t},\r\n\r\n\t_tileShouldBeLoaded: function (tilePoint) {\r\n\t\tif ((tilePoint.x + ':' + tilePoint.y) in this._tiles) {\r\n\t\t\treturn false; // already loaded\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (!options.continuousWorld) {\r\n\t\t\tvar limit = this._getWrapTileNum();\r\n\r\n\t\t\t// don't load if exceeds world bounds\r\n\t\t\tif ((options.noWrap && (tilePoint.x < 0 || tilePoint.x >= limit.x)) ||\r\n\t\t\t\ttilePoint.y < 0 || tilePoint.y >= limit.y) { return false; }\r\n\t\t}\r\n\r\n\t\tif (options.bounds) {\r\n\t\t\tvar tileSize = this._getTileSize(),\r\n\t\t\t nwPoint = tilePoint.multiplyBy(tileSize),\r\n\t\t\t sePoint = nwPoint.add([tileSize, tileSize]),\r\n\t\t\t nw = this._map.unproject(nwPoint),\r\n\t\t\t se = this._map.unproject(sePoint);\r\n\r\n\t\t\t// TODO temporary hack, will be removed after refactoring projections\r\n\t\t\t// https://github.com/Leaflet/Leaflet/issues/1618\r\n\t\t\tif (!options.continuousWorld && !options.noWrap) {\r\n\t\t\t\tnw = nw.wrap();\r\n\t\t\t\tse = se.wrap();\r\n\t\t\t}\r\n\r\n\t\t\tif (!options.bounds.intersects([nw, se])) { return false; }\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_removeOtherTiles: function (bounds) {\r\n\t\tvar kArr, x, y, key;\r\n\r\n\t\tfor (key in this._tiles) {\r\n\t\t\tkArr = key.split(':');\r\n\t\t\tx = parseInt(kArr[0], 10);\r\n\t\t\ty = parseInt(kArr[1], 10);\r\n\r\n\t\t\t// remove tile if it's out of bounds\r\n\t\t\tif (x < bounds.min.x || x > bounds.max.x || y < bounds.min.y || y > bounds.max.y) {\r\n\t\t\t\tthis._removeTile(key);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_removeTile: function (key) {\r\n\t\tvar tile = this._tiles[key];\r\n\r\n\t\tthis.fire('tileunload', {tile: tile, url: tile.src});\r\n\r\n\t\tif (this.options.reuseTiles) {\r\n\t\t\tL.DomUtil.removeClass(tile, 'leaflet-tile-loaded');\r\n\t\t\tthis._unusedTiles.push(tile);\r\n\r\n\t\t} else if (tile.parentNode === this._tileContainer) {\r\n\t\t\tthis._tileContainer.removeChild(tile);\r\n\t\t}\r\n\r\n\t\t// for https://github.com/CloudMade/Leaflet/issues/137\r\n\t\tif (!L.Browser.android) {\r\n\t\t\ttile.onload = null;\r\n\t\t\ttile.src = L.Util.emptyImageUrl;\r\n\t\t}\r\n\r\n\t\tdelete this._tiles[key];\r\n\t},\r\n\r\n\t_addTile: function (tilePoint, container) {\r\n\t\tvar tilePos = this._getTilePos(tilePoint);\r\n\r\n\t\t// get unused tile - or create a new tile\r\n\t\tvar tile = this._getTile();\r\n\r\n\t\t/*\r\n\t\tChrome 20 layouts much faster with top/left (verify with timeline, frames)\r\n\t\tAndroid 4 browser has display issues with top/left and requires transform instead\r\n\t\t(other browsers don't currently care) - see debug/hacks/jitter.html for an example\r\n\t\t*/\r\n\t\tL.DomUtil.setPosition(tile, tilePos, L.Browser.chrome);\r\n\r\n\t\tthis._tiles[tilePoint.x + ':' + tilePoint.y] = tile;\r\n\r\n\t\tthis._loadTile(tile, tilePoint);\r\n\r\n\t\tif (tile.parentNode !== this._tileContainer) {\r\n\t\t\tcontainer.appendChild(tile);\r\n\t\t}\r\n\t},\r\n\r\n\t_getZoomForUrl: function () {\r\n\r\n\t\tvar options = this.options,\r\n\t\t zoom = this._map.getZoom();\r\n\r\n\t\tif (options.zoomReverse) {\r\n\t\t\tzoom = options.maxZoom - zoom;\r\n\t\t}\r\n\r\n\t\tzoom += options.zoomOffset;\r\n\r\n\t\treturn options.maxNativeZoom ? Math.min(zoom, options.maxNativeZoom) : zoom;\r\n\t},\r\n\r\n\t_getTilePos: function (tilePoint) {\r\n\t\tvar origin = this._map.getPixelOrigin(),\r\n\t\t tileSize = this._getTileSize();\r\n\r\n\t\treturn tilePoint.multiplyBy(tileSize).subtract(origin);\r\n\t},\r\n\r\n\t// image-specific code (override to implement e.g. Canvas or SVG tile layer)\r\n\r\n\tgetTileUrl: function (tilePoint) {\r\n\t\treturn L.Util.template(this._url, L.extend({\r\n\t\t\ts: this._getSubdomain(tilePoint),\r\n\t\t\tz: tilePoint.z,\r\n\t\t\tx: tilePoint.x,\r\n\t\t\ty: tilePoint.y\r\n\t\t}, this.options));\r\n\t},\r\n\r\n\t_getWrapTileNum: function () {\r\n\t\tvar crs = this._map.options.crs,\r\n\t\t size = crs.getSize(this._map.getZoom());\r\n\t\treturn size.divideBy(this._getTileSize())._floor();\r\n\t},\r\n\r\n\t_adjustTilePoint: function (tilePoint) {\r\n\r\n\t\tvar limit = this._getWrapTileNum();\r\n\r\n\t\t// wrap tile coordinates\r\n\t\tif (!this.options.continuousWorld && !this.options.noWrap) {\r\n\t\t\ttilePoint.x = ((tilePoint.x % limit.x) + limit.x) % limit.x;\r\n\t\t}\r\n\r\n\t\tif (this.options.tms) {\r\n\t\t\ttilePoint.y = limit.y - tilePoint.y - 1;\r\n\t\t}\r\n\r\n\t\ttilePoint.z = this._getZoomForUrl();\r\n\t},\r\n\r\n\t_getSubdomain: function (tilePoint) {\r\n\t\tvar index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n\t\treturn this.options.subdomains[index];\r\n\t},\r\n\r\n\t_getTile: function () {\r\n\t\tif (this.options.reuseTiles && this._unusedTiles.length > 0) {\r\n\t\t\tvar tile = this._unusedTiles.pop();\r\n\t\t\tthis._resetTile(tile);\r\n\t\t\treturn tile;\r\n\t\t}\r\n\t\treturn this._createTile();\r\n\t},\r\n\r\n\t// Override if data stored on a tile needs to be cleaned up before reuse\r\n\t_resetTile: function (/*tile*/) {},\r\n\r\n\t_createTile: function () {\r\n\t\tvar tile = L.DomUtil.create('img', 'leaflet-tile');\r\n\t\ttile.style.width = tile.style.height = this._getTileSize() + 'px';\r\n\t\ttile.galleryimg = 'no';\r\n\r\n\t\ttile.onselectstart = tile.onmousemove = L.Util.falseFn;\r\n\r\n\t\tif (L.Browser.ielt9 && this.options.opacity !== undefined) {\r\n\t\t\tL.DomUtil.setOpacity(tile, this.options.opacity);\r\n\t\t}\r\n\t\t// without this hack, tiles disappear after zoom on Chrome for Android\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2078\r\n\t\tif (L.Browser.mobileWebkit3d) {\r\n\t\t\ttile.style.WebkitBackfaceVisibility = 'hidden';\r\n\t\t}\r\n\t\treturn tile;\r\n\t},\r\n\r\n\t_loadTile: function (tile, tilePoint) {\r\n\t\ttile._layer = this;\r\n\t\ttile.onload = this._tileOnLoad;\r\n\t\ttile.onerror = this._tileOnError;\r\n\r\n\t\tthis._adjustTilePoint(tilePoint);\r\n\t\ttile.src = this.getTileUrl(tilePoint);\r\n\r\n\t\tthis.fire('tileloadstart', {\r\n\t\t\ttile: tile,\r\n\t\t\turl: tile.src\r\n\t\t});\r\n\t},\r\n\r\n\t_tileLoaded: function () {\r\n\t\tthis._tilesToLoad--;\r\n\r\n\t\tif (this._animated) {\r\n\t\t\tL.DomUtil.addClass(this._tileContainer, 'leaflet-zoom-animated');\r\n\t\t}\r\n\r\n\t\tif (!this._tilesToLoad) {\r\n\t\t\tthis.fire('load');\r\n\r\n\t\t\tif (this._animated) {\r\n\t\t\t\t// clear scaled tiles after all new tiles are loaded (for performance)\r\n\t\t\t\tclearTimeout(this._clearBgBufferTimer);\r\n\t\t\t\tthis._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_tileOnLoad: function () {\r\n\t\tvar layer = this._layer;\r\n\r\n\t\t//Only if we are loading an actual image\r\n\t\tif (this.src !== L.Util.emptyImageUrl) {\r\n\t\t\tL.DomUtil.addClass(this, 'leaflet-tile-loaded');\r\n\r\n\t\t\tlayer.fire('tileload', {\r\n\t\t\t\ttile: this,\r\n\t\t\t\turl: this.src\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tlayer._tileLoaded();\r\n\t},\r\n\r\n\t_tileOnError: function () {\r\n\t\tvar layer = this._layer;\r\n\r\n\t\tlayer.fire('tileerror', {\r\n\t\t\ttile: this,\r\n\t\t\turl: this.src\r\n\t\t});\r\n\r\n\t\tvar newUrl = layer.options.errorTileUrl;\r\n\t\tif (newUrl) {\r\n\t\t\tthis.src = newUrl;\r\n\t\t}\r\n\r\n\t\tlayer._tileLoaded();\r\n\t}\r\n});\r\n\r\nL.tileLayer = function (url, options) {\r\n\treturn new L.TileLayer(url, options);\r\n};\r\n\n\n/*\r\n * L.TileLayer.WMS is used for putting WMS tile layers on the map.\r\n */\r\n\r\nL.TileLayer.WMS = L.TileLayer.extend({\r\n\r\n\tdefaultWmsParams: {\r\n\t\tservice: 'WMS',\r\n\t\trequest: 'GetMap',\r\n\t\tversion: '1.1.1',\r\n\t\tlayers: '',\r\n\t\tstyles: '',\r\n\t\tformat: 'image/jpeg',\r\n\t\ttransparent: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) { // (String, Object)\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar wmsParams = L.extend({}, this.defaultWmsParams),\r\n\t\t tileSize = options.tileSize || this.options.tileSize;\r\n\r\n\t\tif (options.detectRetina && L.Browser.retina) {\r\n\t\t\twmsParams.width = wmsParams.height = tileSize * 2;\r\n\t\t} else {\r\n\t\t\twmsParams.width = wmsParams.height = tileSize;\r\n\t\t}\r\n\r\n\t\tfor (var i in options) {\r\n\t\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\t\tif (!this.options.hasOwnProperty(i) && i !== 'crs') {\r\n\t\t\t\twmsParams[i] = options[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.wmsParams = wmsParams;\r\n\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\r\n\t\tthis._crs = this.options.crs || map.options.crs;\r\n\r\n\t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n\t\tvar projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n\t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n\t\tL.TileLayer.prototype.onAdd.call(this, map);\r\n\t},\r\n\r\n\tgetTileUrl: function (tilePoint) { // (Point, Number) -> String\r\n\r\n\t\tvar map = this._map,\r\n\t\t tileSize = this.options.tileSize,\r\n\r\n\t\t nwPoint = tilePoint.multiplyBy(tileSize),\r\n\t\t sePoint = nwPoint.add([tileSize, tileSize]),\r\n\r\n\t\t nw = this._crs.project(map.unproject(nwPoint, tilePoint.z)),\r\n\t\t se = this._crs.project(map.unproject(sePoint, tilePoint.z)),\r\n\t\t bbox = this._wmsVersion >= 1.3 && this._crs === L.CRS.EPSG4326 ?\r\n\t\t [se.y, nw.x, nw.y, se.x].join(',') :\r\n\t\t [nw.x, se.y, se.x, nw.y].join(','),\r\n\r\n\t\t url = L.Util.template(this._url, {s: this._getSubdomain(tilePoint)});\r\n\r\n\t\treturn url + L.Util.getParamString(this.wmsParams, url, true) + '&BBOX=' + bbox;\r\n\t},\r\n\r\n\tsetParams: function (params, noRedraw) {\r\n\r\n\t\tL.extend(this.wmsParams, params);\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\nL.tileLayer.wms = function (url, options) {\r\n\treturn new L.TileLayer.WMS(url, options);\r\n};\r\n\n\n/*\r\n * L.TileLayer.Canvas is a class that you can use as a base for creating\r\n * dynamically drawn Canvas-based tile layers.\r\n */\r\n\r\nL.TileLayer.Canvas = L.TileLayer.extend({\r\n\toptions: {\r\n\t\tasync: false\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tredraw: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset({hard: true});\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tfor (var i in this._tiles) {\r\n\t\t\tthis._redrawTile(this._tiles[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_redrawTile: function (tile) {\r\n\t\tthis.drawTile(tile, tile._tilePoint, this._map._zoom);\r\n\t},\r\n\r\n\t_createTile: function () {\r\n\t\tvar tile = L.DomUtil.create('canvas', 'leaflet-tile');\r\n\t\ttile.width = tile.height = this.options.tileSize;\r\n\t\ttile.onselectstart = tile.onmousemove = L.Util.falseFn;\r\n\t\treturn tile;\r\n\t},\r\n\r\n\t_loadTile: function (tile, tilePoint) {\r\n\t\ttile._layer = this;\r\n\t\ttile._tilePoint = tilePoint;\r\n\r\n\t\tthis._redrawTile(tile);\r\n\r\n\t\tif (!this.options.async) {\r\n\t\t\tthis.tileDrawn(tile);\r\n\t\t}\r\n\t},\r\n\r\n\tdrawTile: function (/*tile, tilePoint*/) {\r\n\t\t// override with rendering code\r\n\t},\r\n\r\n\ttileDrawn: function (tile) {\r\n\t\tthis._tileOnLoad.call(tile);\r\n\t}\r\n});\r\n\r\n\r\nL.tileLayer.canvas = function (options) {\r\n\treturn new L.TileLayer.Canvas(options);\r\n};\r\n\n\n/*\r\n * L.ImageOverlay is used to overlay images over the map (to specific geographical bounds).\r\n */\r\n\r\nL.ImageOverlay = L.Class.extend({\r\n\tincludes: L.Mixin.Events,\r\n\r\n\toptions: {\r\n\t\topacity: 1\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = L.latLngBounds(bounds);\r\n\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\t\t}\r\n\r\n\t\tmap._panes.overlayPane.appendChild(this._image);\r\n\r\n\t\tmap.on('viewreset', this._reset, this);\r\n\r\n\t\tif (map.options.zoomAnimation && L.Browser.any3d) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._reset();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.getPanes().overlayPane.removeChild(this._image);\r\n\r\n\t\tmap.off('viewreset', this._reset, this);\r\n\r\n\t\tif (map.options.zoomAnimation) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tthis._updateOpacity();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// TODO remove bringToFront/bringToBack duplication from TileLayer/Path\r\n\tbringToFront: function () {\r\n\t\tif (this._image) {\r\n\t\t\tthis._map._panes.overlayPane.appendChild(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tbringToBack: function () {\r\n\t\tvar pane = this._map._panes.overlayPane;\r\n\t\tif (this._image) {\r\n\t\t\tpane.insertBefore(this._image, pane.firstChild);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetUrl: function (url) {\r\n\t\tthis._url = url;\r\n\t\tthis._image.src = this._url;\r\n\t},\r\n\r\n\tgetAttribution: function () {\r\n\t\treturn this.options.attribution;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tthis._image = L.DomUtil.create('img', 'leaflet-image-layer');\r\n\r\n\t\tif (this._map.options.zoomAnimation && L.Browser.any3d) {\r\n\t\t\tL.DomUtil.addClass(this._image, 'leaflet-zoom-animated');\r\n\t\t} else {\r\n\t\t\tL.DomUtil.addClass(this._image, 'leaflet-zoom-hide');\r\n\t\t}\r\n\r\n\t\tthis._updateOpacity();\r\n\r\n\t\t//TODO createImage util method to remove duplication\r\n\t\tL.extend(this._image, {\r\n\t\t\tgalleryimg: 'no',\r\n\t\t\tonselectstart: L.Util.falseFn,\r\n\t\t\tonmousemove: L.Util.falseFn,\r\n\t\t\tonload: L.bind(this._onImageLoad, this),\r\n\t\t\tsrc: this._url\r\n\t\t});\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar map = this._map,\r\n\t\t image = this._image,\r\n\t\t scale = map.getZoomScale(e.zoom),\r\n\t\t nw = this._bounds.getNorthWest(),\r\n\t\t se = this._bounds.getSouthEast(),\r\n\r\n\t\t topLeft = map._latLngToNewLayerPoint(nw, e.zoom, e.center),\r\n\t\t size = map._latLngToNewLayerPoint(se, e.zoom, e.center)._subtract(topLeft),\r\n\t\t origin = topLeft._add(size._multiplyBy((1 / 2) * (1 - 1 / scale)));\r\n\r\n\t\timage.style[L.DomUtil.TRANSFORM] =\r\n\t\t L.DomUtil.getTranslateString(origin) + ' scale(' + scale + ') ';\r\n\t},\r\n\r\n\t_reset: function () {\r\n\t\tvar image = this._image,\r\n\t\t topLeft = this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t size = this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(topLeft);\r\n\r\n\t\tL.DomUtil.setPosition(image, topLeft);\r\n\r\n\t\timage.style.width = size.x + 'px';\r\n\t\timage.style.height = size.y + 'px';\r\n\t},\r\n\r\n\t_onImageLoad: function () {\r\n\t\tthis.fire('load');\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tL.DomUtil.setOpacity(this._image, this.options.opacity);\r\n\t}\r\n});\r\n\r\nL.imageOverlay = function (url, bounds, options) {\r\n\treturn new L.ImageOverlay(url, bounds, options);\r\n};\r\n\n\n/*\r\n * L.Icon is an image-based icon class that you can use with L.Marker for custom markers.\r\n */\r\n\r\nL.Icon = L.Class.extend({\r\n\toptions: {\r\n\t\t/*\r\n\t\ticonUrl: (String) (required)\r\n\t\ticonRetinaUrl: (String) (optional, used for retina devices if detected)\r\n\t\ticonSize: (Point) (can be set through CSS)\r\n\t\ticonAnchor: (Point) (centered by default, can be set in CSS with negative margins)\r\n\t\tpopupAnchor: (Point) (if not specified, popup opens in the anchor point)\r\n\t\tshadowUrl: (String) (no shadow by default)\r\n\t\tshadowRetinaUrl: (String) (optional, used for retina devices if detected)\r\n\t\tshadowSize: (Point)\r\n\t\tshadowAnchor: (Point)\r\n\t\t*/\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tcreateIcon: function (oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t},\r\n\r\n\tcreateShadow: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar img;\r\n\t\tif (!oldIcon || oldIcon.tagName !== 'IMG') {\r\n\t\t\timg = this._createImg(src);\r\n\t\t} else {\r\n\t\t\timg = this._createImg(src, oldIcon);\r\n\t\t}\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\treturn img;\r\n\t},\r\n\r\n\t_setIconStyles: function (img, name) {\r\n\t\tvar options = this.options,\r\n\t\t size = L.point(options[name + 'Size']),\r\n\t\t anchor;\r\n\r\n\t\tif (name === 'shadow') {\r\n\t\t\tanchor = L.point(options.shadowAnchor || options.iconAnchor);\r\n\t\t} else {\r\n\t\t\tanchor = L.point(options.iconAnchor);\r\n\t\t}\r\n\r\n\t\tif (!anchor && size) {\r\n\t\t\tanchor = size.divideBy(2, true);\r\n\t\t}\r\n\r\n\t\timg.className = 'leaflet-marker-' + name + ' ' + options.className;\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n\t\t\timg.style.marginTop = (-anchor.y) + 'px';\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width = size.x + 'px';\r\n\t\t\timg.style.height = size.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t_createImg: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\tif (L.Browser.retina && this.options[name + 'RetinaUrl']) {\r\n\t\t\treturn this.options[name + 'RetinaUrl'];\r\n\t\t}\r\n\t\treturn this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\nL.icon = function (options) {\r\n\treturn new L.Icon(options);\r\n};\r\n\n\n/*\n * L.Icon.Default is the blue marker icon used by default in Leaflet.\n */\n\nL.Icon.Default = L.Icon.extend({\n\n\toptions: {\n\t\ticonSize: [25, 41],\n\t\ticonAnchor: [12, 41],\n\t\tpopupAnchor: [1, -34],\n\n\t\tshadowSize: [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tvar key = name + 'Url';\n\n\t\tif (this.options[key]) {\n\t\t\treturn this.options[key];\n\t\t}\n\n\t\tif (L.Browser.retina && name === 'icon') {\n\t\t\tname += '-2x';\n\t\t}\n\n\t\tvar path = L.Icon.Default.imagePath;\n\n\t\tif (!path) {\n\t\t\tthrow new Error('Couldn\\'t autodetect L.Icon.Default.imagePath, set it manually.');\n\t\t}\n\n\t\treturn path + '/marker-' + name + '.png';\n\t}\n});\n\nL.Icon.Default.imagePath = (function () {\n\tvar scripts = document.getElementsByTagName('script'),\n\t leafletRe = /[\\/^]leaflet[\\-\\._]?([\\w\\-\\._]*)\\.js\\??/;\n\n\tvar i, len, src, matches, path;\n\n\tfor (i = 0, len = scripts.length; i < len; i++) {\n\t\tsrc = scripts[i].src;\n\t\tmatches = src.match(leafletRe);\n\n\t\tif (matches) {\n\t\t\tpath = src.split(leafletRe)[0];\n\t\t\treturn (path ? path + '/' : '') + 'images';\n\t\t}\n\t}\n}());\n\n\n/*\r\n * L.Marker is used to display clickable/draggable icons on the map.\r\n */\r\n\r\nL.Marker = L.Class.extend({\r\n\r\n\tincludes: L.Mixin.Events,\r\n\r\n\toptions: {\r\n\t\ticon: new L.Icon.Default(),\r\n\t\ttitle: '',\r\n\t\talt: '',\r\n\t\tclickable: true,\r\n\t\tdraggable: false,\r\n\t\tkeyboard: true,\r\n\t\tzIndexOffset: 0,\r\n\t\topacity: 1,\r\n\t\triseOnHover: false,\r\n\t\triseOffset: 250\r\n\t},\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tL.setOptions(this, options);\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\r\n\t\tmap.on('viewreset', this.update, this);\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t\tthis.fire('add');\r\n\r\n\t\tif (map.options.zoomAnimation && map.options.markerZoomAnimation) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (this.dragging) {\r\n\t\t\tthis.dragging.disable();\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\r\n\t\tthis.fire('remove');\r\n\r\n\t\tmap.off({\r\n\t\t\t'viewreset': this.update,\r\n\t\t\t'zoomanim': this._animateZoom\r\n\t\t}, this);\r\n\r\n\t\tthis._map = null;\r\n\t},\r\n\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\r\n\t\tthis.update();\r\n\r\n\t\treturn this.fire('move', { latlng: this._latlng });\r\n\t},\r\n\r\n\tsetZIndexOffset: function (offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\tthis.update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetIcon: function (icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\t\tif (this._icon) {\r\n\t\t\tthis._setPos(this._map.latLngToLayerPoint(this._latlng).round());\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initIcon: function () {\r\n\t\tvar options = this.options,\r\n\t\t map = this._map,\r\n\t\t animation = (map.options.zoomAnimation && map.options.markerZoomAnimation),\r\n\t\t classToAdd = animation ? 'leaflet-zoom-animated' : 'leaflet-zoom-hide';\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t\taddIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\r\n\t\t\tif (options.alt) {\r\n\t\t\t\ticon.alt = options.alt;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tL.DomUtil.addClass(icon, classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tthis._initInteraction();\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tL.DomEvent\r\n\t\t\t\t.on(icon, 'mouseover', this._bringToFront, this)\r\n\t\t\t\t.on(icon, 'mouseout', this._resetZIndex, this);\r\n\t\t}\r\n\r\n\t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t\taddShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\tL.DomUtil.addClass(newShadow, classToAdd);\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tvar panes = this._map._panes;\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tpanes.markerPane.appendChild(this._icon);\r\n\t\t}\r\n\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tpanes.shadowPane.appendChild(this._shadow);\r\n\t\t}\r\n\t},\r\n\r\n\t_removeIcon: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tL.DomEvent\r\n\t\t\t .off(this._icon, 'mouseover', this._bringToFront)\r\n\t\t\t .off(this._icon, 'mouseout', this._resetZIndex);\r\n\t\t}\r\n\r\n\t\tthis._map._panes.markerPane.removeChild(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tthis._map._panes.shadowPane.removeChild(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (pos) {\r\n\t\tL.DomUtil.setPosition(this._icon, pos);\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tL.DomUtil.setPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t},\r\n\r\n\t_updateZIndex: function (offset) {\r\n\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t},\r\n\r\n\t_animateZoom: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t},\r\n\r\n\t_initInteraction: function () {\r\n\r\n\t\tif (!this.options.clickable) { return; }\r\n\r\n\t\t// TODO refactor into something shared with Map/Path/etc. to DRY it up\r\n\r\n\t\tvar icon = this._icon,\r\n\t\t events = ['dblclick', 'mousedown', 'mouseover', 'mouseout', 'contextmenu'];\r\n\r\n\t\tL.DomUtil.addClass(icon, 'leaflet-clickable');\r\n\t\tL.DomEvent.on(icon, 'click', this._onMouseClick, this);\r\n\t\tL.DomEvent.on(icon, 'keypress', this._onKeyPress, this);\r\n\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tL.DomEvent.on(icon, events[i], this._fireMouseEvent, this);\r\n\t\t}\r\n\r\n\t\tif (L.Handler.MarkerDrag) {\r\n\t\t\tthis.dragging = new L.Handler.MarkerDrag(this);\r\n\r\n\t\t\tif (this.options.draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_onMouseClick: function (e) {\r\n\t\tvar wasDragged = this.dragging && this.dragging.moved();\r\n\r\n\t\tif (this.hasEventListeners(e.type) || wasDragged) {\r\n\t\t\tL.DomEvent.stopPropagation(e);\r\n\t\t}\r\n\r\n\t\tif (wasDragged) { return; }\r\n\r\n\t\tif ((!this.dragging || !this.dragging._enabled) && this._map.dragging && this._map.dragging.moved()) { return; }\r\n\r\n\t\tthis.fire(e.type, {\r\n\t\t\toriginalEvent: e,\r\n\t\t\tlatlng: this._latlng\r\n\t\t});\r\n\t},\r\n\r\n\t_onKeyPress: function (e) {\r\n\t\tif (e.keyCode === 13) {\r\n\t\t\tthis.fire('click', {\r\n\t\t\t\toriginalEvent: e,\r\n\t\t\t\tlatlng: this._latlng\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_fireMouseEvent: function (e) {\r\n\r\n\t\tthis.fire(e.type, {\r\n\t\t\toriginalEvent: e,\r\n\t\t\tlatlng: this._latlng\r\n\t\t});\r\n\r\n\t\t// TODO proper custom event propagation\r\n\t\t// this line will always be called if marker is in a FeatureGroup\r\n\t\tif (e.type === 'contextmenu' && this.hasEventListeners(e.type)) {\r\n\t\t\tL.DomEvent.preventDefault(e);\r\n\t\t}\r\n\t\tif (e.type !== 'mousedown') {\r\n\t\t\tL.DomEvent.stopPropagation(e);\r\n\t\t} else {\r\n\t\t\tL.DomEvent.preventDefault(e);\r\n\t\t}\r\n\t},\r\n\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tL.DomUtil.setOpacity(this._icon, this.options.opacity);\r\n\t\tif (this._shadow) {\r\n\t\t\tL.DomUtil.setOpacity(this._shadow, this.options.opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t}\r\n});\r\n\r\nL.marker = function (latlng, options) {\r\n\treturn new L.Marker(latlng, options);\r\n};\r\n\n\n/*\n * L.DivIcon is a lightweight HTML-based icon class (as opposed to the image-based L.Icon)\n * to use with L.Marker.\n */\n\nL.DivIcon = L.Icon.extend({\n\toptions: {\n\t\ticonSize: [12, 12], // also can be set through CSS\n\t\t/*\n\t\ticonAnchor: (Point)\n\t\tpopupAnchor: (Point)\n\t\thtml: (String)\n\t\tbgPos: (Point)\n\t\t*/\n\t\tclassName: 'leaflet-div-icon',\n\t\thtml: false\n\t},\n\n\tcreateIcon: function (oldIcon) {\n\t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\t options = this.options;\n\n\t\tif (options.html !== false) {\n\t\t\tdiv.innerHTML = options.html;\n\t\t} else {\n\t\t\tdiv.innerHTML = '';\n\t\t}\n\n\t\tif (options.bgPos) {\n\t\t\tdiv.style.backgroundPosition =\n\t\t\t (-options.bgPos.x) + 'px ' + (-options.bgPos.y) + 'px';\n\t\t}\n\n\t\tthis._setIconStyles(div, 'icon');\n\t\treturn div;\n\t},\n\n\tcreateShadow: function () {\n\t\treturn null;\n\t}\n});\n\nL.divIcon = function (options) {\n\treturn new L.DivIcon(options);\n};\n\n\n/*\r\n * L.Popup is used for displaying popups on the map.\r\n */\r\n\r\nL.Map.mergeOptions({\r\n\tclosePopupOnClick: true\r\n});\r\n\r\nL.Popup = L.Class.extend({\r\n\tincludes: L.Mixin.Events,\r\n\r\n\toptions: {\r\n\t\tminWidth: 50,\r\n\t\tmaxWidth: 300,\r\n\t\t// maxHeight: null,\r\n\t\tautoPan: true,\r\n\t\tcloseButton: true,\r\n\t\toffset: [0, 7],\r\n\t\tautoPanPadding: [5, 5],\r\n\t\t// autoPanPaddingTopLeft: null,\r\n\t\t// autoPanPaddingBottomRight: null,\r\n\t\tkeepInView: false,\r\n\t\tclassName: '',\r\n\t\tzoomAnimation: true\r\n\t},\r\n\r\n\tinitialize: function (options, source) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._source = source;\r\n\t\tthis._animated = L.Browser.any3d && this.options.zoomAnimation;\r\n\t\tthis._isOpen = false;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initLayout();\r\n\t\t}\r\n\r\n\t\tvar animFade = map.options.fadeAnimation;\r\n\r\n\t\tif (animFade) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 0);\r\n\t\t}\r\n\t\tmap._panes.popupPane.appendChild(this._container);\r\n\r\n\t\tmap.on(this._getEvents(), this);\r\n\r\n\t\tthis.update();\r\n\r\n\t\tif (animFade) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 1);\r\n\t\t}\r\n\r\n\t\tthis.fire('open');\r\n\r\n\t\tmap.fire('popupopen', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\tthis._source.fire('popupopen', {popup: this});\r\n\t\t}\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\topenOn: function (map) {\r\n\t\tmap.openPopup(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap._panes.popupPane.removeChild(this._container);\r\n\r\n\t\tL.Util.falseFn(this._container.offsetWidth); // force reflow\r\n\r\n\t\tmap.off(this._getEvents(), this);\r\n\r\n\t\tif (map.options.fadeAnimation) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 0);\r\n\t\t}\r\n\r\n\t\tthis._map = null;\r\n\r\n\t\tthis.fire('close');\r\n\r\n\t\tmap.fire('popupclose', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\tthis._source.fire('popupclose', {popup: this});\r\n\t\t}\r\n\t},\r\n\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t\tif (this._map) {\r\n\t\t\tthis._updatePosition();\r\n\t\t\tthis._adjustPan();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetContent: function () {\r\n\t\treturn this._content;\r\n\t},\r\n\r\n\tsetContent: function (content) {\r\n\t\tthis._content = content;\r\n\t\tthis.update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._container.style.visibility = 'hidden';\r\n\r\n\t\tthis._updateContent();\r\n\t\tthis._updateLayout();\r\n\t\tthis._updatePosition();\r\n\r\n\t\tthis._container.style.visibility = '';\r\n\r\n\t\tthis._adjustPan();\r\n\t},\r\n\r\n\t_getEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tviewreset: this._updatePosition\r\n\t\t};\r\n\r\n\t\tif (this._animated) {\r\n\t\t\tevents.zoomanim = this._zoomAnimation;\r\n\t\t}\r\n\t\tif ('closeOnClick' in this.options ? this.options.closeOnClick : this._map.options.closePopupOnClick) {\r\n\t\t\tevents.preclick = this._close;\r\n\t\t}\r\n\t\tif (this.options.keepInView) {\r\n\t\t\tevents.moveend = this._adjustPan;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t_close: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.closePopup(this);\r\n\t\t}\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar prefix = 'leaflet-popup',\r\n\t\t\tcontainerClass = prefix + ' ' + this.options.className + ' leaflet-zoom-' +\r\n\t\t\t (this._animated ? 'animated' : 'hide'),\r\n\t\t\tcontainer = this._container = L.DomUtil.create('div', containerClass),\r\n\t\t\tcloseButton;\r\n\r\n\t\tif (this.options.closeButton) {\r\n\t\t\tcloseButton = this._closeButton =\r\n\t\t\t L.DomUtil.create('a', prefix + '-close-button', container);\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '&#215;';\r\n\t\t\tL.DomEvent.disableClickPropagation(closeButton);\r\n\r\n\t\t\tL.DomEvent.on(closeButton, 'click', this._onCloseButtonClick, this);\r\n\t\t}\r\n\r\n\t\tvar wrapper = this._wrapper =\r\n\t\t L.DomUtil.create('div', prefix + '-content-wrapper', container);\r\n\t\tL.DomEvent.disableClickPropagation(wrapper);\r\n\r\n\t\tthis._contentNode = L.DomUtil.create('div', prefix + '-content', wrapper);\r\n\r\n\t\tL.DomEvent.disableScrollPropagation(this._contentNode);\r\n\t\tL.DomEvent.on(wrapper, 'contextmenu', L.DomEvent.stopPropagation);\r\n\r\n\t\tthis._tipContainer = L.DomUtil.create('div', prefix + '-tip-container', container);\r\n\t\tthis._tip = L.DomUtil.create('div', prefix + '-tip', this._tipContainer);\r\n\t},\r\n\r\n\t_updateContent: function () {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tif (typeof this._content === 'string') {\r\n\t\t\tthis._contentNode.innerHTML = this._content;\r\n\t\t} else {\r\n\t\t\twhile (this._contentNode.hasChildNodes()) {\r\n\t\t\t\tthis._contentNode.removeChild(this._contentNode.firstChild);\r\n\t\t\t}\r\n\t\t\tthis._contentNode.appendChild(this._content);\r\n\t\t}\r\n\t\tthis.fire('contentupdate');\r\n\t},\r\n\r\n\t_updateLayout: function () {\r\n\t\tvar container = this._contentNode,\r\n\t\t style = container.style;\r\n\r\n\t\tstyle.width = '';\r\n\t\tstyle.whiteSpace = 'nowrap';\r\n\r\n\t\tvar width = container.offsetWidth;\r\n\t\twidth = Math.min(width, this.options.maxWidth);\r\n\t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n\t\tstyle.width = (width + 1) + 'px';\r\n\t\tstyle.whiteSpace = '';\r\n\r\n\t\tstyle.height = '';\r\n\r\n\t\tvar height = container.offsetHeight,\r\n\t\t maxHeight = this.options.maxHeight,\r\n\t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = maxHeight + 'px';\r\n\t\t\tL.DomUtil.addClass(container, scrolledClass);\r\n\t\t} else {\r\n\t\t\tL.DomUtil.removeClass(container, scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\t animated = this._animated,\r\n\t\t offset = L.point(this.options.offset);\r\n\r\n\t\tif (animated) {\r\n\t\t\tL.DomUtil.setPosition(this._container, pos);\r\n\t\t}\r\n\r\n\t\tthis._containerBottom = -offset.y - (animated ? 0 : pos.y);\r\n\t\tthis._containerLeft = -Math.round(this._containerWidth / 2) + offset.x + (animated ? 0 : pos.x);\r\n\r\n\t\t// bottom position the popup in case the height of the popup changes (images loading etc)\r\n\t\tthis._container.style.bottom = this._containerBottom + 'px';\r\n\t\tthis._container.style.left = this._containerLeft + 'px';\r\n\t},\r\n\r\n\t_zoomAnimation: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center);\r\n\r\n\t\tL.DomUtil.setPosition(this._container, pos);\r\n\t},\r\n\r\n\t_adjustPan: function () {\r\n\t\tif (!this.options.autoPan) { return; }\r\n\r\n\t\tvar map = this._map,\r\n\t\t containerHeight = this._container.offsetHeight,\r\n\t\t containerWidth = this._containerWidth,\r\n\r\n\t\t layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tif (this._animated) {\r\n\t\t\tlayerPos._add(L.DomUtil.getPosition(this._container));\r\n\t\t}\r\n\r\n\t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\t padding = L.point(this.options.autoPanPadding),\r\n\t\t paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\r\n\t\t paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\r\n\t\t size = map.getSize(),\r\n\t\t dx = 0,\r\n\t\t dy = 0;\r\n\r\n\t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n\t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n\t\t}\r\n\t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n\t\t\tdx = containerPos.x - paddingTL.x;\r\n\t\t}\r\n\t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n\t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n\t\t}\r\n\t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n\t\t\tdy = containerPos.y - paddingTL.y;\r\n\t\t}\r\n\r\n\t\tif (dx || dy) {\r\n\t\t\tmap\r\n\t\t\t .fire('autopanstart')\r\n\t\t\t .panBy([dx, dy]);\r\n\t\t}\r\n\t},\r\n\r\n\t_onCloseButtonClick: function (e) {\r\n\t\tthis._close();\r\n\t\tL.DomEvent.stop(e);\r\n\t}\r\n});\r\n\r\nL.popup = function (options, source) {\r\n\treturn new L.Popup(options, source);\r\n};\r\n\r\n\r\nL.Map.include({\r\n\topenPopup: function (popup, latlng, options) { // (Popup) or (String || HTMLElement, LatLng[, Object])\r\n\t\tthis.closePopup();\r\n\r\n\t\tif (!(popup instanceof L.Popup)) {\r\n\t\t\tvar content = popup;\r\n\r\n\t\t\tpopup = new L.Popup(options)\r\n\t\t\t .setLatLng(latlng)\r\n\t\t\t .setContent(content);\r\n\t\t}\r\n\t\tpopup._isOpen = true;\r\n\r\n\t\tthis._popup = popup;\r\n\t\treturn this.addLayer(popup);\r\n\t},\r\n\r\n\tclosePopup: function (popup) {\r\n\t\tif (!popup || popup === this._popup) {\r\n\t\t\tpopup = this._popup;\r\n\t\t\tthis._popup = null;\r\n\t\t}\r\n\t\tif (popup) {\r\n\t\t\tthis.removeLayer(popup);\r\n\t\t\tpopup._isOpen = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n});\r\n\n\n/*\r\n * Popup extension to L.Marker, adding popup-related methods.\r\n */\r\n\r\nL.Marker.include({\r\n\topenPopup: function () {\r\n\t\tif (this._popup && this._map && !this._map.hasLayer(this._popup)) {\r\n\t\t\tthis._popup.setLatLng(this._latlng);\r\n\t\t\tthis._map.openPopup(this._popup);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclosePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup._close();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttogglePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tif (this._popup._isOpen) {\r\n\t\t\t\tthis.closePopup();\r\n\t\t\t} else {\r\n\t\t\t\tthis.openPopup();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tbindPopup: function (content, options) {\r\n\t\tvar anchor = L.point(this.options.icon.options.popupAnchor || [0, 0]);\r\n\r\n\t\tanchor = anchor.add(L.Popup.prototype.options.offset);\r\n\r\n\t\tif (options && options.offset) {\r\n\t\t\tanchor = anchor.add(options.offset);\r\n\t\t}\r\n\r\n\t\toptions = L.extend({offset: anchor}, options);\r\n\r\n\t\tif (!this._popupHandlersAdded) {\r\n\t\t\tthis\r\n\t\t\t .on('click', this.togglePopup, this)\r\n\t\t\t .on('remove', this.closePopup, this)\r\n\t\t\t .on('move', this._movePopup, this);\r\n\t\t\tthis._popupHandlersAdded = true;\r\n\t\t}\r\n\r\n\t\tif (content instanceof L.Popup) {\r\n\t\t\tL.setOptions(content, options);\r\n\t\t\tthis._popup = content;\r\n\t\t\tcontent._source = this;\r\n\t\t} else {\r\n\t\t\tthis._popup = new L.Popup(options, this)\r\n\t\t\t\t.setContent(content);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetPopupContent: function (content) {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.setContent(content);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tunbindPopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup = null;\r\n\t\t\tthis\r\n\t\t\t .off('click', this.togglePopup, this)\r\n\t\t\t .off('remove', this.closePopup, this)\r\n\t\t\t .off('move', this._movePopup, this);\r\n\t\t\tthis._popupHandlersAdded = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetPopup: function () {\r\n\t\treturn this._popup;\r\n\t},\r\n\r\n\t_movePopup: function (e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t}\r\n});\r\n\n\n/*\r\n * L.LayerGroup is a class to combine several layers into one so that\r\n * you can manipulate the group (e.g. add/remove it) as one layer.\r\n */\r\n\r\nL.LayerGroup = L.Class.extend({\r\n\tinitialize: function (layers) {\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddLayer: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\thasLayer: function (layer) {\r\n\t\tif (!layer) { return false; }\r\n\r\n\t\treturn (layer in this._layers || this.getLayerId(layer) in this._layers);\r\n\t},\r\n\r\n\tclearLayers: function () {\r\n\t\tthis.eachLayer(this.removeLayer, this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tinvoke: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tthis.eachLayer(map.removeLayer, map);\r\n\t\tthis._map = null;\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetLayer: function (id) {\r\n\t\treturn this._layers[id];\r\n\t},\r\n\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tlayers.push(this._layers[i]);\r\n\t\t}\r\n\t\treturn layers;\r\n\t},\r\n\r\n\tsetZIndex: function (zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t},\r\n\r\n\tgetLayerId: function (layer) {\r\n\t\treturn L.stamp(layer);\r\n\t}\r\n});\r\n\r\nL.layerGroup = function (layers) {\r\n\treturn new L.LayerGroup(layers);\r\n};\r\n\n\n/*\r\n * L.FeatureGroup extends L.LayerGroup by introducing mouse events and additional methods\r\n * shared between a group of interactive layers (like vectors or markers).\r\n */\r\n\r\nL.FeatureGroup = L.LayerGroup.extend({\r\n\tincludes: L.Mixin.Events,\r\n\r\n\tstatics: {\r\n\t\tEVENTS: 'click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose'\r\n\t},\r\n\r\n\taddLayer: function (layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ('on' in layer) {\r\n\t\t\tlayer.on(L.FeatureGroup.EVENTS, this._propagateEvent, this);\r\n\t\t}\r\n\r\n\t\tL.LayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\tif (this._popupContent && layer.bindPopup) {\r\n\t\t\tlayer.bindPopup(this._popupContent, this._popupOptions);\r\n\t\t}\r\n\r\n\t\treturn this.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tif ('off' in layer) {\r\n\t\t\tlayer.off(L.FeatureGroup.EVENTS, this._propagateEvent, this);\r\n\t\t}\r\n\r\n\t\tL.LayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\tif (this._popupContent) {\r\n\t\t\tthis.invoke('unbindPopup');\r\n\t\t}\r\n\r\n\t\treturn this.fire('layerremove', {layer: layer});\r\n\t},\r\n\r\n\tbindPopup: function (content, options) {\r\n\t\tthis._popupContent = content;\r\n\t\tthis._popupOptions = options;\r\n\t\treturn this.invoke('bindPopup', content, options);\r\n\t},\r\n\r\n\topenPopup: function (latlng) {\r\n\t\t// open popup on the first layer\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tthis._layers[id].openPopup(latlng);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t},\r\n\r\n\tbringToFront: function () {\r\n\t\treturn this.invoke('bringToFront');\r\n\t},\r\n\r\n\tbringToBack: function () {\r\n\t\treturn this.invoke('bringToBack');\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new L.LatLngBounds();\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tbounds.extend(layer instanceof L.Marker ? layer.getLatLng() : layer.getBounds());\r\n\t\t});\r\n\r\n\t\treturn bounds;\r\n\t},\r\n\r\n\t_propagateEvent: function (e) {\r\n\t\te = L.extend({\r\n\t\t\tlayer: e.target,\r\n\t\t\ttarget: this\r\n\t\t}, e);\r\n\t\tthis.fire(e.type, e);\r\n\t}\r\n});\r\n\r\nL.featureGroup = function (layers) {\r\n\treturn new L.FeatureGroup(layers);\r\n};\r\n\n\n/*\r\n * L.Path is a base class for rendering vector paths on a map. Inherited by Polyline, Circle, etc.\r\n */\r\n\r\nL.Path = L.Class.extend({\r\n\tincludes: [L.Mixin.Events],\r\n\r\n\tstatics: {\r\n\t\t// how much to extend the clip area around the map view\r\n\t\t// (relative to its size, e.g. 0.5 is half the screen in each direction)\r\n\t\t// set it so that SVG element doesn't exceed 1280px (vectors flicker on dragend if it is)\r\n\t\tCLIP_PADDING: (function () {\r\n\t\t\tvar max = L.Browser.mobile ? 1280 : 2000,\r\n\t\t\t target = (max / Math.max(window.outerWidth, window.outerHeight) - 1) / 2;\r\n\t\t\treturn Math.max(0, Math.min(0.5, target));\r\n\t\t})()\r\n\t},\r\n\r\n\toptions: {\r\n\t\tstroke: true,\r\n\t\tcolor: '#0033ff',\r\n\t\tdashArray: null,\r\n\t\tlineCap: null,\r\n\t\tlineJoin: null,\r\n\t\tweight: 5,\r\n\t\topacity: 0.5,\r\n\r\n\t\tfill: false,\r\n\t\tfillColor: null, //same as color by default\r\n\t\tfillOpacity: 0.2,\r\n\r\n\t\tclickable: true\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._map = map;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initElements();\r\n\t\t\tthis._initEvents();\r\n\t\t}\r\n\r\n\t\tthis.projectLatlngs();\r\n\t\tthis._updatePath();\r\n\r\n\t\tif (this._container) {\r\n\t\t\tthis._map._pathRoot.appendChild(this._container);\r\n\t\t}\r\n\r\n\t\tthis.fire('add');\r\n\r\n\t\tmap.on({\r\n\t\t\t'viewreset': this.projectLatlngs,\r\n\t\t\t'moveend': this._updatePath\r\n\t\t}, this);\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tmap.addLayer(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap._pathRoot.removeChild(this._container);\r\n\r\n\t\t// Need to fire remove event before we set _map to null as the event hooks might need the object\r\n\t\tthis.fire('remove');\r\n\t\tthis._map = null;\r\n\r\n\t\tif (L.Browser.vml) {\r\n\t\t\tthis._container = null;\r\n\t\t\tthis._stroke = null;\r\n\t\t\tthis._fill = null;\r\n\t\t}\r\n\r\n\t\tmap.off({\r\n\t\t\t'viewreset': this.projectLatlngs,\r\n\t\t\t'moveend': this._updatePath\r\n\t\t}, this);\r\n\t},\r\n\r\n\tprojectLatlngs: function () {\r\n\t\t// do all projection stuff here\r\n\t},\r\n\r\n\tsetStyle: function (style) {\r\n\t\tL.setOptions(this, style);\r\n\r\n\t\tif (this._container) {\r\n\t\t\tthis._updateStyle();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tredraw: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis.projectLatlngs();\r\n\t\t\tthis._updatePath();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\nL.Map.include({\r\n\t_updatePathViewport: function () {\r\n\t\tvar p = L.Path.CLIP_PADDING,\r\n\t\t size = this.getSize(),\r\n\t\t panePos = L.DomUtil.getPosition(this._mapPane),\r\n\t\t min = panePos.multiplyBy(-1)._subtract(size.multiplyBy(p)._round()),\r\n\t\t max = min.add(size.multiplyBy(1 + p * 2)._round());\r\n\r\n\t\tthis._pathViewport = new L.Bounds(min, max);\r\n\t}\r\n});\r\n\n\n/*\r\n * Extends L.Path with SVG-specific rendering code.\r\n */\r\n\r\nL.Path.SVG_NS = 'http://www.w3.org/2000/svg';\r\n\r\nL.Browser.svg = !!(document.createElementNS && document.createElementNS(L.Path.SVG_NS, 'svg').createSVGRect);\r\n\r\nL.Path = L.Path.extend({\r\n\tstatics: {\r\n\t\tSVG: L.Browser.svg\r\n\t},\r\n\r\n\tbringToFront: function () {\r\n\t\tvar root = this._map._pathRoot,\r\n\t\t path = this._container;\r\n\r\n\t\tif (path && root.lastChild !== path) {\r\n\t\t\troot.appendChild(path);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tbringToBack: function () {\r\n\t\tvar root = this._map._pathRoot,\r\n\t\t path = this._container,\r\n\t\t first = root.firstChild;\r\n\r\n\t\tif (path && first !== path) {\r\n\t\t\troot.insertBefore(path, first);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetPathString: function () {\r\n\t\t// form path string here\r\n\t},\r\n\r\n\t_createElement: function (name) {\r\n\t\treturn document.createElementNS(L.Path.SVG_NS, name);\r\n\t},\r\n\r\n\t_initElements: function () {\r\n\t\tthis._map._initPathRoot();\r\n\t\tthis._initPath();\r\n\t\tthis._initStyle();\r\n\t},\r\n\r\n\t_initPath: function () {\r\n\t\tthis._container = this._createElement('g');\r\n\r\n\t\tthis._path = this._createElement('path');\r\n\r\n\t\tif (this.options.className) {\r\n\t\t\tL.DomUtil.addClass(this._path, this.options.className);\r\n\t\t}\r\n\r\n\t\tthis._container.appendChild(this._path);\r\n\t},\r\n\r\n\t_initStyle: function () {\r\n\t\tif (this.options.stroke) {\r\n\t\t\tthis._path.setAttribute('stroke-linejoin', 'round');\r\n\t\t\tthis._path.setAttribute('stroke-linecap', 'round');\r\n\t\t}\r\n\t\tif (this.options.fill) {\r\n\t\t\tthis._path.setAttribute('fill-rule', 'evenodd');\r\n\t\t}\r\n\t\tif (this.options.pointerEvents) {\r\n\t\t\tthis._path.setAttribute('pointer-events', this.options.pointerEvents);\r\n\t\t}\r\n\t\tif (!this.options.clickable && !this.options.pointerEvents) {\r\n\t\t\tthis._path.setAttribute('pointer-events', 'none');\r\n\t\t}\r\n\t\tthis._updateStyle();\r\n\t},\r\n\r\n\t_updateStyle: function () {\r\n\t\tif (this.options.stroke) {\r\n\t\t\tthis._path.setAttribute('stroke', this.options.color);\r\n\t\t\tthis._path.setAttribute('stroke-opacity', this.options.opacity);\r\n\t\t\tthis._path.setAttribute('stroke-width', this.options.weight);\r\n\t\t\tif (this.options.dashArray) {\r\n\t\t\t\tthis._path.setAttribute('stroke-dasharray', this.options.dashArray);\r\n\t\t\t} else {\r\n\t\t\t\tthis._path.removeAttribute('stroke-dasharray');\r\n\t\t\t}\r\n\t\t\tif (this.options.lineCap) {\r\n\t\t\t\tthis._path.setAttribute('stroke-linecap', this.options.lineCap);\r\n\t\t\t}\r\n\t\t\tif (this.options.lineJoin) {\r\n\t\t\t\tthis._path.setAttribute('stroke-linejoin', this.options.lineJoin);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis._path.setAttribute('stroke', 'none');\r\n\t\t}\r\n\t\tif (this.options.fill) {\r\n\t\t\tthis._path.setAttribute('fill', this.options.fillColor || this.options.color);\r\n\t\t\tthis._path.setAttribute('fill-opacity', this.options.fillOpacity);\r\n\t\t} else {\r\n\t\t\tthis._path.setAttribute('fill', 'none');\r\n\t\t}\r\n\t},\r\n\r\n\t_updatePath: function () {\r\n\t\tvar str = this.getPathString();\r\n\t\tif (!str) {\r\n\t\t\t// fix webkit empty string parsing bug\r\n\t\t\tstr = 'M0 0';\r\n\t\t}\r\n\t\tthis._path.setAttribute('d', str);\r\n\t},\r\n\r\n\t// TODO remove duplication with L.Map\r\n\t_initEvents: function () {\r\n\t\tif (this.options.clickable) {\r\n\t\t\tif (L.Browser.svg || !L.Browser.vml) {\r\n\t\t\t\tL.DomUtil.addClass(this._path, 'leaflet-clickable');\r\n\t\t\t}\r\n\r\n\t\t\tL.DomEvent.on(this._container, 'click', this._onMouseClick, this);\r\n\r\n\t\t\tvar events = ['dblclick', 'mousedown', 'mouseover',\r\n\t\t\t 'mouseout', 'mousemove', 'contextmenu'];\r\n\t\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\t\tL.DomEvent.on(this._container, events[i], this._fireMouseEvent, this);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_onMouseClick: function (e) {\r\n\t\tif (this._map.dragging && this._map.dragging.moved()) { return; }\r\n\r\n\t\tthis._fireMouseEvent(e);\r\n\t},\r\n\r\n\t_fireMouseEvent: function (e) {\r\n\t\tif (!this._map || !this.hasEventListeners(e.type)) { return; }\r\n\r\n\t\tvar map = this._map,\r\n\t\t containerPoint = map.mouseEventToContainerPoint(e),\r\n\t\t layerPoint = map.containerPointToLayerPoint(containerPoint),\r\n\t\t latlng = map.layerPointToLatLng(layerPoint);\r\n\r\n\t\tthis.fire(e.type, {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tlayerPoint: layerPoint,\r\n\t\t\tcontainerPoint: containerPoint,\r\n\t\t\toriginalEvent: e\r\n\t\t});\r\n\r\n\t\tif (e.type === 'contextmenu') {\r\n\t\t\tL.DomEvent.preventDefault(e);\r\n\t\t}\r\n\t\tif (e.type !== 'mousemove') {\r\n\t\t\tL.DomEvent.stopPropagation(e);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.Map.include({\r\n\t_initPathRoot: function () {\r\n\t\tif (!this._pathRoot) {\r\n\t\t\tthis._pathRoot = L.Path.prototype._createElement('svg');\r\n\t\t\tthis._panes.overlayPane.appendChild(this._pathRoot);\r\n\r\n\t\t\tif (this.options.zoomAnimation && L.Browser.any3d) {\r\n\t\t\t\tL.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-animated');\r\n\r\n\t\t\t\tthis.on({\r\n\t\t\t\t\t'zoomanim': this._animatePathZoom,\r\n\t\t\t\t\t'zoomend': this._endPathZoom\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tL.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-hide');\r\n\t\t\t}\r\n\r\n\t\t\tthis.on('moveend', this._updateSvgViewport);\r\n\t\t\tthis._updateSvgViewport();\r\n\t\t}\r\n\t},\r\n\r\n\t_animatePathZoom: function (e) {\r\n\t\tvar scale = this.getZoomScale(e.zoom),\r\n\t\t offset = this._getCenterOffset(e.center)._multiplyBy(-scale)._add(this._pathViewport.min);\r\n\r\n\t\tthis._pathRoot.style[L.DomUtil.TRANSFORM] =\r\n\t\t L.DomUtil.getTranslateString(offset) + ' scale(' + scale + ') ';\r\n\r\n\t\tthis._pathZooming = true;\r\n\t},\r\n\r\n\t_endPathZoom: function () {\r\n\t\tthis._pathZooming = false;\r\n\t},\r\n\r\n\t_updateSvgViewport: function () {\r\n\r\n\t\tif (this._pathZooming) {\r\n\t\t\t// Do not update SVGs while a zoom animation is going on otherwise the animation will break.\r\n\t\t\t// When the zoom animation ends we will be updated again anyway\r\n\t\t\t// This fixes the case where you do a momentum move and zoom while the move is still ongoing.\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._updatePathViewport();\r\n\r\n\t\tvar vp = this._pathViewport,\r\n\t\t min = vp.min,\r\n\t\t max = vp.max,\r\n\t\t width = max.x - min.x,\r\n\t\t height = max.y - min.y,\r\n\t\t root = this._pathRoot,\r\n\t\t pane = this._panes.overlayPane;\r\n\r\n\t\t// Hack to make flicker on drag end on mobile webkit less irritating\r\n\t\tif (L.Browser.mobileWebkit) {\r\n\t\t\tpane.removeChild(root);\r\n\t\t}\r\n\r\n\t\tL.DomUtil.setPosition(root, min);\r\n\t\troot.setAttribute('width', width);\r\n\t\troot.setAttribute('height', height);\r\n\t\troot.setAttribute('viewBox', [min.x, min.y, width, height].join(' '));\r\n\r\n\t\tif (L.Browser.mobileWebkit) {\r\n\t\t\tpane.appendChild(root);\r\n\t\t}\r\n\t}\r\n});\r\n\n\n/*\r\n * Popup extension to L.Path (polylines, polygons, circles), adding popup-related methods.\r\n */\r\n\r\nL.Path.include({\r\n\r\n\tbindPopup: function (content, options) {\r\n\r\n\t\tif (content instanceof L.Popup) {\r\n\t\t\tthis._popup = content;\r\n\t\t} else {\r\n\t\t\tif (!this._popup || options) {\r\n\t\t\t\tthis._popup = new L.Popup(options, this);\r\n\t\t\t}\r\n\t\t\tthis._popup.setContent(content);\r\n\t\t}\r\n\r\n\t\tif (!this._popupHandlersAdded) {\r\n\t\t\tthis\r\n\t\t\t .on('click', this._openPopup, this)\r\n\t\t\t .on('remove', this.closePopup, this);\r\n\r\n\t\t\tthis._popupHandlersAdded = true;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tunbindPopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup = null;\r\n\t\t\tthis\r\n\t\t\t .off('click', this._openPopup)\r\n\t\t\t .off('remove', this.closePopup);\r\n\r\n\t\t\tthis._popupHandlersAdded = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\topenPopup: function (latlng) {\r\n\r\n\t\tif (this._popup) {\r\n\t\t\t// open the popup from one of the path's points if not specified\r\n\t\t\tlatlng = latlng || this._latlng ||\r\n\t\t\t this._latlngs[Math.floor(this._latlngs.length / 2)];\r\n\r\n\t\t\tthis._openPopup({latlng: latlng});\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclosePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup._close();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_openPopup: function (e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t\tthis._map.openPopup(this._popup);\r\n\t}\r\n});\r\n\n\n/*\r\n * Vector rendering for IE6-8 through VML.\r\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\r\n */\r\n\r\nL.Browser.vml = !L.Browser.svg && (function () {\r\n\ttry {\r\n\t\tvar div = document.createElement('div');\r\n\t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n\t\tvar shape = div.firstChild;\r\n\t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n\t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t}\r\n}());\r\n\r\nL.Path = L.Browser.svg || !L.Browser.vml ? L.Path : L.Path.extend({\r\n\tstatics: {\r\n\t\tVML: true,\r\n\t\tCLIP_PADDING: 0.02\r\n\t},\r\n\r\n\t_createElement: (function () {\r\n\t\ttry {\r\n\t\t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\r\n\t\t\treturn function (name) {\r\n\t\t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\r\n\t\t\t};\r\n\t\t} catch (e) {\r\n\t\t\treturn function (name) {\r\n\t\t\t\treturn document.createElement(\r\n\t\t\t\t '<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\r\n\t\t\t};\r\n\t\t}\r\n\t}()),\r\n\r\n\t_initPath: function () {\r\n\t\tvar container = this._container = this._createElement('shape');\r\n\r\n\t\tL.DomUtil.addClass(container, 'leaflet-vml-shape' +\r\n\t\t\t(this.options.className ? ' ' + this.options.className : ''));\r\n\r\n\t\tif (this.options.clickable) {\r\n\t\t\tL.DomUtil.addClass(container, 'leaflet-clickable');\r\n\t\t}\r\n\r\n\t\tcontainer.coordsize = '1 1';\r\n\r\n\t\tthis._path = this._createElement('path');\r\n\t\tcontainer.appendChild(this._path);\r\n\r\n\t\tthis._map._pathRoot.appendChild(container);\r\n\t},\r\n\r\n\t_initStyle: function () {\r\n\t\tthis._updateStyle();\r\n\t},\r\n\r\n\t_updateStyle: function () {\r\n\t\tvar stroke = this._stroke,\r\n\t\t fill = this._fill,\r\n\t\t options = this.options,\r\n\t\t container = this._container;\r\n\r\n\t\tcontainer.stroked = options.stroke;\r\n\t\tcontainer.filled = options.fill;\r\n\r\n\t\tif (options.stroke) {\r\n\t\t\tif (!stroke) {\r\n\t\t\t\tstroke = this._stroke = this._createElement('stroke');\r\n\t\t\t\tstroke.endcap = 'round';\r\n\t\t\t\tcontainer.appendChild(stroke);\r\n\t\t\t}\r\n\t\t\tstroke.weight = options.weight + 'px';\r\n\t\t\tstroke.color = options.color;\r\n\t\t\tstroke.opacity = options.opacity;\r\n\r\n\t\t\tif (options.dashArray) {\r\n\t\t\t\tstroke.dashStyle = L.Util.isArray(options.dashArray) ?\r\n\t\t\t\t options.dashArray.join(' ') :\r\n\t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\r\n\t\t\t} else {\r\n\t\t\t\tstroke.dashStyle = '';\r\n\t\t\t}\r\n\t\t\tif (options.lineCap) {\r\n\t\t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\r\n\t\t\t}\r\n\t\t\tif (options.lineJoin) {\r\n\t\t\t\tstroke.joinstyle = options.lineJoin;\r\n\t\t\t}\r\n\r\n\t\t} else if (stroke) {\r\n\t\t\tcontainer.removeChild(stroke);\r\n\t\t\tthis._stroke = null;\r\n\t\t}\r\n\r\n\t\tif (options.fill) {\r\n\t\t\tif (!fill) {\r\n\t\t\t\tfill = this._fill = this._createElement('fill');\r\n\t\t\t\tcontainer.appendChild(fill);\r\n\t\t\t}\r\n\t\t\tfill.color = options.fillColor || options.color;\r\n\t\t\tfill.opacity = options.fillOpacity;\r\n\r\n\t\t} else if (fill) {\r\n\t\t\tcontainer.removeChild(fill);\r\n\t\t\tthis._fill = null;\r\n\t\t}\r\n\t},\r\n\r\n\t_updatePath: function () {\r\n\t\tvar style = this._container.style;\r\n\r\n\t\tstyle.display = 'none';\r\n\t\tthis._path.v = this.getPathString() + ' '; // the space fixes IE empty path string bug\r\n\t\tstyle.display = '';\r\n\t}\r\n});\r\n\r\nL.Map.include(L.Browser.svg || !L.Browser.vml ? {} : {\r\n\t_initPathRoot: function () {\r\n\t\tif (this._pathRoot) { return; }\r\n\r\n\t\tvar root = this._pathRoot = document.createElement('div');\r\n\t\troot.className = 'leaflet-vml-container';\r\n\t\tthis._panes.overlayPane.appendChild(root);\r\n\r\n\t\tthis.on('moveend', this._updatePathViewport);\r\n\t\tthis._updatePathViewport();\r\n\t}\r\n});\r\n\n\n/*\r\n * Vector rendering for all browsers that support canvas.\r\n */\r\n\r\nL.Browser.canvas = (function () {\r\n\treturn !!document.createElement('canvas').getContext;\r\n}());\r\n\r\nL.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path : L.Path.extend({\r\n\tstatics: {\r\n\t\t//CLIP_PADDING: 0.02, // not sure if there's a need to set it to a small value\r\n\t\tCANVAS: true,\r\n\t\tSVG: false\r\n\t},\r\n\r\n\tredraw: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis.projectLatlngs();\r\n\t\t\tthis._requestUpdate();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (style) {\r\n\t\tL.setOptions(this, style);\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateStyle();\r\n\t\t\tthis._requestUpdate();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap\r\n\t\t .off('viewreset', this.projectLatlngs, this)\r\n\t\t .off('moveend', this._updatePath, this);\r\n\r\n\t\tif (this.options.clickable) {\r\n\t\t\tthis._map.off('click', this._onClick, this);\r\n\t\t\tthis._map.off('mousemove', this._onMouseMove, this);\r\n\t\t}\r\n\r\n\t\tthis._requestUpdate();\r\n\t\t\r\n\t\tthis.fire('remove');\r\n\t\tthis._map = null;\r\n\t},\r\n\r\n\t_requestUpdate: function () {\r\n\t\tif (this._map && !L.Path._updateRequest) {\r\n\t\t\tL.Path._updateRequest = L.Util.requestAnimFrame(this._fireMapMoveEnd, this._map);\r\n\t\t}\r\n\t},\r\n\r\n\t_fireMapMoveEnd: function () {\r\n\t\tL.Path._updateRequest = null;\r\n\t\tthis.fire('moveend');\r\n\t},\r\n\r\n\t_initElements: function () {\r\n\t\tthis._map._initPathRoot();\r\n\t\tthis._ctx = this._map._canvasCtx;\r\n\t},\r\n\r\n\t_updateStyle: function () {\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.stroke) {\r\n\t\t\tthis._ctx.lineWidth = options.weight;\r\n\t\t\tthis._ctx.strokeStyle = options.color;\r\n\t\t}\r\n\t\tif (options.fill) {\r\n\t\t\tthis._ctx.fillStyle = options.fillColor || options.color;\r\n\t\t}\r\n\r\n\t\tif (options.lineCap) {\r\n\t\t\tthis._ctx.lineCap = options.lineCap;\r\n\t\t}\r\n\t\tif (options.lineJoin) {\r\n\t\t\tthis._ctx.lineJoin = options.lineJoin;\r\n\t\t}\r\n\t},\r\n\r\n\t_drawPath: function () {\r\n\t\tvar i, j, len, len2, point, drawMethod;\r\n\r\n\t\tthis._ctx.beginPath();\r\n\r\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\r\n\t\t\tfor (j = 0, len2 = this._parts[i].length; j < len2; j++) {\r\n\t\t\t\tpoint = this._parts[i][j];\r\n\t\t\t\tdrawMethod = (j === 0 ? 'move' : 'line') + 'To';\r\n\r\n\t\t\t\tthis._ctx[drawMethod](point.x, point.y);\r\n\t\t\t}\r\n\t\t\t// TODO refactor ugly hack\r\n\t\t\tif (this instanceof L.Polygon) {\r\n\t\t\t\tthis._ctx.closePath();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_checkIfEmpty: function () {\r\n\t\treturn !this._parts.length;\r\n\t},\r\n\r\n\t_updatePath: function () {\r\n\t\tif (this._checkIfEmpty()) { return; }\r\n\r\n\t\tvar ctx = this._ctx,\r\n\t\t options = this.options;\r\n\r\n\t\tthis._drawPath();\r\n\t\tctx.save();\r\n\t\tthis._updateStyle();\r\n\r\n\t\tif (options.fill) {\r\n\t\t\tctx.globalAlpha = options.fillOpacity;\r\n\t\t\tctx.fill(options.fillRule || 'evenodd');\r\n\t\t}\r\n\r\n\t\tif (options.stroke) {\r\n\t\t\tctx.globalAlpha = options.opacity;\r\n\t\t\tctx.stroke();\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\r\n\t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\r\n\t},\r\n\r\n\t_initEvents: function () {\r\n\t\tif (this.options.clickable) {\r\n\t\t\tthis._map.on('mousemove', this._onMouseMove, this);\r\n\t\t\tthis._map.on('click dblclick contextmenu', this._fireMouseEvent, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_fireMouseEvent: function (e) {\r\n\t\tif (this._containsPoint(e.layerPoint)) {\r\n\t\t\tthis.fire(e.type, e);\r\n\t\t}\r\n\t},\r\n\r\n\t_onMouseMove: function (e) {\r\n\t\tif (!this._map || this._map._animatingZoom) { return; }\r\n\r\n\t\t// TODO don't do on each move\r\n\t\tif (this._containsPoint(e.layerPoint)) {\r\n\t\t\tthis._ctx.canvas.style.cursor = 'pointer';\r\n\t\t\tthis._mouseInside = true;\r\n\t\t\tthis.fire('mouseover', e);\r\n\r\n\t\t} else if (this._mouseInside) {\r\n\t\t\tthis._ctx.canvas.style.cursor = '';\r\n\t\t\tthis._mouseInside = false;\r\n\t\t\tthis.fire('mouseout', e);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.Map.include((L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? {} : {\r\n\t_initPathRoot: function () {\r\n\t\tvar root = this._pathRoot,\r\n\t\t ctx;\r\n\r\n\t\tif (!root) {\r\n\t\t\troot = this._pathRoot = document.createElement('canvas');\r\n\t\t\troot.style.position = 'absolute';\r\n\t\t\tctx = this._canvasCtx = root.getContext('2d');\r\n\r\n\t\t\tctx.lineCap = 'round';\r\n\t\t\tctx.lineJoin = 'round';\r\n\r\n\t\t\tthis._panes.overlayPane.appendChild(root);\r\n\r\n\t\t\tif (this.options.zoomAnimation) {\r\n\t\t\t\tthis._pathRoot.className = 'leaflet-zoom-animated';\r\n\t\t\t\tthis.on('zoomanim', this._animatePathZoom);\r\n\t\t\t\tthis.on('zoomend', this._endPathZoom);\r\n\t\t\t}\r\n\t\t\tthis.on('moveend', this._updateCanvasViewport);\r\n\t\t\tthis._updateCanvasViewport();\r\n\t\t}\r\n\t},\r\n\r\n\t_updateCanvasViewport: function () {\r\n\t\t// don't redraw while zooming. See _updateSvgViewport for more details\r\n\t\tif (this._pathZooming) { return; }\r\n\t\tthis._updatePathViewport();\r\n\r\n\t\tvar vp = this._pathViewport,\r\n\t\t min = vp.min,\r\n\t\t size = vp.max.subtract(min),\r\n\t\t root = this._pathRoot;\r\n\r\n\t\t//TODO check if this works properly on mobile webkit\r\n\t\tL.DomUtil.setPosition(root, min);\r\n\t\troot.width = size.x;\r\n\t\troot.height = size.y;\r\n\t\troot.getContext('2d').translate(-min.x, -min.y);\r\n\t}\r\n});\r\n\n\n/*\r\n * L.LineUtil contains different utility functions for line segments\r\n * and polylines (clipping, simplification, distances, etc.)\r\n */\r\n\r\n/*jshint bitwise:false */ // allow bitwise operations for this file\r\n\r\nL.LineUtil = {\r\n\r\n\t// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n\t// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n\tsimplify: function (/*Point[]*/ points, /*Number*/ tolerance) {\r\n\t\tif (!tolerance || !points.length) {\r\n\t\t\treturn points.slice();\r\n\t\t}\r\n\r\n\t\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t\t// stage 1: vertex reduction\r\n\t\tpoints = this._reducePoints(points, sqTolerance);\r\n\r\n\t\t// stage 2: Douglas-Peucker simplification\r\n\t\tpoints = this._simplifyDP(points, sqTolerance);\r\n\r\n\t\treturn points;\r\n\t},\r\n\r\n\t// distance from a point to a segment between two points\r\n\tpointToSegmentDistance: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) {\r\n\t\treturn Math.sqrt(this._sqClosestPointOnSegment(p, p1, p2, true));\r\n\t},\r\n\r\n\tclosestPointOnSegment: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) {\r\n\t\treturn this._sqClosestPointOnSegment(p, p1, p2);\r\n\t},\r\n\r\n\t// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm\r\n\t_simplifyDP: function (points, sqTolerance) {\r\n\r\n\t\tvar len = points.length,\r\n\t\t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t\t markers = new ArrayConstructor(len);\r\n\r\n\t\tmarkers[0] = markers[len - 1] = 1;\r\n\r\n\t\tthis._simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\t\tvar i,\r\n\t\t newPoints = [];\r\n\r\n\t\tfor (i = 0; i < len; i++) {\r\n\t\t\tif (markers[i]) {\r\n\t\t\t\tnewPoints.push(points[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn newPoints;\r\n\t},\r\n\r\n\t_simplifyDPStep: function (points, markers, sqTolerance, first, last) {\r\n\r\n\t\tvar maxSqDist = 0,\r\n\t\t index, i, sqDist;\r\n\r\n\t\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\t\tsqDist = this._sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\t\tif (sqDist > maxSqDist) {\r\n\t\t\t\tindex = i;\r\n\t\t\t\tmaxSqDist = sqDist;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (maxSqDist > sqTolerance) {\r\n\t\t\tmarkers[index] = 1;\r\n\r\n\t\t\tthis._simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t\tthis._simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t\t}\r\n\t},\r\n\r\n\t// reduce points that are too close to each other to a single point\r\n\t_reducePoints: function (points, sqTolerance) {\r\n\t\tvar reducedPoints = [points[0]];\r\n\r\n\t\tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n\t\t\tif (this._sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\t\treducedPoints.push(points[i]);\r\n\t\t\t\tprev = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (prev < len - 1) {\r\n\t\t\treducedPoints.push(points[len - 1]);\r\n\t\t}\r\n\t\treturn reducedPoints;\r\n\t},\r\n\r\n\t// Cohen-Sutherland line clipping algorithm.\r\n\t// Used to avoid rendering parts of a polyline that are not currently visible.\r\n\r\n\tclipSegment: function (a, b, bounds, useLastCode) {\r\n\t\tvar codeA = useLastCode ? this._lastCode : this._getBitCode(a, bounds),\r\n\t\t codeB = this._getBitCode(b, bounds),\r\n\r\n\t\t codeOut, p, newCode;\r\n\r\n\t\t// save 2nd code to avoid calculating it on the next segment\r\n\t\tthis._lastCode = codeB;\r\n\r\n\t\twhile (true) {\r\n\t\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\t\tif (!(codeA | codeB)) {\r\n\t\t\t\treturn [a, b];\r\n\t\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\t\t} else if (codeA & codeB) {\r\n\t\t\t\treturn false;\r\n\t\t\t// other cases\r\n\t\t\t} else {\r\n\t\t\t\tcodeOut = codeA || codeB;\r\n\t\t\t\tp = this._getEdgeIntersection(a, b, codeOut, bounds);\r\n\t\t\t\tnewCode = this._getBitCode(p, bounds);\r\n\r\n\t\t\t\tif (codeOut === codeA) {\r\n\t\t\t\t\ta = p;\r\n\t\t\t\t\tcodeA = newCode;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tb = p;\r\n\t\t\t\t\tcodeB = newCode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_getEdgeIntersection: function (a, b, code, bounds) {\r\n\t\tvar dx = b.x - a.x,\r\n\t\t dy = b.y - a.y,\r\n\t\t min = bounds.min,\r\n\t\t max = bounds.max;\r\n\r\n\t\tif (code & 8) { // top\r\n\t\t\treturn new L.Point(a.x + dx * (max.y - a.y) / dy, max.y);\r\n\t\t} else if (code & 4) { // bottom\r\n\t\t\treturn new L.Point(a.x + dx * (min.y - a.y) / dy, min.y);\r\n\t\t} else if (code & 2) { // right\r\n\t\t\treturn new L.Point(max.x, a.y + dy * (max.x - a.x) / dx);\r\n\t\t} else if (code & 1) { // left\r\n\t\t\treturn new L.Point(min.x, a.y + dy * (min.x - a.x) / dx);\r\n\t\t}\r\n\t},\r\n\r\n\t_getBitCode: function (/*Point*/ p, bounds) {\r\n\t\tvar code = 0;\r\n\r\n\t\tif (p.x < bounds.min.x) { // left\r\n\t\t\tcode |= 1;\r\n\t\t} else if (p.x > bounds.max.x) { // right\r\n\t\t\tcode |= 2;\r\n\t\t}\r\n\t\tif (p.y < bounds.min.y) { // bottom\r\n\t\t\tcode |= 4;\r\n\t\t} else if (p.y > bounds.max.y) { // top\r\n\t\t\tcode |= 8;\r\n\t\t}\r\n\r\n\t\treturn code;\r\n\t},\r\n\r\n\t// square distance (to avoid unnecessary Math.sqrt calls)\r\n\t_sqDist: function (p1, p2) {\r\n\t\tvar dx = p2.x - p1.x,\r\n\t\t dy = p2.y - p1.y;\r\n\t\treturn dx * dx + dy * dy;\r\n\t},\r\n\r\n\t// return closest point on segment or distance to that point\r\n\t_sqClosestPointOnSegment: function (p, p1, p2, sqDist) {\r\n\t\tvar x = p1.x,\r\n\t\t y = p1.y,\r\n\t\t dx = p2.x - x,\r\n\t\t dy = p2.y - y,\r\n\t\t dot = dx * dx + dy * dy,\r\n\t\t t;\r\n\r\n\t\tif (dot > 0) {\r\n\t\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\t\tif (t > 1) {\r\n\t\t\t\tx = p2.x;\r\n\t\t\t\ty = p2.y;\r\n\t\t\t} else if (t > 0) {\r\n\t\t\t\tx += dx * t;\r\n\t\t\t\ty += dy * t;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdx = p.x - x;\r\n\t\tdy = p.y - y;\r\n\r\n\t\treturn sqDist ? dx * dx + dy * dy : new L.Point(x, y);\r\n\t}\r\n};\r\n\n\n/*\r\n * L.Polyline is used to display polylines on a map.\r\n */\r\n\r\nL.Polyline = L.Path.extend({\r\n\tinitialize: function (latlngs, options) {\r\n\t\tL.Path.prototype.initialize.call(this, options);\r\n\r\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\r\n\t},\r\n\r\n\toptions: {\r\n\t\t// how much to simplify the polyline on each zoom level\r\n\t\t// more = better performance and smoother look, less = more accurate\r\n\t\tsmoothFactor: 1.0,\r\n\t\tnoClip: false\r\n\t},\r\n\r\n\tprojectLatlngs: function () {\r\n\t\tthis._originalPoints = [];\r\n\r\n\t\tfor (var i = 0, len = this._latlngs.length; i < len; i++) {\r\n\t\t\tthis._originalPoints[i] = this._map.latLngToLayerPoint(this._latlngs[i]);\r\n\t\t}\r\n\t},\r\n\r\n\tgetPathString: function () {\r\n\t\tfor (var i = 0, len = this._parts.length, str = ''; i < len; i++) {\r\n\t\t\tstr += this._getPathPartStr(this._parts[i]);\r\n\t\t}\r\n\t\treturn str;\r\n\t},\r\n\r\n\tgetLatLngs: function () {\r\n\t\treturn this._latlngs;\r\n\t},\r\n\r\n\tsetLatLngs: function (latlngs) {\r\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\r\n\t\treturn this.redraw();\r\n\t},\r\n\r\n\taddLatLng: function (latlng) {\r\n\t\tthis._latlngs.push(L.latLng(latlng));\r\n\t\treturn this.redraw();\r\n\t},\r\n\r\n\tspliceLatLngs: function () { // (Number index, Number howMany)\r\n\t\tvar removed = [].splice.apply(this._latlngs, arguments);\r\n\t\tthis._convertLatLngs(this._latlngs, true);\r\n\t\tthis.redraw();\r\n\t\treturn removed;\r\n\t},\r\n\r\n\tclosestLayerPoint: function (p) {\r\n\t\tvar minDistance = Infinity, parts = this._parts, p1, p2, minPoint = null;\r\n\r\n\t\tfor (var j = 0, jLen = parts.length; j < jLen; j++) {\r\n\t\t\tvar points = parts[j];\r\n\t\t\tfor (var i = 1, len = points.length; i < len; i++) {\r\n\t\t\t\tp1 = points[i - 1];\r\n\t\t\t\tp2 = points[i];\r\n\t\t\t\tvar sqDist = L.LineUtil._sqClosestPointOnSegment(p, p1, p2, true);\r\n\t\t\t\tif (sqDist < minDistance) {\r\n\t\t\t\t\tminDistance = sqDist;\r\n\t\t\t\t\tminPoint = L.LineUtil._sqClosestPointOnSegment(p, p1, p2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (minPoint) {\r\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\r\n\t\t}\r\n\t\treturn minPoint;\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\treturn new L.LatLngBounds(this.getLatLngs());\r\n\t},\r\n\r\n\t_convertLatLngs: function (latlngs, overwrite) {\r\n\t\tvar i, len, target = overwrite ? latlngs : [];\r\n\r\n\t\tfor (i = 0, len = latlngs.length; i < len; i++) {\r\n\t\t\tif (L.Util.isArray(latlngs[i]) && typeof latlngs[i][0] !== 'number') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttarget[i] = L.latLng(latlngs[i]);\r\n\t\t}\r\n\t\treturn target;\r\n\t},\r\n\r\n\t_initEvents: function () {\r\n\t\tL.Path.prototype._initEvents.call(this);\r\n\t},\r\n\r\n\t_getPathPartStr: function (points) {\r\n\t\tvar round = L.Path.VML;\r\n\r\n\t\tfor (var j = 0, len2 = points.length, str = '', p; j < len2; j++) {\r\n\t\t\tp = points[j];\r\n\t\t\tif (round) {\r\n\t\t\t\tp._round();\r\n\t\t\t}\r\n\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\r\n\t\t}\r\n\t\treturn str;\r\n\t},\r\n\r\n\t_clipPoints: function () {\r\n\t\tvar points = this._originalPoints,\r\n\t\t len = points.length,\r\n\t\t i, k, segment;\r\n\r\n\t\tif (this.options.noClip) {\r\n\t\t\tthis._parts = [points];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._parts = [];\r\n\r\n\t\tvar parts = this._parts,\r\n\t\t vp = this._map._pathViewport,\r\n\t\t lu = L.LineUtil;\r\n\r\n\t\tfor (i = 0, k = 0; i < len - 1; i++) {\r\n\t\t\tsegment = lu.clipSegment(points[i], points[i + 1], vp, i);\r\n\t\t\tif (!segment) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tparts[k] = parts[k] || [];\r\n\t\t\tparts[k].push(segment[0]);\r\n\r\n\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\r\n\t\t\tif ((segment[1] !== points[i + 1]) || (i === len - 2)) {\r\n\t\t\t\tparts[k].push(segment[1]);\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// simplify each clipped part of the polyline\r\n\t_simplifyPoints: function () {\r\n\t\tvar parts = this._parts,\r\n\t\t lu = L.LineUtil;\r\n\r\n\t\tfor (var i = 0, len = parts.length; i < len; i++) {\r\n\t\t\tparts[i] = lu.simplify(parts[i], this.options.smoothFactor);\r\n\t\t}\r\n\t},\r\n\r\n\t_updatePath: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._clipPoints();\r\n\t\tthis._simplifyPoints();\r\n\r\n\t\tL.Path.prototype._updatePath.call(this);\r\n\t}\r\n});\r\n\r\nL.polyline = function (latlngs, options) {\r\n\treturn new L.Polyline(latlngs, options);\r\n};\r\n\n\n/*\r\n * L.PolyUtil contains utility functions for polygons (clipping, etc.).\r\n */\r\n\r\n/*jshint bitwise:false */ // allow bitwise operations here\r\n\r\nL.PolyUtil = {};\r\n\r\n/*\r\n * Sutherland-Hodgeman polygon clipping algorithm.\r\n * Used to avoid rendering parts of a polygon that are not currently visible.\r\n */\r\nL.PolyUtil.clipPolygon = function (points, bounds) {\r\n\tvar clippedPoints,\r\n\t edges = [1, 4, 2, 8],\r\n\t i, j, k,\r\n\t a, b,\r\n\t len, edge, p,\r\n\t lu = L.LineUtil;\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = lu._getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = lu._getEdgeIntersection(b, a, edge, bounds);\r\n\t\t\t\t\tp._code = lu._getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = lu._getEdgeIntersection(b, a, edge, bounds);\r\n\t\t\t\tp._code = lu._getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n};\r\n\n\n/*\r\n * L.Polygon is used to display polygons on a map.\r\n */\r\n\r\nL.Polygon = L.Polyline.extend({\r\n\toptions: {\r\n\t\tfill: true\r\n\t},\r\n\r\n\tinitialize: function (latlngs, options) {\r\n\t\tL.Polyline.prototype.initialize.call(this, latlngs, options);\r\n\t\tthis._initWithHoles(latlngs);\r\n\t},\r\n\r\n\t_initWithHoles: function (latlngs) {\r\n\t\tvar i, len, hole;\r\n\t\tif (latlngs && L.Util.isArray(latlngs[0]) && (typeof latlngs[0][0] !== 'number')) {\r\n\t\t\tthis._latlngs = this._convertLatLngs(latlngs[0]);\r\n\t\t\tthis._holes = latlngs.slice(1);\r\n\r\n\t\t\tfor (i = 0, len = this._holes.length; i < len; i++) {\r\n\t\t\t\thole = this._holes[i] = this._convertLatLngs(this._holes[i]);\r\n\t\t\t\tif (hole[0].equals(hole[hole.length - 1])) {\r\n\t\t\t\t\thole.pop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// filter out last point if its equal to the first one\r\n\t\tlatlngs = this._latlngs;\r\n\r\n\t\tif (latlngs.length >= 2 && latlngs[0].equals(latlngs[latlngs.length - 1])) {\r\n\t\t\tlatlngs.pop();\r\n\t\t}\r\n\t},\r\n\r\n\tprojectLatlngs: function () {\r\n\t\tL.Polyline.prototype.projectLatlngs.call(this);\r\n\r\n\t\t// project polygon holes points\r\n\t\t// TODO move this logic to Polyline to get rid of duplication\r\n\t\tthis._holePoints = [];\r\n\r\n\t\tif (!this._holes) { return; }\r\n\r\n\t\tvar i, j, len, len2;\r\n\r\n\t\tfor (i = 0, len = this._holes.length; i < len; i++) {\r\n\t\t\tthis._holePoints[i] = [];\r\n\r\n\t\t\tfor (j = 0, len2 = this._holes[i].length; j < len2; j++) {\r\n\t\t\t\tthis._holePoints[i][j] = this._map.latLngToLayerPoint(this._holes[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsetLatLngs: function (latlngs) {\r\n\t\tif (latlngs && L.Util.isArray(latlngs[0]) && (typeof latlngs[0][0] !== 'number')) {\r\n\t\t\tthis._initWithHoles(latlngs);\r\n\t\t\treturn this.redraw();\r\n\t\t} else {\r\n\t\t\treturn L.Polyline.prototype.setLatLngs.call(this, latlngs);\r\n\t\t}\r\n\t},\r\n\r\n\t_clipPoints: function () {\r\n\t\tvar points = this._originalPoints,\r\n\t\t newParts = [];\r\n\r\n\t\tthis._parts = [points].concat(this._holePoints);\r\n\r\n\t\tif (this.options.noClip) { return; }\r\n\r\n\t\tfor (var i = 0, len = this._parts.length; i < len; i++) {\r\n\t\t\tvar clipped = L.PolyUtil.clipPolygon(this._parts[i], this._map._pathViewport);\r\n\t\t\tif (clipped.length) {\r\n\t\t\t\tnewParts.push(clipped);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._parts = newParts;\r\n\t},\r\n\r\n\t_getPathPartStr: function (points) {\r\n\t\tvar str = L.Polyline.prototype._getPathPartStr.call(this, points);\r\n\t\treturn str + (L.Browser.svg ? 'z' : 'x');\r\n\t}\r\n});\r\n\r\nL.polygon = function (latlngs, options) {\r\n\treturn new L.Polygon(latlngs, options);\r\n};\r\n\n\n/*\r\n * Contains L.MultiPolyline and L.MultiPolygon layers.\r\n */\r\n\r\n(function () {\r\n\tfunction createMulti(Klass) {\r\n\r\n\t\treturn L.FeatureGroup.extend({\r\n\r\n\t\t\tinitialize: function (latlngs, options) {\r\n\t\t\t\tthis._layers = {};\r\n\t\t\t\tthis._options = options;\r\n\t\t\t\tthis.setLatLngs(latlngs);\r\n\t\t\t},\r\n\r\n\t\t\tsetLatLngs: function (latlngs) {\r\n\t\t\t\tvar i = 0,\r\n\t\t\t\t len = latlngs.length;\r\n\r\n\t\t\t\tthis.eachLayer(function (layer) {\r\n\t\t\t\t\tif (i < len) {\r\n\t\t\t\t\t\tlayer.setLatLngs(latlngs[i++]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.removeLayer(layer);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, this);\r\n\r\n\t\t\t\twhile (i < len) {\r\n\t\t\t\t\tthis.addLayer(new Klass(latlngs[i++], this._options));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\tgetLatLngs: function () {\r\n\t\t\t\tvar latlngs = [];\r\n\r\n\t\t\t\tthis.eachLayer(function (layer) {\r\n\t\t\t\t\tlatlngs.push(layer.getLatLngs());\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn latlngs;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tL.MultiPolyline = createMulti(L.Polyline);\r\n\tL.MultiPolygon = createMulti(L.Polygon);\r\n\r\n\tL.multiPolyline = function (latlngs, options) {\r\n\t\treturn new L.MultiPolyline(latlngs, options);\r\n\t};\r\n\r\n\tL.multiPolygon = function (latlngs, options) {\r\n\t\treturn new L.MultiPolygon(latlngs, options);\r\n\t};\r\n}());\r\n\n\n/*\r\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\r\n */\r\n\r\nL.Rectangle = L.Polygon.extend({\r\n\tinitialize: function (latLngBounds, options) {\r\n\t\tL.Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\r\n\t},\r\n\r\n\tsetBounds: function (latLngBounds) {\r\n\t\tthis.setLatLngs(this._boundsToLatLngs(latLngBounds));\r\n\t},\r\n\r\n\t_boundsToLatLngs: function (latLngBounds) {\r\n\t\tlatLngBounds = L.latLngBounds(latLngBounds);\r\n\t\treturn [\r\n\t\t\tlatLngBounds.getSouthWest(),\r\n\t\t\tlatLngBounds.getNorthWest(),\r\n\t\t\tlatLngBounds.getNorthEast(),\r\n\t\t\tlatLngBounds.getSouthEast()\r\n\t\t];\r\n\t}\r\n});\r\n\r\nL.rectangle = function (latLngBounds, options) {\r\n\treturn new L.Rectangle(latLngBounds, options);\r\n};\r\n\n\n/*\r\n * L.Circle is a circle overlay (with a certain radius in meters).\r\n */\r\n\r\nL.Circle = L.Path.extend({\r\n\tinitialize: function (latlng, radius, options) {\r\n\t\tL.Path.prototype.initialize.call(this, options);\r\n\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t\tthis._mRadius = radius;\r\n\t},\r\n\r\n\toptions: {\r\n\t\tfill: true\r\n\t},\r\n\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t\treturn this.redraw();\r\n\t},\r\n\r\n\tsetRadius: function (radius) {\r\n\t\tthis._mRadius = radius;\r\n\t\treturn this.redraw();\r\n\t},\r\n\r\n\tprojectLatlngs: function () {\r\n\t\tvar lngRadius = this._getLngRadius(),\r\n\t\t latlng = this._latlng,\r\n\t\t pointLeft = this._map.latLngToLayerPoint([latlng.lat, latlng.lng - lngRadius]);\r\n\r\n\t\tthis._point = this._map.latLngToLayerPoint(latlng);\r\n\t\tthis._radius = Math.max(this._point.x - pointLeft.x, 1);\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\tvar lngRadius = this._getLngRadius(),\r\n\t\t latRadius = (this._mRadius / 40075017) * 360,\r\n\t\t latlng = this._latlng;\r\n\r\n\t\treturn new L.LatLngBounds(\r\n\t\t [latlng.lat - latRadius, latlng.lng - lngRadius],\r\n\t\t [latlng.lat + latRadius, latlng.lng + lngRadius]);\r\n\t},\r\n\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\tgetPathString: function () {\r\n\t\tvar p = this._point,\r\n\t\t r = this._radius;\r\n\r\n\t\tif (this._checkIfEmpty()) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\tif (L.Browser.svg) {\r\n\t\t\treturn 'M' + p.x + ',' + (p.y - r) +\r\n\t\t\t 'A' + r + ',' + r + ',0,1,1,' +\r\n\t\t\t (p.x - 0.1) + ',' + (p.y - r) + ' z';\r\n\t\t} else {\r\n\t\t\tp._round();\r\n\t\t\tr = Math.round(r);\r\n\t\t\treturn 'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r + ' 0,' + (65535 * 360);\r\n\t\t}\r\n\t},\r\n\r\n\tgetRadius: function () {\r\n\t\treturn this._mRadius;\r\n\t},\r\n\r\n\t// TODO Earth hardcoded, move into projection code!\r\n\r\n\t_getLatRadius: function () {\r\n\t\treturn (this._mRadius / 40075017) * 360;\r\n\t},\r\n\r\n\t_getLngRadius: function () {\r\n\t\treturn this._getLatRadius() / Math.cos(L.LatLng.DEG_TO_RAD * this._latlng.lat);\r\n\t},\r\n\r\n\t_checkIfEmpty: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar vp = this._map._pathViewport,\r\n\t\t r = this._radius,\r\n\t\t p = this._point;\r\n\r\n\t\treturn p.x - r > vp.max.x || p.y - r > vp.max.y ||\r\n\t\t p.x + r < vp.min.x || p.y + r < vp.min.y;\r\n\t}\r\n});\r\n\r\nL.circle = function (latlng, radius, options) {\r\n\treturn new L.Circle(latlng, radius, options);\r\n};\r\n\n\n/*\r\n * L.CircleMarker is a circle overlay with a permanent pixel radius.\r\n */\r\n\r\nL.CircleMarker = L.Circle.extend({\r\n\toptions: {\r\n\t\tradius: 10,\r\n\t\tweight: 2\r\n\t},\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tL.Circle.prototype.initialize.call(this, latlng, null, options);\r\n\t\tthis._radius = this.options.radius;\r\n\t},\r\n\r\n\tprojectLatlngs: function () {\r\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\r\n\t},\r\n\r\n\t_updateStyle : function () {\r\n\t\tL.Circle.prototype._updateStyle.call(this);\r\n\t\tthis.setRadius(this.options.radius);\r\n\t},\r\n\r\n\tsetLatLng: function (latlng) {\r\n\t\tL.Circle.prototype.setLatLng.call(this, latlng);\r\n\t\tif (this._popup && this._popup._isOpen) {\r\n\t\t\tthis._popup.setLatLng(latlng);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetRadius: function (radius) {\r\n\t\tthis.options.radius = this._radius = radius;\r\n\t\treturn this.redraw();\r\n\t},\r\n\r\n\tgetRadius: function () {\r\n\t\treturn this._radius;\r\n\t}\r\n});\r\n\r\nL.circleMarker = function (latlng, options) {\r\n\treturn new L.CircleMarker(latlng, options);\r\n};\r\n\n\n/*\r\n * Extends L.Polyline to be able to manually detect clicks on Canvas-rendered polylines.\r\n */\r\n\r\nL.Polyline.include(!L.Path.CANVAS ? {} : {\r\n\t_containsPoint: function (p, closed) {\r\n\t\tvar i, j, k, len, len2, dist, part,\r\n\t\t w = this.options.weight / 2;\r\n\r\n\t\tif (L.Browser.touch) {\r\n\t\t\tw += 10; // polyline click tolerance on touch devices\r\n\t\t}\r\n\r\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\r\n\t\t\tpart = this._parts[i];\r\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\r\n\t\t\t\tif (!closed && (j === 0)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdist = L.LineUtil.pointToSegmentDistance(p, part[k], part[j]);\r\n\r\n\t\t\t\tif (dist <= w) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n});\r\n\n\n/*\r\n * Extends L.Polygon to be able to manually detect clicks on Canvas-rendered polygons.\r\n */\r\n\r\nL.Polygon.include(!L.Path.CANVAS ? {} : {\r\n\t_containsPoint: function (p) {\r\n\t\tvar inside = false,\r\n\t\t part, p1, p2,\r\n\t\t i, j, k,\r\n\t\t len, len2;\r\n\r\n\t\t// TODO optimization: check if within bounds first\r\n\r\n\t\tif (L.Polyline.prototype._containsPoint.call(this, p, true)) {\r\n\t\t\t// click on polygon border\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// ray casting algorithm for detecting if point is in polygon\r\n\r\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\r\n\t\t\tpart = this._parts[i];\r\n\r\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\r\n\t\t\t\tp1 = part[j];\r\n\t\t\t\tp2 = part[k];\r\n\r\n\t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) &&\r\n\t\t\t\t\t\t(p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\r\n\t\t\t\t\tinside = !inside;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn inside;\r\n\t}\r\n});\r\n\n\n/*\r\n * Extends L.Circle with Canvas-specific code.\r\n */\r\n\r\nL.Circle.include(!L.Path.CANVAS ? {} : {\r\n\t_drawPath: function () {\r\n\t\tvar p = this._point;\r\n\t\tthis._ctx.beginPath();\r\n\t\tthis._ctx.arc(p.x, p.y, this._radius, 0, Math.PI * 2, false);\r\n\t},\r\n\r\n\t_containsPoint: function (p) {\r\n\t\tvar center = this._point,\r\n\t\t w2 = this.options.stroke ? this.options.weight / 2 : 0;\r\n\r\n\t\treturn (p.distanceTo(center) <= this._radius + w2);\r\n\t}\r\n});\r\n\n\n/*\n * CircleMarker canvas specific drawing parts.\n */\n\nL.CircleMarker.include(!L.Path.CANVAS ? {} : {\n\t_updateStyle: function () {\n\t\tL.Path.prototype._updateStyle.call(this);\n\t}\n});\n\n\n/*\r\n * L.GeoJSON turns any GeoJSON data into a Leaflet layer.\r\n */\r\n\r\nL.GeoJSON = L.FeatureGroup.extend({\r\n\r\n\tinitialize: function (geojson, options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t},\r\n\r\n\taddData: function (geojson) {\r\n\t\tvar features = L.Util.isArray(geojson) ? geojson : geojson.features,\r\n\t\t i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// Only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(features[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return; }\r\n\r\n\t\tvar layer = L.GeoJSON.geometryToLayer(geojson, options.pointToLayer, options.coordsToLatLng, options);\r\n\t\tlayer.feature = L.GeoJSON.asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t},\r\n\r\n\tresetStyle: function (layer) {\r\n\t\tvar style = this.options.style;\r\n\t\tif (style) {\r\n\t\t\t// reset any custom styles\r\n\t\t\tL.Util.extend(layer.options, layer.defaultOptions);\r\n\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}\r\n\t},\r\n\r\n\tsetStyle: function (style) {\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (layer, style) {\r\n\t\tif (typeof style === 'function') {\r\n\t\t\tstyle = style(layer.feature);\r\n\t\t}\r\n\t\tif (layer.setStyle) {\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.extend(L.GeoJSON, {\r\n\tgeometryToLayer: function (geojson, pointToLayer, coordsToLatLng, vectorOptions) {\r\n\t\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t\t coords = geometry.coordinates,\r\n\t\t layers = [],\r\n\t\t latlng, latlngs, i, len;\r\n\r\n\t\tcoordsToLatLng = coordsToLatLng || this.coordsToLatLng;\r\n\r\n\t\tswitch (geometry.type) {\r\n\t\tcase 'Point':\r\n\t\t\tlatlng = coordsToLatLng(coords);\r\n\t\t\treturn pointToLayer ? pointToLayer(geojson, latlng) : new L.Marker(latlng);\r\n\r\n\t\tcase 'MultiPoint':\r\n\t\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\t\tlatlng = coordsToLatLng(coords[i]);\r\n\t\t\t\tlayers.push(pointToLayer ? pointToLayer(geojson, latlng) : new L.Marker(latlng));\r\n\t\t\t}\r\n\t\t\treturn new L.FeatureGroup(layers);\r\n\r\n\t\tcase 'LineString':\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, 0, coordsToLatLng);\r\n\t\t\treturn new L.Polyline(latlngs, vectorOptions);\r\n\r\n\t\tcase 'Polygon':\r\n\t\t\tif (coords.length === 2 && !coords[1].length) {\r\n\t\t\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t\t\t}\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, 1, coordsToLatLng);\r\n\t\t\treturn new L.Polygon(latlngs, vectorOptions);\r\n\r\n\t\tcase 'MultiLineString':\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, 1, coordsToLatLng);\r\n\t\t\treturn new L.MultiPolyline(latlngs, vectorOptions);\r\n\r\n\t\tcase 'MultiPolygon':\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, 2, coordsToLatLng);\r\n\t\t\treturn new L.MultiPolygon(latlngs, vectorOptions);\r\n\r\n\t\tcase 'GeometryCollection':\r\n\t\t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\r\n\t\t\t\tlayers.push(this.geometryToLayer({\r\n\t\t\t\t\tgeometry: geometry.geometries[i],\r\n\t\t\t\t\ttype: 'Feature',\r\n\t\t\t\t\tproperties: geojson.properties\r\n\t\t\t\t}, pointToLayer, coordsToLatLng, vectorOptions));\r\n\t\t\t}\r\n\t\t\treturn new L.FeatureGroup(layers);\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t\t}\r\n\t},\r\n\r\n\tcoordsToLatLng: function (coords) { // (Array[, Boolean]) -> LatLng\r\n\t\treturn new L.LatLng(coords[1], coords[0], coords[2]);\r\n\t},\r\n\r\n\tcoordsToLatLngs: function (coords, levelsDeep, coordsToLatLng) { // (Array[, Number, Function]) -> Array\r\n\t\tvar latlng, i, len,\r\n\t\t latlngs = [];\r\n\r\n\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\tlatlng = levelsDeep ?\r\n\t\t\t this.coordsToLatLngs(coords[i], levelsDeep - 1, coordsToLatLng) :\r\n\t\t\t (coordsToLatLng || this.coordsToLatLng)(coords[i]);\r\n\r\n\t\t\tlatlngs.push(latlng);\r\n\t\t}\r\n\r\n\t\treturn latlngs;\r\n\t},\r\n\r\n\tlatLngToCoords: function (latlng) {\r\n\t\tvar coords = [latlng.lng, latlng.lat];\r\n\r\n\t\tif (latlng.alt !== undefined) {\r\n\t\t\tcoords.push(latlng.alt);\r\n\t\t}\r\n\t\treturn coords;\r\n\t},\r\n\r\n\tlatLngsToCoords: function (latLngs) {\r\n\t\tvar coords = [];\r\n\r\n\t\tfor (var i = 0, len = latLngs.length; i < len; i++) {\r\n\t\t\tcoords.push(L.GeoJSON.latLngToCoords(latLngs[i]));\r\n\t\t}\r\n\r\n\t\treturn coords;\r\n\t},\r\n\r\n\tgetFeature: function (layer, newGeometry) {\r\n\t\treturn layer.feature ? L.extend({}, layer.feature, {geometry: newGeometry}) : L.GeoJSON.asFeature(newGeometry);\r\n\t},\r\n\r\n\tasFeature: function (geoJSON) {\r\n\t\tif (geoJSON.type === 'Feature') {\r\n\t\t\treturn geoJSON;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'Feature',\r\n\t\t\tproperties: {},\r\n\t\t\tgeometry: geoJSON\r\n\t\t};\r\n\t}\r\n});\r\n\r\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function () {\r\n\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: L.GeoJSON.latLngToCoords(this.getLatLng())\r\n\t\t});\r\n\t}\r\n};\r\n\r\nL.Marker.include(PointToGeoJSON);\r\nL.Circle.include(PointToGeoJSON);\r\nL.CircleMarker.include(PointToGeoJSON);\r\n\r\nL.Polyline.include({\r\n\ttoGeoJSON: function () {\r\n\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\ttype: 'LineString',\r\n\t\t\tcoordinates: L.GeoJSON.latLngsToCoords(this.getLatLngs())\r\n\t\t});\r\n\t}\r\n});\r\n\r\nL.Polygon.include({\r\n\ttoGeoJSON: function () {\r\n\t\tvar coords = [L.GeoJSON.latLngsToCoords(this.getLatLngs())],\r\n\t\t i, len, hole;\r\n\r\n\t\tcoords[0].push(coords[0][0]);\r\n\r\n\t\tif (this._holes) {\r\n\t\t\tfor (i = 0, len = this._holes.length; i < len; i++) {\r\n\t\t\t\thole = L.GeoJSON.latLngsToCoords(this._holes[i]);\r\n\t\t\t\thole.push(hole[0]);\r\n\t\t\t\tcoords.push(hole);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\ttype: 'Polygon',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n(function () {\r\n\tfunction multiToGeoJSON(type) {\r\n\t\treturn function () {\r\n\t\t\tvar coords = [];\r\n\r\n\t\t\tthis.eachLayer(function (layer) {\r\n\t\t\t\tcoords.push(layer.toGeoJSON().geometry.coordinates);\r\n\t\t\t});\r\n\r\n\t\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\t\ttype: type,\r\n\t\t\t\tcoordinates: coords\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\tL.MultiPolyline.include({toGeoJSON: multiToGeoJSON('MultiLineString')});\r\n\tL.MultiPolygon.include({toGeoJSON: multiToGeoJSON('MultiPolygon')});\r\n\r\n\tL.LayerGroup.include({\r\n\t\ttoGeoJSON: function () {\r\n\r\n\t\t\tvar geometry = this.feature && this.feature.geometry,\r\n\t\t\t\tjsons = [],\r\n\t\t\t\tjson;\r\n\r\n\t\t\tif (geometry && geometry.type === 'MultiPoint') {\r\n\t\t\t\treturn multiToGeoJSON('MultiPoint').call(this);\r\n\t\t\t}\r\n\r\n\t\t\tvar isGeometryCollection = geometry && geometry.type === 'GeometryCollection';\r\n\r\n\t\t\tthis.eachLayer(function (layer) {\r\n\t\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\t\tjson = layer.toGeoJSON();\r\n\t\t\t\t\tjsons.push(isGeometryCollection ? json.geometry : L.GeoJSON.asFeature(json));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (isGeometryCollection) {\r\n\t\t\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\t\t\tgeometries: jsons,\r\n\t\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\ttype: 'FeatureCollection',\r\n\t\t\t\tfeatures: jsons\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n}());\r\n\r\nL.geoJson = function (geojson, options) {\r\n\treturn new L.GeoJSON(geojson, options);\r\n};\r\n\n\n/*\r\n * L.DomEvent contains functions for working with DOM events.\r\n */\r\n\r\nL.DomEvent = {\r\n\t/* inspired by John Resig, Dean Edwards and YUI addEvent implementations */\r\n\taddListener: function (obj, type, fn, context) { // (HTMLElement, String, Function[, Object])\r\n\r\n\t\tvar id = L.stamp(fn),\r\n\t\t key = '_leaflet_' + type + id,\r\n\t\t handler, originalHandler, newType;\r\n\r\n\t\tif (obj[key]) { return this; }\r\n\r\n\t\thandler = function (e) {\r\n\t\t\treturn fn.call(context || obj, e || L.DomEvent._getEvent());\r\n\t\t};\r\n\r\n\t\tif (L.Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t\treturn this.addPointerListener(obj, type, handler, id);\r\n\t\t}\r\n\t\tif (L.Browser.touch && (type === 'dblclick') && this.addDoubleTapListener) {\r\n\t\t\tthis.addDoubleTapListener(obj, handler, id);\r\n\t\t}\r\n\r\n\t\tif ('addEventListener' in obj) {\r\n\r\n\t\t\tif (type === 'mousewheel') {\r\n\t\t\t\tobj.addEventListener('DOMMouseScroll', handler, false);\r\n\t\t\t\tobj.addEventListener(type, handler, false);\r\n\r\n\t\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\r\n\r\n\t\t\t\toriginalHandler = handler;\r\n\t\t\t\tnewType = (type === 'mouseenter' ? 'mouseover' : 'mouseout');\r\n\r\n\t\t\t\thandler = function (e) {\r\n\t\t\t\t\tif (!L.DomEvent._checkMouse(obj, e)) { return; }\r\n\t\t\t\t\treturn originalHandler(e);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tobj.addEventListener(newType, handler, false);\r\n\r\n\t\t\t} else if (type === 'click' && L.Browser.android) {\r\n\t\t\t\toriginalHandler = handler;\r\n\t\t\t\thandler = function (e) {\r\n\t\t\t\t\treturn L.DomEvent._filterClick(e, originalHandler);\r\n\t\t\t\t};\r\n\r\n\t\t\t\tobj.addEventListener(type, handler, false);\r\n\t\t\t} else {\r\n\t\t\t\tobj.addEventListener(type, handler, false);\r\n\t\t\t}\r\n\r\n\t\t} else if ('attachEvent' in obj) {\r\n\t\t\tobj.attachEvent('on' + type, handler);\r\n\t\t}\r\n\r\n\t\tobj[key] = handler;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveListener: function (obj, type, fn) { // (HTMLElement, String, Function)\r\n\r\n\t\tvar id = L.stamp(fn),\r\n\t\t key = '_leaflet_' + type + id,\r\n\t\t handler = obj[key];\r\n\r\n\t\tif (!handler) { return this; }\r\n\r\n\t\tif (L.Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t\tthis.removePointerListener(obj, type, id);\r\n\t\t} else if (L.Browser.touch && (type === 'dblclick') && this.removeDoubleTapListener) {\r\n\t\t\tthis.removeDoubleTapListener(obj, id);\r\n\r\n\t\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\t\tif (type === 'mousewheel') {\r\n\t\t\t\tobj.removeEventListener('DOMMouseScroll', handler, false);\r\n\t\t\t\tobj.removeEventListener(type, handler, false);\r\n\r\n\t\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\r\n\t\t\t\tobj.removeEventListener((type === 'mouseenter' ? 'mouseover' : 'mouseout'), handler, false);\r\n\t\t\t} else {\r\n\t\t\t\tobj.removeEventListener(type, handler, false);\r\n\t\t\t}\r\n\t\t} else if ('detachEvent' in obj) {\r\n\t\t\tobj.detachEvent('on' + type, handler);\r\n\t\t}\r\n\r\n\t\tobj[key] = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tstopPropagation: function (e) {\r\n\r\n\t\tif (e.stopPropagation) {\r\n\t\t\te.stopPropagation();\r\n\t\t} else {\r\n\t\t\te.cancelBubble = true;\r\n\t\t}\r\n\t\tL.DomEvent._skipped(e);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdisableScrollPropagation: function (el) {\r\n\t\tvar stop = L.DomEvent.stopPropagation;\r\n\r\n\t\treturn L.DomEvent\r\n\t\t\t.on(el, 'mousewheel', stop)\r\n\t\t\t.on(el, 'MozMousePixelScroll', stop);\r\n\t},\r\n\r\n\tdisableClickPropagation: function (el) {\r\n\t\tvar stop = L.DomEvent.stopPropagation;\r\n\r\n\t\tfor (var i = L.Draggable.START.length - 1; i >= 0; i--) {\r\n\t\t\tL.DomEvent.on(el, L.Draggable.START[i], stop);\r\n\t\t}\r\n\r\n\t\treturn L.DomEvent\r\n\t\t\t.on(el, 'click', L.DomEvent._fakeStop)\r\n\t\t\t.on(el, 'dblclick', stop);\r\n\t},\r\n\r\n\tpreventDefault: function (e) {\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault();\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tstop: function (e) {\r\n\t\treturn L.DomEvent\r\n\t\t\t.preventDefault(e)\r\n\t\t\t.stopPropagation(e);\r\n\t},\r\n\r\n\tgetMousePosition: function (e, container) {\r\n\t\tif (!container) {\r\n\t\t\treturn new L.Point(e.clientX, e.clientY);\r\n\t\t}\r\n\r\n\t\tvar rect = container.getBoundingClientRect();\r\n\r\n\t\treturn new L.Point(\r\n\t\t\te.clientX - rect.left - container.clientLeft,\r\n\t\t\te.clientY - rect.top - container.clientTop);\r\n\t},\r\n\r\n\tgetWheelDelta: function (e) {\r\n\r\n\t\tvar delta = 0;\r\n\r\n\t\tif (e.wheelDelta) {\r\n\t\t\tdelta = e.wheelDelta / 120;\r\n\t\t}\r\n\t\tif (e.detail) {\r\n\t\t\tdelta = -e.detail / 3;\r\n\t\t}\r\n\t\treturn delta;\r\n\t},\r\n\r\n\t_skipEvents: {},\r\n\r\n\t_fakeStop: function (e) {\r\n\t\t// fakes stopPropagation by setting a special event flag, checked/reset with L.DomEvent._skipped(e)\r\n\t\tL.DomEvent._skipEvents[e.type] = true;\r\n\t},\r\n\r\n\t_skipped: function (e) {\r\n\t\tvar skipped = this._skipEvents[e.type];\r\n\t\t// reset when checking, as it's only used in map container and propagates outside of the map\r\n\t\tthis._skipEvents[e.type] = false;\r\n\t\treturn skipped;\r\n\t},\r\n\r\n\t// check if element really left/entered the event target (for mouseenter/mouseleave)\r\n\t_checkMouse: function (el, e) {\r\n\r\n\t\tvar related = e.relatedTarget;\r\n\r\n\t\tif (!related) { return true; }\r\n\r\n\t\ttry {\r\n\t\t\twhile (related && (related !== el)) {\r\n\t\t\t\trelated = related.parentNode;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn (related !== el);\r\n\t},\r\n\r\n\t_getEvent: function () { // evil magic for IE\r\n\t\t/*jshint noarg:false */\r\n\t\tvar e = window.event;\r\n\t\tif (!e) {\r\n\t\t\tvar caller = arguments.callee.caller;\r\n\t\t\twhile (caller) {\r\n\t\t\t\te = caller['arguments'][0];\r\n\t\t\t\tif (e && window.Event === e.constructor) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcaller = caller.caller;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn e;\r\n\t},\r\n\r\n\t// this is a horrible workaround for a bug in Android where a single touch triggers two click events\r\n\t_filterClick: function (e, handler) {\r\n\t\tvar timeStamp = (e.timeStamp || e.originalEvent.timeStamp),\r\n\t\t\telapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);\r\n\r\n\t\t// are they closer together than 500ms yet more than 100ms?\r\n\t\t// Android typically triggers them ~300ms apart while multiple listeners\r\n\t\t// on the same event should be triggered far faster;\r\n\t\t// or check if click is simulated on the element, and if it is, reject any non-simulated events\r\n\r\n\t\tif ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {\r\n\t\t\tL.DomEvent.stop(e);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tL.DomEvent._lastClick = timeStamp;\r\n\r\n\t\treturn handler(e);\r\n\t}\r\n};\r\n\r\nL.DomEvent.on = L.DomEvent.addListener;\r\nL.DomEvent.off = L.DomEvent.removeListener;\r\n\n\n/*\r\n * L.Draggable allows you to add dragging capabilities to any element. Supports mobile devices too.\r\n */\r\n\r\nL.Draggable = L.Class.extend({\r\n\tincludes: L.Mixin.Events,\r\n\r\n\tstatics: {\r\n\t\tSTART: L.Browser.touch ? ['touchstart', 'mousedown'] : ['mousedown'],\r\n\t\tEND: {\r\n\t\t\tmousedown: 'mouseup',\r\n\t\t\ttouchstart: 'touchend',\r\n\t\t\tpointerdown: 'touchend',\r\n\t\t\tMSPointerDown: 'touchend'\r\n\t\t},\r\n\t\tMOVE: {\r\n\t\t\tmousedown: 'mousemove',\r\n\t\t\ttouchstart: 'touchmove',\r\n\t\t\tpointerdown: 'touchmove',\r\n\t\t\tMSPointerDown: 'touchmove'\r\n\t\t}\r\n\t},\r\n\r\n\tinitialize: function (element, dragStartTarget) {\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget || element;\r\n\t},\r\n\r\n\tenable: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\tfor (var i = L.Draggable.START.length - 1; i >= 0; i--) {\r\n\t\t\tL.DomEvent.on(this._dragStartTarget, L.Draggable.START[i], this._onDown, this);\r\n\t\t}\r\n\r\n\t\tthis._enabled = true;\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tfor (var i = L.Draggable.START.length - 1; i >= 0; i--) {\r\n\t\t\tL.DomEvent.off(this._dragStartTarget, L.Draggable.START[i], this._onDown, this);\r\n\t\t}\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t},\r\n\r\n\t_onDown: function (e) {\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }\r\n\r\n\t\tL.DomEvent.stopPropagation(e);\r\n\r\n\t\tif (L.Draggable._disabled) { return; }\r\n\r\n\t\tL.DomUtil.disableImageDrag();\r\n\t\tL.DomUtil.disableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\tvar first = e.touches ? e.touches[0] : e;\r\n\r\n\t\tthis._startPoint = new L.Point(first.clientX, first.clientY);\r\n\t\tthis._startPos = this._newPos = L.DomUtil.getPosition(this._element);\r\n\r\n\t\tL.DomEvent\r\n\t\t .on(document, L.Draggable.MOVE[e.type], this._onMove, this)\r\n\t\t .on(document, L.Draggable.END[e.type], this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t newPoint = new L.Point(first.clientX, first.clientY),\r\n\t\t offset = newPoint.subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (L.Browser.touch && Math.abs(offset.x) + Math.abs(offset.y) < 3) { return; }\r\n\r\n\t\tL.DomEvent.preventDefault(e);\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\t\t\tthis._startPos = L.DomUtil.getPosition(this._element).subtract(offset);\r\n\r\n\t\t\tL.DomUtil.addClass(document.body, 'leaflet-dragging');\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\tL.DomUtil.addClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tL.Util.cancelAnimFrame(this._animRequest);\r\n\t\tthis._animRequest = L.Util.requestAnimFrame(this._updatePosition, this, true, this._dragStartTarget);\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tthis.fire('predrag');\r\n\t\tL.DomUtil.setPosition(this._element, this._newPos);\r\n\t\tthis.fire('drag');\r\n\t},\r\n\r\n\t_onUp: function () {\r\n\t\tL.DomUtil.removeClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tL.DomUtil.removeClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\tfor (var i in L.Draggable.MOVE) {\r\n\t\t\tL.DomEvent\r\n\t\t\t .off(document, L.Draggable.MOVE[i], this._onMove)\r\n\t\t\t .off(document, L.Draggable.END[i], this._onUp);\r\n\t\t}\r\n\r\n\t\tL.DomUtil.enableImageDrag();\r\n\t\tL.DomUtil.enableTextSelection();\r\n\r\n\t\tif (this._moved && this._moving) {\r\n\t\t\t// ensure drag is not fired after dragend\r\n\t\t\tL.Util.cancelAnimFrame(this._animRequest);\r\n\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._moving = false;\r\n\t}\r\n});\r\n\n\n/*\n\tL.Handler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\nL.Handler = L.Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\tenable: function () {\n\t\tif (this._enabled) { return; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t},\n\n\tdisable: function () {\n\t\tif (!this._enabled) { return; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t},\n\n\tenabled: function () {\n\t\treturn !!this._enabled;\n\t}\n});\n\n\n/*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\nL.Map.mergeOptions({\n\tdragging: true,\n\n\tinertia: !L.Browser.android23,\n\tinertiaDeceleration: 3400, // px/s^2\n\tinertiaMaxSpeed: Infinity, // px/s\n\tinertiaThreshold: L.Browser.touch ? 32 : 18, // ms\n\teaseLinearity: 0.25,\n\n\t// TODO refactor, move to CRS\n\tworldCopyJump: false\n});\n\nL.Map.Drag = L.Handler.extend({\n\taddHooks: function () {\n\t\tif (!this._draggable) {\n\t\t\tvar map = this._map;\n\n\t\t\tthis._draggable = new L.Draggable(map._mapPane, map._container);\n\n\t\t\tthis._draggable.on({\n\t\t\t\t'dragstart': this._onDragStart,\n\t\t\t\t'drag': this._onDrag,\n\t\t\t\t'dragend': this._onDragEnd\n\t\t\t}, this);\n\n\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\tthis._draggable.on('predrag', this._onPreDrag, this);\n\t\t\t\tmap.on('viewreset', this._onViewReset, this);\n\n\t\t\t\tmap.whenReady(this._onViewReset, this);\n\t\t\t}\n\t\t}\n\t\tthis._draggable.enable();\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable.disable();\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_onDragStart: function () {\n\t\tvar map = this._map;\n\n\t\tif (map._panAnim) {\n\t\t\tmap._panAnim.stop();\n\t\t}\n\n\t\tmap\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\n\t\tif (map.options.inertia) {\n\t\t\tthis._positions = [];\n\t\t\tthis._times = [];\n\t\t}\n\t},\n\n\t_onDrag: function () {\n\t\tif (this._map.options.inertia) {\n\t\t\tvar time = this._lastTime = +new Date(),\n\t\t\t pos = this._lastPos = this._draggable._newPos;\n\n\t\t\tthis._positions.push(pos);\n\t\t\tthis._times.push(time);\n\n\t\t\tif (time - this._times[0] > 200) {\n\t\t\t\tthis._positions.shift();\n\t\t\t\tthis._times.shift();\n\t\t\t}\n\t\t}\n\n\t\tthis._map\n\t\t .fire('move')\n\t\t .fire('drag');\n\t},\n\n\t_onViewReset: function () {\n\t\t// TODO fix hardcoded Earth values\n\t\tvar pxCenter = this._map.getSize()._divideBy(2),\n\t\t pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n\t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n\t\tthis._worldWidth = this._map.project([0, 180]).x;\n\t},\n\n\t_onPreDrag: function () {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tvar worldWidth = this._worldWidth,\n\t\t halfWidth = Math.round(worldWidth / 2),\n\t\t dx = this._initialWorldOffset,\n\t\t x = this._draggable._newPos.x,\n\t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\t newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n\t\tthis._draggable._newPos.x = newX;\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tvar map = this._map,\n\t\t options = map.options,\n\t\t delay = +new Date() - this._lastTime,\n\n\t\t noInertia = !options.inertia || delay > options.inertiaThreshold || !this._positions[0];\n\n\t\tmap.fire('dragend', e);\n\n\t\tif (noInertia) {\n\t\t\tmap.fire('moveend');\n\n\t\t} else {\n\n\t\t\tvar direction = this._lastPos.subtract(this._positions[0]),\n\t\t\t duration = (this._lastTime + delay - this._times[0]) / 1000,\n\t\t\t ease = options.easeLinearity,\n\n\t\t\t speedVector = direction.multiplyBy(ease / duration),\n\t\t\t speed = speedVector.distanceTo([0, 0]),\n\n\t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n\t\t\t offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n\t\t\tif (!offset.x || !offset.y) {\n\t\t\t\tmap.fire('moveend');\n\n\t\t\t} else {\n\t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n\t\t\t\tL.Util.requestAnimFrame(function () {\n\t\t\t\t\tmap.panBy(offset, {\n\t\t\t\t\t\tduration: decelerationDuration,\n\t\t\t\t\t\teaseLinearity: ease,\n\t\t\t\t\t\tnoMoveStart: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'dragging', L.Map.Drag);\n\n\n/*\n * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\nL.Map.mergeOptions({\n\tdoubleClickZoom: true\n});\n\nL.Map.DoubleClickZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t},\n\n\t_onDoubleClick: function (e) {\n\t\tvar map = this._map,\n\t\t zoom = map.getZoom() + (e.originalEvent.shiftKey ? -1 : 1);\n\n\t\tif (map.options.doubleClickZoom === 'center') {\n\t\t\tmap.setZoom(zoom);\n\t\t} else {\n\t\t\tmap.setZoomAround(e.containerPoint, zoom);\n\t\t}\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'doubleClickZoom', L.Map.DoubleClickZoom);\n\n\n/*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\nL.Map.mergeOptions({\n\tscrollWheelZoom: true\n});\n\nL.Map.ScrollWheelZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._map._container, 'mousewheel', this._onWheelScroll, this);\n\t\tL.DomEvent.on(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault);\n\t\tthis._delta = 0;\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._map._container, 'mousewheel', this._onWheelScroll);\n\t\tL.DomEvent.off(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault);\n\t},\n\n\t_onWheelScroll: function (e) {\n\t\tvar delta = L.DomEvent.getWheelDelta(e);\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tvar left = Math.max(40 - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(L.bind(this._performZoom, this), left);\n\n\t\tL.DomEvent.preventDefault(e);\n\t\tL.DomEvent.stopPropagation(e);\n\t},\n\n\t_performZoom: function () {\n\t\tvar map = this._map,\n\t\t delta = this._delta,\n\t\t zoom = map.getZoom();\n\n\t\tdelta = delta > 0 ? Math.ceil(delta) : Math.floor(delta);\n\t\tdelta = Math.max(Math.min(delta, 4), -4);\n\t\tdelta = map._limitZoom(zoom + delta) - zoom;\n\n\t\tthis._delta = 0;\n\t\tthis._startTime = null;\n\n\t\tif (!delta) { return; }\n\n\t\tif (map.options.scrollWheelZoom === 'center') {\n\t\t\tmap.setZoom(zoom + delta);\n\t\t} else {\n\t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n\t\t}\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'scrollWheelZoom', L.Map.ScrollWheelZoom);\n\n\n/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n */\r\n\r\nL.extend(L.DomEvent, {\r\n\r\n\t_touchstart: L.Browser.msPointer ? 'MSPointerDown' : L.Browser.pointer ? 'pointerdown' : 'touchstart',\r\n\t_touchend: L.Browser.msPointer ? 'MSPointerUp' : L.Browser.pointer ? 'pointerup' : 'touchend',\r\n\r\n\t// inspired by Zepto touch code by Thomas Fuchs\r\n\taddDoubleTapListener: function (obj, handler, id) {\r\n\t\tvar last,\r\n\t\t doubleTap = false,\r\n\t\t delay = 250,\r\n\t\t touch,\r\n\t\t pre = '_leaflet_',\r\n\t\t touchstart = this._touchstart,\r\n\t\t touchend = this._touchend,\r\n\t\t trackedTouches = [];\r\n\r\n\t\tfunction onTouchStart(e) {\r\n\t\t\tvar count;\r\n\r\n\t\t\tif (L.Browser.pointer) {\r\n\t\t\t\ttrackedTouches.push(e.pointerId);\r\n\t\t\t\tcount = trackedTouches.length;\r\n\t\t\t} else {\r\n\t\t\t\tcount = e.touches.length;\r\n\t\t\t}\r\n\t\t\tif (count > 1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar now = Date.now(),\r\n\t\t\t\tdelta = now - (last || now);\r\n\r\n\t\t\ttouch = e.touches ? e.touches[0] : e;\r\n\t\t\tdoubleTap = (delta > 0 && delta <= delay);\r\n\t\t\tlast = now;\r\n\t\t}\r\n\r\n\t\tfunction onTouchEnd(e) {\r\n\t\t\tif (L.Browser.pointer) {\r\n\t\t\t\tvar idx = trackedTouches.indexOf(e.pointerId);\r\n\t\t\t\tif (idx === -1) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\ttrackedTouches.splice(idx, 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (doubleTap) {\r\n\t\t\t\tif (L.Browser.pointer) {\r\n\t\t\t\t\t// work around .type being readonly with MSPointer* events\r\n\t\t\t\t\tvar newTouch = { },\r\n\t\t\t\t\t\tprop;\r\n\r\n\t\t\t\t\t// jshint forin:false\r\n\t\t\t\t\tfor (var i in touch) {\r\n\t\t\t\t\t\tprop = touch[i];\r\n\t\t\t\t\t\tif (typeof prop === 'function') {\r\n\t\t\t\t\t\t\tnewTouch[i] = prop.bind(touch);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnewTouch[i] = prop;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttouch = newTouch;\r\n\t\t\t\t}\r\n\t\t\t\ttouch.type = 'dblclick';\r\n\t\t\t\thandler(touch);\r\n\t\t\t\tlast = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tobj[pre + touchstart + id] = onTouchStart;\r\n\t\tobj[pre + touchend + id] = onTouchEnd;\r\n\r\n\t\t// on pointer we need to listen on the document, otherwise a drag starting on the map and moving off screen\r\n\t\t// will not come through to us, so we will lose track of how many touches are ongoing\r\n\t\tvar endElement = L.Browser.pointer ? document.documentElement : obj;\r\n\r\n\t\tobj.addEventListener(touchstart, onTouchStart, false);\r\n\t\tendElement.addEventListener(touchend, onTouchEnd, false);\r\n\r\n\t\tif (L.Browser.pointer) {\r\n\t\t\tendElement.addEventListener(L.DomEvent.POINTER_CANCEL, onTouchEnd, false);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveDoubleTapListener: function (obj, id) {\r\n\t\tvar pre = '_leaflet_';\r\n\r\n\t\tobj.removeEventListener(this._touchstart, obj[pre + this._touchstart + id], false);\r\n\t\t(L.Browser.pointer ? document.documentElement : obj).removeEventListener(\r\n\t\t this._touchend, obj[pre + this._touchend + id], false);\r\n\r\n\t\tif (L.Browser.pointer) {\r\n\t\t\tdocument.documentElement.removeEventListener(L.DomEvent.POINTER_CANCEL, obj[pre + this._touchend + id],\r\n\t\t\t\tfalse);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\n\n/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\nL.extend(L.DomEvent, {\n\n\t//static\n\tPOINTER_DOWN: L.Browser.msPointer ? 'MSPointerDown' : 'pointerdown',\n\tPOINTER_MOVE: L.Browser.msPointer ? 'MSPointerMove' : 'pointermove',\n\tPOINTER_UP: L.Browser.msPointer ? 'MSPointerUp' : 'pointerup',\n\tPOINTER_CANCEL: L.Browser.msPointer ? 'MSPointerCancel' : 'pointercancel',\n\n\t_pointers: [],\n\t_pointerDocumentListener: false,\n\n\t// Provides a touch events wrapper for (ms)pointer events.\n\t// Based on changes by veproza https://github.com/CloudMade/Leaflet/pull/1019\n\t//ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\n\taddPointerListener: function (obj, type, handler, id) {\n\n\t\tswitch (type) {\n\t\tcase 'touchstart':\n\t\t\treturn this.addPointerListenerStart(obj, type, handler, id);\n\t\tcase 'touchend':\n\t\t\treturn this.addPointerListenerEnd(obj, type, handler, id);\n\t\tcase 'touchmove':\n\t\t\treturn this.addPointerListenerMove(obj, type, handler, id);\n\t\tdefault:\n\t\t\tthrow 'Unknown touch event type';\n\t\t}\n\t},\n\n\taddPointerListenerStart: function (obj, type, handler, id) {\n\t\tvar pre = '_leaflet_',\n\t\t pointers = this._pointers;\n\n\t\tvar cb = function (e) {\n\t\t\tif (e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {\n\t\t\t\tL.DomEvent.preventDefault(e);\n\t\t\t}\n\n\t\t\tvar alreadyInArray = false;\n\t\t\tfor (var i = 0; i < pointers.length; i++) {\n\t\t\t\tif (pointers[i].pointerId === e.pointerId) {\n\t\t\t\t\talreadyInArray = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!alreadyInArray) {\n\t\t\t\tpointers.push(e);\n\t\t\t}\n\n\t\t\te.touches = pointers.slice();\n\t\t\te.changedTouches = [e];\n\n\t\t\thandler(e);\n\t\t};\n\n\t\tobj[pre + 'touchstart' + id] = cb;\n\t\tobj.addEventListener(this.POINTER_DOWN, cb, false);\n\n\t\t// need to also listen for end events to keep the _pointers list accurate\n\t\t// this needs to be on the body and never go away\n\t\tif (!this._pointerDocumentListener) {\n\t\t\tvar internalCb = function (e) {\n\t\t\t\tfor (var i = 0; i < pointers.length; i++) {\n\t\t\t\t\tif (pointers[i].pointerId === e.pointerId) {\n\t\t\t\t\t\tpointers.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\t//We listen on the documentElement as any drags that end by moving the touch off the screen get fired there\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_UP, internalCb, false);\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_CANCEL, internalCb, false);\n\n\t\t\tthis._pointerDocumentListener = true;\n\t\t}\n\n\t\treturn this;\n\t},\n\n\taddPointerListenerMove: function (obj, type, handler, id) {\n\t\tvar pre = '_leaflet_',\n\t\t touches = this._pointers;\n\n\t\tfunction cb(e) {\n\n\t\t\t// don't fire touch moves when mouse isn't down\n\t\t\tif ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; }\n\n\t\t\tfor (var i = 0; i < touches.length; i++) {\n\t\t\t\tif (touches[i].pointerId === e.pointerId) {\n\t\t\t\t\ttouches[i] = e;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\te.touches = touches.slice();\n\t\t\te.changedTouches = [e];\n\n\t\t\thandler(e);\n\t\t}\n\n\t\tobj[pre + 'touchmove' + id] = cb;\n\t\tobj.addEventListener(this.POINTER_MOVE, cb, false);\n\n\t\treturn this;\n\t},\n\n\taddPointerListenerEnd: function (obj, type, handler, id) {\n\t\tvar pre = '_leaflet_',\n\t\t touches = this._pointers;\n\n\t\tvar cb = function (e) {\n\t\t\tfor (var i = 0; i < touches.length; i++) {\n\t\t\t\tif (touches[i].pointerId === e.pointerId) {\n\t\t\t\t\ttouches.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\te.touches = touches.slice();\n\t\t\te.changedTouches = [e];\n\n\t\t\thandler(e);\n\t\t};\n\n\t\tobj[pre + 'touchend' + id] = cb;\n\t\tobj.addEventListener(this.POINTER_UP, cb, false);\n\t\tobj.addEventListener(this.POINTER_CANCEL, cb, false);\n\n\t\treturn this;\n\t},\n\n\tremovePointerListener: function (obj, type, id) {\n\t\tvar pre = '_leaflet_',\n\t\t cb = obj[pre + type + id];\n\n\t\tswitch (type) {\n\t\tcase 'touchstart':\n\t\t\tobj.removeEventListener(this.POINTER_DOWN, cb, false);\n\t\t\tbreak;\n\t\tcase 'touchmove':\n\t\t\tobj.removeEventListener(this.POINTER_MOVE, cb, false);\n\t\t\tbreak;\n\t\tcase 'touchend':\n\t\t\tobj.removeEventListener(this.POINTER_UP, cb, false);\n\t\t\tobj.removeEventListener(this.POINTER_CANCEL, cb, false);\n\t\t\tbreak;\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\n\n/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\nL.Map.mergeOptions({\n\ttouchZoom: L.Browser.touch && !L.Browser.android23,\n\tbounceAtZoomLimits: true\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tvar map = this._map;\n\n\t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToLayerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToLayerPoint(e.touches[1]),\n\t\t viewCenter = map._getCenterLayerPoint();\n\n\t\tthis._startCenter = p1.add(p2)._divideBy(2);\n\t\tthis._startDist = p1.distanceTo(p2);\n\n\t\tthis._moved = false;\n\t\tthis._zooming = true;\n\n\t\tthis._centerOffset = viewCenter.subtract(this._startCenter);\n\n\t\tif (map._panAnim) {\n\t\t\tmap._panAnim.stop();\n\t\t}\n\n\t\tL.DomEvent\n\t\t .on(document, 'touchmove', this._onTouchMove, this)\n\t\t .on(document, 'touchend', this._onTouchEnd, this);\n\n\t\tL.DomEvent.preventDefault(e);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tvar map = this._map;\n\n\t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToLayerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToLayerPoint(e.touches[1]);\n\n\t\tthis._scale = p1.distanceTo(p2) / this._startDist;\n\t\tthis._delta = p1._add(p2)._divideBy(2)._subtract(this._startCenter);\n\n\t\tif (this._scale === 1) { return; }\n\n\t\tif (!map.options.bounceAtZoomLimits) {\n\t\t\tif ((map.getZoom() === map.getMinZoom() && this._scale < 1) ||\n\t\t\t (map.getZoom() === map.getMaxZoom() && this._scale > 1)) { return; }\n\t\t}\n\n\t\tif (!this._moved) {\n\t\t\tL.DomUtil.addClass(map._mapPane, 'leaflet-touching');\n\n\t\t\tmap\n\t\t\t .fire('movestart')\n\t\t\t .fire('zoomstart');\n\n\t\t\tthis._moved = true;\n\t\t}\n\n\t\tL.Util.cancelAnimFrame(this._animRequest);\n\t\tthis._animRequest = L.Util.requestAnimFrame(\n\t\t this._updateOnMove, this, true, this._map._container);\n\n\t\tL.DomEvent.preventDefault(e);\n\t},\n\n\t_updateOnMove: function () {\n\t\tvar map = this._map,\n\t\t origin = this._getScaleOrigin(),\n\t\t center = map.layerPointToLatLng(origin),\n\t\t zoom = map.getScaleZoom(this._scale);\n\n\t\tmap._animateZoom(center, zoom, this._startCenter, this._scale, this._delta, false, true);\n\t},\n\n\t_onTouchEnd: function () {\n\t\tif (!this._moved || !this._zooming) {\n\t\t\tthis._zooming = false;\n\t\t\treturn;\n\t\t}\n\n\t\tvar map = this._map;\n\n\t\tthis._zooming = false;\n\t\tL.DomUtil.removeClass(map._mapPane, 'leaflet-touching');\n\t\tL.Util.cancelAnimFrame(this._animRequest);\n\n\t\tL.DomEvent\n\t\t .off(document, 'touchmove', this._onTouchMove)\n\t\t .off(document, 'touchend', this._onTouchEnd);\n\n\t\tvar origin = this._getScaleOrigin(),\n\t\t center = map.layerPointToLatLng(origin),\n\n\t\t oldZoom = map.getZoom(),\n\t\t floatZoomDelta = map.getScaleZoom(this._scale) - oldZoom,\n\t\t roundZoomDelta = (floatZoomDelta > 0 ?\n\t\t Math.ceil(floatZoomDelta) : Math.floor(floatZoomDelta)),\n\n\t\t zoom = map._limitZoom(oldZoom + roundZoomDelta),\n\t\t scale = map.getZoomScale(zoom) / this._scale;\n\n\t\tmap._animateZoom(center, zoom, origin, scale);\n\t},\n\n\t_getScaleOrigin: function () {\n\t\tvar centerOffset = this._centerOffset.subtract(this._delta).divideBy(this._scale);\n\t\treturn this._startCenter.add(centerOffset);\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\n\n\n/*\n * L.Map.Tap is used to enable mobile hacks like quick taps and long hold.\n */\n\nL.Map.mergeOptions({\n\ttap: true,\n\ttapTolerance: 15\n});\n\nL.Map.Tap = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\t_onDown: function (e) {\n\t\tif (!e.touches) { return; }\n\n\t\tL.DomEvent.preventDefault(e);\n\n\t\tthis._fireClick = true;\n\n\t\t// don't simulate click or track longpress if more than 1 touch\n\t\tif (e.touches.length > 1) {\n\t\t\tthis._fireClick = false;\n\t\t\tclearTimeout(this._holdTimeout);\n\t\t\treturn;\n\t\t}\n\n\t\tvar first = e.touches[0],\n\t\t el = first.target;\n\n\t\tthis._startPos = this._newPos = new L.Point(first.clientX, first.clientY);\n\n\t\t// if touching a link, highlight it\n\t\tif (el.tagName && el.tagName.toLowerCase() === 'a') {\n\t\t\tL.DomUtil.addClass(el, 'leaflet-active');\n\t\t}\n\n\t\t// simulate long hold but setting a timeout\n\t\tthis._holdTimeout = setTimeout(L.bind(function () {\n\t\t\tif (this._isTapValid()) {\n\t\t\t\tthis._fireClick = false;\n\t\t\t\tthis._onUp();\n\t\t\t\tthis._simulateEvent('contextmenu', first);\n\t\t\t}\n\t\t}, this), 1000);\n\n\t\tL.DomEvent\n\t\t\t.on(document, 'touchmove', this._onMove, this)\n\t\t\t.on(document, 'touchend', this._onUp, this);\n\t},\n\n\t_onUp: function (e) {\n\t\tclearTimeout(this._holdTimeout);\n\n\t\tL.DomEvent\n\t\t\t.off(document, 'touchmove', this._onMove, this)\n\t\t\t.off(document, 'touchend', this._onUp, this);\n\n\t\tif (this._fireClick && e && e.changedTouches) {\n\n\t\t\tvar first = e.changedTouches[0],\n\t\t\t el = first.target;\n\n\t\t\tif (el && el.tagName && el.tagName.toLowerCase() === 'a') {\n\t\t\t\tL.DomUtil.removeClass(el, 'leaflet-active');\n\t\t\t}\n\n\t\t\t// simulate click if the touch didn't move too much\n\t\t\tif (this._isTapValid()) {\n\t\t\t\tthis._simulateEvent('click', first);\n\t\t\t}\n\t\t}\n\t},\n\n\t_isTapValid: function () {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t},\n\n\t_onMove: function (e) {\n\t\tvar first = e.touches[0];\n\t\tthis._newPos = new L.Point(first.clientX, first.clientY);\n\t},\n\n\t_simulateEvent: function (type, e) {\n\t\tvar simulatedEvent = document.createEvent('MouseEvents');\n\n\t\tsimulatedEvent._simulated = true;\n\t\te.target._simulatedClick = true;\n\n\t\tsimulatedEvent.initMouseEvent(\n\t\t type, true, true, window, 1,\n\t\t e.screenX, e.screenY,\n\t\t e.clientX, e.clientY,\n\t\t false, false, false, false, 0, null);\n\n\t\te.target.dispatchEvent(simulatedEvent);\n\t}\n});\n\nif (L.Browser.touch && !L.Browser.pointer) {\n\tL.Map.addInitHook('addHandler', 'tap', L.Map.Tap);\n}\n\n\n/*\n * L.Handler.ShiftDragZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\nL.Map.mergeOptions({\n\tboxZoom: true\n});\n\nL.Map.BoxZoom = L.Handler.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t\tthis._moved = false;\n\t},\n\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._container, 'mousedown', this._onMouseDown);\n\t\tthis._moved = false;\n\t},\n\n\tmoved: function () {\n\t\treturn this._moved;\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tthis._moved = false;\n\n\t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }\n\n\t\tL.DomUtil.disableTextSelection();\n\t\tL.DomUtil.disableImageDrag();\n\n\t\tthis._startLayerPoint = this._map.mouseEventToLayerPoint(e);\n\n\t\tL.DomEvent\n\t\t .on(document, 'mousemove', this._onMouseMove, this)\n\t\t .on(document, 'mouseup', this._onMouseUp, this)\n\t\t .on(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._moved) {\n\t\t\tthis._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._pane);\n\t\t\tL.DomUtil.setPosition(this._box, this._startLayerPoint);\n\n\t\t\t//TODO refactor: move cursor to styles\n\t\t\tthis._container.style.cursor = 'crosshair';\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tvar startPoint = this._startLayerPoint,\n\t\t box = this._box,\n\n\t\t layerPoint = this._map.mouseEventToLayerPoint(e),\n\t\t offset = layerPoint.subtract(startPoint),\n\n\t\t newPos = new L.Point(\n\t\t Math.min(layerPoint.x, startPoint.x),\n\t\t Math.min(layerPoint.y, startPoint.y));\n\n\t\tL.DomUtil.setPosition(box, newPos);\n\n\t\tthis._moved = true;\n\n\t\t// TODO refactor: remove hardcoded 4 pixels\n\t\tbox.style.width = (Math.max(0, Math.abs(offset.x) - 4)) + 'px';\n\t\tbox.style.height = (Math.max(0, Math.abs(offset.y) - 4)) + 'px';\n\t},\n\n\t_finish: function () {\n\t\tif (this._moved) {\n\t\t\tthis._pane.removeChild(this._box);\n\t\t\tthis._container.style.cursor = '';\n\t\t}\n\n\t\tL.DomUtil.enableTextSelection();\n\t\tL.DomUtil.enableImageDrag();\n\n\t\tL.DomEvent\n\t\t .off(document, 'mousemove', this._onMouseMove)\n\t\t .off(document, 'mouseup', this._onMouseUp)\n\t\t .off(document, 'keydown', this._onKeyDown);\n\t},\n\n\t_onMouseUp: function (e) {\n\n\t\tthis._finish();\n\n\t\tvar map = this._map,\n\t\t layerPoint = map.mouseEventToLayerPoint(e);\n\n\t\tif (this._startLayerPoint.equals(layerPoint)) { return; }\n\n\t\tvar bounds = new L.LatLngBounds(\n\t\t map.layerPointToLatLng(this._startLayerPoint),\n\t\t map.layerPointToLatLng(layerPoint));\n\n\t\tmap.fitBounds(bounds);\n\n\t\tmap.fire('boxzoomend', {\n\t\t\tboxZoomBounds: bounds\n\t\t});\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.keyCode === 27) {\n\t\t\tthis._finish();\n\t\t}\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'boxZoom', L.Map.BoxZoom);\n\n\n/*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\nL.Map.mergeOptions({\n\tkeyboard: true,\n\tkeyboardPanOffset: 80,\n\tkeyboardZoomOffset: 1\n});\n\nL.Map.Keyboard = L.Handler.extend({\n\n\tkeyCodes: {\n\t\tleft: [37],\n\t\tright: [39],\n\t\tdown: [40],\n\t\tup: [38],\n\t\tzoomIn: [187, 107, 61, 171],\n\t\tzoomOut: [189, 109, 173]\n\t},\n\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\n\t\tthis._setPanOffset(map.options.keyboardPanOffset);\n\t\tthis._setZoomOffset(map.options.keyboardZoomOffset);\n\t},\n\n\taddHooks: function () {\n\t\tvar container = this._map._container;\n\n\t\t// make the container focusable by tabbing\n\t\tif (container.tabIndex === -1) {\n\t\t\tcontainer.tabIndex = '0';\n\t\t}\n\n\t\tL.DomEvent\n\t\t .on(container, 'focus', this._onFocus, this)\n\t\t .on(container, 'blur', this._onBlur, this)\n\t\t .on(container, 'mousedown', this._onMouseDown, this);\n\n\t\tthis._map\n\t\t .on('focus', this._addHooks, this)\n\t\t .on('blur', this._removeHooks, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._removeHooks();\n\n\t\tvar container = this._map._container;\n\n\t\tL.DomEvent\n\t\t .off(container, 'focus', this._onFocus, this)\n\t\t .off(container, 'blur', this._onBlur, this)\n\t\t .off(container, 'mousedown', this._onMouseDown, this);\n\n\t\tthis._map\n\t\t .off('focus', this._addHooks, this)\n\t\t .off('blur', this._removeHooks, this);\n\t},\n\n\t_onMouseDown: function () {\n\t\tif (this._focused) { return; }\n\n\t\tvar body = document.body,\n\t\t docEl = document.documentElement,\n\t\t top = body.scrollTop || docEl.scrollTop,\n\t\t left = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t},\n\n\t_onFocus: function () {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t},\n\n\t_onBlur: function () {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t},\n\n\t_setPanOffset: function (pan) {\n\t\tvar keys = this._panKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n\t\t\tkeys[codes.left[i]] = [-1 * pan, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n\t\t\tkeys[codes.right[i]] = [pan, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n\t\t\tkeys[codes.down[i]] = [0, pan];\n\t\t}\n\t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n\t\t\tkeys[codes.up[i]] = [0, -1 * pan];\n\t\t}\n\t},\n\n\t_setZoomOffset: function (zoom) {\n\t\tvar keys = this._zoomKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n\t\t\tkeys[codes.zoomIn[i]] = zoom;\n\t\t}\n\t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n\t\t\tkeys[codes.zoomOut[i]] = -zoom;\n\t\t}\n\t},\n\n\t_addHooks: function () {\n\t\tL.DomEvent.on(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_removeHooks: function () {\n\t\tL.DomEvent.off(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tvar key = e.keyCode,\n\t\t map = this._map;\n\n\t\tif (key in this._panKeys) {\n\n\t\t\tif (map._panAnim && map._panAnim._inProgress) { return; }\n\n\t\t\tmap.panBy(this._panKeys[key]);\n\n\t\t\tif (map.options.maxBounds) {\n\t\t\t\tmap.panInsideBounds(map.options.maxBounds);\n\t\t\t}\n\n\t\t} else if (key in this._zoomKeys) {\n\t\t\tmap.setZoom(map.getZoom() + this._zoomKeys[key]);\n\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tL.DomEvent.stop(e);\n\t}\n});\n\nL.Map.addInitHook('addHandler', 'keyboard', L.Map.Keyboard);\n\n\n/*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\nL.Handler.MarkerDrag = L.Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar icon = this._marker._icon;\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new L.Draggable(icon, icon);\n\t\t}\n\n\t\tthis._draggable\n\t\t\t.on('dragstart', this._onDragStart, this)\n\t\t\t.on('drag', this._onDrag, this)\n\t\t\t.on('dragend', this._onDragEnd, this);\n\t\tthis._draggable.enable();\n\t\tL.DomUtil.addClass(this._marker._icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable\n\t\t\t.off('dragstart', this._onDragStart, this)\n\t\t\t.off('drag', this._onDrag, this)\n\t\t\t.off('dragend', this._onDragEnd, this);\n\n\t\tthis._draggable.disable();\n\t\tL.DomUtil.removeClass(this._marker._icon, 'leaflet-marker-draggable');\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_onDragStart: function () {\n\t\tthis._marker\n\t\t .closePopup()\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\t},\n\n\t_onDrag: function () {\n\t\tvar marker = this._marker,\n\t\t shadow = marker._shadow,\n\t\t iconPos = L.DomUtil.getPosition(marker._icon),\n\t\t latlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tL.DomUtil.setPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\n\t\tmarker\n\t\t .fire('move', {latlng: latlng})\n\t\t .fire('drag');\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tthis._marker\n\t\t .fire('moveend')\n\t\t .fire('dragend', e);\n\t}\n});\n\n\n/*\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nL.Control = L.Class.extend({\r\n\toptions: {\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tgetPosition: function () {\r\n\t\treturn this.options.position;\r\n\t},\r\n\r\n\tsetPosition: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\tL.DomUtil.addClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveFrom: function (map) {\r\n\t\tvar pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\tcorner.removeChild(this._container);\r\n\t\tthis._map = null;\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(map);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_refocusOnMap: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.control = function (options) {\r\n\treturn new L.Control(options);\r\n};\r\n\r\n\r\n// adds control-related methods to L.Map\r\n\r\nL.Map.include({\r\n\taddControl: function (control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveControl: function (control) {\r\n\t\tcontrol.removeFrom(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t l = 'leaflet-',\r\n\t\t container = this._controlContainer =\r\n\t\t L.DomUtil.create('div', l + 'control-container', this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n\t\t\tcorners[vSide + hSide] = L.DomUtil.create('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos: function () {\r\n\t\tthis._container.removeChild(this._controlContainer);\r\n\t}\r\n});\r\n\n\n/*\r\n * L.Control.Zoom is used for the default zoom buttons on the map.\r\n */\r\n\r\nL.Control.Zoom = L.Control.extend({\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\t\tzoomInText: '+',\r\n\t\tzoomInTitle: 'Zoom in',\r\n\t\tzoomOutText: '-',\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t container = L.DomUtil.create('div', zoomName + ' leaflet-bar');\r\n\r\n\t\tthis._map = map;\r\n\r\n\t\tthis._zoomInButton = this._createButton(\r\n\t\t this.options.zoomInText, this.options.zoomInTitle,\r\n\t\t zoomName + '-in', container, this._zoomIn, this);\r\n\t\tthis._zoomOutButton = this._createButton(\r\n\t\t this.options.zoomOutText, this.options.zoomOutTitle,\r\n\t\t zoomName + '-out', container, this._zoomOut, this);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\t_zoomIn: function (e) {\r\n\t\tthis._map.zoomIn(e.shiftKey ? 3 : 1);\r\n\t},\r\n\r\n\t_zoomOut: function (e) {\r\n\t\tthis._map.zoomOut(e.shiftKey ? 3 : 1);\r\n\t},\r\n\r\n\t_createButton: function (html, title, className, container, fn, context) {\r\n\t\tvar link = L.DomUtil.create('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\tvar stop = L.DomEvent.stopPropagation;\r\n\r\n\t\tL.DomEvent\r\n\t\t .on(link, 'click', stop)\r\n\t\t .on(link, 'mousedown', stop)\r\n\t\t .on(link, 'dblclick', stop)\r\n\t\t .on(link, 'click', L.DomEvent.preventDefault)\r\n\t\t .on(link, 'click', fn, context)\r\n\t\t .on(link, 'click', this._refocusOnMap, context);\r\n\r\n\t\treturn link;\r\n\t},\r\n\r\n\t_updateDisabled: function () {\r\n\t\tvar map = this._map,\r\n\t\t\tclassName = 'leaflet-disabled';\r\n\r\n\t\tL.DomUtil.removeClass(this._zoomInButton, className);\r\n\t\tL.DomUtil.removeClass(this._zoomOutButton, className);\r\n\r\n\t\tif (map._zoom === map.getMinZoom()) {\r\n\t\t\tL.DomUtil.addClass(this._zoomOutButton, className);\r\n\t\t}\r\n\t\tif (map._zoom === map.getMaxZoom()) {\r\n\t\t\tL.DomUtil.addClass(this._zoomInButton, className);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.Map.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nL.Map.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\tthis.zoomControl = new L.Control.Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\r\n\r\nL.control.zoom = function (options) {\r\n\treturn new L.Control.Zoom(options);\r\n};\r\n\r\n\n\n/*\r\n * L.Control.Attribution is used for displaying attribution on the map (added by default).\r\n */\r\n\r\nL.Control.Attribution = L.Control.extend({\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\t\tprefix: '<a href=\"http://leafletjs.com\" title=\"A JS library for interactive maps\">Leaflet</a>'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._container = L.DomUtil.create('div', 'leaflet-control-attribution');\r\n\t\tL.DomEvent.disableClickPropagation(this._container);\r\n\r\n\t\tfor (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tmap\r\n\t\t .on('layeradd', this._onLayerAdd, this)\r\n\t\t .on('layerremove', this._onLayerRemove, this);\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap\r\n\t\t .off('layeradd', this._onLayerAdd)\r\n\t\t .off('layerremove', this._onLayerRemove);\r\n\r\n\t},\r\n\r\n\tsetPrefix: function (prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\taddAttribution: function (text) {\r\n\t\tif (!text) { return; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveAttribution: function (text) {\r\n\t\tif (!text) { return; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' | ');\r\n\t},\r\n\r\n\t_onLayerAdd: function (e) {\r\n\t\tif (e.layer.getAttribution) {\r\n\t\t\tthis.addAttribution(e.layer.getAttribution());\r\n\t\t}\r\n\t},\r\n\r\n\t_onLayerRemove: function (e) {\r\n\t\tif (e.layer.getAttribution) {\r\n\t\t\tthis.removeAttribution(e.layer.getAttribution());\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.Map.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nL.Map.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tthis.attributionControl = (new L.Control.Attribution()).addTo(this);\r\n\t}\r\n});\r\n\r\nL.control.attribution = function (options) {\r\n\treturn new L.Control.Attribution(options);\r\n};\r\n\n\n/*\n * L.Control.Scale is used for displaying metric/imperial scale on the map.\n */\n\nL.Control.Scale = L.Control.extend({\n\toptions: {\n\t\tposition: 'bottomleft',\n\t\tmaxWidth: 100,\n\t\tmetric: true,\n\t\timperial: true,\n\t\tupdateWhenIdle: false\n\t},\n\n\tonAdd: function (map) {\n\t\tthis._map = map;\n\n\t\tvar className = 'leaflet-control-scale',\n\t\t container = L.DomUtil.create('div', className),\n\t\t options = this.options;\n\n\t\tthis._addScales(options, className, container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t},\n\n\tonRemove: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = L.DomUtil.create('div', className + '-line', container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = L.DomUtil.create('div', className + '-line', container);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tvar bounds = this._map.getBounds(),\n\t\t centerLat = bounds.getCenter().lat,\n\t\t halfWorldMeters = 6378137 * Math.PI * Math.cos(centerLat * Math.PI / 180),\n\t\t dist = halfWorldMeters * (bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 180,\n\n\t\t size = this._map.getSize(),\n\t\t options = this.options,\n\t\t maxMeters = 0;\n\n\t\tif (size.x > 0) {\n\t\t\tmaxMeters = dist * (options.maxWidth / size.x);\n\t\t}\n\n\t\tthis._updateScales(options, maxMeters);\n\t},\n\n\t_updateScales: function (options, maxMeters) {\n\t\tif (options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\n\t\tif (options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t},\n\n\t_updateMetric: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters);\n\n\t\tthis._mScale.style.width = this._getScaleWidth(meters / maxMeters) + 'px';\n\t\tthis._mScale.innerHTML = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t scale = this._iScale,\n\t\t maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\n\t\t\tscale.style.width = this._getScaleWidth(miles / maxMiles) + 'px';\n\t\t\tscale.innerHTML = miles + ' mi';\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\n\t\t\tscale.style.width = this._getScaleWidth(feet / maxFeet) + 'px';\n\t\t\tscale.innerHTML = feet + ' ft';\n\t\t}\n\t},\n\n\t_getScaleWidth: function (ratio) {\n\t\treturn Math.round(this.options.maxWidth * ratio) - 10;\n\t},\n\n\t_getRoundNum: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t d = num / pow10;\n\n\t\td = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\nL.control.scale = function (options) {\n\treturn new L.Control.Scale(options);\n};\n\n\n/*\r\n * L.Control.Layers is a control to allow users to switch between different layers on the map.\r\n */\r\n\r\nL.Control.Layers = L.Control.extend({\r\n\toptions: {\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\t\tautoZIndex: true\r\n\t},\r\n\r\n\tinitialize: function (baseLayers, overlays, options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tmap\r\n\t\t .on('layeradd', this._onLayerChange, this)\r\n\t\t .on('layerremove', this._onLayerChange, this);\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap\r\n\t\t .off('layeradd', this._onLayerChange, this)\r\n\t\t .off('layerremove', this._onLayerChange, this);\r\n\t},\r\n\r\n\taddBaseLayer: function (layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\taddOverlay: function (layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = L.stamp(layer);\r\n\t\tdelete this._layers[id];\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t container = this._container = L.DomUtil.create('div', className);\r\n\r\n\t\t//Makes this work on IE10 Touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tif (!L.Browser.touch) {\r\n\t\t\tL.DomEvent\r\n\t\t\t\t.disableClickPropagation(container)\r\n\t\t\t\t.disableScrollPropagation(container);\r\n\t\t} else {\r\n\t\t\tL.DomEvent.on(container, 'click', L.DomEvent.stopPropagation);\r\n\t\t}\r\n\r\n\t\tvar form = this._form = L.DomUtil.create('form', className + '-list');\r\n\r\n\t\tif (this.options.collapsed) {\r\n\t\t\tif (!L.Browser.android) {\r\n\t\t\t\tL.DomEvent\r\n\t\t\t\t .on(container, 'mouseover', this._expand, this)\r\n\t\t\t\t .on(container, 'mouseout', this._collapse, this);\r\n\t\t\t}\r\n\t\t\tvar link = this._layersLink = L.DomUtil.create('a', className + '-toggle', container);\r\n\t\t\tlink.href = '#';\r\n\t\t\tlink.title = 'Layers';\r\n\r\n\t\t\tif (L.Browser.touch) {\r\n\t\t\t\tL.DomEvent\r\n\t\t\t\t .on(link, 'click', L.DomEvent.stop)\r\n\t\t\t\t .on(link, 'click', this._expand, this);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tL.DomEvent.on(link, 'focus', this._expand, this);\r\n\t\t\t}\r\n\t\t\t//Work around for Firefox android issue https://github.com/Leaflet/Leaflet/issues/2033\r\n\t\t\tL.DomEvent.on(form, 'click', function () {\r\n\t\t\t\tsetTimeout(L.bind(this._onInputClick, this), 0);\r\n\t\t\t}, this);\r\n\r\n\t\t\tthis._map.on('click', this._collapse, this);\r\n\t\t\t// TODO keyboard accessibility\r\n\t\t} else {\r\n\t\t\tthis._expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = L.DomUtil.create('div', className + '-base', form);\r\n\t\tthis._separator = L.DomUtil.create('div', className + '-separator', form);\r\n\t\tthis._overlaysList = L.DomUtil.create('div', className + '-overlays', form);\r\n\r\n\t\tcontainer.appendChild(form);\r\n\t},\r\n\r\n\t_addLayer: function (layer, name, overlay) {\r\n\t\tvar id = L.stamp(layer);\r\n\r\n\t\tthis._layers[id] = {\r\n\t\t\tlayer: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t};\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._container) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList.innerHTML = '';\r\n\t\tthis._overlaysList.innerHTML = '';\r\n\r\n\t\tvar baseLayersPresent = false,\r\n\t\t overlaysPresent = false,\r\n\t\t i, obj;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\t},\r\n\r\n\t_onLayerChange: function (e) {\r\n\t\tvar obj = this._layers[L.stamp(e.layer)];\r\n\r\n\t\tif (!obj) { return; }\r\n\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar type = obj.overlay ?\r\n\t\t\t(e.type === 'layeradd' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'layeradd' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t},\r\n\r\n\t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' + name + '\"';\r\n\t\tif (checked) {\r\n\t\t\tradioHtml += ' checked=\"checked\"';\r\n\t\t}\r\n\t\tradioHtml += '/>';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t input,\r\n\t\t checked = this._map.hasLayer(obj.layer);\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers', checked);\r\n\t\t}\r\n\r\n\t\tinput.layerId = L.stamp(obj.layer);\r\n\r\n\t\tL.DomEvent.on(input, 'click', this._onInputClick, this);\r\n\r\n\t\tvar name = document.createElement('span');\r\n\t\tname.innerHTML = ' ' + obj.name;\r\n\r\n\t\tlabel.appendChild(input);\r\n\t\tlabel.appendChild(name);\r\n\r\n\t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\treturn label;\r\n\t},\r\n\r\n\t_onInputClick: function () {\r\n\t\tvar i, input, obj,\r\n\t\t inputs = this._form.getElementsByTagName('input'),\r\n\t\t inputsLen = inputs.length;\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (i = 0; i < inputsLen; i++) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tobj = this._layers[input.layerId];\r\n\r\n\t\t\tif (input.checked && !this._map.hasLayer(obj.layer)) {\r\n\t\t\t\tthis._map.addLayer(obj.layer);\r\n\r\n\t\t\t} else if (!input.checked && this._map.hasLayer(obj.layer)) {\r\n\t\t\t\tthis._map.removeLayer(obj.layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_expand: function () {\r\n\t\tL.DomUtil.addClass(this._container, 'leaflet-control-layers-expanded');\r\n\t},\r\n\r\n\t_collapse: function () {\r\n\t\tthis._container.className = this._container.className.replace(' leaflet-control-layers-expanded', '');\r\n\t}\r\n});\r\n\r\nL.control.layers = function (baseLayers, overlays, options) {\r\n\treturn new L.Control.Layers(baseLayers, overlays, options);\r\n};\r\n\n\n/*\n * L.PosAnimation is used by Leaflet internally for pan animations.\n */\n\nL.PosAnimation = L.Class.extend({\n\tincludes: L.Mixin.Events,\n\n\trun: function (el, newPos, duration, easeLinearity) { // (HTMLElement, Point[, Number, Number])\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._newPos = newPos;\n\n\t\tthis.fire('start');\n\n\t\tel.style[L.DomUtil.TRANSITION] = 'all ' + (duration || 0.25) +\n\t\t 's cubic-bezier(0,0,' + (easeLinearity || 0.5) + ',1)';\n\n\t\tL.DomEvent.on(el, L.DomUtil.TRANSITION_END, this._onTransitionEnd, this);\n\t\tL.DomUtil.setPosition(el, newPos);\n\n\t\t// toggle reflow, Chrome flickers for some reason if you don't do this\n\t\tL.Util.falseFn(el.offsetWidth);\n\n\t\t// there's no native way to track value updates of transitioned properties, so we imitate this\n\t\tthis._stepTimer = setInterval(L.bind(this._onStep, this), 50);\n\t},\n\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\t// if we just removed the transition property, the element would jump to its final position,\n\t\t// so we need to make it stay at the current position\n\n\t\tL.DomUtil.setPosition(this._el, this._getPos());\n\t\tthis._onTransitionEnd();\n\t\tL.Util.falseFn(this._el.offsetWidth); // force reflow in case we are about to start a new animation\n\t},\n\n\t_onStep: function () {\n\t\tvar stepPos = this._getPos();\n\t\tif (!stepPos) {\n\t\t\tthis._onTransitionEnd();\n\t\t\treturn;\n\t\t}\n\t\t// jshint camelcase: false\n\t\t// make L.DomUtil.getPosition return intermediate position value during animation\n\t\tthis._el._leaflet_pos = stepPos;\n\n\t\tthis.fire('step');\n\t},\n\n\t// you can't easily get intermediate values of properties animated with CSS3 Transitions,\n\t// we need to parse computed style (in case of transform it returns matrix string)\n\n\t_transformRe: /([-+]?(?:\\d*\\.)?\\d+)\\D*, ([-+]?(?:\\d*\\.)?\\d+)\\D*\\)/,\n\n\t_getPos: function () {\n\t\tvar left, top, matches,\n\t\t el = this._el,\n\t\t style = window.getComputedStyle(el);\n\n\t\tif (L.Browser.any3d) {\n\t\t\tmatches = style[L.DomUtil.TRANSFORM].match(this._transformRe);\n\t\t\tif (!matches) { return; }\n\t\t\tleft = parseFloat(matches[1]);\n\t\t\ttop = parseFloat(matches[2]);\n\t\t} else {\n\t\t\tleft = parseFloat(style.left);\n\t\t\ttop = parseFloat(style.top);\n\t\t}\n\n\t\treturn new L.Point(left, top, true);\n\t},\n\n\t_onTransitionEnd: function () {\n\t\tL.DomEvent.off(this._el, L.DomUtil.TRANSITION_END, this._onTransitionEnd, this);\n\n\t\tif (!this._inProgress) { return; }\n\t\tthis._inProgress = false;\n\n\t\tthis._el.style[L.DomUtil.TRANSITION] = '';\n\n\t\t// jshint camelcase: false\n\t\t// make sure L.DomUtil.getPosition returns the final position value after animation\n\t\tthis._el._leaflet_pos = this._newPos;\n\n\t\tclearInterval(this._stepTimer);\n\n\t\tthis.fire('step').fire('end');\n\t}\n\n});\n\n\n/*\n * Extends L.Map to handle panning animations.\n */\n\nL.Map.include({\n\n\tsetView: function (center, zoom, options) {\n\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\n\t\tcenter = this._limitCenter(L.latLng(center), zoom, this.options.maxBounds);\n\t\toptions = options || {};\n\n\t\tif (this._panAnim) {\n\t\t\tthis._panAnim.stop();\n\t\t}\n\n\t\tif (this._loaded && !options.reset && options !== true) {\n\n\t\t\tif (options.animate !== undefined) {\n\t\t\t\toptions.zoom = L.extend({animate: options.animate}, options.zoom);\n\t\t\t\toptions.pan = L.extend({animate: options.animate}, options.pan);\n\t\t\t}\n\n\t\t\t// try animating pan or zoom\n\t\t\tvar animated = (this._zoom !== zoom) ?\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\n\n\t\t\tif (animated) {\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\n\t\t\t\tclearTimeout(this._sizeTimer);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// animation didn't start, just reset the map view\n\t\tthis._resetView(center, zoom);\n\n\t\treturn this;\n\t},\n\n\tpanBy: function (offset, options) {\n\t\toffset = L.point(offset).round();\n\t\toptions = options || {};\n\n\t\tif (!offset.x && !offset.y) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this._panAnim) {\n\t\t\tthis._panAnim = new L.PosAnimation();\n\n\t\t\tthis._panAnim.on({\n\t\t\t\t'step': this._onPanTransitionStep,\n\t\t\t\t'end': this._onPanTransitionEnd\n\t\t\t}, this);\n\t\t}\n\n\t\t// don't fire movestart if animating inertia\n\t\tif (!options.noMoveStart) {\n\t\t\tthis.fire('movestart');\n\t\t}\n\n\t\t// animate pan unless animate: false specified\n\t\tif (options.animate !== false) {\n\t\t\tL.DomUtil.addClass(this._mapPane, 'leaflet-pan-anim');\n\n\t\t\tvar newPos = this._getMapPanePos().subtract(offset);\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\n\t\t} else {\n\t\t\tthis._rawPanBy(offset);\n\t\t\tthis.fire('move').fire('moveend');\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_onPanTransitionStep: function () {\n\t\tthis.fire('move');\n\t},\n\n\t_onPanTransitionEnd: function () {\n\t\tL.DomUtil.removeClass(this._mapPane, 'leaflet-pan-anim');\n\t\tthis.fire('moveend');\n\t},\n\n\t_tryAnimatedPan: function (center, options) {\n\t\t// difference between the new and current centers in pixels\n\t\tvar offset = this._getCenterOffset(center)._floor();\n\n\t\t// don't animate too far unless animate: true specified in options\n\t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\n\n\t\tthis.panBy(offset, options);\n\n\t\treturn true;\n\t}\n});\n\n\n/*\n * L.PosAnimation fallback implementation that powers Leaflet pan animations\n * in browsers that don't support CSS3 Transitions.\n */\n\nL.PosAnimation = L.DomUtil.TRANSITION ? L.PosAnimation : L.PosAnimation.extend({\n\n\trun: function (el, newPos, duration, easeLinearity) { // (HTMLElement, Point[, Number, Number])\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration || 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n\t\tthis._startPos = L.DomUtil.getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t},\n\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step();\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = L.Util.requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function () {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t duration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration));\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t},\n\n\t_runFrame: function (progress) {\n\t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tL.DomUtil.setPosition(this._el, pos);\n\n\t\tthis.fire('step');\n\t},\n\n\t_complete: function () {\n\t\tL.Util.cancelAnimFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\tthis.fire('end');\n\t},\n\n\t_easeOut: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n\n\n/*\n * Extends L.Map to handle zoom animations.\n */\n\nL.Map.mergeOptions({\n\tzoomAnimation: true,\n\tzoomAnimationThreshold: 4\n});\n\nif (L.DomUtil.TRANSITION) {\n\n\tL.Map.addInitHook(function () {\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\n\t\tthis._zoomAnimated = this.options.zoomAnimation && L.DomUtil.TRANSITION &&\n\t\t\t\tL.Browser.any3d && !L.Browser.android23 && !L.Browser.mobileOpera;\n\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\n\t\tif (this._zoomAnimated) {\n\t\t\tL.DomEvent.on(this._mapPane, L.DomUtil.TRANSITION_END, this._catchTransitionEnd, this);\n\t\t}\n\t});\n}\n\nL.Map.include(!L.DomUtil.TRANSITION ? {} : {\n\n\t_catchTransitionEnd: function (e) {\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\n\t\t\tthis._onZoomTransitionEnd();\n\t\t}\n\t},\n\n\t_nothingToAnimate: function () {\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\n\t},\n\n\t_tryAnimatedZoom: function (center, zoom, options) {\n\n\t\tif (this._animatingZoom) { return true; }\n\n\t\toptions = options || {};\n\n\t\t// don't animate if disabled, not supported or zoom difference is too large\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\n\t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\n\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\n\t\tvar scale = this.getZoomScale(zoom),\n\t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale),\n\t\t\torigin = this._getCenterLayerPoint()._add(offset);\n\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\n\n\t\tthis\n\t\t .fire('movestart')\n\t\t .fire('zoomstart');\n\n\t\tthis._animateZoom(center, zoom, origin, scale, null, true);\n\n\t\treturn true;\n\t},\n\n\t_animateZoom: function (center, zoom, origin, scale, delta, backwards, forTouchZoom) {\n\n\t\tif (!forTouchZoom) {\n\t\t\tthis._animatingZoom = true;\n\t\t}\n\n\t\t// put transform transition on all layers with leaflet-zoom-animated class\n\t\tL.DomUtil.addClass(this._mapPane, 'leaflet-zoom-anim');\n\n\t\t// remember what center/zoom to set after animation\n\t\tthis._animateToCenter = center;\n\t\tthis._animateToZoom = zoom;\n\n\t\t// disable any dragging during animation\n\t\tif (L.Draggable) {\n\t\t\tL.Draggable._disabled = true;\n\t\t}\n\n\t\tL.Util.requestAnimFrame(function () {\n\t\t\tthis.fire('zoomanim', {\n\t\t\t\tcenter: center,\n\t\t\t\tzoom: zoom,\n\t\t\t\torigin: origin,\n\t\t\t\tscale: scale,\n\t\t\t\tdelta: delta,\n\t\t\t\tbackwards: backwards\n\t\t\t});\n\t\t\t// horrible hack to work around a Chrome bug https://github.com/Leaflet/Leaflet/issues/3689\n\t\t\tsetTimeout(L.bind(this._onZoomTransitionEnd, this), 250);\n\t\t}, this);\n\t},\n\n\t_onZoomTransitionEnd: function () {\n\t\tif (!this._animatingZoom) { return; }\n\n\t\tthis._animatingZoom = false;\n\n\t\tL.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');\n\n\t\tL.Util.requestAnimFrame(function () {\n\t\t\tthis._resetView(this._animateToCenter, this._animateToZoom, true, true);\n\n\t\t\tif (L.Draggable) {\n\t\t\t\tL.Draggable._disabled = false;\n\t\t\t}\n\t\t}, this);\n\t}\n});\n\n\n/*\n\tZoom animation logic for L.TileLayer.\n*/\n\nL.TileLayer.include({\n\t_animateZoom: function (e) {\n\t\tif (!this._animating) {\n\t\t\tthis._animating = true;\n\t\t\tthis._prepareBgBuffer();\n\t\t}\n\n\t\tvar bg = this._bgBuffer,\n\t\t transform = L.DomUtil.TRANSFORM,\n\t\t initialTransform = e.delta ? L.DomUtil.getTranslateString(e.delta) : bg.style[transform],\n\t\t scaleStr = L.DomUtil.getScaleString(e.scale, e.origin);\n\n\t\tbg.style[transform] = e.backwards ?\n\t\t\t\tscaleStr + ' ' + initialTransform :\n\t\t\t\tinitialTransform + ' ' + scaleStr;\n\t},\n\n\t_endZoomAnim: function () {\n\t\tvar front = this._tileContainer,\n\t\t bg = this._bgBuffer;\n\n\t\tfront.style.visibility = '';\n\t\tfront.parentNode.appendChild(front); // Bring to fore\n\n\t\t// force reflow\n\t\tL.Util.falseFn(bg.offsetWidth);\n\n\t\tvar zoom = this._map.getZoom();\n\t\tif (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\n\t\t\tthis._clearBgBuffer();\n\t\t}\n\n\t\tthis._animating = false;\n\t},\n\n\t_clearBgBuffer: function () {\n\t\tvar map = this._map;\n\n\t\tif (map && !map._animatingZoom && !map.touchZoom._zooming) {\n\t\t\tthis._bgBuffer.innerHTML = '';\n\t\t\tthis._bgBuffer.style[L.DomUtil.TRANSFORM] = '';\n\t\t}\n\t},\n\n\t_prepareBgBuffer: function () {\n\n\t\tvar front = this._tileContainer,\n\t\t bg = this._bgBuffer;\n\n\t\t// if foreground layer doesn't have many tiles but bg layer does,\n\t\t// keep the existing bg layer and just zoom it some more\n\n\t\tvar bgLoaded = this._getLoadedTilesPercentage(bg),\n\t\t frontLoaded = this._getLoadedTilesPercentage(front);\n\n\t\tif (bg && bgLoaded > 0.5 && frontLoaded < 0.5) {\n\n\t\t\tfront.style.visibility = 'hidden';\n\t\t\tthis._stopLoadingImages(front);\n\t\t\treturn;\n\t\t}\n\n\t\t// prepare the buffer to become the front tile pane\n\t\tbg.style.visibility = 'hidden';\n\t\tbg.style[L.DomUtil.TRANSFORM] = '';\n\n\t\t// switch out the current layer to be the new bg layer (and vice-versa)\n\t\tthis._tileContainer = bg;\n\t\tbg = this._bgBuffer = front;\n\n\t\tthis._stopLoadingImages(bg);\n\n\t\t//prevent bg buffer from clearing right after zoom\n\t\tclearTimeout(this._clearBgBufferTimer);\n\t},\n\n\t_getLoadedTilesPercentage: function (container) {\n\t\tvar tiles = container.getElementsByTagName('img'),\n\t\t i, len, count = 0;\n\n\t\tfor (i = 0, len = tiles.length; i < len; i++) {\n\t\t\tif (tiles[i].complete) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count / len;\n\t},\n\n\t// stops loading all tiles in the background layer\n\t_stopLoadingImages: function (container) {\n\t\tvar tiles = Array.prototype.slice.call(container.getElementsByTagName('img')),\n\t\t i, len, tile;\n\n\t\tfor (i = 0, len = tiles.length; i < len; i++) {\n\t\t\ttile = tiles[i];\n\n\t\t\tif (!tile.complete) {\n\t\t\t\ttile.onload = L.Util.falseFn;\n\t\t\t\ttile.onerror = L.Util.falseFn;\n\t\t\t\ttile.src = L.Util.emptyImageUrl;\n\n\t\t\t\ttile.parentNode.removeChild(tile);\n\t\t\t}\n\t\t}\n\t}\n});\n\n\n/*\r\n * Provides L.Map with convenient shortcuts for using browser geolocation features.\r\n */\r\n\r\nL.Map.include({\r\n\t_defaultLocateOptions: {\r\n\t\twatch: false,\r\n\t\tsetView: false,\r\n\t\tmaxZoom: Infinity,\r\n\t\ttimeout: 10000,\r\n\t\tmaximumAge: 0,\r\n\t\tenableHighAccuracy: false\r\n\t},\r\n\r\n\tlocate: function (/*Object*/ options) {\r\n\r\n\t\toptions = this._locateOptions = L.extend(this._defaultLocateOptions, options);\r\n\r\n\t\tif (!navigator.geolocation) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar onResponse = L.bind(this._handleGeolocationResponse, this),\r\n\t\t\tonError = L.bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tstopLocate: function () {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_handleGeolocationError: function (error) {\r\n\t\tvar c = error.code,\r\n\t\t message = error.message ||\r\n\t\t (c === 1 ? 'permission denied' :\r\n\t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n\t\t});\r\n\t},\r\n\r\n\t_handleGeolocationResponse: function (pos) {\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t lng = pos.coords.longitude,\r\n\t\t latlng = new L.LatLng(lat, lng),\r\n\r\n\t\t latAccuracy = 180 * pos.coords.accuracy / 40075017,\r\n\t\t lngAccuracy = latAccuracy / Math.cos(L.LatLng.DEG_TO_RAD * lat),\r\n\r\n\t\t bounds = L.latLngBounds(\r\n\t\t [lat - latAccuracy, lng - lngAccuracy],\r\n\t\t [lat + latAccuracy, lng + lngAccuracy]),\r\n\r\n\t\t options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar zoom = Math.min(this.getBoundsZoom(bounds), options.maxZoom);\r\n\t\t\tthis.setView(latlng, zoom);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.fire('locationfound', data);\r\n\t}\r\n});\r\n\n\n}(window, document));","var map = {\n\t\"./be.json\": 656,\n\t\"./bg.json\": 242,\n\t\"./cs.json\": 435,\n\t\"./de.json\": 758,\n\t\"./el.json\": 388,\n\t\"./en.json\": 38,\n\t\"./es.json\": 589,\n\t\"./et.json\": 516,\n\t\"./fr.json\": 469,\n\t\"./he.json\": 146,\n\t\"./hu.json\": 450,\n\t\"./is.json\": 297,\n\t\"./it.json\": 536,\n\t\"./jp.json\": 543,\n\t\"./ko.json\": 287,\n\t\"./nl.json\": 807,\n\t\"./nn.json\": 537,\n\t\"./no.json\": 950,\n\t\"./pl.json\": 893,\n\t\"./pt.json\": 253,\n\t\"./ru.json\": 112,\n\t\"./sk.json\": 211,\n\t\"./sr.json\": 424,\n\t\"./sv.json\": 116,\n\t\"./tr.json\": 619,\n\t\"./uk.json\": 613,\n\t\"./ur.json\": 810,\n\t\"./zh-cn.json\": 867,\n\t\"./zh-tw.json\": 803\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 434;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/*\n\tBased on Leaflet Browser\n\tBrowser handles different browser and feature detections for internal use.\n*/\n\nexport const ua = navigator.userAgent.toLowerCase();\nexport const doc = document.documentElement;\nexport const webkit = ua.indexOf('webkit') !== -1;\nexport const ie = 'ActiveXObject' in window;\nexport const phantomjs = ua.indexOf('phantom') !== -1;\nexport const android23 = ua.search('android [23]') !== -1;\nexport const mobile = typeof orientation !== 'undefined';\nexport const msPointer = navigator.msPointerEnabled && navigator.msMaxTouchPoints && !window.PointerEvent;\nexport const pointer = (window.PointerEvent && navigator.pointerEnabled && navigator.maxTouchPoints) || msPointer;\nexport const ie3d = ie && ('transition' in doc.style);\nexport const webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\nexport const gecko3d = 'MozPerspective' in doc.style;\nexport const opera3d = 'OTransition' in doc.style;\nexport const opera = window.opera;\nexport const touch = !window.L_NO_TOUCH && !phantomjs\n && (pointer || 'ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch));\n\nexport let retina = 'devicePixelRatio' in window && window.devicePixelRatio > 1;\nif (!retina && 'matchMedia' in window) {\n var windowMediaMatches = window.matchMedia('(min-resolution:144dpi)');\n retina = windowMediaMatches && windowMediaMatches.matches;\n}\n\nexport const Browser = {\n ie: ie,\n ielt9: ie && !document.addEventListener,\n webkit: webkit,\n chrome: ua.indexOf('chrome') !== -1,\n firefox: (ua.indexOf('gecko') !== -1) && !webkit && !window.opera && !ie,\n android: ua.indexOf('android') !== -1,\n android23: android23,\n ie3d: ie3d,\n webkit3d: webkit3d,\n gecko3d: gecko3d,\n opera3d: opera3d,\n any3d: !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d || opera3d) && !phantomjs,\n mobile: mobile,\n mobileWebkit: mobile && webkit,\n mobileWebkit3d: mobile && webkit3d,\n mobileOpera: mobile && window.opera,\n touch: !! touch,\n msPointer: !! msPointer,\n pointer: !! pointer,\n retina: !! retina,\n orientation: function() {\n var w = window.innerWidth,\n h = window.innerHeight,\n _orientation = \"portrait\";\n if (w > h) {\n _orientation = \"landscape\";\n }\n if (Math.abs(window.orientation) == 90) {\n //_orientation = \"landscape\";\n }\n trace(_orientation);\n return _orientation;\n }\n};\n","const debug = true;\nimport { Browser } from \"../core/Browser\"\nimport Emoji from \"../library/Emoji\"\n\n\nexport function extend(/*Object*/ dest) /*-> Object*/ {\t// merge src properties into dest\n var sources = Array.prototype.slice.call(arguments, 1);\n for (var j = 0, len = sources.length, src; j < len; j++) {\n src = sources[j] || {};\n for (var i in src) {\n if (src.hasOwnProperty(i)) {\n dest[i] = src[i];\n }\n }\n }\n return dest;\n}\n\n/**\n * Implement mixin behavior. Based on \n * https://blog.bitsrc.io/understanding-mixins-in-javascript-de5d3e02b466\n * @param {class} cls \n * @param {...class} src \n */\nexport function classMixin(cls, ...src) {\n for (let _cl of src) {\n for (var key of Object.getOwnPropertyNames(_cl.prototype)) {\n cls.prototype[key] = _cl.prototype[key]\n }\n }\n}\n\n\nexport function convertUnixTime(str) { // created for Instagram. It's ISO8601-ish\n // 2013-12-09 01:56:28\n var pattern = /^(\\d{4})-(\\d{2})-(\\d{2})[T\\s](\\d{2}):(\\d{2}):(\\d{2})/;\n if (str.match(pattern)) {\n var date_parts = str.match(pattern).slice(1);\n }\n var date_array = [];\n for(var i = 0; i < date_parts.length; i++) {\n var val = parseInt(date_parts[i]);\n if (i == 1) { val = val - 1 } // stupid javascript months\n date_array.push( val )\n }\n date = new Date(date_array[0], date_array[1], date_array[2], date_array[3], date_array[4], date_array[5]);\n months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n year = date.getFullYear();\n month = months[date.getMonth()];\n day = date.getDate();\n time = month + ', ' + day + ' ' + year;\n return time;\n}\n\nexport function setData(obj, data) {\n obj.data = extend({}, obj.data, data);\n if (obj.data.uniqueid === \"\") {\n obj.data.uniqueid = unique_ID(6);\n }\n}\n\nexport function mergeData(data_main, data_to_merge) {\n var x;\n for (x in data_to_merge) {\n if (Object.prototype.hasOwnProperty.call(data_to_merge, x)) {\n data_main[x] = data_to_merge[x];\n }\n }\n return data_main;\n}\n\n\n/**\n * Like mergeData, except will only try to copy data that already exists\n * in data_main\n */\nexport function updateData(data_main, data_to_merge) {\n var x;\n for (x in data_main) {\n if (Object.prototype.hasOwnProperty.call(data_to_merge, x)) {\n data_main[x] = data_to_merge[x];\n }\n }\n return data_main;\n}\n\nexport function stamp() {\n var lastId = 0, key = '_vco_id';\n return function (/*Object*/ obj) {\n obj[key] = obj[key] || ++lastId;\n return obj[key];\n };\n}\n\nexport function findArrayNumberByUniqueID(id, array, prop) {\n var _n = 0;\n for (var i = 0; i < array.length; i++) {\n if (array[i].data[prop] == id) {\n _n = i;\n }\n };\n return _n;\n}\n\nexport function unique_ID(size, prefix) {\n var getRandomNumber = function(range) {\n return Math.floor(Math.random() * range);\n };\n var getRandomChar = function() {\n var chars = \"abcdefghijklmnopqurstuvwxyz\";\n return chars.substr( getRandomNumber(32), 1 );\n };\n var randomID = function(size) {\n var str = \"\";\n for(var i = 0; i < size; i++) {\n str += getRandomChar();\n }\n return str;\n };\n if (prefix) {\n return prefix + \"-\" + randomID(size);\n } else {\n return \"vco-\" + randomID(size);\n }\n}\n\nexport function hexToRgb(hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, function(m, r, g, b) {\n return r + r + g + g + b + b;\n });\n\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n}\n\nexport function htmlify(str) {\n //if (str.match(/<\\s*p[^>]*>([^<]*)<\\s*\\/\\s*p\\s*>/)) {\n if (Browser.chrome) {\n str = Emoji(str);\n }\n if (str.match(/<p>[\\s\\S]*?<\\/p>/)) {\n \n return str;\n } else {\n return \"<p>\" + str + \"</p>\";\n }\n}\n\nexport function getUrlVars(string) {\n var str,\n vars = [],\n hash,\n hashes;\n str = string.toString();\n if (str.match('&#038;')) { \n str = str.replace(\"&#038;\", \"&\");\n } else if (str.match('&#38;')) {\n str = str.replace(\"&#38;\", \"&\");\n } else if (str.match('&amp;')) {\n str = str.replace(\"&amp;\", \"&\");\n }\n hashes = str.slice(str.indexOf('?') + 1).split('&');\n for(var i = 0; i < hashes.length; i++) {\n hash = hashes[i].split('=');\n vars.push(hash[0]);\n vars[hash[0]] = hash[1];\n }\n return vars;\n}\n\nexport const ratio = {\n square: function(size) {\n var s = {\n w: 0,\n h: 0\n }\n if (size.w > size.h && size.h > 0) {\n s.h = size.h;\n s.w = size.h;\n } else {\n s.w = size.w;\n s.h = size.w;\n }\n return s;\n },\n \n r16_9: function(size) {\n if (size.w !== null && size.w !== \"\") {\n return Math.round((size.w / 16) * 9);\n } else if (size.h !== null && size.h !== \"\") {\n return Math.round((size.h / 9) * 16);\n } else {\n return 0;\n }\n },\n r4_3: function(size) {\n if (size.w !== null && size.w !== \"\") {\n return Math.round((size.w / 4) * 3);\n } else if (size.h !== null && size.h !== \"\") {\n return Math.round((size.h / 3) * 4);\n }\n }\n}\n\nexport function urljoin(base_url, path) {\n if(base_url.length && base_url[base_url.length - 1] == '/') {\n base_url = base_url.substring(0, base_url.length - 1);\n }\n if(path.length && path[0] == '/') {\n path = path.substring(1);\n }\n var url1 = base_url.split('/');\n var url2 = path.split('/');\n var url3 = [ ];\n for (var i = 0, l = url1.length; i < l; i ++) {\n if (url1[i] == '..') {\n url3.pop();\n } else if (url1[i] == '.') {\n continue;\n } else {\n url3.push(url1[i]);\n }\n }\n for (var i = 0, l = url2.length; i < l; i ++) {\n if (url2[i] == '..') {\n url3.pop();\n } else if (url2[i] == '.') {\n continue;\n } else {\n url3.push(url2[i]);\n }\n }\n return url3.join('/');\n}\n\n\nexport function getObjectAttributeByIndex(obj, index) {\n if(typeof obj != 'undefined') {\n var i = 0;\n for (var attr in obj){\n if (index === i){\n return obj[attr];\n }\n i++;\n }\n return \"\";\n } else {\n return \"\";\n }\n}\n","/*\nBorrowed from:\nhttps://github.com/rodrigopolo/minEmoji\n\n(The MIT License)\n\nCopyright (c) by Rodrigo Polo - http://RodrigoPolo.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE\n*/\n\nexport default function Emoji(str) {\n\tvar emoji = {\n\t\t\"\\ud83d\\ude04\":0,\"\\ud83d\\ude03\":1,\"\\ud83d\\ude00\":2,\"\\ud83d\\ude0a\":3,\"\\u263a\\ufe0f\":4,\"\\ud83d\\ude09\":5,\"\\ud83d\\ude0d\":6,\"\\ud83d\\ude18\":7,\"\\ud83d\\ude1a\":8,\"\\ud83d\\ude17\":9,\"\\ud83d\\ude19\":10,\"\\ud83d\\ude1c\":11,\"\\ud83d\\ude1d\":12,\"\\ud83d\\ude1b\":13,\"\\ud83d\\ude33\":14,\"\\ud83d\\ude01\":15,\"\\ud83d\\ude14\":16,\"\\ud83d\\ude0c\":17,\"\\ud83d\\ude12\":18,\"\\ud83d\\ude1e\":19,\"\\ud83d\\ude23\":20,\"\\ud83d\\ude22\":21,\"\\ud83d\\ude02\":22,\"\\ud83d\\ude2d\":23,\"\\ud83d\\ude2a\":24,\"\\ud83d\\ude25\":25,\"\\ud83d\\ude30\":26,\"\\ud83d\\ude05\":27,\"\\ud83d\\ude13\":28,\"\\ud83d\\ude29\":29,\"\\ud83d\\ude2b\":30,\"\\ud83d\\ude28\":31,\"\\ud83d\\ude31\":32,\"\\ud83d\\ude20\":33,\"\\ud83d\\ude21\":34,\"\\ud83d\\ude24\":35,\"\\ud83d\\ude16\":36,\"\\ud83d\\ude06\":37,\"\\ud83d\\ude0b\":38,\"\\ud83d\\ude37\":39,\"\\ud83d\\ude0e\":40,\"\\ud83d\\ude34\":41,\"\\ud83d\\ude35\":42,\"\\ud83d\\ude32\":43,\"\\ud83d\\ude1f\":44,\"\\ud83d\\ude26\":45,\"\\ud83d\\ude27\":46,\"\\ud83d\\ude08\":47,\"\\ud83d\\udc7f\":48,\"\\ud83d\\ude2e\":49,\"\\ud83d\\ude2c\":50,\"\\ud83d\\ude10\":51,\"\\ud83d\\ude15\":52,\"\\ud83d\\ude2f\":53,\"\\ud83d\\ude36\":54,\"\\ud83d\\ude07\":55,\"\\ud83d\\ude0f\":56,\"\\ud83d\\ude11\":57,\"\\ud83d\\udc72\":58,\"\\ud83d\\udc73\":59,\"\\ud83d\\udc6e\":60,\"\\ud83d\\udc77\":61,\"\\ud83d\\udc82\":62,\"\\ud83d\\udc76\":63,\"\\ud83d\\udc66\":64,\"\\ud83d\\udc67\":65,\"\\ud83d\\udc68\":66,\"\\ud83d\\udc69\":67,\"\\ud83d\\udc74\":68,\"\\ud83d\\udc75\":69,\"\\ud83d\\udc71\":70,\"\\ud83d\\udc7c\":71,\"\\ud83d\\udc78\":72,\"\\ud83d\\ude3a\":73,\"\\ud83d\\ude38\":74,\"\\ud83d\\ude3b\":75,\"\\ud83d\\ude3d\":76,\"\\ud83d\\ude3c\":77,\"\\ud83d\\ude40\":78,\"\\ud83d\\ude3f\":79,\"\\ud83d\\ude39\":80,\"\\ud83d\\ude3e\":81,\"\\ud83d\\udc79\":82,\"\\ud83d\\udc7a\":83,\"\\ud83d\\ude48\":84,\"\\ud83d\\ude49\":85,\"\\ud83d\\ude4a\":86,\"\\ud83d\\udc80\":87,\"\\ud83d\\udc7d\":88,\"\\ud83d\\udca9\":89,\"\\ud83d\\udd25\":90,\"\\u2728\":91,\"\\ud83c\\udf1f\":92,\"\\ud83d\\udcab\":93,\"\\ud83d\\udca5\":94,\"\\ud83d\\udca2\":95,\"\\ud83d\\udca6\":96,\"\\ud83d\\udca7\":97,\"\\ud83d\\udca4\":98,\"\\ud83d\\udca8\":99,\t\t\"\\ud83d\\udc42\":100,\"\\ud83d\\udc40\":101,\"\\ud83d\\udc43\":102,\"\\ud83d\\udc45\":103,\"\\ud83d\\udc44\":104,\"\\ud83d\\udc4d\":105,\"\\ud83d\\udc4e\":106,\"\\ud83d\\udc4c\":107,\"\\ud83d\\udc4a\":108,\"\\u270a\":109,\"\\u270c\\ufe0f\":110,\"\\ud83d\\udc4b\":111,\"\\u270b\":112,\"\\ud83d\\udc50\":113,\"\\ud83d\\udc46\":114,\"\\ud83d\\udc47\":115,\"\\ud83d\\udc49\":116,\"\\ud83d\\udc48\":117,\"\\ud83d\\ude4c\":118,\"\\ud83d\\ude4f\":119,\"\\u261d\\ufe0f\":120,\"\\ud83d\\udc4f\":121,\"\\ud83d\\udcaa\":122,\"\\ud83d\\udeb6\":123,\"\\ud83c\\udfc3\":124,\"\\ud83d\\udc83\":125,\"\\ud83d\\udc6b\":126,\"\\ud83d\\udc6a\":127,\"\\ud83d\\udc6c\":128,\"\\ud83d\\udc6d\":129,\"\\ud83d\\udc8f\":130,\"\\ud83d\\udc91\":131,\"\\ud83d\\udc6f\":132,\"\\ud83d\\ude46\":133,\"\\ud83d\\ude45\":134,\"\\ud83d\\udc81\":135,\"\\ud83d\\ude4b\":136,\"\\ud83d\\udc86\":137,\"\\ud83d\\udc87\":138,\"\\ud83d\\udc85\":139,\"\\ud83d\\udc70\":140,\"\\ud83d\\ude4e\":141,\"\\ud83d\\ude4d\":142,\"\\ud83d\\ude47\":143,\"\\ud83c\\udfa9\":144,\"\\ud83d\\udc51\":145,\"\\ud83d\\udc52\":146,\"\\ud83d\\udc5f\":147,\"\\ud83d\\udc5e\":148,\"\\ud83d\\udc61\":149,\"\\ud83d\\udc60\":150,\"\\ud83d\\udc62\":151,\"\\ud83d\\udc55\":152,\"\\ud83d\\udc54\":153,\"\\ud83d\\udc5a\":154,\"\\ud83d\\udc57\":155,\"\\ud83c\\udfbd\":156,\"\\ud83d\\udc56\":157,\"\\ud83d\\udc58\":158,\"\\ud83d\\udc59\":159,\"\\ud83d\\udcbc\":160,\"\\ud83d\\udc5c\":161,\"\\ud83d\\udc5d\":162,\"\\ud83d\\udc5b\":163,\"\\ud83d\\udc53\":164,\"\\ud83c\\udf80\":165,\"\\ud83c\\udf02\":166,\"\\ud83d\\udc84\":167,\"\\ud83d\\udc9b\":168,\"\\ud83d\\udc99\":169,\"\\ud83d\\udc9c\":170,\"\\ud83d\\udc9a\":171,\"\\u2764\\ufe0f\":172,\"\\ud83d\\udc94\":173,\"\\ud83d\\udc97\":174,\"\\ud83d\\udc93\":175,\"\\ud83d\\udc95\":176,\"\\ud83d\\udc96\":177,\"\\ud83d\\udc9e\":178,\"\\ud83d\\udc98\":179,\"\\ud83d\\udc8c\":180,\"\\ud83d\\udc8b\":181,\"\\ud83d\\udc8d\":182,\"\\ud83d\\udc8e\":183,\"\\ud83d\\udc64\":184,\"\\ud83d\\udc65\":185,\"\\ud83d\\udcac\":186,\"\\ud83d\\udc63\":187,\"\\ud83d\\udcad\":188,\"\\ud83d\\udc36\":189,\"\\ud83d\\udc3a\":190,\"\\ud83d\\udc31\":191,\"\\ud83d\\udc2d\":192,\"\\ud83d\\udc39\":193,\"\\ud83d\\udc30\":194,\"\\ud83d\\udc38\":195,\"\\ud83d\\udc2f\":196,\"\\ud83d\\udc28\":197,\"\\ud83d\\udc3b\":198,\"\\ud83d\\udc37\":199,\t\t\"\\ud83d\\udc3d\":200,\"\\ud83d\\udc2e\":201,\"\\ud83d\\udc17\":202,\"\\ud83d\\udc35\":203,\"\\ud83d\\udc12\":204,\"\\ud83d\\udc34\":205,\"\\ud83d\\udc11\":206,\"\\ud83d\\udc18\":207,\"\\ud83d\\udc3c\":208,\"\\ud83d\\udc27\":209,\"\\ud83d\\udc26\":210,\"\\ud83d\\udc24\":211,\"\\ud83d\\udc25\":212,\"\\ud83d\\udc23\":213,\"\\ud83d\\udc14\":214,\"\\ud83d\\udc0d\":215,\"\\ud83d\\udc22\":216,\"\\ud83d\\udc1b\":217,\"\\ud83d\\udc1d\":218,\"\\ud83d\\udc1c\":219,\"\\ud83d\\udc1e\":220,\"\\ud83d\\udc0c\":221,\"\\ud83d\\udc19\":222,\"\\ud83d\\udc1a\":223,\"\\ud83d\\udc20\":224,\"\\ud83d\\udc1f\":225,\"\\ud83d\\udc2c\":226,\"\\ud83d\\udc33\":227,\"\\ud83d\\udc0b\":228,\"\\ud83d\\udc04\":229,\"\\ud83d\\udc0f\":230,\"\\ud83d\\udc00\":231,\"\\ud83d\\udc03\":232,\"\\ud83d\\udc05\":233,\"\\ud83d\\udc07\":234,\"\\ud83d\\udc09\":235,\"\\ud83d\\udc0e\":236,\"\\ud83d\\udc10\":237,\"\\ud83d\\udc13\":238,\"\\ud83d\\udc15\":239,\"\\ud83d\\udc16\":240,\"\\ud83d\\udc01\":241,\"\\ud83d\\udc02\":242,\"\\ud83d\\udc32\":243,\"\\ud83d\\udc21\":244,\"\\ud83d\\udc0a\":245,\"\\ud83d\\udc2b\":246,\"\\ud83d\\udc2a\":247,\"\\ud83d\\udc06\":248,\"\\ud83d\\udc08\":249,\"\\ud83d\\udc29\":250,\"\\ud83d\\udc3e\":251,\"\\ud83d\\udc90\":252,\"\\ud83c\\udf38\":253,\"\\ud83c\\udf37\":254,\"\\ud83c\\udf40\":255,\"\\ud83c\\udf39\":256,\"\\ud83c\\udf3b\":257,\"\\ud83c\\udf3a\":258,\"\\ud83c\\udf41\":259,\"\\ud83c\\udf43\":260,\"\\ud83c\\udf42\":261,\"\\ud83c\\udf3f\":262,\"\\ud83c\\udf3e\":263,\"\\ud83c\\udf44\":264,\"\\ud83c\\udf35\":265,\"\\ud83c\\udf34\":266,\"\\ud83c\\udf32\":267,\"\\ud83c\\udf33\":268,\"\\ud83c\\udf30\":269,\"\\ud83c\\udf31\":270,\"\\ud83c\\udf3c\":271,\"\\ud83c\\udf10\":272,\"\\ud83c\\udf1e\":273,\"\\ud83c\\udf1d\":274,\"\\ud83c\\udf1a\":275,\"\\ud83c\\udf11\":276,\"\\ud83c\\udf12\":277,\"\\ud83c\\udf13\":278,\"\\ud83c\\udf14\":279,\"\\ud83c\\udf15\":280,\"\\ud83c\\udf16\":281,\"\\ud83c\\udf17\":282,\"\\ud83c\\udf18\":283,\"\\ud83c\\udf1c\":284,\"\\ud83c\\udf1b\":285,\"\\ud83c\\udf19\":286,\"\\ud83c\\udf0d\":287,\"\\ud83c\\udf0e\":288,\"\\ud83c\\udf0f\":289,\"\\ud83c\\udf0b\":290,\"\\ud83c\\udf0c\":291,\"\\ud83c\\udf20\":292,\"\\u2b50\\ufe0f\":293,\"\\u2600\\ufe0f\":294,\"\\u26c5\\ufe0f\":295,\"\\u2601\\ufe0f\":296,\"\\u26a1\\ufe0f\":297,\"\\u2614\\ufe0f\":298,\"\\u2744\\ufe0f\":299,\t\t\"\\u26c4\\ufe0f\":300,\"\\ud83c\\udf00\":301,\"\\ud83c\\udf01\":302,\"\\ud83c\\udf08\":303,\"\\ud83c\\udf0a\":304,\"\\ud83c\\udf8d\":305,\"\\ud83d\\udc9d\":306,\"\\ud83c\\udf8e\":307,\"\\ud83c\\udf92\":308,\"\\ud83c\\udf93\":309,\"\\ud83c\\udf8f\":310,\"\\ud83c\\udf86\":311,\"\\ud83c\\udf87\":312,\"\\ud83c\\udf90\":313,\"\\ud83c\\udf91\":314,\"\\ud83c\\udf83\":315,\"\\ud83d\\udc7b\":316,\"\\ud83c\\udf85\":317,\"\\ud83c\\udf84\":318,\"\\ud83c\\udf81\":319,\"\\ud83c\\udf8b\":320,\"\\ud83c\\udf89\":321,\"\\ud83c\\udf8a\":322,\"\\ud83c\\udf88\":323,\"\\ud83c\\udf8c\":324,\"\\ud83d\\udd2e\":325,\"\\ud83c\\udfa5\":326,\"\\ud83d\\udcf7\":327,\"\\ud83d\\udcf9\":328,\"\\ud83d\\udcfc\":329,\"\\ud83d\\udcbf\":330,\"\\ud83d\\udcc0\":331,\"\\ud83d\\udcbd\":332,\"\\ud83d\\udcbe\":333,\"\\ud83d\\udcbb\":334,\"\\ud83d\\udcf1\":335,\"\\u260e\\ufe0f\":336,\"\\ud83d\\udcde\":337,\"\\ud83d\\udcdf\":338,\"\\ud83d\\udce0\":339,\"\\ud83d\\udce1\":340,\"\\ud83d\\udcfa\":341,\"\\ud83d\\udcfb\":342,\"\\ud83d\\udd0a\":343,\"\\ud83d\\udd09\":344,\"\\ud83d\\udd08\":345,\"\\ud83d\\udd07\":346,\"\\ud83d\\udd14\":347,\"\\ud83d\\udd15\":348,\"\\ud83d\\udce2\":349,\"\\ud83d\\udce3\":350,\"\\u23f3\":351,\"\\u231b\\ufe0f\":352,\"\\u23f0\":353,\"\\u231a\\ufe0f\":354,\"\\ud83d\\udd13\":355,\"\\ud83d\\udd12\":356,\"\\ud83d\\udd0f\":357,\"\\ud83d\\udd10\":358,\"\\ud83d\\udd11\":359,\"\\ud83d\\udd0e\":360,\"\\ud83d\\udca1\":361,\"\\ud83d\\udd26\":362,\"\\ud83d\\udd06\":363,\"\\ud83d\\udd05\":364,\"\\ud83d\\udd0c\":365,\"\\ud83d\\udd0b\":366,\"\\ud83d\\udd0d\":367,\"\\ud83d\\udec1\":368,\"\\ud83d\\udec0\":369,\"\\ud83d\\udebf\":370,\"\\ud83d\\udebd\":371,\"\\ud83d\\udd27\":372,\"\\ud83d\\udd29\":373,\"\\ud83d\\udd28\":374,\"\\ud83d\\udeaa\":375,\"\\ud83d\\udeac\":376,\"\\ud83d\\udca3\":377,\"\\ud83d\\udd2b\":378,\"\\ud83d\\udd2a\":379,\"\\ud83d\\udc8a\":380,\"\\ud83d\\udc89\":381,\"\\ud83d\\udcb0\":382,\"\\ud83d\\udcb4\":383,\"\\ud83d\\udcb5\":384,\"\\ud83d\\udcb7\":385,\"\\ud83d\\udcb6\":386,\"\\ud83d\\udcb3\":387,\"\\ud83d\\udcb8\":388,\"\\ud83d\\udcf2\":389,\"\\ud83d\\udce7\":390,\"\\ud83d\\udce5\":391,\"\\ud83d\\udce4\":392,\"\\u2709\\ufe0f\":393,\"\\ud83d\\udce9\":394,\"\\ud83d\\udce8\":395,\"\\ud83d\\udcef\":396,\"\\ud83d\\udceb\":397,\"\\ud83d\\udcea\":398,\"\\ud83d\\udcec\":399,\t\t\"\\ud83d\\udced\":400,\"\\ud83d\\udcee\":401,\"\\ud83d\\udce6\":402,\"\\ud83d\\udcdd\":403,\"\\ud83d\\udcc4\":404,\"\\ud83d\\udcc3\":405,\"\\ud83d\\udcd1\":406,\"\\ud83d\\udcca\":407,\"\\ud83d\\udcc8\":408,\"\\ud83d\\udcc9\":409,\"\\ud83d\\udcdc\":410,\"\\ud83d\\udccb\":411,\"\\ud83d\\udcc5\":412,\"\\ud83d\\udcc6\":413,\"\\ud83d\\udcc7\":414,\"\\ud83d\\udcc1\":415,\"\\ud83d\\udcc2\":416,\"\\u2702\\ufe0f\":417,\"\\ud83d\\udccc\":418,\"\\ud83d\\udcce\":419,\"\\u2712\\ufe0f\":420,\"\\u270f\\ufe0f\":421,\"\\ud83d\\udccf\":422,\"\\ud83d\\udcd0\":423,\"\\ud83d\\udcd5\":424,\"\\ud83d\\udcd7\":425,\"\\ud83d\\udcd8\":426,\"\\ud83d\\udcd9\":427,\"\\ud83d\\udcd3\":428,\"\\ud83d\\udcd4\":429,\"\\ud83d\\udcd2\":430,\"\\ud83d\\udcda\":431,\"\\ud83d\\udcd6\":432,\"\\ud83d\\udd16\":433,\"\\ud83d\\udcdb\":434,\"\\ud83d\\udd2c\":435,\"\\ud83d\\udd2d\":436,\"\\ud83d\\udcf0\":437,\"\\ud83c\\udfa8\":438,\"\\ud83c\\udfac\":439,\"\\ud83c\\udfa4\":440,\"\\ud83c\\udfa7\":441,\"\\ud83c\\udfbc\":442,\"\\ud83c\\udfb5\":443,\"\\ud83c\\udfb6\":444,\"\\ud83c\\udfb9\":445,\"\\ud83c\\udfbb\":446,\"\\ud83c\\udfba\":447,\"\\ud83c\\udfb7\":448,\"\\ud83c\\udfb8\":449,\"\\ud83d\\udc7e\":450,\"\\ud83c\\udfae\":451,\"\\ud83c\\udccf\":452,\"\\ud83c\\udfb4\":453,\"\\ud83c\\udc04\\ufe0f\":454,\"\\ud83c\\udfb2\":455,\"\\ud83c\\udfaf\":456,\"\\ud83c\\udfc8\":457,\"\\ud83c\\udfc0\":458,\"\\u26bd\\ufe0f\":459,\"\\u26be\\ufe0f\":460,\"\\ud83c\\udfbe\":461,\"\\ud83c\\udfb1\":462,\"\\ud83c\\udfc9\":463,\"\\ud83c\\udfb3\":464,\"\\u26f3\\ufe0f\":465,\"\\ud83d\\udeb5\":466,\"\\ud83d\\udeb4\":467,\"\\ud83c\\udfc1\":468,\"\\ud83c\\udfc7\":469,\"\\ud83c\\udfc6\":470,\"\\ud83c\\udfbf\":471,\"\\ud83c\\udfc2\":472,\"\\ud83c\\udfca\":473,\"\\ud83c\\udfc4\":474,\"\\ud83c\\udfa3\":475,\"\\u2615\\ufe0f\":476,\"\\ud83c\\udf75\":477,\"\\ud83c\\udf76\":478,\"\\ud83c\\udf7c\":479,\"\\ud83c\\udf7a\":480,\"\\ud83c\\udf7b\":481,\"\\ud83c\\udf78\":482,\"\\ud83c\\udf79\":483,\"\\ud83c\\udf77\":484,\"\\ud83c\\udf74\":485,\"\\ud83c\\udf55\":486,\"\\ud83c\\udf54\":487,\"\\ud83c\\udf5f\":488,\"\\ud83c\\udf57\":489,\"\\ud83c\\udf56\":490,\"\\ud83c\\udf5d\":491,\"\\ud83c\\udf5b\":492,\"\\ud83c\\udf64\":493,\"\\ud83c\\udf71\":494,\"\\ud83c\\udf63\":495,\"\\ud83c\\udf65\":496,\"\\ud83c\\udf59\":497,\"\\ud83c\\udf58\":498,\"\\ud83c\\udf5a\":499,\t\t\"\\ud83c\\udf5c\":500,\"\\ud83c\\udf72\":501,\"\\ud83c\\udf62\":502,\"\\ud83c\\udf61\":503,\"\\ud83c\\udf73\":504,\"\\ud83c\\udf5e\":505,\"\\ud83c\\udf69\":506,\"\\ud83c\\udf6e\":507,\"\\ud83c\\udf66\":508,\"\\ud83c\\udf68\":509,\"\\ud83c\\udf67\":510,\"\\ud83c\\udf82\":511,\"\\ud83c\\udf70\":512,\"\\ud83c\\udf6a\":513,\"\\ud83c\\udf6b\":514,\"\\ud83c\\udf6c\":515,\"\\ud83c\\udf6d\":516,\"\\ud83c\\udf6f\":517,\"\\ud83c\\udf4e\":518,\"\\ud83c\\udf4f\":519,\"\\ud83c\\udf4a\":520,\"\\ud83c\\udf4b\":521,\"\\ud83c\\udf52\":522,\"\\ud83c\\udf47\":523,\"\\ud83c\\udf49\":524,\"\\ud83c\\udf53\":525,\"\\ud83c\\udf51\":526,\"\\ud83c\\udf48\":527,\"\\ud83c\\udf4c\":528,\"\\ud83c\\udf50\":529,\"\\ud83c\\udf4d\":530,\"\\ud83c\\udf60\":531,\"\\ud83c\\udf46\":532,\"\\ud83c\\udf45\":533,\"\\ud83c\\udf3d\":534,\"\\ud83c\\udfe0\":535,\"\\ud83c\\udfe1\":536,\"\\ud83c\\udfeb\":537,\"\\ud83c\\udfe2\":538,\"\\ud83c\\udfe3\":539,\"\\ud83c\\udfe5\":540,\"\\ud83c\\udfe6\":541,\"\\ud83c\\udfea\":542,\"\\ud83c\\udfe9\":543,\"\\ud83c\\udfe8\":544,\"\\ud83d\\udc92\":545,\"\\u26ea\\ufe0f\":546,\"\\ud83c\\udfec\":547,\"\\ud83c\\udfe4\":548,\"\\ud83c\\udf07\":549,\"\\ud83c\\udf06\":550,\"\\ud83c\\udfef\":551,\"\\ud83c\\udff0\":552,\"\\u26fa\\ufe0f\":553,\"\\ud83c\\udfed\":554,\"\\ud83d\\uddfc\":555,\"\\ud83d\\uddfe\":556,\"\\ud83d\\uddfb\":557,\"\\ud83c\\udf04\":558,\"\\ud83c\\udf05\":559,\"\\ud83c\\udf03\":560,\"\\ud83d\\uddfd\":561,\"\\ud83c\\udf09\":562,\"\\ud83c\\udfa0\":563,\"\\ud83c\\udfa1\":564,\"\\u26f2\\ufe0f\":565,\"\\ud83c\\udfa2\":566,\"\\ud83d\\udea2\":567,\"\\u26f5\\ufe0f\":568,\"\\ud83d\\udea4\":569,\"\\ud83d\\udea3\":570,\"\\u2693\\ufe0f\":571,\"\\ud83d\\ude80\":572,\"\\u2708\\ufe0f\":573,\"\\ud83d\\udcba\":574,\"\\ud83d\\ude81\":575,\"\\ud83d\\ude82\":576,\"\\ud83d\\ude8a\":577,\"\\ud83d\\ude89\":578,\"\\ud83d\\ude9e\":579,\"\\ud83d\\ude86\":580,\"\\ud83d\\ude84\":581,\"\\ud83d\\ude85\":582,\"\\ud83d\\ude88\":583,\"\\ud83d\\ude87\":584,\"\\ud83d\\ude9d\":585,\"\\ud83d\\ude8b\":586,\"\\ud83d\\ude83\":587,\"\\ud83d\\ude8e\":588,\"\\ud83d\\ude8c\":589,\"\\ud83d\\ude8d\":590,\"\\ud83d\\ude99\":591,\"\\ud83d\\ude98\":592,\"\\ud83d\\ude97\":593,\"\\ud83d\\ude95\":594,\"\\ud83d\\ude96\":595,\"\\ud83d\\ude9b\":596,\"\\ud83d\\ude9a\":597,\"\\ud83d\\udea8\":598,\"\\ud83d\\ude93\":599,\t\t\"\\ud83d\\ude94\":600,\"\\ud83d\\ude92\":601,\"\\ud83d\\ude91\":602,\"\\ud83d\\ude90\":603,\"\\ud83d\\udeb2\":604,\"\\ud83d\\udea1\":605,\"\\ud83d\\ude9f\":606,\"\\ud83d\\udea0\":607,\"\\ud83d\\ude9c\":608,\"\\ud83d\\udc88\":609,\"\\ud83d\\ude8f\":610,\"\\ud83c\\udfab\":611,\"\\ud83d\\udea6\":612,\"\\ud83d\\udea5\":613,\"\\u26a0\\ufe0f\":614,\"\\ud83d\\udea7\":615,\"\\ud83d\\udd30\":616,\"\\u26fd\\ufe0f\":617,\"\\ud83c\\udfee\":618,\"\\ud83c\\udfb0\":619,\"\\u2668\\ufe0f\":620,\"\\ud83d\\uddff\":621,\"\\ud83c\\udfaa\":622,\"\\ud83c\\udfad\":623,\"\\ud83d\\udccd\":624,\"\\ud83d\\udea9\":625,\"\\ud83c\\uddef\\ud83c\\uddf5\":626,\"\\ud83c\\uddf0\\ud83c\\uddf7\":627,\"\\ud83c\\udde9\\ud83c\\uddea\":628,\"\\ud83c\\udde8\\ud83c\\uddf3\":629,\"\\ud83c\\uddfa\\ud83c\\uddf8\":630,\"\\ud83c\\uddeb\\ud83c\\uddf7\":631,\"\\ud83c\\uddea\\ud83c\\uddf8\":632,\"\\ud83c\\uddee\\ud83c\\uddf9\":633,\"\\ud83c\\uddf7\\ud83c\\uddfa\":634,\"\\ud83c\\uddec\\ud83c\\udde7\":635,\"1\\u20e3\":636,\"2\\u20e3\":637,\"3\\u20e3\":638,\"4\\u20e3\":639,\"5\\u20e3\":640,\"6\\u20e3\":641,\"7\\u20e3\":642,\"8\\u20e3\":643,\"9\\u20e3\":644,\"0\\u20e3\":645,\"\\ud83d\\udd1f\":646,\"\\ud83d\\udd22\":647,\"\\u0023\\u20e3\":648,\"\\ud83d\\udd23\":649,\"\\u2b06\\ufe0f\":650,\"\\u2b07\\ufe0f\":651,\"\\u2b05\\ufe0f\":652,\"\\u27a1\\ufe0f\":653,\"\\ud83d\\udd20\":654,\"\\ud83d\\udd21\":655,\"\\ud83d\\udd24\":656,\"\\u2197\\ufe0f\":657,\"\\u2196\\ufe0f\":658,\"\\u2198\\ufe0f\":659,\"\\u2199\\ufe0f\":660,\"\\u2194\\ufe0f\":661,\"\\u2195\\ufe0f\":662,\"\\ud83d\\udd04\":663,\"\\u25c0\\ufe0f\":664,\"\\u25b6\\ufe0f\":665,\"\\ud83d\\udd3c\":666,\"\\ud83d\\udd3d\":667,\"\\u21a9\\ufe0f\":668,\"\\u21aa\\ufe0f\":669,\"\\u2139\\ufe0f\":670,\"\\u23ea\":671,\"\\u23e9\":672,\"\\u23eb\":673,\"\\u23ec\":674,\"\\u2935\\ufe0f\":675,\"\\u2934\\ufe0f\":676,\"\\ud83c\\udd97\":677,\"\\ud83d\\udd00\":678,\"\\ud83d\\udd01\":679,\"\\ud83d\\udd02\":680,\"\\ud83c\\udd95\":681,\"\\ud83c\\udd99\":682,\"\\ud83c\\udd92\":683,\"\\ud83c\\udd93\":684,\"\\ud83c\\udd96\":685,\"\\ud83d\\udcf6\":686,\"\\ud83c\\udfa6\":687,\"\\ud83c\\ude01\":688,\"\\ud83c\\ude2f\\ufe0f\":689,\"\\ud83c\\ude33\":690,\"\\ud83c\\ude35\":691,\"\\ud83c\\ude34\":692,\"\\ud83c\\ude32\":693,\"\\ud83c\\ude50\":694,\"\\ud83c\\ude39\":695,\"\\ud83c\\ude3a\":696,\"\\ud83c\\ude36\":697,\"\\ud83c\\ude1a\\ufe0f\":698,\"\\ud83d\\udebb\":699,\t\t\"\\ud83d\\udeb9\":700,\"\\ud83d\\udeba\":701,\"\\ud83d\\udebc\":702,\"\\ud83d\\udebe\":703,\"\\ud83d\\udeb0\":704,\"\\ud83d\\udeae\":705,\"\\ud83c\\udd7f\\ufe0f\":706,\"\\u267f\\ufe0f\":707,\"\\ud83d\\udead\":708,\"\\ud83c\\ude37\":709,\"\\ud83c\\ude38\":710,\"\\ud83c\\ude02\":711,\"\\u24c2\\ufe0f\":712,\"\\ud83d\\udec2\":713,\"\\ud83d\\udec4\":714,\"\\ud83d\\udec5\":715,\"\\ud83d\\udec3\":716,\"\\ud83c\\ude51\":717,\"\\u3299\\ufe0f\":718,\"\\u3297\\ufe0f\":719,\"\\ud83c\\udd91\":720,\"\\ud83c\\udd98\":721,\"\\ud83c\\udd94\":722,\"\\ud83d\\udeab\":723,\"\\ud83d\\udd1e\":724,\"\\ud83d\\udcf5\":725,\"\\ud83d\\udeaf\":726,\"\\ud83d\\udeb1\":727,\"\\ud83d\\udeb3\":728,\"\\ud83d\\udeb7\":729,\"\\ud83d\\udeb8\":730,\"\\u26d4\\ufe0f\":731,\"\\u2733\\ufe0f\":732,\"\\u2747\\ufe0f\":733,\"\\u274e\":734,\"\\u2705\":735,\"\\u2734\\ufe0f\":736,\"\\ud83d\\udc9f\":737,\"\\ud83c\\udd9a\":738,\"\\ud83d\\udcf3\":739,\"\\ud83d\\udcf4\":740,\"\\ud83c\\udd70\":741,\"\\ud83c\\udd71\":742,\"\\ud83c\\udd8e\":743,\"\\ud83c\\udd7e\":744,\"\\ud83d\\udca0\":745,\"\\u27bf\":746,\"\\u267b\\ufe0f\":747,\"\\u2648\\ufe0f\":748,\"\\u2649\\ufe0f\":749,\"\\u264a\\ufe0f\":750,\"\\u264b\\ufe0f\":751,\"\\u264c\\ufe0f\":752,\"\\u264d\\ufe0f\":753,\"\\u264e\\ufe0f\":754,\"\\u264f\\ufe0f\":755,\"\\u2650\\ufe0f\":756,\"\\u2651\\ufe0f\":757,\"\\u2652\\ufe0f\":758,\"\\u2653\\ufe0f\":759,\"\\u26ce\":760,\"\\ud83d\\udd2f\":761,\"\\ud83c\\udfe7\":762,\"\\ud83d\\udcb9\":763,\"\\ud83d\\udcb2\":764,\"\\ud83d\\udcb1\":765,\"\\u00a9\":766,\"\\u00ae\":767,\"\\u2122\":768,\"\\u274c\":769,\"\\u203c\\ufe0f\":770,\"\\u2049\\ufe0f\":771,\"\\u2757\\ufe0f\":772,\"\\u2753\":773,\"\\u2755\":774,\"\\u2754\":775,\"\\u2b55\\ufe0f\":776,\"\\ud83d\\udd1d\":777,\"\\ud83d\\udd1a\":778,\"\\ud83d\\udd19\":779,\"\\ud83d\\udd1b\":780,\"\\ud83d\\udd1c\":781,\"\\ud83d\\udd03\":782,\"\\ud83d\\udd5b\":783,\"\\ud83d\\udd67\":784,\"\\ud83d\\udd50\":785,\"\\ud83d\\udd5c\":786,\"\\ud83d\\udd51\":787,\"\\ud83d\\udd5d\":788,\"\\ud83d\\udd52\":789,\"\\ud83d\\udd5e\":790,\"\\ud83d\\udd53\":791,\"\\ud83d\\udd5f\":792,\"\\ud83d\\udd54\":793,\"\\ud83d\\udd60\":794,\"\\ud83d\\udd55\":795,\"\\ud83d\\udd56\":796,\"\\ud83d\\udd57\":797,\"\\ud83d\\udd58\":798,\"\\ud83d\\udd59\":799,\t\t\"\\ud83d\\udd5a\":800,\"\\ud83d\\udd61\":801,\"\\ud83d\\udd62\":802,\"\\ud83d\\udd63\":803,\"\\ud83d\\udd64\":804,\"\\ud83d\\udd65\":805,\"\\ud83d\\udd66\":806,\"\\u2716\\ufe0f\":807,\"\\u2795\":808,\"\\u2796\":809,\"\\u2797\":810,\"\\u2660\\ufe0f\":811,\"\\u2665\\ufe0f\":812,\"\\u2663\\ufe0f\":813,\"\\u2666\\ufe0f\":814,\"\\ud83d\\udcae\":815,\"\\ud83d\\udcaf\":816,\"\\u2714\\ufe0f\":817,\"\\u2611\\ufe0f\":818,\"\\ud83d\\udd18\":819,\"\\ud83d\\udd17\":820,\"\\u27b0\":821,\"\\u3030\":822,\"\\u303d\\ufe0f\":823,\"\\ud83d\\udd31\":824,\"\\u25fc\\ufe0f\":825,\"\\u25fb\\ufe0f\":826,\"\\u25fe\\ufe0f\":827,\"\\u25fd\\ufe0f\":828,\"\\u25aa\\ufe0f\":829,\"\\u25ab\\ufe0f\":830,\"\\ud83d\\udd3a\":831,\"\\ud83d\\udd32\":832,\"\\ud83d\\udd33\":833,\"\\u26ab\\ufe0f\":834,\"\\u26aa\\ufe0f\":835,\"\\ud83d\\udd34\":836,\"\\ud83d\\udd35\":837,\"\\ud83d\\udd3b\":838,\"\\u2b1c\\ufe0f\":839,\"\\u2b1b\\ufe0f\":840,\"\\ud83d\\udd36\":841,\"\\ud83d\\udd37\":842,\"\\ud83d\\udd38\":843,\"\\ud83d\\udd39\":844\n\t\t,\"\\u263a\":4,\"\\u270c\":110,\"\\u261d\":120,\"\\u2764\":172,\"\\u2b50\":293,\"\\u2600\":294,\"\\u26c5\":295,\"\\u2601\":296,\"\\u26a1\":297,\"\\u2614\":298,\"\\u2744\":299,\"\\u26c4\":300,\"\\u260e\":336,\"\\u231b\":352,\"\\u231a\":354,\"\\u2709\":393,\"\\u2702\":417,\"\\u2712\":420,\"\\u270f\":421,\"\\ud83c\\udc04\":454,\"\\u26bd\":459,\"\\u26be\":460,\"\\u26f3\":465,\"\\u2615\":476,\"\\u26ea\":546,\"\\u26fa\":553,\"\\u26f2\":565,\"\\u26f5\":568,\"\\u2693\":571,\"\\u2708\":573,\"\\u26a0\":614,\"\\u26fd\":617,\"\\u2668\":620,\"\\u2b06\":650,\"\\u2b07\":651,\"\\u2b05\":652,\"\\u27a1\":653,\"\\u2197\":657,\"\\u2196\":658,\"\\u2198\":659,\"\\u2199\":660,\"\\u2194\":661,\"\\u2195\":662,\"\\u25c0\":664,\"\\u25b6\":665,\"\\u21a9\":668,\"\\u21aa\":669,\"\\u2139\":670,\"\\u2935\":675,\"\\u2934\":676,\"\\ud83c\\ude2f\":689,\"\\ud83c\\ude1a\":698,\"\\ud83c\\udd7f\":706,\"\\u267f\":707,\"\\u24c2\":712,\"\\u3299\":718,\"\\u3297\":719,\"\\u26d4\":731,\"\\u2733\":732,\"\\u2747\":733,\"\\u2734\":736,\"\\u267b\":747,\"\\u2648\":748,\"\\u2649\":749,\"\\u264a\":750,\"\\u264b\":751,\"\\u264c\":752,\"\\u264d\":753,\"\\u264e\":754,\"\\u264f\":755,\"\\u2650\":756,\"\\u2651\":757,\"\\u2652\":758,\"\\u2653\":759,\"\\u203c\":770,\"\\u2049\":771,\"\\u2757\":772,\"\\u2b55\":776,\"\\u2716\":807,\"\\u2660\":811,\"\\u2665\":812,\"\\u2663\":813,\"\\u2666\":814,\"\\u2714\":817,\"\\u2611\":818,\"\\u303d\":823,\"\\u25fc\":825,\"\\u25fb\":826,\"\\u25fe\":827,\"\\u25fd\":828,\"\\u25aa\":829,\"\\u25ab\":830,\"\\u26ab\":834,\"\\u26aa\":835,\"\\u2b1c\":839,\"\\u2b1b\":840\n\t};\n\tvar regx_arr=[];\n\tfor(var k in emoji){\n\t\tregx_arr.push(k);\n\t}\n\tvar regx = new RegExp('(' + regx_arr.join('|') + ')', 'g');\n\tregx_arr = null;\n\treturn str.replace(regx, function (a, b) {\n\t\treturn '<span class=\"vco-emoji emj'+emoji[b]+'\"></span>';\n\t});\n}\n","/*\tLoad\n Loads External Javascript and CSS\n Adapted from LazyLoad and adjusted from earlier TimelineJS to\n not add an extra layer. Seems like we could simplify\n this, but leaving in in case users need support for older browsers.\n ================================================== */\n\n/*\nLazyLoad makes it easy and painless to lazily load one or more external\nJavaScript or CSS files on demand either during or after the rendering of a web\npage.\n\nSupported browsers include Firefox 2+, IE6+, Safari 3+ (including Mobile\nSafari), Google Chrome, and Opera 9+. Other browsers may or may not work and\nare not officially supported.\n\nVisit https://github.com/rgrove/lazyload/ for more info.\n\nCopyright (c) 2011 Ryan Grove <ryan@wonko.com>\nAll rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\nclass Loader {\n\n constructor(document) {\n this.doc = document\n this.pending = {}\n this.queue = { css: [], js: [] };\n this.styleSheets = document.styleSheets\n this.env = this.getEnv()\n this.head = this.doc.head || this.doc.getElementsByTagName('head')[0];\n this.pollCount = 0\n\n }\n\n\n\n // -- Private Methods --------------------------------------------------------\n\n /**\n Creates and returns an HTML element with the specified name and attributes.\n\n @method createNode\n @param {String} name element name\n @param {Object} attrs name/value mapping of element attributes\n @return {HTMLElement}\n @private\n */\n createNode(name, attrs) {\n var node = this.doc.createElement(name),\n attr;\n\n for (attr in attrs) {\n if (attrs.hasOwnProperty(attr)) {\n node.setAttribute(attr, attrs[attr]);\n }\n }\n\n return node;\n }\n\n /**\n Called when the current pending resource of the specified type has finished\n loading. Executes the associated callback (if any) and loads the next\n resource in the queue.\n\n @method finish\n @param {String} type resource type ('css' or 'js')\n @private\n */\n finish(type) {\n var p = this.pending[type],\n callback,\n urls;\n\n if (p) {\n callback = p.callback;\n urls = p.urls;\n\n urls.shift();\n this.pollCount = 0;\n\n // If this is the last of the pending URLs, execute the callback and\n // start the next request in the queue (if any).\n if (!urls.length) {\n callback && callback.call(p.context, p.obj);\n this.pending[type] = null;\n this.queue[type].length && this.load(type);\n }\n }\n }\n\n /**\n Populates the <code>env</code> variable with user agent and feature test\n information.\n\n @method getEnv\n @private\n */\n getEnv() {\n var ua = navigator.userAgent;\n\n var env = {\n // True if this browser supports disabling async mode on dynamically\n // created script nodes. See\n // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order\n async: this.doc.createElement('script').async === true\n };\n\n (env.webkit = /AppleWebKit\\//.test(ua)) ||\n (env.ie = /MSIE/.test(ua)) ||\n (env.opera = /Opera/.test(ua)) ||\n (env.gecko = /Gecko\\//.test(ua)) ||\n (env.unknown = true);\n\n return env;\n }\n\n /**\n Loads the specified resources, or the next resource of the specified type\n in the queue if no resources are specified. If a resource of the specified\n type is already being loaded, the new request will be queued until the\n first request has been finished.\n\n When an array of resource URLs is specified, those URLs will be loaded in\n parallel if it is possible to do so while preserving execution order. All\n browsers support parallel loading of CSS, but only Firefox and Opera\n support parallel loading of scripts. In other browsers, scripts will be\n queued and loaded one at a time to ensure correct execution order.\n\n @method load\n @param {String} type resource type ('css' or 'js')\n @param {String|Array} urls (optional) URL or array of URLs to load\n @param {Function} callback (optional) callback function to execute when the\n resource is loaded\n @param {Object} obj (optional) object to pass to the callback function\n @param {Object} context (optional) if provided, the callback function will\n be executed in this object's context\n @private\n */\n load(type, urls, callback, obj, context) {\n var _finish = function() { this.finish(type); }.bind(this),\n isCSS = type === 'css',\n nodes = [],\n i, len, node, p, pendingUrls, url;\n\n\n\n if (urls) {\n // If urls is a string, wrap it in an array. Otherwise assume it's an\n // array and create a copy of it so modifications won't be made to the\n // original.\n urls = typeof urls === 'string' ? [urls] : urls.concat();\n\n // Create a request object for each URL. If multiple URLs are specified,\n // the callback will only be executed after all URLs have been loaded.\n //\n // Sadly, Firefox and Opera are the only browsers capable of loading\n // scripts in parallel while preserving execution order. In all other\n // browsers, scripts must be loaded sequentially.\n //\n // All browsers respect CSS specificity based on the order of the link\n // elements in the DOM, regardless of the order in which the stylesheets\n // are actually downloaded.\n if (isCSS || this.env.async || this.env.gecko || this.env.opera) {\n // Load in parallel.\n this.queue[type].push({\n urls: urls,\n callback: callback,\n obj: obj,\n context: context\n });\n } else {\n // Load sequentially.\n for (i = 0, len = urls.length; i < len; ++i) {\n this.queue[type].push({\n urls: [urls[i]],\n callback: i === len - 1 ? callback : null, // callback is only added to the last URL\n obj: obj,\n context: context\n });\n }\n }\n }\n\n // If a previous load request of this type is currently in progress, we'll\n // wait our turn. Otherwise, grab the next item in the queue.\n if (this.pending[type] || !(p = this.pending[type] = this.queue[type].shift())) {\n return;\n }\n\n\n pendingUrls = p.urls;\n\n for (i = 0, len = pendingUrls.length; i < len; ++i) {\n url = pendingUrls[i];\n\n if (isCSS) {\n node = this.env.gecko ? this.createNode('style') : this.createNode('link', {\n href: url,\n rel: 'stylesheet'\n });\n } else {\n node = this.createNode('script', { src: url });\n node.async = false;\n }\n\n node.className = 'lazyload';\n node.setAttribute('charset', 'utf-8');\n\n if (this.env.ie && !isCSS) {\n node.onreadystatechange = function() {\n if (/loaded|complete/.test(node.readyState)) {\n node.onreadystatechange = null;\n _finish();\n }\n };\n } else if (isCSS && (this.env.gecko || this.env.webkit)) {\n // Gecko and WebKit don't support the onload event on link nodes.\n if (this.env.webkit) {\n // In WebKit, we can poll for changes to document.styleSheets to\n // figure out when stylesheets have loaded.\n p.urls[i] = node.href; // resolve relative URLs (or polling won't work)\n this.pollWebKit();\n } else {\n // In Gecko, we can import the requested URL into a <style> node and\n // poll for the existence of node.sheet.cssRules. Props to Zach\n // Leatherman for calling my attention to this technique.\n node.innerHTML = '@import \"' + url + '\";';\n this.pollGecko(node);\n }\n } else {\n node.onload = node.onerror = _finish;\n }\n\n nodes.push(node);\n }\n\n for (i = 0, len = nodes.length; i < len; ++i) {\n this.head.appendChild(nodes[i]);\n }\n }\n\n /**\n Begins polling to determine when the specified stylesheet has finished loading\n in Gecko. Polling stops when all pending stylesheets have loaded or after 10\n seconds (to prevent stalls).\n\n Thanks to Zach Leatherman for calling my attention to the @import-based\n cross-domain technique used here, and to Oleg Slobodskoi for an earlier\n same-domain implementation. See Zach's blog for more details:\n http://www.zachleat.com/web/2010/07/29/load-css-dynamically/\n\n @method pollGecko\n @param {HTMLElement} node Style node to poll.\n @private\n */\n pollGecko(node) {\n var hasRules;\n\n try {\n // We don't really need to store this value or ever refer to it again, but\n // if we don't store it, Closure Compiler assumes the code is useless and\n // removes it.\n hasRules = !!node.sheet.cssRules;\n } catch (ex) {\n // An exception means the stylesheet is still loading.\n this.pollCount += 1;\n\n if (this.pollCount < 200) {\n var self = this;\n setTimeout(function() { self.pollGecko(node); }, 50);\n } else {\n // We've been polling for 10 seconds and nothing's happened. Stop\n // polling and finish the pending requests to avoid blocking further\n // requests.\n hasRules && this.finish('css');\n }\n\n return;\n }\n\n // If we get here, the stylesheet has loaded.\n this.finish('css');\n }\n\n /**\n Begins polling to determine when pending stylesheets have finished loading\n in WebKit. Polling stops when all pending stylesheets have loaded or after 10\n seconds (to prevent stalls).\n\n @method pollWebKit\n @private\n */\n pollWebKit() {\n var css = this.pending.css,\n i;\n\n if (css) {\n i = this.styleSheets.length;\n\n // Look for a stylesheet matching the pending URL.\n while (--i >= 0) {\n if (this.styleSheets[i].href === css.urls[0]) {\n this.finish('css');\n break;\n }\n }\n\n this.pollCount += 1;\n\n if (css) {\n if (this.pollCount < 200) {\n setTimeout(this.pollWebKit.bind(this), 50);\n } else {\n // We've been polling for 10 seconds and nothing's happened, which may\n // indicate that the stylesheet has been removed from the document\n // before it had a chance to load. Stop polling and finish the pending\n // request to prevent blocking further requests.\n this.finish('css');\n }\n }\n }\n }\n\n /**\n Requests the specified CSS URL or URLs and executes the specified\n callback (if any) when they have finished loading. If an array of URLs is\n specified, the stylesheets will be loaded in parallel and the callback\n will be executed after all stylesheets have finished loading.\n\n @method css\n @param {String|Array} urls CSS URL or array of CSS URLs to load\n @param {Function} callback (optional) callback function to execute when\n the specified stylesheets are loaded\n @param {Object} obj (optional) object to pass to the callback function\n @param {Object} context (optional) if provided, the callback function\n will be executed in this object's context\n @static\n */\n css(urls, callback, obj, context) {\n this.load('css', urls, callback, obj, context);\n }\n\n /**\n Requests the specified JavaScript URL or URLs and executes the specified\n callback (if any) when they have finished loading. If an array of URLs is\n specified and the browser supports it, the scripts will be loaded in\n parallel and the callback will be executed after all scripts have\n finished loading.\n\n Currently, only Firefox and Opera support parallel loading of scripts while\n preserving execution order. In other browsers, scripts will be\n queued and loaded one at a time to ensure correct execution order.\n\n @method js\n @param {String|Array} urls JS URL or array of JS URLs to load\n @param {Function} callback (optional) callback function to execute when\n the specified scripts are loaded\n @param {Object} obj (optional) object to pass to the callback function\n @param {Object} context (optional) if provided, the callback function\n will be executed in this object's context\n @static\n */\n js(urls, callback, obj, context) {\n this.load('js', urls, callback, obj, context);\n }\n}\n\nfunction loadJS(urls, callback, obj, context) {\n loader.js(urls, callback, obj, context)\n}\n\nfunction loadCSS(urls, callback, obj, context) {\n loader.css(urls, callback, obj, context)\n}\n\n\n// this seems fragile but not sure how else to inject the document\n// besides \nlet loader = new Loader(document)\n\nexport { loadJS, loadCSS }\n","/*\tDom\n\tUtilities for working with the DOM\n================================================== */\n\nexport default class Dom {\n\n\tstatic get(id) {\n\t\treturn (typeof id === 'string' ? document.getElementById(id) : id);\n\t}\n\t\n\tstatic getByClass(id) {\n\t\tif (id) {\n\t\t\treturn document.getElementsByClassName(id);\n\t\t}\n\t}\n\t\n\tstatic create(tagName, className, container) {\n\t\tvar el = document.createElement(tagName);\n\t\tel.className = className;\n\t\tif (container) {\n\t\t\tcontainer.appendChild(el);\n\t\t}\n\t\treturn el;\n\t}\n\t\n\tstatic createText(content, container) {\n\t\tvar el = document.createTextNode(content);\n\t\tif (container) {\n\t\t\tcontainer.appendChild(el);\n\t\t}\n\t\treturn el;\n\t}\n\t\n\tstatic getTranslateString(point) {\n\t\treturn Dom.TRANSLATE_OPEN +\n\t\t\t\tpoint.x + 'px,' + point.y + 'px' +\n\t\t\t\tDom.TRANSLATE_CLOSE;\n\t}\n\t\n\tstatic setPosition(el, point) {\n\t\tel._vco_pos = point;\n\t\tif (Browser.webkit3d) {\n\t\t\tel.style[Dom.TRANSFORM] = Dom.getTranslateString(point);\n\n\t\t\tif (Browser.android) {\n\t\t\t\tel.style['-webkit-perspective'] = '1000';\n\t\t\t\tel.style['-webkit-backface-visibility'] = 'hidden';\n\t\t\t}\n\t\t} else {\n\t\t\tel.style.left = point.x + 'px';\n\t\t\tel.style.top = point.y + 'px';\n\t\t}\n\t}\n\t\n\tstatic getPosition(el){\n\t var pos = {\n\t \tx: 0,\n\t\t\ty: 0\n\t }\n\t while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {\n\t pos.x += el.offsetLeft// - el.scrollLeft;\n\t pos.y += el.offsetTop// - el.scrollTop;\n\t el = el.offsetParent;\n\t }\n\t return pos;\n\t}\n\n\tstatic testProp(props) {\n\t\tvar style = document.documentElement.style;\n\n\t\tfor (var i = 0; i < props.length; i++) {\n\t\t\tif (props[i] in style) {\n\t\t\t\treturn props[i];\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t\n};\n\n/*\nUtil.extend(Dom, {\n\tTRANSITION: Dom.testProp(['transition', 'webkitTransition', 'OTransition', 'MozTransition', 'msTransition']),\n\tTRANSFORM: Dom.testProp(['transformProperty', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']),\n\n\tTRANSLATE_OPEN: 'translate' + (Browser.webkit3d ? '3d(' : '('),\n\tTRANSLATE_CLOSE: Browser.webkit3d ? ',0)' : ')'\n});\n*/\n","/* The equations defined here are open source under BSD License.\n * http://www.robertpenner.com/easing_terms_of_use.html (c) 2003 Robert Penner\n * Adapted to single time-based by\n * Brian Crescimanno <brian.crescimanno@gmail.com>\n * Ken Snyder <kendsnyder@gmail.com>\n */\n\n/** MIT License\n *\n * KeySpline - use bezier curve for transition easing function\n * Copyright (c) 2012 Gaetan Renaudeau <renaudeau.gaetan@gmail.com>\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n/**\n * KeySpline - use bezier curve for transition easing function\n * is inspired from Firefox's nsSMILKeySpline.cpp\n * Usage:\n * var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\n */\n\nlet Easings = {\n ease: [0.25, 0.1, 0.25, 1.0], \n linear: [0.00, 0.0, 1.00, 1.0],\n easein: [0.42, 0.0, 1.00, 1.0],\n easeout: [0.00, 0.0, 0.58, 1.0],\n easeinout: [0.42, 0.0, 0.58, 1.0]\n};\n\nexport default class Ease {\n\n\tKeySpline(a) {\n\t//KeySpline: function(mX1, mY1, mX2, mY2) {\n\t\tthis.get = function(aX) {\n\t\t\tif (a[0] == a[1] && a[2] == a[3]) return aX; // linear\n\t\t\treturn CalcBezier(GetTForX(aX), a[1], a[3]);\n\t\t}\n\n\t\tfunction A(aA1, aA2) {\n\t\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\n\t\t}\n\n\t\tfunction B(aA1, aA2) {\n\t\t\treturn 3.0 * aA2 - 6.0 * aA1;\n\t\t}\n\n\t\tfunction C(aA1) {\n\t\t\treturn 3.0 * aA1;\n\t\t}\n\n\t\t// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\t\tfunction CalcBezier(aT, aA1, aA2) {\n\t\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n\t\t}\n\n\t\t// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\t\tfunction GetSlope(aT, aA1, aA2) {\n\t\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n\t\t}\n\n\t\tfunction GetTForX(aX) {\n\t\t\t// Newton raphson iteration\n\t\t\tvar aGuessT = aX;\n\t\t\tfor (var i = 0; i < 4; ++i) {\n\t\t\t\tvar currentSlope = GetSlope(aGuessT, a[0], a[2]);\n\t\t\t\tif (currentSlope == 0.0) return aGuessT;\n\t\t\t\tvar currentX = CalcBezier(aGuessT, a[0], a[2]) - aX;\n\t\t\t\taGuessT -= currentX / currentSlope;\n\t\t\t}\n\t\t\treturn aGuessT;\n\t\t}\n\t}\n\t\n\teaseInSpline(t) {\n\t\tvar spline = new Ease.KeySpline(Easings.easein);\n\t\treturn spline.get(t);\n\t}\n\t\n\teaseInOutExpo(t) {\n\t\tvar spline = new Ease.KeySpline(Easings.easein);\n\t\treturn spline.get(t);\n\t}\n\n\teaseOut(t) {\n\t\treturn Math.sin(t * Math.PI / 2);\n\t}\n\n\teaseOutStrong(t) {\n\t\treturn (t == 1) ? 1 : 1 - Math.pow(2, - 10 * t);\n\t}\n\n\teaseIn(t) {\n\t\treturn t * t;\n\t}\n\n\teaseInStrong(t) {\n\t\treturn (t == 0) ? 0 : Math.pow(2, 10 * (t - 1));\n\t}\n\n\teaseOutBounce(pos) {\n\t\tif ((pos) < (1 / 2.75)) {\n\t\t\treturn (7.5625 * pos * pos);\n\t\t} else if (pos < (2 / 2.75)) {\n\t\t\treturn (7.5625 * (pos -= (1.5 / 2.75)) * pos + .75);\n\t\t} else if (pos < (2.5 / 2.75)) {\n\t\t\treturn (7.5625 * (pos -= (2.25 / 2.75)) * pos + .9375);\n\t\t} else {\n\t\t\treturn (7.5625 * (pos -= (2.625 / 2.75)) * pos + .984375);\n\t\t}\n\t}\n\n\teaseInBack(pos) {\n\t\tvar s = 1.70158;\n\t\treturn (pos) * pos * ((s + 1) * pos - s);\n\t}\n\n\teaseOutBack(pos) {\n\t\tvar s = 1.70158;\n\t\treturn (pos = pos - 1) * pos * ((s + 1) * pos + s) + 1;\n\t}\n\n\tbounce(t) {\n\t\tif (t < (1 / 2.75)) {\n\t\t\treturn 7.5625 * t * t;\n\t\t}\n\t\tif (t < (2 / 2.75)) {\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\n\t\t}\n\t\tif (t < (2.5 / 2.75)) {\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\n\t\t}\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\n\t}\n\n\tbouncePast(pos) {\n\t\tif (pos < (1 / 2.75)) {\n\t\t\treturn (7.5625 * pos * pos);\n\t\t} else if (pos < (2 / 2.75)) {\n\t\t\treturn 2 - (7.5625 * (pos -= (1.5 / 2.75)) * pos + .75);\n\t\t} else if (pos < (2.5 / 2.75)) {\n\t\t\treturn 2 - (7.5625 * (pos -= (2.25 / 2.75)) * pos + .9375);\n\t\t} else {\n\t\t\treturn 2 - (7.5625 * (pos -= (2.625 / 2.75)) * pos + .984375);\n\t\t}\n\t}\n\n\tswingTo(pos) {\n\t\tvar s = 1.70158;\n\t\treturn (pos -= 1) * pos * ((s + 1) * pos + s) + 1;\n\t}\n\n\tswingFrom(pos) {\n\t\tvar s = 1.70158;\n\t\treturn pos * pos * ((s + 1) * pos - s);\n\t}\n\n\telastic(pos) {\n\t\treturn -1 * Math.pow(4, - 8 * pos) * Math.sin((pos * 6 - 1) * (2 * Math.PI) / 2) + 1;\n\t}\n\n\tspring(pos) {\n\t\treturn 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));\n\t}\n\n\tblink(pos, blinks) {\n\t\treturn Math.round(pos * (blinks || 5)) % 2;\n\t}\n\n\tpulse(pos, pulses) {\n\t\treturn (-Math.cos((pos * ((pulses || 5) - .5) * 2) * Math.PI) / 2) + .5;\n\t}\n\n\twobble(pos) {\n\t\treturn (-Math.cos(pos * Math.PI * (9 * pos)) / 2) + 0.5;\n\t}\n\n\tsinusoidal(pos) {\n\t\treturn (-Math.cos(pos * Math.PI) / 2) + 0.5;\n\t}\n\n\tflicker(pos) {\n\t\tvar pos = pos + (Math.random() - 0.5) / 5;\n\t\treturn easings.sinusoidal(pos < 0 ? 0 : pos > 1 ? 1 : pos);\n\t}\n\n\tmirror(pos) {\n\t\tif (pos < 0.5) return easings.sinusoidal(pos * 2);\n\t\telse return easings.sinusoidal(1 - (pos - 0.5) * 2);\n\t}\n\n\t// accelerating from zero velocity\n\teaseInQuad(t) { return t*t }\n\t// decelerating to zero velocity\n\teaseOutQuad(t) { return t*(2-t) }\n\t// acceleration until halfway, then deceleration\n\teaseInOutQuad(t) { return t<.5 ? 2*t*t : -1+(4-2*t)*t }\n\t// accelerating from zero velocity \n\teaseInCubic(t) { return t*t*t }\n\t// decelerating to zero velocity \n\teaseOutCubic(t) { return (--t)*t*t+1 }\n\t// acceleration until halfway, then deceleration \n\teaseInOutCubic(t) { return t<.5 ? 4*t*t*t : (t-1)*(2*t-2)*(2*t-2)+1 }\n\t// accelerating from zero velocity \n\teaseInQuart(t) { return t*t*t*t }\n\t// decelerating to zero velocity \n\teaseOutQuart(t) { return 1-(--t)*t*t*t }\n\t// acceleration until halfway, then deceleration\n\teaseInOutQuart(t) { return t<.5 ? 8*t*t*t*t : 1-8*(--t)*t*t*t }\n\t// accelerating from zero velocity\n\teaseInQuint(t) { return t*t*t*t*t }\n\t// decelerating to zero velocity\n\teaseOutQuint(t) { return 1+(--t)*t*t*t*t }\n\t// acceleration until halfway, then deceleration \n\teaseInOutQuint(t) { return t<.5 ? 16*t*t*t*t*t : 1+16*(--t)*t*t*t*t }\n};\n\n/*\nMath.easeInExpo = function (t, b, c, d) {\n\treturn c * Math.pow( 2, 10 * (t/d - 1) ) + b;\n};\n\n\t\t\n\n// exponential easing out - decelerating to zero velocity\n\n\nMath.easeOutExpo = function (t, b, c, d) {\n\treturn c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b;\n};\n\n\t\t\n\n// exponential easing in/out - accelerating until halfway, then decelerating\n\n\nMath.easeInOutExpo = function (t, b, c, d) {\n\tt /= d/2;\n\tif (t < 1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b;\n\tt--;\n\treturn c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b;\n};\n*/\n","let EN = require('./locale/en.json');\n\nvar Language = {}\n\nfunction getLanguage(code) {\n var lang = require(`./locale/${code}.json`);\n for (let k in EN) {\n if (lang[k]) {\n if (typeof(EN[k]) == 'object') {\n lang[k] = Object.assign(EN[k], lang[k]);\n }\n } else {\n lang[k] = EN[k];\n }\n }\n return lang;\n}\n\nfunction setLanguage(code) {\n Language = getLanguage(code);\n return Language;\n}\n\nexport { setLanguage, Language }\n","import { extend } from \"../core/Util\"\n/*\tEvents\n\tadds custom events functionality to a class\n================================================== */\nexport default class Events {\n\t//addEventListener(/*String*/ type, /*Function*/ fn, /*(optional) Object*/ context) {\n\ton(/*String*/ type, /*Function*/ fn, /*(optional) Object*/ context) {\n\t\tvar events = this._vco_events = this._vco_events || {};\n\t\tevents[type] = events[type] || [];\n\t\tevents[type].push({\n\t\t\taction: fn,\n\t\t\tcontext: context || this\n\t\t});\n\t\treturn this;\n\t}\n\n\thasEventListeners(/*String*/ type) /*-> Boolean*/ {\n\t\tvar k = '_vco_events';\n\t\treturn (k in this) && (type in this[k]) && (this[k][type].length > 0);\n\t}\n\n\toff(/*String*/ type, /*Function*/ fn, /*(optional) Object*/ context) {\n\t\tif (!this.hasEventListeners(type)) {\n\t\t\treturn this;\n\t\t}\n\n\t\tfor (var i = 0, events = this._vco_events, len = events[type].length; i < len; i++) {\n\t\t\tif (\n\t\t\t\t(events[type][i].action === fn) &&\n\t\t\t\t(!context || (events[type][i].context === context))\n\t\t\t) {\n\t\t\t\tevents[type].splice(i, 1);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tfire(/*String*/ type, /*(optional) Object*/ data) {\n\t\tif (!this.hasEventListeners(type)) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar event = extend({\n\t\t\ttype: type,\n\t\t\ttarget: this\n\t\t}, data);\n\n\t\tvar listeners = this._vco_events[type].slice();\n\n\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\n\t\t\tlisteners[i].action.call(listeners[i].context || this, event);\n\t\t}\n\n\t\treturn this;\n\t}\n};\n\n//Events.on\t= Events.addEventListener;\n//Events.off\t= Events.removeEventListener;\n//Events.fire = Events.fireEvent;\n","/*\tDomMixins\n\tDOM methods used regularly\n\tAssumes there is a _el.container and animator\n================================================== */\nexport default class DomMixins {\n\t\n\t/*\tAdding, Hiding, Showing etc\n\t================================================== */\n\tshow(animate) {\n\t\tif (animate) {\n\t\t\t/*\n\t\t\tthis.animator = VCO.Animate(this._el.container, {\n\t\t\t\tleft: \t\t-(this._el.container.offsetWidth * n) + \"px\",\n\t\t\t\tduration: \tthis.options.duration,\n\t\t\t\teasing: \tthis.options.ease\n\t\t\t});\n\t\t\t*/\n\t\t} else {\n\t\t\tthis._el.container.style.display = \"block\";\n\t\t}\n\t}\n\t\n\thide(animate) {\n\t\tthis._el.container.style.display = \"none\";\n\t}\n\t\n\taddTo(container) {\n\t\tcontainer.appendChild(this._el.container);\n\t\tthis.onAdd();\n\t}\n\t\n\tremoveFrom(container) {\n\t\tcontainer.removeChild(this._el.container);\n\t\tthis.onRemove();\n\t}\n\t\n\t/*\tAnimate to Position\n\t================================================== */\n\tanimatePosition(pos, el, use_percent) {\n\t\tvar ani = {\n\t\t\tduration: \tthis.options.duration,\n\t\t\teasing: \tthis.options.ease\n\t\t};\n\t\tfor (var name in pos) {\n\t\t\tif (pos.hasOwnProperty(name)) {\n\t\t\t\tif (use_percent) {\n\t\t\t\t\tani[name] = pos[name] + \"%\";\n\t\t\t\t} else {\n\t\t\t\t\tani[name] = pos[name] + \"px\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.animator) {\n\t\t\tthis.animator.stop();\n\t\t}\n\t\tthis.animator = VCO.Animate(el, ani);\n\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\t\n\tonLoaded() {\n\t\tthis.fire(\"loaded\", this.data);\n\t}\n\t\n\tonAdd() {\n\t\tthis.fire(\"added\", this.data);\n\t}\n\n\tonRemove() {\n\t\tthis.fire(\"removed\", this.data);\n\t}\n\t\n\t/*\tSet the Position\n\t================================================== */\n\tsetPosition(pos, el) {\n\t\tfor (var name in pos) {\n\t\t\tif (pos.hasOwnProperty(name)) {\n\t\t\t\tif (el) {\n\t\t\t\t\tel.style[name] = pos[name] + \"px\";\n\t\t\t\t} else {\n\t\t\t\t\tthis._el.container.style[name] = pos[name] + \"px\";\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\t\n\tgetPosition() {\n\t\treturn VCO.Dom.getPosition(this._el.container);\n\t}\n\n};\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport Events from \"../core/Events\"\nimport DomMixins from \"../dom/DomMixins\"\nimport { Browser } from \"../core/Browser\"\n/*\tMap\n\tMakes a Map\n\n\tEvents:\n\tmarkerAdded\n\tmarkerRemoved\n\n\n================================================== */\n \n/*\nMap = VCO.Class.extend({\n\t\n\tincludes: [VCO.Events, VCO.DomMixins],\n\t\n\t_el: {},\n*/\n\t\nexport default class Map {\n\tconstructor(elem, data, options) {\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tmap: {},\n\t\t\tmap_mask: {}\n\t\t};\n\t\t\n\t\tif (typeof elem === 'object') {\n\t\t\tthis._el.container = elem;\n\t\t} else {\n\t\t\tthis._el.container = Dom.get(elem);\n\t\t}\n\t\t\n\t\t// LOADED\n\t\tthis._loaded = {\n\t\t\tdata: \tfalse,\n\t\t\tmap: \tfalse\n\t\t};\n\t\t\n\t\t// MAP\n\t\tthis._map = null;\n\t\t\n\t\t// MINI MAP\n\t\tthis._mini_map = null;\n\t\t\n\t\t// Markers\n\t\tthis._markers = [];\n\t\t\n\t\t// Marker Zoom Miniumum and Maximum\n\t\tthis.zoom_min_max = {\n\t\t\tmin: null,\n\t\t\tmax: null\n\t\t};\n\t\t\n\t\t// Line\n\t\tthis._line = null;\n\t\tthis._line_active = null;\n\t\t\n\t\t// Current Marker\n\t\tthis.current_marker = 0;\n\t\t\n\t\t// Markers Bounds Array\n\t\tthis.bounds_array = null;\n\t\t\n\t\t// Map Tiles Layer\n\t\tthis._tile_layer = null;\n\t\t\n\t\t// Map Tiles Layer for Mini Map\n\t\tthis._tile_layer_mini = null;\n\t\t\n\t\t// Image Layer (for zoomify)\n\t\tthis._image_layer = null;\n\t\n\t\t// Data\n\t\tthis.data = {\n\t\t\tuniqueid: \t\t\t\"\",\n\t\t\tslides: \t\t\t\t[{test:\"yes\"}, {test:\"yes\"}, {test:\"yes\"}]\n\t\t};\n\t\n\t\t//Options\n\t\tthis.options = {\n\t\t\tmap_type: \t\t\t\"osm:standard\",\n\t\t\tmap_as_image: \t\tfalse,\n\t\t\tmap_mini: \t\t\tfalse,\n\t\t\tmap_background_color: \"#d9d9d9\",\n\t\t\tmap_subdomains: \t\"\",\n\t\t\tmap_access_token: \"\",\n\t\t\tzoomify: {\n\t\t\t\tpath: \t\t\t\"\",\n\t\t\t\twidth: \t\t\t\"\",\n\t\t\t\theight: \t\t\"\",\n\t\t\t\ttolerance: \t\t0.8,\n\t\t\t\tattribution: \t\"\"\n\t\t\t},\n\t\t\tskinny_size: \t\t650,\n\t\t\tless_bounce: \t\ttrue,\n\t\t\tpath_gfx: \t\t\t\"gfx\",\n\t\t\tstart_at_slide: \t0,\n\t\t\tmap_popup: \t\t\tfalse, \n\t\t\tzoom_distance: \t\t100,\n\t\t\tcalculate_zoom: \ttrue, // Allow map to determine best zoom level between markers (recommended)\n\t\t\tline_follows_path: \ttrue, // Map history path follows default line, if false it will connect previous and current only\n\t\t\tline_color: \t\t\"#333\",\n\t\t\tline_color_inactive: \"#000\", \n\t\t\tline_weight: \t\t5,\n\t\t\tline_opacity: \t\t0.20,\n\t\t\tline_dash: \t\t\t\"5,5\",\n\t\t\tline_join: \t\t\t\"miter\",\n\t\t\tshow_lines: \t\ttrue,\n\t\t\tshow_history_line: \ttrue,\n\t\t\tmap_center_offset: null // takes object {top:0,left:0}\n\t\t};\n\t\t\n\t\t// Animation\n\t\tthis.animator = null;\n\t\t\n\t\t// Timer\n\t\tthis.timer = null;\n\t\t\n\t\t// Touchpad Events\n\t\tthis.touch_scale = 1;\n\t\tthis.scroll = {\n\t\t\tstart_time: null\n\t\t};\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\t\t\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t\tthis._createMap();\n\t\tthis._initData();\n\t\t\n\t\t\n\t}\n\t\n\t/*\tPublic\n\t================================================== */\n\tupdateDisplay(w, h, animate, d, offset) {\n\t\tthis._updateDisplay(w, h, animate, d, offset);\n\t}\n\t\n\tgoTo(n, change) {\n\t\tif (n < this._markers.length && n >= 0) {\n\t\t\tvar zoom = 0,\n\t\t\t\tprevious_marker = this.current_marker;\n\t\t\t\t\n\t\t\tthis.current_marker = n;\n\t\t\t\n\t\t\tvar marker = this._markers[this.current_marker];\n\t\t\t\n\t\t\t// Stop animation\n\t\t\tif (this.animator) {\n\t\t\t\tthis.animator.stop();\n\t\t\t}\n\t\t\t\n\t\t\t// Reset Active Markers\n\t\t\tthis._resetMarkersActive();\n\t\t\t\n\t\t\t// Check to see if it's an overview\n\t\t\tif (marker.data.type && marker.data.type == \"overview\") {\n\t\t\t\tthis._markerOverview();\n\t\t\t\tif (!change) {\n\t\t\t\t\tthis._onMarkerChange();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Make marker active\n\t\t\t\tmarker.active(true);\n\t\t\t\t\n\t\t\t\tif (change) {\n\t\t\t\t\t// Set Map View\n\t\t\t\t\tif (marker.data.location) {\n\t\t\t\t\t\tthis._viewTo(marker.data.location);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tif (marker.data.location && marker.data.location.lat) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate Zoom\n\t\t\t\t\t\tzoom = this._calculateZoomChange(this._getMapCenter(true), marker.location());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set Map View\n\t\t\t\t\t\tthis._viewTo(marker.data.location, {calculate_zoom: this.options.calculate_zoom, zoom:zoom});\n\t\t\t\t\t\n\t\t\t\t\t\t// Show Line\n\t\t\t\t\t\tif (this.options.line_follows_path) {\n\t\t\t\t\t\t\tif (this.options.show_history_line && marker.data.real_marker && this._markers[previous_marker].data.real_marker) {\n\t\t\t\t\t\t\t\tvar lines_array = [],\n\t\t\t\t\t\t\t\t\tline_num = previous_marker,\n\t\t\t\t\t\t\t\t\tpoint;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (line_num < this.current_marker) {\n\t\t\t\t\t\t\t\t\twhile (line_num < this.current_marker) {\n\t\t\t\t\t\t\t\t\t\tif (this._markers[line_num].data.location && this._markers[line_num].data.location.lat) {\n\t\t\t\t\t\t\t\t\t\t\tpoint = {\n\t\t\t\t\t\t\t\t\t\t\t\tlat:this._markers[line_num].data.location.lat,\n\t\t\t\t\t\t\t\t\t\t\t\tlon:this._markers[line_num].data.location.lon\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tlines_array.push(point);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tline_num++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (line_num > this.current_marker) {\n\t\t\t\t\t\t\t\t\twhile (line_num > this.current_marker) {\n\t\t\t\t\t\t\t\t\t\tif (this._markers[line_num].data.location && this._markers[line_num].data.location.lat) {\n\t\t\t\t\t\t\t\t\t\t\tpoint = {\n\t\t\t\t\t\t\t\t\t\t\t\tlat:this._markers[line_num].data.location.lat,\n\t\t\t\t\t\t\t\t\t\t\t\tlon:this._markers[line_num].data.location.lon\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tlines_array.push(point);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tline_num--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tlines_array.push({\n\t\t\t\t\t\t\t\t\tlat:marker.data.location.lat,\n\t\t\t\t\t\t\t\t\tlon:marker.data.location.lon\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tthis._replaceLines(this._line_active, lines_array);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Show Line\n\t\t\t\t\t\t\tif (this.options.show_history_line && marker.data.real_marker && this._markers[previous_marker].data.real_marker) {\n\t\t\t\t\t\t\t\tthis._replaceLines(this._line_active, [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlat:marker.data.location.lat,\n\t\t\t\t\t\t\t\t\t\tlon:marker.data.location.lon\n\t\t\t\t\t\t\t\t\t}, \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlat:this._markers[previous_marker].data.location.lat,\n\t\t\t\t\t\t\t\t\t\tlon:this._markers[previous_marker].data.location.lon\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._markerOverview();\n\t\t\t\t\t\tif (!change) {\n\t\t\t\t\t\t\tthis._onMarkerChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fire Event\n\t\t\t\t\tthis._onMarkerChange();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tpanTo(loc, animate) {\n\t\tthis._panTo(loc, animate);\n\t}\n\t\n\tzoomTo(z, animate) {\n\t\tthis._zoomTo(z, animate);\n\t}\n\t\n\tviewTo(loc, opts) {\n\t\tthis._viewTo(loc, opts);\n\t}\n\t\n\tgetBoundsZoom(m1, m2, inside, padding) {\n\t\tthis.__getBoundsZoom(m1, m2, inside, padding); // (LatLngBounds[, Boolean, Point]) -> Number\n\t}\n\t\n\tmarkerOverview() {\n\t\tthis._markerOverview();\n\t}\n\t\n\tcalculateMarkerZooms() {\n\t\tthis._calculateMarkerZooms();\n\t}\n\t\n\tcreateMiniMap() {\n\t\tthis._createMiniMap();\n\t}\n\t\n\tsetMapOffset(left, top) {\n\t\t// Update Component Displays\n\t\tthis.options.map_center_offset.left = left;\n\t\tthis.options.map_center_offset.top \t= top;\n\t}\n\t\n\tcalculateMinMaxZoom() {\n\t\tfor (var i = 0; i < this._markers.length; i++) {\n\t\t\t\n\t\t\tif (this._markers[i].data.location && this._markers[i].data.location.zoom) {\n\t\t\t\tthis.updateMinMaxZoom(this._markers[i].data.location.zoom);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tupdateMinMaxZoom(zoom) {\n\t\tif (!this.zoom_min_max.max) {\n\t\t\tthis.zoom_min_max.max = zoom;\n\t\t}\n\t\t\n\t\tif (!this.zoom_min_max.min) {\n\t\t\tthis.zoom_min_max.min = zoom;\n\t\t}\n\t\t\n\t\tif (this.zoom_min_max.max < zoom) {\n\t\t\tthis.zoom_min_max.max = zoom;\n\t\t}\n\t\tif (this.zoom_min_max.min > zoom) {\n\t\t\tthis.zoom_min_max.min = zoom;\n\t\t}\n\t}\n\t\n\tinitialMapLocation() {\n\t\tif (this._loaded.data && this._loaded.map) {\n\t\t\tthis.goTo(this.options.start_at_slide, true);\n\t\t\tthis._initialMapLocation();\n\t\t}\n\t}\n\t\n\t/*\tAdding, Hiding, Showing etc\n\t================================================== */\n\tshow() {\n\t\t\n\t}\n\t\n\thide() {\n\t\t\n\t}\n\t\n\taddTo(container) {\n\t\tcontainer.appendChild(this._el.container);\n\t\tthis.onAdd();\n\t}\n\t\n\tremoveFrom(container) {\n\t\tcontainer.removeChild(this._el.container);\n\t\tthis.onRemove();\n\t}\n\t\n\t/*\tAdding and Removing Markers\n\t================================================== */\n\tcreateMarkers(array) {\n\t\tthis._createMarkers(array)\n\t}\n\t\n\tcreateMarker(d) {\n\t\tthis._createMarker(d);\n\t}\n\t\n\t_destroyMarker(marker) {\n\t\tthis._removeMarker(marker);\n\t\tfor (var i = 0; i < this._markers.length; i++) {\n\t\t\tif (this._markers[i] == marker) {\n\t\t\t\tthis._markers.splice(i, 1);\n\t\t\t}\n\t\t}\n\t\tthis.fire(\"markerRemoved\", marker);\n\t}\n\t\n\t_createMarkers(array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tthis._createMarker(array[i]); // this must be called even for overview which has no marker or other logic must be fixed. \n\t\t\tif (array[i].location && array[i].location.lat && this.options.show_lines) {\n\t\t\t\tthis._addToLine(this._line, array[i]);\n\t\t\t}\n\t\t};\n\t\t\n\t}\n\t\n\t_createLines(array) {\n\t\t\n\t}\n\t\n\t\n\t/*\tMap Specific\n\t================================================== */\n\t\n\t\t/*\tMap Specific Create\n\t\t================================================== */\n\t\t// Extend this map class and use this to create the map using preferred API\n\t\t_createMap() {\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\tMini Map Specific Create\n\t\t================================================== */\n\t\t// Extend this map class and use this to create the map using preferred API\n\t\t_createMiniMap() {\n\t\t\t\n\t\t}\n\t\n\t\t/*\tMap Specific Marker\n\t\t================================================== */\n\t\t\n\t\t// Specific Marker Methods based on preferred Map API\n\t\t_createMarker(d) {\n\t\t\tvar marker = {};\n\t\t\tmarker.on(\"markerclick\", this._onMarkerClick);\n\t\t\tthis._addMarker(marker);\n\t\t\tthis._markers.push(marker);\n\t\t\tmarker.marker_number = this._markers.length - 1;\n\t\t\tthis.fire(\"markerAdded\", marker);\n\t\t}\n\t\n\t\t_addMarker(marker) {\n\t\t\n\t\t}\n\t\n\t\t_removeMarker(marker) {\n\t\t\n\t\t}\n\t\t\n\t\t_resetMarkersActive() {\n\t\t\tfor (var i = 0; i < this._markers.length; i++) {\n\t\t\t\tthis._markers[i].active(false);\n\t\t\t};\n\t\t}\n\t\t\n\t\t_calculateMarkerZooms() {\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\tMap Specific Line\n\t\t================================================== */\n\t\t\n\t\t_createLine(d) {\n\t\t\treturn {data: d};\n\t\t}\n\t\t\n\t\t_addToLine(line, d) {\n\t\t\t\n\t\t}\n\t\t\n\t\t_replaceLines(line, d) {\n\t\t\n\t\t}\n\t\t\n\t\t_addLineToMap(line) {\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t/*\tMap Specific Methods\n\t\t================================================== */\n\t\t\n\t\t_panTo(loc, animate) {\n\t\t\t\n\t\t}\n\t\t\n\t\t_zoomTo(z, animate) {\n\t\t\n\t\t}\n\t\t\n\t\t_viewTo(loc, opts) {\n\t\t\n\t\t}\n\t\t\n\t\t_updateMapDisplay(animate, d) {\n\t\t\t\n\t\t}\n\t\t\n\t\t_refreshMap() {\n\t\t\t\n\t\t}\n\t\t\n\t\t_getMapLocation(m) {\n\t\t\treturn {x:0, y:0};\n\t\t}\n\t\t\n\t\t_getMapZoom() {\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t_getMapCenter() {\n\t\t\treturn {lat:0, lng:0};\n\t\t}\n\t\t\n\t\t_getBoundsZoom(m1, m2, inside, padding) {\n\t\t\n\t\t}\n\t\t\n\t\t_markerOverview() {\n\t\t\t\n\t\t}\n\t\n\t\t_initialMapLocation() {\n\t\t\t\n\t\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\t_onMarkerChange(e) {\n\t\tthis.fire(\"change\", {current_marker:this.current_marker});\n\t}\n\t\n\t_onMarkerClick(e) {\n\t\tif (this.current_marker != e.marker_number) {\n\t\t\tthis.goTo(e.marker_number);\n\t\t}\n\t}\n\t\n\t_onMapLoaded(e) {\n\t\tthis._loaded.map = true;\n\t\t\n\t\t\n\t\tif (this.options.calculate_zoom) {\n\t\t\tthis.calculateMarkerZooms();\n\t\t}\n\t\t\n\t\tthis.calculateMinMaxZoom();\n\t\t\n\t\tif (this.options.map_mini && !Browser.touch) {\n\t\t\tthis.createMiniMap();\n\t\t}\n\t\t\n\t\tthis.initialMapLocation();\n\t\tthis.fire(\"loaded\", this.data);\n\t}\n\t\n\t_onWheel(e) {\n\t\t// borrowed from http://jsbin.com/qiyaseza/5/edit\n\t\tvar self = this;\n\t\t\n\t\tif (e.ctrlKey) {\n\t\t\tvar s = Math.exp(-e.deltaY/100);\n\t\t\tthis.touch_scale *= s;\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation(e);\n\t\t} \n\t\t\n\t\tif (!this.scroll.start_time) {\n\t\t\tthis.scroll.start_time = +new Date();\n\t\t};\n\t\t\n\t\tvar time_left = Math.max(40 - (+new Date() - this.scroll.start_time), 0);\n\t\t\n\t\tclearTimeout(this.scroll.timer);\n\t\t\n\t\tthis.scroll.timer = setTimeout(function() {\n\t\t\tself._scollZoom();\n\t\t\t//e.preventDefault();\n\t\t\t//e.stopPropagation(e);\n\t\t}, time_left);\n\t\t\n\t\t\n\t}\n\t\n\t_scollZoom(e) {\n\t\tvar self = this,\n\t\t\tcurrent_zoom = this._getMapZoom();\n\t\t\t\n\t\tthis.scroll.start_time = null;\n\t\t//VCO.DomUtil.addClass(this._el.container, 'vco-map-touch-zoom');\n\t\tclearTimeout(this.scroll.timer);\n\t\tclearTimeout(this.scroll.timer_done);\n\t\t\n\t\tthis.scroll.timer_done = setTimeout(function() {\n\t\t\tself._scollZoomDone();\n\t\t}, 1000);\n\t\t\n\t\tthis.zoomTo(Math.round(current_zoom * this.touch_scale));\n\t}\n\t\n\t_scollZoomDone(e) {\n\t\t//VCO.DomUtil.removeClass(this._el.container, 'vco-map-touch-zoom');\n\t\tthis.touch_scale = 1;\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t\n\t_calculateZoomChange(origin, destination, correct_for_center) {\n\t\treturn this._getBoundsZoom(origin, destination, correct_for_center);\n\t}\n\t\n\t_updateDisplay(w, h, animate, d) {\n\t\t\n\t\t// Update Map Display\n\t\tthis._updateMapDisplay(animate, d);\n\t}\n\t\n\t_initLayout() {\n\t\t\n\t\t// Create Layout\n\t\tthis._el.map_mask \t= Dom.create(\"div\", \"vco-map-mask\", this._el.container);\n\t\t\n\t\tif (this.options.map_as_image) {\n\t\t\tthis._el.map \t= Dom.create(\"div\", \"vco-map-display vco-mapimage-display\", this._el.map_mask);\n\t\t} else {\n\t\t\tthis._el.map \t= Dom.create(\"div\", \"vco-map-display\", this._el.map_mask);\n\t\t}\n\t\t\n\t\t\n\t}\n\t\n\t_initData() {\n\t\tif (this.data.slides) {\n\t\t\tthis._createMarkers(this.data.slides);\n\t\t\tthis._resetMarkersActive();\n\t\t\tthis._markers[this.current_marker].active(true);\n\t\t\tthis._loaded.data = true;\n\t\t\tthis._initialMapLocation();\n\t\t\t\n\t\t}\n\t}\n\t\n\t_initEvents() {\n\t\tvar self = this;\n\t\t\n\t\tthis._el.map.addEventListener('wheel', function(e) {\n\t\t\tself._onWheel(e);\n\t\t});\n\t\t\n\t\t//this.on(\"wheel\", this._onWheel, this);\n\t}\n\t\n}\n\nclassMixin(Map, Events, DomMixins)\nexport { Map }\n","import { LeafletModule } from \"leaflet\";\n/*\n * L.TileLayer.Zoomify display Zoomify tiles with Leaflet\n * Modified from https://github.com/turban/Leaflet.Zoomify\n */\n\nlet defaultZoomifyOptions = {\n continuousWorld: true,\n tolerance: 0.8\n};\n\nconst DEFAULT_WIDTH = 600;\nconst DEFAULT_HEIGHT = 600;\n\nexport default class ZoomifyTileLayer extends L.TileLayer {\n\n\tconstructor(url, options=defaultZoomifyOptions) {\n super(url, options);\n\t\toptions = L.setOptions(this, options);\n\t\tthis._url = url;\n\n if (!options.width) { options.width = DEFAULT_WIDTH; }\n if (!options.height) { options.width = DEFAULT_HEIGHT; }\n\n \t var imageSize = L.point(options.width, options.height),\n \t tileSize = options.tileSize;\n\n\t\tthis._imageSize = [imageSize];\n\t\tthis._gridSize = [this._getGridSize(imageSize)];\n\n while (imageSize.x > tileSize || imageSize.y > tileSize) {\n \t imageSize = imageSize.divideBy(2).floor();\n \t this._imageSize.push(imageSize);\n \t this._gridSize.push(this._getGridSize(imageSize));\n }\n \n\t\tthis._imageSize.reverse();\n\t\tthis._gridSize.reverse();\n\n this.options.maxZoom = this._gridSize.length - 1;\n\t}\n\n\tonAdd(map) {\n\t\tL.TileLayer.prototype.onAdd.call(this, map);\n\t\tvar mapSize = map.getSize(),\n\t\t\tzoom = this._getBestFitZoom(mapSize),\n\t\t\timageSize = this._imageSize[zoom];\n var x = imageSize.x ? imageSize.x : 0;\n var y = imageSize.y ? imageSize.y : 0;\n\t \tvar center = map.options.crs.pointToLatLng(L.point(x / 2, y / 2), zoom);\n\t}\n\n\tgetZoomifyBounds(map) {\n\t\tvar imageSize \t= this._imageSize[0],\n\t\t\ttopleft \t= map.options.crs.pointToLatLng(L.point(0, 0), 0),\n\t\t bottomright = map.options.crs.pointToLatLng(L.point(imageSize.x, imageSize.y), 0),\n\t\t bounds \t\t= L.latLngBounds(topleft, bottomright);\n\t\treturn bounds;\n\t}\n\n\tgetCenterZoom(map) {\n\t\tvar mapSize = map.getSize(),\n\t\t\tzoom = this._getBestFitZoom(mapSize),\n\t\t\timageSize = this._imageSize[zoom];\n var x = imageSize.x ? imageSize.x : 0;\n var y = imageSize.y ? imageSize.y : 0;\n\t var center = map.options.crs.pointToLatLng(L.point(x / 2, y / 2), zoom);\n\n\t\treturn {\n\t\t\tcenter: center,\n\t\t\tlat: \tcenter.lat,\n\t\t\tlon: \tcenter.lng,\n\t\t\tzoom: \tzoom\n\t\t};\n\t}\n\n\t_getGridSize(imageSize) {\n\t\tvar tileSize = this.options.tileSize;\n var x = imageSize.x ? imageSize.x : 0;\n var y = imageSize.y ? imageSize.y : 0;\n\t\treturn L.point(Math.ceil(x / tileSize), Math.ceil(y / tileSize));\n\t}\n\n\t_getBestFitZoom(mapSize) {\n\t\tvar tolerance = this.options.tolerance,\n\t\t\tzoom = this._imageSize.length - 1,\n\t\t\timageSize, zoom;\n\n\t\twhile (zoom) {\n\t\t\timageSize = this._imageSize[zoom];\n\t\t\tif (imageSize.x * tolerance < mapSize.x && imageSize.y * tolerance < mapSize.y) {\n\t\t\t\treturn zoom;\n\t\t\t}\n\t\t\tzoom--;\n\t\t}\n\n\t\treturn zoom;\n\t}\n\n\t_tileShouldBeLoaded(tilePoint) {\n\t\tvar gridSize = this._gridSize[this._map.getZoom()];\n\t\tif (gridSize) {\n\t\t\treturn (tilePoint.x >= 0 && tilePoint.x < gridSize.x && tilePoint.y >= 0 && tilePoint.y < gridSize.y);\n\t\t} else {\n\t\t\tconsole.log(\"_tileShouldBeLoaded: No gridSize for \" + this._map.getZoom());\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t_addTile(tilePoint, container) {\n\t\tvar tilePos = this._getTilePos(tilePoint),\n\t\t\ttile = this._getTile(),\n\t\t\tzoom = this._map.getZoom(),\n\t\t\timageSize = this._imageSize[zoom],\n\t\t\tgridSize = this._gridSize[zoom],\n\t\t\ttileSize = this.options.tileSize;\n\n\t\tif (tilePoint.x === gridSize.x - 1) {\n\t\t\ttile.style.width = imageSize.x - (tileSize * (gridSize.x - 1)) + 'px';\n\t\t}\n\n\t\tif (tilePoint.y === gridSize.y - 1) {\n\t\t\ttile.style.height = imageSize.y - (tileSize * (gridSize.y - 1)) + 'px';\n\t\t}\n\n\t\tL.DomUtil.setPosition(tile, tilePos, L.Browser.chrome || L.Browser.android23);\n\n\t\tthis._tiles[tilePoint.x + ':' + tilePoint.y] = tile;\n\t\tthis._loadTile(tile, tilePoint);\n\n\t\tif (tile.parentNode !== this._tileContainer) {\n\t\t\tcontainer.appendChild(tile);\n\t\t}\n\t}\n\n\tgetTileUrl(tilePoint) {\n\t\treturn this._url + 'TileGroup' + this._getTileGroup(tilePoint) + '/' + this._map.getZoom() + '-' + tilePoint.x + '-' + tilePoint.y + '.jpg';\n\t}\n\t_getTileGroup(tilePoint) {\n\t\tvar zoom = this._map.getZoom(),\n\t\t\tnum = 0,\n\t\t\tgridSize;\n\t\tfor (let z = 0; z < zoom; z++) {\n\t\t\tgridSize = this._gridSize[z];\n\t\t\tnum += gridSize.x * gridSize.y;\n\t\t}\n\t\tnum += tilePoint.y * this._gridSize[zoom].x + tilePoint.x;\n \treturn Math.floor(num / 256);;\n\t}\n}\n","import { LeafletModule } from \"leaflet\";\n/*\n\thttps://github.com/Norkart/Leaflet-MiniMap\n\t\n*/\n\n\nconst BASE_OPTIONS = {\n position: 'bottomright',\n toggleDisplay: false,\n zoomLevelOffset: -5,\n zoomLevelFixed: false,\n zoomAnimation: false,\n autoToggleDisplay: false,\n\t\tshow_view: true,\n width: 150,\n height: 150,\n aimingRectOptions: {\n color: \"#c34528\",\n weight: 1,\n clickable: false,\n\t\t\tstroke:true\n },\n shadowRectOptions: {\n color: \"#000000\",\n weight: 1,\n clickable: false,\n opacity: 0,\n fillOpacity: 0\n }\n };\n\nexport default class MiniMapControl extends L.Control {\n\n //layer is the map layer to be shown in the minimap\n\tconstructor(layer, options) {\n let _options = Object.assign({}, BASE_OPTIONS, options);\n super(layer, _options);\n L.Util.setOptions(this, _options);\n this.hideText = 'Hide MiniMap';\n this.showText = 'Show MiniMap';\n //Make sure the aiming rects are non-clickable even if the user tries to set them clickable (most likely by forgetting to specify them false)\n this.options.aimingRectOptions.clickable = false;\n this.options.shadowRectOptions.clickable = false;\n this._layer = layer;\n }\n\n onAdd(map) {\n\n this._mainMap = map;\n\n //Creating the container and stopping events from spilling through to the main map.\n this._container = L.DomUtil.create('div', 'leaflet-control-minimap');\n this._container.style.width = this.options.width + 'px';\n this._container.style.height = this.options.height + 'px';\n L.DomEvent.disableClickPropagation(this._container);\n L.DomEvent.on(this._container, 'mousewheel', L.DomEvent.stopPropagation);\n\n\n this._miniMap = new L.Map(this._container, {\n attributionControl: false,\n zoomControl: false,\n zoomAnimation: this.options.zoomAnimation,\n autoToggleDisplay: this.options.autoToggleDisplay,\n touchZoom: false,\n scrollWheelZoom: false,\n doubleClickZoom: false,\n boxZoom: false,\n\t\t\tdragging:false,\n crs: map.options.crs\n });\n\n this._miniMap.addLayer(this._layer);\n\n //These bools are used to prevent infinite loops of the two maps notifying each other that they've moved.\n this._mainMapMoving = false;\n this._miniMapMoving = false;\n\n //Keep a record of this to prevent auto toggling when the user explicitly doesn't want it.\n this._userToggledDisplay = false;\n this._minimized = false;\n\n if (this.options.toggleDisplay) {\n this._addToggleButton();\n }\n\n this._miniMap.whenReady(L.Util.bind(function() {\n this._aimingRect = L.rectangle(this._mainMap.getBounds(), this.options.aimingRectOptions).addTo(this._miniMap);\n this._shadowRect = L.rectangle(this._mainMap.getBounds(), this.options.shadowRectOptions).addTo(this._miniMap);\n\t\t\t\n\t\t\tthis._locationCircle = L.circleMarker(this._mainMap.getCenter(), {\n\t\t\t\tfillColor: \"#c34528\",\n\t\t\t\tcolor: \"#FFFFFF\",\n\t\t\t\tweight:2,\n\t\t\t\tradius: 10,\n\t\t\t\tfill:true,\n\t\t\t\tfillOpacity: 1,\n\t\t\t\tstroke:true,\n\t\t\t\tclickable: false\n\t\t\t}).addTo(this._miniMap);\n\t\t\tthis._locationCircle.setRadius(5);\n\t\t\t\n this._mainMap.on('moveend', this._onMainMapMoved, this);\n this._mainMap.on('move', this._onMainMapMoving, this);\n //this._miniMap.on('movestart', this._onMiniMapMoveStarted, this);\n //this._miniMap.on('move', this._onMiniMapMoving, this);\n //this._miniMap.on('moveend', this._onMiniMapMoved, this);\n\t\t\tif (this.options.bounds_array) {\n\t\t\t\tthis._miniMap.fitBounds(this.options.bounds_array, {padding:[15,15]});\n\t\t\t}\n }, this));\n\n return this._container;\n }\n\t\n\tminimize(hide_completely) {\n /* It is not clear if we want to support a minimize option, but if we\n do, we will need to sort out why this function is currently being\n called in the normal course of navigation. In the mean time, this\n code is commented out to prevent inadvertent minimization. */\n\t\tif (!this._minimized) {\n\t\t\tthis._minimize();\n\t\t}\n\t}\n\t\n\trestore() {\n\t\tif (this._minimized) {\n\t\t\tthis._restore();\n\t\t\tthis._miniMap.fitBounds(this.options.bounds_array, {padding:[15,15]});\n\t\t}\n\t}\n\n addTo(map) {\n L.Control.prototype.addTo.call(this, map);\n this._miniMap.setView(this._mainMap.getCenter(), this._decideZoom(true));\n this._setDisplay(this._decideMinimized());\n return this;\n }\n\n onRemove(map) {\n this._mainMap.off('moveend', this._onMainMapMoved, this);\n this._mainMap.off('move', this._onMainMapMoving, this);\n this._miniMap.off('moveend', this._onMiniMapMoved, this);\n\n this._miniMap.removeLayer(this._layer);\n }\n\n _addToggleButton() {\n this._toggleDisplayButton = this.options.toggleDisplay ? this._createButton('', this.hideText, 'leaflet-control-minimap-toggle-display', this._container, this._toggleDisplayButtonClicked, this) : undefined;\n }\n\n _createButton(html, title, className, container, fn, context) {\n var link = L.DomUtil.create('a', className, container);\n link.innerHTML = html;\n link.href = '#';\n link.title = title;\n\n var stop = L.DomEvent.stopPropagation;\n\n L.DomEvent.on(link, 'click', stop)\n .on(link, 'mousedown', stop)\n .on(link, 'dblclick', stop)\n .on(link, 'click', L.DomEvent.preventDefault)\n .on(link, 'click', fn, context);\n\n return link;\n }\n\n _toggleDisplayButtonClicked() {\n this._userToggledDisplay = true;\n if (!this._minimized) {\n this._minimize();\n this._toggleDisplayButton.title = this.showText;\n } else {\n this._restore();\n this._toggleDisplayButton.title = this.hideText;\n }\n }\n\n _setDisplay(minimize) {\n if (minimize != this._minimized) {\n if (!this._minimized) {\n this._minimize();\n } else {\n this._restore();\n }\n }\n }\n\n _minimize() {\n this._container.style.width = '0px';\n this._container.style.height = '0px';\n this._container.style.border = '0';\n this._minimized = true;\n }\n\n _restore() {\n this._container.style.width = this.options.width + 'px';\n this._container.style.height = this.options.height + 'px';\n this._container.style.border = '2px solid #b3b3b3';\n this._minimized = false;\n }\n\n _onMainMapMoved(e) {\n if (!this._miniMapMoving) {\n\t\t\tvar zoom = this._decideZoom(true);\n\t\t\tif (zoom != 0) {\n\t\t\t\t//this._miniMap.setView(this._mainMap.getCenter(), this._decideZoom(true));\n\t\t\t\t//this._miniMap.setView(this._mainMap.getCenter());\n\t\t\t}\n this._mainMapMoving = true;\n\n this._setDisplay(this._decideMinimized());\n } else {\n this._miniMapMoving = false;\n }\n\t\tif (this.options.show_view) {\n\t\t\tthis._aimingRect.setBounds(this._mainMap.getBounds());\n\t\t}\n\t\tthis._locationCircle.setLatLng(this._mainMap.getCenter());\n \n }\n\n _onMainMapMoving(e) {\n\t\tif (this.options.show_view) {\n\t\t\tthis._aimingRect.setBounds(this._mainMap.getBounds());\n\t\t}\n\t\tthis._locationCircle.setLatLng(this._mainMap.getCenter());\n }\n\n _onMiniMapMoveStarted(e) {\n var lastAimingRect = this._aimingRect.getBounds();\n var sw = this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest());\n var ne = this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast());\n this._lastAimingRectPosition = {\n sw: sw,\n ne: ne\n };\n }\n\n _onMiniMapMoving(e) {\n if (!this._mainMapMoving && this._lastAimingRectPosition) {\n this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw), this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne)));\n this._shadowRect.setStyle({\n opacity: 1,\n fillOpacity: 0.3\n });\n }\n }\n\n _onMiniMapMoved(e) {\n if (!this._mainMapMoving) {\n this._miniMapMoving = true;\n this._mainMap.setView(this._miniMap.getCenter(), this._decideZoom(false));\n this._shadowRect.setStyle({\n opacity: 0,\n fillOpacity: 0\n });\n } else {\n this._mainMapMoving = false;\n }\n }\n\n _decideZoom(fromMaintoMini) {\n if (!this.options.zoomLevelFixed && this.options.zoomLevelFixed != 0) {\n if (fromMaintoMini) {\n\t\t\t\treturn this._mainMap.getZoom() + this.options.zoomLevelOffset;\n\t\t\t} else {\n\t\t\t\tvar currentDiff = this._miniMap.getZoom() - this._mainMap.getZoom();\n\t\t\t\tvar proposedZoom = this._miniMap.getZoom() - this.options.zoomLevelOffset;\n\t\t\t\tvar toRet;\n\n\t\t\t\tif (currentDiff > this.options.zoomLevelOffset && this._mainMap.getZoom() < this._miniMap.getMinZoom() - this.options.zoomLevelOffset) {\n\t\t\t\t //This means the miniMap is zoomed out to the minimum zoom level and can't zoom any more.\n\t\t\t\t if (this._miniMap.getZoom() > this._lastMiniMapZoom) {\n\t\t\t\t //This means the user is trying to zoom in by using the minimap, zoom the main map.\n\t\t\t\t toRet = this._mainMap.getZoom() + 1;\n\t\t\t\t //Also we cheat and zoom the minimap out again to keep it visually consistent.\n\t\t\t\t this._miniMap.setZoom(this._miniMap.getZoom() - 1);\n\t\t\t\t } else {\n\t\t\t\t //Either the user is trying to zoom out past the mini map's min zoom or has just panned using it, we can't tell the difference.\n\t\t\t\t //Therefore, we ignore it!\n\t\t\t\t toRet = this._mainMap.getZoom();\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t //This is what happens in the majority of cases, and always if you configure the min levels + offset in a sane fashion.\n\t\t\t\t toRet = proposedZoom;\n\t\t\t\t}\n\t\t\t\tthis._lastMiniMapZoom = this._miniMap.getZoom();\n\t\t\t\treturn toRet;\n }\n } else {\n if (fromMaintoMini) {\n\t\t\t\treturn this.options.zoomLevelFixed;\n\t\t\t} else {\n\t\t\t\treturn this._mainMap.getZoom();\n\t\t\t}\n \n }\n }\n\n _decideMinimized() {\n if (this._userToggledDisplay) {\n return this._minimized;\n }\n\n if (this.options.autoToggleDisplay) {\n if (this._mainMap.getBounds().contains(this._miniMap.getBounds())) {\n return true;\n }\n return false;\n }\n\n return this._minimized;\n }\n}\n\nL.Map.mergeOptions({\n miniMapControl: false\n});\n\nL.Map.addInitHook(function() {\n if (this.options.miniMapControl) {\n this.miniMapControl = (new L.Control.MiniMap()).addTo(this);\n }\n});\n\nL.control.minimap = function(options) {\n return new L.Control.MiniMap(options);\n};\n\n","import { classMixin, mergeData } from \"../core/Util\";\nimport Events from \"../core/Events\";\nimport Ease from \"../animation/Ease\";\n/*\tMapMarker\n\tCreates a marker. Takes a data object and\n\tpopulates the marker with content.\n================================================== */\n\nexport default class MapMarker {\n\t\n\t//includes: [VCO.Events],\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options) {\n\t\t\n\t\t// DOM Elements\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tcontent_container: {},\n\t\t\tcontent: {}\n\t\t};\n\t\n\t\t// Components\n\t\tthis._marker = {};\n\t\t\n\t\t// Icon\n\t\tthis._icon = {};\n\t\tthis._custom_icon = false;\n\t\tthis._custom_icon_url = \"\";\n\t\tthis._custom_image_icon = false;\n\t\t\n\t\t// Marker Number\n\t\tthis.marker_number = 0;\n\t\t\n\t\t// Media Icon\n\t\tthis.media_icon_class = \"\";\n\t\t\n\t\t// Timer\n\t\tthis.timer = {};\n\t\n\t\t// Data\n\t\tthis.data = {};\n\t\n\t\t// Options\n\t\tthis.options = {\n\t\t\t// animation\n\t\t\tduration: \t\t\t1000,\n\t\t\tease: \t\t\t\tEase.easeInSpline,\n\t\t\twidth: \t\t\t\t600,\n\t\t\theight: \t\t\t600,\n\t\t\tmap_popup: \t\t\tfalse\n\t\t};\n\t\t\n\t\t\n\t\t// Animation Object\n\t\tthis.animator = null;\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\t\t\n\t\tthis._initLayout();\n\t\t\n\t}\n\t\n\t/*\tPublic\n\t================================================== */\n\tshow() {\n\t}\n\t\n\thide() {\n\t}\n\t\n\taddTo(m) {\n\t\tthis._addTo(m);\n\t}\n\t\n\tremoveFrom(m) {\n\t\tthis._removeFrom(m)\n\t}\n\t\n\tupdateDisplay(w, h, a) {\n\t\tthis._updateDisplay(w, h, a);\n\t}\n\t\n\tcreateMarker(d, o) {\n\t\tthis._createMarker(d, o);\n\t}\n\t\n\tcreatePopup(d, o) {\n\t\tthis._createPopup(d, o);\n\t}\n\t\n\tactive(a) {\n\t\tthis._active(a);\n\t}\n\t\n\tlocation() {\n\t\treturn this._location();\n\t}\n\t\n\t/*\tMarker Specific\n\t\tSpecific to Map API\n\t================================================== */\n\t\t_createMarker(d, o) {\n\t\t}\n\t\t\n\t\t_addTo(m) {\n\t\t}\n\t\t\n\t\t_removeFrom(m) {\n\t\t}\n\t\t\n\t\t_createPopup(d, o) {\n\t\t}\n\t\t\n\t\t_active(a) {\n\t\t}\n\t\t\n\t\t_location() {\n\t\t\treturn {lat:0, lng:0}\n\t\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\t_onMarkerClick(e) {\n\t\tthis.fire(\"markerclick\", {marker_number: this.marker_number});\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\t\tthis._createMarker(this.data, this.options);\n\t}\n\t\n\t// Update Display\n\t_updateDisplay(width, height, animate) {\n\t}\n\t\n}\n\nclassMixin(MapMarker, Events)\nexport { MapMarker }\n","import MapMarker from \"../MapMarker\";\n\n/*\tMapMarker.Leaflet\n\tProduces a marker for Leaflet Maps\n================================================== */\n\n\nexport default class LeafletMapMarker extends MapMarker {\n\n /*\tCreate Marker\n ================================================== */\n _createMarker(d, o) {\n\n var icon = {}; //new L.Icon.Default();\n\n if (d.location && typeof(d.location.lat) == 'number' && typeof(d.location.lon) == 'number') {\n this.data.real_marker = true;\n var use_custom_marker = o.use_custom_markers || d.location.use_custom_marker;\n if (use_custom_marker && d.location.icon) {\n this._custom_icon = {\n url: d.location.icon,\n size: d.location.iconSize || [48, 48],\n anchor: this._customIconAnchor(d.location.iconSize)\n };\n this._icon = this._createIcon();\n } else if (use_custom_marker && d.location.image) {\n this._custom_image_icon = d.location.image;\n this._icon = this._createImage();\n } else {\n this._icon = this._createDefaultIcon(false);\n }\n\n this._marker = new L.marker([d.location.lat, d.location.lon], {\n title: d.text.headline,\n icon: this._icon\n });\n\n this._marker.on(\"click\", this._onMarkerClick, this);\n\n if (o.map_popup) {\n this._createPopup(d, o);\n }\n }\n }\n\n _addTo(m) {\n if (this.data.real_marker) {\n this._marker.addTo(m);\n }\n }\n\n _createPopup(d, o) {\n /*\n var html = \"\";\n html += \"<h4>\" + this.data.text.headline + \"</h4>\";\n this._marker.bindPopup(html, {closeButton:false, offset:[0, 43]});\n */\n }\n\n _active(a) {\n var self = this;\n\n if (this.data.media && this.data.media.mediatype) {\n this.media_icon_class = \"vco-mapmarker-icon vco-icon-\" + this.data.media.mediatype.type;\n } else {\n this.media_icon_class = \"vco-mapmarker-icon vco-icon-plaintext\";\n }\n if (this.data.real_marker) {\n if (a) {\n this._marker.setZIndexOffset(100);\n //this.timer = setTimeout(function() {self._openPopup();}, this.options.duration + 200);\n } else {\n clearTimeout(this.timer);\n this._marker.setZIndexOffset(0);\n }\n //this._marker.closePopup();\n if (this._custom_icon) {\n this._icon = this._createIcon();\n } else if (this._custom_image_icon) {\n this._icon = this._createImage(a);\n } else {\n this._icon = this._createDefaultIcon(a);\n }\n\n this._setIcon();\n }\n }\n\n _createIcon() {\n return new L.icon({ iconUrl: this._custom_icon.url, iconSize: this._custom_icon.size, iconAnchor: this._custom_icon.anchor });\n }\n\n _createImage(active) { // TODO: calculate shadow dimensions\n var className = active ? \"vco-mapmarker-image-icon-active\" : \"vco-mapmarker-image-icon\";\n return new L.icon({ iconUrl: url, iconSize: [48], iconAnchor: [24, 48], shadowSize: [68, 95], shadowAnchor: [22, 94], className: className });\n }\n\n _createDefaultIcon(active) {\n var className = active ? \"vco-mapmarker-active\" : \"vco-mapmarker\";\n return L.divIcon({ className: className + \" \" + this.media_icon_class, iconAnchor: [10, 10] });\n }\n\n _customIconAnchor(size) {\n if (size) {\n return [size[0] * 0.5, size[1]];\n } else {\n return [24, 48];\n }\n }\n\n _openPopup() {\n this._marker.openPopup();\n }\n\n _setIcon() {\n this._marker.setIcon(this._icon);\n }\n\n _location() {\n if (this.data.real_marker) {\n return this._marker.getLatLng();\n } else {\n return {};\n }\n }\n\n}\n","/*\tTyleLayer.Stamen\r\n\tMakes Stamen Map tiles available\r\n\thttp://maps.stamen.com/\r\n Stamen tiles will no longer be free (2023)\r\n see http://maps.stamen.com/stadia-partnership/\r\n================================================== */\r\nimport { mergeData } from \"../../core/Util\"\r\n\r\n\r\n/*\ttile.stamen.js v1.2.3\r\n================================================== */\r\nfunction MAKE_PROVIDER(layer, type, minZoom, maxZoom) {\r\n layer = layer.replace('-','_') // stadia has a different pattern than stamen\r\n return {\r\n \"url\": [\"https://tiles.stadiamaps.com/tiles/\", layer, \"/{Z}/{X}/{Y}.\", type].join(\"\"),\r\n \"type\": type,\r\n \"subdomains\": '',\r\n \"minZoom\": minZoom,\r\n \"maxZoom\": maxZoom,\r\n \"attribution\": [\r\n \"<a href='http://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a> | \",\r\n 'Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, served by ',\r\n '<a href=\"https://stadiamaps.com/\">Stadia</a> ',\r\n 'under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. ',\r\n 'Data by <a href=\"http://openstreetmap.org\">OpenStreetMap</a>, ',\r\n 'under <a href=\"http://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>.'\r\n ].join(\"\")\r\n };\r\n}\r\n\r\nlet PROVIDERS = {\r\n \"toner\": MAKE_PROVIDER(\"stamen_toner\", \"png\", 0, 20),\r\n \"terrain\": MAKE_PROVIDER(\"stamen_terrain\", \"jpg\", 4, 18),\r\n \"watercolor\": MAKE_PROVIDER(\"stamen_watercolor\", \"jpg\", 0, 16),\r\n \"ch_watercolor\": {\r\n \"url\": \"https://watercolormaps.collection.cooperhewitt.org/tile/watercolor//{z}/{x}/{y}.png\",\r\n \"type\": 'png',\r\n \"subdomains\": '',\r\n \"minZoom\": 0,\r\n \"maxZoom\": 16,\r\n \"attribution\": [\r\n \"<a href='http://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a> | \",\r\n 'Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, served by ',\r\n '<a href=\"https://watercolormaps.collection.cooperhewitt.org/\">Cooper Hewitt, Smithsonian Design Museum</a> ',\r\n 'under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. ',\r\n 'Data by <a href=\"http://openstreetmap.org\">OpenStreetMap</a>, ',\r\n 'under <a href=\"http://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>.'\r\n ].join(\"\")\r\n }\r\n};\r\n\r\n\t// set up toner and terrain flavors\r\n setupFlavors(\"toner\", [\"hybrid\", \"labels\", \"lines\", \"background\", \"lite\"]);\r\n\t// toner 2010\r\n setupFlavors(\"toner\", [\"2010\"]);\r\n\t// toner 2011 flavors\r\n setupFlavors(\"toner\", [\"2011\", \"2011-lines\", \"2011-labels\", \"2011-lite\"]);\r\n\tsetupFlavors(\"terrain\", [\"background\"]);\r\n setupFlavors(\"terrain\", [\"labels\", \"lines\"], \"png\");\r\n\r\n\r\n\t/*\tExport stamen.tile to the provided namespace.\r\n\t================================================== */\r\n\t//exports.stamen = exports.stamen || {};\r\n\t//exports.stamen.tile = exports.stamen.tile || {};\r\n\t//exports.stamen.tile.providers = PROVIDERS;\r\n\t//exports.stamen.tile.getProvider = getProvider;\r\n\r\n\r\n/*\tA shortcut for specifying \"flavors\" of a style, which are assumed to have the\r\n same type and zoom range.\r\n================================================== */\r\nfunction setupFlavors(base, flavors, type) {\r\n var provider = getProvider(base);\r\n for (var i = 0; i < flavors.length; i++) {\r\n var flavor = [base, flavors[i]].join(\"-\");\r\n PROVIDERS[flavor] = MAKE_PROVIDER(`stamen_${flavor}`, type || provider.type, provider.minZoom, provider.maxZoom);\r\n }\r\n}\r\n\r\n/*\tGet the named provider, or throw an exception\r\n if it doesn't exist.\r\n================================================== */\r\nfunction getProvider(name) {\r\n\r\n if (name == \"trees-cabs-crime\") {\r\n console.log(\"trees-cabs-crime is not available. Using toner instead\")\r\n name = 'toner'\r\n }\r\n\r\n if (name in PROVIDERS) {\r\n return PROVIDERS[name];\r\n } else {\r\n throw 'No such provider (' + name + ')';\r\n }\r\n}\r\n\r\n\r\n\r\nexport default class StamenTileLayer extends L.TileLayer {\r\n\r\n constructor(name, options) {\r\n super(name, options);\r\n var provider = getProvider(name),\r\n url = provider.url.replace(/({[A-Z]})/g, function(s) {\r\n return s.toLowerCase();\r\n }),\r\n _options = {\r\n minZoom: \t\tprovider.minZoom,\r\n maxZoom: \t\tprovider.maxZoom,\r\n subdomains: \tprovider.subdomains,\r\n scheme: \t\t\"xyz\",\r\n attribution: \tprovider.attribution\r\n };\r\n\r\n if (options) {\r\n mergeData(_options, options);\r\n }\r\n\r\n L.TileLayer.prototype.initialize.call(this, url, _options);\r\n }\r\n}\r\n","import { classMixin } from \"../../core/Util\";\nimport Map from \"../Map\";\nimport Events from \"../../core/Events\";\nimport ZoomifyTileLayer from \"./extensions/Leaflet.TileLayer.Zoomify\";\nimport MiniMapControl from \"./extensions/Leaflet.MiniMap.js\";\nimport LeafletMapMarker from \"./MapMarker.Leaflet\";\nimport StamenTileLayer from \"../tile/TileLayer.Stamen\";\nimport { Browser } from \"../../core/Browser\";\n\n/*\tMap.Leaflet\n\tCreates a Map using Leaflet\n================================================== */\n\n//export default class Leaflet {\n//Map.Leaflet = Map.extend({\nexport default class Leaflet extends Map {\n\n\t//includes: [Events],\n\n\t/*\tCreate the Map\n\t================================================== */\n\t_createMap() {\n\n\n\t\tthis._map = new L.map(this._el.map, {scrollWheelZoom:true, zoomControl:!this.options.map_mini});\n\t\tthis._map.on(\"load\", this._onMapLoaded, this);\n\n\n\t\tthis._map.on(\"moveend\", this._onMapMoveEnd, this);\n\t\tthis._map.attributionControl.setPrefix(\"<a href='http://storymap.knightlab.com/' target='_blank' class='vco-knightlab-brand'><span>&#x25a0;</span> StoryMapJS</a>\");\n\n\t\t// Create Tile Layer\n\t\tthis._tile_layer = this._createTileLayer(this.options.map_type);\n\t\tthis._tile_layer.on(\"load\", this._onTilesLoaded, this);\n\n\t\t// Add Tile Layer\n\t\tthis._map.addLayer(this._tile_layer);\n\n\t\t// Add Zoomify Image Layer\n\t\tif (this._image_layer) {\n\t\t\tthis._map.addLayer(this._image_layer);\n\t\t}\n\t\t// Create Overall Connection Line\n\t\tthis._line = this._createLine(this._line);\n\t\tthis._line.setStyle({color:this.options.line_color_inactive});\n\t\tthis._addLineToMap(this._line);\n\n\t\t// Create Active Line\n\t\tthis._line_active = this._createLine(this._line_active);\n\t\tthis._line_active.setStyle({opacity:1});\n\t\tthis._addLineToMap(this._line_active);\n\n\t\tif (this.options.map_as_image) {\n\t\t\tthis._line_active.setStyle({opacity:0});\n\t\t\tthis._line.setStyle({opacity:0});\n\t\t}\n\n\n\n\t}\n\n\t/*\tCreate Mini Map\n\t================================================== */\n\t_createMiniMap() {\n\t\tif (this.options.map_as_image) {\n\t\t\tthis.zoom_min_max.min = 0;\n\t\t}\n\n\t\tif (!this.bounds_array) {\n\t\t\tthis.bounds_array = this._getAllMarkersBounds(this._markers);\n\t\t}\n\n\t\tthis._tile_layer_mini = this._createTileLayer(this.options.map_type);\n\t\tthis._mini_map = new MiniMapControl(this._tile_layer_mini, {\n\t\t\twidth: \t\t\t\t150,\n\t\t\theight: \t\t\t100,\n\t\t\tposition: \t\t\t\"topleft\",\n\t\t\tbounds_array: \t\tthis.bounds_array,\n\t\t\tzoomLevelFixed: \tthis.zoom_min_max.min,\n\t\t\tzoomAnimation: \t\ttrue,\n\t\t\taimingRectOptions: \t{\n\t\t\t\tfillColor: \t\t\"#FFFFFF\",\n\t\t\t\tcolor: \t\t\t\"#FFFFFF\",\n\t\t\t\topacity: \t\t0.4,\n\t\t\t\tweight: \t\t1,\n\t\t\t\tstroke: \t\ttrue\n\t\t\t}\n\t\t}).addTo(this._map);\n\n\t\tthis._mini_map.getContainer().style.backgroundColor = this.options.map_background_color;\n\n\t}\n\n\t/*\tCreate Background Map\n\t================================================== */\n\t_createBackgroundMap(tiles) {\n\n\t\t// TODO Check width and height\n\t\tif (!this._image_layer) {\n\t\t\t// Make Image Layer a Group\n\t\t\tthis._image_layer = new L.layerGroup();\n\t\t\t// Add Layer Group to Map\n\t\t\tthis._map.addLayer(this._image_layer);\n\n\t\t} else {\n\t\t\tthis._image_layer.clearLayers();\n\t\t}\n\n\t\tif (tiles) {\n\t\t\t// Create Image Overlay for each tile in the group\n\t\t\tfor (let x in tiles) {\n\t\t\t\tvar target_tile = tiles[x],\n\t\t\t\t\timage = {},\n\t\t\t\t\ttile = {\n\t\t\t\t\t\tx: \t\t\t0,\n\t\t\t\t\t\ty: \t\t\t0,\n\t\t\t\t\t\turl: \t\ttarget_tile.src,\n\t\t\t\t\t\theight: \tparseInt(target_tile.style.height.split(\"px\")[0]),\n\t\t\t\t\t\twidth: \t\tparseInt(target_tile.style.width.split(\"px\")[0]),\n\t\t\t\t\t\tpos: {\n\t\t\t\t\t\t\tstart: \t0,\n\t\t\t\t\t\t\tend: \t0\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\tif (target_tile.style.left || target_tile.style.top) {\n\t\t\t\t\tif (target_tile.style.left) {\n\t\t\t\t\t\ttile.x = parseInt(target_tile.style.left.split(\"px\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\tif (target_tile.style.top) {\n\t\t\t\t\t\ttile.y = parseInt(target_tile.style.top.split(\"px\")[0]);\n\t\t\t\t\t}\n\t\t\t\t} else if (target_tile.style[\"-webkit-transform\"] || target_tile.style[\"transform\"] || target_tile.style[\"-ms-transform\"]) {\n\t\t\t\t\tvar t_array;\n\n\t\t\t\t\tif (target_tile.style[\"-webkit-transform\"]) {\n\t\t\t\t\t\tt_array = target_tile.style[\"-webkit-transform\"].split(\"3d(\")[1].split(\", 0)\")[0].split(\", \");\n\t\t\t\t\t} else if (target_tile.style[\"transform\"]) {\n\t\t\t\t\t\tt_array = target_tile.style[\"transform\"].split(\"3d(\")[1].split(\", 0)\")[0].split(\", \");\n\t\t\t\t\t} else if (target_tile.style[\"-ms-transform\"]) {\n\t\t\t\t\t\tt_array = target_tile.style[\"-ms-transform\"].split(\"3d(\")[1].split(\", 0)\")[0].split(\", \");\n\t\t\t\t\t}\n\n\t\t\t\t\ttile.x = parseInt(t_array[0].split(\"px\")[0]);\n\t\t\t\t\ttile.y = parseInt(t_array[1].split(\"px\")[0]);\n\t\t\t\t}\n\n\n\t\t\t\t// If using toner, switch to toner lines\n\t\t\t\tif (tile.url.match(\"toner\")) {\n\t\t\t\t\t//tile.url = tile.url.replace(\"/toner-lite/\",\"/toner-lines/\");\n\t\t\t\t\ttile.url = tile.url.replace(\"/toner-hybrid/\",\"/toner-lines/\");\n\t\t\t\t\ttile.url = tile.url.replace(\"/toner/\",\"/toner-background/\");\n\t\t\t\t}\n\n\t\t\t\ttile.pos.start \t= this._map.containerPointToLatLng([tile.x, tile.y]);\n\t\t\t\ttile.pos.end \t= this._map.containerPointToLatLng([tile.x + tile.width, tile.y + tile.height]);\n\n\t\t\t\timage = new L.imageOverlay(tile.url, [tile.pos.start, tile.pos.end]);\n\t\t\t\tthis._image_layer.addLayer(image);\n\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/*\tCreate Tile Layer\n\t================================================== */\n\t_createTileLayer(map_type, options) {\n\t\tvar _tilelayer = null,\n\t\t\toptions = { r: '' },\n\t\t\t_attribution_knightlab = \"<a href='http://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a> | \"\n\t\tlet _attribution_cooperhewitt = 'Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, served by ' +\n\t\t\t\t\t\t\t\t\t\t'<a href=\"https://watercolormaps.collection.cooperhewitt.org/\">Cooper Hewitt, Smithsonian Design Museum</a> '+\n\t\t\t\t\t\t\t\t\t\t'under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. ' +\n\t\t\t\t\t\t\t\t\t\t'Data by <a href=\"http://openstreetmap.org\">OpenStreetMap</a>, ' +\n\t\t\t\t\t\t\t\t\t\t'under <a href=\"http://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>.'\n\n\t\tif (!map_type) {\n\t\t\tmap_type = 'osm:standard'; // temporary stopgap for maps with undefined basemap\n\t\t}\n\n\t\tif (map_type == 'stamen:trees-cabs-crime') {\n\t\t\tconsole.log(\"stamen:trees-cabs-crime layer no longer available. Using OSM instead\")\n\t\t\tmap_type = 'osm'\n\t\t}\n\n\t\tif (Browser.retina) {\n\t\t\toptions.r = '@2x'\n\t\t}\n\n\t\tlet _map_type_arr = map_type.split(':')\n\n\t\t// Set Tiles\n\t\tswitch (_map_type_arr[0]) { // this section is a little duplicative of similar case in EditorMap.js but not sure how to share.\n\t\t\tcase 'mapbox':\n\t\t\t\tvar mapbox_url;\n\t\t\t\toptions.attribution = _attribution_knightlab + \"<div class='mapbox-maplogo'></div><a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox © OpenStreetMap</a>\";\n\t\t\t\tif (_map_type_arr.length > 2) {\n\t\t\t\t\t// new form mapbox URL:\n\t\t\t\t\t// mapbox://styles/nuknightlab/cjl6w8oio0agu2sltd04tp1kx\n\t\t\t\t\tvar this_mapbox_map = _map_type_arr[2].substr('//styles/'.length);\n\t\t\t\t\tmapbox_url = \"https://api.mapbox.com/styles/v1/\" + this_mapbox_map + \"/tiles/256/{z}/{x}/{y}@2x?access_token=\" + this.options.map_access_token;\n\t\t\t\t} else {\n\t\t\t\t\t// legacy configuration\n\t\t\t\t\t// nuknightlab.cjl6w8oio0agu2sltd04tp1kx\n\t\t\t\t\tvar mapbox_name = _map_type_arr[1];\n\t\t\t\t\tmapbox_url = \"https://api.tiles.mapbox.com/v4/\" + mapbox_name + \"/{z}/{x}/{y}.png?access_token=\" + this.options.map_access_token;\n\t\t\t\t}\n\t\t\t\t_tilelayer = new L.TileLayer(mapbox_url, options);\n\t\t\t\tbreak;\n\t\t\tcase 'stadia':\n\t\t\t\tvar style_url;\n\t\t\t\tif (_map_type_arr.length > 1) {\n\t\t\t\t\tstyle_url = _map_type_arr.slice(1).join(':') // put the pieces back together\n\t\t\t\t\tif (this.options.map_access_token) {\n\t\t\t\t\t\tstyle_url = `${style_url}?api_key=${this.options.map_access_token}`\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_tilelayer = new L.TileLayer(style_url, options);\n\t\t\t\tbreak;\n\t\t\tcase 'stamen':\n\t\t\t\t_tilelayer = new StamenTileLayer(_map_type_arr[1] || 'toner-lite', options);\n\t\t\t\tthis._map.getContainer().style.backgroundColor = \"#FFFFFF\";\n\t\t\t\tbreak;\n\t\t\tcase 'zoomify':\n\t\t\t\toptions.width\t\t\t= this.options.zoomify.width;\n\t\t\t\toptions.height \t\t= this.options.zoomify.height;\n\t\t\t\toptions.tolerance \t\t= this.options.zoomify.tolerance || 0.9;\n\t\t\t\toptions.attribution \t= _attribution_knightlab + this.options.zoomify.attribution;\n\n\t\t\t\t_tilelayer = new ZoomifyTileLayer(this.options.zoomify.path, options);\n\t\t\t\t//this._image_layer = new L.imageOverlay(this.options.zoomify.path + \"TileGroup0/0-0-0.jpg\", _tilelayer.getZoomifyBounds(this._map));\n\t\t\t\tbreak;\n\t\t\tcase 'http':\n\t\t\tcase 'https':\n\t\t\t\toptions.subdomains = this.options.map_subdomains;\n\t\t\t\toptions.attribution \t= _attribution_knightlab + this.options.attribution;\n\t\t\t\t_tilelayer = new L.TileLayer(this.options.map_type, options);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ch-watercolor':\n\t\t\t\toptions.attribution = _attribution_knightlab + _attribution_cooperhewitt\n\t\t\t\toptions.type = 'jpg'\n\t\t\t\toptions.minZoom = 0\n\t\t\t\toptions.maxZoom = 16\n\t\t\t\t_tilelayer = new L.TileLayer(\"https://watercolormaps.collection.cooperhewitt.org/tile/watercolor/{z}/{x}/{y}.jpg\", options);\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'osm':\n\t\t\tdefault: // osm is the default now\n\t\t\t\toptions.subdomains = 'ab';\n\t\t\t\toptions.attribution = _attribution_knightlab + \"© <a target='_blank' href='http://www.openstreetmap.org'>OpenStreetMap</a> and contributors, under an <a target='_blank' href='http://www.openstreetmap.org/copyright'>open license</a>\";\n\t\t\t\t_tilelayer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', options);\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn _tilelayer;\n\t}\n\n\t/*\tEvents\n\t================================================== */\n\t_onMapMoveEnd(e) {\n\n\t}\n\n\t_onTilesLoaded(e) {\n\t\tthis._createBackgroundMap(e.target._tiles);\n\t\tthis._tile_layer.off(\"load\", this._onTilesLoaded, this);\n\t}\n\n\t_onMapZoomed(e) {\n\t\tthis._map.off(\"zoomend\", this._onMapZoomed, this);\n\n\t}\n\n\t_onMapZoom(e) {\n\n\t}\n\n\t/*\tMarker\n\t================================================== */\n\t_createMarker(d) {\n\t\tvar marker = new LeafletMapMarker(d, this.options);\n\t\tmarker.on('markerclick', this._onMarkerClick, this);\n\t\tthis._addMarker(marker);\n\t\tthis._markers.push(marker);\n\t\tmarker.marker_number = this._markers.length - 1;\n\t\tthis.fire(\"markerAdded\", marker);\n\n\t}\n\n\t_addMarker(marker) {\n\t\tmarker.addTo(this._map);\n\t}\n\n\t_removeMarker(marker) {\n\n\t}\n\n\t_markerOverview() {\n\t\tvar _location, _zoom;\n\t\t// Hide Active Line\n\t\tthis._line_active.setStyle({opacity:0});\n\n\t\tif (this.options.map_type == \"zoomify\" && this.options.map_as_image) {\n\n\t\t\tvar _center_zoom \t= this._tile_layer.getCenterZoom(this._map);\n\n\t\t\t_location = _center_zoom.center;\n\n\t\t\tif (this.options.map_center_offset && this.options.map_center_offset.left != 0 || this.options.map_center_offset.top != 0) {\n\t\t\t\t_center_zoom.zoom = _center_zoom.zoom - 1;\n\t\t\t\t_location = this._getMapCenterOffset(_location, _center_zoom.zoom);\n\t\t\t}\n\n\t\t\tthis._map.setView(_location, _center_zoom.zoom, {\n\t\t\t\tpan:{animate: true, duration: this.options.duration/1000, easeLinearity:.10},\n\t\t\t\tzoom:{animate: true, duration: this.options.duration/1000, easeLinearity:.10}\n\t\t\t});\n\n\n\n\t\t} else {\n\t\t\tthis.bounds_array = this._getAllMarkersBounds(this._markers);\n\n\t\t\tif (this.options.map_center_offset && this.options.map_center_offset.left != 0 || this.options.map_center_offset.top != 0) {\n\t\t\t\tvar the_bounds \t= new L.latLngBounds(this.bounds_array);\n\t\t\t\t_location \t\t= the_bounds.getCenter();\n\t\t\t\t_zoom \t\t\t= this._map.getBoundsZoom(the_bounds)\n\n\t\t\t\t_location = this._getMapCenterOffset(_location, _zoom - 1);\n\n\t\t\t\tthis._map.setView(_location, _zoom -1, {\n\t\t\t\t\tpan:{animate: true, duration: this.options.duration/1000, easeLinearity:.10},\n\t\t\t\t\tzoom:{animate: true, duration: this.options.duration/1000, easeLinearity:.10}\n\t\t\t\t});\n\n\n\t\t\t} else {\n\t\t\t\tthis._map.fitBounds(this.bounds_array, {padding:[15,15]});\n\t\t\t}\n\n\t\t}\n\n\t\tif (this._mini_map) {\n\t\t\tthis._mini_map.minimize();\n\t\t}\n\n\t}\n\n\t_getAllMarkersBounds(markers_array) {\n\t\tvar bounds_array = [];\n\t\tfor (var i = 0; i < markers_array.length; i++) {\n\t\t\tif (markers_array[i].data.real_marker) {\n\t\t\t\tbounds_array.push( [markers_array[i].data.location.lat, markers_array[i].data.location.lon]);\n\t\t\t}\n\t\t};\n\t\treturn bounds_array;\n\t}\n\n\t_calculateMarkerZooms() {\n\t\tfor (var i = 0; i < this._markers.length; i++) {\n\n\t\t\tif (this._markers[i].data.location) {\n\t\t\t\tvar marker = this._markers[i],\n\t\t\t\t\tprev_marker,\n\t\t\t\t\tnext_marker,\n\t\t\t\t\tmarker_location,\n\t\t\t\t\tprev_marker_zoom,\n\t\t\t\t\tnext_marker_zoom,\n\t\t\t\t\tcalculated_zoom;\n\n\n\t\t\t\t// MARKER LOCATION\n\t\t\t\tif (marker.data.type && marker.data.type == \"overview\") {\n\t\t\t\t\tmarker_location = this._getMapCenter(true);\n\t\t\t\t} else {\n\t\t\t\t\tmarker_location = marker.location();\n\t\t\t\t}\n\t\t\t\t// PREVIOUS MARKER ZOOM\n\t\t\t\tif (i > 0 ) {\n\t\t\t\t\tprev_marker = this._markers[i-1].location();\n\t\t\t\t} else {\n\t\t\t\t\tprev_marker = this._getMapCenter(true);\n\t\t\t\t}\n\t\t\t\tprev_marker_zoom = this._calculateZoomChange(prev_marker, marker_location);\n\n\t\t\t\t// NEXT MARKER ZOOM\n\t\t\t\tif (i < (this._markers.length - 1)) {\n\t\t\t\t\tnext_marker = this._markers[i+1].location();\n\t\t\t\t} else {\n\t\t\t\t\tnext_marker = this._getMapCenter(true);\n\t\t\t\t}\n\t\t\t\tnext_marker_zoom = this._calculateZoomChange(next_marker, marker_location);\n\n\n\t\t\t\tif (prev_marker_zoom && prev_marker_zoom < next_marker_zoom) {\n\t\t\t\t\tcalculated_zoom = prev_marker_zoom;\n\t\t\t\t} else if (next_marker_zoom){\n\t\t\t\t\tcalculated_zoom = next_marker_zoom;\n\n\t\t\t\t} else {\n\t\t\t\t\tcalculated_zoom = prev_marker_zoom;\n\t\t\t\t}\n\n\t\t\t\tif (this.options.map_center_offset && this.options.map_center_offset.left != 0 || this.options.map_center_offset.top != 0) {\n\t\t\t\t\tcalculated_zoom = calculated_zoom -1;\n\t\t\t\t}\n\n\t\t\t\tmarker.data.location.zoom = calculated_zoom;\n\t\t\t}\n\n\n\t\t};\n\n\n\t}\n\n\n\n\t/*\tLine\n\t================================================== */\n\n\t_createLine(d) {\n\t\treturn new L.Polyline([], {\n\t\t\tclickable: false,\n\t\t\tcolor: \t\tthis.options.line_color,\n\t\t\tweight: \tthis.options.line_weight,\n\t\t\topacity: \tthis.options.line_opacity,\n\t\t\tdashArray: \tthis.options.line_dash,\n\t\t\tlineJoin: \tthis.options.line_join,\n\t\t\tclassName: \t\"vco-map-line\"\n\t\t} );\n\n\t}\n\n\t_addLineToMap(line) {\n\t\tthis._map.addLayer(line);\n\t}\n\n\t_addToLine(line, d) {\n\t\tline.addLatLng({lon: d.location.lon, lat: d.location.lat});\n\t}\n\n\t_replaceLines(line, array) {\n\t\tline.setLatLngs(array);\n\t}\n\n\t/*\tMap\n\t================================================== */\n\t_panTo(loc, animate) {\n\t\tthis._map.panTo({lat:loc.lat, lon:loc.lon}, {animate: true, duration: this.options.duration/1000, easeLinearity:.10});\n\t}\n\n\t_zoomTo(z, animate) {\n\t\tthis._map.setZoom(z);\n\t}\n\n\t_viewTo(loc, opts) {\n\t\tvar _animate \t= true,\n\t\t\t_duration \t= this.options.duration/1000,\n\t\t\t_zoom \t\t= this._getMapZoom(),\n\t\t\t_location \t= {lat:loc.lat, lon:loc.lon};\n\n\t\t// Show Active Line\n\t\tif (!this.options.map_as_image) {\n\t\t\tthis._line_active.setStyle({opacity:1});\n\t\t}\n\n\t\tif (loc.zoom) {\n\t\t\t_zoom = loc.zoom;\n\t\t}\n\n\t\t// Options\n\t\tif (opts) {\n\t\t\tif (opts.duration) {\n\t\t\t\tif (opts.duration == 0) {\n\t\t\t\t\t_animate = false;\n\t\t\t\t} else {\n\t\t\t\t\t_duration = duration;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (opts.zoom && this.options.calculate_zoom) {\n\t\t\t\t_zoom = opts.zoom;\n\t\t\t}\n\t\t}\n\n\t\t// OFFSET\n\t\tif (this.options.map_center_offset) {\n\t\t\t_location = this._getMapCenterOffset(_location, _zoom);\n\t\t}\n\n\t\tthis._map.setView(\n\t\t\t_location,\n\t\t\t_zoom,\n\t\t\t{\n\t\t\t\tpan:{animate: _animate, duration: _duration, easeLinearity:.10},\n\t\t\t\tzoom:{animate: _animate, duration: _duration, easeLinearity:.10}\n\t\t\t}\n\t\t)\n\n\t\tif (this._mini_map && this.options.width > this.options.skinny_size) {\n\t\t\tif ((_zoom - 1) <= this.zoom_min_max.min ) {\n\t\t\t\tthis._mini_map.minimize();\n\t\t\t} else {\n\t\t\t\tthis._mini_map.restore();\n\t\t\t\t//this._mini_map.updateDisplay(_location, _zoom, _duration);\n\t\t\t}\n\t\t}\n\n\t}\n\n\t_getMapLocation(m) {\n\t\treturn this._map.latLngToContainerPoint(m);\n\t}\n\n\t_getMapZoom() {\n\t\treturn this._map.getZoom();\n\t}\n\n\t_getMapCenter(offset) {\n\t\tif (offset) {\n\n\t\t}\n\t\treturn this._map.getCenter();\n\t}\n\n\t_getMapCenterOffset(location, zoom) {\n\t\tvar target_point,\n\t\t\ttarget_latlng;\n\n\t\ttarget_point \t= this._map.project(location, zoom).subtract([this.options.map_center_offset.left, this.options.map_center_offset.top]);\n\t\ttarget_latlng \t= this._map.unproject(target_point, zoom);\n\n\t\treturn target_latlng;\n\n\t}\n\n\t_getBoundsZoom(origin, destination, correct_for_center) {\n\t\tvar _origin = origin,\n\t\t\t_padding = [(Math.abs(this.options.map_center_offset.left)*3),(Math.abs(this.options.map_center_offset.top)*3)];\n\n\n\t\t//_padding = [0,0];\n\t\t//_padding = [0,0];\n\t\tif (correct_for_center) {\n\t\t\tvar _lat = _origin.lat + (_origin.lat - destination.lat)/2,\n\t\t\t\t_lng = _origin.lng + (_origin.lng - destination.lng)/2;\n\t\t\t_origin = new L.LatLng(_lat, _lng);\n\t\t}\n\n\t\tvar bounds = new L.LatLngBounds([_origin, destination]);\n\t\tif (this.options.less_bounce) {\n\t\t\treturn this._map.getBoundsZoom(bounds, false, _padding);\n\t\t} else {\n\t\t\treturn this._map.getBoundsZoom(bounds, true, _padding);\n\t\t}\n\t}\n\n\t_getZoomifyZoom() {\n\n\t}\n\n\t_initialMapLocation() {\n\t\tthis._map.on(\"zoomend\", this._onMapZoomed, this);\n\t}\n\n\t/*\tDisplay\n\t================================================== */\n\t_updateMapDisplay(animate, d) {\n\t\tif (animate) {\n\t\t\tvar duration = this.options.duration,\n\t\t\t\tself = this;\n\n\t\t\tif (d) {duration = d };\n\t\t\tif (this.timer) {clearTimeout(this.timer)};\n\n\t\t\tthis.timer = setTimeout(function() {\n\t\t\t\tself._refreshMap();\n\t\t\t}, duration);\n\n\t\t} else {\n\t\t\tif (!this.timer) {\n\t\t\t\tthis._refreshMap();\n\t\t\t};\n\t\t}\n\n\t\tif (this._mini_map && this._el.container.offsetWidth < this.options.skinny_size ) {\n\t\t\tthis._mini_map.true_hide = true;\n\t\t\t//this._mini_map.minimize();\n\t\t} else if (this._mini_map) {\n\t\t\tthis._mini_map.true_hide = false;\n\t\t}\n\t}\n\n\t_refreshMap() {\n\t\tif (this._map) {\n\t\t\tif (this.timer) {\n\t\t\t\tclearTimeout(this.timer);\n\t\t\t\tthis.timer = null;\n\t\t\t};\n\n\t\t\tthis._map.invalidateSize();\n\n\t\t\t// Check to see if it's an overview\n\t\t\tif (this._markers[this.current_marker].data.type && this._markers[this.current_marker].data.type == \"overview\") {\n\t\t\t\tthis._markerOverview();\n\t\t\t} else {\n\t\t\t\tthis._viewTo(this._markers[this.current_marker].data.location, {zoom:this._getMapZoom()});\n\t\t\t}\n\t\t};\n\t}\n\n\n}\n\nclassMixin(Leaflet, Events)\n\n/*\tOverwrite and customize Leaflet functions\n================================================== */\nL.Map.include({\n\t_tryAnimatedPan: function (center, options) {\n\t\tvar offset = this._getCenterOffset(center)._floor();\n\n\t\tthis.panBy(offset, options);\n\n\t\treturn true;\n\t},\n\n\t_tryAnimatedZoom: function (center, zoom, options) {\n\t\tif (typeof this._animateZoom == \"undefined\") {\n\t\t\treturn false;\n\t\t}\n\t\tif (this._animatingZoom) { return true; }\n\n\t\toptions = options || {};\n\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\n\t\tvar scale = this.getZoomScale(zoom),\n\t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale),\n\t\t\torigin = this._getCenterLayerPoint()._add(offset);\n\n\t\tthis\n\t\t .fire('movestart')\n\t\t .fire('zoomstart');\n\n\t\tthis._animateZoom(center, zoom, origin, scale, null, true);\n\n\t\treturn true;\n\t},\n\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\n\t\tbounds = L.latLngBounds(bounds);\n\n\t\tvar zoom = this.getMinZoom() - (inside ? 1 : 0),\n\t\t minZoom = this.getMinZoom(),\n\t\t\tmaxZoom = this.getMaxZoom(),\n\t\t size = this.getSize(),\n\n\t\t nw = bounds.getNorthWest(),\n\t\t se = bounds.getSouthEast(),\n\n\t\t zoomNotFound = true,\n\t\t boundsSize,\n\t\t\tzoom_array = [],\n\t\t\tbest_zoom = {x:0,y:0},\n\t\t\tsmallest_zoom = {},\n\t\t\tfinal_zoom = 0;\n\n\t\tpadding = L.point(padding || [0, 0]);\n\t\tsize = this.getSize();\n\n\n\t\t// Calculate Zoom Level Differences\n\t\tfor (var i = 0; i < maxZoom; i++) {\n\t\t\tzoom++;\n\t\t\tboundsSize = this.project(se, zoom).subtract(this.project(nw, zoom)).add(padding);\n\t\t\tzoom_array.push({\n\t\t\t\tx:Math.abs(size.x - boundsSize.x),\n\t\t\t\ty:Math.abs(size.y - boundsSize.y)\n\t\t\t})\n\t\t}\n\n\t\t// Determine closest match\n\t\tsmallest_zoom = zoom_array[0];\n\t\tfor (var j = 0; j < zoom_array.length; j++) {\n\t\t\tif (zoom_array[j].y <= smallest_zoom.y) {\n\t\t\t\tsmallest_zoom.y = zoom_array[j].y;\n\t\t\t\tbest_zoom.y = j;\n\t\t\t}\n\t\t\tif (zoom_array[j].x <= smallest_zoom.x) {\n\t\t\t\tsmallest_zoom.x = zoom_array[j].x;\n\t\t\t\tbest_zoom.x = j;\n\t\t\t}\n\n\t\t}\n\t\tfinal_zoom = Math.round((best_zoom.y + best_zoom.x) / 2)\n\t\treturn final_zoom;\n\n\t}\n\n});\n\nL.TileLayer.include({\n\tgetTiles: function() {\n\t\treturn this._tiles;\n\t}\n});\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Events from \"../core/Events\"\n\n/*\tDraggable\n\tDraggable allows you to add dragging capabilities to any element. Supports mobile devices too.\n\tTODO Enable constraints\n================================================== */\n\nexport class Draggable {\n\t\n\t//includes: VCO.Events,\n\t\n\t//_el: {},\n\t\n\t//mousedrag: {\n //\t\tdown:\t\t\"mousedown\",\n //\t\tup:\t\t\t\"mouseup\",\n //\t\tleave:\t\t\"mouseleave\",\n //\t\tmove:\t\t\"mousemove\"\n\t//},\n\t\n\t//touchdrag: {\n //\t\tdown:\t\t\"touchstart\",\n //\t\tup:\t\t\t\"touchend\",\n //\t\tleave:\t\t\"mouseleave\",\n\t//\tmove:\t\t\"touchmove\"\n\t//},\n\n\tconstructor(drag_elem, options, move_elem) {\n\t\t\n\t\t// DOM ELements \n\t\tthis._el = {\n\t\t\tdrag: drag_elem,\n\t\t\tmove: drag_elem\n\t\t};\n\t\t\n\t\tif (move_elem) {\n\t\t\tthis._el.move = move_elem;\n\t\t}\n\t\t\n\t\t\n\t\t//Options\n\t\tthis.options = {\n\t\t\tenable:\t{\n\t\t\t\tx: true,\n\t\t\t\ty: true\n\t\t\t},\n\t\t\tconstraint: {\n\t\t\t\ttop: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\tright: false\n\t\t\t},\n\t\t\tmomentum_multiplier: \t2000,\n\t\t\tduration: \t\t\t\t1000,\n\t\t\tease: \t\t\t\t\tVCO.Ease.easeInOutQuint\n\t\t};\n\t\t\n\t\t\n\t\t// Animation Object\n\t\tthis.animator = null;\n\t\t\n\t\t// Drag Event Type\n\t\tthis.dragevent = this.mousedrag;\n\t\t\n\t\tif (VCO.Browser.touch) {\n\t\t\tthis.dragevent = this.touchdrag;\n\t\t}\n\t\t\n\t\t// Draggable Data\n\t\tthis.data = {\n\t\t\tsliding:\t\tfalse,\n\t\t\tdirection: \t\t\"none\",\n\t\t\tpagex: {\n\t\t\t\tstart:\t\t0,\n\t\t\t\tend:\t\t0\n\t\t\t},\n\t\t\tpagey: {\n\t\t\t\tstart:\t\t0,\n\t\t\t\tend:\t\t0\n\t\t\t},\n\t\t\tpos: {\n\t\t\t\tstart: {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty:0\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty:0\n\t\t\t\t}\n\t\t\t},\n\t\t\tnew_pos: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\tnew_pos_parent: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\ttime: {\n\t\t\t\tstart:\t\t0,\n\t\t\t\tend:\t\t0\n\t\t\t},\n\t\t\ttouch:\t\t\tfalse\n\t\t};\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\t\n\t\t\n\t}\n\t\n\tenable(e) {\n\t\t// Temporarily disableing this until I have time to fix some issues.\n\t\t//VCO.DomEvent.addListener(this._el.drag, this.dragevent.down, this._onDragStart, this);\n\t\t//VCO.DomEvent.addListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);\n\t\t\n\t\tthis.data.pos.start = 0; //VCO.Dom.getPosition(this._el.move);\n\t\tthis._el.move.style.left = this.data.pos.start.x + \"px\";\n\t\tthis._el.move.style.top = this.data.pos.start.y + \"px\";\n\t\tthis._el.move.style.position = \"absolute\";\n\t\t//this._el.move.style.zIndex = \"11\";\n\t\t//this._el.move.style.cursor = \"move\";\n\t}\n\t\n\tdisable() {\n\t\tVCO.DomEvent.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this);\n\t\tVCO.DomEvent.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);\n\t}\n\t\n\tstopMomentum() {\n\t\tif (this.animator) {\n\t\t\tthis.animator.stop();\n\t\t}\n\n\t}\n\t\n\tupdateConstraint(c) {\n\t\tthis.options.constraint = c;\n\t\t\n\t\t// Temporary until issues are fixed\n\t\t\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_onDragStart(e) {\n\t\tif (VCO.Browser.touch) {\n\t\t\tif (e.originalEvent) {\n\t\t\t\tthis.data.pagex.start = e.originalEvent.touches[0].screenX;\n\t\t\t\tthis.data.pagey.start = e.originalEvent.touches[0].screenY;\n\t\t\t} else {\n\t\t\t\tthis.data.pagex.start = e.targetTouches[0].screenX;\n\t\t\t\tthis.data.pagey.start = e.targetTouches[0].screenY;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.data.pagex.start = e.pageX;\n\t\t\tthis.data.pagey.start = e.pageY;\n\t\t}\n\t\t\n\t\t// Center element to finger or mouse\n\t\tif (this.options.enable.x) {\n\t\t\tthis._el.move.style.left = this.data.pagex.start - (this._el.move.offsetWidth / 2) + \"px\";\n\t\t}\n\t\t\n\t\tif (this.options.enable.y) {\n\t\t\tthis._el.move.style.top = this.data.pagey.start - (this._el.move.offsetHeight / 2) + \"px\";\n\t\t}\n\t\t\n\t\tthis.data.pos.start = VCO.Dom.getPosition(this._el.drag);\n\t\tthis.data.time.start = new Date().getTime();\n\t\t\n\t\tthis.fire(\"dragstart\", this.data);\n\t\tVCO.DomEvent.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this);\n\t\tVCO.DomEvent.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);\n\t}\n\t\n\t_onDragEnd(e) {\n\t\tthis.data.sliding = false;\n\t\tVCO.DomEvent.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this);\n\t\tVCO.DomEvent.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);\n\t\tthis.fire(\"dragend\", this.data);\n\t\t\n\t\t// momentum\n\t\tthis._momentum();\n\t}\n\t\n\t_onDragMove(e) {\n\t\te.preventDefault();\n\t\tthis.data.sliding = true;\n\t\t\n\t\tif (VCO.Browser.touch) {\n\t\t\tif (e.originalEvent) {\n\t\t\t\tthis.data.pagex.end = e.originalEvent.touches[0].screenX;\n\t\t\t\tthis.data.pagey.end = e.originalEvent.touches[0].screenY;\n\t\t\t} else {\n\t\t\t\tthis.data.pagex.end = e.targetTouches[0].screenX;\n\t\t\t\tthis.data.pagey.end = e.targetTouches[0].screenY;\n\t\t\t}\n\n\t\t} else {\n\t\t\tthis.data.pagex.end = e.pageX;\n\t\t\tthis.data.pagey.end = e.pageY;\n\t\t}\n\t\t\n\t\tthis.data.pos.end = VCO.Dom.getPosition(this._el.drag);\n\t\tthis.data.new_pos.x = -(this.data.pagex.start - this.data.pagex.end - this.data.pos.start.x)//-(this.data.pagex.start - this.data.pagex.end - this.data.pos.end.x);\n\t\tthis.data.new_pos.y = -(this.data.pagey.start - this.data.pagey.end - this.data.pos.start.y );\n\t\t\n\t\tif (this.options.enable.x) {\n\t\t\tthis._el.move.style.left = this.data.new_pos.x + \"px\";\n\t\t}\n\t\t\n\t\tif (this.options.enable.y) {\n\t\t\tthis._el.move.style.top = this.data.new_pos.y + \"px\";\n\t\t}\n\t\t\n\t\tthis.fire(\"dragmove\", this.data);\n\t}\n\t\n\t_momentum() {\n\t\tvar pos_adjust = {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0,\n\t\t\t\ttime: 0\n\t\t\t},\n\t\t\tpos_change = {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0,\n\t\t\t\ttime: 0\n\t\t\t},\n\t\t\tswipe = false,\n\t\t\tswipe_direction = \"\";\n\t\t\n\t\t\n\t\tif (VCO.Browser.touch) {\n\t\t\t//this.options.momentum_multiplier = this.options.momentum_multiplier * 2;\n\t\t}\n\t\t\n\t\tpos_adjust.time = (new Date().getTime() - this.data.time.start) * 10;\n\t\tpos_change.time = (new Date().getTime() - this.data.time.start) * 10;\n\t\t\n\t\tpos_change.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start));\n\t\tpos_change.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start));\n\t\t\n\t\tpos_adjust.x = Math.round(pos_change.x / pos_change.time);\n\t\tpos_adjust.y = Math.round(pos_change.y / pos_change.time);\n\t\t\n\t\tthis.data.new_pos.x = Math.min(this.data.pos.end.x + pos_adjust.x);\n\t\tthis.data.new_pos.y = Math.min(this.data.pos.end.y + pos_adjust.y);\n\n\t\t\n\t\tif (!this.options.enable.x) {\n\t\t\tthis.data.new_pos.x = this.data.pos.start.x;\n\t\t} else if (this.data.new_pos.x < 0) {\n\t\t\tthis.data.new_pos.x = 0;\n\t\t}\n\t\t\n\t\tif (!this.options.enable.y) {\n\t\t\tthis.data.new_pos.y = this.data.pos.start.y;\n\t\t} else if (this.data.new_pos.y < 0) {\n\t\t\tthis.data.new_pos.y = 0;\n\t\t}\n\t\t\n\t\t// Detect Swipe\n\t\tif (pos_change.time < 3000) {\n\t\t\tswipe = true;\n\t\t}\n\t\t\n\t\t// Detect Direction\n\t\tif (Math.abs(pos_change.x) > 10000) {\n\t\t\tthis.data.direction = \"left\";\n\t\t\tif (pos_change.x > 0) {\n\t\t\t\tthis.data.direction = \"right\";\n\t\t\t}\n\t\t}\n\t\t// Detect Swipe\n\t\tif (Math.abs(pos_change.y) > 10000) {\n\t\t\tthis.data.direction = \"up\";\n\t\t\tif (pos_change.y > 0) {\n\t\t\t\tthis.data.direction = \"down\";\n\t\t\t}\n\t\t}\n\t\tthis._animateMomentum();\n\t\tif (swipe) {\n\t\t\tthis.fire(\"swipe_\" + this.data.direction, this.data);\n\t\t}\n\t\t\n\t}\n\t\n\t_animateMomentum() {\n\t\tvar pos = {\n\t\t\t\tx: this.data.new_pos.x,\n\t\t\t\ty: this.data.new_pos.y\n\t\t\t},\n\t\t\tanimate = {\n\t\t\t\tduration: \tthis.options.duration,\n\t\t\t\teasing: \tVCO.Ease.easeOutStrong\n\t\t\t};\n\t\t\n\t\tif (this.options.enable.y) {\n\t\t\tif (this.options.constraint.top || this.options.constraint.bottom) {\n\t\t\t\tif (pos.y > this.options.constraint.bottom) {\n\t\t\t\t\tpos.y = this.options.constraint.bottom;\n\t\t\t\t} else if (pos.y < this.options.constraint.top) {\n\t\t\t\t\tpos.y = this.options.constraint.top;\n\t\t\t\t}\n\t\t\t}\n\t\t\tanimate.top = Math.floor(pos.y) + \"px\";\n\t\t}\n\t\t\n\t\tif (this.options.enable.x) {\n\t\t\tif (this.options.constraint.left || this.options.constraint.right) {\n\t\t\t\tif (pos.x > this.options.constraint.left) {\n\t\t\t\t\tpos.x = this.options.constraint.left;\n\t\t\t\t} else if (pos.x < this.options.constraint.right) {\n\t\t\t\t\tpos.x = this.options.constraint.right;\n\t\t\t\t}\n\t\t\t}\n\t\t\tanimate.left = Math.floor(pos.x) + \"px\";\n\t\t}\n\t\t\n\t\tthis.animator = VCO.Animate(this._el.move, animate);\n\t\t\n\t\tthis.fire(\"momentum\", this.data);\n\t}\n}\n\nclassMixin(Events)\n","import { Draggable } from \"../ui/Draggable\";\nimport { Browser } from \"../core/Browser\";\nimport { stamp } from \"../core/Util\";\n\n/*\tDomEvent\n\tInspired by Leaflet \n\tDomEvent contains functions for working with DOM events.\n================================================== */\n// TODO stamp\n\nvar DomEvent = {\n\t/* inpired by John Resig, Dean Edwards and YUI addEvent implementations */\n\taddListener: function (/*HTMLElement*/ obj, /*String*/ type, /*Function*/ fn, /*Object*/ context) {\n\t\tvar id = stamp(fn),\n\t\t\tkey = '_vco_' + type + id;\n\n\t\tif (obj[key]) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar handler = function (e) {\n\t\t\treturn fn.call(context || obj, e || DomEvent._getEvent());\n\t\t};\n\n\t\tif (Browser.touch && (type === 'dblclick') && this.addDoubleTapListener) {\n\t\t\tthis.addDoubleTapListener(obj, handler, id);\n\t\t} else if ('addEventListener' in obj) {\n\t\t\tif (type === 'mousewheel') {\n\t\t\t\tobj.addEventListener('DOMMouseScroll', handler, false);\n\t\t\t\tobj.addEventListener(type, handler, false);\n\t\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\n\t\t\t\tvar originalHandler = handler,\n\t\t\t\t\tnewType = (type === 'mouseenter' ? 'mouseover' : 'mouseout');\n\t\t\t\thandler = function (e) {\n\t\t\t\t\tif (!DomEvent._checkMouse(obj, e)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\treturn originalHandler(e);\n\t\t\t\t};\n\t\t\t\tobj.addEventListener(newType, handler, false);\n\t\t\t} else {\n\t\t\t\tobj.addEventListener(type, handler, false);\n\t\t\t}\n\t\t} else if ('attachEvent' in obj) {\n\t\t\tobj.attachEvent(\"on\" + type, handler);\n\t\t}\n\n\t\tobj[key] = handler;\n\t},\n\n\tremoveListener: function (/*HTMLElement*/ obj, /*String*/ type, /*Function*/ fn) {\n\t\tvar id = stamp(fn),\n\t\t\tkey = '_vco_' + type + id,\n\t\t\thandler = obj[key];\n\n\t\tif (!handler) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Browser.touch && (type === 'dblclick') && this.removeDoubleTapListener) {\n\t\t\tthis.removeDoubleTapListener(obj, id);\n\t\t} else if ('removeEventListener' in obj) {\n\t\t\tif (type === 'mousewheel') {\n\t\t\t\tobj.removeEventListener('DOMMouseScroll', handler, false);\n\t\t\t\tobj.removeEventListener(type, handler, false);\n\t\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\n\t\t\t\tobj.removeEventListener((type === 'mouseenter' ? 'mouseover' : 'mouseout'), handler, false);\n\t\t\t} else {\n\t\t\t\tobj.removeEventListener(type, handler, false);\n\t\t\t}\n\t\t} else if ('detachEvent' in obj) {\n\t\t\tobj.detachEvent(\"on\" + type, handler);\n\t\t}\n\t\tobj[key] = null;\n\t},\n\n\t_checkMouse: function (el, e) {\n\t\tvar related = e.relatedTarget;\n\n\t\tif (!related) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (related && (related !== el)) {\n\t\t\t\trelated = related.parentNode;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (related !== el);\n\t},\n\n\t/*jshint noarg:false */ // evil magic for IE\n\t_getEvent: function () {\n\t\tvar e = window.event;\n\t\tif (!e) {\n\t\t\tvar caller = arguments.callee.caller;\n\t\t\twhile (caller) {\n\t\t\t\te = caller['arguments'][0];\n\t\t\t\tif (e && window.Event === e.constructor) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcaller = caller.caller;\n\t\t\t}\n\t\t}\n\t\treturn e;\n\t},\n\t/*jshint noarg:false */\n\n\tstopPropagation: function (/*Event*/ e) {\n\t\tif (e.stopPropagation) {\n\t\t\te.stopPropagation();\n\t\t} else {\n\t\t\te.cancelBubble = true;\n\t\t}\n\t},\n\t\n\tdisableClickPropagation: function (/*HTMLElement*/ el) {\n\t\tDomEvent.addListener(el, Draggable.START, DomEvent.stopPropagation);\n\t\tDomEvent.addListener(el, 'click', DomEvent.stopPropagation);\n\t\tDomEvent.addListener(el, 'dblclick', DomEvent.stopPropagation);\n\t},\n\n\tpreventDefault: function (/*Event*/ e) {\n\t\tif (e.preventDefault) {\n\t\t\te.preventDefault();\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\n\tstop: function (e) {\n\t\tDomEvent.preventDefault(e);\n\t\tDomEvent.stopPropagation(e);\n\t},\n\n\n\tgetWheelDelta: function (e) {\n\t\tvar delta = 0;\n\t\tif (e.wheelDelta) {\n\t\t\tdelta = e.wheelDelta / 120;\n\t\t}\n\t\tif (e.detail) {\n\t\t\tdelta = -e.detail / 3;\n\t\t}\n\t\treturn delta;\n\t}\n};\n\nexport { DomEvent }\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport Events from \"../core/Events\"\nimport Ease from \"../animation/Ease\"\nimport DomMixins from \"../dom/DomMixins\"\nimport { DomEvent } from \"../dom/DomEvent\"\nimport { Browser } from \"../core/Browser\"\nimport { Language } from \"../language/Language\"\n\n/*\tMenuBar\n\tDraggable component to control size\n================================================== */\n \nexport default class MenuBar {\n\t\n\t//includes: [Events, DomMixins],\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(elem, parent_elem, options) {\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tparent: {},\n\t\t\tcontainer: {},\n\t\t\tbutton_overview: {},\n\t\t\tbutton_backtostart: {},\n\t\t\tbutton_collapse_toggle: {},\n\t\t\tarrow: {},\n\t\t\tline: {},\n\t\t\tcoverbar: {},\n\t\t\tgrip: {}\n\t\t};\n\t\t\n\t\tthis.collapsed = false;\n\t\t\n\t\tif (typeof elem === 'object') {\n\t\t\tthis._el.container = elem;\n\t\t} else {\n\t\t\tthis._el.container = Dom.get(elem);\n\t\t}\n\t\t\n\t\tif (parent_elem) {\n\t\t\tthis._el.parent = parent_elem;\n\t\t}\n\t\n\t\t//Options\n\t\tthis.options = {\n\t\t\twidth: \t\t\t\t\t600,\n\t\t\theight: \t\t\t\t600,\n\t\t\tduration: \t\t\t\t1000,\n\t\t\tease: \t\t\t\t\tEase.easeInOutQuint,\n\t\t\tmenubar_default_y: \t\t0\n\t\t};\n\t\t\n\t\t// Animation\n\t\tthis.animator = {};\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\t\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t}\n\t\n\t/*\tPublic\n\t================================================== */\n\tshow(d) {\n\t\t\n\t\tvar duration = this.options.duration;\n\t\tif (d) {\n\t\t\tduration = d;\n\t\t}\n\t\t/*\n\t\tthis.animator = VCO.Animate(this._el.container, {\n\t\t\ttop: \t\tthis.options.menubar_default_y + \"px\",\n\t\t\tduration: \tduration,\n\t\t\teasing: \tVCO.Ease.easeOutStrong\n\t\t});\n\t\t*/\n\t}\n\t\n\thide(top) {\n\t\t/*\n\t\tthis.animator = VCO.Animate(this._el.container, {\n\t\t\ttop: \t\ttop,\n\t\t\tduration: \tthis.options.duration,\n\t\t\teasing: \tVCO.Ease.easeOutStrong\n\t\t});\n\t\t*/\n\t}\n\t\t\n\tsetSticky(y) {\n\t\tthis.options.menubar_default_y = y;\n\t}\n\t\n\t/*\tColor\n\t================================================== */\n\tsetColor(inverted) {\n\t\tif (inverted) {\n\t\t\tthis._el.container.className = 'vco-menubar vco-menubar-inverted';\n\t\t} else {\n\t\t\tthis._el.container.className = 'vco-menubar';\n\t\t}\n\t}\n\t\n\t/*\tUpdate Display\n\t================================================== */\n\tupdateDisplay(w, h, a, l) {\n\t\tthis._updateDisplay(w, h, a, l);\n\t}\n\n\t/*\tEvents\n\t================================================== */\n\t\n\t_onButtonOverview(e) {\n\t\tthis.fire(\"overview\", e);\n\t}\n\t\n\t_onButtonBackToStart(e) {\n\t\tthis.fire(\"back_to_start\", e);\n\t}\n\t\n\t_onButtonCollapseMap(e) {\n\t\tif (this.collapsed) {\n\t\t\tthis.collapsed = false;\n\t\t\tthis.show();\n\t\t\tthis._el.button_overview.style.display = \"inline\";\n\t\t\tthis.fire(\"collapse\", {y:this.options.menubar_default_y});\n\t\t\tif (Browser.mobile) {\n\t\t\t\tthis._el.button_collapse_toggle.innerHTML\t= \"<span class='vco-icon-arrow-up'></span>\";\n\t\t\t} else {\n\t\t\t\tthis._el.button_collapse_toggle.innerHTML\t= Language.buttons.collapse_toggle + \"<span class='vco-icon-arrow-up'></span>\";\n\t\t\t}\n\t\t} else {\n\t\t\tthis.collapsed = true;\n\t\t\tthis.hide(25);\n\t\t\tthis._el.button_overview.style.display = \"none\";\n\t\t\tthis.fire(\"collapse\", {y:1});\n\t\t\tif (Browser.mobile) {\n\t\t\t\tthis._el.button_collapse_toggle.innerHTML\t= \"<span class='vco-icon-arrow-down'></span>\";\n\t\t\t} else {\n\t\t\t\tthis._el.button_collapse_toggle.innerHTML\t= Language.buttons.uncollapse_toggle + \"<span class='vco-icon-arrow-down'></span>\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\t\t// Create Layout\n\t\t\n\t\t// Buttons\n\t\tthis._el.button_overview \t\t\t\t\t\t= Dom.create('span', 'vco-menubar-button', this._el.container);\n\t\tDomEvent.addListener(this._el.button_overview, 'click', this._onButtonOverview, this);\n\t\t\n\t\tthis._el.button_backtostart \t\t\t\t\t= Dom.create('span', 'vco-menubar-button', this._el.container);\n\t\tDomEvent.addListener(this._el.button_backtostart, 'click', this._onButtonBackToStart, this);\n\t\t\n\t\tthis._el.button_collapse_toggle \t\t\t\t= Dom.create('span', 'vco-menubar-button', this._el.container);\n\t\tDomEvent.addListener(this._el.button_collapse_toggle, 'click', this._onButtonCollapseMap, this);\n\t\t\n\t\tif (this.options.map_as_image) {\n\t\t\tthis._el.button_overview.innerHTML\t\t\t= Language.buttons.overview;\n\t\t} else {\n\t\t\tthis._el.button_overview.innerHTML\t\t\t= Language.buttons.map_overview;\n\t\t}\n\t\t\n\t\tif (Browser.mobile) {\n\t\t\t\n\t\t\tthis._el.button_backtostart.innerHTML\t\t= \"<span class='vco-icon-goback'></span>\";\n\t\t\tthis._el.button_collapse_toggle.innerHTML\t= \"<span class='vco-icon-arrow-up'></span>\";\n\t\t\tthis._el.container.setAttribute(\"ontouchstart\",\" \");\n\t\t} else {\n\t\t\t\n\t\t\tthis._el.button_backtostart.innerHTML\t\t= Language.buttons.backtostart + \" <span class='vco-icon-goback'></span>\";\n\t\t\tthis._el.button_collapse_toggle.innerHTML\t= Language.buttons.collapse_toggle + \"<span class='vco-icon-arrow-up'></span>\";\n\t\t}\n\t\t\n\t\tif (this.options.layout == \"landscape\") {\n\t\t\tthis._el.button_collapse_toggle.style.display = \"none\";\n\t\t}\n\t\t\n\t}\n\t\n\t_initEvents() {\n\t}\n\t\n\t// Update Display\n\t_updateDisplay(width, height, animate) {\n\t\t\n\t\tif (width) {\n\t\t\tthis.options.width = width;\n\t\t}\n\t\tif (height) {\n\t\t\tthis.options.height = height;\n\t\t}\n\t}\n\t\n}\n\nclassMixin(MenuBar, Events, DomMixins)\n","/*\tAnimate\n\tBasic animation\n================================================== */\n\n/*\n___deleteme__Animate(el, options) {\n\tvar animation = new vcoanimate(el, options),\n\t\twebkit_timeout;\n\treturn animation;\n};\n*/\n\nexport default function Animate(el, options) {\n return storymapAnimate(el, options);\n}\n\n/*\tBased on: Morpheus\n\thttps://github.com/ded/morpheus - (c) Dustin Diaz 2011\n\tLicense MIT\n================================================== */\n//window.vcoanimate = (function() {\nconst storymapAnimate = function() {\n\n\tvar doc = document,\n\t\twin = window,\n\t\tperf = win.performance,\n\t\tperfNow = perf && (perf.now || perf.webkitNow || perf.msNow || perf.mozNow),\n\t\tnow = perfNow ? function () { return perfNow.call(perf) } : function () { return +new Date() },\n\t\thtml = doc.documentElement,\n\t\tfixTs = false, // feature detected below\n\t\tthousand = 1000,\n\t\trgbOhex = /^rgb\\(|#/,\n\t\trelVal = /^([+\\-])=([\\d\\.]+)/,\n\t\tnumUnit = /^(?:[\\+\\-]=?)?\\d+(?:\\.\\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,\n\t\trotate = /rotate\\(((?:[+\\-]=)?([\\-\\d\\.]+))deg\\)/,\n\t\tscale = /scale\\(((?:[+\\-]=)?([\\d\\.]+))\\)/,\n\t\tskew = /skew\\(((?:[+\\-]=)?([\\-\\d\\.]+))deg, ?((?:[+\\-]=)?([\\-\\d\\.]+))deg\\)/,\n\t\ttranslate = /translate\\(((?:[+\\-]=)?([\\-\\d\\.]+))px, ?((?:[+\\-]=)?([\\-\\d\\.]+))px\\)/,\n\t\t// these elements do not require 'px'\n\t\tunitless = { lineHeight: 1, zoom: 1, zIndex: 1, opacity: 1, transform: 1};\n\n // which property name does this browser use for transform\n\tvar transform = function () {\n\t\tvar styles = doc.createElement('a').style,\n\t\t\tprops = ['webkitTransform', 'MozTransform', 'OTransform', 'msTransform', 'Transform'],\n\t\t\ti;\n\n\t\tfor (i = 0; i < props.length; i++) {\n\t\t\tif (props[i] in styles) return props[i]\n\t\t};\n\t}();\n\n\t// does this browser support the opacity property?\n\tvar opacity = function () {\n\t\treturn typeof doc.createElement('a').style.opacity !== 'undefined'\n\t}();\n\n\t// initial style is determined by the elements themselves\n\tvar getStyle = doc.defaultView && doc.defaultView.getComputedStyle ?\n\tfunction (el, property) {\n\t\tproperty = property == 'transform' ? transform : property\n\t\tproperty = camelize(property)\n\t\tvar value = null,\n\t\t\tcomputed = doc.defaultView.getComputedStyle(el, '');\n\n\t\tcomputed && (value = computed[property]);\n\t\treturn el.style[property] || value;\n\t} : html.currentStyle ?\n\n function (el, property) {\n\t\tproperty = camelize(property)\n\n\t\tif (property == 'opacity') {\n\t\t\tvar val = 100\n\t\t\ttry {\n\t\t\t\tval = el.filters['DXImageTransform.Microsoft.Alpha'].opacity\n\t\t\t} catch (e1) {\n\t\t\t\ttry {\n\t\t\t\t\tval = el.filters('alpha').opacity\n\t\t\t\t} catch (e2) {\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn val / 100\n\t\t}\n\t\tvar value = el.currentStyle ? el.currentStyle[property] : null\n\t\treturn el.style[property] || value\n\t} :\n\n function (el, property) {\n\t\treturn el.style[camelize(property)]\n }\n\n var frame = function () {\n // native animation frames\n // http://webstuff.nfshost.com/anim-timing/Overview.html\n // http://dev.chromium.org/developers/design-documents/requestanimationframe-implementation\n return win.requestAnimationFrame ||\n win.webkitRequestAnimationFrame ||\n win.mozRequestAnimationFrame ||\n win.msRequestAnimationFrame ||\n win.oRequestAnimationFrame ||\n function (callback) {\n win.setTimeout(function () {\n callback(+new Date())\n }, 17) // when I was 17..\n }\n }()\n\n var children = []\n\n\tframe(function(timestamp) {\n\t \t// feature-detect if rAF and now() are of the same scale (epoch or high-res),\n\t\t// if not, we have to do a timestamp fix on each frame\n\t\tfixTs = timestamp > 1e12 != now() > 1e12\n\t})\n\n function has(array, elem, i) {\n if (Array.prototype.indexOf) return array.indexOf(elem)\n for (i = 0; i < array.length; ++i) {\n if (array[i] === elem) return i\n }\n }\n\n function render(timestamp) {\n var i, count = children.length\n // if we're using a high res timer, make sure timestamp is not the old epoch-based value.\n // http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\n if (perfNow && timestamp > 1e12) timestamp = now()\n\tif (fixTs) timestamp = now()\n for (i = count; i--;) {\n children[i](timestamp)\n }\n children.length && frame(render)\n }\n\n function live(f) {\n if (children.push(f) === 1) frame(render)\n }\n\n function die(f) {\n var rest, index = has(children, f)\n if (index >= 0) {\n rest = children.slice(index + 1)\n children.length = index\n children = children.concat(rest)\n }\n }\n\n function parseTransform(style, base) {\n var values = {}, m\n if (m = style.match(rotate)) values.rotate = by(m[1], base ? base.rotate : null)\n if (m = style.match(scale)) values.scale = by(m[1], base ? base.scale : null)\n if (m = style.match(skew)) {values.skewx = by(m[1], base ? base.skewx : null); values.skewy = by(m[3], base ? base.skewy : null)}\n if (m = style.match(translate)) {values.translatex = by(m[1], base ? base.translatex : null); values.translatey = by(m[3], base ? base.translatey : null)}\n return values\n }\n\n function formatTransform(v) {\n var s = ''\n if ('rotate' in v) s += 'rotate(' + v.rotate + 'deg) '\n if ('scale' in v) s += 'scale(' + v.scale + ') '\n if ('translatex' in v) s += 'translate(' + v.translatex + 'px,' + v.translatey + 'px) '\n if ('skewx' in v) s += 'skew(' + v.skewx + 'deg,' + v.skewy + 'deg)'\n return s\n }\n\n function rgb(r, g, b) {\n return '#' + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1)\n }\n\n // convert rgb and short hex to long hex\n function toHex(c) {\n var m = c.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/)\n return (m ? rgb(m[1], m[2], m[3]) : c)\n .replace(/#(\\w)(\\w)(\\w)$/, '#$1$1$2$2$3$3') // short skirt to long jacket\n }\n\n // change font-size => fontSize etc.\n function camelize(s) {\n return s.replace(/-(.)/g, function (m, m1) {\n return m1.toUpperCase()\n })\n }\n\n // aren't we having it?\n function fun(f) {\n return typeof f == 'function'\n }\n\n function nativeTween(t) {\n // default to a pleasant-to-the-eye easeOut (like native animations)\n return Math.sin(t * Math.PI / 2)\n }\n\n /**\n * Core tween method that requests each frame\n * @param duration: time in milliseconds. defaults to 1000\n * @param fn: tween frame callback function receiving 'position'\n * @param done {optional}: complete callback function\n * @param ease {optional}: easing method. defaults to easeOut\n * @param from {optional}: integer to start from\n * @param to {optional}: integer to end at\n * @returns method to stop the animation\n */\n function tween(duration, fn, done, ease, from, to) {\n ease = fun(ease) ? ease : morpheus.easings[ease] || nativeTween\n var time = duration || thousand\n , self = this\n , diff = to - from\n , start = now()\n , stop = 0\n , end = 0\n\n function run(t) {\n var delta = t - start\n if (delta > time || stop) {\n to = isFinite(to) ? to : 1\n stop ? end && fn(to) : fn(to)\n die(run)\n return done && done.apply(self)\n }\n // if you don't specify a 'to' you can use tween as a generic delta tweener\n // cool, eh?\n isFinite(to) ?\n fn((diff * ease(delta / time)) + from) :\n fn(ease(delta / time))\n }\n\n live(run)\n\n return {\n stop: function (jump) {\n stop = 1\n end = jump // jump to end of animation?\n if (!jump) done = null // remove callback if not jumping to end\n }\n }\n }\n\n /**\n * generic bezier method for animating x|y coordinates\n * minimum of 2 points required (start and end).\n * first point start, last point end\n * additional control points are optional (but why else would you use this anyway ;)\n * @param points: array containing control points\n [[0, 0], [100, 200], [200, 100]]\n * @param pos: current be(tween) position represented as float 0 - 1\n * @return [x, y]\n */\n function bezier(points, pos) {\n var n = points.length, r = [], i, j\n for (i = 0; i < n; ++i) {\n r[i] = [points[i][0], points[i][1]]\n }\n for (j = 1; j < n; ++j) {\n for (i = 0; i < n - j; ++i) {\n r[i][0] = (1 - pos) * r[i][0] + pos * r[parseInt(i + 1, 10)][0]\n r[i][1] = (1 - pos) * r[i][1] + pos * r[parseInt(i + 1, 10)][1]\n }\n }\n return [r[0][0], r[0][1]]\n }\n\n // this gets you the next hex in line according to a 'position'\n function nextColor(pos, start, finish) {\n var r = [], i, e, from, to\n for (i = 0; i < 6; i++) {\n from = Math.min(15, parseInt(start.charAt(i), 16))\n to = Math.min(15, parseInt(finish.charAt(i), 16))\n e = Math.floor((to - from) * pos + from)\n e = e > 15 ? 15 : e < 0 ? 0 : e\n r[i] = e.toString(16)\n }\n return '#' + r.join('')\n }\n\n // this retreives the frame value within a sequence\n function getTweenVal(pos, units, begin, end, k, i, v) {\n if (k == 'transform') {\n v = {}\n for (var t in begin[i][k]) {\n v[t] = (t in end[i][k]) ? Math.round(((end[i][k][t] - begin[i][k][t]) * pos + begin[i][k][t]) * thousand) / thousand : begin[i][k][t]\n }\n return v\n } else if (typeof begin[i][k] == 'string') {\n return nextColor(pos, begin[i][k], end[i][k])\n } else {\n // round so we don't get crazy long floats\n v = Math.round(((end[i][k] - begin[i][k]) * pos + begin[i][k]) * thousand) / thousand\n // some css properties don't require a unit (like zIndex, lineHeight, opacity)\n if (!(k in unitless)) v += units[i][k] || 'px'\n return v\n }\n }\n\n // support for relative movement via '+=n' or '-=n'\n function by(val, start, m, r, i) {\n return (m = relVal.exec(val)) ?\n (i = parseFloat(m[2])) && (start + (m[1] == '+' ? 1 : -1) * i) :\n parseFloat(val)\n }\n\n /**\n * morpheus:\n * @param element(s): HTMLElement(s)\n * @param options: mixed bag between CSS Style properties & animation options\n * - {n} CSS properties|values\n * - value can be strings, integers,\n * - or callback function that receives element to be animated. method must return value to be tweened\n * - relative animations start with += or -= followed by integer\n * - duration: time in ms - defaults to 1000(ms)\n * - easing: a transition method - defaults to an 'easeOut' algorithm\n * - complete: a callback method for when all elements have finished\n * - bezier: array of arrays containing x|y coordinates that define the bezier points. defaults to none\n * - this may also be a function that receives element to be animated. it must return a value\n */\n function morpheus(elements, options) {\n var els = elements ? (els = isFinite(elements.length) ? elements : [elements]) : [], i\n , complete = options.complete\n , duration = options.duration\n , ease = options.easing\n , points = options.bezier\n , begin = []\n , end = []\n , units = []\n , bez = []\n , originalLeft\n , originalTop\n\n if (points) {\n // remember the original values for top|left\n originalLeft = options.left;\n originalTop = options.top;\n delete options.right;\n delete options.bottom;\n delete options.left;\n delete options.top;\n }\n\n for (i = els.length; i--;) {\n\n // record beginning and end states to calculate positions\n begin[i] = {}\n end[i] = {}\n units[i] = {}\n\n // are we 'moving'?\n if (points) {\n\n var left = getStyle(els[i], 'left')\n , top = getStyle(els[i], 'top')\n , xy = [by(fun(originalLeft) ? originalLeft(els[i]) : originalLeft || 0, parseFloat(left)),\n by(fun(originalTop) ? originalTop(els[i]) : originalTop || 0, parseFloat(top))]\n\n bez[i] = fun(points) ? points(els[i], xy) : points\n bez[i].push(xy)\n bez[i].unshift([\n parseInt(left, 10),\n parseInt(top, 10)\n ])\n }\n\n for (var k in options) {\n switch (k) {\n case 'complete':\n case 'duration':\n case 'easing':\n case 'bezier':\n continue\n }\n var v = getStyle(els[i], k), unit\n , tmp = fun(options[k]) ? options[k](els[i]) : options[k]\n if (typeof tmp == 'string' &&\n rgbOhex.test(tmp) &&\n !rgbOhex.test(v)) {\n delete options[k]; // remove key :(\n continue; // cannot animate colors like 'orange' or 'transparent'\n // only #xxx, #xxxxxx, rgb(n,n,n)\n }\n\n begin[i][k] = k == 'transform' ? parseTransform(v) :\n typeof tmp == 'string' && rgbOhex.test(tmp) ?\n toHex(v).slice(1) :\n parseFloat(v)\n end[i][k] = k == 'transform' ? parseTransform(tmp, begin[i][k]) :\n typeof tmp == 'string' && tmp.charAt(0) == '#' ?\n toHex(tmp).slice(1) :\n by(tmp, parseFloat(v));\n // record original unit\n (typeof tmp == 'string') && (unit = tmp.match(numUnit)) && (units[i][k] = unit[1])\n }\n }\n // ONE TWEEN TO RULE THEM ALL\n return tween.apply(els, [duration, function (pos, v, xy) {\n // normally not a fan of optimizing for() loops, but we want something\n // fast for animating\n for (i = els.length; i--;) {\n if (points) {\n xy = bezier(bez[i], pos)\n els[i].style.left = xy[0] + 'px'\n els[i].style.top = xy[1] + 'px'\n }\n for (var k in options) {\n v = getTweenVal(pos, units, begin, end, k, i)\n k == 'transform' ?\n els[i].style[transform] = formatTransform(v) :\n k == 'opacity' && !opacity ?\n (els[i].style.filter = 'alpha(opacity=' + (v * 100) + ')') :\n (els[i].style[camelize(k)] = v)\n }\n }\n }, complete, ease])\n }\n\n // expose useful methods\n morpheus.tween = tween\n morpheus.getStyle = getStyle\n morpheus.bezier = bezier\n morpheus.transform = transform\n morpheus.parseTransform = parseTransform\n morpheus.formatTransform = formatTransform\n morpheus.easings = {}\n\n return morpheus\n}()\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport DomMixins from \"../dom/DomMixins\"\nimport Events from \"../core/Events\"\nimport Animate from \"../animation/Animate\"\nimport { DomEvent } from \"../dom/DomEvent\"\nimport { Browser } from \"../core/Browser\"\n/*\tSlideNav\n\tNavigation for Slideshows\n================================================== */\n// TODO null out data\n\n\nexport default class SlideNav {\n\t\n\t//includes: [VCO.Events, VCO.DomMixins],\n\t\n\t//_el: {},\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options, add_to_container) {\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tcontent_container: {},\n\t\t\ticon: {},\n\t\t\ttitle: {},\n\t\t\tdescription: {}\n\t\t};\n\t\n\t\t// Media Type\n\t\tthis.mediatype = {};\n\t\t\n\t\t// Data\n\t\tthis.data = {\n\t\t\ttitle: \"Navigation\",\n\t\t\tdescription: \"Description\"\n\t\t};\n\t\n\t\t//Options\n\t\tthis.options = {\n\t\t\tdirection: \t\t\t\"previous\"\n\t\t};\n\t\n\t\tthis.animator = null;\n\t\tthis.animator_position = null;\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\t\t\n\t\t\n\t\tthis._el.container = Dom.create(\"div\", \"vco-slidenav-\" + this.options.direction);\n\t\t\n\t\tif (Browser.mobile) {\n\t\t\tthis._el.container.setAttribute(\"ontouchstart\",\" \");\n\t\t}\n\t\t\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t\t\n\t\tif (add_to_container) {\n\t\t\tadd_to_container.appendChild(this._el.container);\n\t\t};\n\t\t\n\t}\n\t\n\t/*\tUpdate Content\n\t================================================== */\n\tupdate(d) {\n\t\tthis._update(d);\n\t}\n\t\n\t/*\tColor\n\t================================================== */\n\tsetColor(inverted) {\n\t\tif (inverted) {\n\t\t\tthis._el.content_container.className = 'vco-slidenav-content-container vco-slidenav-inverted';\n\t\t} else {\n\t\t\tthis._el.content_container.className = 'vco-slidenav-content-container';\n\t\t}\n\t}\n\t\n\t/*\tPosition\n\t================================================== */\n\tupdatePosition(pos, use_percent, duration, ease, start_value, return_to_default) {\n\t\tvar self = this,\n\t\t\tani = {\n\t\t\t\tduration: \tduration,\n\t\t\t\teasing: \tease,\n\t\t\t\tcomplete: function() {\n\t\t\t\t\tself._onUpdatePositionComplete(return_to_default);\n\t\t\t\t}\n\t\t\t};\n\t\tvar _start_value = start_value;\n\t\t\n\t\tfor (var name in pos) {\n\t\t\tif (pos.hasOwnProperty(name)) {\n\t\t\t\tif (use_percent) {\n\t\t\t\t\tani[name] = pos[name] + \"%\";\n\t\t\t\t} else {\n\t\t\t\t\tani[name] = pos[name] + \"px\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.animator_position) {\n\t\t\tthis.animator_position.stop();\n\t\t}\n\t\t\n\t\tvar prop_to_set;\n\t\tif (ani.right) {\n\t\t\tprop_to_set = \"right\";\n\t\t} else {\n\t\t\tprop_to_set = \"left\";\n\t\t}\n\t\tif (use_percent) {\n\t\t\tthis._el.container.style[prop_to_set] = _start_value + \"%\";\n\t\t} else {\n\t\t\tthis._el.container.style[prop_to_set] = _start_value + \"px\";\n\t\t}\n\t\t\n\t\tthis.animator_position = Animate(this._el.container, ani);\n\n\t}\n\t\n\t_onUpdatePositionComplete(return_to_default) {\n\t\tif (return_to_default) {\n\t\t\tthis._el.container.style.left = \"\";\n\t\t\tthis._el.container.style.right = \"\";\n\t\t}\n\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\t_onMouseClick() {\n\t\tthis.fire(\"clicked\", this.options);\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_update(d) {\n\t\t// update data\n\t\tthis.data = mergeData(this.data, d);\n\t\t\n\t\t// Title\n\t\tif (this.data.title != \"\") {\n\t\t\tthis._el.title.innerHTML\t\t= this.data.title;\n\t\t}\n\t\t\n\t\t// Date\n\t\tif (this.data.date != \"\") {\n\t\t\tthis._el.description.innerHTML\t= this.data.description;\n\t\t}\n\t}\n\t\n\t_initLayout() {\n\t\t\n\t\t// Create Layout\n\t\tthis._el.content_container\t\t\t= Dom.create(\"div\", \"vco-slidenav-content-container\", this._el.container);\n\t\tthis._el.icon\t\t\t\t\t\t= Dom.create(\"div\", \"vco-slidenav-icon\", this._el.content_container);\n\t\tthis._el.title\t\t\t\t\t\t= Dom.create(\"div\", \"vco-slidenav-title\", this._el.content_container);\n\t\tthis._el.description\t\t\t\t= Dom.create(\"div\", \"vco-slidenav-description\", this._el.content_container);\n\t\t\n\t\tthis._el.icon.innerHTML\t\t\t\t= \"&nbsp;\"\n\t\t\n\t\tthis._update();\n\t}\n\t\n\t_initEvents() {\n\t\tDomEvent.addListener(this._el.container, 'click', this._onMouseClick, this);\n\t}\n\t\n}\n\nclassMixin(SlideNav, Events, DomMixins)\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport { DomEvent } from \"../dom/DomEvent\"\nimport Events from \"../core/Events\"\nimport DomMixins from \"../dom/DomMixins\"\nimport { Language } from \"../language/Language\"\n/*\tVCO.SizeBar\n\tDraggable component to control size\n================================================== */\n \nexport default class Message {\n\t\n\t//includes: [VCO.Events, VCO.DomMixins],\n\t\n\t//_el: {},\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options, add_to_container) {\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tparent: {},\n\t\t\tcontainer: {},\n\t\t\tmessage_container: {},\n\t\t\tloading_icon: {},\n\t\t\tmessage: {}\n\t\t};\n\t\n\t\t//Options\n\t\tthis.options = {\n\t\t\twidth: \t\t\t\t\t600,\n\t\t\theight: \t\t\t\t600,\n\t\t\tmessage_class: \t\t\t\"vco-message\",\n\t\t\tmessage_icon_class: \t\"vco-loading-icon\"\n\t\t};\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.data, data);\n\t\tmergeData(this.options, options);\n\t\t\n\t\tthis._el.container = Dom.create(\"div\", this.options.message_class);\n\t\t\n\t\tif (add_to_container) {\n\t\t\tadd_to_container.appendChild(this._el.container);\n\t\t\tthis._el.parent = add_to_container;\n\t\t};\n\t\t\n\t\t\n\t\t// Animation\n\t\tthis.animator = {};\n\t\t\n\t\t\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t}\n\t\n\t/*\tPublic\n\t================================================== */\n\tupdateMessage(t) {\n\t\tthis._updateMessage(t);\n\t}\n\t\n\t\n\t/*\tUpdate Display\n\t================================================== */\n\tupdateDisplay(w, h) {\n\t\tthis._updateDisplay(w, h);\n\t}\n\t\n\t_updateMessage(t) {\n\t\tif (!t) {\n\t\t\tif (Language) {\n\t\t\t\tthis._el.message.innerHTML = Language.messages.loading;\n\t\t\t} else {\n\t\t\t\tthis._el.message.innerHTML = \"Loading\";\n\t\t\t}\n\t\t} else {\n\t\t\tthis._el.message.innerHTML = t;\n\t\t}\n\t}\n\t\n\n\t/*\tEvents\n\t================================================== */\n\n\t\n\t_onMouseClick() {\n\t\tthis.fire(\"clicked\", this.options);\n\t}\n\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\t\t\n\t\t// Create Layout\n\t\tthis._el.message_container = Dom.create(\"div\", \"vco-message-container\", this._el.container);\n\t\tthis._el.loading_icon = Dom.create(\"div\", this.options.message_icon_class, this._el.message_container);\n\t\tthis._el.message = Dom.create(\"div\", \"vco-message-content\", this._el.message_container);\n\t\t\n\t\tthis._updateMessage();\n\t\t\n\t}\n\t\n\t_initEvents() {\n\t\tDomEvent.addListener(this._el.container, 'click', this._onMouseClick, this);\n\t}\n\t\n\t// Update Display\n\t_updateDisplay(width, height, animate) {\n\t\t\n\t}\n\t\n}\n\nclassMixin(Message, Events, DomMixins)\n","import { classMixin, mergeData } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport Events from \"../core/Events\"\nimport Message from \"../ui/Message\"\nimport { Browser } from \"../core/Browser\"\n/*\tVCO.Media\n\tMain media template for media assets.\n\tTakes a data object and populates a dom object\n================================================== */\n// TODO add link\n\nexport class Media {\n\n\t//includes: [VCO.Events],\n\n\t//_el: {},\n\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options, add_to_container) {\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tcontent_container: {},\n\t\t\tcontent: {},\n\t\t\tcontent_item: {},\n\t\t\tcontent_link: {},\n\t\t\tcaption: null,\n\t\t\tcredit: null,\n\t\t\tparent: {},\n\t\t\tlink: null\n\t\t};\n\n\t\t// Player (If Needed)\n\t\tthis.player = null;\n\n\t\t// Timer (If Needed)\n\t\tthis.timer = null;\n\t\tthis.load_timer = null;\n\n\t\t// Message\n\t\tthis.message = null;\n\n\t\t// Media ID\n\t\tthis.media_id = null;\n\n\t\t// State\n\t\tthis._state = {\n\t\t\tloaded: false,\n\t\t\tshow_meta: false,\n\t\t\tmedia_loaded: false\n\t\t};\n\n\t\t// Data\n\t\tthis.data = {\n\t\t\tuniqueid: \t\t\tnull,\n\t\t\turl: \t\t\t\tnull,\n\t\t\tcredit:\t\t\t\tnull,\n\t\t\tcaption:\t\t\tnull,\n\t\t\tlink: \t\t\t\tnull,\n\t\t\tlink_target: \t\tnull\n\t\t};\n\n\t\t//Options\n\t\tthis.options = {\n api_key_flickr: \"8f2d5becf7b6ba46570741620054b507\",\n credit_height: 0,\n caption_height: 0\n };\n\n\t\tthis.animator = {};\n\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\n\t\tthis._el.container = Dom.create(\"div\", \"vco-media\");\n\n\t\tif (this.data.uniqueid) {\n\t\t\tthis._el.container.id = this.data.uniqueid;\n\t\t}\n\n\n\t\tthis._initLayout();\n\n\t\tif (add_to_container) {\n\t\t\tadd_to_container.appendChild(this._el.container);\n\t\t\tthis._el.parent = add_to_container;\n\t\t};\n\t}\n\n\tloadMedia() {\n\t\tvar self = this;\n\n\t\tif (!this._state.loaded) {\n\t\t\ttry {\n\t\t\t\tthis.load_timer = setTimeout(function() {\n\t\t\t\t\tself._loadMedia();\n\t\t\t\t\tself._state.loaded = true;\n\t\t\t\t\tself._updateDisplay();\n\t\t\t\t}, 1200);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.log(\"Error loading media for \", this._media);\n\t\t\t\tconsole.log(e);\n\t\t\t}\n\n\t\t\t//this._state.loaded = true;\n\t\t}\n\t}\n\n\tloadingMessage() {\n\t\tthis.message.updateMessage(this._('loading') + \" \" + this.options.media_name);\n\t}\n\n\tupdateMediaDisplay(layout) {\n\t\tif (this._state.loaded) {\n\t\t\tthis._updateMediaDisplay(layout);\n\n\t\t\tif (!Browser.mobile && layout != \"portrait\") {\n\t\t\t\tthis._el.content_item.style.maxHeight = (this.options.height/2) + \"px\";\n\t\t\t}\n\n\t\t\tif (this._state.media_loaded) {\n\t\t\t\tif (this._el.credit) {\n\t\t\t\t\tthis._el.credit.style.width\t\t= \"auto\";\n\t\t\t\t}\n\t\t\t\tif (this._el.caption) {\n\t\t\t\t\tthis._el.caption.style.width\t= \"auto\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix for max-width issues in Firefox\n\t\t\tif (Browser.firefox) {\n\t\t\t\tif (this._el.content_item.offsetWidth > this._el.content_item.offsetHeight) {\n\t\t\t\t\tthis._el.content_item.style.width = \"100%\";\n\t\t\t\t\tthis._el.content_item.style.maxWidth = \"100%\";\n\n\t\t\t\t}\n\n\t\t\t\tif (layout == \"portrait\") {\n\t\t\t\t\tthis._el.content_item.style.maxHeight = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._state.media_loaded) {\n\t\t\t\tif (this._el.credit) {\n\t\t\t\t\tthis._el.credit.style.width\t\t= this._el.content_item.offsetWidth + \"px\";\n\t\t\t\t}\n\t\t\t\tif (this._el.caption) {\n\t\t\t\t\tthis._el.caption.style.width\t= this._el.content_item.offsetWidth + \"px\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\t/*\tMedia Specific\n\t================================================== */\n\t\t_loadMedia() {\n\n\t\t}\n\n\t\t_updateMediaDisplay(l) {\n\t\t\t//this._el.content_item.style.maxHeight = (this.options.height - this.options.credit_height - this.options.caption_height - 16) + \"px\";\n\t\t}\n\n\t/*\tPublic\n\t================================================== */\n\tshow() {\n\n\t}\n\n\thide() {\n\n\t}\n\n\taddTo(container) {\n\t\tcontainer.appendChild(this._el.container);\n\t\tthis.onAdd();\n\t}\n\n\tremoveFrom(container) {\n\t\tcontainer.removeChild(this._el.container);\n\t\tthis.onRemove();\n\t}\n\n\t// Update Display\n\tupdateDisplay(w, h, l) {\n\t\tthis._updateDisplay(w, h, l);\n\t}\n\n\tstopMedia() {\n\t\tthis._stopMedia();\n\t}\n\n\tloadErrorDisplay(message) {\n\t\tthis._el.content.removeChild(this._el.content_item);\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-loaderror\", this._el.content);\n\t\tthis._el.content_item.innerHTML = \"<div class='vco-icon-\" + this.options.media_type + \"'></div><p>\" + message + \"</p>\";\n\n\t\t// After Loaded\n\t\tthis.onLoaded(true);\n\t}\n\n\t/*\tEvents\n\t================================================== */\n\tonLoaded(error) {\n\t\tthis._state.loaded = true;\n\t\tthis.fire(\"loaded\", this.data);\n\t\tif (this.message) {\n\t\t\tthis.message.hide();\n\t\t}\n\t\tif (!error) {\n\t\t\tthis.showMeta();\n\t\t}\n\t\tthis.updateDisplay();\n\t}\n\n\tonMediaLoaded(e) {\n\t\tthis._state.media_loaded = true;\n\t\tthis.fire(\"media_loaded\", this.data);\n\t\tif (this._el.credit) {\n\t\t\tthis._el.credit.style.width\t\t= this._el.content_item.offsetWidth + \"px\";\n\t\t}\n\t\tif (this._el.caption) {\n\t\t\tthis._el.caption.style.width\t\t= this._el.content_item.offsetWidth + \"px\";\n\t\t}\n\t}\n\n\tshowMeta(credit, caption) {\n\t\tthis._state.show_meta = true;\n\t\t// Credit\n\t\tif (this.data.credit && this.data.credit != \"\" && !this._el.credit) {\n\t\t\tthis._el.credit\t\t\t\t\t= Dom.create(\"div\", \"vco-credit\", this._el.content_container);\n\t\t\tthis._el.credit.innerHTML\t\t= this.data.credit;\n\t\t\tthis.options.credit_height \t\t= this._el.credit.offsetHeight;\n\t\t}\n\n\t\t// Caption\n\t\tif (this.data.caption && this.data.caption != \"\" && !this._el.caption) {\n\t\t\tthis._el.caption\t\t\t\t= Dom.create(\"div\", \"vco-caption\", this._el.content_container);\n\t\t\tthis._el.caption.innerHTML\t\t= this.data.caption;\n\t\t\tthis.options.caption_height \t= this._el.caption.offsetHeight;\n\t\t}\n\t}\n\n\tonAdd() {\n\t\tthis.fire(\"added\", this.data);\n\t}\n\n\tonRemove() {\n\t\tthis.fire(\"removed\", this.data);\n\t}\n\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\n\t\t// Message\n\t\tthis.message = new Message({}, this.options);\n\t\tthis.message.addTo(this._el.container);\n\n\t\t// Create Layout\n\t\tthis._el.content_container = Dom.create(\"div\", \"vco-media-content-container\", this._el.container);\n\n\t\t// Link\n\t\tif (this.data.link && this.data.link != \"\") {\n\n\t\t\tthis._el.link = Dom.create(\"a\", \"vco-media-link\", this._el.content_container);\n\t\t\tthis._el.link.href = this.data.link;\n\t\t\tif (this.data.link_target && this.data.link_target != \"\") {\n\t\t\t\tthis._el.link.target = this.data.link_target;\n\t\t\t} else {\n\t\t\t\tthis._el.link.target = \"_blank\";\n\t\t\t}\n\n\t\t\tthis._el.content = Dom.create(\"div\", \"vco-media-content\", this._el.link);\n\n\t\t} else {\n\t\t\tthis._el.content = Dom.create(\"div\", \"vco-media-content\", this._el.content_container);\n\t\t}\n\t}\n\n\t// Update Display\n\t_updateDisplay(w, h, l) {\n\t\tif (w) {\n\t\t\tthis.options.width = w;\n\t\t}\n\t\tif (h) {\n\t\t\tthis.options.height = h;\n\t\t}\n\n\t\tif (l) {\n\t\t\tthis.options.layout = l;\n\t\t}\n\n\t\tif (this._el.credit) {\n\t\t\tthis.options.credit_height \t\t= this._el.credit.offsetHeight;\n\t\t}\n\t\tif (this._el.caption) {\n\t\t\tthis.options.caption_height \t= this._el.caption.offsetHeight + 5;\n\t\t}\n\n\t\tthis.updateMediaDisplay(this.options.layout);\n\n\t}\n\n\t_stopMedia() {\n\n\t}\n\n}\n\nclassMixin(Media, Events)\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\nimport { Browser } from \"../../core/Browser\"\n\n/*\tMedia.Image\n\tProduces image assets.\n\tTakes a data object and populates a dom object\n================================================== */\n\nexport default class Image extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar self = this;\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Link\n\t\tif (this.data.link) {\n\t\t\tthis._el.content_link \t\t\t\t= Dom.create(\"a\", \"\", this._el.content);\n\t\t\tthis._el.content_link.href \t\t\t= this.data.link;\n\t\t\tthis._el.content_link.target \t\t= \"_blank\";\n\t\t\tthis._el.content_item\t\t\t\t= Dom.create(\"img\", \"vco-media-item vco-media-image vco-media-shadow\", this._el.content_link);\n\n\t\t\tif (this.data.link.match(/\\.(jpg|jpeg|png|gif)$/i)) { // The link target is another (presumably larger) image\n\t\t\t\t// Display the content in a lightbox, rather than a new tab\n\t\t\t\tthis._el.content_link.addEventListener(\"click\", function(event) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tdocument.getElementById('lightbox').innerHTML = `\n\t\t\t\t\t\t<a id=\"close\"></a>\n\t\t\t\t\t\t<div class=\"img\" style=\"background: url('${this.getAttribute('href')}') center center / contain no-repeat;\">\n\t\t\t\t\t\t\t<img src=\"${this.getAttribute('href')}\">\n\t\t\t\t\t\t</div>`;\n\t\t\t\t\tdocument.getElementById('lightbox').style.display = 'block';\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthis._el.content_item\t\t\t\t= Dom.create(\"img\", \"vco-media-item vco-media-image vco-media-shadow\", this._el.content);\n\t\t}\n\t\t\n\t\t// Media Loaded Event\n\t\tthis._el.content_item.addEventListener('load', function(e) {\n\t\t\tself.onMediaLoaded();\n\t\t});\n\t\t\n\t\tthis._el.content_item.src\t\t\t= this.data.url;\n\t\t\n\t\tthis.onLoaded();\n\t}\n\t\n\t_updateMediaDisplay(layout) {\n\t\t\n\t\tif(Browser.firefox) { \n\t\t\t//this._el.content_item.style.maxWidth = (this.options.width/2) - 40 + \"px\";\n\t\t\tthis._el.content_item.style.width = \"auto\";\n\t\t}\n\t}\n\t\n}\n","import { unique_ID, getUrlVars, ratio } from \"../../core/Util\"\nimport { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { loadJS } from \"../../core/Load\"\nimport { Language } from \"../../language/Language\"\n\n/*\tMedia.YouTube\n================================================== */\n\nexport default class YouTube extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar self = this,\n\t\t\turl_vars;\n\t\t\n\t\t// Loading Message \n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\tthis.youtube_loaded = false;\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-youtube vco-media-shadow\", this._el.content);\n\t\tthis._el.content_item.id = unique_ID(7)\n\t\t\n\t\t// URL Vars\n\t\turl_vars = getUrlVars(this.data.url);\n\t\t\n\t\t// Get Media ID\n\t\tthis.media_id = {};\n\t\t\n\t\tif (this.data.url.match('v=')) {\n\t\t\tthis.media_id.id\t= url_vars[\"v\"];\n\t\t} else if (this.data.url.match('\\/embed\\/')) {\n\t\t\tthis.media_id.id\t= this.data.url.split(\"embed\\/\")[1].split(/[?&]/)[0];\n\t\t} else if (this.data.url.match(/v\\/|v=|youtu\\.be\\//)){\n\t\t\tthis.media_id.id\t= this.data.url.split(/v\\/|v=|youtu\\.be\\//)[1].split(/[?&]/)[0];\n\t\t} else {\n\t\t\tconsole.log(\"YouTube in URL but not a valid video\");\n\t\t}\n\t\t\n\t\tthis.media_id.start\t\t= url_vars[\"t\"];\n\t\tthis.media_id.hd\t\t= url_vars[\"hd\"];\n\t\t\n\t\t\n\t\t// API Call\n\t\tloadJS('https://www.youtube.com/iframe_api', function() {\n\t\t\tself.createMedia();\n\t\t});\n\t\t\n\t}\n\t\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = ratio.r16_9({w:this._el.content_item.offsetWidth}) + \"px\";\n\t}\n\t\n\t_stopMedia() {\n\t\tif (this.youtube_loaded) {\n\t\t\ttry {\n\t\t\t if(this.player.getPlayerState() == YT.PlayerState.PLAYING) {\t\t\t \n\t\t\t\t this.player.pauseVideo();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(err) {\n\t\t\t\tconsole.log(err);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tcreateMedia() {\n\t\tvar self = this;\n\t\t// Determine Start of Media\n\t\tif (typeof(this.media_id.start) != 'undefined') {\n\t\t\tvar vidstart\t\t\t= this.media_id.start.toString(),\n\t\t\t\tvid_start_minutes\t= 0,\n\t\t\t\tvid_start_seconds\t= 0;\n\t\t\tif (vidstart.match('m')) {\n\t\t\t\tvid_start_minutes = parseInt(vidstart.split(\"m\")[0], 10);\n\t\t\t\tvid_start_seconds = parseInt(vidstart.split(\"m\")[1].split(\"s\")[0], 10);\n\t\t\t\tthis.media_id.start = (vid_start_minutes * 60) + vid_start_seconds;\n\t\t\t} else {\n\t\t\t\tthis.media_id.start = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.media_id.start = 0;\n\t\t}\n\t\t// Determine HD\n\t\tif (typeof(this.media_id.hd) != 'undefined') {\n\t\t\tthis.media_id.hd = true;\n\t\t} else {\n\t\t\tthis.media_id.hd = false;\n\t\t}\n\t\tthis.createPlayer();\n\t}\n\t\n\tcreatePlayer() {\n\t\tvar self = this;\n\t\tclearTimeout(this.timer);\n\t\tif(typeof YT != 'undefined' && typeof YT.Player != 'undefined') {\n\t\t\t// Create Player\n\t\t\tthis.player = new YT.Player(this._el.content_item.id, {\n\t\t\t\tplayerVars: {\n\t\t\t\t\tenablejsapi:\t\t1,\n\t\t\t\t\tcolor: \t\t\t\t'white',\n\t\t\t\t\tautohide: \t\t\t1,\n\t\t\t\t\tshowinfo:\t\t\t0,\n\t\t\t\t\ttheme:\t\t\t\t'light',\n\t\t\t\t\tstart:\t\t\t\tthis.media_id.start,\n\t\t\t\t\tfs: \t\t\t\t0,\n\t\t\t\t\trel:\t\t\t\t0\n\t\t\t\t},\n\t\t\t\tvideoId: this.media_id.id,\n\t\t\t\tevents: {\n\t\t\t\t\tonReady: \t\t\tfunction() {\n\t\t\t\t\t\tself.onPlayerReady();\n\t\t\t\t\t\t// After Loaded\n\t\t\t\t\t\t//self.onLoaded();\n\t\t\t\t\t},\n\t\t\t\t\t'onStateChange': \tself.onStateChange\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.timer = setTimeout(function() {\n\t\t\t\tself.createPlayer();\n\t\t\t}, 1000);\n\t\t}\n\t\tthis.onLoaded();\n\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\tonPlayerReady(e) {\n\t\t\n\t\tthis.youtube_loaded = true;\n\t\tthis._el.content_item = document.getElementById(this._el.content_item.id);\n\t\tthis.onMediaLoaded();\n\t\tthis.onLoaded();\n\t}\n\t\n\tonStateChange(e) {\n if(e.data == YT.PlayerState.ENDED) {\n e.target.seekTo(0);\n e.target.pauseVideo();\n }\t\t\t\t\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\" \n\n\n/*\tMedia.Blockquote\n================================================== */\n\nexport default class Blockquote extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-blockquote\", this._el.content);\n\t\t\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url;\n\t\t\n\t\t// API Call\n\t\tthis._el.content_item.innerHTML = this.media_id;\n\t\t\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\t\n\tupdateMediaDisplay() {\n\t\t\n\t}\n\t\n\t_updateMediaDisplay() {\n\t\t\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\nimport { getObjectAttributeByIndex } from \"../../core/Util\"\n\n/*\tMedia.Wikipedia\n================================================== */\n\nexport default class Wikipedia extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tapi_language,\n\t\t\tself = this;\n\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-wikipedia\", this._el.content);\n\t\t\n\t\t// Get Media ID\n\t\tthis.media_id\t = this.data.url.split(\"wiki\\/\")[1].split(\"#\")[0].replace(\"_\", \" \");\n\t\tthis.media_id\t = this.media_id.replace(\" \", \"%20\");\n\t\tapi_language\t = this.data.url.split(\"//\")[1].split(\".wikipedia\")[0];\n\n let callbackPrefix = 'wikipediaCallback_';\n let maxIDLength = 512 - callbackPrefix.length;\n let callbackName = callbackPrefix + this.media_id.replace(/[^0-9a-z]/gi, '').slice(0, maxIDLength);\n\t\tapi_url = `https://${api_language}.wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles=${this.media_id}&exintro=1&format=json&callback=${callbackName}`;\n let callbackScript = document.createElement('script');\n window[callbackName] = function(data) {\n self.createMedia(data);\n };\n callbackScript.src = api_url;\n document.body.appendChild(callbackScript);\n\t}\n\t\n\tcreateMedia(d) {\n\t\tvar wiki = \"\";\n\t\t\n\t\tif (d.query) {\n\t\t\tvar content,\n\t\t\t\twiki = {\n\t\t\t\t\tentry: {},\n\t\t\t\t\ttitle: \"\",\n\t\t\t\t\ttext: \"\",\n\t\t\t\t\textract: \"\",\n\t\t\t\t\tparagraphs: 1,\n\t\t\t\t\ttext_array: []\n\t\t\t\t};\n\t\t\t\n\t\t\twiki.entry\t\t = getObjectAttributeByIndex(d.query.pages, 0);\n\t\t\twiki.extract\t = wiki.entry.extract;\n\t\t\twiki.title\t\t = wiki.entry.title;\n\t\t\t\n\t\t\tif (wiki.extract.match(\"<p>\")) {\n\t\t\t\twiki.text_array = wiki.extract.split(\"<p>\");\n\t\t\t} else {\n\t\t\t\twiki.text_array.push(wiki.extract);\n\t\t\t}\n\t\t\t\n\t\t\tfor(var i = 0; i < wiki.text_array.length; i++) {\n\t\t\t\tif (i+1 <= wiki.paragraphs && i+1 < wiki.text_array.length) {\n\t\t\t\t\twiki.text\t+= \"<p>\" + wiki.text_array[i+1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcontent\t\t=\t\"<h4><a href='\" + this.data.url + \"' target='_blank'>\" + wiki.title + \"</a></h4>\";\n\t\t\tcontent\t\t+=\t\"<span class='wiki-source'>\" + Language.messages.wikipedia + \"</span>\";\n\t\t\tcontent\t\t+=\twiki.text;\n\t\t\t\n\t\t\tif (wiki.extract.match(\"REDIRECT\")) {\n\t\t\t\n\t\t\t} else {\n\t\t\t\t// Add to DOM\n\t\t\t\tthis._el.content_item.innerHTML\t= content;\n\t\t\t\t// After Loaded\n\t\t\t\tthis.onLoaded();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t}\n\t\n\tupdateMediaDisplay() {\n\t\t\n\t}\n\t\n\t_updateMediaDisplay() {\n\t\t\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\nimport { loadJS } from \"../../core/Load\"\n\n/*\tMedia.SoundCloud\n================================================== */\n\nvar soundCoudCreated = false;\n\n\nexport default class SoundCloud extends Media {\n\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe vco-media-soundcloud vco-media-shadow\", this._el.content);\n\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url;\n\n\t\t// API URL\n\t\tapi_url = \"https://soundcloud.com/oembed?url=\" + this.media_id + \"&format=json\";\n\n\t\t// API Call\n fetch(api_url).then(r => r.json().then(d => {\n\t\t loadJS(\"https://w.soundcloud.com/player/api.js\", function() {//load soundcloud api for pausing.\n\t\t\t\tself.createMedia(d);\n\t\t\t});\n }));\n\n\t}\n\n\tcreateMedia(d) {\n\t\tthis._el.content_item.innerHTML = d.html;\n\n\t\tthis.soundCloudCreated = true;\n\n \t\tself.widget = SC.Widget(this._el.content_item.querySelector(\"iframe\"));//create widget for api use\n\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\n\t}\n\n\t_stopMedia() {\n if (this.soundCloudCreated)\n {\n self.widget.pause();\n }\n\t}\n\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\nimport { ratio } from \"../../core/Util\"\n\n/*\tMedia.Vimeo\n================================================== */\n\nexport default class Vimeo extends Media {\n\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe vco-media-vimeo vco-media-shadow\", this._el.content);\n\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url.split(/video\\/|\\/\\/vimeo\\.com\\//)[1].split(/[?&]/)[0];\n\n\t\t// API URL\n\t\tapi_url = \"https://player.vimeo.com/video/\" + this.media_id + \"?api=1&title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff\";\n\n\t\tthis.player = Dom.create(\"iframe\", \"\", this._el.content_item);\n\t\tthis.player.width \t\t= \"100%\";\n\t\tthis.player.height \t\t= \"100%\";\n\t\tthis.player.frameBorder = \"0\";\n\t\tthis.player.src \t\t= api_url;\n\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = ratio.r16_9({w:this._el.content_item.offsetWidth}) + \"px\";\n\n\t}\n\n\t_stopMedia() {\n\n\t\ttry {\n\t\t\tthis.player.contentWindow.postMessage(JSON.stringify({method: \"pause\"}), \"https://player.vimeo.com\");\n\t\t}\n\t\tcatch(err) {\n\t\t\tconsole.log(err);\n\t\t}\n\n\t}\n\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\" \nimport { ratio } from \"../../core/Util\"\n\n/*\tMedia.DailyMotion\n================================================== */\n\nexport default class DailyMotion extends Media {\n\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe vco-media-dailymotion\", this._el.content);\n\n\t\t// Get Media ID\n\t\tif (this.data.url.match(\"video\")) {\n\t\t\tthis.media_id = this.data.url.split(\"video\\/\")[1].split(/[?&]/)[0];\n\t\t} else {\n\t\t\tthis.media_id = this.data.url.split(\"embed\\/\")[1].split(/[?&]/)[0];\n\t\t}\n\n\t\t// API URL\n\t\tapi_url = \"https://www.dailymotion.com/embed/video/\" + this.media_id+\"?api=postMessage\";\n\n\t\t// API Call\n\t\tthis._el.content_item.innerHTML = \"<iframe autostart='false' frameborder='0' width='100%' height='100%' src='\" + api_url + \"'></iframe>\"\n\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = ratio.r16_9({w:this._el.content_item.offsetWidth}) + \"px\";\n\t}\n\n\t_stopMedia() {\n\t\tthis._el.content_item.querySelector(\"iframe\").contentWindow.postMessage('{\"command\":\"pause\",\"parameters\":[]}', \"*\");\n\t}\n\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\nimport { ratio } from \"../../core/Util\"\n\n/*\tMedia.Vine\n\n================================================== */\n\nexport default class Vine extends Media {\n\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe vco-media-vine vco-media-shadow\", this._el.content);\n\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url.split(\"vine.co/v/\")[1];\n\n\t\t// API URL\n\t\tapi_url = \"https://vine.co/v/\" + this.media_id + \"/embed/simple\";\n\n\t\t// API Call\n\t\tthis._el.content_item.innerHTML = \"<iframe frameborder='0' width='100%' height='100%' src='\" + api_url + \"'></iframe><script async src='https://platform.vine.co/static/scripts/embed.js' charset='utf-8'></script>\"\n\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tvar size = ratio.square({w:this._el.content_item.offsetWidth , h:this.options.height});\n\t\tthis._el.content_item.style.height = size.h + \"px\";\n\t}\n\n\t \t_stopMedia() {\n\t \t\tthis._el.content_item.querySelector(\"iframe\").contentWindow.postMessage('pause', '*');\n\t}\n\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\n\n/*\tMedia.Twitter\n\tProduces Twitter Display\n================================================== */\n\nexport default class Twitter extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\t\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item = Dom.create(\"div\", \"vco-media-twitter\", this._el.content);\n\t\t\n\t\t// Get Media ID\n\n let r = /twitter.com\\/(.+?)\\/status\\/(\\d+)/\n let match = r.exec(this.data.url);\n if (match) { \n this.user_id = match[1];\n this.media_id = match[2];\n }\n let callbackName = `twitterCallback_${this.media_id}`;\n api_url = `https://api.twitter.com/1/statuses/oembed.json?id=${this.media_id}&include_entities=true&callback=${callbackName}`;\n let callbackScript = document.createElement('script');\n window[callbackName] = function(data) {\n self.createMedia(data);\n };\n callbackScript.src = api_url;\n document.body.appendChild(callbackScript);\n\t}\n\n\tcreateMedia(d) {\t\n\t\tvar tweet\t\t\t\t= \"\",\n\t\t\ttweet_text\t\t\t= \"\",\n\t\t\ttweetuser\t\t\t= \"\",\n\t\t\ttweet_status_temp \t= \"\",\n\t\t\ttweet_status_url \t= \"\",\n\t\t\ttweet_status_date \t= \"\";\n\t\t\t\n\t\t//\tTWEET CONTENT\n\t\ttweet_text \t\t\t= d.html.split(\"<\\/p>\\&mdash;\")[0] + \"</p></blockquote>\";\n\t\ttweetuser\t\t\t= d.author_url.split(\"twitter.com\\/\")[1];\n\t\ttweet_status_temp \t= d.html.split(\"<\\/p>\\&mdash;\")[1].split(\"<a href=\\\"\")[1];\n\t\ttweet_status_url \t= tweet_status_temp.split(\"\\\"\\>\")[0];\n\t\ttweet_status_date \t= tweet_status_temp.split(\"\\\"\\>\")[1].split(\"<\\/a>\")[0];\n\t\t\n\t\t// Open links in new window\n\t\ttweet_text = tweet_text.replace(/<a href/ig, '<a target=\"_blank\" href');\n\t\t\n\t\t// \tTWEET CONTENT\n\t\ttweet += tweet_text;\n\t\t\n\t\t//\tTWEET AUTHOR\n\t\ttweet += \"<div class='vcard'>\";\n\t\ttweet += \"<a href='\" + tweet_status_url + \"' class='twitter-date' target='_blank'>\" + tweet_status_date + \"</a>\";\n\t\ttweet += \"<div class='author'>\";\n\t\ttweet += \"<a class='screen-name url' href='\" + d.author_url + \"' target='_blank'>\";\n\t\ttweet += \"<span class='avatar'></span>\";\n\t\ttweet += \"<span class='fn'>\" + d.author_name + \" <span class='vco-icon-twitter'></span></span>\";\n\t\ttweet += \"<span class='nickname'>@\" + tweetuser + \"<span class='thumbnail-inline'></span></span>\";\n\t\ttweet += \"</a>\";\n\t\ttweet += \"</div>\";\n\t\ttweet += \"</div>\";\n\t\t\n\t\t\n\t\t// Add to DOM\n\t\tthis._el.content_item.innerHTML\t= tweet;\n\t\t\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t\t\t\n\t}\n\t\n\tupdateMediaDisplay() {\n\t\t\n\t}\n\t\n\t_updateMediaDisplay() {\n\t\t\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\" \n\n/*\tMedia.Flickr\n\n================================================== */\n\nexport default class Flickr extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"img\", \"vco-media-item vco-media-image vco-media-flickr vco-media-shadow\", this._el.content);\n\t\t\n\t\t// Media Loaded Event\n\t\tthis._el.content_item.addEventListener('load', function(e) {\n\t\t\tself.onMediaLoaded();\n\t\t});\n\t\t\n\t\t// Get Media ID\n\t\tthis.establishMediaID();\n\t\t\n\t\tapi_url = \"https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=\" + this.options.api_key_flickr + \"&photo_id=\" + this.media_id + \"&format=json&nojsoncallback=1\";\n\t\t\n fetch(api_url).then(r => r.json().then(d => {\n if (d.stat == \"ok\") {\n self.createMedia(d);\n } else {\n\t\t\t\tself.loadErrorDisplay(\"Photo not found or private.\");\n }\n }));\n\t\t\n\t}\n\n\testablishMediaID() {\n\t\tvar marker = 'flickr.com/photos/';\n\t\tvar idx = this.data.url.indexOf(marker);\n\t\tif (idx == -1) { throw \"Invalid Flickr URL\"; }\n\t\tvar pos = idx + marker.length;\n\t\tthis.media_id = this.data.url.substr(pos).split(\"/\")[1];\n\t}\n\t\n\tcreateMedia(d) {\n\t\tvar best_size \t= this.sizes(this.options.height),\n\t\t\tsize \t\t= d.sizes.size[d.sizes.size.length - 2].source;\n\t\t\n\t\tfor(var i = 0; i < d.sizes.size.length; i++) {\n\t\t\tif (d.sizes.size[i].label == best_size) {\n\t\t\t\tsize = d.sizes.size[i].source;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set Image Source\n\t\tthis._el.content_item.src\t\t\t= size;\n\t\t\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\t\n\tsizes(s) {\n\t\tvar _size = \"\";\n\t\t\n\t\tif (s <= 75) {\n\t\t\tif (s <= 0) {\n\t\t\t\t_size = \"Large\";\n\t\t\t} else {\n\t\t\t\t_size = \"Thumbnail\";\n\t\t\t}\n\t\t} else if (s <= 180) {\n\t\t\t_size = \"Small\";\n\t\t} else if (s <= 240) {\n\t\t\t_size = \"Small 320\";\n\t\t} else if (s <= 375) {\n\t\t\t_size = \"Medium\";\n\t\t} else if (s <= 480) {\n\t\t\t_size = \"Medium 640\";\n\t\t} else if (s <= 600) {\n\t\t\t_size = \"Large\";\n\t\t} else {\n\t\t\t_size = \"Large\";\n\t\t}\n\t\t\n\t\treturn _size;\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\" \n\n/*\tMedia.GoogleDoc\n\n================================================== */\n\nexport default class GoogleDoc extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tvar api_url,\n\t\t\tself = this;\n\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe\", this._el.content);\n\t\t\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url;\n\t\t\n\t\t// API URL\n\t\tapi_url = this.media_id;\n\t\t\n\t\t// API Call\n\t\tif (this.media_id.match(/docs.google.com/i)) {\n\t\t\tthis._el.content_item.innerHTML\t=\t\"<iframe class='doc' frameborder='0' width='100%' height='100%' src='\" + this.media_id + \"&amp;embedded=true'></iframe>\";\n\t\t} else {\n\t\t\tthis._el.content_item.innerHTML\t=\t\"<iframe class='doc' frameborder='0' width='100%' height='100%' src='\" + \"http://docs.google.com/viewer?url=\" + this.media_id + \"&amp;embedded=true'></iframe>\";\n\t\t}\n\t\t\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\t\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = this.options.height + \"px\";\n\t}\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\n\n/*\tMedia.SLider\n\tProduces a Slider\n\tTakes a data object and populates a dom object\n\tTODO\n\tPlaceholder\n================================================== */\n\nexport default class Slider extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\t\n\t\tthis._el.content_item\t\t\t\t= Dom.create(\"img\", \"vco-media-item vco-media-image\", this._el.content);\n\t\tthis._el.content_item.src\t\t\t= this.data.url;\n\t\t\n\t\tthis.onLoaded();\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\" \n\n/*\tMedia.IFrame\n================================================== */\n\nexport default class IFrame extends Media {\n\t\n\t/*\tLoad the media\n\t================================================== */\n\t_loadMedia() {\n\t\tself = this;\n\t\t\n\t\t// Loading Message\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\t\n\t\t// Create Dom element\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe\", this._el.content);\n\t\t\n\t\t// Get Media ID\n\t\tthis.media_id = this.data.url;\n\t\t\n\t\t// API URL\n\t\tlet iframe = this.media_id;\n\n\t\t// API Call\n\t\tthis._el.content_item.innerHTML = iframe;\n\t\t\n\t\t// After Loaded\n\t\tthis.onLoaded();\n\t}\n\t\n\t// Update Media Display\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = this.options.height + \"px\";\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\nimport { Language } from \"../../language/Language\"\n\n/*\tMedia.Website\n================================================== */\n\nexport default class Website extends Media {\n\t\n\t_loadMedia() {\n\t\tthis.message.updateMessage(Language.messages.loading + \" \" + this.options.media_name);\n\t\tthis._el.content_item\t= Dom.create(\"div\", \"vco-media-item vco-media-iframe\", this._el.content);\n\t\tthis.media_id = this.data.url;\n\t\tlet iframe = `<iframe src=\"${this.media_id}\" />`;\n\t\tthis._el.content_item.innerHTML = iframe;\n\t\tthis.onLoaded();\n\t}\n\t\n\t_updateMediaDisplay() {\n\t\tthis._el.content_item.style.height = this.options.height + \"px\";\n\t}\n\t\n}\n","import { Media } from \"../Media\"\nimport Dom from \"../../dom/Dom\"\n\nexport default class Video extends Media {\n\t_loadMedia() {\n\t\tvar self = this;\n\n\t\tthis._el.content_item\t\t\t\t= Dom.create(\"video\", \"vco-media-item vco-media-shadow\", this._el.content);\n\n\t\t// Media Loaded Event\n\t\tthis._el.content_item.addEventListener('load', function(e) {\n\t\t\tself.onMediaLoaded();\n\t\t});\n\n\t\tthis._el.content_item.src\t\t\t= this.data.url;\n\n\t\tthis._el.content_item.setAttribute('controls', '');\n\n\t\tthis.onLoaded();\n\t}\n}\n","import Image from \"./types/Image\"\nimport YouTube from \"./types/YouTube\"\nimport Blockquote from \"./types/Blockquote\"\nimport Wikipedia from \"./types/Wikipedia\"\nimport SoundCloud from \"./types/SoundCloud\"\nimport Vimeo from \"./types/Vimeo\"\nimport DailyMotion from \"./types/DailyMotion\"\nimport Vine from \"./types/Vine\"\nimport Twitter from \"./types/Twitter\"\nimport Flickr from \"./types/Flickr\"\nimport GoogleDoc from \"./types/GoogleDoc\"\nimport Slider from \"./types/Slider\"\nimport IFrame from \"./types/IFrame\"\nimport Website from \"./types/Website\"\nimport { Media } from \"./Media\"\nimport Video from \"./types/Video\"\n\n\n/*\tMediaType\n\tDetermines the type of media the url string is.\n\treturns an object with .type and .id\n\tYou can add new media types by adding a regex \n\tto match and the media class name to use to \n\trender the media \n\n\tTODO\n\tAllow array so a slideshow can be a mediatype\n================================================== */\nexport default function MediaType(m) {\n\tvar media = {}, \n\t\tmedia_types = \t[\n\t\t\t{\n\t\t\t\ttype: \t\t\"youtube\",\n\t\t\t\tname: \t\t\"YouTube\", \n\t\t\t\tmatch_str: \t\"(www.)?youtube|youtu\\.be\",\n\t\t\t\tcls: \t\tYouTube\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"vimeo\",\n\t\t\t\tname: \t\t\"Vimeo\", \n\t\t\t\tmatch_str: \t\"(player.)?vimeo\\.com\",\n\t\t\t\tcls: \t\tVimeo\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"dailymotion\",\n\t\t\t\tname: \t\t\"DailyMotion\", \n\t\t\t\tmatch_str: \t\"(www.)?dailymotion\\.com\",\n\t\t\t\tcls: \t\tDailyMotion\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"vine\",\n\t\t\t\tname: \t\t\"Vine\", \n\t\t\t\tmatch_str: \t\"(www.)?vine\\.co\",\n\t\t\t\tcls: \t\tVine\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"soundcloud\",\n\t\t\t\tname: \t\t\"SoundCloud\", \n\t\t\t\tmatch_str: \t\"(player.)?soundcloud\\.com\",\n\t\t\t\tcls: \t\tSoundCloud\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"twitter\",\n\t\t\t\tname: \t\t\"Twitter\", \n\t\t\t\tmatch_str: \t\"(www.)?twitter\\.com\",\n\t\t\t\tcls: \t\tTwitter\n\t\t\t},\n\t\t\t//{\n\t\t //\t\ttype: \t\t\"googlemaps\",\n\t\t //\t\tname: \t\t\"Google Map\", \n\t\t //\t\tmatch_str: \t\"maps.google\",\n\t\t\t//\tcls: \t\tVCO.Media.Map\n\t\t\t//},\n\t\t\t{\n\t\t\t\ttype: \t\t\"flickr\",\n\t\t\t\tname: \t\t\"Flickr\", \n\t\t\t\tmatch_str: \t\"flickr.com/photos\",\n\t\t\t\tcls: \t\tFlickr\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"image\",\n\t\t\t\tname: \t\t\"Image\",\n\t\t\t\tmatch_str: \t/jpg|jpeg|png|gif/i,\n\t\t\t\tcls: \t\tImage\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"video\",\n\t\t\t\tname: \t\t\"Video\",\n\t\t\t\tmatch_str: \t/mp4/i,\n\t\t\t\tcls: \t\tVideo\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"googledocs\",\n\t\t\t\tname: \t\t\"Google Doc\",\n match_str: \"^(https?:)?\\/*[^.]*.google.com\\/[^\\/]*\\/d\\/[^\\/]*\\/[^\\/]*\\?usp=sharing|^(https?:)?\\/*drive.google.com\\/open\\?id=[^\\&]*\\&authuser=0|^(https?:)?\\/\\/*drive.google.com\\/open\\\\?id=[^\\&]*|^(https?:)?\\/*[^.]*.googledrive.com\\/host\\/[^\\/]*\\/\",\n\t\t\t\tcls: \t\tGoogleDoc\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"wikipedia\",\n\t\t\t\tname: \t\t\"Wikipedia\",\n\t\t\t\tmatch_str: \t\"(www.)?wikipedia\\.org\",\n\t\t\t\tcls: \t\tWikipedia\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"iframe\",\n\t\t\t\tname: \t\t\"iFrame\",\n\t\t\t\tmatch_str: \t\"iframe\",\n\t\t\t\tcls: \t\tIFrame\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"blockquote\",\n\t\t\t\tname: \t\t\"Quote\",\n\t\t\t\tmatch_str: \t\"blockquote\",\n\t\t\t\tcls: \t\tBlockquote\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"website\",\n\t\t\t\tname: \t\t\"Website\",\n\t\t\t\tmatch_str: \t\"https?://\",\n\t\t\t\tcls: \t\tWebsite\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \t\t\"\",\n\t\t\t\tname: \t\t\"\",\n\t\t\t\tmatch_str: \t\"\",\n\t\t\t\tcls: \t\tMedia\n\t\t\t}\n\t\t];\n\t\n\tfor (var i = 0; i < media_types.length; i++) {\n\t\tif (m instanceof Array) {\n\t\t\treturn media = {\n\t\t\t\ttype: \t\t\"slider\",\n\t\t\t\tcls: \t\tSlider\n\t\t\t};\n\t\t} else if (m.url.match(media_types[i].match_str)) {\n\t\t\tmedia \t\t= media_types[i];\n\t\t\tmedia.url \t= m.url;\n\t\t\treturn media;\n\t\t\tbreak;\n\t\t}\n\t};\n\t\n\treturn false;\n\t\n}\n","import { classMixin, mergeData, setData, htmlify, convertUnixTime } from \"../../core/Util\"\nimport Events from \"../../core/Events\"\nimport Dom from \"../../dom/Dom\"\n\nexport default class Text {\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options, add_to_container) {\n\t// DOM ELEMENTS\n\tthis._el = {\n\t\tcontainer: {},\n\t\tcontent_container: {},\n\t\tcontent: {},\n\t\theadline: {},\n\t\tdate: {},\n\t\tstart_btn: {}\n\t}\n\t\n\t// Data\n\tthis.data = {\n\t\tuniqueid: \t\t\t\"\",\n\t\theadline: \t\t\t\"headline\",\n\t\ttext: \t\t\t\t\"text\"\n\t}\n\t\n\t// Options\n\tthis.options = {\n\t\ttitle: \t\t\tfalse\n\t}\n\t\n\t\t\n\t\tsetData(this, data);\n\t\t\n\t\t// Merge Options\n\t\tmergeData(this.options, options);\n\t\t\n\t\tthis._el.container = Dom.create(\"div\", \"vco-text\");\n\t\tthis._el.container.id = this.data.uniqueid;\n\t\t\n\t\tthis._initLayout();\n\t\t\n\t\tif (add_to_container) {\n\t\t\tadd_to_container.appendChild(this._el.container);\n\t\t};\n\t\t\n\t}\n\t\n\t/*\tAdding, Hiding, Showing etc\n\t================================================== */\n\tshow() {\n\t\t\n\t}\n\t\n\thide() {\n\t\t\n\t}\n\t\n\taddTo(container) {\n\t\tcontainer.appendChild(this._el.container);\n\t\t//this.onAdd();\n\t}\n\t\n\tremoveFrom(container) {\n\t\tcontainer.removeChild(this._el.container);\n\t}\n\t\n\theadlineHeight() {\n\t\treturn this._el.headline.offsetHeight + 40;\n\t}\n\t\n\taddDateText(str) {\n\t\tthis._el.date.innerHTML = str;\n\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\tonLoaded() {\n\t\tthis.fire(\"loaded\", this.data);\n\t}\n\n\tonAdd() {\n\t\tthis.fire(\"added\", this.data);\n\t}\n\n\tonRemove() {\n\t\tthis.fire(\"removed\", this.data);\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\t\t\n\t\t// Create Layout\n\t\tthis._el.content_container\t\t\t= Dom.create(\"div\", \"vco-text-content-container\", this._el.container);\n\t\t\n\t\t// Date\n\t\tthis._el.date \t\t\t\t= Dom.create(\"h3\", \"vco-headline-date\", this._el.content_container);\n\t\t\n\t\t// Headline\n\t\tif (this.data.headline != \"\") {\n\t\t\tvar headline_class = \"vco-headline\";\n\t\t\tif (this.options.title) {\n\t\t\t\theadline_class = \"vco-headline vco-headline-title\";\n\t\t\t}\n\t\t\tthis._el.headline\t\t\t\t= Dom.create(\"h2\", headline_class, this._el.content_container);\n\t\t\tthis._el.headline.innerHTML\t\t= this.data.headline;\n\t\t}\n\t\t\n\t\t// Text\n\t\tif (this.data.text != \"\") {\n\t\t\tvar text_content = \"\";\n\t\t\t\n\t\t\ttext_content \t\t\t\t\t+= htmlify(this.data.text);\n\t\t\t\n\t\t\t// Date\n\t\t\tif (this.data.date && this.data.date.created_time && this.data.date.created_time != \"\") {\n\t\t\t\tif (this.data.date.created_time.length > 10) {\n\t\t\t\t\tif (typeof(moment) !== 'undefined') {\n\t\t\t\t\t\ttext_content \t+= \"<div class='vco-text-date'>\" + moment(this.data.date.created_time, 'YYYY-MM-DD h:mm:ss').fromNow() + \"</div>\";\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext_content \t+= \"<div class='vco-text-date'>\" + convertUnixTime(this.data.date.created_time) + \"</div>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tthis._el.content\t\t\t\t= Dom.create(\"div\", \"vco-text-content\", this._el.content_container);\n\t\t\tthis._el.content.innerHTML\t\t= text_content;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// Fire event that the slide is loaded\n\t\tthis.onLoaded();\n\t\t\n\t\t\n\t\t\n\t}\n\t\n}\n\nclassMixin(Text, Events)\n","import { classMixin, mergeData } from \"../core/Util\"\nimport { DomEvent } from \"../dom/DomEvent\"\nimport Events from \"../core/Events\"\nimport Dom from \"../dom/Dom\"\nimport DomMixins from \"../dom/DomMixins\"\nimport Ease from \"../animation/Ease\"\nimport Animate from \"../animation/Animate\"\nimport Media from \"../media/Media\"\nimport MediaType from \"../media/MediaType\"\nimport Text from \"../media/types/Text\"\nimport { Browser } from \"../core/Browser\"\n/*\tVCO.Slide\n\tCreates a slide. Takes a data object and\n\tpopulates the slide with content.\n================================================== */\n\nexport default class Slide {\n\t\n\t//includes: [VCO.Events, VCO.DomMixins],\n\t\n\t//_el: {},\n\t\n\t/*\tConstructor\n\t================================================== */\n\tconstructor(data, options, title_slide) {\n\t\t\n\t\t// DOM Elements\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tscroll_container: {},\n\t\t\tbackground: {},\n\t\t\tcontent_container: {},\n\t\t\tcontent: {},\n\t\t\tcall_to_action: null\n\t\t};\n\t\n\t\t// Components\n\t\tthis._media \t\t= null;\n\t\tthis._mediaclass\t= {};\n\t\tthis._text\t\t\t= {};\n\t\n\t\t// State\n\t\tthis._state = {\n\t\t\tloaded: \t\tfalse\n\t\t};\n\t\t\n\t\tthis.has = {\n\t\t\theadline: \tfalse,\n\t\t\ttext: \t\tfalse,\n\t\t\tmedia: \t\tfalse,\n\t\t\ttitle: \t\tfalse,\n\t\t\tbackground: {\n\t\t\t\timage: false,\n\t\t\t\tcolor: false,\n\t\t\t\tcolor_value :\"\"\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.has.title = title_slide;\n\t\t\n\t\tthis.title = \"\";\n\t\t\n\t\t// Data\n\t\tthis.data = {\n\t\t\tuniqueid: \t\t\t\tnull,\n\t\t\tbackground: \t\t\tnull,\n\t\t\tdate: \t\t\t\t\tnull,\n\t\t\tlocation: \t\t\t\tnull,\n\t\t\ttext: \t\t\t\t\tnull,\n\t\t\tmedia: \t\t\t\t\tnull\n\t\t};\n\t\n\t\t// Options\n\t\tthis.options = {\n\t\t\t// animation\n\t\t\tduration: \t\t\t1000,\n\t\t\tslide_padding_lr: \t40,\n\t\t\tease: \t\t\t\tEase.easeInSpline,\n\t\t\twidth: \t\t\t\t600,\n\t\t\theight: \t\t\t600,\n\t\t\tskinny_size: \t\t650,\n\t\t\tmedia_name: \t\t\"\"\n\t\t};\n\t\t\n\t\t// Actively Displaying\n\t\tthis.active = false;\n\t\t\n\t\t// Animation Object\n\t\tthis.animator = {};\n\t\t\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\t\t\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t\t\n\t}\n\t\n\t/*\tAdding, Hiding, Showing etc\n\t================================================== */\n\tshow() {\n\t\tthis.animator = Animate(this._el.slider_container, {\n\t\t\tleft: \t\t-(this._el.container.offsetWidth * n) + \"px\",\n\t\t\tduration: \tthis.options.duration,\n\t\t\teasing: \tthis.options.ease\n\t\t});\n\t}\n\t\n\thide() {\n\t\t\n\t}\n\t\n\tsetActive(is_active) {\n\t\tthis.active = is_active;\n\t\t\n\t\tif (this.active) {\n\t\t\tif (this.data.background) {\n\t\t\t\tthis.fire(\"background_change\", this.has.background);\n\t\t\t}\n\t\t\tthis.loadMedia();\n\t\t} else {\n\t\t\tthis.stopMedia();\n\t\t}\n\t}\n\t\n\taddTo(container) {\n\t\tcontainer.appendChild(this._el.container);\n\t\t//this.onAdd();\n\t}\n\t\n\tremoveFrom(container) {\n\t\tcontainer.removeChild(this._el.container);\n\t}\n\t\n\tupdateDisplay(w, h, l) {\n\t\tthis._updateDisplay(w, h, l);\n\t}\n\t\n\tloadMedia() {\n\t\t\n\t\tif (this._media && !this._state.loaded) {\n\t\t\tthis._media.loadMedia();\n\t\t\tthis._state.loaded = true;\n\t\t}\n\t}\n\t\n\tstopMedia() {\n\t\tif (this._media && this._state.loaded) {\n try {\n\t\t\t this._media.stopMedia();\n } catch(e) {\n // Some sort of race condition or other ordering condition can cause\n // an error when the preview tab is selected in the editor due to\n // the stopped media not being properly formed.\n if (e.message == 'this._el.content_item.querySelector is not a function') {\n console.log('Ignoring error in editor context: ' + e.message);\n } else {\n throw e;\n } \n }\n\t\t}\n\t}\n\t\n\tgetBackground() {\n\t\treturn this.has.background;\n\t}\n\t\n\tscrollToTop() {\n\t\tthis._el.container.scrollTop = 0;\n\t}\n\t\n\taddCallToAction(str) {\n\t\tthis._el.call_to_action = Dom.create(\"div\", \"vco-slide-calltoaction\", this._el.content_container);\n\t\tthis._el.call_to_action.innerHTML = \"<span class='vco-slide-calltoaction-button-text'>\" + str + \"</span>\";\n\t\tDomEvent.addListener(this._el.call_to_action, 'click', this._onCallToAction, this);\n\t}\n\t\n\t/*\tEvents\n\t================================================== */\n\t_onCallToAction(e) {\n\t\tthis.fire(\"call_to_action\", e);\n\t}\n\t\n\t/*\tPrivate Methods\n\t================================================== */\n\t_initLayout() {\n\t\t\n\t\t// Create Layout\n\t\tthis._el.container \t\t\t\t= Dom.create(\"div\", \"vco-slide\");\n\t\tif (this.data.uniqueid) {\n\t\t\tthis._el.container.id \t\t= this.data.uniqueid;\n\t\t}\n\t\tthis._el.scroll_container \t\t= Dom.create(\"div\", \"vco-slide-scrollable-container\", this._el.container);\n\t\tthis._el.content_container\t\t= Dom.create(\"div\", \"vco-slide-content-container\", this._el.scroll_container);\n\t\tthis._el.content\t\t\t\t= Dom.create(\"div\", \"vco-slide-content\", this._el.content_container);\n\t\tthis._el.background\t\t\t\t= Dom.create(\"div\", \"vco-slide-background\", this._el.container);\n\t\t// Style Slide Background\n\t\tif (this.data.background) {\n\t\t\tif (this.data.background.url) {\n\t\t\t\tthis.has.background.image \t\t\t\t\t= true;\n\t\t\t\tthis._el.container.className \t\t\t\t+= ' vco-full-image-background';\n\t\t\t\t//this._el.container.style.backgroundImage=\"url('\" + this.data.background.url + \"')\";\n\t\t\t\tthis.has.background.color_value \t\t\t= \"#000\";\n\t\t\t\tthis._el.background.style.backgroundImage \t= \"url('\" + this.data.background.url + \"')\";\n\t\t\t\tthis._el.background.style.display \t\t\t= \"block\";\n\t\t\t}\n\t\t\tif (this.data.background.color) {\n\t\t\t\tthis.has.background.color \t\t\t\t\t= true;\n\t\t\t\tthis._el.container.className \t\t\t\t+= ' vco-full-color-background';\n\t\t\t\tthis.has.background.color_value \t\t\t= this.data.background.color;\n\t\t\t\t//this._el.container.style.backgroundColor = this.data.background.color;\n\t\t\t\t//this._el.background.style.backgroundColor \t= this.data.background.color;\n\t\t\t\t//this._el.background.style.display \t\t\t= \"block\";\n\t\t\t}\n\t\t\tif (this.data.background.text_background) {\n\t\t\t\tthis._el.container.className \t\t\t\t+= ' vco-text-background';\n\t\t\t}\n\t\t\t\n\t\t} \n\t\t\n\t\t// Determine Assets for layout and loading\n\t\tif (this.data.media && this.data.media.url && this.data.media.url != \"\") {\n\t\t\tthis.has.media = true;\n\t\t}\n\t\tif (this.data.text && this.data.text.text) {\n\t\t\tthis.has.text = true;\n\t\t}\n\t\tif (this.data.text && this.data.text.headline) {\n\t\t\tthis.has.headline = true;\n\t\t\tthis.title = this.data.text.headline;\n\t\t}\n\t\t\n\t\t// Create Media\n\t\tif (this.has.media) {\n\t\t\t\n\t\t\t// Determine the media type\n\t\t\tthis.data.media.mediatype \t= MediaType(this.data.media);\n\t\t\tthis.options.media_name \t= this.data.media.mediatype.name;\n\t\t\tthis.options.media_type \t= this.data.media.mediatype.type;\n\t\t\t\n\t\t\t// Create a media object using the matched class name\n\t\t\tthis._media = new this.data.media.mediatype.cls(this.data.media, this.options);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Create Text\n\t\tif (this.has.text || this.has.headline) {\n\t\t\tthis._text = new Text(this.data.text, {title:this.has.title});\n\t\t}\n\t\t\n\t\t// Add to DOM\n\t\tif (!this.has.text && !this.has.headline && this.has.media) {\n\t\t\tthis._el.container.className += ' vco-slide-media-only';\n\t\t\tthis._media.addTo(this._el.content);\n\t\t} else if (this.has.headline && this.has.media && !this.has.text) {\n\t\t\tthis._el.container.className += ' vco-slide-media-only';\n\t\t\tthis._text.addTo(this._el.content);\n\t\t\tthis._media.addTo(this._el.content);\n\t\t} else if (this.has.text && this.has.media) {\n\t\t\tthis._media.addTo(this._el.content);\n\t\t\tthis._text.addTo(this._el.content);\n\t\t} else if (this.has.text || this.has.headline) {\n\t\t\tthis._el.container.className += ' vco-slide-text-only';\n\t\t\tthis._text.addTo(this._el.content);\n\t\t}\n\t\t\n\t\t// Fire event that the slide is loaded\n\t\tthis.onLoaded();\n\t\t\n\t}\n\t\n\t_initEvents() {\n\t}\n\t\n\t// Update Display\n\t_updateDisplay(width, height, layout) {\n\t\tvar pad_left, pad_right, new_width;\n\t\t\n\t\tif (width) {\n\t\t\tthis.options.width \t\t\t\t\t= width;\n\t\t} else {\n\t\t\tthis.options.width \t\t\t\t\t= this._el.container.offsetWidth;\n\t\t}\n\t\t\n\t\tif(Browser.mobile && (this.options.width <= this.options.skinny_size)) {\n\t\t\tpad_left \t= 0 + \"px\";\n\t\t\tpad_right \t= 0 + \"px\";\n\t\t\tnew_width\t= this.options.width - 0 + \"px\";\n\t\t} else if (layout == \"landscape\") {\n\t\t\tpad_left \t= 40 + \"px\";\n\t\t\tpad_right\t= 75 + \"px\";\n\t\t\tnew_width\t= this.options.width - (75 + 40) + \"px\";\n\t\t\n\t\t} else if (this.options.width <= this.options.skinny_size) {\n\t\t\tpad_left \t= this.options.slide_padding_lr + \"px\";\n\t\t\tpad_right \t= this.options.slide_padding_lr + \"px\";\n\t\t\tnew_width\t= this.options.width - (this.options.slide_padding_lr * 2) + \"px\";\n\t\t} else {\n\t\t\tpad_left\t= this.options.slide_padding_lr + \"px\";\n\t\t\tpad_right \t= this.options.slide_padding_lr + \"px\";\n\t\t\tnew_width\t= this.options.width - (this.options.slide_padding_lr * 2) + \"px\";\n\t\t}\n\t\t\n\t\tthis._el.content.style.paddingLeft \t= pad_left;\n\t\tthis._el.content.style.paddingRight = pad_right;\n\t\tthis._el.content.style.width\t\t= new_width;\n\t\t\n\t\tif (this._el.call_to_action) {\n\t\t\tthis._el.call_to_action.style.paddingLeft \t= pad_left;\n\t\t\tthis._el.call_to_action.style.paddingRight = pad_right;\n\t\t\tthis._el.call_to_action.style.width\t\t= new_width;\n\t\t}\n\t\t\n\t\tif (height) {\n\t\t\tthis.options.height = height;\n\t\t\t//this._el.scroll_container.style.height\t\t= this.options.height + \"px\";\n\t\t\t\n\t\t} else {\n\t\t\tthis.options.height = this._el.container.offsetHeight;\n\t\t}\n\t\t\n\t\tif (this._media) {\n\t\t\tif (!this.has.text && this.has.headline) {\n\t\t\t\tthis._media.updateDisplay(this.options.width, (this.options.height - this._text.headlineHeight()), layout);\n\t\t\t} else {\n\t\t\t\tthis._media.updateDisplay(this.options.width, this.options.height, layout);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}\n\nclassMixin(Slide, Events, DomMixins)\n","import Animate from \"../animation/Animate\"\nimport Events from \"../core/Events\"\nimport Ease from \"../animation/Ease\"\nimport { Browser } from \"../core/Browser\"\nimport { classMixin, mergeData } from \"../core/Util\"\nimport { DomEvent } from \"../dom/DomEvent\"\n\n/* Swipable\n Draggable allows you to add dragging capabilities to any element. Supports mobile devices too.\n TODO Enable constraints\n================================================== */\n\nexport default class Swipable {\n \n //_el: {},\n\n constructor(drag_elem, move_elem, options) {\n this.mousedrag = {\n down: \"mousedown\",\n up: \"mouseup\",\n leave: \"mouseleave\",\n move: \"mousemove\"\n }\n this.touchdrag = {\n down: \"touchstart\",\n up: \"touchend\",\n leave: \"mouseleave\",\n move: \"touchmove\"\n }\n // DOM ELements \n this._el = {\n drag: drag_elem,\n move: drag_elem\n };\n if (move_elem) {\n this._el.move = move_elem;\n }\n //Options\n this.options = {\n snap: false,\n enable: {\n x: true,\n y: true\n },\n constraint: {\n top: false,\n bottom: false,\n left: 0,\n right: false\n },\n momentum_multiplier: 2000,\n duration: 1000,\n ease: Ease.easeInOutQuint\n };\n // Animation Object\n this.animator = null;\n // Drag Event Type\n this.dragevent = this.mousedrag;\n if (Browser.touch) {\n this.dragevent = this.touchdrag;\n }\n // Draggable Data\n this.data = {\n sliding: false,\n direction: \"none\",\n pagex: {\n start: 0,\n end: 0\n },\n pagey: {\n start: 0,\n end: 0\n },\n pos: {\n start: {\n x: 0,\n y: 0\n },\n end: {\n x: 0,\n y: 0\n }\n },\n new_pos: {\n x: 0,\n y: 0\n },\n new_pos_parent: {\n x: 0,\n y: 0\n },\n time: {\n start: 0,\n end: 0\n },\n touch: false\n };\n // Merge Data and Options\n mergeData(this.options, options);\n }\n \n enable(e) {\n DomEvent.addListener(this._el.drag, this.dragevent.down, this._onDragStart, this);\n DomEvent.addListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);\n this.data.pos.start = 0; //VCO.Dom.getPosition(this._el.move);\n this._el.move.style.left = this.data.pos.start.x + \"px\";\n this._el.move.style.top = this.data.pos.start.y + \"px\";\n this._el.move.style.position = \"absolute\";\n //this._el.move.style.zIndex = \"11\";\n //this._el.move.style.cursor = \"move\";\n }\n \n disable() {\n DomEvent.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this);\n DomEvent.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);\n }\n \n stopMomentum() {\n if (this.animator) {\n this.animator.stop();\n }\n }\n \n updateConstraint(c) {\n this.options.constraint = c;\n // Temporary until issues are fixed\n }\n \n /* Private Methods\n ================================================== */\n _onDragStart(e) {\n if (this.animator) {\n this.animator.stop();\n }\n if (Browser.touch) {\n if (e.originalEvent) {\n this.data.pagex.start = e.originalEvent.touches[0].screenX;\n this.data.pagey.start = e.originalEvent.touches[0].screenY;\n } else {\n this.data.pagex.start = e.targetTouches[0].screenX;\n this.data.pagey.start = e.targetTouches[0].screenY;\n }\n } else {\n this.data.pagex.start = e.pageX;\n this.data.pagey.start = e.pageY;\n }\n // Center element to finger or mouse\n if (this.options.enable.x) {\n //this._el.move.style.left = this.data.pagex.start - (this._el.move.offsetWidth / 2) + \"px\";\n }\n if (this.options.enable.y) {\n //this._el.move.style.top = this.data.pagey.start - (this._el.move.offsetHeight / 2) + \"px\";\n }\n this.data.pos.start = {x:this._el.move.offsetLeft, y:this._el.move.offsetTop};\n this.data.time.start = new Date().getTime();\n this.fire(\"dragstart\", this.data);\n DomEvent.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this);\n DomEvent.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);\n }\n \n _onDragEnd(e) {\n this.data.sliding = false;\n DomEvent.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this);\n DomEvent.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);\n this.fire(\"dragend\", this.data);\n this._momentum();\n }\n \n _onDragMove(e) {\n var change = {\n x:0,\n y:0\n }\n //e.preventDefault();\n this.data.sliding = true;\n if (Browser.touch) {\n if (e.originalEvent) {\n this.data.pagex.end = e.originalEvent.touches[0].screenX;\n this.data.pagey.end = e.originalEvent.touches[0].screenY;\n } else {\n this.data.pagex.end = e.targetTouches[0].screenX;\n this.data.pagey.end = e.targetTouches[0].screenY;\n }\n } else {\n this.data.pagex.end = e.pageX;\n this.data.pagey.end = e.pageY;\n }\n change.x = this.data.pagex.start - this.data.pagex.end;\n change.y = this.data.pagey.start - this.data.pagey.end;\n this.data.pos.end = {x:this._el.drag.offsetLeft, y:this._el.drag.offsetTop};\n this.data.new_pos.x = -(change.x - this.data.pos.start.x);\n this.data.new_pos.y = -(change.y - this.data.pos.start.y );\n if (this.options.enable.x && ( Math.abs(change.x) > Math.abs(change.y) ) ) {\n e.preventDefault();\n this._el.move.style.left = this.data.new_pos.x + \"px\";\n }\n if (this.options.enable.y && ( Math.abs(change.y) > Math.abs(change.y) ) ) {\n e.preventDefault();\n this._el.move.style.top = this.data.new_pos.y + \"px\";\n }\n this.fire(\"dragmove\", this.data);\n }\n \n _momentum() {\n var pos_adjust = {\n x: 0,\n y: 0,\n time: 0\n },\n pos_change = {\n x: 0,\n y: 0,\n time: 0\n },\n swipe_detect = {\n x: false,\n y: false\n },\n swipe = false,\n swipe_direction = \"\";\n this.data.direction = null;\n pos_adjust.time = (new Date().getTime() - this.data.time.start) * 10;\n pos_change.time = (new Date().getTime() - this.data.time.start) * 10;\n pos_change.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start));\n pos_change.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start));\n pos_adjust.x = Math.round(pos_change.x / pos_change.time);\n pos_adjust.y = Math.round(pos_change.y / pos_change.time);\n this.data.new_pos.x = Math.min(this.data.pos.end.x + pos_adjust.x);\n this.data.new_pos.y = Math.min(this.data.pos.end.y + pos_adjust.y);\n if (!this.options.enable.x) {\n this.data.new_pos.x = this.data.pos.start.x;\n } else if (this.data.new_pos.x > 0) {\n this.data.new_pos.x = 0;\n }\n if (!this.options.enable.y) {\n this.data.new_pos.y = this.data.pos.start.y;\n } else if (this.data.new_pos.y < 0) {\n this.data.new_pos.y = 0;\n }\n // Detect Swipe\n if (pos_change.time < 2000) {\n swipe = true;\n }\n if (this.options.enable.x && this.options.enable.y) {\n if (Math.abs(pos_change.x) > Math.abs(pos_change.y)) {\n swipe_detect.x = true;\n } else {\n swipe_detect.y = true;\n }\n } else if (this.options.enable.x) {\n if (Math.abs(pos_change.x) > Math.abs(pos_change.y)) {\n swipe_detect.x = true;\n }\n } else {\n if (Math.abs(pos_change.y) > Math.abs(pos_change.x)) {\n swipe_detect.y = true;\n }\n }\n // Detect Direction and long swipe\n if (swipe_detect.x) {\n // Long Swipe\n if (Math.abs(pos_change.x) > (this._el.drag.offsetWidth/2)) {\n swipe = true;\n }\n if (Math.abs(pos_change.x) > 10000) {\n this.data.direction = \"left\";\n if (pos_change.x > 0) {\n this.data.direction = \"right\";\n }\n }\n }\n if (swipe_detect.y) {\n // Long Swipe\n if (Math.abs(pos_change.y) > (this._el.drag.offsetHeight/2)) {\n swipe = true;\n }\n if (Math.abs(pos_change.y) > 10000) {\n this.data.direction = \"up\";\n if (pos_change.y > 0) {\n this.data.direction = \"down\";\n }\n }\n }\n this._animateMomentum();\n if (swipe && this.data.direction) {\n this.fire(\"swipe_\" + this.data.direction, this.data);\n } else if (this.data.direction) {\n this.fire(\"swipe_nodirection\", this.data);\n } else if (this.options.snap) {\n this.animator.stop();\n this.animator = Animate(this._el.move, {\n top: this.data.pos.start.y,\n left: this.data.pos.start.x,\n duration: this.options.duration,\n easing: Ease.easeOutStrong\n });\n }\n }\n \n _animateMomentum() {\n var pos = {\n x: this.data.new_pos.x,\n y: this.data.new_pos.y\n },\n animate = {\n duration: this.options.duration,\n easing: Ease.easeOutStrong\n };\n if (this.options.enable.y) {\n if (this.options.constraint.top || this.options.constraint.bottom) {\n if (pos.y > this.options.constraint.bottom) {\n pos.y = this.options.constraint.bottom;\n } else if (pos.y < this.options.constraint.top) {\n pos.y = this.options.constraint.top;\n }\n }\n animate.top = Math.floor(pos.y) + \"px\";\n }\n if (this.options.enable.x) {\n if (this.options.constraint.left || this.options.constraint.right) {\n if (pos.x >= this.options.constraint.left) {\n pos.x = this.options.constraint.left;\n } else if (pos.x < this.options.constraint.right) {\n pos.x = this.options.constraint.right;\n }\n }\n animate.left = Math.floor(pos.x) + \"px\";\n }\n this.animator = Animate(this._el.move, animate);\n this.fire(\"momentum\", this.data);\n }\n}\n\nclassMixin(Swipable, Events)\n","import { classMixin, mergeData, unique_ID, findArrayNumberByUniqueID, hexToRgb } from \"../core/Util\"\nimport Dom from \"../dom/Dom\"\nimport { DomEvent } from \"../dom/DomEvent\"\nimport Events from \"../core/Events\"\nimport Ease from \"../animation/Ease\"\nimport SlideNav from \"./SlideNav\"\nimport Slide from \"./Slide\"\nimport Animate from \"../animation/Animate\"\nimport Swipable from \"../ui/Swipable\"\nimport Message from \"../ui/Message\"\nimport { Browser } from \"../core/Browser\"\nimport { Language } from \"../language/Language\"\n\n/*\tStorySlider\n\tis the central class of the API - it is used to create a StorySlider\n\n\tEvents:\n\tnav_next\n\tnav_previous\n\tslideDisplayUpdate\n\tloaded\n\tslideAdded\n\tslideLoaded\n\tslideRemoved\n\n\n================================================== */\n\nexport default class StorySlider {\n\n\t//includes: VCO.Events,\n\n\t/*\tPrivate Methods\n\t================================================== */\n\tconstructor(elem, data, options, init) {\n\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tbackground: {},\n\t\t\tslider_container_mask: {},\n\t\t\tslider_container: {},\n\t\t\tslider_item_container: {}\n\t\t};\n\n\t\tthis._nav = {};\n\t\tthis._nav.previous = {};\n\t\tthis._nav.next = {};\n\n\t\t// Slide Spacing\n\t\tthis.slide_spacing = 0;\n\n\t\t// Slides Array\n\t\tthis._slides = [];\n\n\t\t// Swipe Object\n\t\tthis._swipable;\n\n\t\t// Preload Timer\n\t\tthis.preloadTimer;\n\n\t\t// Message\n\t\tthis._message;\n\n\t\t// Current Slide\n\t\tthis.current_slide = 0;\n\n\t\t// Current Background Color\n\t\tthis.current_bg_color = null;\n\n\t\t// Data Object\n\t\tthis.data = {};\n\n\t\tthis.options = {\n\t\t\tid: \t\t\t\t\t\"\",\n\t\t\tlayout: \t\t\t\t\"portrait\",\n\t\t\twidth: \t\t\t\t\t600,\n\t\t\theight: \t\t\t\t600,\n\t\t\tdefault_bg_color: \t\t{r:256, g:256, b:256},\n\t\t\tslide_padding_lr: \t\t40, \t\t\t// padding on slide of slide\n\t\t\tstart_at_slide: \t\t1,\n\t\t\tslide_default_fade: \t\"0%\", \t\t\t// landscape fade\n\t\t\t// animation\n\t\t\tduration: \t\t\t\t1000,\n\t\t\tease: \t\t\t\t\tEase.easeInOutQuint,\n\t\t\t// interaction\n\t\t\tdragging: \t\t\t\ttrue,\n\t\t\ttrackResize: \t\t\ttrue\n\t\t};\n\n\t\t// Main element ID\n\t\tif (typeof elem === 'object') {\n\t\t\tthis._el.container = elem;\n\t\t\tthis.options.id = unique_ID(6, \"vco\");\n\t\t} else {\n\t\t\tthis.options.id = elem;\n\t\t\tthis._el.container = Dom.get(elem);\n\t\t}\n\n\t\tif (!this._el.container.id) {\n\t\t\tthis._el.container.id = this.options.id;\n\t\t}\n\n\t\t// Animation Object\n\t\tthis.animator = null;\n\t\tthis.animator_background = null;\n\n\t\t// Merge Data and Options\n\t\tmergeData(this.options, options);\n\t\tmergeData(this.data, data);\n\n\t\tif (init) {\n\t\t\tthis.init();\n\t\t}\n\t}\n\n\tinit() {\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t\tthis._initData();\n\t\tthis._updateDisplay();\n\n\t\t// Go to initial slide\n\t\tthis.goTo(this.options.start_at_slide);\n\n\t\tthis._onLoaded();\n\t\tthis._introInterface();\n\t}\n\n\t/*\tPublic\n\t================================================== */\n\tupdateDisplay(w, h, a, l) {\n\t\tthis._updateDisplay(w, h, a, l);\n\t}\n\n\t// Create a slide\n\tcreateSlide(d) {\n\t\tthis._createSlide(d);\n\t}\n\n\t// Create Many Slides from an array\n\tcreateSlides(array) {\n\t\tthis._createSlides(array);\n\t}\n\n\t/*\tCreate Slides\n\t================================================== */\n\t_createSlides(array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tif (array[i].uniqueid == \"\") {\n\t\t\t\tarray[i].uniqueid = unique_ID(6, \"vco-slide\");\n\t\t\t}\n\t\t\tif (i == 0) {\n\t\t\t\tthis._createSlide(array[i], true);\n\t\t\t} else {\n\t\t\t\tthis._createSlide(array[i], false);\n\t\t\t}\n\n\t\t};\n\t}\n\n\t_createSlide(d, title_slide) {\n\t\tvar slide = new Slide(d, this.options, title_slide);\n\t\tthis._addSlide(slide);\n\t\tthis._slides.push(slide);\n\t}\n\n\t_destroySlide(slide) {\n\t\tthis._removeSlide(slide);\n\t\tfor (var i = 0; i < this._slides.length; i++) {\n\t\t\tif (this._slides[i] == slide) {\n\t\t\t\tthis._slides.splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t_addSlide(slide) {\n\t\tslide.addTo(this._el.slider_item_container);\n\t\tslide.on('added', this._onSlideAdded, this);\n\t\tslide.on('background_change', this._onBackgroundChange, this);\n\t}\n\n\t_removeSlide(slide) {\n\t\tslide.removeFrom(this._el.slider_item_container);\n\t\tslide.off('added', this._onSlideAdded, this);\n\t\tslide.off('background_change', this._onBackgroundChange);\n\t}\n\n\t/*\tMessage\n\t================================================== */\n\n\t/*\tNavigation\n\t================================================== */\n\tgoToId(n, fast, displayupdate) {\n\t\tif (typeof n == 'string' || n instanceof String) {\n\t\t\t_n = findArrayNumberByUniqueID(n, this._slides, \"uniqueid\");\n\t\t} else {\n\t\t\t_n = n;\n\t\t}\n\t\tthis.goTo(_n, fast, displayupdate);\n\n\t}\n\n\tgoTo(n, fast, displayupdate) {\n\t\tvar self = this;\n\n\t\tthis.changeBackground({color_value:\"\", image:false});\n\n\t\t// Clear Preloader Timer\n\t\tif (this.preloadTimer) {\n\t\t\tclearTimeout(this.preloadTimer);\n\t\t}\n\n\t\t// Set Slide Active State\n\t\tfor (var i = 0; i < this._slides.length; i++) {\n\t\t\tthis._slides[i].setActive(false);\n\t\t}\n\n\t\tif (n < this._slides.length && n >= 0) {\n\n\n\t\t\tthis.current_slide = n;\n\n\t\t\t// Stop animation\n\t\t\tif (this.animator) {\n\t\t\t\tthis.animator.stop();\n\t\t\t}\n\t\t\tif (this._swipable) {\n\t\t\t\tthis._swipable.stopMomentum();\n\t\t\t}\n\n\t\t\tif (fast) {\n\t\t\t\tthis._el.slider_container.style.left = -(this.slide_spacing * n) + \"px\";\n\t\t\t\tthis._onSlideChange(displayupdate);\n\t\t\t} else {\n\t\t\t\tthis.animator = Animate(this._el.slider_container, {\n\t\t\t\t\tleft: \t\t-(this.slide_spacing * n) + \"px\",\n\t\t\t\t\tduration: \tthis.options.duration,\n\t\t\t\t\teasing: \tthis.options.ease,\n\t\t\t\t\tcomplete: \tthis._onSlideChange(displayupdate)\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// Set Slide Active State\n\t\t\tthis._slides[this.current_slide].setActive(true);\n\n\t\t\t// Update Navigation and Info\n\t\t\tif (this._slides[this.current_slide + 1]) {\n\t\t\t\tthis.showNav(this._nav.next, true);\n\t\t\t\tthis._nav.next.update(this.getNavInfo(this._slides[this.current_slide + 1]));\n\t\t\t} else {\n\t\t\t\tthis.showNav(this._nav.next, false);\n\t\t\t}\n\t\t\tif (this._slides[this.current_slide - 1]) {\n\t\t\t\tthis.showNav(this._nav.previous, true);\n\t\t\t\tthis._nav.previous.update(this.getNavInfo(this._slides[this.current_slide - 1]));\n\t\t\t} else {\n\t\t\t\tthis.showNav(this._nav.previous, false);\n\t\t\t}\n\n\n\t\t\t// Preload Slides\n\t\t\tthis.preloadTimer = setTimeout(function() {\n\t\t\t\tself.preloadSlides();\n\t\t\t}, this.options.duration);\n\n\t\t}\n\t}\n\n\tpreloadSlides() {\n\t\tif (this._slides[this.current_slide + 1]) {\n\t\t\tthis._slides[this.current_slide + 1].loadMedia();\n\t\t\tthis._slides[this.current_slide + 1].scrollToTop();\n\t\t}\n\t\tif (this._slides[this.current_slide + 2]) {\n\t\t\tthis._slides[this.current_slide + 2].loadMedia();\n\t\t\tthis._slides[this.current_slide + 2].scrollToTop();\n\t\t}\n\t\tif (this._slides[this.current_slide - 1]) {\n\t\t\tthis._slides[this.current_slide - 1].loadMedia();\n\t\t\tthis._slides[this.current_slide - 1].scrollToTop();\n\t\t}\n\t\tif (this._slides[this.current_slide - 2]) {\n\t\t\tthis._slides[this.current_slide - 2].loadMedia();\n\t\t\tthis._slides[this.current_slide - 2].scrollToTop();\n\t\t}\n\t}\n\n\tgetNavInfo(slide) {\n\t\tvar n = {\n\t\t\ttitle: \"\",\n\t\t\tdescription: \"\"\n\t\t};\n\n\t\tif (slide.data.text) {\n\t\t\tif (slide.data.text.headline) {\n\t\t\t\tn.title = slide.data.text.headline;\n\t\t\t}\n\t\t\t/*\n\t\t\t// Disabling location in description for now.\n\t\t\tif (slide.data.location) {\n\t\t\t\tif (slide.data.location.name) {\n\t\t\t\t\tn.description = slide.data.location.name;\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t}\n\n\t\treturn n;\n\n\t}\n\n\tnext() {\n\t\tif ((this.current_slide +1) < (this._slides.length)) {\n\t\t\tthis.goTo(this.current_slide +1);\n\t\t} else {\n\t\t\tthis.goTo(this.current_slide);\n\t\t}\n\t}\n\n\tprevious() {\n\t\tif (this.current_slide -1 >= 0) {\n\t\t\tthis.goTo(this.current_slide -1);\n\t\t} else {\n\t\t\tthis.goTo(this.current_slide);\n\t\t}\n\t}\n\n\tshowNav(nav_obj, show) {\n\n\t\tif (this.options.width <= 500 && Browser.mobile) {\n\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tnav_obj.show();\n\t\t\t} else {\n\t\t\t\tnav_obj.hide();\n\t\t\t}\n\n\t\t}\n\t}\n\n\tchangeBackground(bg) {\n\t\tvar self = this,\n\t\t\tdo_animation = false;\n\n\t\tvar bg_color = {r:256, g:256, b:256},\n\t\t\tbg_color_rgb,\n\t\t\tbg_percent_start \t= this.options.slide_default_fade,\n\t\t\tbg_percent_end \t\t= \"15%\",\n\t\t\tbg_alpha_end \t\t= \"0.87\",\n\t\t\tbg_css \t\t\t\t= \"\",\n\t\t\tbg_old \t\t\t\t= this._el.background.getAttribute('style');\n\n\t\tif (bg.color_value) {\n\t\t\tbg_color = hexToRgb(bg.color_value);\n\t\t} else {\n\t\t\tbg_color = this.options.default_bg_color;\n\t\t}\n\n\n\t\t// Stop animation\n\t\tif (this.animator_background) {\n\t\t\tthis.animator_background.stop();\n\t\t}\n\n\t\tbg_color_rgb \t= bg_color.r + \",\" + bg_color.g + \",\" + bg_color.b;\n\n\t\tif (!this.current_bg_color || this.current_bg_color != bg_color_rgb) {\n\t\t\tthis.current_bg_color = bg_color_rgb;\n\t\t\tdo_animation = true;\n\t\t}\n\n\t\tif (do_animation) {\n\n\t\t\t// Figure out CSS\n\t\t\tif (this.options.layout == \"landscape\") {\n\n\t\t\t\tthis._nav.next.setColor(false);\n\t\t\t\tthis._nav.previous.setColor(false);\n\n\t\t\t\t// If background is not white, less fade is better\n\t\t\t\tif (bg_color.r < 255 && bg_color.g < 255 && bg_color.b < 255) {\n\t\t\t\t\tbg_percent_start = \"15%\";\n\t\t\t\t}\n\n\t\t\t\tif (bg.image) {\n\t\t\t\t\tbg_percent_start = \"0%\";\n\n\t\t\t\t}\n\t\t\t\tbg_css \t+= \"opacity:0;\"\n\t\t\t\tbg_css \t+= \"background-image: -webkit-linear-gradient(left, color-stop(rgba(\" + bg_color_rgb + \",0.0001 ) \" + bg_percent_start + \"), color-stop(rgba(\" + bg_color_rgb + \",\" + bg_alpha_end + \") \" + bg_percent_end + \"));\";\n\t\t\t\tbg_css \t+= \"background-image: linear-gradient(to right, rgba(\" + bg_color_rgb + \",0.0001 ) \"+ bg_percent_start + \", rgba(\" + bg_color_rgb + \",\" + bg_alpha_end + \") \" + bg_percent_end + \");\";\n\t\t\t\tbg_css \t+= \"background-repeat: repeat-x;\";\n\t\t\t\tbg_css \t+= \"filter: e(%('progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)',argb(\" + bg_color_rgb + \", 0.0001),argb(\" + bg_color_rgb + \",0.80)));\";\n\n\n\t\t\t} else {\n\t\t\t\tif (bg.color_value) {\n\t\t\t\t\tbg_css \t+= 'background-color:' + bg.color_value + \";\";\n\t\t\t\t} else {\n\t\t\t\t\tbg_css \t+= \"background-color:#FFF;\";\n\t\t\t\t}\n\n\t\t\t\tif (bg_color.r < 255 && bg_color.g < 255 && bg_color.b < 255 || bg.image) {\n\t\t\t\t\tthis._nav.next.setColor(true);\n\t\t\t\t\tthis._nav.previous.setColor(true);\n\t\t\t\t} else {\n\t\t\t\t\tthis._nav.next.setColor(false);\n\t\t\t\t\tthis._nav.previous.setColor(false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// FADE OUT IN\n\t\t\tthis.animator_background = Animate(this._el.background, {\n\t\t\t\topacity: \t0,\n\t\t\t\tduration: \tthis.options.duration/2,\n\t\t\t\teasing: \tthis.options.ease,\n\t\t\t\tcomplete: \tfunction() {\n\t\t\t\t\tself.fadeInBackground(bg_css);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t}\n\n\tfadeInBackground(bg_css) {\n\t\tif (this.animator_background) {\n\t\t\tthis.animator_background.stop();\n\t\t}\n\n\t\tif (bg_css) {\n\t\t\tthis._el.background.setAttribute(\"style\", bg_css);\n\t\t}\n\n\t\tthis.animator_background = Animate(this._el.background, {\n\t\t\topacity: \t1,\n\t\t\tduration: \tthis.options.duration/2,\n\t\t\teasing: \tthis.options.ease\n\t\t});\n\n\t}\n\n\t/*\tPrivate Methods\n\t================================================== */\n\n\t// Update Display\n\t_updateDisplay(width, height, animate, layout) {\n\t\tvar nav_pos, _layout;\n\n\t\tif(typeof layout === 'undefined'){\n\t\t\t_layout = this.options.layout;\n\t\t} else {\n\t\t\t_layout = layout;\n\t\t}\n\n\t\tthis.options.layout = _layout;\n\n\t\tthis.slide_spacing = this.options.width*2;\n\n\t\tif (width) {\n\t\t\tthis.options.width = width;\n\t\t} else {\n\t\t\tthis.options.width = this._el.container.offsetWidth;\n\t\t}\n\n\t\tif (height) {\n\t\t\tthis.options.height = height;\n\t\t} else {\n\t\t\tthis.options.height = this._el.container.offsetHeight;\n\t\t}\n\n\t\t//this._el.container.style.height = this.options.height;\n\n\t\t// position navigation\n\t\tnav_pos = (this.options.height/2);\n\t\tthis._nav.next.setPosition({top:nav_pos});\n\t\tthis._nav.previous.setPosition({top:nav_pos});\n\n\n\t\t// Position slides\n\t\tfor (var i = 0; i < this._slides.length; i++) {\n\t\t\tthis._slides[i].updateDisplay(this.options.width, this.options.height, _layout);\n\t\t\tthis._slides[i].setPosition({left:(this.slide_spacing * i), top:0});\n\t\t};\n\n\t\t// Go to the current slide\n\t\tthis.goTo(this.current_slide, true, true);\n\t}\n\n\t_introInterface() {\n\n\t\tif (this.options.call_to_action) {\n\t\t\tvar _str = Language.messages.start;\n\t\t\tif (this.options.call_to_action_text != \"\") {\n\t\t\t\t_str = this.options.call_to_action_text;\n\t\t\t}\n\t\t\tthis._slides[0].addCallToAction(_str);\n\t\t\tthis._slides[0].on('call_to_action', this.next, this);\n\t\t}\n\n\t\tif (this.options.width <= this.options.skinny_size) {\n\n\t\t} else {\n\t\t\tthis._nav.next.updatePosition({right:\"130\"}, false, this.options.duration*3, this.options.ease, -100, true);\n\t\t\tthis._nav.previous.updatePosition({left:\"-100\"}, true, this.options.duration*3, this.options.ease, -200, true);\n\t\t}\n\t}\n\n\t/*\tInit\n\t================================================== */\n\t_initLayout() {\n\n\t\tthis._el.container.className += ' vco-storyslider';\n\n\t\t// Create Layout\n\t\tthis._el.slider_container_mask\t\t= Dom.create('div', 'vco-slider-container-mask', this._el.container);\n\t\tthis._el.background \t\t\t\t= Dom.create('div', 'vco-slider-background', this._el.container);\n\t\tthis._el.slider_container\t\t\t= Dom.create('div', 'vco-slider-container vcoanimate', this._el.slider_container_mask);\n\t\tthis._el.slider_item_container\t\t= Dom.create('div', 'vco-slider-item-container', this._el.slider_container);\n\n\n\t\t// Update Size\n\t\tthis.options.width = this._el.container.offsetWidth;\n\t\tthis.options.height = this._el.container.offsetHeight;\n\n\t\t// Create Navigation\n\t\tthis._nav.previous = new SlideNav({title: \"Previous\", description: \"description\"}, {direction:\"previous\"});\n\t\tthis._nav.next = new SlideNav({title: \"Next\",description: \"description\"}, {direction:\"next\"});\n\n\t\t// add the navigation to the dom\n\t\tthis._nav.next.addTo(this._el.container);\n\t\tthis._nav.previous.addTo(this._el.container);\n\n\t\tthis._el.slider_container.style.left=\"0px\";\n\n\t\tif (Browser.touch) {\n\t\t\t//this._el.slider_touch_mask = VCO.Dom.create('div', 'vco-slider-touch-mask', this._el.slider_container_mask);\n\t\t\tthis._swipable = new Swipable(this._el.slider_container_mask, this._el.slider_container, {\n\t\t\t\tenable: {x:true, y:false},\n\t\t\t\tsnap: \ttrue\n\t\t\t});\n\t\t\tthis._swipable.enable();\n\n\t\t\t// Message\n\t\t\tthis._message = new Message({}, {\n\t\t\t\tmessage_class: \t\t\"vco-message-full\",\n\t\t\t\tmessage_icon_class: \"vco-icon-swipe-left\"\n\t\t\t});\n\t\t\tthis._message.updateMessage(Language.buttons.swipe_to_navigate);\n\t\t\tthis._message.addTo(this._el.container);\n\t\t}\n\t}\n\n\t_initEvents() {\n\t\tthis._nav.next.on('clicked', this._onNavigation, this);\n\t\tthis._nav.previous.on('clicked', this._onNavigation, this);\n\n\t\tif (this._message) {\n\t\t\tthis._message.on('clicked', this._onMessageClick, this);\n\t\t}\n\n\t\tif (this._swipable) {\n\t\t\tthis._swipable.on('swipe_left', this._onNavigation, this);\n\t\t\tthis._swipable.on('swipe_right', this._onNavigation, this);\n\t\t\tthis._swipable.on('swipe_nodirection', this._onSwipeNoDirection, this);\n\t\t}\n\t}\n\n\t_initData() {\n\t\t// Create Slides and then add them\n\t\tthis._createSlides(this.data.slides);\n\t}\n\n\t/*\tEvents\n\t================================================== */\n\t_onBackgroundChange(e) {\n\t\tvar slide_background = this._slides[this.current_slide].getBackground();\n\t\tthis.changeBackground(e);\n\t\tthis.fire(\"colorchange\", slide_background);\n\t}\n\n\t_onMessageClick(e) {\n\t\tthis._message.hide();\n\t}\n\n\t_onSwipeNoDirection(e) {\n\t\tthis.goTo(this.current_slide);\n\t}\n\n\t_onNavigation(e) {\n\n\t\tif (e.direction == \"next\" || e.direction == \"left\") {\n\t\t\tthis.next();\n\t\t} else if (e.direction == \"previous\" || e.direction == \"right\") {\n\t\t\tthis.previous();\n\t\t}\n\t\tthis.fire(\"nav_\" + e.direction, this.data);\n\t}\n\n\t_onSlideAdded(e) {\n\t\tthis.fire(\"slideAdded\", this.data);\n\t}\n\n\t_onSlideRemoved(e) {\n\t\tthis.fire(\"slideAdded\", this.data);\n\t}\n\n\t_onSlideChange(displayupdate) {\n\n\t\tif (!displayupdate) {\n\t\t\tthis.fire(\"change\", {current_slide:this.current_slide, uniqueid:this._slides[this.current_slide].data.uniqueid});\n\t\t}\n\t}\n\n\t_onMouseClick(e) {\n\n\t}\n\n\t_fireMouseEvent(e) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = e.type;\n\t\ttype = (type === 'mouseenter' ? 'mouseover' : (type === 'mouseleave' ? 'mouseout' : type));\n\n\t\tif (!this.hasEventListeners(type)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (type === 'contextmenu') {\n\t\t\tDomEvent.preventDefault(e);\n\t\t}\n\n\t\tthis.fire(type, {\n\t\t\tlatlng: \"something\", //this.mouseEventToLatLng(e),\n\t\t\tlayerPoint: \"something else\" //this.mouseEventToLayerPoint(e)\n\t\t});\n\t}\n\n\t_onLoaded() {\n\t\tthis.fire(\"loaded\", this.data);\n\t\tthis.fire(\"title\", {title:this._slides[0].title});\n\n\t}\n}\n\nclassMixin(StorySlider, Events)\n","import { classMixin, mergeData, updateData, urljoin } from \"../core/Util\"\nimport { loadJS, loadCSS } from \"../core/Load\"\nimport Dom from \"../dom/Dom\"\nimport Ease from \"../animation/Ease\"\nimport { setLanguage } from \"../language/Language\"\nimport Events from \"../core/Events\"\nimport Leaflet from \"../map/leaflet/Map.Leaflet\"\nimport MenuBar from \"../ui/MenuBar\"\nimport StorySlider from \"../slider/StorySlider\"\nimport { Browser } from \"../core/Browser\"\nimport Animate from \"../animation/Animate\"\n\nclass StoryMap {\n\n // TODO: mixin\n\t// includes: VCO.Events,\n\n\t/*\tPrivate Methods\n\t================================================== */\n\t//initialize: function (elem, data, options,listeners) {\n\tconstructor(elem, data, options, listeners) {\n\n\t\tfor (let key in listeners) {\n\t\t\tvar callbacks = listeners[key];\n\t\t\tif (typeof(callbacks) == 'function') {\n\t\t\t\tthis.on(key,callbacks);\n\t\t\t} else {\n\t\t\t\tfor (var idx in callbacks) {\n if (typeof(callbacks[idx]) == 'function') { \n\t\t\t\t\t this.on(key,callbacks[idx]);\n } else {\n console.log(\n \"WARNING: Ignoring invalid callback '\" +\n callbacks[idx] + \"' defined for \" +\n \"listener '\" + key + \"' in StoryMap constructor\");\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar self = this;\n\t\t// Version\n\t\tthis.version = \"0.1.16\";\n\n\t\t// Ready\n\t\tthis.ready = false;\n\n\t\t// DOM ELEMENTS\n\t\tthis._el = {\n\t\t\tcontainer: {},\n\t\t\tstoryslider: {},\n\t\t\tmap: {},\n\t\t\tmenubar: {}\n\t\t};\n \n\t\t// Determine Container Element\n\t\tif (typeof elem === 'object') {\n\t\t\tthis._el.container = elem;\n\t\t} else {\n\t\t\tthis._el.container = Dom.get(elem);\n\t\t}\n\n\t\t// Slider\n\t\tthis._storyslider = {};\n\n\t\t// Map\n\t\tthis._map = {};\n\t\tthis.map = {}; // For direct access to Leaflet Map\n\n\t\t// Menu Bar\n\t\tthis._menubar = {};\n\n\t\t// Loaded State\n\t\tthis._loaded = {storyslider:false, map:false};\n\n\t\t// Data Object\n\t\t// Test Data compiled from http://www.pbs.org/marktwain/learnmore/chronology.html\n\t\tthis.data = {};\n\n\t\tthis.options = {\n script_path: StoryMap.SCRIPT_PATH,\n height: this._el.container.offsetHeight,\n width: this._el.container.offsetWidth,\n layout: \"landscape\", // portrait or landscape\n base_class: \"\",\n default_bg_color: { r: 256, g: 256, b: 256 },\n map_size_sticky: 2.5, // Set as division 1/3 etc\n map_center_offset: null, // takes object {top:0,left:0}\n less_bounce: false, // Less map bounce when calculating zoom, false is good when there are clusters of tightly grouped markers\n start_at_slide: 0,\n call_to_action: false,\n call_to_action_text: \"\",\n menubar_height: 0,\n skinny_size: 650,\n relative_date: false, // Use momentjs to show a relative date from the slide.text.date.created_time field\n // animation\n duration: 1000,\n ease: Ease.easeInOutQuint,\n // interaction\n dragging: true,\n trackResize: true,\n map_type: '', // \"osm:standard\", \n attribution: \"\",\n map_mini: true,\n map_subdomains: \"\",\n map_as_image: false,\n map_access_token:\n \"pk.eyJ1IjoibnVrbmlnaHRsYWIiLCJhIjoiczFmd0hPZyJ9.Y_afrZdAjo3u8sz_r8m2Yw\", // default\n map_background_color: \"#d9d9d9\",\n zoomify: {\n path: \"\",\n width: \"\",\n height: \"\",\n tolerance: 0.8,\n attribution: \"\"\n },\n map_height: 300,\n storyslider_height: 600,\n slide_padding_lr: 45, // padding on slide of slide\n slide_default_fade: \"0%\", // landscape fade\n menubar_default_y: 0,\n path_gfx: \"gfx\",\n map_popup: false,\n zoom_distance: 100,\n calculate_zoom: true, // Allow map to determine best zoom level between markers (recommended)\n line_follows_path: true, // Map history path follows default line, if false it will connect previous and current only\n line_color: \"#c34528\", //\"#DA0000\",\n line_color_inactive: \"#CCC\",\n line_join: \"miter\",\n line_weight: 3,\n line_opacity: 0.8,\n line_dash: \"5,5\",\n show_lines: true,\n show_history_line: true,\n api_key_flickr: \"8f2d5becf7b6ba46570741620054b507\",\n language: \"en\"\n\n };\n\n\t\t// Current Slide\n\t\tthis.current_slide = this.options.start_at_slide;\n\n\t\t// Animation Objects\n\t\tthis.animator_map = null;\n\t\tthis.animator_storyslider = null;\n\n\t\t// Merge Options -- legacy, in case people still need to pass in\n\t\tmergeData(this.options, options);\n\n this._initData(data);\n\n\t\treturn this;\n\t}\n\n\t/* Initialize the data\n\t================================================== */\n _initData(data) {\n\t\tvar self = this;\n\n\t\tif (typeof data === 'string') {\n fetch(data)\n .then(response => response.json())\n .then(result => {\n console.log(result);\n\t\t\t\tself.data = result.storymap;\n\t\t\t self._initOptions();\n });\n\t\t} else if (typeof data === 'object') {\n\t\t\tif (data.storymap) {\n\t\t\t\tself.data = data.storymap;\n\t\t\t} else {\n\t\t\t\tconsole.log(\"data must have a storymap property\")\n\t\t\t}\n\t\t\tself._initOptions();\n\t\t} else {\n\t console.log(\"data has unknown type\")\n\t self._initOptions();\n }\n\t}\n\n\t/* Initialize the options\n\t================================================== */\n _initOptions() {\n \t\tvar self = this;\n\n // Grab options from storymap data\n updateData(this.options, this.data);\n\n\t\tif (this.options.layout == \"landscape\") {\n\t\t\tthis.options.map_center_offset = {left: -200, top: 0};\n\t\t}\n\t\tif (this.options.map_type == \"zoomify\" && this.options.map_as_image) {\n\t\t\tthis.options.map_size_sticky = 2;\n\t\t}\n\t\tif (this.options.map_as_image) {\n\t\t\tthis.options.calculate_zoom = false;\n\t\t}\n\n\t // handle Stamen change\n\t if (this.options.map_type.indexOf('stamen') == 0) {\n\t\t const old_type = this.options.map_type\n\t\t if (old_type == 'stamen:watercolor') {\n\t\t\t this.options.map_type = 'ch-watercolor'\n\t\t } else {\n\t\t\t this.options.map_type = 'osm:standard'\n\t\t }\n\t\t console.log(`Deprecated map_type ${old_type}; using ${this.options.map_type}`)\n\t }\n\n\t // Use relative date calculations?\n\t\tif(this.options.relative_date) {\n\t\t\tif (typeof(moment) !== 'undefined') {\n\t\t\t\tself._loadLanguage();\n\t\t\t} else {\n\t\t\t\tloadJS(this.options.script_path + \"/library/moment.js\", function() {\n\t\t\t\t\tself._loadLanguage();\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tself._loadLanguage();\n\t\t}\n\n \t\t// Emoji Support to Chrome?\n\t\tif (Browser.chrome) {\n\t\t\tloadCSS(urljoin(this.options.script_path,\"../css/fonts/font.emoji.css\"), function() {\n\t\t\t});\n\t\t}\n }\n\n\t/*\tLoad Language\n\t================================================== */\n\n _loadLanguage() {\n setLanguage(this.options.language);\n this._onDataLoaded();\n }\n\n\t/*\tNavigation\n\t================================================== */\n\tgoTo(n) {\n\t\tif (n != this.current_slide) {\n\t\t\tthis.current_slide = n;\n\t\t\tthis._storyslider.goTo(this.current_slide);\n\t\t\tthis._map.goTo(this.current_slide);\n\t\t}\n\t}\n\n\tupdateDisplay() {\n\t\tif (this.ready) {\n\t\t\tthis._updateDisplay();\n\t\t}\n\t}\n\n\t/*\tPrivate Methods\n\t================================================== */\n\n\t// Initialize the layout\n\t_initLayout() {\n\t\tvar self = this;\n\n\t\tthis._el.container.className += ' vco-storymap';\n\t\tthis.options.base_class = this._el.container.className;\n\n\t\t// Create Layout\n\t\tthis._el.menubar\t\t= Dom.create('div', 'vco-menubar', this._el.container);\n\t\tthis._el.map \t\t\t= Dom.create('div', 'vco-map', this._el.container);\n\t\tthis._el.storyslider \t= Dom.create('div', 'vco-storyslider', this._el.container);\n\n\t\t// Initial Default Layout\n\t\tthis.options.width \t\t\t\t= this._el.container.offsetWidth;\n\t\tthis.options.height \t\t\t= this._el.container.offsetHeight;\n\t\tthis._el.map.style.height \t\t= \"1px\";\n\t\tthis._el.storyslider.style.top \t= \"1px\";\n\n\t\t// Create Map using preferred Map API\n\t\tthis._map = new Leaflet(this._el.map, this.data, this.options);\n\t\tthis.map = this._map._map; // For access to Leaflet Map.\n\t\tthis._map.on('loaded', this._onMapLoaded, this);\n\n\t\t// Map Background Color\n\t\tthis._el.map.style.backgroundColor = this.options.map_background_color;\n\n\t\t// Create Menu Bar\n\t\tthis._menubar = new MenuBar(this._el.menubar, this._el.container, this.options);\n\n\t\t// Create StorySlider\n\t\tthis._storyslider = new StorySlider(this._el.storyslider, this.data, this.options);\n\t\tthis._storyslider.on('loaded', this._onStorySliderLoaded, this);\n\t\tthis._storyslider.on('title', this._onTitle, this);\n\t\tthis._storyslider.init();\n\n\t\t// LAYOUT\n\t\tif (this.options.layout == \"portrait\") {\n\t\t\t// Set Default Component Sizes\n\t\t\tthis.options.map_height \t\t= (this.options.height / this.options.map_size_sticky);\n\t\t\tthis.options.storyslider_height = (this.options.height - this._el.menubar.offsetHeight - this.options.map_height - 1);\n\t\t\tthis._menubar.setSticky(0);\n\t\t} else {\n\t\t\tthis.options.menubar_height = this._el.menubar.offsetHeight;\n\t\t\t// Set Default Component Sizes\n\t\t\tthis.options.map_height \t\t= this.options.height;\n\t\t\tthis.options.storyslider_height = (this.options.height - this._el.menubar.offsetHeight - 1);\n\t\t\tthis._menubar.setSticky(this.options.menubar_height);\n\t\t}\n\n\t\t// Update Display\n\t\tthis._updateDisplay(this.options.map_height, true, 2000);\n\n\t\t// Animate Menu Bar to Default Location\n\t\tthis._menubar.show(2000);\n\n\t}\n\n\t_initEvents() {\n\n\t\t// Sidebar Events\n\t\tthis._menubar.on('collapse', this._onMenuBarCollapse, this);\n\t\tthis._menubar.on('back_to_start', this._onBackToStart, this);\n\t\tthis._menubar.on('overview', this._onOverview, this);\n\n\t\t// StorySlider Events\n\t\tthis._storyslider.on('change', this._onSlideChange, this);\n\t\tthis._storyslider.on('colorchange', this._onColorChange, this);\n\n\t\t// Map Events\n\t\tthis._map.on('change', this._onMapChange, this);\n\t}\n\n\t// Update View\n\t_updateDisplay(map_height, animate, d) {\n\t\tvar duration \t\t= this.options.duration,\n\t\t\tdisplay_class \t= this.options.base_class,\n\t\t\tself\t\t\t= this;\n\n\t\tif (d) {\n\t\t\tduration = d;\n\t\t}\n\n\t\t// Update width and height\n\t\tthis.options.width = this._el.container.offsetWidth;\n\t\tthis.options.height = this._el.container.offsetHeight;\n\n\t\t// Check if skinny\n\t\tif (this.options.width <= this.options.skinny_size) {\n\t\t\tthis.options.layout = \"portrait\";\n\t\t\t//display_class += \" vco-skinny\";\n\t\t} else {\n\t\t\tthis.options.layout = \"landscape\";\n\t\t}\n\n\n\t\t// Map Height\n\t\tif (map_height) {\n\t\t\tthis.options.map_height = map_height;\n\t\t}\n\n\n\t\t// Detect Mobile and Update Orientation on Touch devices\n\t\tif (Browser.touch) {\n\t\t\tthis.options.layout = Browser.orientation();\n\t\t\tdisplay_class += \" vco-mobile\";\n\t\t}\n\n\t\t// LAYOUT\n\t\tif (this.options.layout == \"portrait\") {\n\t\t\tdisplay_class += \" vco-skinny\";\n\t\t\t// Map Offset\n\t\t\tthis._map.setMapOffset(0, 0);\n\n\t\t\tthis.options.map_height \t\t= (this.options.height / this.options.map_size_sticky);\n\t\t\tthis.options.storyslider_height = (this.options.height - this.options.map_height - 1);\n\t\t\tthis._menubar.setSticky(0);\n\n\t\t\t// Portrait\n\t\t\tdisplay_class += \" vco-layout-portrait\";\n\n\t\t\tif (animate) {\n\n\t\t\t\t// Animate Map\n\t\t\t\tif (this.animator_map) {\n\t\t\t\t\tthis.animator_map.stop();\n\t\t\t\t}\n\n\t\t\t\tthis.animator_map = Animate(this._el.map, {\n\t\t\t\t\theight: \t(this.options.map_height) + \"px\",\n\t\t\t\t\tduration: \tduration,\n\t\t\t\t\teasing: \tEase.easeOutStrong,\n\t\t\t\t\tcomplete: function () {\n\t\t\t\t\t\tself._map.updateDisplay(self.options.width, self.options.map_height, animate, d, self.options.menubar_height);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Animate StorySlider\n\t\t\t\tif (this.animator_storyslider) {\n\t\t\t\t\tthis.animator_storyslider.stop();\n\t\t\t\t}\n\t\t\t\tthis.animator_storyslider = Animate(this._el.storyslider, {\n\t\t\t\t\theight: \tthis.options.storyslider_height + \"px\",\n\t\t\t\t\tduration: \tduration,\n\t\t\t\t\teasing: \tEase.easeOutStrong\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\t// Map\n\t\t\t\tthis._el.map.style.height = Math.ceil(this.options.map_height) + \"px\";\n\n\t\t\t\t// StorySlider\n\t\t\t\tthis._el.storyslider.style.height = this.options.storyslider_height + \"px\";\n\t\t\t}\n\n\t\t\t// Update Component Displays\n\t\t\tthis._menubar.updateDisplay(this.options.width, this.options.height, animate);\n\t\t\tthis._map.updateDisplay(this.options.width, this.options.height, false);\n\t\t\tthis._storyslider.updateDisplay(this.options.width, this.options.storyslider_height, animate, this.options.layout);\n\n\t\t} else {\n\n\t\t\t// Landscape\n\t\t\tdisplay_class += \" vco-layout-landscape\";\n\n\t\t\tthis.options.menubar_height = this._el.menubar.offsetHeight;\n\n\t\t\t// Set Default Component Sizes\n\t\t\tthis.options.map_height \t\t= this.options.height;\n\t\t\tthis.options.storyslider_height = this.options.height;\n\t\t\tthis._menubar.setSticky(this.options.menubar_height);\n\n\t\t\t// Set Sticky state of MenuBar\n\t\t\tthis._menubar.setSticky(this.options.menubar_height);\n\n\t\t\tthis._el.map.style.height = this.options.height + \"px\";\n\n\t\t\t// Update Component Displays\n\t\t\tthis._map.setMapOffset(-(this.options.width/4), 0);\n\n\t\t\t// StorySlider\n\t\t\tthis._el.storyslider.style.top = 0;\n\t\t\tthis._el.storyslider.style.height = this.options.storyslider_height + \"px\";\n\n\t\t\tthis._menubar.updateDisplay(this.options.width, this.options.height, animate);\n\t\t\tthis._map.updateDisplay(this.options.width, this.options.height, animate, d);\n\t\t\tthis._storyslider.updateDisplay(this.options.width/2, this.options.storyslider_height, animate, this.options.layout);\n\t\t}\n\n\t\tif (this.options.language.direction == 'rtl') {\n\t\t\tdisplay_class += ' vco-rtl';\n\t\t}\n\t\telse if (this.options.language.direction == 'rtl'){\n\t\t\tdisplay_class += ' vco-rtl';\n\t\t}\n\n\t\t// Apply class\n\t\tthis._el.container.className = display_class;\n\n\n\t}\n\n\n\t/*\tEvents\n\t================================================== */\n\n\t_onDataLoaded(e) {\n\t\tthis.fire(\"dataloaded\");\n\t\tthis._initLayout();\n\t\tthis._initEvents();\n\t\tthis.ready = true;\n\t}\n\n\t_onTitle(e) {\n\t\tthis.fire(\"title\", e);\n\t}\n\n\t_onColorChange(e) {\n\t\tif (e.color || e.image) {\n\t\t\tthis._menubar.setColor(true);\n\t\t} else {\n\t\t\tthis._menubar.setColor(false);\n\t\t}\n\t}\n\n\t_onSlideChange(e) {\n\t\tif (this.current_slide != e.current_slide) {\n\t\t\tthis.current_slide = e.current_slide;\n\t\t\tthis._map.goTo(this.current_slide);\n\t\t\tthis.fire(\"change\", {current_slide: this.current_slide}, this);\n\t\t}\n\t}\n\n\t_onMapChange(e) {\n\t\tif (this.current_slide != e.current_marker) {\n\t\t\tthis.current_slide = e.current_marker;\n\t\t\tthis._storyslider.goTo(this.current_slide);\n\t\t\tthis.fire(\"change\", {current_slide: this.current_slide}, this);\n\t\t}\n\t}\n\n\t_onOverview(e) {\n\t\tthis._map.markerOverview();\n\t}\n\n\t_onBackToStart(e) {\n\t\tthis.current_slide = 0;\n\t\tthis._map.goTo(this.current_slide);\n\t\tthis._storyslider.goTo(this.current_slide);\n\t\tthis.fire(\"change\", {current_slide: this.current_slide}, this);\n\t}\n\n\t_onMenuBarCollapse(e) {\n\t\tthis._updateDisplay(e.y, true);\n\t}\n\n\t_onMouseClick(e) {\n\n\t}\n\n\t_fireMouseEvent(e) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = e.type;\n\t\ttype = (type === 'mouseenter' ? 'mouseover' : (type === 'mouseleave' ? 'mouseout' : type));\n\n\t\tif (!this.hasEventListeners(type)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (type === 'contextmenu') {\n\t\t\tDomEvent.preventDefault(e);\n\t\t}\n\n\t\tthis.fire(type, {\n\t\t\tlatlng: \"something\", //this.mouseEventToLatLng(e),\n\t\t\tlayerPoint: \"something else\" //this.mouseEventToLayerPoint(e)\n\t\t});\n\t}\n\n\t_onMapLoaded() {\n\t\tthis._loaded.map = true;\n\t\tthis._onLoaded();\n\t}\n\n\t_onStorySliderLoaded() {\n\t\tthis._loaded.storyslider = true;\n\t\tthis._onLoaded();\n\t}\n\n\t_onLoaded() {\n\t\tif (this._loaded.storyslider && this._loaded.map) {\n\t\t\tthis.fire(\"loaded\", this.data);\n\t\t}\n\t}\n}\n\n// Calculates the script path and sets it as SCRIPT_PATH on the StoryMap class\n(function(StoryMapClass) {\n\tvar scripts = document.getElementsByTagName(\"script\");\n\tif (scripts.length > 0) {\n\t\tvar src = scripts[scripts.length - 1].src;\n\t\tStoryMapClass.SCRIPT_PATH = src.substring(0, src.lastIndexOf(\"/\"));\n\t}\n})(StoryMap);\n\nclassMixin(StoryMap, Events)\nexport { StoryMap }\n","require('../less/VCO.StoryMap.less')\nexport { StoryMap } from \"./storymap/StoryMap\"\nexport { loadCSS } from \"./core/Load\"\n\n/* Used by the editor: */\nimport StamenTileLayer from \"./map/tile/TileLayer.Stamen\"\nexport { StamenTileLayer }\nimport MediaType from \"./media/MediaType\"\nexport { MediaType }\n\nexport { setLanguage } from \"./language/Language\"\n\nimport ZoomifyTileLayer from \"./map/leaflet/extensions/Leaflet.TileLayer.Zoomify\"\nexport { ZoomifyTileLayer }\n\n/* Transitional references deprecated as of 0.7.7 */\nfunction trace(msg) {\n console.log(msg);\n}\nwindow.trace = trace;\n\n\nfunction getJSON(url, onload) {\n let httpRequest = new XMLHttpRequest();\n httpRequest.onreadystatechange = function() {\n if (httpRequest.readyState === XMLHttpRequest.DONE) {\n if (httpRequest.status === 200) {\n let data = JSON.parse(httpRequest.responseText);\n onload(data);\n } else {\n alert('There was a problem with the request.');\n }\n }\n };\n httpRequest.open('GET', url);\n httpRequest.send();\n}\n\nimport { loadCSS } from \"./core/Load\"\nimport { StoryMap } from \"./storymap/StoryMap\"\n\nconst VCO = {\n Load: {\n css: loadCSS\n },\n getJSON: getJSON,\n StoryMap: StoryMap\n}\nwindow.VCO = VCO;\n\n// set up lightbox\nconst lightboxDiv = document.createElement(\"div\");\nlightboxDiv.setAttribute('id',\"lightbox\");\ndocument.body.appendChild(lightboxDiv);\n\n// close lightbox\nlightboxDiv.addEventListener(\"click\", () => lightboxDiv.style.display = 'none');\n"],"names":["window","document","undefined","lastId","key","oldL","L","version","module","exports","noConflict","this","Util","extend","dest","i","j","len","src","sources","Array","prototype","slice","call","arguments","length","hasOwnProperty","bind","fn","obj","args","apply","stamp","invokeEach","method","context","concat","limitExecByInterval","time","lock","execOnUnlock","wrapperFn","setTimeout","falseFn","formatNum","num","digits","pow","Math","round","trim","str","replace","splitWords","split","setOptions","options","getParamString","existingUrl","uppercase","params","push","encodeURIComponent","toUpperCase","indexOf","join","template","data","value","Error","isArray","Object","toString","emptyImageUrl","getPrefixed","name","prefixes","lastTime","timeoutDefer","Date","timeToCall","max","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","id","clearTimeout","requestAnimFrame","immediate","element","cancelAnimFrame","Class","props","NewClass","initialize","_initHooks","callInitHooks","F","proto","constructor","statics","includes","parent","__super__","_initHooksCalled","include","mergeOptions","addInitHook","init","ie","ielt9","ua","webkit","chrome","phantomjs","android","android23","gecko","mobile","msPointer","pointer","retina","doc","ie3d","webkit3d","gecko3d","opera3d","any3d","touch","r","scale","target","eventsKey","Mixin","Events","addEventListener","types","event","type","indexKey","indexLenKey","typeIndex","events","contextId","action","hasEventListeners","removeEventListener","clearAllEventListeners","listeners","splice","fireEvent","addOneTimeEventListener","handler","on","off","once","fire","navigator","userAgent","toLowerCase","search","orientation","PointerEvent","MSPointerEvent","pointerEnabled","devicePixelRatio","matchMedia","matches","documentElement","style","WebKitCSSMatrix","L_DISABLE_3D","L_NO_TOUCH","DocumentTouch","Browser","opera","mobileWebkit","mobileWebkit3d","mobileOpera","Point","x","y","clone","add","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","_round","floor","_floor","distanceTo","sqrt","equals","contains","abs","Bounds","a","b","points","min","getCenter","getBottomLeft","getTopRight","getSize","bounds","intersects","min2","max2","xIntersects","yIntersects","isValid","Transformation","c","d","_a","_b","_c","_d","transform","_transform","untransform","DomUtil","get","getElementById","getStyle","el","currentStyle","defaultView","css","getComputedStyle","getViewportOffset","pos","top","left","docBody","body","docEl","offsetTop","offsetLeft","parseInt","offsetParent","scrollTop","scrollLeft","width","maxWidth","getBoundingClientRect","clientLeft","parentNode","documentIsLtr","_docIsLtrCached","_docIsLtr","create","tagName","className","container","createElement","appendChild","hasClass","classList","_getClass","RegExp","test","addClass","classes","_setClass","removeClass","remove","baseVal","setOpacity","opacity","filter","filterName","filters","item","e","Enabled","Opacity","testProp","getTranslateString","is3d","close","getScaleString","origin","setPosition","disable3D","_leaflet_pos","TRANSFORM","getPosition","TRANSITION","TRANSITION_END","disableTextSelection","DomEvent","preventDefault","enableTextSelection","userSelectProperty","_userSelect","disableImageDrag","enableImageDrag","LatLng","lat","lng","alt","parseFloat","isNaN","DEG_TO_RAD","PI","RAD_TO_DEG","MAX_MARGIN","latLng","precision","other","d2r","dLat","dLon","lat1","lat2","sin1","sin","sin2","cos","R","atan2","wrap","lon","LatLngBounds","southWest","northEast","latlngs","latLngBounds","_southWest","_northEast","pad","bufferRatio","sw","ne","heightBuffer","widthBuffer","getSouthWest","getNorthEast","getNorthWest","getNorth","getWest","getSouthEast","getSouth","getEast","sw2","ne2","latIntersects","lngIntersects","toBBoxString","Projection","SphericalMercator","MAX_LATITUDE","project","latlng","log","tan","unproject","atan","exp","LonLat","CRS","latLngToPoint","zoom","projectedPoint","projection","transformation","pointToLatLng","untransformedPoint","s","Simple","EPSG3857","code","EPSG900913","EPSG4326","Map","crs","fadeAnimation","trackResize","markerZoomAnimation","_initContainer","_initLayout","_onResize","_initEvents","maxBounds","setMaxBounds","center","setView","reset","_handlers","_layers","_zoomBoundLayers","_tileLayersNum","_addLayers","layers","getZoom","_resetView","_limitZoom","setZoom","_loaded","_zoom","zoomIn","delta","zoomOut","setZoomAround","getZoomScale","viewHalf","centerOffset","latLngToContainerPoint","newCenter","containerPointToLatLng","fitBounds","getBounds","paddingTL","paddingTopLeft","padding","paddingBR","paddingBottomRight","getBoundsZoom","maxZoom","paddingOffset","swPoint","nePoint","fitWorld","panTo","pan","panBy","offset","_rawPanBy","_panInsideMaxBounds","panInsideBounds","_limitCenter","addLayer","layer","minZoom","_updateZoomLevels","zoomAnimation","TileLayer","_tileLayersToLoad","_onTileLayerLoad","_layerAdd","removeLayer","onRemove","hasLayer","eachLayer","invalidateSize","animate","oldSize","_sizeChanged","_initialCenter","newSize","oldCenter","debounceMoveend","_sizeTimer","addHandler","HandlerClass","enable","_container","_leaflet","_clearPanes","_clearControlPos","_clearHandlers","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getPixelBounds","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","Infinity","inside","boundsSize","size","nw","se","zoomNotFound","_size","clientWidth","clientHeight","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_initialTopLeftPoint","getPanes","_panes","getContainer","toZoom","getScaleZoom","LN2","latLngToLayerPoint","containerPointToLayerPoint","_getMapPanePos","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","getMousePosition","mouseEventToLayerPoint","mouseEventToLatLng","position","_initPanes","_initControlPos","panes","_mapPane","mapPane","_createPane","_tilePane","tilePane","objectsPane","shadowPane","overlayPane","markerPane","popupPane","zoomHide","removeChild","preserveMapOffset","afterZoomAnim","zoomChanged","_getNewTopLeftPoint","loading","hard","_getZoomSpan","oldZoomSpan","onOff","_onMouseClick","_fireMouseEvent","_resizeRequest","_simulated","dragging","moved","boxZoom","_skipped","containerPoint","originalEvent","disable","whenReady","callback","onAdd","_latLngToNewLayerPoint","newZoom","topLeft","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","nwOffset","seOffset","dx","_rebound","dy","right","ceil","map","Mercator","R_MINOR","R_MAJOR","r2","tmp","eccent","con","ts","phi","dphi","EPSG3395","tileSize","subdomains","errorTileUrl","attribution","zoomOffset","unloadInvisibleTiles","updateWhenIdle","url","detectRetina","_url","_map","_animated","_zoomAnimated","_reset","_update","_animateZoom","_endZoomAnim","_limitedUpdate","addTo","bringToFront","pane","_setAutoZIndex","bringToBack","insertBefore","firstChild","getAttribution","_updateOpacity","setZIndex","zIndex","_updateZIndex","setUrl","noRedraw","redraw","compare","children","edgeZIndex","isFinite","tiles","_tiles","_bgBuffer","_tileContainer","tile","_tilesToLoad","reuseTiles","_unusedTiles","innerHTML","_clearBgBuffer","_getTileSize","zoomN","maxNativeZoom","tileBounds","_addTilesFromCenterOut","_removeOtherTiles","queue","_tileShouldBeLoaded","tilesToLoad","sort","fragment","createDocumentFragment","_addTile","tilePoint","continuousWorld","limit","_getWrapTileNum","noWrap","nwPoint","sePoint","kArr","_removeTile","onload","tilePos","_getTilePos","_getTile","_loadTile","_getZoomForUrl","zoomReverse","getTileUrl","_getSubdomain","z","_adjustTilePoint","tms","index","pop","_resetTile","_createTile","height","galleryimg","onselectstart","onmousemove","WebkitBackfaceVisibility","_layer","_tileOnLoad","onerror","_tileOnError","_tileLoaded","_clearBgBufferTimer","newUrl","tileLayer","WMS","defaultWmsParams","service","request","styles","format","transparent","wmsParams","_crs","_wmsVersion","projectionKey","bbox","setParams","wms","Canvas","async","_redrawTile","drawTile","_tilePoint","tileDrawn","canvas","ImageOverlay","_bounds","_image","_initImage","_onImageLoad","image","imageOverlay","Icon","createIcon","oldIcon","_createIcon","createShadow","img","_getIconUrl","_createImg","_setIconStyles","anchor","shadowAnchor","iconAnchor","marginLeft","marginTop","icon","Default","iconSize","popupAnchor","shadowSize","path","imagePath","scripts","getElementsByTagName","leafletRe","match","Marker","title","clickable","draggable","keyboard","zIndexOffset","riseOnHover","riseOffset","_latlng","update","_initIcon","_removeIcon","_removeShadow","getLatLng","setLatLng","setZIndexOffset","setIcon","_popup","bindPopup","_icon","_setPos","classToAdd","addIcon","tabIndex","_initInteraction","_bringToFront","_resetZIndex","newShadow","_shadow","addShadow","_zIndex","opt","_onKeyPress","Handler","MarkerDrag","wasDragged","stopPropagation","_enabled","keyCode","marker","DivIcon","html","div","bgPos","backgroundPosition","divIcon","closePopupOnClick","Popup","minWidth","autoPan","closeButton","autoPanPadding","keepInView","source","_source","_isOpen","animFade","_getEvents","popup","openOn","openPopup","offsetWidth","_updatePosition","_adjustPan","getContent","_content","setContent","content","visibility","_updateContent","_updateLayout","viewreset","zoomanim","_zoomAnimation","closeOnClick","preclick","_close","moveend","closePopup","prefix","containerClass","_closeButton","href","disableClickPropagation","_onCloseButtonClick","wrapper","_wrapper","_contentNode","disableScrollPropagation","_tipContainer","_tip","hasChildNodes","whiteSpace","offsetHeight","maxHeight","scrolledClass","_containerWidth","animated","_containerBottom","_containerLeft","bottom","containerHeight","containerWidth","layerPos","containerPos","autoPanPaddingTopLeft","autoPanPaddingBottomRight","stop","togglePopup","_popupHandlersAdded","_movePopup","setPopupContent","unbindPopup","getPopup","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","layerGroup","FeatureGroup","EVENTS","_propagateEvent","_popupContent","_popupOptions","setStyle","featureGroup","Path","CLIP_PADDING","outerWidth","outerHeight","stroke","color","dashArray","lineCap","lineJoin","weight","fill","fillColor","fillOpacity","_initElements","projectLatlngs","_updatePath","_pathRoot","vml","_stroke","_fill","_updateStyle","_updatePathViewport","p","_pathViewport","SVG_NS","svg","createElementNS","createSVGRect","SVG","root","lastChild","first","getPathString","_createElement","_initPathRoot","_initPath","_initStyle","_path","setAttribute","pointerEvents","removeAttribute","_animatePathZoom","_endPathZoom","_updateSvgViewport","_pathZooming","vp","_openPopup","_latlngs","shape","behavior","adj","VML","namespaces","coordsize","stroked","filled","endcap","dashStyle","joinstyle","display","v","getContext","L_PREFER_CANVAS","CANVAS","_requestUpdate","_onClick","_onMouseMove","_updateRequest","_fireMapMoveEnd","_ctx","_canvasCtx","lineWidth","strokeStyle","fillStyle","_drawPath","len2","drawMethod","beginPath","_parts","Polygon","closePath","_checkIfEmpty","ctx","save","globalAlpha","fillRule","restore","_containsPoint","_animatingZoom","cursor","_mouseInside","_updateCanvasViewport","translate","LineUtil","simplify","tolerance","sqTolerance","_reducePoints","_simplifyDP","pointToSegmentDistance","p1","p2","_sqClosestPointOnSegment","closestPointOnSegment","markers","Uint8Array","_simplifyDPStep","newPoints","last","sqDist","maxSqDist","reducedPoints","prev","_sqDist","clipSegment","useLastCode","codeOut","newCode","codeA","_lastCode","_getBitCode","codeB","_getEdgeIntersection","t","dot","Polyline","_convertLatLngs","smoothFactor","noClip","_originalPoints","_getPathPartStr","getLatLngs","setLatLngs","addLatLng","spliceLatLngs","removed","closestLayerPoint","minDistance","parts","minPoint","jLen","distance","overwrite","_clipPoints","k","segment","lu","_simplifyPoints","polyline","PolyUtil","clipPolygon","clippedPoints","edge","edges","_code","_initWithHoles","hole","_holes","_holePoints","newParts","clipped","polygon","createMulti","Klass","_options","MultiPolyline","MultiPolygon","multiPolyline","multiPolygon","Rectangle","_boundsToLatLngs","setBounds","rectangle","Circle","radius","_mRadius","setRadius","lngRadius","_getLngRadius","pointLeft","_point","_radius","latRadius","getRadius","_getLatRadius","circle","CircleMarker","circleMarker","closed","part","w","arc","w2","GeoJSON","geojson","addData","feature","features","geometries","geometry","coordinates","geometryToLayer","pointToLayer","coordsToLatLng","asFeature","defaultOptions","resetStyle","onEachFeature","_setLayerStyle","vectorOptions","coords","coordsToLatLngs","properties","levelsDeep","latLngToCoords","latLngsToCoords","latLngs","getFeature","newGeometry","geoJSON","PointToGeoJSON","toGeoJSON","multiToGeoJSON","json","jsons","isGeometryCollection","geoJson","addListener","originalHandler","newType","_getEvent","addPointerListener","addDoubleTapListener","_checkMouse","_filterClick","attachEvent","removeListener","removePointerListener","removeDoubleTapListener","detachEvent","cancelBubble","Draggable","START","_fakeStop","returnValue","clientX","clientY","rect","clientTop","getWheelDelta","wheelDelta","detail","_skipEvents","skipped","related","relatedTarget","err","caller","callee","Event","timeStamp","elapsed","_lastClick","_simulatedClick","END","mousedown","touchstart","pointerdown","MSPointerDown","MOVE","dragStartTarget","_element","_dragStartTarget","_onDown","shiftKey","which","button","touches","_disabled","_moving","_startPoint","_startPos","_newPos","_onMove","_onUp","_lastTarget","srcElement","_animRequest","addHooks","removeHooks","enabled","inertia","inertiaDeceleration","inertiaMaxSpeed","inertiaThreshold","easeLinearity","worldCopyJump","Drag","_draggable","_onDragStart","_onDrag","_onDragEnd","_onPreDrag","_onViewReset","_panAnim","_positions","_times","_lastTime","_lastPos","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","worldWidth","halfWidth","newX1","newX2","newX","delay","noInertia","direction","duration","ease","speedVector","speed","limitedSpeed","limitedSpeedVector","decelerationDuration","noMoveStart","doubleClickZoom","DoubleClickZoom","_onDoubleClick","scrollWheelZoom","ScrollWheelZoom","_onWheelScroll","_delta","_lastMousePos","_startTime","_timer","_performZoom","_touchstart","_touchend","doubleTap","pre","touchend","trackedTouches","onTouchStart","count","pointerId","now","onTouchEnd","idx","prop","newTouch","endElement","POINTER_CANCEL","POINTER_DOWN","POINTER_MOVE","POINTER_UP","_pointers","_pointerDocumentListener","addPointerListenerStart","addPointerListenerEnd","addPointerListenerMove","pointers","cb","pointerType","MSPOINTER_TYPE_MOUSE","alreadyInArray","changedTouches","internalCb","buttons","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","viewCenter","_startCenter","_startDist","_centerOffset","_onTouchMove","_onTouchEnd","_scale","_updateOnMove","_getScaleOrigin","oldZoom","floatZoomDelta","roundZoomDelta","tap","tapTolerance","Tap","_fireClick","_holdTimeout","_isTapValid","_simulateEvent","simulatedEvent","createEvent","initMouseEvent","screenX","screenY","dispatchEvent","BoxZoom","_pane","_onMouseDown","_startLayerPoint","_onMouseUp","_onKeyDown","_box","startPoint","box","newPos","_finish","boxZoomBounds","keyboardPanOffset","keyboardZoomOffset","Keyboard","keyCodes","down","up","_setPanOffset","_setZoomOffset","_onFocus","_onBlur","_addHooks","_removeHooks","_focused","focus","scrollTo","keys","_panKeys","codes","_zoomKeys","_inProgress","_marker","shadow","iconPos","Control","removeControl","addControl","corner","_controlCorners","removeFrom","_refocusOnMap","control","corners","l","_controlContainer","createCorner","vSide","hSide","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","link","zoomControl","Attribution","_attributions","addAttribution","_onLayerAdd","_onLayerRemove","setPrefix","text","removeAttribution","attribs","prefixAndAttribs","attributionControl","Scale","metric","imperial","_addScales","_mScale","_iScale","centerLat","dist","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_getScaleWidth","maxMiles","miles","feet","maxFeet","ratio","pow10","Layers","collapsed","autoZIndex","baseLayers","overlays","_lastZIndex","_handlingClick","_addLayer","_onLayerChange","addBaseLayer","addOverlay","form","_form","_expand","_collapse","_layersLink","_onInputClick","_baseLayersList","_separator","_overlaysList","overlay","baseLayersPresent","overlaysPresent","_addItem","_createRadioElement","checked","radioHtml","radioFragment","input","label","defaultChecked","layerId","inputs","inputsLen","PosAnimation","run","_el","_onTransitionEnd","_stepTimer","setInterval","_onStep","_getPos","stepPos","_transformRe","clearInterval","_tryAnimatedZoom","_tryAnimatedPan","_onPanTransitionStep","_onPanTransitionEnd","_duration","_easeOutPower","_offset","_animate","_step","_complete","_animId","_runFrame","_easeOut","progress","zoomAnimationThreshold","_catchTransitionEnd","propertyName","_onZoomTransitionEnd","_nothingToAnimate","getElementsByClassName","backwards","forTouchZoom","_animateToCenter","_animateToZoom","_animating","_prepareBgBuffer","bg","initialTransform","scaleStr","front","bgLoaded","_getLoadedTilesPercentage","frontLoaded","_stopLoadingImages","complete","_defaultLocateOptions","watch","timeout","maximumAge","enableHighAccuracy","locate","_locateOptions","geolocation","_handleGeolocationError","message","onResponse","_handleGeolocationResponse","onError","_locationWatchId","watchPosition","getCurrentPosition","stopLocate","clearWatch","error","latitude","longitude","latAccuracy","accuracy","lngAccuracy","timestamp","webpackContext","req","webpackContextResolve","__webpack_require__","o","resolve","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","definition","defineProperty","enumerable","Symbol","toStringTag","msPointerEnabled","msMaxTouchPoints","maxTouchPoints","windowMediaMatches","_orientation","innerWidth","innerHeight","trace","classMixin","cls","_cl","getOwnPropertyNames","mergeData","data_main","data_to_merge","unique_ID","getRandomChar","range","substr","random","randomID","htmlify","emoji","regx_arr","regx","Emoji","h","loadJS","urls","loader","js","loadCSS","pending","styleSheets","env","getEnv","head","pollCount","createNode","attrs","attr","node","finish","load","unknown","pendingUrls","isCSS","nodes","rel","onreadystatechange","readyState","pollWebKit","pollGecko","hasRules","sheet","cssRules","ex","self","Dom","getByClass","createText","createTextNode","TRANSLATE_OPEN","TRANSLATE_CLOSE","_vco_pos","Easings","Ease","KeySpline","A","aA1","aA2","B","C","CalcBezier","aT","GetSlope","aX","aGuessT","currentSlope","GetTForX","easeInSpline","easeInOutExpo","easeOut","easeOutStrong","easeIn","easeInStrong","easeOutBounce","easeInBack","easeOutBack","bounce","bouncePast","swingTo","swingFrom","elastic","spring","blink","blinks","pulse","pulses","wobble","sinusoidal","flicker","easings","mirror","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","EN","Language","setLanguage","lang","assign","getLanguage","_vco_events","DomMixins","show","hide","animatePosition","use_percent","ani","easing","animator","VCO","Animate","onLoaded","elem","map_mask","_mini_map","_markers","zoom_min_max","_line","_line_active","current_marker","bounds_array","_tile_layer","_tile_layer_mini","_image_layer","uniqueid","slides","map_type","map_as_image","map_mini","map_background_color","map_subdomains","map_access_token","zoomify","skinny_size","less_bounce","path_gfx","start_at_slide","map_popup","zoom_distance","calculate_zoom","line_follows_path","line_color","line_color_inactive","line_weight","line_opacity","line_dash","line_join","show_lines","show_history_line","map_center_offset","timer","touch_scale","scroll","start_time","_createMap","_initData","updateDisplay","_updateDisplay","goTo","n","change","previous_marker","_resetMarkersActive","_markerOverview","_onMarkerChange","active","location","_viewTo","_calculateZoomChange","_getMapCenter","real_marker","lines_array","line_num","_replaceLines","loc","_panTo","zoomTo","_zoomTo","viewTo","opts","m1","m2","__getBoundsZoom","markerOverview","calculateMarkerZooms","_calculateMarkerZooms","createMiniMap","_createMiniMap","setMapOffset","calculateMinMaxZoom","updateMinMaxZoom","initialMapLocation","_initialMapLocation","createMarkers","array","_createMarkers","createMarker","_createMarker","_destroyMarker","_removeMarker","_addToLine","_createLines","_onMarkerClick","_addMarker","marker_number","_createLine","line","_addLineToMap","_updateMapDisplay","_refreshMap","_getMapLocation","m","_getMapZoom","_getBoundsZoom","_onMapLoaded","_onWheel","ctrlKey","deltaY","time_left","_scollZoom","current_zoom","timer_done","_scollZoomDone","destination","correct_for_center","defaultZoomifyOptions","ZoomifyTileLayer","super","imageSize","_imageSize","_gridSize","_getGridSize","reverse","mapSize","_getBestFitZoom","getZoomifyBounds","topleft","bottomright","getCenterZoom","gridSize","console","_getTileGroup","BASE_OPTIONS","toggleDisplay","zoomLevelOffset","zoomLevelFixed","autoToggleDisplay","show_view","aimingRectOptions","shadowRectOptions","MiniMapControl","hideText","showText","_mainMap","_miniMap","_mainMapMoving","_miniMapMoving","_userToggledDisplay","_minimized","_addToggleButton","_aimingRect","_shadowRect","_locationCircle","_onMainMapMoved","_onMainMapMoving","minimize","hide_completely","_minimize","_restore","_decideZoom","_setDisplay","_decideMinimized","_onMiniMapMoved","_toggleDisplayButton","_toggleDisplayButtonClicked","border","_onMiniMapMoveStarted","lastAimingRect","_lastAimingRectPosition","_onMiniMapMoving","fromMaintoMini","toRet","currentDiff","proposedZoom","_lastMiniMapZoom","miniMapControl","MiniMap","minimap","MapMarker","content_container","_custom_icon","_custom_icon_url","_custom_image_icon","media_icon_class","_addTo","_removeFrom","createPopup","_createPopup","_active","_location","LeafletMapMarker","use_custom_marker","use_custom_markers","_customIconAnchor","_createImage","_createDefaultIcon","headline","media","mediatype","_setIcon","iconUrl","MAKE_PROVIDER","PROVIDERS","setupFlavors","base","flavors","provider","getProvider","flavor","StamenTileLayer","scheme","Leaflet","_onMapMoveEnd","_createTileLayer","_onTilesLoaded","_getAllMarkersBounds","backgroundColor","_createBackgroundMap","target_tile","start","end","t_array","_tilelayer","_attribution_knightlab","_map_type_arr","mapbox_url","style_url","_onMapZoomed","_onMapZoom","_center_zoom","_getMapCenterOffset","the_bounds","markers_array","prev_marker","next_marker","marker_location","prev_marker_zoom","next_marker_zoom","calculated_zoom","target_point","_origin","_padding","_lat","_lng","_getZoomifyZoom","true_hide","zoom_array","best_zoom","smallest_zoom","getTiles","drag_elem","move_elem","drag","move","constraint","momentum_multiplier","dragevent","mousedrag","touchdrag","sliding","pagex","pagey","new_pos","new_pos_parent","stopMomentum","updateConstraint","targetTouches","pageX","pageY","getTime","_onDragMove","leave","_momentum","pos_adjust","pos_change","swipe","_animateMomentum","MenuBar","parent_elem","button_overview","button_backtostart","button_collapse_toggle","arrow","coverbar","grip","menubar_default_y","setSticky","setColor","inverted","_onButtonOverview","_onButtonBackToStart","_onButtonCollapseMap","collapse_toggle","uncollapse_toggle","overview","map_overview","backtostart","layout","storymapAnimate","win","perf","performance","perfNow","webkitNow","msNow","mozNow","fixTs","thousand","rgbOhex","relVal","numUnit","rotate","skew","unitless","lineHeight","property","camelize","computed","val","e1","e2","frame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","render","die","f","rest","has","parseTransform","values","by","skewx","skewy","translatex","translatey","formatTransform","toHex","g","fun","nativeTween","tween","done","from","to","morpheus","diff","jump","bezier","getTweenVal","units","begin","charAt","nextColor","exec","elements","originalLeft","originalTop","els","bez","xy","unshift","unit","SlideNav","add_to_container","description","animator_position","updatePosition","start_value","return_to_default","prop_to_set","_onUpdatePositionComplete","_start_value","date","Message","message_container","loading_icon","message_class","message_icon_class","updateMessage","_updateMessage","messages","Media","content_item","content_link","caption","credit","player","load_timer","media_id","_state","loaded","show_meta","media_loaded","link_target","api_key_flickr","credit_height","caption_height","loadMedia","_loadMedia","_media","loadingMessage","_","media_name","updateMediaDisplay","_updateMediaDisplay","stopMedia","_stopMedia","loadErrorDisplay","media_type","showMeta","onMediaLoaded","Image","getAttribute","YouTube","url_vars","youtube_loaded","string","hash","hashes","vars","getUrlVars","hd","createMedia","getPlayerState","YT","PlayerState","PLAYING","pauseVideo","vidstart","vid_start_minutes","vid_start_seconds","createPlayer","Player","playerVars","enablejsapi","autohide","showinfo","theme","fs","videoId","onReady","onPlayerReady","onStateChange","ENDED","seekTo","Blockquote","Wikipedia","api_url","api_language","callbackPrefix","callbackName","callbackScript","wiki","query","entry","extract","paragraphs","text_array","getObjectAttributeByIndex","pages","wikipedia","SoundCloud","fetch","then","soundCloudCreated","widget","SC","Widget","querySelector","pause","Vimeo","frameBorder","contentWindow","postMessage","JSON","stringify","DailyMotion","Vine","Twitter","user_id","tweetuser","tweet_status_url","tweet_status_date","tweet","tweet_text","tweet_status_temp","author_url","author_name","Flickr","establishMediaID","stat","best_size","sizes","GoogleDoc","Slider","IFrame","iframe","Website","Video","MediaType","media_types","match_str","Text","start_btn","setData","headlineHeight","addDateText","headline_class","text_content","created_time","moment","fromNow","pattern","date_parts","date_array","months","year","getFullYear","month","getMonth","day","getDate","convertUnixTime","Slide","title_slide","scroll_container","background","call_to_action","_mediaclass","_text","color_value","slide_padding_lr","slider_container","setActive","is_active","getBackground","scrollToTop","addCallToAction","_onCallToAction","backgroundImage","text_background","pad_left","pad_right","new_width","paddingLeft","paddingRight","Swipable","snap","swipe_detect","StorySlider","slider_container_mask","slider_item_container","_nav","previous","next","slide_spacing","_slides","_swipable","preloadTimer","_message","current_slide","current_bg_color","default_bg_color","slide_default_fade","animator_background","_onLoaded","_introInterface","createSlide","_createSlide","createSlides","_createSlides","slide","_addSlide","_destroySlide","_removeSlide","_onSlideAdded","_onBackgroundChange","goToId","fast","displayupdate","_n","String","findArrayNumberByUniqueID","changeBackground","_onSlideChange","showNav","getNavInfo","preloadSlides","nav_obj","bg_color_rgb","do_animation","bg_color","bg_percent_start","bg_alpha_end","bg_css","hex","result","hexToRgb","fadeInBackground","nav_pos","_layout","_str","call_to_action_text","swipe_to_navigate","_onNavigation","_onMessageClick","_onSwipeNoDirection","slide_background","_onSlideRemoved","StoryMap","callbacks","ready","storyslider","menubar","_storyslider","_menubar","script_path","SCRIPT_PATH","base_class","map_size_sticky","menubar_height","relative_date","map_height","storyslider_height","language","animator_map","animator_storyslider","response","storymap","_initOptions","updateData","old_type","_loadLanguage","base_url","substring","url1","url2","url3","urljoin","_onDataLoaded","_onStorySliderLoaded","_onTitle","_onMenuBarCollapse","_onBackToStart","_onOverview","_onColorChange","_onMapChange","display_class","StoryMapClass","lastIndexOf","msg","Load","getJSON","httpRequest","XMLHttpRequest","DONE","status","parse","responseText","alert","open","send","lightboxDiv"],"sourceRoot":""}