diff --git a/code/pages/Locator.php b/code/pages/Locator.php index fecc6a1..e0b0f64 100644 --- a/code/pages/Locator.php +++ b/code/pages/Locator.php @@ -63,9 +63,9 @@ public function getCMSFields() $fields->addFieldsToTab('Root.Settings', array( HeaderField::create('DisplayOptions', 'Display Options', 3), OptionsetField::create('Unit', 'Unit of measure', array('m' => 'Miles', 'km' => 'Kilometers')), - CheckboxField::create('AutoGeocode', 'Auto Geocode - Automatically filter map results based on user location') - ->setDescription('Note: if any locations are set as featured, the auto geocode is automatically disabled.'), - CheckboxField::create('ModalWindow', 'Modal Window - Show Map results in a modal window'), + //CheckboxField::create('AutoGeocode', 'Auto Geocode - Automatically filter map results based on user location') + // ->setDescription('Note: if any locations are set as featured, the auto geocode is automatically disabled.'), + //CheckboxField::create('ModalWindow', 'Modal Window - Show Map results in a modal window'), )); // Filter categories @@ -199,6 +199,32 @@ class Locator_Controller extends Page_Controller */ private static $bootstrapify = true; + /** + * @var int + */ + private static $limit = 50; + + /** + * ID of map container + * + * @var string + */ + private static $map_container = 'map'; + + /** + * class of location list container + * + * @var string + */ + private static $list_container = 'loc-list'; + + /** + * GET variable which, if isset, will trigger storeLocator init and return XML + * + * @var string + */ + private static $query_trigger = 'action_doFilterLocations'; + /** * @var DataList|ArrayList */ @@ -211,57 +237,66 @@ public function init() { parent::init(); - // google maps api key - $key = Config::inst()->get('GoogleGeocoding', 'google_api_key'); - - $locations = $this->getLocations(); - - if ($locations) { - - Requirements::css('locator/css/map.css'); - Requirements::javascript('framework/thirdparty/jquery/jquery.js'); - Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key); - Requirements::javascript('locator/thirdparty/handlebars/handlebars-v1.3.0.js'); - Requirements::javascript('locator/thirdparty/jquery-store-locator/js/jquery.storelocator.js'); - - $featuredInList = ($locations->filter('Featured', true)->count() > 0); - $defaultCoords = $this->getAddressSearchCoords() ? $this->getAddressSearchCoords() : ''; - $isChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE); - - $featured = $featuredInList - ? 'featuredLocations: true' - : 'featuredLocations: false'; + // prevent init of map if no query + $request = Controller::curr()->getRequest(); + if ($this->getTrigger($request)) { + // google maps api key + $key = Config::inst()->get('GoogleGeocoding', 'google_api_key'); + + $locations = $this->getLocations(); + + if ($locations) { + + Requirements::css('locator/css/map.css'); + Requirements::javascript('framework/thirdparty/jquery/jquery.js'); + Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key); + Requirements::javascript('locator/thirdparty/jquery-store-locator-plugin/assets/js/libs/handlebars.min.js'); + Requirements::javascript('locator/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/jquery.storelocator.js'); + + $featuredInList = ($locations->filter('Featured', true)->count() > 0); + $defaultCoords = $this->getAddressSearchCoords() ? $this->getAddressSearchCoords() : ''; + $isChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE); + + $featured = $featuredInList + ? 'featuredLocations: true' + : 'featuredLocations: false'; + + // map config based on user input in Settings tab + // AutoGeocode or Full Map + $limit = Config::inst()->get('Locator_Controller', 'limit'); + if ($limit < 1) $limit = -1; + if ($this->data()->AutoGeocode) { + $load = $featuredInList || $defaultCoords != '' || $isChrome + ? 'autoGeocode: false, fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,' + : 'autoGeocode: true, fullMapStart: false,'; + } else { + $load = 'autoGeocode: false, fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,'; + } - // map config based on user input in Settings tab - // AutoGeocode or Full Map - if ($this->data()->AutoGeocode) { - $load = $featuredInList || $defaultCoords != '' || $isChrome - ? 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,' - : 'autoGeocode: true, fullMapStart: false,'; - } else { - $load = 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; - } + $listTemplatePath = Config::inst()->get('Locator_Controller', 'list_template_path'); + $infowindowTemplatePath = Config::inst()->get('Locator_Controller', 'info_window_template_path'); - $listTemplatePath = Config::inst()->get('Locator_Controller', 'list_template_path'); - $infowindowTemplatePath = Config::inst()->get('Locator_Controller', 'info_window_template_path'); + // in page or modal + $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false'; - // in page or modal - $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false'; + $kilometer = ($this->data()->Unit == 'km') ? "lengthUnit: 'km'" : "lengthUnit: 'm'"; - $kilometer = ($this->data()->Unit == 'km') ? 'lengthUnit: "km"' : 'lengthUnit: "m"'; + // pass GET variables to xml action + $vars = $this->request->getVars(); + unset($vars['url']); + $url = ''; + if (count($vars)) { + $url .= '?' . http_build_query($vars); + } + $link = Controller::join_links($this->AbsoluteLink(), 'xml.xml', $url); + $link = Controller::join_links($this->Link(), 'xml.xml', $url); - // pass GET variables to xml action - $vars = $this->request->getVars(); - unset($vars['url']); - unset($vars['action_doFilterLocations']); - $url = ''; - if (count($vars)) { - $url .= '?' . http_build_query($vars); - } - $link = $this->Link() . 'xml.xml' . $url; + // containers + $map_id = Config::inst()->get('Locator_Controller', 'map_container'); + $list_class = Config::inst()->get('Locator_Controller', 'list_container'); - // init map - Requirements::customScript(" + // init map + Requirements::customScript(" $(function(){ $('#map-container').storeLocator({ " . $load . " @@ -269,17 +304,26 @@ public function init() listTemplatePath: '" . $listTemplatePath . "', infowindowTemplatePath: '" . $infowindowTemplatePath . "', originMarker: true, - " . $modal . ', - ' . $featured . ", + //" . $modal . ", + " . $featured . ", slideMap: false, - zoomLevel: 0, - noForm: true, distanceAlert: -1, - " . $kilometer . ', - ' . $defaultCoords . ' + " . $kilometer . ", + " . $defaultCoords . " + mapID: '" . $map_id . "', + locationList: '" . $list_class . "', + mapSettings: { + zoom: 12, + mapTypeId: google.maps.MapTypeId.ROADMAP, + disableDoubleClickZoom: true, + scrollwheel: false, + navigationControl: false, + draggable: false + } }); }); - '); + "); + } } } @@ -290,7 +334,11 @@ public function init() */ public function index(SS_HTTPRequest $request) { - $locations = $this->getLocations(); + if ($this->getTrigger($request)) { + $locations = $this->getLocations(); + } else { + $locations = ArrayList::create(); + } return $this->customise(array( 'Locations' => $locations, @@ -305,7 +353,11 @@ public function index(SS_HTTPRequest $request) */ public function xml(SS_HTTPRequest $request) { - $locations = $this->getLocations(); + if ($this->getTrigger($request)) { + $locations = $this->getLocations(); + } else { + $locations = ArrayList::create(); + } return $this->customise(array( 'Locations' => $locations, @@ -366,11 +418,29 @@ public function setLocations(SS_HTTPRequest $request = null) //allow for returning list to be set as $this->extend('updateListType', $locations); + $limit = Config::inst()->get('Locator_Controller', 'limit'); + if ($limit > 0) { + $locations = $locations->limit($limit); + } + $this->locations = $locations; return $this; } + /** + * @param SS_HTTPRequest $request + * @return bool + */ + public function getTrigger(SS_HTTPRequest $request = null) + { + if ($request === null) { + $request = $this->getRequest(); + } + $trigger = $request->getVar(Config::inst()->get('Locator_Controller', 'query_trigger')); + return isset($trigger); + } + /** * @return bool|string */ diff --git a/css/map.css b/css/map.css index 0898e99..79d125e 100644 --- a/css/map.css +++ b/css/map.css @@ -67,7 +67,7 @@ /* === Results List === */ -#loc-list +.loc-list { float: left; height: 530px; @@ -75,7 +75,7 @@ overflow: auto; } -#loc-list ul +.loc-list ul { display: block; clear: left; @@ -86,7 +86,7 @@ width: 100%; } -#loc-list .list-label +.loc-list .list-label { float: left; margin: 10px 0 0 6px; @@ -98,26 +98,26 @@ font-weight: bold; } -#loc-list .list-details +.loc-list .list-details { float: left; margin-left: 6px; width: 165px; } -#loc-list .list-content +.loc-list .list-content { padding: 10px; } -#loc-list .loc-dist +.loc-list .loc-dist { font-weight: bold; font-style: italic; color: #8e8e8e; } -#loc-list li +.loc-list li { display: block; clear: left; @@ -128,10 +128,10 @@ border: 1px solid #fff; /* Adding this to prevent moving li elements when adding the list-focus class*/ } -#loc-list li:first-child {margin-top: 0px;} +.loc-list li:first-child {margin-top: 0px;} -#loc-list .list-focus +.loc-list .list-focus { border: 1px solid rgba(82,168,236,0.9); -moz-box-shadow: 0 0 8px rgba(82,168,236,0.7); @@ -215,7 +215,7 @@ @media only screen and (max-width: 960px) { - #loc-list { + .loc-list { } @@ -231,15 +231,15 @@ @media only screen and (min-width: 641px) and (max-width: 959px) { - #loc-list .list-label{ + .loc-list .list-label{ margin-left: 0px; } - #loc-list .list-content { + .loc-list .list-content { padding: 10px 0px; } - #loc-list .list-details { + .loc-list .list-details { width: 140px; } @@ -248,7 +248,7 @@ @media only screen and (max-width: 640px) { - #loc-list { + .loc-list { width: 100%; height: auto; } diff --git a/templates/Layout/Locator.ss b/templates/Layout/Locator.ss index bed81c7..5d8493d 100644 --- a/templates/Layout/Locator.ss +++ b/templates/Layout/Locator.ss @@ -1,17 +1,14 @@

$Title

<% if $Content %>
$Content
<% end_if %> +
+ $LocationSearch +
<% if $Locations %> -

$Locations.Count locations

-
- $LocationSearch -
-
-
+
    -
diff --git a/templates/LocationXML.ss b/templates/LocationXML.ss index d6f3e0e..e4c923a 100644 --- a/templates/LocationXML.ss +++ b/templates/LocationXML.ss @@ -1,3 +1,5 @@ +<% if $Locations %> <% loop $Locations %>distance="$distance"<% end_if %> /><% end_loop %> - \ No newline at end of file + +<% end_if %> \ No newline at end of file diff --git a/thirdparty/handlebars/handlebars-v1.3.0.js b/thirdparty/handlebars/handlebars-v1.3.0.js deleted file mode 100644 index bec7085..0000000 --- a/thirdparty/handlebars/handlebars-v1.3.0.js +++ /dev/null @@ -1,2746 +0,0 @@ -/*! - - handlebars v1.3.0 - -Copyright (C) 2011 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -@license -*/ -/* exported Handlebars */ -var Handlebars = (function() { -// handlebars/safe-string.js -var __module4__ = (function() { - "use strict"; - var __exports__; - // Build out our basic SafeString type - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = function() { - return "" + this.string; - }; - - __exports__ = SafeString; - return __exports__; -})(); - -// handlebars/utils.js -var __module3__ = (function(__dependency1__) { - "use strict"; - var __exports__ = {}; - /*jshint -W004 */ - var SafeString = __dependency1__; - - var escape = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" - }; - - var badChars = /[&<>"'`]/g; - var possible = /[&<>"'`]/; - - function escapeChar(chr) { - return escape[chr] || "&"; - } - - function extend(obj, value) { - for(var key in value) { - if(Object.prototype.hasOwnProperty.call(value, key)) { - obj[key] = value[key]; - } - } - } - - __exports__.extend = extend;var toString = Object.prototype.toString; - __exports__.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - var isFunction = function(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - if (isFunction(/x/)) { - isFunction = function(value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - var isFunction; - __exports__.isFunction = isFunction; - var isArray = Array.isArray || function(value) { - return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; - }; - __exports__.isArray = isArray; - - function escapeExpression(string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof SafeString) { - return string.toString(); - } else if (!string && string !== 0) { - return ""; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = "" + string; - - if(!possible.test(string)) { return string; } - return string.replace(badChars, escapeChar); - } - - __exports__.escapeExpression = escapeExpression;function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - __exports__.isEmpty = isEmpty; - return __exports__; -})(__module4__); - -// handlebars/exception.js -var __module5__ = (function() { - "use strict"; - var __exports__; - - var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var line; - if (node && node.firstLine) { - line = node.firstLine; - - message += ' - ' + line + ':' + node.firstColumn; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - if (line) { - this.lineNumber = line; - this.column = node.firstColumn; - } - } - - Exception.prototype = new Error(); - - __exports__ = Exception; - return __exports__; -})(); - -// handlebars/base.js -var __module2__ = (function(__dependency1__, __dependency2__) { - "use strict"; - var __exports__ = {}; - var Utils = __dependency1__; - var Exception = __dependency2__; - - var VERSION = "1.3.0"; - __exports__.VERSION = VERSION;var COMPILER_REVISION = 4; - __exports__.COMPILER_REVISION = COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '>= 1.0.0' - }; - __exports__.REVISION_CHANGES = REVISION_CHANGES; - var isArray = Utils.isArray, - isFunction = Utils.isFunction, - toString = Utils.toString, - objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials) { - this.helpers = helpers || {}; - this.partials = partials || {}; - - registerDefaultHelpers(this); - } - - __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: log, - - registerHelper: function(name, fn, inverse) { - if (toString.call(name) === objectType) { - if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); } - Utils.extend(this.helpers, name); - } else { - if (inverse) { fn.not = inverse; } - this.helpers[name] = fn; - } - }, - - registerPartial: function(name, str) { - if (toString.call(name) === objectType) { - Utils.extend(this.partials, name); - } else { - this.partials[name] = str; - } - } - }; - - function registerDefaultHelpers(instance) { - instance.registerHelper('helperMissing', function(arg) { - if(arguments.length === 2) { - return undefined; - } else { - throw new Exception("Missing helper: '" + arg + "'"); - } - }); - - instance.registerHelper('blockHelperMissing', function(context, options) { - var inverse = options.inverse || function() {}, fn = options.fn; - - if (isFunction(context)) { context = context.call(this); } - - if(context === true) { - return fn(this); - } else if(context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if(context.length > 0) { - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - return fn(context); - } - }); - - instance.registerHelper('each', function(context, options) { - var fn = options.fn, inverse = options.inverse; - var i = 0, ret = "", data; - - if (isFunction(context)) { context = context.call(this); } - - if (options.data) { - data = createFrame(options.data); - } - - if(context && typeof context === 'object') { - if (isArray(context)) { - for(var j = context.length; i 0) { - throw new Exception("Invalid path: " + original, this); - } else if (part === "..") { - depth++; - } else { - this.isScoped = true; - } - } else { - dig.push(part); - } - } - - this.original = original; - this.parts = dig; - this.string = dig.join('.'); - this.depth = depth; - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - this.isSimple = parts.length === 1 && !this.isScoped && depth === 0; - - this.stringModeValue = this.string; - }, - - PartialNameNode: function(name, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "PARTIAL_NAME"; - this.name = name.original; - }, - - DataNode: function(id, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "DATA"; - this.id = id; - }, - - StringNode: function(string, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "STRING"; - this.original = - this.string = - this.stringModeValue = string; - }, - - IntegerNode: function(integer, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "INTEGER"; - this.original = - this.integer = integer; - this.stringModeValue = Number(integer); - }, - - BooleanNode: function(bool, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "BOOLEAN"; - this.bool = bool; - this.stringModeValue = bool === "true"; - }, - - CommentNode: function(comment, locInfo) { - LocationInfo.call(this, locInfo); - this.type = "comment"; - this.comment = comment; - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // most modify the object to operate properly. - __exports__ = AST; - return __exports__; -})(__module5__); - -// handlebars/compiler/parser.js -var __module9__ = (function() { - "use strict"; - var __exports__; - /* jshint ignore:start */ - /* Jison generated parser */ - var handlebars = (function(){ - var parser = {trace: function trace() { }, - yy: {}, - symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1}, - terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"}, - productions_: [0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]], - performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: return new yy.ProgramNode($$[$0-1], this._$); - break; - case 2: return new yy.ProgramNode([], this._$); - break; - case 3:this.$ = new yy.ProgramNode([], $$[$0-1], $$[$0], this._$); - break; - case 4:this.$ = new yy.ProgramNode($$[$0-2], $$[$0-1], $$[$0], this._$); - break; - case 5:this.$ = new yy.ProgramNode($$[$0-1], $$[$0], [], this._$); - break; - case 6:this.$ = new yy.ProgramNode($$[$0], this._$); - break; - case 7:this.$ = new yy.ProgramNode([], this._$); - break; - case 8:this.$ = new yy.ProgramNode([], this._$); - break; - case 9:this.$ = [$$[$0]]; - break; - case 10: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; - break; - case 11:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0], this._$); - break; - case 12:this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0], this._$); - break; - case 13:this.$ = $$[$0]; - break; - case 14:this.$ = $$[$0]; - break; - case 15:this.$ = new yy.ContentNode($$[$0], this._$); - break; - case 16:this.$ = new yy.CommentNode($$[$0], this._$); - break; - case 17:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$); - break; - case 18:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$); - break; - case 19:this.$ = {path: $$[$0-1], strip: stripFlags($$[$0-2], $$[$0])}; - break; - case 20:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$); - break; - case 21:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], stripFlags($$[$0-2], $$[$0]), this._$); - break; - case 22:this.$ = new yy.PartialNode($$[$0-2], $$[$0-1], stripFlags($$[$0-3], $$[$0]), this._$); - break; - case 23:this.$ = stripFlags($$[$0-1], $$[$0]); - break; - case 24:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$); - break; - case 25:this.$ = new yy.SexprNode([$$[$0]], null, this._$); - break; - case 26:this.$ = $$[$0]; - break; - case 27:this.$ = new yy.StringNode($$[$0], this._$); - break; - case 28:this.$ = new yy.IntegerNode($$[$0], this._$); - break; - case 29:this.$ = new yy.BooleanNode($$[$0], this._$); - break; - case 30:this.$ = $$[$0]; - break; - case 31:$$[$0-1].isHelper = true; this.$ = $$[$0-1]; - break; - case 32:this.$ = new yy.HashNode($$[$0], this._$); - break; - case 33:this.$ = [$$[$0-2], $$[$0]]; - break; - case 34:this.$ = new yy.PartialNameNode($$[$0], this._$); - break; - case 35:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$); - break; - case 36:this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0], this._$)); - break; - case 37:this.$ = new yy.DataNode($$[$0], this._$); - break; - case 38:this.$ = new yy.IdNode($$[$0], this._$); - break; - case 39: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; - break; - case 40:this.$ = [{part: $$[$0]}]; - break; - case 43:this.$ = []; - break; - case 44:$$[$0-1].push($$[$0]); - break; - case 47:this.$ = [$$[$0]]; - break; - case 48:$$[$0-1].push($$[$0]); - break; - } - }, - table: [{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}], - defaultActions: {3:[2,2],16:[2,1],50:[2,42]}, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - - - function stripFlags(open, close) { - return { - left: open.charAt(2) === '~', - right: close.charAt(0) === '~' || close.charAt(1) === '~' - }; - } - - /* Jison generated lexer */ - var lexer = (function(){ - var lexer = ({EOF:1, - parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput:function (input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; - if (this.options.ranges) this.yylloc.range = [0,0]; - this.offset = 0; - return this; - }, - input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length-len-1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length-1); - this.matched = this.matched.substr(0, this.matched.length-1); - - if (lines.length-1) this.yylineno -= lines.length-1; - var r = this.yylloc.range; - - this.yylloc = {first_line: this.yylloc.first_line, - last_line: this.yylineno+1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more:function () { - this._more = true; - return this; - }, - less:function (n) { - this.unput(this.match.slice(n)); - }, - pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); - }, - showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c+"^"; - }, - next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, - match, - tempMatch, - index, - col, - lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i=0;i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = {first_line: this.yylloc.last_line, - last_line: this.yylineno+1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); - if (this.done && this._input) this.done = false; - if (token) return token; - else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), - {text: "", token: null, line: this.yylineno}); - } - }, - lex:function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin:function begin(condition) { - this.conditionStack.push(condition); - }, - popState:function popState() { - return this.conditionStack.pop(); - }, - _currentRules:function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; - }, - topState:function () { - return this.conditionStack[this.conditionStack.length-2]; - }, - pushState:function begin(condition) { - this.begin(condition); - }}); - lexer.options = {}; - lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { - - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng-end); - } - - - var YYSTATE=YY_START - switch($avoiding_name_collisions) { - case 0: - if(yy_.yytext.slice(-2) === "\\\\") { - strip(0,1); - this.begin("mu"); - } else if(yy_.yytext.slice(-1) === "\\") { - strip(0,1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if(yy_.yytext) return 14; - - break; - case 1:return 14; - break; - case 2: - this.popState(); - return 14; - - break; - case 3:strip(0,4); this.popState(); return 15; - break; - case 4:return 35; - break; - case 5:return 36; - break; - case 6:return 25; - break; - case 7:return 16; - break; - case 8:return 20; - break; - case 9:return 19; - break; - case 10:return 19; - break; - case 11:return 23; - break; - case 12:return 22; - break; - case 13:this.popState(); this.begin('com'); - break; - case 14:strip(3,5); this.popState(); return 15; - break; - case 15:return 22; - break; - case 16:return 41; - break; - case 17:return 40; - break; - case 18:return 40; - break; - case 19:return 44; - break; - case 20:// ignore whitespace - break; - case 21:this.popState(); return 24; - break; - case 22:this.popState(); return 18; - break; - case 23:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 32; - break; - case 24:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 32; - break; - case 25:return 42; - break; - case 26:return 34; - break; - case 27:return 34; - break; - case 28:return 33; - break; - case 29:return 40; - break; - case 30:yy_.yytext = strip(1,2); return 40; - break; - case 31:return 'INVALID'; - break; - case 32:return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; - lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}}; - return lexer;})() - parser.lexer = lexer; - function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; - return new Parser; - })();__exports__ = handlebars; - /* jshint ignore:end */ - return __exports__; -})(); - -// handlebars/compiler/base.js -var __module8__ = (function(__dependency1__, __dependency2__) { - "use strict"; - var __exports__ = {}; - var parser = __dependency1__; - var AST = __dependency2__; - - __exports__.parser = parser; - - function parse(input) { - // Just return if an already-compile AST was passed in. - if(input.constructor === AST.ProgramNode) { return input; } - - parser.yy = AST; - return parser.parse(input); - } - - __exports__.parse = parse; - return __exports__; -})(__module9__, __module7__); - -// handlebars/compiler/compiler.js -var __module10__ = (function(__dependency1__) { - "use strict"; - var __exports__ = {}; - var Exception = __dependency1__; - - function Compiler() {} - - __exports__.Compiler = Compiler;// the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - disassemble: function() { - var opcodes = this.opcodes, opcode, out = [], params, param; - - for (var i=0, l=opcodes.length; i 0) { - this.source[1] = this.source[1] + ", " + locals.join(", "); - } - - // Generate minimizer alias mappings - if (!this.isChild) { - for (var alias in this.context.aliases) { - if (this.context.aliases.hasOwnProperty(alias)) { - this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; - } - } - } - - if (this.source[1]) { - this.source[1] = "var " + this.source[1].substring(2) + ";"; - } - - // Merge children - if (!this.isChild) { - this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; - } - - if (!this.environment.isSimple) { - this.pushSource("return buffer;"); - } - - var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; - - for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); } - return this.topStackName(); - }, - topStackName: function() { - return "stack" + this.stackSlot; - }, - flushInline: function() { - var inlineStack = this.inlineStack; - if (inlineStack.length) { - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - this.pushStack(entry); - } - } - } - }, - isInline: function() { - return this.inlineStack.length; - }, - - popStack: function(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - if (!inline) { - if (!this.stackSlot) { - throw new Exception('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function(wrapped) { - var stack = (this.isInline() ? this.inlineStack : this.compileStack), - item = stack[stack.length - 1]; - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - return item; - } - }, - - quotedString: function(str) { - return '"' + str - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') - .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - setupHelper: function(paramSize, name, missingParams) { - var params = [], - paramsInit = this.setupParams(paramSize, params, missingParams); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: ["depth0"].concat(params).join(", "), - helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ") - }; - }, - - setupOptions: function(paramSize, params) { - var options = [], contexts = [], types = [], param, inverse, program; - - options.push("hash:" + this.popStack()); - - if (this.options.stringParams) { - options.push("hashTypes:" + this.popStack()); - options.push("hashContexts:" + this.popStack()); - } - - inverse = this.popStack(); - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - if (!program) { - this.context.aliases.self = "this"; - program = "self.noop"; - } - - if (!inverse) { - this.context.aliases.self = "this"; - inverse = "self.noop"; - } - - options.push("inverse:" + inverse); - options.push("fn:" + program); - } - - for(var i=0; i * { + box-sizing: content-box !important; +} +.bh-sl-container .jumbotron { + padding-top: 30px; +} +.bh-sl-container .form-input input, +.bh-sl-container .form-input select, +.bh-sl-container .form-input label { + margin-right: 10px; +} +.bh-sl-container .bh-sl-loading { + float: left; + margin: 4px 0 0 10px; + width: 16px; + height: 16px; + background: url(../img/ajax-loader.gif) no-repeat; +} +.bh-sl-container .bh-sl-filters-container { + clear: both; + width: 100%; + margin: 15px 0; +} +.bh-sl-container .bh-sl-filters-container .bh-sl-filters { + list-style: none; + float: left; + padding: 0; + margin: 0 100px 0 0; +} +.bh-sl-container .bh-sl-filters-container .bh-sl-filters li { + display: block; + clear: left; + float: left; + width: 100%; + margin: 5px 0; +} +.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label { + display: inline; +} +.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input { + display: block; + float: left; + margin: 2px 8px 2px 0; +} +.bh-sl-container .bh-sl-map-container { + margin-top: 27px; +} +.bh-sl-container .bh-sl-map-container a { + color: #005293; + text-decoration: none; +} +.bh-sl-container .bh-sl-map-container a:hover, +.bh-sl-container .bh-sl-map-container a:active { + text-decoration: underline; +} +.bh-sl-container .bh-sl-loc-list { + height: 530px; + overflow-x: auto; + font-size: 13px; +} +.bh-sl-container .bh-sl-loc-list ul { + display: block; + clear: left; + float: left; + width: 100%; + list-style: none; + margin: 0; + padding: 0; +} +.bh-sl-container .bh-sl-loc-list ul li { + display: block; + clear: left; + float: left; + margin: 3% 4%; + cursor: pointer; + width: 92%; + border: 1px solid #ffffff; + /* Adding this to prevent moving li elements when adding the list-focus class*/ +} +.bh-sl-container .bh-sl-loc-list .list-label { + float: left; + margin: 10px 0 0 6px; + padding: 4px; + width: 27px; + text-align: center; + background: #00192d; + color: #ffffff; + font-weight: bold; + border-radius: 15px; +} +.bh-sl-container .bh-sl-loc-list .list-details { + float: left; + margin-left: 6px; + width: 80%; +} +.bh-sl-container .bh-sl-loc-list .list-details .list-content { + padding: 10px; +} +.bh-sl-container .bh-sl-loc-list .list-details .loc-dist { + font-weight: bold; + font-style: italic; + color: #8e8e8e; +} +.bh-sl-container .bh-sl-loc-list .list-focus { + border: 1px solid rgba(0, 82, 147, 0.4); + -moz-box-shadow: 0 0 8px rgba(0, 82, 147, 0.4); + -webkit-box-shadow: 0 0 8px rgba(0, 82, 147, 0.4); + box-shadow: 0 0 8px rgba(0, 100, 180, 0.4); + transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; +} +.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container { + width: 100%; + height: 20px; + position: relative; +} +.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon { + top: 0; + right: 6px; +} +.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title { + font-weight: bold; +} +.bh-sl-container .loc-name { + /* Picked up by both list and infowindows */ + font-size: 15px; + font-weight: bold; +} +.bh-sl-container .bh-sl-map { + height: 530px; +} +.bh-sl-container .bh-sl-pagination-container { + clear: both; +} +.bh-sl-container .bh-sl-pagination-container ol { + list-style-type: none; + text-align: center; + margin: 0; + padding: 10px 0; +} +.bh-sl-container .bh-sl-pagination-container ol li { + display: inline-block; + padding: 10px; + cursor: pointer; + font: bold 14px Arial, Helvetica, sans-serif; + color: #005293; +} +.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current { + color: #333333; + cursor: auto; + text-decoration: none; +} +/* Modal window */ +.bh-sl-overlay { + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 10000; + background: url(../img/overlay-bg.png) repeat; +} +.bh-sl-overlay .bh-sl-modal-window { + position: absolute; + left: 50%; + margin-left: -460px; + /* width divided by 2 */ + margin-top: 60px; + width: 920px; + height: 620px; + z-index: 10010; + background: #ffffff; + border-radius: 10px; + box-shadow: 0 0 10px #656565; +} +.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container { + margin-top: 50px; + /* increase map container margin */ +} +.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content { + float: left; + padding: 0 22px; + /* there's already a margin on the top of the map-container div */ +} +.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon { + top: 13px; + right: 22px; +} +.bh-sl-close-icon { + position: absolute; + cursor: pointer; + height: 24px; + width: 24px; +} +.bh-sl-close-icon:after, +.bh-sl-close-icon:before { + position: absolute; + top: 3px; + right: 3px; + bottom: 0; + left: 50%; + background: #cccccc; + content: ''; + display: block; + height: 24px; + margin: -3px 0 0 -1px; + width: 3px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.bh-sl-close-icon:hover:after, +.bh-sl-close-icon:hover:before { + background: #b3b3b3; +} +.bh-sl-close-icon:before { + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); +} diff --git a/thirdparty/jquery-store-locator-plugin/assets/css/bootstrap-example.min.css b/thirdparty/jquery-store-locator-plugin/assets/css/bootstrap-example.min.css new file mode 100755 index 0000000..5d8ae94 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/css/bootstrap-example.min.css @@ -0,0 +1 @@ +.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.bh-sl-error{clear:both;float:left;width:100%;padding:10px 0;color:#ae2118;font-weight:700}.bh-sl-container{color:#333}.bh-sl-container img{max-width:none!important;border-radius:0!important;box-shadow:none!important}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .jumbotron{padding-top:30px}.bh-sl-container .form-input input,.bh-sl-container .form-input label,.bh-sl-container .form-input select{margin-right:10px}.bh-sl-container .bh-sl-loading{float:left;margin:4px 0 0 10px;width:16px;height:16px;background:url(../img/ajax-loader.gif) no-repeat}.bh-sl-container .bh-sl-filters-container{clear:both;width:100%;margin:15px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{list-style:none;float:left;padding:0;margin:0 100px 0 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{display:block;clear:left;float:left;width:100%;margin:5px 0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin:2px 8px 2px 0}.bh-sl-container .bh-sl-map-container{margin-top:27px}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{height:530px;overflow-x:auto;font-size:13px}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{display:block;clear:left;float:left;margin:3% 4%;cursor:pointer;width:92%;border:1px solid #fff}.bh-sl-container .bh-sl-loc-list .list-label{float:left;margin:10px 0 0 6px;padding:4px;width:27px;text-align:center;background:#00192d;color:#fff;font-weight:700;border-radius:15px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{font-weight:700;font-style:italic;color:#8e8e8e}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);-moz-box-shadow:0 0 8px rgba(0,82,147,.4);-webkit-box-shadow:0 0 8px rgba(0,82,147,.4);box-shadow:0 0 8px rgba(0,100,180,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{width:100%;height:20px;position:relative}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{top:0;right:6px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{height:530px}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;text-align:center;margin:0;padding:10px 0}.bh-sl-container .bh-sl-pagination-container ol li{display:inline-block;padding:10px;cursor:pointer;font:700 14px Arial,Helvetica,sans-serif;color:#005293}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#333;cursor:auto;text-decoration:none}.bh-sl-overlay{position:fixed;left:0;top:0;width:100%;height:100%;z-index:10000;background:url(../img/overlay-bg.png) repeat}.bh-sl-overlay .bh-sl-modal-window{position:absolute;left:50%;margin-left:-460px;margin-top:60px;width:920px;height:620px;z-index:10010;background:#fff;border-radius:10px;box-shadow:0 0 10px #656565}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 22px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{top:13px;right:22px}.bh-sl-close-icon{position:absolute;cursor:pointer;height:24px;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{position:absolute;top:3px;right:3px;bottom:0;left:50%;background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css new file mode 100755 index 0000000..e7e5625 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css @@ -0,0 +1,311 @@ +/* #page-header it just included for the examples */ +#page-header { + display: block; + float: left; + max-width: 800px; } + #page-header .bh-sl-title { + color: #797874; + font: normal 20px/1.4 Arial, Helvetica, sans-serif; } + @media (min-width: 1024px) { + #page-header .bh-sl-title { + font-size: 30px; } } + +/* Infowindow Roboto font override */ +.gm-style div, .gm-style span, .gm-style label, .gm-style a { + font-family: Arial, Helvetica, sans-serif; } + +/* InfoBubble font size */ +.bh-sl-window { + font-size: 13px; } + +.bh-sl-error { + clear: both; + color: #ae2118; + float: left; + font-weight: bold; + padding: 10px 0; + width: 100%; } + +/* Avoid image issues with Google Maps and CSS resets */ +.bh-sl-map-container img { + border-radius: 0 !important; + box-shadow: none !important; + max-height: none !important; + max-width: none !important; } + +.bh-sl-container { + box-sizing: border-box; + color: #555; + float: left; + font: normal 14px/1.4 Arial, Helvetica, sans-serif; + padding: 0 15px; + width: 100%; + /* Avoid issues with Google Maps and CSS frameworks */ } + .bh-sl-container > * { + box-sizing: content-box !important; } + .bh-sl-container .bh-sl-form-container { + clear: left; + float: left; + margin-top: 15px; + width: 100%; } + .bh-sl-container .form-input { + float: left; + margin-top: 3px; + width: 100%; } + @media (min-width: 768px) { + .bh-sl-container .form-input { + width: auto; } } + .bh-sl-container .form-input label { + display: block; + font-weight: bold; + width: 100%; } + @media (min-width: 768px) { + .bh-sl-container .form-input label { + display: inline-block; + width: auto; } } + .bh-sl-container .form-input input, .bh-sl-container .form-input select { + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 4px; + font: normal 14px/1.4 Arial, Helvetica, sans-serif; + margin: 15px 0; + padding: 6px 12px; + width: 100%; + -webkit-border-radius: 4px; } + @media (min-width: 768px) { + .bh-sl-container .form-input input, .bh-sl-container .form-input select { + width: auto; + margin: 0 15px 0 10px; } } + .bh-sl-container button { + background: #00447a; + border: none; + border-radius: 4px; + color: #fff; + cursor: pointer; + float: left; + font: bold 14px/1.4 Arial, Helvetica, sans-serif; + margin-top: 3px; + padding: 6px 12px; + white-space: nowrap; + -webkit-border-radius: 4px; } + .bh-sl-container .bh-sl-loading { + background: url(../img/ajax-loader.gif) no-repeat; + float: left; + margin: 4px 0 0 10px; + height: 16px; + width: 16px; } + .bh-sl-container .bh-sl-filters-container { + clear: both; + float: left; + margin: 15px 0; + width: 100%; } + .bh-sl-container .bh-sl-filters-container .bh-sl-filters { + float: left; + list-style: none; + margin: 0 100px 0 0; + padding: 0; } + .bh-sl-container .bh-sl-filters-container .bh-sl-filters li { + clear: left; + display: block; + float: left; + margin: 5px 0; + width: 100%; } + .bh-sl-container .bh-sl-filters-container .bh-sl-filters li label { + display: inline; + vertical-align: text-bottom; } + .bh-sl-container .bh-sl-filters-container .bh-sl-filters li input { + display: block; + float: left; + margin-right: 8px; } + .bh-sl-container .bh-sl-filters-container .bh-sl-filters li select { + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 4px; + font: normal 14px/1.4 Arial, Helvetica, sans-serif; + padding: 6px 12px; + -webkit-border-radius: 4px; } + .bh-sl-container .bh-sl-map-container { + clear: left; + float: left; + margin-top: 27px; + width: 100%; } + @media (min-width: 1024px) { + .bh-sl-container .bh-sl-map-container { + margin-bottom: 60px; } } + .bh-sl-container .bh-sl-map-container a { + color: #005293; + text-decoration: none; } + .bh-sl-container .bh-sl-map-container a:active, .bh-sl-container .bh-sl-map-container a:focus, .bh-sl-container .bh-sl-map-container a:hover { + text-decoration: underline; } + .bh-sl-container .bh-sl-loc-list { + font-size: 13px; + height: 530px; + overflow-x: auto; + width: 100%; } + @media (min-width: 1024px) { + .bh-sl-container .bh-sl-loc-list { + width: 30%; } } + .bh-sl-container .bh-sl-loc-list ul { + display: block; + clear: left; + float: left; + width: 100%; + list-style: none; + margin: 0; + padding: 0; } + .bh-sl-container .bh-sl-loc-list ul li { + border: 1px solid #fff; + /* Adding this to prevent moving li elements when adding the list-focus class*/ + box-sizing: border-box; + clear: left; + cursor: pointer; + display: block; + float: left; + width: 100%; } + .bh-sl-container .bh-sl-loc-list .list-label { + background: #00192d; + border-radius: 15px; + color: #fff; + display: block; + float: left; + font-weight: bold; + margin: 10px 0 0 15px; + padding: 4px 7px; + text-align: center; + width: auto; + min-width: 13px; } + .bh-sl-container .bh-sl-loc-list .list-details { + float: left; + margin-left: 6px; + width: 80%; } + .bh-sl-container .bh-sl-loc-list .list-details .list-content { + padding: 10px; } + .bh-sl-container .bh-sl-loc-list .list-details .loc-dist { + color: #8e8e8e; + font-weight: bold; + font-style: italic; } + .bh-sl-container .bh-sl-loc-list .list-focus { + border: 1px solid rgba(0, 82, 147, 0.4); + transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; } + .bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container { + height: 20px; + position: relative; + width: 100%; } + .bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon { + right: 6px; + top: 0; } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel { + margin: 0 2%; + /* Avoid issues with table-layout */ } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table { + table-layout: auto; + width: 100%; } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table, .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td { + vertical-align: middle; + border-collapse: separate; } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td { + padding: 1px; } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-placemark { + margin: 10px 0; + border: 1px solid #c0c0c0; } + .bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-marker { + padding: 3px; } + .bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title { + font-weight: bold; + margin: 15px; } + .bh-sl-container .bh-sl-loc-list .bh-sl-noresults-desc { + margin: 0 15px; } + .bh-sl-container .loc-name { + /* Picked up by both list and infowindows */ + font-size: 15px; + font-weight: bold; } + .bh-sl-container .bh-sl-map { + float: left; + height: 530px; + width: 100%; } + @media (min-width: 1024px) { + .bh-sl-container .bh-sl-map { + width: 70%; } } + .bh-sl-container .bh-sl-pagination-container { + clear: both; } + .bh-sl-container .bh-sl-pagination-container ol { + list-style-type: none; + margin: 0; + padding: 10px 0; + text-align: center; } + .bh-sl-container .bh-sl-pagination-container ol li { + color: #005293; + cursor: pointer; + display: inline-block; + font: bold 14px Arial, Helvetica, sans-serif; + padding: 10px; } + .bh-sl-container .bh-sl-pagination-container ol .bh-sl-current { + color: #555; + cursor: auto; + text-decoration: none; } + +/* Modal window */ +.bh-sl-overlay { + background: url(../img/overlay-bg.png) repeat; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 10000; } + .bh-sl-overlay .bh-sl-modal-window { + background: #fff; + border-radius: 10px; + box-shadow: 0 0 10px #656565; + position: absolute; + left: 50%; + margin-left: -460px; + /* width divided by 2 */ + margin-top: 60px; + height: 620px; + width: 920px; + z-index: 10010; } + .bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container { + margin-top: 50px; + /* increase map container margin */ } + .bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content { + float: left; + padding: 0 1%; + /* there's already a margin on the top of the map-container div */ + width: 98%; } + .bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon { + right: 22px; + top: 13px; } + +.bh-sl-close-icon { + cursor: pointer; + height: 24px; + position: absolute; + width: 24px; } + .bh-sl-close-icon:after, .bh-sl-close-icon:before { + background: #ccc; + content: ''; + display: block; + height: 24px; + margin: -3px 0 0 -1px; + position: absolute; + bottom: 0; + left: 50%; + right: 3px; + top: 3px; + width: 3px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); } + .bh-sl-close-icon:hover:after, .bh-sl-close-icon:hover:before { + background: #b3b3b3; } + .bh-sl-close-icon:before { + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); } + +/*# sourceMappingURL=storelocator.css.map */ diff --git a/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css.map b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css.map new file mode 100755 index 0000000..6d2a964 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAcA,oDAAoD;AACpD,YAAa;EACZ,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,KAAK;EAEhB,yBAAa;IACZ,KAAK,EAlBK,OAAO;IAmBjB,IAAI,EAAE,4CAA0B;IAEhC,0BAAuB;MAJxB,yBAAa;QAKX,SAAS,EAAE,IAAI;;AAKlB,qCAAqC;AAEpC,2DAAoB;EACnB,WAAW,EAvBD,4BAA4B;;AA2BxC,0BAA0B;AAC1B,aAAc;EACb,SAAS,EAAE,IAAI;;AAGhB,YAAa;EACZ,KAAK,EAAE,IAAI;EACX,KAAK,EAnCA,OAAO;EAoCZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;;AAGZ,wDAAwD;AACxD,wBAAyB;EACxB,aAAa,EAAE,YAAY;EAC3B,UAAU,EAAE,eAAe;EAC3B,UAAU,EAAE,eAAe;EAC3B,SAAS,EAAE,eAAe;;AAG3B,gBAAiB;EAChB,UAAU,EAAE,UAAU;EACtB,KAAK,EAxDK,IAAI;EAyDd,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,4CAA0B;EAChC,OAAO,EAAE,MAAM;EACf,KAAK,EAAE,IAAI;EAEX,sDAAsD;EACtD,oBAAI;IACH,UAAU,EAAE,sBAAsB;EAGnC,sCAAsB;IACrB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;EAGZ,4BAAY;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;IACf,KAAK,EAAE,IAAI;IAGX,yBAAkB;MANnB,4BAAY;QAOV,KAAK,EAAE,IAAI;IAGZ,kCAAM;MACL,OAAO,EAAE,KAAK;MACd,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MAGX,yBAAkB;QANnB,kCAAM;UAOJ,OAAO,EAAE,YAAY;UACrB,KAAK,EAAE,IAAI;IAIb,uEAAc;MACb,UAAU,EAAE,UAAU;MACtB,MAAM,EAAE,cAAe;MACvB,aAAa,EAAE,GAAG;MAClB,IAAI,EAAE,4CAA0B;MAChC,MAAM,EAAE,MAAM;MACd,OAAO,EAAE,QAAQ;MACjB,KAAK,EAAE,IAAI;MACX,qBAAqB,EAAE,GAAG;MAG1B,yBAAkB;QAXnB,uEAAc;UAYZ,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,aAAa;EAKxB,uBAAO;IACN,UAAU,EAAE,OAAmB;IAC/B,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,GAAG;IAClB,KAAK,EA3HC,IAAI;IA4HV,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,0CAAwB;IAC9B,UAAU,EAAE,GAAG;IACf,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,MAAM;IACnB,qBAAqB,EAAE,GAAG;EAG3B,+BAAe;IACd,UAAU,EAAE,qCAAqC;IACjD,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;EAGZ,yCAAyB;IACxB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,IAAI;IAEX,wDAAe;MACd,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,WAAW;MACnB,OAAO,EAAE,CAAC;MAEV,2DAAG;QACF,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI;QAEX,iEAAM;UACL,OAAO,EAAE,MAAM;UACf,cAAc,EAAE,WAAW;QAG5B,iEAAM;UACL,OAAO,EAAE,KAAK;UACd,KAAK,EAAE,IAAI;UACX,YAAY,EAAE,GAAG;QAGlB,kEAAO;UACN,UAAU,EAAE,UAAU;UACtB,MAAM,EAAE,cAAe;UACvB,aAAa,EAAE,GAAG;UAClB,IAAI,EAAE,4CAA0B;UAChC,OAAO,EAAE,QAAQ;UACjB,qBAAqB,EAAE,GAAG;EAM9B,qCAAqB;IACpB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,qCAAqB;QAQnB,aAAa,EAAE,IAAI;IAGpB,uCAAE;MACD,KAAK,EA3LD,OAAO;MA4LX,eAAe,EAAE,IAAI;MAErB,4IAEQ;QACP,eAAe,EAAE,SAAS;EAK7B,gCAAgB;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IAGX,0BAAuB;MAPxB,gCAAgB;QAQd,KAAK,EAAE,GAAG;IAGX,mCAAG;MACF,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,CAAC;MAEV,sCAAG;QACF,MAAM,EAAE,cAAgB;QAAE,+EAA+E;QACzG,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;IAIb,4CAAY;MACX,UAAU,EAAE,OAAoB;MAChC,aAAa,EAAE,IAAI;MACnB,KAAK,EAhPA,IAAI;MAiPT,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,aAAa;MACrB,OAAO,EAAE,OAAO;MAChB,UAAU,EAAE,MAAM;MAClB,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,IAAI;IAGhB,8CAAc;MACb,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,GAAG;MAEV,4DAAc;QACb,OAAO,EAAE,IAAI;MAGd,wDAAU;QACT,KAAK,EAnQE,OAAO;QAoQd,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,MAAM;IAIpB,4CAAY;MACX,MAAM,EAAE,+BAA+B;MACvC,UAAU,EAAE,gDAAgD;IAG7D,kEAAkC;MACjC,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,IAAI;MAEX,oFAAkB;QACjB,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,CAAC;IAIR,wDAAwB;MACvB,MAAM,EAAE,IAAI;MAEZ,oCAAoC;MACpC,8DAAM;QACL,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;MAGZ,2HAAU;QACT,cAAc,EAAE,MAAM;QACtB,eAAe,EAAE,QAAQ;MAG1B,2DAAG;QACF,OAAO,EAAE,GAAG;MAGb,uEAAe;QACd,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,iBAAiB;MAG1B,oEAAY;QACX,OAAO,EAAE,GAAG;IAId,uDAAuB;MACtB,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,IAAI;IAGb,sDAAsB;MACrB,MAAM,EAAE,MAAM;EAIhB,0BAAU;IACT,4CAA4C;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;EAGlB,2BAAW;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,IAAI;IAGX,0BAAuB;MANxB,2BAAW;QAOT,KAAK,EAAE,GAAG;EAIZ,4CAA4B;IAC3B,KAAK,EAAE,IAAI;IAEX,+CAAG;MACF,eAAe,EAAE,IAAI;MACrB,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,MAAM;MACf,UAAU,EAAE,MAAM;MAElB,kDAAG;QACF,KAAK,EApVF,OAAO;QAqVV,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,sCAAoB;QAC1B,OAAO,EAAE,IAAI;MAGd,8DAAe;QACd,KAAK,EA/VE,IAAI;QAgWX,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,IAAI;;AAMzB,kBAAkB;AAClB,cAAe;EACd,UAAU,EAAE,iCAAiC;EAC7C,MAAM,EAAE,IAAI;EACZ,IAAI,EAAE,CAAC;EACP,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EAEd,kCAAoB;IACnB,UAAU,EAvXJ,IAAI;IAwXV,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,MAAM;IAAE,wBAAwB;IAC7C,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;IAEd,uDAAqB;MACpB,UAAU,EAAE,IAAI;MAAE,mCAAmC;IAGtD,uDAAqB;MACpB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MAAE,kEAAkE;MACjF,KAAK,EAAE,GAAG;IAGX,oDAAkB;MACjB,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;;AAKZ,iBAAkB;EACjB,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EAEX,iDACS;IACR,UAAU,EA1ZL,IAAI;IA2ZT,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,iBAAiB,EAAE,aAAa;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;EAGzB,6DACe;IACd,UAAU,EAAE,OAAkB;EAG/B,wBAAS;IACR,iBAAiB,EAAE,cAAc;IACjC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,cAAc", +"sources": ["../../../src/css/storelocator.scss"], +"names": [], +"file": "storelocator.css" +} diff --git a/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.min.css b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.min.css new file mode 100755 index 0000000..38cfa63 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/css/storelocator.min.css @@ -0,0 +1 @@ +#page-header{display:block;float:left;max-width:800px}#page-header .bh-sl-title{color:#797874;font:400 20px/1.4 Arial,Helvetica,sans-serif}@media (min-width:1024px){#page-header .bh-sl-title{font-size:30px}}.gm-style a,.gm-style div,.gm-style label,.gm-style span{font-family:Arial,Helvetica,sans-serif}.bh-sl-window{font-size:13px}.bh-sl-error{clear:both;color:#ae2118;float:left;font-weight:700;padding:10px 0;width:100%}.bh-sl-map-container img{border-radius:0!important;box-shadow:none!important;max-height:none!important;max-width:none!important}.bh-sl-container{box-sizing:border-box;color:#555;float:left;font:400 14px/1.4 Arial,Helvetica,sans-serif;padding:0 15px;width:100%}.bh-sl-container>*{box-sizing:content-box!important}.bh-sl-container .bh-sl-form-container{clear:left;float:left;margin-top:15px;width:100%}.bh-sl-container .form-input{float:left;margin-top:3px;width:100%}@media (min-width:768px){.bh-sl-container .form-input{width:auto}}.bh-sl-container .form-input label{display:block;font-weight:700;width:100%}@media (min-width:768px){.bh-sl-container .form-input label{display:inline-block;width:auto}}.bh-sl-container .form-input input,.bh-sl-container .form-input select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:400 14px/1.4 Arial,Helvetica,sans-serif;margin:15px 0;padding:6px 12px;width:100%;-webkit-border-radius:4px}@media (min-width:768px){.bh-sl-container .form-input input,.bh-sl-container .form-input select{width:auto;margin:0 15px 0 10px}}.bh-sl-container button{background:#00447a;border:none;border-radius:4px;color:#fff;cursor:pointer;float:left;font:700 14px/1.4 Arial,Helvetica,sans-serif;margin-top:3px;padding:6px 12px;white-space:nowrap;-webkit-border-radius:4px}.bh-sl-container .bh-sl-loading{background:url(../img/ajax-loader.gif) no-repeat;float:left;margin:4px 0 0 10px;height:16px;width:16px}.bh-sl-container .bh-sl-filters-container{clear:both;float:left;margin:15px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters{float:left;list-style:none;margin:0 100px 0 0;padding:0}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li{clear:left;display:block;float:left;margin:5px 0;width:100%}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li label{display:inline;vertical-align:text-bottom}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li input{display:block;float:left;margin-right:8px}.bh-sl-container .bh-sl-filters-container .bh-sl-filters li select{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;font:400 14px/1.4 Arial,Helvetica,sans-serif;padding:6px 12px;-webkit-border-radius:4px}.bh-sl-container .bh-sl-map-container{clear:left;float:left;margin-top:27px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map-container{margin-bottom:60px}}.bh-sl-container .bh-sl-map-container a{color:#005293;text-decoration:none}.bh-sl-container .bh-sl-map-container a:active,.bh-sl-container .bh-sl-map-container a:focus,.bh-sl-container .bh-sl-map-container a:hover{text-decoration:underline}.bh-sl-container .bh-sl-loc-list{font-size:13px;height:530px;overflow-x:auto;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-loc-list{width:30%}}.bh-sl-container .bh-sl-loc-list ul{display:block;clear:left;float:left;width:100%;list-style:none;margin:0;padding:0}.bh-sl-container .bh-sl-loc-list ul li{border:1px solid #fff;box-sizing:border-box;clear:left;cursor:pointer;display:block;float:left;width:100%}.bh-sl-container .bh-sl-loc-list .list-label{background:#00192d;border-radius:15px;color:#fff;display:block;float:left;font-weight:700;margin:10px 0 0 15px;padding:4px 7px;text-align:center;width:auto;min-width:13px}.bh-sl-container .bh-sl-loc-list .list-details{float:left;margin-left:6px;width:80%}.bh-sl-container .bh-sl-loc-list .list-details .list-content{padding:10px}.bh-sl-container .bh-sl-loc-list .list-details .loc-dist{color:#8e8e8e;font-weight:700;font-style:italic}.bh-sl-container .bh-sl-loc-list .list-focus{border:1px solid rgba(0,82,147,.4);transition:border .2s linear 0s,box-shadow .2s linear 0s}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container{height:20px;position:relative;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-close-directions-container .bh-sl-close-icon{right:6px;top:0}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel{margin:0 2%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table{table-layout:auto;width:100%}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel table,.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{vertical-align:middle;border-collapse:separate}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel td{padding:1px}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-placemark{margin:10px 0;border:1px solid silver}.bh-sl-container .bh-sl-loc-list .bh-sl-directions-panel .adp-marker{padding:3px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-title{font-weight:700;margin:15px}.bh-sl-container .bh-sl-loc-list .bh-sl-noresults-desc{margin:0 15px}.bh-sl-container .loc-name{font-size:15px;font-weight:700}.bh-sl-container .bh-sl-map{float:left;height:530px;width:100%}@media (min-width:1024px){.bh-sl-container .bh-sl-map{width:70%}}.bh-sl-container .bh-sl-pagination-container{clear:both}.bh-sl-container .bh-sl-pagination-container ol{list-style-type:none;margin:0;padding:10px 0;text-align:center}.bh-sl-container .bh-sl-pagination-container ol li{color:#005293;cursor:pointer;display:inline-block;font:700 14px Arial,Helvetica,sans-serif;padding:10px}.bh-sl-container .bh-sl-pagination-container ol .bh-sl-current{color:#555;cursor:auto;text-decoration:none}.bh-sl-overlay{background:url(../img/overlay-bg.png) repeat;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.bh-sl-overlay .bh-sl-modal-window{background:#fff;border-radius:10px;box-shadow:0 0 10px #656565;position:absolute;left:50%;margin-left:-460px;margin-top:60px;height:620px;width:920px;z-index:10010}.bh-sl-overlay .bh-sl-modal-window .bh-sl-map-container{margin-top:50px}.bh-sl-overlay .bh-sl-modal-window .bh-sl-modal-content{float:left;padding:0 1%;width:98%}.bh-sl-overlay .bh-sl-modal-window .bh-sl-close-icon{right:22px;top:13px}.bh-sl-close-icon{cursor:pointer;height:24px;position:absolute;width:24px}.bh-sl-close-icon:after,.bh-sl-close-icon:before{background:#ccc;content:'';display:block;height:24px;margin:-3px 0 0 -1px;position:absolute;bottom:0;left:50%;right:3px;top:3px;width:3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bh-sl-close-icon:hover:after,.bh-sl-close-icon:hover:before{background:#b3b3b3}.bh-sl-close-icon:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/images/ajax-loader.gif b/thirdparty/jquery-store-locator-plugin/assets/img/ajax-loader.gif similarity index 100% rename from thirdparty/jquery-store-locator/images/ajax-loader.gif rename to thirdparty/jquery-store-locator-plugin/assets/img/ajax-loader.gif diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.png b/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.png new file mode 100755 index 0000000..6c0a33c Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.svg b/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.svg new file mode 100755 index 0000000..716d27a --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/img/blue-marker.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/close-icon-dark.png b/thirdparty/jquery-store-locator-plugin/assets/img/close-icon-dark.png new file mode 100755 index 0000000..58d4876 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/close-icon-dark.png differ diff --git a/thirdparty/jquery-store-locator/images/close-icon.png b/thirdparty/jquery-store-locator-plugin/assets/img/close-icon.png similarity index 100% rename from thirdparty/jquery-store-locator/images/close-icon.png rename to thirdparty/jquery-store-locator-plugin/assets/img/close-icon.png diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/m1.png b/thirdparty/jquery-store-locator-plugin/assets/img/m1.png new file mode 100755 index 0000000..329ff52 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/m1.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/m2.png b/thirdparty/jquery-store-locator-plugin/assets/img/m2.png new file mode 100755 index 0000000..b999cbc Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/m2.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/m3.png b/thirdparty/jquery-store-locator-plugin/assets/img/m3.png new file mode 100755 index 0000000..9f30b30 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/m3.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/m4.png b/thirdparty/jquery-store-locator-plugin/assets/img/m4.png new file mode 100755 index 0000000..0d3f826 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/m4.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/m5.png b/thirdparty/jquery-store-locator-plugin/assets/img/m5.png new file mode 100755 index 0000000..61387d2 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/m5.png differ diff --git a/thirdparty/jquery-store-locator/images/overlay-bg.png b/thirdparty/jquery-store-locator-plugin/assets/img/overlay-bg.png similarity index 100% rename from thirdparty/jquery-store-locator/images/overlay-bg.png rename to thirdparty/jquery-store-locator-plugin/assets/img/overlay-bg.png diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.png b/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.png new file mode 100755 index 0000000..0ca5a23 Binary files /dev/null and b/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.png differ diff --git a/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.svg b/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.svg new file mode 100755 index 0000000..c5d57cb --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/img/red-marker.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/thirdparty/jquery-store-locator-plugin/assets/js/geocode.min.js b/thirdparty/jquery-store-locator-plugin/assets/js/geocode.min.js new file mode 100755 index 0000000..091ac14 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/js/geocode.min.js @@ -0,0 +1 @@ +function GoogleGeocode(){var a=new google.maps.Geocoder;this.geocode=function(b,c){a.geocode({address:b},function(a,b){if(b===google.maps.GeocoderStatus.OK){var d={};d.latitude=a[0].geometry.location.lat(),d.longitude=a[0].geometry.location.lng(),c(d)}else alert("Geocode was not successful for the following reason: "+b),c(null)})}}$(function(){$("#bh-sl-user-location").on("submit",function(a){a.preventDefault();var b=$("form #bh-sl-address").val();""===b&&alert("The input box was blank.");var c=new GoogleGeocode,d=b;c.geocode(d,function(a){if(null!==a){var b=a.latitude,c=a.longitude;$("#geocode-result").append("Latitude: "+b+"
Longitude: "+c+"

")}else alert("ERROR! Unable to geocode address")})})}); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/assets/js/libs/handlebars.min.js b/thirdparty/jquery-store-locator-plugin/assets/js/libs/handlebars.min.js new file mode 100755 index 0000000..982731b --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/js/libs/handlebars.min.js @@ -0,0 +1,3 @@ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(21),i=e(h),j=c(22),k=c(27),l=c(28),m=e(l),n=c(25),o=e(n),p=c(20),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(18),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(19),p=e(o),q=c(20),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(7),j=c(15),k=c(17),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;bc;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(23),h=e(g),i=c(24),j=e(i),k=c(26),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16], +44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(25),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;j>i;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;cc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;c>b;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(29),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;h>c;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"), +e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;g>e;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])}); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/assets/js/libs/infobubble.min.js b/thirdparty/jquery-store-locator-plugin/assets/js/libs/infobubble.min.js new file mode 100755 index 0000000..b92e171 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/js/libs/infobubble.min.js @@ -0,0 +1,37 @@ +(function(){var b; + function h(a){this.extend(h,google.maps.OverlayView);this.b=[];this.d=null;this.g=100;this.m=!1;a=a||{};void 0==a.backgroundColor&&(a.backgroundColor=this.A);void 0==a.borderColor&&(a.borderColor=this.B);void 0==a.borderRadius&&(a.borderRadius=this.C);void 0==a.borderWidth&&(a.borderWidth=this.D);void 0==a.padding&&(a.padding=this.H);void 0==a.arrowPosition&&(a.arrowPosition=this.u);void 0==a.disableAutoPan&&(a.disableAutoPan=!1);void 0==a.disableAnimation&&(a.disableAnimation=!1);void 0==a.minWidth&&(a.minWidth= + this.G);void 0==a.shadowStyle&&(a.shadowStyle=this.I);void 0==a.arrowSize&&(a.arrowSize=this.v);void 0==a.arrowStyle&&(a.arrowStyle=this.w);void 0==a.closeSrc&&(a.closeSrc=this.F);m(this);this.setValues(a)}window.InfoBubble=h;b=h.prototype;b.v=15;b.w=0;b.I=1;b.G=50;b.u=50;b.H=10;b.D=1;b.B="#ccc";b.C=10;b.A="#fff";b.F="https://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif";b.extend=function(a,c){return function(a){for(var c in a.prototype)this.prototype[c]=a.prototype[c];return this}.apply(a,[c])}; + function m(a){var c=a.c=document.createElement("DIV");c.style.position="absolute";c.style.zIndex=a.g;(a.i=document.createElement("DIV")).style.position="relative";var d=a.j=document.createElement("IMG");d.style.position="absolute";d.style.border=0;d.style.zIndex=a.g+1;d.style.cursor="pointer";d.src=a.get("closeSrc");google.maps.event.addDomListener(d,"click",function(){a.close();google.maps.event.trigger(a,"closeclick")});var e=a.e=document.createElement("DIV");e.style.overflowX="auto";e.style.overflowY= + "auto";e.style.cursor="default";e.style.clear="both";e.style.position="relative";var f=a.k=document.createElement("DIV");e.appendChild(f);f=a.N=document.createElement("DIV");f.style.position="relative";var k=a.n=document.createElement("DIV"),g=a.l=document.createElement("DIV"),l=n(a);k.style.position=g.style.position="absolute";k.style.left=g.style.left="50%";k.style.height=g.style.height="0";k.style.width=g.style.width="0";k.style.marginLeft=t(-l);k.style.borderWidth=t(l);k.style.borderBottomWidth= + 0;l=a.a=document.createElement("DIV");l.style.position="absolute";c.style.display=l.style.display="none";c.appendChild(a.i);c.appendChild(d);c.appendChild(e);f.appendChild(k);f.appendChild(g);c.appendChild(f);c=document.createElement("style");c.setAttribute("type","text/css");a.h="_ibani_"+Math.round(1E4*Math.random());c.textContent="."+a.h+"{-webkit-animation-name:"+a.h+";-webkit-animation-duration:0.5s;-webkit-animation-iteration-count:1;}@-webkit-keyframes "+a.h+" {from {-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% {-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}"; + document.getElementsByTagName("head")[0].appendChild(c)}b.ea=function(a){this.set("backgroundClassName",a)};h.prototype.setBackgroundClassName=h.prototype.ea;h.prototype.O=function(){this.k.className=this.get("backgroundClassName")};h.prototype.backgroundClassName_changed=h.prototype.O;h.prototype.pa=function(a){this.set("tabClassName",a)};h.prototype.setTabClassName=h.prototype.pa;h.prototype.sa=function(){w(this)};h.prototype.tabClassName_changed=h.prototype.sa; + h.prototype.da=function(a){this.set("arrowStyle",a)};h.prototype.setArrowStyle=h.prototype.da;h.prototype.M=function(){this.p()};h.prototype.arrowStyle_changed=h.prototype.M;function n(a){return parseInt(a.get("arrowSize"),10)||0}h.prototype.ca=function(a){this.set("arrowSize",a)};h.prototype.setArrowSize=h.prototype.ca;h.prototype.p=function(){this.r()};h.prototype.arrowSize_changed=h.prototype.p;h.prototype.ba=function(a){this.set("arrowPosition",a)};h.prototype.setArrowPosition=h.prototype.ba; + h.prototype.L=function(){var a=parseInt(this.get("arrowPosition"),10)||0;this.n.style.left=this.l.style.left=a+"%";x(this)};h.prototype.arrowPosition_changed=h.prototype.L;h.prototype.setZIndex=function(a){this.set("zIndex",a)};h.prototype.setZIndex=h.prototype.setZIndex;h.prototype.getZIndex=function(){return parseInt(this.get("zIndex"),10)||this.g};h.prototype.ua=function(){var a=this.getZIndex();this.c.style.zIndex=this.g=a;this.j.style.zIndex=a+1};h.prototype.zIndex_changed=h.prototype.ua; + h.prototype.na=function(a){this.set("shadowStyle",a)};h.prototype.setShadowStyle=h.prototype.na;h.prototype.qa=function(){var a="",c="",d="";switch(parseInt(this.get("shadowStyle"),10)||0){case 0:a="none";break;case 1:c="40px 15px 10px rgba(33,33,33,0.3)";d="transparent";break;case 2:c="0 0 2px rgba(33,33,33,0.3)",d="rgba(33,33,33,0.35)"}this.a.style.boxShadow=this.a.style.webkitBoxShadow=this.a.style.MozBoxShadow=c;this.a.style.backgroundColor=d;this.m&&(this.a.style.display=a,this.draw())}; + h.prototype.shadowStyle_changed=h.prototype.qa;h.prototype.ra=function(){this.set("hideCloseButton",!1)};h.prototype.showCloseButton=h.prototype.ra;h.prototype.R=function(){this.set("hideCloseButton",!0)};h.prototype.hideCloseButton=h.prototype.R;h.prototype.S=function(){this.j.style.display=this.get("hideCloseButton")?"none":""};h.prototype.hideCloseButton_changed=h.prototype.S;h.prototype.setBackgroundColor=function(a){a&&this.set("backgroundColor",a)};h.prototype.setBackgroundColor=h.prototype.setBackgroundColor; + h.prototype.P=function(){var a=this.get("backgroundColor");this.e.style.backgroundColor=a;this.l.style.borderColor=a+" transparent transparent";w(this)};h.prototype.backgroundColor_changed=h.prototype.P;h.prototype.setBorderColor=function(a){a&&this.set("borderColor",a)};h.prototype.setBorderColor=h.prototype.setBorderColor; + h.prototype.Q=function(){var a=this.get("borderColor"),c=this.e,d=this.n;c.style.borderColor=a;d.style.borderColor=a+" transparent transparent";c.style.borderStyle=d.style.borderStyle=this.l.style.borderStyle="solid";w(this)};h.prototype.borderColor_changed=h.prototype.Q;h.prototype.fa=function(a){this.set("borderRadius",a)};h.prototype.setBorderRadius=h.prototype.fa;function z(a){return parseInt(a.get("borderRadius"),10)||0} + h.prototype.q=function(){var a=z(this),c=A(this);this.e.style.borderRadius=this.e.style.MozBorderRadius=this.e.style.webkitBorderRadius=this.a.style.borderRadius=this.a.style.MozBorderRadius=this.a.style.webkitBorderRadius=t(a);this.i.style.paddingLeft=this.i.style.paddingRight=t(a+c);x(this)};h.prototype.borderRadius_changed=h.prototype.q;function A(a){return parseInt(a.get("borderWidth"),10)||0}h.prototype.ga=function(a){this.set("borderWidth",a)};h.prototype.setBorderWidth=h.prototype.ga; + h.prototype.r=function(){var a=A(this);this.e.style.borderWidth=t(a);this.i.style.top=t(a);var a=A(this),c=n(this),d=parseInt(this.get("arrowStyle"),10)||0,e=t(c),f=t(Math.max(0,c-a)),k=this.n,g=this.l;this.N.style.marginTop=t(-a);k.style.borderTopWidth=e;g.style.borderTopWidth=f;0==d||1==d?(k.style.borderLeftWidth=e,g.style.borderLeftWidth=f):k.style.borderLeftWidth=g.style.borderLeftWidth=0;0==d||2==d?(k.style.borderRightWidth=e,g.style.borderRightWidth=f):k.style.borderRightWidth=g.style.borderRightWidth= + 0;2>d?(k.style.marginLeft=t(-c),g.style.marginLeft=t(-(c-a))):k.style.marginLeft=g.style.marginLeft=0;k.style.display=0==a?"none":"";w(this);this.q();x(this)};h.prototype.borderWidth_changed=h.prototype.r;h.prototype.ma=function(a){this.set("padding",a)};h.prototype.setPadding=h.prototype.ma;h.prototype.ha=function(a){a&&this.j&&(this.j.src=a)};h.prototype.setCloseSrc=h.prototype.ha;function B(a){return parseInt(a.get("padding"),10)||0} + h.prototype.Z=function(){var a=B(this);this.e.style.padding=t(a);w(this);x(this)};h.prototype.padding_changed=h.prototype.Z;function t(a){return a?a+"px":a}function C(a){var c="mousedown mousemove mouseover mouseout mouseup mousewheel DOMMouseScroll touchstart touchend touchmove dblclick contextmenu click".split(" "),d=a.c;a.s=[];for(var e=0,f;f=c[e];e++)a.s.push(google.maps.event.addDomListener(d,f,function(a){a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()}))} + h.prototype.onAdd=function(){this.c||m(this);C(this);var a=this.getPanes();a&&(a.floatPane.appendChild(this.c),a.floatShadow.appendChild(this.a))};h.prototype.onAdd=h.prototype.onAdd; + h.prototype.draw=function(){var a=this.getProjection();if(a){var c=this.get("position");if(c){var d=0;this.d&&(d=this.d.offsetHeight);var e=D(this),f=n(this),k=parseInt(this.get("arrowPosition"),10)||0,k=k/100,a=a.fromLatLngToDivPixel(c),c=this.e.offsetWidth,g=this.c.offsetHeight;if(c){g=a.y-(g+f);e&&(g-=e);var l=a.x-c*k;this.c.style.top=t(g);this.c.style.left=t(l);switch(parseInt(this.get("shadowStyle"),10)){case 1:this.a.style.top=t(g+d-1);this.a.style.left=t(l);this.a.style.width=t(c);this.a.style.height= + t(this.e.offsetHeight-f);break;case 2:c*=.8,this.a.style.top=e?t(a.y):t(a.y+f),this.a.style.left=t(a.x-c*k),this.a.style.width=t(c),this.a.style.height=t(2)}}}else this.close()}};h.prototype.draw=h.prototype.draw;h.prototype.onRemove=function(){this.c&&this.c.parentNode&&this.c.parentNode.removeChild(this.c);this.a&&this.a.parentNode&&this.a.parentNode.removeChild(this.a);for(var a=0,c;c=this.s[a];a++)google.maps.event.removeListener(c)};h.prototype.onRemove=h.prototype.onRemove;h.prototype.T=function(){return this.m}; + h.prototype.isOpen=h.prototype.T;h.prototype.close=function(){this.c&&(this.c.style.display="none",this.c.className=this.c.className.replace(this.h,""));this.a&&(this.a.style.display="none",this.a.className=this.a.className.replace(this.h,""));this.m=!1};h.prototype.close=h.prototype.close;h.prototype.open=function(a,c){var d=this;window.setTimeout(function(){E(d,a,c)},0)}; + function E(a,c,d){F(a);c&&a.setMap(c);d&&(a.set("anchor",d),a.bindTo("anchorPoint",d),a.bindTo("position",d));a.c.style.display=a.a.style.display="";a.get("disableAnimation")||(a.c.className+=" "+a.h,a.a.className+=" "+a.h);x(a);a.m=!0;a.get("disableAutoPan")||window.setTimeout(function(){a.o()},200)}h.prototype.open=h.prototype.open;h.prototype.setPosition=function(a){a&&this.set("position",a)};h.prototype.setPosition=h.prototype.setPosition;h.prototype.getPosition=function(){return this.get("position")}; + h.prototype.getPosition=h.prototype.getPosition;h.prototype.$=function(){this.draw()};h.prototype.position_changed=h.prototype.$;h.prototype.o=function(){var a=this.getProjection();if(a&&this.c){var c=D(this),d=this.c.offsetHeight+c,c=this.get("map"),e=c.getDiv().offsetHeight,f=this.getPosition(),k=a.fromLatLngToContainerPixel(c.getCenter()),f=a.fromLatLngToContainerPixel(f),d=k.y-d,e=e-k.y,k=0;0>d&&(k=(-1*d+e)/2);f.y-=k;f=a.fromContainerPixelToLatLng(f);c.getCenter()!=f&&c.panTo(f)}}; + h.prototype.panToView=h.prototype.o;function G(a){a=a.replace(/^\s*([\S\s]*)\b\s*$/,"$1");var c=document.createElement("DIV");c.innerHTML=a;if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);return a}function H(a){if(a)for(var c;c=a.firstChild;)a.removeChild(c)}h.prototype.setContent=function(a){this.set("content",a)};h.prototype.setContent=h.prototype.setContent;h.prototype.getContent=function(){return this.get("content")}; + h.prototype.getContent=h.prototype.getContent;function F(a){if(a.k){H(a.k);var c=a.getContent();if(c){"string"==typeof c&&(c=G(c));a.k.appendChild(c);for(var c=a.k.getElementsByTagName("IMG"),d=0,e;e=c[d];d++)google.maps.event.addDomListener(e,"load",function(){var c=!a.get("disableAutoPan");x(a);!c||0!=a.b.length&&0!=a.d.index||a.o()});google.maps.event.trigger(a,"domready")}x(a)}} + function w(a){if(a.b&&a.b.length){for(var c=0,d;d=a.b[c];c++)I(a,d.f);a.d.style.zIndex=a.g;c=A(a);d=B(a)/2;a.d.style.borderBottomWidth=0;a.d.style.paddingBottom=t(d+c)}} + function I(a,c){var d=a.get("backgroundColor"),e=a.get("borderColor"),f=z(a),k=A(a),g=B(a),l=t(-Math.max(g,f)),f=t(f),r=a.g;c.index&&(r-=c.index);var d={cssFloat:"left",position:"relative",cursor:"pointer",backgroundColor:d,border:t(k)+" solid "+e,padding:t(g/2)+" "+t(g),marginRight:l,whiteSpace:"nowrap",borderRadiusTopLeft:f,MozBorderRadiusTopleft:f,webkitBorderTopLeftRadius:f,borderRadiusTopRight:f,MozBorderRadiusTopright:f,webkitBorderTopRightRadius:f,zIndex:r,display:"inline"},p;for(p in d)c.style[p]= + d[p];p=a.get("tabClassName");void 0!=p&&(c.className+=" "+p)}function J(a,c){c.U=google.maps.event.addDomListener(c,"click",function(){K(a,this)})}h.prototype.oa=function(a){(a=this.b[a-1])&&K(this,a.f)};h.prototype.setTabActive=h.prototype.oa; + function K(a,c){if(c){var d=B(a)/2,e=A(a);if(a.d){var f=a.d;f.style.zIndex=a.g-f.index;f.style.paddingBottom=t(d);f.style.borderBottomWidth=t(e)}c.style.zIndex=a.g;c.style.borderBottomWidth=0;c.style.marginBottomWidth="-10px";c.style.paddingBottom=t(d+e);a.setContent(a.b[c.index].content);F(a);a.d=c;x(a)}else a.setContent(""),F(a)}h.prototype.ja=function(a){this.set("maxWidth",a)};h.prototype.setMaxWidth=h.prototype.ja;h.prototype.W=function(){x(this)};h.prototype.maxWidth_changed=h.prototype.W; + h.prototype.ia=function(a){this.set("maxHeight",a)};h.prototype.setMaxHeight=h.prototype.ia;h.prototype.V=function(){x(this)};h.prototype.maxHeight_changed=h.prototype.V;h.prototype.la=function(a){this.set("minWidth",a)};h.prototype.setMinWidth=h.prototype.la;h.prototype.Y=function(){x(this)};h.prototype.minWidth_changed=h.prototype.Y;h.prototype.ka=function(a){this.set("minHeight",a)};h.prototype.setMinHeight=h.prototype.ka;h.prototype.X=function(){x(this)};h.prototype.minHeight_changed=h.prototype.X; + h.prototype.J=function(a,c){var d=document.createElement("DIV");d.innerHTML=a;I(this,d);J(this,d);this.i.appendChild(d);this.b.push({label:a,content:c,f:d});d.index=this.b.length-1;d.style.zIndex=this.g-d.index;this.d||K(this,d);d.className=d.className+" "+this.h;x(this)};h.prototype.addTab=h.prototype.J; + h.prototype.ta=function(a,c,d){!this.b.length||0>a||a>=this.b.length||(a=this.b[a],void 0!=c&&(a.f.innerHTML=a.label=c),void 0!=d&&(a.content=d),this.d==a.f&&(this.setContent(a.content),F(this)),x(this))};h.prototype.updateTab=h.prototype.ta; + h.prototype.aa=function(a){if(!(!this.b.length||0>a||a>=this.b.length)){var c=this.b[a];c.f.parentNode.removeChild(c.f);google.maps.event.removeListener(c.f.U);this.b.splice(a,1);delete c;for(var d=0,e;e=this.b[d];d++)e.f.index=d;c.f==this.d&&(this.d=this.b[a]?this.b[a].f:this.b[a-1]?this.b[a-1].f:void 0,K(this,this.d));x(this)}};h.prototype.removeTab=h.prototype.aa; + function L(a,c,d){var e=document.createElement("DIV");e.style.display="inline";e.style.position="absolute";e.style.visibility="hidden";"string"==typeof a?e.innerHTML=a:e.appendChild(a.cloneNode(!0));document.body.appendChild(e);a=new google.maps.Size(e.offsetWidth,e.offsetHeight);c&&a.width>c&&(e.style.width=t(c),a=new google.maps.Size(e.offsetWidth,e.offsetHeight));d&&a.height>d&&(e.style.height=t(d),a=new google.maps.Size(e.offsetWidth,e.offsetHeight));document.body.removeChild(e);delete e;return a} + function x(a){var c=a.get("map");if(c){var d=B(a);A(a);z(a);var e=n(a),f=c.getDiv(),k=2*e,c=f.offsetWidth-k,f=f.offsetHeight-k-D(a),k=0,g=a.get("minWidth")||0,l=a.get("minHeight")||0,r=a.get("maxWidth")||0,p=a.get("maxHeight")||0,r=Math.min(c,r),p=Math.min(f,p),y=0;if(a.b.length)for(var u=0,q;q=a.b[u];u++){var v=L(q.f,r,p);q=L(q.content,r,p);gk&&(k=v.height);gc&&(g=c);l>f&&(l=f-k);a.i&&(a.t=k,a.i.style.width=t(y));a.e.style.width=t(g);a.e.style.height=t(l)}z(a);d=A(a);c=2;a.b.length&&a.t&&(c+=a.t);e=2+d;(f=a.e)&&f.clientHeightg&&(c=g,d=b)}}if(d&&d.isMarkerInClusterBounds(a))d.addMarker(a);else{var b=new Cluster(this);b.addMarker(a),this.clusters_.push(b)}},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var a,b=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),c=this.getExtendedBounds(b),d=0;a=this.markers_[d];d++)!a.isAdded&&this.isMarkerInBounds_(a,c)&&this.addToClosestCluster_(a)},Cluster.prototype.isMarkerAlreadyAdded=function(a){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(a);for(var b,c=0;b=this.markers_[c];c++)if(b==a)return!0;return!1},Cluster.prototype.addMarker=function(a){if(this.isMarkerAlreadyAdded(a))return!1;if(this.center_){if(this.averageCenter_){var b=this.markers_.length+1,c=(this.center_.lat()*(b-1)+a.getPosition().lat())/b,d=(this.center_.lng()*(b-1)+a.getPosition().lng())/b;this.center_=new google.maps.LatLng(c,d),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();a.isAdded=!0,this.markers_.push(a);var e=this.markers_.length;if(ef;f++)this.markers_[f].setMap(null);return e>=this.minClusterSize_&&a.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers(),d=0;a=c[d];d++)b.extend(a.getPosition());return b},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},Cluster.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var a=this.map_.getZoom(),b=this.markerClusterer_.getMaxZoom();if(b&&a>b)for(var c,d=0;c=this.markers_[d];d++)c.setMap(this.map_);else{if(this.markers_.length0&&this.anchor_[0]0&&this.anchor_[1]
'); + } + + // Save the original zoom setting so it can be retrieved if taxonomy filtering resets it + originalZoom = this.settings.mapSettings.zoom; + + // Add Handlebars helper for handling URL output + Handlebars.registerHelper('niceURL', function(url) { + if(url){ + return url.replace('https://', '').replace('http://', ''); + } + }); + + // Do taxonomy filtering if set + if (this.settings.taxonomyFilters !== null) { + this.taxonomyFiltering(); + } + + // Add modal window divs if set + if (this.settings.modal === true) { + // Clone the filters if there are any so they can be used in the modal + if (this.settings.taxonomyFilters !== null) { + // Clone the filters + $('.' + this.settings.taxonomyFiltersContainer).clone(true, true).prependTo($this); + } + + $this.wrap('
'); + $('.' + this.settings.modalWindow).prepend('
'); + $('.' + this.settings.overlay).hide(); + } + + // Set up Google Places autocomplete if it's set to true + if (this.settings.autoComplete === true) { + var searchInput = document.getElementById(this.settings.addressID); + var autoPlaces = new google.maps.places.Autocomplete(searchInput, this.settings.autoCompleteOptions); + + // Add listener when autoComplete selection changes. + if (this.settings.autoComplete === true) { + autoPlaces.addListener('place_changed', function(e) { + _this.processForm(e); + }); + } + } + + // Load the templates and continue from there + this._loadTemplates(); + }, + + /** + * Destroy + * Note: The Google map is not destroyed here because Google recommends using a single instance and reusing it (it's not really supported) + */ + destroy: function () { + this.writeDebug('destroy'); + // Reset + this.reset(); + var $mapDiv = $('#' + this.settings.mapID); + + // Remove marker event listeners + if(markers.length) { + for(var i = 0; i <= markers.length; i++) { + google.maps.event.removeListener(markers[i]); + } + } + + // Remove markup + $('.' + this.settings.locationList + ' ul').empty(); + if($mapDiv.hasClass('bh-sl-map-open')) { + $mapDiv.empty().removeClass('bh-sl-map-open'); + } + + // Remove modal markup + if (this.settings.modal === true) { + $('. ' + this.settings.overlay).remove(); + } + + // Remove map style from container + $mapDiv.attr('style', ''); + + // Hide map container + $this.hide(); + // Remove data + $.removeData($this.get(0)); + // Remove namespaced events + $(document).off(pluginName); + // Unbind plugin + $this.unbind(); + }, + + /** + * Reset function + * This method clears out all the variables and removes events. It does not reload the map. + */ + reset: function () { + this.writeDebug('reset'); + locationset = []; + featuredset = []; + normalset = []; + markers = []; + firstRun = false; + $(document).off('click.'+pluginName, '.' + this.settings.locationList + ' li'); + if( $('.' + this.settings.locationList + ' .bh-sl-close-directions-container').length ) { + $('.bh-sl-close-directions-container').remove(); + } + if(this.settings.inlineDirections === true) { + // Remove directions panel if it's there + var $adp = $('.' + this.settings.locationList + ' .adp'); + if ( $adp.length > 0 ) { + $adp.remove(); + $('.' + this.settings.locationList + ' ul').fadeIn(); + } + $(document).off('click', '.' + this.settings.locationList + ' li .loc-directions a'); + } + if(this.settings.pagination === true) { + $(document).off('click.'+pluginName, '.bh-sl-pagination li'); + } + }, + + /** + * Reset the form filters + */ + formFiltersReset: function () { + this.writeDebug('formFiltersReset'); + if (this.settings.taxonomyFilters === null) { + return; + } + + var $inputs = $('.' + this.settings.taxonomyFiltersContainer + ' input'), + $selects = $('.' + this.settings.taxonomyFiltersContainer + ' select'); + + if ( typeof($inputs) !== 'object') { + return; + } + + // Loop over the input fields + $inputs.each(function() { + if ($(this).is('input[type="checkbox"]') || $(this).is('input[type="radio"]')) { + $(this).prop('checked',false); + } + }); + + // Loop over select fields + $selects.each(function() { + $(this).prop('selectedIndex',0); + }); + }, + + /** + * Reload everything + * This method does a reset of everything and reloads the map as it would first appear. + */ + mapReload: function() { + this.writeDebug('mapReload'); + this.reset(); + + if ( this.settings.taxonomyFilters !== null ) { + this.formFiltersReset(); + this.taxonomyFiltersInit(); + } + + if ((olat) && (olng)) { + this.settings.mapSettings.zoom = originalZoom; + this.processForm(); + } + else { + this.mapping(mappingObj); + } + }, + + /** + * Notifications + * Some errors use alert by default. This is overridable with the callbackNotify option + * + * @param notifyText {string} the notification message + */ + notify: function (notifyText) { + this.writeDebug('notify',notifyText); + if (this.settings.callbackNotify) { + this.settings.callbackNotify.call(this, notifyText); + } + else { + alert(notifyText); + } + }, + + /** + * Distance calculations + */ + geoCodeCalcToRadian: function (v) { + this.writeDebug('geoCodeCalcToRadian',v); + return v * (Math.PI / 180); + }, + geoCodeCalcDiffRadian: function (v1, v2) { + this.writeDebug('geoCodeCalcDiffRadian',arguments); + return this.geoCodeCalcToRadian(v2) - this.geoCodeCalcToRadian(v1); + }, + geoCodeCalcCalcDistance: function (lat1, lng1, lat2, lng2, radius) { + this.writeDebug('geoCodeCalcCalcDistance',arguments); + return radius * 2 * Math.asin(Math.min(1, Math.sqrt(( Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.cos(this.geoCodeCalcToRadian(lat1)) * Math.cos(this.geoCodeCalcToRadian(lat2)) * Math.pow(Math.sin((this.geoCodeCalcDiffRadian(lng1, lng2)) / 2.0), 2.0) )))); + }, + + /** + * Check for query string + * + * @param param {string} query string parameter to test + * @returns {string} query string value + */ + getQueryString: function(param) { + this.writeDebug('getQueryString',param); + if(param) { + param = param.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); + var regex = new RegExp('[\\?&]' + param + '=([^&#]*)'), + results = regex.exec(location.search); + return (results === null) ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); + } + }, + + /** + * Get google.maps.Map instance + * + * @returns {Object} google.maps.Map instance + */ + getMap: function() { + return this.map; + }, + + /** + * Load templates via Handlebars templates in /templates or inline via IDs - private + */ + _loadTemplates: function () { + this.writeDebug('_loadTemplates'); + var source; + var _this = this; + var templateError = '
Error: Could not load plugin templates. Check the paths and ensure they have been uploaded. Paths will be wrong if you do not run this from a web server.
'; + // Get the KML templates + if (this.settings.dataType === 'kml' && this.settings.listTemplateID === null && this.settings.infowindowTemplateID === null) { + + // Try loading the external template files + $.when( + // KML infowindows + $.get(this.settings.KMLinfowindowTemplatePath, function (template) { + source = template; + infowindowTemplate = Handlebars.compile(source); + }), + + // KML locations list + $.get(this.settings.KMLlistTemplatePath, function (template) { + source = template; + listTemplate = Handlebars.compile(source); + }) + ).then(function () { + // Continue to the main script if templates are loaded successfully + _this.locator(); + + }, function () { + // KML templates not loaded + $('.' + _this.settings.formContainer).append(templateError); + throw new Error('Could not load storeLocator plugin templates'); + }); + } + // Handle script tag template method + else if (this.settings.listTemplateID !== null && this.settings.infowindowTemplateID !== null) { + // Infowindows + infowindowTemplate = Handlebars.compile($('#' + this.settings.infowindowTemplateID).html()); + + // Locations list + listTemplate = Handlebars.compile($('#' + this.settings.listTemplateID).html()); + + // Continue to the main script + _this.locator(); + } + // Get the JSON/XML templates + else { + // Try loading the external template files + $.when( + // Infowindows + $.get(this.settings.infowindowTemplatePath, function (template) { + source = template; + infowindowTemplate = Handlebars.compile(source); + }), + + // Locations list + $.get(this.settings.listTemplatePath, function (template) { + source = template; + listTemplate = Handlebars.compile(source); + }) + ).then(function () { + // Continue to the main script if templates are loaded successfully + _this.locator(); + + }, function () { + // JSON/XML templates not loaded + $('.' + _this.settings.formContainer).append(templateError); + throw new Error('Could not load storeLocator plugin templates'); + }); + } + }, + + /** + * Primary locator function runs after the templates are loaded + */ + locator: function () { + this.writeDebug('locator'); + if (this.settings.slideMap === true) { + // Let's hide the map container to begin + $this.hide(); + } + + this._start(); + this._formEventHandler(); + }, + + /** + * Form event handler setup - private + */ + _formEventHandler: function () { + this.writeDebug('_formEventHandler'); + var _this = this; + // ASP.net or regular submission? + if (this.settings.noForm === true) { + $(document).on('click.'+pluginName, '.' + this.settings.formContainer + ' button', function (e) { + _this.processForm(e); + }); + $(document).on('keydown.'+pluginName, function (e) { + if (e.keyCode === 13 && $('#' + _this.settings.addressID).is(':focus')) { + _this.processForm(e); + } + }); + } + else { + $(document).on('submit.'+pluginName, '#' + this.settings.formID, function (e) { + _this.processForm(e); + }); + } + + // Reset button trigger + if ($('.bh-sl-reset').length && $('#' + this.settings.mapID).length) { + $(document).on('click.' + pluginName, '.bh-sl-reset', function () { + _this.mapReload(); + }); + } + }, + + /** + * AJAX data request - private + * + * @param lat {number} latitude + * @param lng {number} longitude + * @param address {string} street address + * @param geocodeData {object} full Google geocode results object + * @returns {Object} deferred object + */ + _getData: function (lat, lng, address, geocodeData ) { + this.writeDebug('_getData',arguments); + var _this = this, + northEast = '', + southWest = '', + formattedAddress = ''; + + // Define extra geocode result info + if ( typeof geocodeData !== 'undefined' && typeof geocodeData.geometry.bounds !== 'undefined') { + formattedAddress = geocodeData.formatted_address; + northEast = JSON.stringify( geocodeData.geometry.bounds.getNorthEast() ); + southWest = JSON.stringify( geocodeData.geometry.bounds.getSouthWest() ); + } + + // Before send callback + if (this.settings.callbackBeforeSend) { + this.settings.callbackBeforeSend.call(this, lat, lng, address, formattedAddress, northEast, southWest); + } + + // Raw data + if( _this.settings.dataRaw !== null ) { + // XML + if( dataTypeRead === 'xml' ) { + return $.parseXML(_this.settings.dataRaw); + } + + // JSON + else if( dataTypeRead === 'json' ) { + if (Array.isArray && Array.isArray(_this.settings.dataRaw)) { + return _this.settings.dataRaw; + } + else if (typeof _this.settings.dataRaw === 'string') { + return $.parseJSON(_this.settings.dataRaw); + } + else { + return []; + } + + } + } + // Remote data + else { + var d = $.Deferred(); + + // Loading + if(this.settings.loading === true){ + $('.' + this.settings.formContainer).append('
'); + } + + // AJAX request + $.ajax({ + type : 'GET', + url : this.settings.dataLocation + (this.settings.dataType === 'jsonp' ? (this.settings.dataLocation.match(/\?/) ? '&' : '?') + 'callback=?' : ''), + // Passing the lat, lng, address, formatted address and bounds with the AJAX request so they can optionally be used by back-end languages + data: { + 'origLat' : lat, + 'origLng' : lng, + 'origAddress': address, + 'formattedAddress': formattedAddress, + 'boundsNorthEast' : northEast, + 'boundsSouthWest' : southWest + }, + dataType : dataTypeRead, + jsonpCallback: (this.settings.dataType === 'jsonp' ? this.settings.callbackJsonp : null) + }).done(function(p) { + d.resolve(p); + + // Loading remove + if(_this.settings.loading === true){ + $('.' + _this.settings.formContainer + ' .' + _this.settings.loadingContainer).remove(); + } + }).fail(d.reject); + return d.promise(); + } + }, + + /** + * Checks for default location, full map, and HTML5 geolocation settings - private + */ + _start: function () { + this.writeDebug('_start'); + var _this = this, + doAutoGeo = this.settings.autoGeocode, + latlng, + originAddress; + + // Full map blank start + if (_this.settings.fullMapStartBlank !== false) { + var $mapDiv = $('#' + _this.settings.mapID); + $mapDiv.addClass('bh-sl-map-open'); + var myOptions = _this.settings.mapSettings; + myOptions.zoom = _this.settings.fullMapStartBlank; + + latlng = new google.maps.LatLng(this.settings.defaultLat, this.settings.defaultLng); + myOptions.center = latlng; + + // Create the map + _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); + + // Re-center the map when the browser is re-sized + google.maps.event.addDomListener(window, 'resize', function() { + var center = _this.map.getCenter(); + google.maps.event.trigger(_this.map, 'resize'); + _this.map.setCenter(center); + }); + + // Only do this once + _this.settings.fullMapStartBlank = false; + myOptions.zoom = originalZoom; + } + else { + // If a default location is set + if (this.settings.defaultLoc === true) { + this.defaultLocation(); + } + + // If there is already have a value in the address bar + if ($.trim($('#' + this.settings.addressID).val()) !== ''){ + _this.writeDebug('Using Address Field'); + _this.processForm(null); + doAutoGeo = false; // No need for additional processing + } + // If show full map option is true + else if (this.settings.fullMapStart === true) { + if((this.settings.querystringParams === true && this.getQueryString(this.settings.addressID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.searchID)) || (this.settings.querystringParams === true && this.getQueryString(this.settings.maxDistanceID))) { + _this.writeDebug('Using Query String'); + this.processForm(null); + doAutoGeo = false; // No need for additional processing + } + else { + this.mapping(null); + } + } + + // HTML5 auto geolocation API option + if (this.settings.autoGeocode === true && doAutoGeo === true) { + _this.writeDebug('Auto Geo'); + + _this.htmlGeocode(); + } + + // HTML5 geolocation API button option + if (this.settings.autoGeocode !== null) { + _this.writeDebug('Button Geo'); + + $(document).on('click.'+pluginName, '#' + this.settings.geocodeID, function () { + _this.htmlGeocode(); + }); + } + } + }, + + /** + * Geocode function used for auto geocode setting and geocodeID button + */ + htmlGeocode: function() { + this.writeDebug('htmlGeocode',arguments); + var _this = this; + + if (this.settings.sessionStorage === true && window.sessionStorage && window.sessionStorage.getItem('myGeo')){ + this.writeDebug('Using Session Saved Values for GEO'); + this.autoGeocodeQuery(JSON.parse(window.sessionStorage.getItem('myGeo'))); + return false; + } + else if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(function(position){ + _this.writeDebug('Current Position Result'); + // To not break autoGeocodeQuery then we create the obj to match the geolocation format + var pos = { + coords: { + latitude : position.coords.latitude, + longitude: position.coords.longitude, + accuracy : position.coords.accuracy + } + }; + // Have to do this to get around scope issues + if (_this.settings.sessionStorage === true && window.sessionStorage) { + window.sessionStorage.setItem('myGeo',JSON.stringify(pos)); + } + _this.autoGeocodeQuery(pos); + }, function(error){ + _this._autoGeocodeError(error); + }); + } + }, + + /** + * Geocode function used to geocode the origin (entered location) + */ + googleGeocode: function (thisObj) { + thisObj.writeDebug('googleGeocode',arguments); + var _this = thisObj; + var geocoder = new google.maps.Geocoder(); + this.geocode = function (request, callbackFunction) { + geocoder.geocode(request, function (results, status) { + if (status === google.maps.GeocoderStatus.OK) { + var result = {}; + result.latitude = results[0].geometry.location.lat(); + result.longitude = results[0].geometry.location.lng(); + result.geocodeResult = results[0]; + callbackFunction(result); + } else { + callbackFunction(null); + throw new Error('Geocode was not successful for the following reason: ' + status); + } + }); + }; + }, + + /** + * Reverse geocode to get address for automatic options needed for directions link + */ + reverseGoogleGeocode: function (thisObj) { + thisObj.writeDebug('reverseGoogleGeocode',arguments); + var _this = thisObj; + var geocoder = new google.maps.Geocoder(); + this.geocode = function (request, callbackFunction) { + geocoder.geocode(request, function (results, status) { + if (status === google.maps.GeocoderStatus.OK) { + if (results[0]) { + var result = {}; + result.address = results[0].formatted_address; + callbackFunction(result); + } + } else { + callbackFunction(null); + throw new Error('Reverse geocode was not successful for the following reason: ' + status); + } + }); + }; + }, + + /** + * Rounding function used for distances + * + * @param num {number} the full number + * @param dec {number} the number of digits to show after the decimal + * @returns {number} + */ + roundNumber: function (num, dec) { + this.writeDebug('roundNumber',arguments); + return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); + }, + + /** + * Checks to see if the object is empty. Using this instead of $.isEmptyObject for legacy browser support + * + * @param obj {Object} the object to check + * @returns {boolean} + */ + isEmptyObject: function (obj) { + this.writeDebug('isEmptyObject',arguments); + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + return false; + } + } + return true; + }, + + /** + * Checks to see if all the property values in the object are empty + * + * @param obj {Object} the object to check + * @returns {boolean} + */ + hasEmptyObjectVals: function (obj) { + this.writeDebug('hasEmptyObjectVals',arguments); + var objTest = true; + + for(var key in obj) { + if(obj.hasOwnProperty(key)) { + if(obj[key] !== '' && obj[key].length !== 0) { + objTest = false; + } + } + } + + return objTest; + }, + + /** + * Modal window close function + */ + modalClose: function () { + this.writeDebug('modalClose'); + // Callback + if (this.settings.callbackModalClose) { + this.settings.callbackModalClose.call(this); + } + + // Reset the filters + filters = {}; + + // Undo category selections + $('.' + this.settings.overlay + ' select').prop('selectedIndex', 0); + $('.' + this.settings.overlay + ' input').prop('checked', false); + + // Hide the modal + $('.' + this.settings.overlay).hide(); + }, + + /** + * Create the location variables - private + * + * @param loopcount {number} current marker id + */ + _createLocationVariables: function (loopcount) { + this.writeDebug('_createLocationVariables',arguments); + var value; + locationData = {}; + + for (var key in locationset[loopcount]) { + if (locationset[loopcount].hasOwnProperty(key)) { + value = locationset[loopcount][key]; + + if (key === 'distance') { + value = this.roundNumber(value, 2); + } + + locationData[key] = value; + } + } + }, + + /** + * Location distance sorting function + * + * @param locationsarray {array} locationset array + */ + sortNumerically: function (locationsarray) { + this.writeDebug('sortNumerically',arguments); + locationsarray.sort(function (a, b) { + return ((a.distance < b.distance) ? -1 : ((a.distance > b.distance) ? 1 : 0)); + }); + }, + + /** + * Filter the data with Regex + * + * @param data {array} data array to check for filter values + * @param filters {Object} taxonomy filters object + * @returns {boolean} + */ + filterData: function (data, filters) { + this.writeDebug('filterData',arguments); + var filterTest = true; + + for (var k in filters) { + if (filters.hasOwnProperty(k)) { + + // Exclusive filtering + if(this.settings.exclusiveFiltering === true) { + var filterTests = filters[k]; + var exclusiveTest = []; + + for(var l = 0; l < filterTests.length; l++) { + exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/[^\x00-\x7F]/g, '')); + } + + if(exclusiveTest.indexOf(true) === -1) { + filterTest = false; + } + } + // Inclusive filtering + else { + if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/[^\x00-\x7F]/g, '')))) { + filterTest = false; + } + } + } + } + + if (filterTest) { + return true; + } + }, + + /** + * Build pagination numbers and next/prev links - private + * + * @param currentPage {number} + * @param totalPages {number} + * @returns {string} + */ + _paginationOutput: function(currentPage, totalPages) { + this.writeDebug('_paginationOutput',arguments); + + currentPage = parseFloat(currentPage); + var output = ''; + var nextPage = currentPage + 1; + var prevPage = currentPage - 1; + + // Previous page + if( currentPage > 0 ) { + output += '
  • ' + this.settings.prevPage + '
  • '; + } + + // Add the numbers + for (var p = 0; p < Math.ceil(totalPages); p++) { + var n = p + 1; + + if (p === currentPage) { + output += '
  • ' + n + '
  • '; + } + else { + output += '
  • ' + n + '
  • '; + } + } + + // Next page + if( nextPage < totalPages ) { + output += '
  • ' + this.settings.nextPage + '
  • '; + } + + return output; + }, + + /** + * Set up the pagination pages + * + * @param currentPage {number} optional current page + */ + paginationSetup: function (currentPage) { + this.writeDebug('paginationSetup',arguments); + var pagesOutput = ''; + var totalPages; + var $paginationList = $('.bh-sl-pagination-container .bh-sl-pagination'); + + // Total pages + if ( this.settings.storeLimit === -1 || locationset.length < this.settings.storeLimit ) { + totalPages = locationset.length / this.settings.locationsPerPage; + } else { + totalPages = this.settings.storeLimit / this.settings.locationsPerPage; + } + + // Current page check + if (typeof currentPage === 'undefined') { + currentPage = 0; + } + + // Initial pagination setup + if ($paginationList.length === 0) { + + pagesOutput = this._paginationOutput(currentPage, totalPages); + } + // Update pagination on page change + else { + // Remove the old pagination + $paginationList.empty(); + + // Add the numbers + pagesOutput = this._paginationOutput(currentPage, totalPages); + } + + $paginationList.append(pagesOutput); + }, + + /** + * Marker image setup + * + * @param markerUrl {string} path to marker image + * @param markerWidth {number} width of marker + * @param markerHeight {number} height of marker + * @returns {Object} Google Maps icon object + */ + markerImage: function (markerUrl, markerWidth, markerHeight) { + this.writeDebug('markerImage',arguments); + var markerImg; + + // User defined marker dimensions + if(typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') { + markerImg = { + url: markerUrl, + size: new google.maps.Size(markerWidth, markerHeight), + scaledSize: new google.maps.Size(markerWidth, markerHeight) + }; + } + // Default marker dimensions: 32px x 32px + else { + markerImg = { + url: markerUrl, + size: new google.maps.Size(32, 32), + scaledSize: new google.maps.Size(32, 32) + }; + } + + return markerImg; + }, + + /** + * Map marker setup + * + * @param point {Object} LatLng of current location + * @param name {string} location name + * @param address {string} location address + * @param letter {string} optional letter used for front-end identification and correlation between list and points + * @param map {Object} the Google Map + * @param category {string} location category/categories + * @returns {Object} Google Maps marker + */ + createMarker: function (point, name, address, letter, map, category) { + this.writeDebug('createMarker',arguments); + var marker, markerImg, letterMarkerImg; + var categories = []; + + // Custom multi-marker image override (different markers for different categories + if(this.settings.catMarkers !== null) { + if(typeof category !== 'undefined') { + // Multiple categories + if(category.indexOf(',') !== -1) { + // Break the category variable into an array if there are multiple categories for the location + categories = category.split(','); + // With multiple categories the color will be determined by the last matched category in the data + for(var i = 0; i < categories.length; i++) { + if(categories[i] in this.settings.catMarkers) { + markerImg = this.markerImage(this.settings.catMarkers[categories[i]][0], parseInt(this.settings.catMarkers[categories[i]][1]), parseInt(this.settings.catMarkers[categories[i]][2])); + } + } + } + // Single category + else { + if(category in this.settings.catMarkers) { + markerImg = this.markerImage(this.settings.catMarkers[category][0], parseInt(this.settings.catMarkers[category][1]), parseInt(this.settings.catMarkers[category][2])); + } + } + } + } + + // Custom single marker image override + if(this.settings.markerImg !== null) { + if(this.settings.markerDim === null) { + markerImg = this.markerImage(this.settings.markerImg); + } + else { + markerImg = this.markerImage(this.settings.markerImg, this.settings.markerDim.width, this.settings.markerDim.height); + } + } + + // Marker setup + if (this.settings.callbackCreateMarker) { + // Marker override callback + marker = this.settings.callbackCreateMarker.call(this, map, point, letter, category); + } + else { + // Create the default markers + if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || this.settings.catMarkers !== null || this.settings.markerImg !== null || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { + marker = new google.maps.Marker({ + position : point, + map : map, + draggable: false, + icon: markerImg // Reverts to default marker if nothing is passed + }); + } + else { + // Letter markers image + letterMarkerImg = { + url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text=' + letter + '&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48' + }; + + // Letter markers + marker = new google.maps.Marker({ + position : point, + map : map, + icon : letterMarkerImg, + draggable: false + }); + } + } + + return marker; + }, + + /** + * Define the location data for the templates - private + * + * @param currentMarker {Object} Google Maps marker + * @param storeStart {number} optional first location on the current page + * @param page {number} optional current page + * @returns {Object} extended location data object + */ + _defineLocationData: function (currentMarker, storeStart, page) { + this.writeDebug('_defineLocationData',arguments); + var indicator = ''; + this._createLocationVariables(currentMarker.get('id')); + + var distLength; + if (locationData.distance <= 1) { + if (this.settings.lengthUnit === 'km') { + distLength = this.settings.kilometerLang; + } + else { + distLength = this.settings.mileLang; + } + } + else { + if (this.settings.lengthUnit === 'km') { + distLength = this.settings.kilometersLang; + } + else { + distLength = this.settings.milesLang; + } + } + + // Set up alpha character + var markerId = currentMarker.get('id'); + // Use dot markers instead of alpha if there are more than 26 locations + if (this.settings.disableAlphaMarkers === true || this.settings.storeLimit === -1 || this.settings.storeLimit > 26 || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { + indicator = markerId + 1; + } + else { + if (page > 0) { + indicator = String.fromCharCode('A'.charCodeAt(0) + (storeStart + markerId)); + } + else { + indicator = String.fromCharCode('A'.charCodeAt(0) + markerId); + } + } + + // Define location data + return { + location: [$.extend(locationData, { + 'markerid': markerId, + 'marker' : indicator, + 'length' : distLength, + 'origin' : originalOrigin + })] + }; + }, + + /** + * Set up the list templates + * + * @param marker {Object} Google Maps marker + * @param storeStart {number} optional first location on the current page + * @param page {number} optional current page + */ + listSetup: function (marker, storeStart, page) { + this.writeDebug('listSetup',arguments); + // Define the location data + var locations = this._defineLocationData(marker, storeStart, page); + + // Set up the list template with the location data + var listHtml = listTemplate(locations); + $('.' + this.settings.locationList + ' ul').append(listHtml); + }, + + /** + * Change the selected marker image + * + * @param marker {Object} Google Maps marker object + */ + changeSelectedMarker: function (marker) { + var markerImg; + + // Reset the previously selected marker + if ( typeof prevSelectedMarkerAfter !== 'undefined' ) { + prevSelectedMarkerAfter.setIcon( prevSelectedMarkerBefore ); + } + + // Change the selected marker icon + if(this.settings.selectedMarkerImgDim === null) { + markerImg = this.markerImage(this.settings.selectedMarkerImg); + } else { + markerImg = this.markerImage(this.settings.selectedMarkerImg, this.settings.selectedMarkerImgDim.width, this.settings.selectedMarkerImgDim.height); + } + + // Save the marker before switching it + prevSelectedMarkerBefore = marker.icon; + + marker.setIcon( markerImg ); + + // Save the marker to a variable so it can be reverted when another marker is clicked + prevSelectedMarkerAfter = marker; + }, + + /** + * Create the infowindow + * + * @param marker {Object} Google Maps marker object + * @param location {string} indicates if the list or a map marker was clicked + * @param infowindow Google Maps InfoWindow constructor + * @param storeStart {number} + * @param page {number} + */ + createInfowindow: function (marker, location, infowindow, storeStart, page) { + this.writeDebug('createInfowindow',arguments); + var _this = this; + // Define the location data + var locations = this._defineLocationData(marker, storeStart, page); + + // Set up the infowindow template with the location data + var formattedAddress = infowindowTemplate(locations); + + // Opens the infowindow when list item is clicked + if (location === 'left') { + infowindow.setContent(formattedAddress); + infowindow.open(marker.get('map'), marker); + } + // Opens the infowindow when the marker is clicked + else { + google.maps.event.addListener(marker, 'click', function () { + infowindow.setContent(formattedAddress); + infowindow.open(marker.get('map'), marker); + // Focus on the list + var markerId = marker.get('id'); + var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']'); + + if ($selectedLocation.length > 0) { + // Marker click callback + if (_this.settings.callbackMarkerClick) { + _this.settings.callbackMarkerClick.call(this, marker, markerId, $selectedLocation); + } + + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $selectedLocation.addClass('list-focus'); + + // Scroll list to selected marker + var $container = $('.' + _this.settings.locationList); + $container.animate({ + scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop() + }); + } + + // Custom selected marker override + if(_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(marker); + } + }); + } + }, + + /** + * HTML5 geocoding function for automatic location detection + * + * @param position {Object} coordinates + */ + autoGeocodeQuery: function (position) { + this.writeDebug('autoGeocodeQuery',arguments); + var _this = this, + distance = null, + $distanceInput = $('#' + this.settings.maxDistanceID), + originAddress; + + // Query string parameters + if(this.settings.querystringParams === true) { + // Check for distance query string parameters + if(this.getQueryString(this.settings.maxDistanceID)){ + distance = this.getQueryString(this.settings.maxDistanceID); + + if($distanceInput.val() !== '') { + distance = $distanceInput.val(); + } + } + else{ + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + } + else { + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + + // The address needs to be determined for the directions link + var r = new this.reverseGoogleGeocode(this); + var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); + r.geocode({'latLng': latlng}, function (data) { + if (data !== null) { + originAddress = addressInput = data.address; + olat = mappingObj.lat = position.coords.latitude; + olng = mappingObj.lng = position.coords.longitude; + mappingObj.origin = originAddress; + mappingObj.distance = distance; + _this.mapping(mappingObj); + } else { + // Unable to geocode + _this.notify(_this.settings.addressErrorAlert); + } + }); + }, + + /** + * Handle autoGeocode failure - private + * + */ + _autoGeocodeError: function () { + this.writeDebug('_autoGeocodeError'); + // If automatic detection doesn't work show an error + this.notify(this.settings.autoGeocodeErrorAlert); + }, + + /** + * Default location method + */ + defaultLocation: function() { + this.writeDebug('defaultLocation'); + var _this = this, + distance = null, + $distanceInput = $('#' + this.settings.maxDistanceID), + originAddress; + + // Query string parameters + if(this.settings.querystringParams === true) { + // Check for distance query string parameters + if(this.getQueryString(this.settings.maxDistanceID)){ + distance = this.getQueryString(this.settings.maxDistanceID); + + if($distanceInput.val() !== '') { + distance = $distanceInput.val(); + } + } + else{ + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + } + else { + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + + // The address needs to be determined for the directions link + var r = new this.reverseGoogleGeocode(this); + var latlng = new google.maps.LatLng(this.settings.defaultLat, this.settings.defaultLng); + r.geocode({'latLng': latlng}, function (data) { + if (data !== null) { + originAddress = addressInput = data.address; + olat = mappingObj.lat = _this.settings.defaultLat; + olng = mappingObj.lng = _this.settings.defaultLng; + mappingObj.distance = distance; + mappingObj.origin = originAddress; + _this.mapping(mappingObj); + } else { + // Unable to geocode + _this.notify(_this.settings.addressErrorAlert); + } + }); + }, + + /** + * Change the page + * + * @param newPage {number} page to change to + */ + paginationChange: function (newPage) { + this.writeDebug('paginationChange',arguments); + + // Page change callback + if (this.settings.callbackPageChange) { + this.settings.callbackPageChange.call(this, newPage); + } + + mappingObj.page = newPage; + this.mapping(mappingObj); + }, + + /** + * Get the address by marker ID + * + * @param markerID {number} location ID + * @returns {string} formatted address + */ + getAddressByMarker: function(markerID) { + this.writeDebug('getAddressByMarker',arguments); + var formattedAddress = ""; + // Set up formatted address + if(locationset[markerID].address){ formattedAddress += locationset[markerID].address + ' '; } + if(locationset[markerID].address2){ formattedAddress += locationset[markerID].address2 + ' '; } + if(locationset[markerID].city){ formattedAddress += locationset[markerID].city + ', '; } + if(locationset[markerID].state){ formattedAddress += locationset[markerID].state + ' '; } + if(locationset[markerID].postal){ formattedAddress += locationset[markerID].postal + ' '; } + if(locationset[markerID].country){ formattedAddress += locationset[markerID].country + ' '; } + + return formattedAddress; + }, + + /** + * Clear the markers from the map + */ + clearMarkers: function() { + this.writeDebug('clearMarkers'); + var locationsLimit = null; + + if (locationset.length < this.settings.storeLimit) { + locationsLimit = locationset.length; + } + else { + locationsLimit = this.settings.storeLimit; + } + + for (var i = 0; i < locationsLimit; i++) { + markers[i].setMap(null); + } + }, + + /** + * Handle inline direction requests + * + * @param origin {string} origin address + * @param locID {number} location ID + * @param map {Object} Google Map + */ + directionsRequest: function(origin, locID, map) { + this.writeDebug('directionsRequest',arguments); + + // Directions request callback + if (this.settings.callbackDirectionsRequest) { + this.settings.callbackDirectionsRequest.call(this, origin, locID, map); + } + + var destination = this.getAddressByMarker(locID); + + if(destination) { + // Hide the location list + $('.' + this.settings.locationList + ' ul').hide(); + // Remove the markers + this.clearMarkers(); + + // Clear the previous directions request + if(directionsDisplay !== null && typeof directionsDisplay !== 'undefined') { + directionsDisplay.setMap(null); + directionsDisplay = null; + } + + directionsDisplay = new google.maps.DirectionsRenderer(); + directionsService = new google.maps.DirectionsService(); + + // Directions request + directionsDisplay.setMap(map); + directionsDisplay.setPanel($('.bh-sl-directions-panel').get(0)); + + var request = { + origin: origin, + destination: destination, + travelMode: google.maps.TravelMode.DRIVING + }; + directionsService.route(request, function(response, status) { + if (status === google.maps.DirectionsStatus.OK) { + directionsDisplay.setDirections(response); + } + }); + + $('.' + this.settings.locationList).prepend('
    '); + } + + $(document).off('click', '.' + this.settings.locationList + ' li .loc-directions a'); + }, + + /** + * Close the directions panel and reset the map with the original locationset and zoom + */ + closeDirections: function() { + this.writeDebug('closeDirections'); + + // Close directions callback + if (this.settings.callbackCloseDirections) { + this.settings.callbackCloseDirections.call(this); + } + + // Remove the close icon, remove the directions, add the list back + this.reset(); + + if ((olat) && (olng)) { + if (this.countFilters() === 0) { + this.settings.mapSettings.zoom = originalZoom; + } + else { + this.settings.mapSettings.zoom = 0; + } + this.processForm(null); + } + + $(document).off('click.'+pluginName, '.' + this.settings.locationList + ' .bh-sl-close-icon'); + }, + + /** + * Process the form values and/or query string + * + * @param e {Object} event + */ + processForm: function (e) { + this.writeDebug('processForm',arguments); + var _this = this, + distance = null, + $addressInput = $('#' + this.settings.addressID), + $searchInput = $('#' + this.settings.searchID), + $distanceInput = $('#' + this.settings.maxDistanceID), + region = ''; + + // Stop the form submission + if(typeof e !== 'undefined' && e !== null) { + e.preventDefault(); + } + + // Query string parameters + if(this.settings.querystringParams === true) { + // Check for query string parameters + if(this.getQueryString(this.settings.addressID) || this.getQueryString(this.settings.searchID) || this.getQueryString(this.settings.maxDistanceID)){ + addressInput = this.getQueryString(this.settings.addressID); + searchInput = this.getQueryString(this.settings.searchID); + distance = this.getQueryString(this.settings.maxDistanceID); + + // The form should override the query string parameters + if($addressInput.val() !== '') { + addressInput = $addressInput.val(); + } + if($searchInput.val() !== '') { + searchInput = $searchInput.val(); + } + if($distanceInput.val() !== '') { + distance = $distanceInput.val(); + } + } + else{ + // Get the user input and use it + addressInput = $addressInput.val() || ''; + searchInput = $searchInput.val() || ''; + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + } + else { + // Get the user input and use it + addressInput = $addressInput.val() || ''; + searchInput = $searchInput.val() || ''; + // Get the distance if set + if (this.settings.maxDistance === true) { + distance = $distanceInput.val() || ''; + } + } + + // Region + if (this.settings.callbackRegion) { + // Region override callback + region = this.settings.callbackRegion.call(this, addressInput, searchInput, distance); + } else { + // Region setting + region = $('#' + this.settings.regionID).val(); + } + + if (addressInput === '' && searchInput === '') { + this._start(); + } + else if(addressInput !== '') { + + // Geocode the origin if needed + if(typeof originalOrigin !== 'undefined' && typeof olat !== 'undefined' && typeof olng !== 'undefined' && (addressInput === originalOrigin)) { + // Run the mapping function + mappingObj.lat = olat; + mappingObj.lng = olng; + mappingObj.origin = addressInput; + mappingObj.name = searchInput; + mappingObj.distance = distance; + _this.mapping(mappingObj); + } + else { + var g = new this.googleGeocode(this); + g.geocode({'address': addressInput, 'region': region}, function (data) { + if (data !== null) { + olat = data.latitude; + olng = data.longitude; + + // Run the mapping function + mappingObj.lat = olat; + mappingObj.lng = olng; + mappingObj.origin = addressInput; + mappingObj.name = searchInput; + mappingObj.distance = distance; + mappingObj.geocodeResult = data.geocodeResult; + _this.mapping(mappingObj); + } else { + // Unable to geocode + _this.notify(_this.settings.addressErrorAlert); + } + }); + } + } + else if(searchInput !== '') { + // Check for existing origin and remove if address input is blank. + if ( addressInput === '' ) { + delete mappingObj.origin; + } + + mappingObj.name = searchInput; + _this.mapping(mappingObj); + } + }, + + /** + * Checks distance of each location and sets up the locationset array + * + * @param data {Object} location data object + * @param lat {number} origin latitude + * @param lng {number} origin longitude + * @param origin {string} origin address + * @param maxDistance {number} maximum distance if set + */ + locationsSetup: function (data, lat, lng, origin, maxDistance) { + this.writeDebug('locationsSetup',arguments); + if (typeof origin !== 'undefined') { + if (!data.distance) { + data.distance = this.geoCodeCalcCalcDistance(lat, lng, data.lat, data.lng, GeoCodeCalc.EarthRadius); + } + } + + // Create the array + if (this.settings.maxDistance === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { + if (data.distance <= maxDistance) { + locationset.push( data ); + } + else { + return; + } + } + else if(this.settings.maxDistance === true && this.settings.querystringParams === true && typeof maxDistance !== 'undefined' && maxDistance !== null) { + if (data.distance <= maxDistance) { + locationset.push( data ); + } + else { + return; + } + } + else { + locationset.push( data ); + } + }, + + /** + * Count the selected filters + * + * @returns {number} + */ + countFilters: function () { + this.writeDebug('countFilters'); + var filterCount = 0; + + if (!this.isEmptyObject(filters)) { + for (var key in filters) { + if (filters.hasOwnProperty(key)) { + filterCount += filters[key].length; + } + } + } + + return filterCount; + }, + + /** + * Find the existing checked boxes for each checkbox filter - private + * + * @param key {string} object key + */ + _existingCheckedFilters: function(key) { + this.writeDebug('_existingCheckedFilters',arguments); + $('#' + this.settings.taxonomyFilters[key] + ' input[type=checkbox]').each(function () { + if ($(this).prop('checked')) { + var filterVal = $(this).val(); + + // Only add the taxonomy id if it doesn't already exist + if (typeof filterVal !== 'undefined' && filterVal !== '' && filters[key].indexOf(filterVal) === -1) { + filters[key].push(filterVal); + } + } + }); + }, + + /** + * Find the existing selected value for each select filter - private + * + * @param key {string} object key + */ + _existingSelectedFilters: function(key) { + this.writeDebug('_existingSelectedFilters',arguments); + $('#' + this.settings.taxonomyFilters[key] + ' select').each(function () { + var filterVal = $(this).val(); + + // Only add the taxonomy id if it doesn't already exist + if (typeof filterVal !== 'undefined' && filterVal !== '' && filters[key].indexOf(filterVal) === -1) { + filters[key] = [filterVal]; + } + }); + }, + + /** + * Find the existing selected value for each radio button filter - private + * + * @param key {string} object key + */ + _existingRadioFilters: function(key) { + this.writeDebug('_existingRadioFilters',arguments); + $('#' + this.settings.taxonomyFilters[key] + ' input[type=radio]').each(function () { + if ($(this).prop('checked')) { + var filterVal = $(this).val(); + + // Only add the taxonomy id if it doesn't already exist + if (typeof filterVal !== 'undefined' && filterVal !== '' && filters[key].indexOf(filterVal) === -1) { + filters[key] = [filterVal]; + } + } + }); + }, + + /** + * Check for existing filter selections + */ + checkFilters: function () { + this.writeDebug('checkFilters'); + for(var key in this.settings.taxonomyFilters) { + + if(this.settings.taxonomyFilters.hasOwnProperty(key)) { + // Find the existing checked boxes for each checkbox filter + this._existingCheckedFilters(key); + + // Find the existing selected value for each select filter + this._existingSelectedFilters(key); + + // Find the existing value for each radio button filter + this._existingRadioFilters(key); + } + } + }, + + /** + * Check query string parameters for filter values. + */ + checkQueryStringFilters: function () { + this.writeDebug('checkQueryStringFilters',arguments); + // Loop through the filters. + for(var key in filters) { + if(filters.hasOwnProperty(key)) { + var filterVal = this.getQueryString(key); + + // Only add the taxonomy id if it doesn't already exist + if (typeof filterVal !== 'undefined' && filterVal !== '' && filters[key].indexOf(filterVal) === -1) { + filters[key] = [filterVal]; + } + } + } + }, + + /** + * Get the filter key from the taxonomyFilter setting + * + * @param filterContainer {string} ID of the changed filter's container + */ + getFilterKey: function (filterContainer) { + this.writeDebug('getFilterKey',arguments); + for (var key in this.settings.taxonomyFilters) { + if (this.settings.taxonomyFilters.hasOwnProperty(key)) { + for (var i = 0; i < this.settings.taxonomyFilters[key].length; i++) { + if (this.settings.taxonomyFilters[key] === filterContainer) { + return key; + } + } + } + } + }, + + /** + * Initialize or reset the filters object to its original state + */ + taxonomyFiltersInit: function () { + this.writeDebug('taxonomyFiltersInit'); + + // Set up the filters + for(var key in this.settings.taxonomyFilters) { + if(this.settings.taxonomyFilters.hasOwnProperty(key)) { + filters[key] = []; + } + } + }, + + /** + * Taxonomy filtering + */ + taxonomyFiltering: function() { + this.writeDebug('taxonomyFiltering'); + var _this = this; + + // Set up the filters + _this.taxonomyFiltersInit(); + + // Check query string for taxonomy parameter keys. + _this.checkQueryStringFilters(); + + // Handle filter updates + $('.' + this.settings.taxonomyFiltersContainer).on('change.'+pluginName, 'input, select', function (e) { + e.stopPropagation(); + + var filterVal, filterContainer, filterKey; + + // Handle checkbox filters + if ($(this).is('input[type="checkbox"]')) { + // First check for existing selections + _this.checkFilters(); + + filterVal = $(this).val(); + filterContainer = $(this).closest('.bh-sl-filters').attr('id'); + filterKey = _this.getFilterKey(filterContainer); + + if (filterKey) { + // Add or remove filters based on checkbox values + if ($(this).prop('checked')) { + // Add ids to the filter arrays as they are checked + if(filters[filterKey].indexOf(filterVal) === -1) { + filters[filterKey].push(filterVal); + } + + if ($('#' + _this.settings.mapID).hasClass('bh-sl-map-open') === true) { + if ((olat) && (olng)) { + _this.settings.mapSettings.zoom = 0; + _this.processForm(); + } + else { + _this.mapping(mappingObj); + } + } + } + else { + // Remove ids from the filter arrays as they are unchecked + var filterIndex = filters[filterKey].indexOf(filterVal); + if (filterIndex > -1) { + filters[filterKey].splice(filterIndex, 1); + if ($('#' + _this.settings.mapID).hasClass('bh-sl-map-open') === true) { + if ((olat) && (olng)) { + if (_this.countFilters() === 0) { + _this.settings.mapSettings.zoom = originalZoom; + } + else { + _this.settings.mapSettings.zoom = 0; + } + _this.processForm(); + } + else { + _this.mapping(mappingObj); + } + } + } + } + } + } + // Handle select or radio filters + else if ($(this).is('select') || $(this).is('input[type="radio"]')) { + // First check for existing selections + _this.checkFilters(); + + filterVal = $(this).val(); + filterContainer = $(this).closest('.bh-sl-filters').attr('id'); + filterKey = _this.getFilterKey(filterContainer); + + // Check for blank filter on select since default val could be empty + if (filterVal) { + if (filterKey) { + filters[filterKey] = [filterVal]; + if ($('#' + _this.settings.mapID).hasClass('bh-sl-map-open') === true) { + if ((olat) && (olng)) { + _this.settings.mapSettings.zoom = 0; + _this.processForm(); + } + else { + _this.mapping(mappingObj); + } + } + } + } + // Reset if the default option is selected + else { + if (filterKey) { + filters[filterKey] = []; + } + _this.reset(); + if ((olat) && (olng)) { + _this.settings.mapSettings.zoom = originalZoom; + _this.processForm(); + } + else { + _this.mapping(mappingObj); + } + } + } + }); + }, + + /** + * Updates the location list to reflect the markers that are displayed on the map + * + * @param markers {Object} Map markers + * @param map {Object} Google map + */ + checkVisibleMarkers: function(markers, map) { + this.writeDebug('checkVisibleMarkers',arguments); + var _this = this; + var locations, listHtml; + + // Empty the location list + $('.' + this.settings.locationList + ' ul').empty(); + + // Set up the new list + $(markers).each(function(x, marker){ + if(map.getBounds().contains(marker.getPosition())) { + // Define the location data + _this.listSetup(marker, 0, 0); + + // Set up the list template with the location data + listHtml = listTemplate(locations); + $('.' + _this.settings.locationList + ' ul').append(listHtml); + } + }); + + // Re-add the list background colors + $('.' + this.settings.locationList + ' ul li:even').css('background', this.settings.listColor1); + $('.' + this.settings.locationList + ' ul li:odd').css('background', this.settings.listColor2); + }, + + /** + * Performs a new search when the map is dragged to a new position + * + * @param map {Object} Google map + */ + dragSearch: function(map) { + this.writeDebug('dragSearch',arguments); + var newCenter = map.getCenter(), + newCenterCoords, + _this = this; + + // Save the new zoom setting + this.settings.mapSettings.zoom = map.getZoom(); + + olat = mappingObj.lat = newCenter.lat(); + olng = mappingObj.lng = newCenter.lng(); + + // Determine the new origin addresss + var newAddress = new this.reverseGoogleGeocode(this); + newCenterCoords = new google.maps.LatLng(mappingObj.lat, mappingObj.lng); + newAddress.geocode({'latLng': newCenterCoords}, function (data) { + if (data !== null) { + mappingObj.origin = addressInput = data.address; + _this.mapping(mappingObj); + } else { + // Unable to geocode + _this.notify(_this.settings.addressErrorAlert); + } + }); + }, + + /** + * Handle no results + */ + emptyResult: function() { + this.writeDebug('emptyResult',arguments); + var center, + locList = $('.' + this.settings.locationList + ' ul'), + myOptions = this.settings.mapSettings, + noResults; + + // Create the map + this.map = new google.maps.Map(document.getElementById(this.settings.mapID), myOptions); + + // Callback + if (this.settings.callbackNoResults) { + this.settings.callbackNoResults.call(this, this.map, myOptions); + } + + // Empty the location list + locList.empty(); + + // Append the no results message + noResults = $('
  • ' + this.settings.noResultsTitle + '

    ' + this.settings.noResultsDesc + '
  • ').hide().fadeIn(); + locList.append(noResults); + + // Center on the original origin or 0,0 if not available + if ((olat) && (olng)) { + center = new google.maps.LatLng(olat, olng); + } else { + center = new google.maps.LatLng(0, 0); + } + + this.map.setCenter(center); + + if (originalZoom) { + this.map.setZoom(originalZoom); + } + }, + + + /** + * Origin marker setup + * + * @param map {Object} Google map + * @param origin {string} Origin address + * @param originPoint {Object} LatLng of origin point + */ + originMarker: function(map, origin, originPoint) { + this.writeDebug('originMarker',arguments); + + if (this.settings.originMarker !== true) { + return; + } + + var marker, + originImg = ''; + + if (typeof origin !== 'undefined') { + if(this.settings.originMarkerImg !== null) { + if(this.settings.originMarkerDim === null) { + originImg = this.markerImage(this.settings.originMarkerImg); + } + else { + originImg = this.markerImage(this.settings.originMarkerImg, this.settings.originMarkerDim.width, this.settings.originMarkerDim.height); + } + } + else { + originImg = { + url: 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png' + }; + } + + marker = new google.maps.Marker({ + position : originPoint, + map : map, + icon : originImg, + draggable: false + }); + } + }, + + /** + * Modal window setup + */ + modalWindow: function() { + this.writeDebug('modalWindow'); + + if (this.settings.modal !== true) { + return; + } + + var _this = this; + + // Callback + if (_this.settings.callbackModalOpen) { + _this.settings.callbackModalOpen.call(this); + } + + // Pop up the modal window + $('.' + _this.settings.overlay).fadeIn(); + // Close modal when close icon is clicked and when background overlay is clicked + $(document).on('click.'+pluginName, '.' + _this.settings.closeIcon + ', .' + _this.settings.overlay, function () { + _this.modalClose(); + }); + // Prevent clicks within the modal window from closing the entire thing + $(document).on('click.'+pluginName, '.' + _this.settings.modalWindow, function (e) { + e.stopPropagation(); + }); + // Close modal when escape key is pressed + $(document).on('keyup.'+pluginName, function (e) { + if (e.keyCode === 27) { + _this.modalClose(); + } + }); + }, + + /** + * Handle clicks from the location list + * + * @param map {Object} Google map + * @param infowindow + * @param storeStart + * @param page + */ + listClick: function(map, infowindow, storeStart, page) { + this.writeDebug('listClick',arguments); + var _this = this; + + $(document).on('click.' + pluginName, '.' + _this.settings.locationList + ' li', function () { + var markerId = $(this).data('markerid'); + var selectedMarker = markers[markerId]; + + // List click callback + if (_this.settings.callbackListClick) { + _this.settings.callbackListClick.call(this, markerId, selectedMarker); + } + + map.panTo(selectedMarker.getPosition()); + var listLoc = 'left'; + if (_this.settings.bounceMarker === true) { + selectedMarker.setAnimation(google.maps.Animation.BOUNCE); + setTimeout(function () { + selectedMarker.setAnimation(null); + _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + }, 700 + ); + } + else { + _this.createInfowindow(selectedMarker, listLoc, infowindow, storeStart, page); + } + + // Custom selected marker override + if (_this.settings.selectedMarkerImg !== null) { + _this.changeSelectedMarker(selectedMarker); + } + + // Focus on the list + $('.' + _this.settings.locationList + ' li').removeClass('list-focus'); + $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']').addClass('list-focus'); + }); + + // Prevent bubbling from list content links + $(document).on('click.'+pluginName, '.' + _this.settings.locationList + ' li a', function(e) { + e.stopPropagation(); + }); + }, + + /** + * Output total results count if HTML element with .bh-sl-total-results class exists + * + * @param locCount + */ + resultsTotalCount: function(locCount) { + this.writeDebug('resultsTotalCount',arguments); + + var $resultsContainer = $('.bh-sl-total-results'); + + if (typeof locCount === 'undefined' || locCount <= 0 || $resultsContainer.length === 0) { + return; + } + + $resultsContainer.text(locCount); + }, + + /** + * Inline directions setup + * + * @param map {Object} Google map + * @param origin {string} Origin address + */ + inlineDirections: function(map, origin) { + this.writeDebug('inlineDirections',arguments); + + if(this.settings.inlineDirections !== true || typeof origin === 'undefined') { + return; + } + + var _this = this; + + // Open directions + $(document).on('click.'+pluginName, '.' + _this.settings.locationList + ' li .loc-directions a', function (e) { + e.preventDefault(); + var locID = $(this).closest('li').attr('data-markerid'); + _this.directionsRequest(origin, locID, map); + + // Close directions + $(document).on('click.'+pluginName, '.' + _this.settings.locationList + ' .bh-sl-close-icon', function () { + _this.closeDirections(); + }); + }); + }, + + /** + * Visible markers list setup + * + * @param map {Object} Google map + * @param markers {Object} Map markers + */ + visibleMarkersList: function(map, markers) { + this.writeDebug('visibleMarkersList',arguments); + + if(this.settings.visibleMarkersList !== true) { + return; + } + + var _this = this; + + // Add event listener to filter the list when the map is fully loaded + google.maps.event.addListenerOnce(map, 'idle', function(){ + _this.checkVisibleMarkers(markers, map); + }); + + // Add event listener for center change + google.maps.event.addListener(map, 'center_changed', function() { + _this.checkVisibleMarkers(markers, map); + }); + + // Add event listener for zoom change + google.maps.event.addListener(map, 'zoom_changed', function() { + _this.checkVisibleMarkers(markers, map); + }); + }, + + /** + * The primary mapping function that runs everything + * + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + */ + mapping: function (mappingObject) { + this.writeDebug('mapping',arguments); + var _this = this; + var orig_lat, orig_lng, geocodeData, origin, originPoint, page; + if (!this.isEmptyObject(mappingObject)) { + orig_lat = mappingObject.lat; + orig_lng = mappingObject.lng; + geocodeData = mappingObject.geocodeResult; + origin = mappingObject.origin; + page = mappingObject.page; + } + + // Set the initial page to zero if not set + if ( _this.settings.pagination === true ) { + if (typeof page === 'undefined' || originalOrigin !== addressInput ) { + page = 0; + } + } + + // Data request + if (typeof origin === 'undefined' && this.settings.nameSearch === true) { + dataRequest = _this._getData(); + } + else { + // Setup the origin point + originPoint = new google.maps.LatLng(orig_lat, orig_lng); + + // If the origin hasn't changed use the existing data so we aren't making unneeded AJAX requests + if((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined')) { + origin = originalOrigin; + dataRequest = originalData; + } + else { + // Do the data request - doing this in mapping so the lat/lng and address can be passed over and used if needed + dataRequest = _this._getData(olat, olng, origin, geocodeData); + } + } + + // Check filters here to handle selected filtering after page reload + if(_this.settings.taxonomyFilters !== null && _this.hasEmptyObjectVals(filters)) { + _this.checkFilters(); + } + /** + * Process the location data + */ + // Raw data + if( _this.settings.dataRaw !== null ) { + _this.processData(mappingObject, originPoint, dataRequest, page); + } + // Remote data + else { + dataRequest.done(function (data) { + _this.processData(mappingObject, originPoint, data, page); + }); + } + }, + + /** + * Processes the location data + * + * @param mappingObject {Object} all the potential mapping properties - latitude, longitude, origin, name, max distance, page + * @param originPoint {Object} LatLng of origin point + * @param data {Object} location data + * @param page {number} current page number + */ + processData: function (mappingObject, originPoint, data, page) { + this.writeDebug('processData',arguments); + var _this = this; + var i = 0; + var orig_lat, orig_lng, origin, name, maxDistance, marker, bounds, storeStart, storeNumToShow, myOptions, distError, openMap, infowindow; + var taxFilters = {}; + if (!this.isEmptyObject(mappingObject)) { + orig_lat = mappingObject.lat; + orig_lng = mappingObject.lng; + origin = mappingObject.origin; + name = mappingObject.name; + maxDistance = mappingObject.distance; + } + + var $mapDiv = $('#' + _this.settings.mapID); + // Get the length unit + var distUnit = (_this.settings.lengthUnit === 'km') ? _this.settings.kilometersLang : _this.settings.milesLang; + + // Save data and origin separately so we can potentially avoid multiple AJAX requests + originalData = dataRequest; + if ( typeof origin !== 'undefined' ) { + originalOrigin = origin; + } + + // Callback + if (_this.settings.callbackSuccess) { + _this.settings.callbackSuccess.call(this); + } + + openMap = $mapDiv.hasClass('bh-sl-map-open'); + + // Set a variable for fullMapStart so we can detect the first run + if ( + ( _this.settings.fullMapStart === true && openMap === false ) || + ( _this.settings.autoGeocode === true && openMap === false ) || + ( _this.settings.defaultLoc === true && openMap === false ) + ) { + firstRun = true; + } + else { + _this.reset(); + } + + $mapDiv.addClass('bh-sl-map-open'); + + // Process the location data depending on the data format type + if (_this.settings.dataType === 'json' || _this.settings.dataType === 'jsonp') { + + // Process JSON + for(var x = 0; i < data.length; x++){ + var obj = data[x]; + var locationData = {}; + + // Parse each data variable + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + locationData[key] = obj[key]; + } + } + + _this.locationsSetup(locationData, orig_lat, orig_lng, origin, maxDistance); + + i++; + } + } + else if (_this.settings.dataType === 'kml') { + // Process KML + $(data).find('Placemark').each(function () { + var locationData = { + 'name' : $(this).find('name').text(), + 'lat' : $(this).find('coordinates').text().split(',')[1], + 'lng' : $(this).find('coordinates').text().split(',')[0], + 'description': $(this).find('description').text() + }; + + _this.locationsSetup(locationData, orig_lat, orig_lng, origin, maxDistance); + + i++; + }); + } + else { + // Process XML + $(data).find(_this.settings.xmlElement).each(function () { + var locationData = {}; + + for (var key in this.attributes) { + if (this.attributes.hasOwnProperty(key)) { + locationData[this.attributes[key].name] = this.attributes[key].value; + } + } + + _this.locationsSetup(locationData, orig_lat, orig_lng, origin, maxDistance); + + i++; + }); + } + + // Name search - using taxonomy filter to handle + if (_this.settings.nameSearch === true) { + if(typeof searchInput !== 'undefined') { + filters[_this.settings.nameAttribute] = [searchInput]; + } + } + + // Taxonomy filtering setup + if (_this.settings.taxonomyFilters !== null || _this.settings.nameSearch === true) { + + for(var k in filters) { + if (filters.hasOwnProperty(k) && filters[k].length > 0) { + // Let's use regex + for (var z = 0; z < filters[k].length; z++) { + // Creating a new object so we don't mess up the original filters + if (!taxFilters[k]) { + taxFilters[k] = []; + } + taxFilters[k][z] = '(?=.*\\b' + filters[k][z].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\])/g, '') + '\\b)'; + } + } + } + // Filter the data + if (!_this.isEmptyObject(taxFilters)) { + locationset = $.grep(locationset, function (val) { + return _this.filterData(val, taxFilters); + }); + } + } + + // Sort the multi-dimensional array by distance + if (typeof origin !== 'undefined') { + _this.sortNumerically(locationset); + } + + // Featured locations filtering + if (_this.settings.featuredLocations === true) { + // Create array for featured locations + featuredset = $.grep(locationset, function (val) { + return val.featured === 'true'; + }); + + // Create array for normal locations + normalset = $.grep(locationset, function (val) { + return val.featured !== 'true'; + }); + + // Combine the arrays + locationset = []; + locationset = featuredset.concat(normalset); + } + + // Check the closest marker + if (_this.isEmptyObject(taxFilters)) { + if (_this.settings.maxDistance === true && maxDistance) { + if (typeof locationset[0] === 'undefined' || locationset[0].distance > maxDistance) { + _this.notify(_this.settings.distanceErrorAlert + maxDistance + ' ' + distUnit); + } + } + else { + if (typeof locationset[0] !== 'undefined') { + if (_this.settings.distanceAlert !== -1 && locationset[0].distance > _this.settings.distanceAlert) { + _this.notify(_this.settings.distanceErrorAlert + _this.settings.distanceAlert + ' ' + distUnit); + distError = true; + } + } + else { + throw new Error('No locations found. Please check the dataLocation setting and path.'); + } + } + } + + // Slide in the map container + if (_this.settings.slideMap === true) { + $this.slideDown(); + } + + // Handle no results + if (_this.isEmptyObject(locationset) || locationset[0].result === 'none') { + _this.emptyResult(); + return; + } + + // Output page numbers if pagination setting is true + if (_this.settings.pagination === true) { + _this.paginationSetup(page); + } + + // Set up the modal window + _this.modalWindow(); + + // Avoid error if number of locations is less than the default of 26 + if (_this.settings.storeLimit === -1 || locationset.length < _this.settings.storeLimit || (this.settings.fullMapStart === true && firstRun === true && (isNaN(this.settings.fullMapStartListLimit) || this.settings.fullMapStartListLimit > 26 || this.settings.fullMapStartListLimit === -1))) { + storeNum = locationset.length; + } + else { + storeNum = _this.settings.storeLimit; + } + + // If pagination is on, change the store limit to the setting and slice the locationset array + if (_this.settings.pagination === true) { + storeNumToShow = _this.settings.locationsPerPage; + storeStart = page * _this.settings.locationsPerPage; + + if( (storeStart + storeNumToShow) > locationset.length ) { + storeNumToShow = _this.settings.locationsPerPage - ((storeStart + storeNumToShow) - locationset.length); + } + + locationset = locationset.slice(storeStart, storeStart + storeNumToShow); + storeNum = locationset.length; + } + else { + storeNumToShow = storeNum; + storeStart = 0; + } + + // Output location results count + _this.resultsTotalCount(locationset.length); + + // Google maps settings + if ((_this.settings.fullMapStart === true && firstRun === true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + myOptions = _this.settings.mapSettings; + bounds = new google.maps.LatLngBounds(); + } + else if (_this.settings.pagination === true) { + // Update the map to focus on the first point in the new set + var nextPoint = new google.maps.LatLng(locationset[0].lat, locationset[0].lng); + + if (page === 0) { + _this.settings.mapSettings.center = originPoint; + myOptions = _this.settings.mapSettings; + } + else { + _this.settings.mapSettings.center = nextPoint; + myOptions = _this.settings.mapSettings; + } + } + else { + _this.settings.mapSettings.center = originPoint; + myOptions = _this.settings.mapSettings; + } + + // Create the map + _this.map = new google.maps.Map(document.getElementById(_this.settings.mapID), myOptions); + + // Re-center the map when the browser is re-sized + google.maps.event.addDomListener(window, 'resize', function() { + var center = _this.map.getCenter(); + google.maps.event.trigger(_this.map, 'resize'); + _this.map.setCenter(center); + }); + + + // Add map drag listener if setting is enabled and re-search on drag end + if (_this.settings.dragSearch === true ) { + _this.map.addListener('dragend', function() { + _this.dragSearch(map); + }); + } + + // Load the map + $this.data(_this.settings.mapID.replace('#', ''), _this.map); + + // Map set callback. + if (_this.settings.callbackMapSet) { + _this.settings.callbackMapSet.call(this, _this.map, originPoint, originalZoom, myOptions); + } + + // Initialize the infowondow + if ( typeof InfoBubble !== 'undefined' && _this.settings.infoBubble !== null ) { + var infoBubbleSettings = _this.settings.infoBubble; + infoBubbleSettings.map = _this.map; + + infowindow = new InfoBubble(infoBubbleSettings); + } else { + infowindow = new google.maps.InfoWindow(); + } + + + // Add origin marker if the setting is set + _this.originMarker(_this.map, origin, originPoint); + + // Handle pagination + $(document).on('click.'+pluginName, '.bh-sl-pagination li', function (e) { + e.preventDefault(); + // Run paginationChange + _this.paginationChange($(this).attr('data-page')); + }); + + // Inline directions + _this.inlineDirections(_this.map, origin); + + // Add markers and infowindows loop + for (var y = 0; y <= storeNumToShow - 1; y++) { + var letter = ''; + + if (page > 0) { + letter = String.fromCharCode('A'.charCodeAt(0) + (storeStart + y)); + } + else { + letter = String.fromCharCode('A'.charCodeAt(0) + y); + } + + var point = new google.maps.LatLng(locationset[y].lat, locationset[y].lng); + marker = _this.createMarker(point, locationset[y].name, locationset[y].address, letter, _this.map, locationset[y].category); + marker.set('id', y); + markers[y] = marker; + if ((_this.settings.fullMapStart === true && firstRun === true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + bounds.extend(point); + } + // Pass variables to the pop-up infowindows + _this.createInfowindow(marker, null, infowindow, storeStart, page); + } + + // Center and zoom if no origin or zoom was provided, or distance of first marker is greater than distanceAlert + if ((_this.settings.fullMapStart === true && firstRun === true) || (_this.settings.mapSettings.zoom === 0) || (typeof origin === 'undefined') || (distError === true)) { + _this.map.fitBounds(bounds); + } + + // Create the links that focus on the related marker + var locList = $('.' + _this.settings.locationList + ' ul'); + locList.empty(); + + // Set up the location list markup + if (firstRun && _this.settings.fullMapStartListLimit !== false && !isNaN(_this.settings.fullMapStartListLimit) && _this.settings.fullMapStartListLimit !== -1) { + for (var m = 0; m < _this.settings.fullMapStartListLimit; m++) { + var currentMarker = markers[m]; + _this.listSetup(currentMarker, storeStart, page); + } + } else { + $(markers).each(function (x) { + var currentMarker = markers[x]; + _this.listSetup(currentMarker, storeStart, page); + }); + } + + // MarkerClusterer setup + if ( typeof MarkerClusterer !== 'undefined' && _this.settings.markerCluster !== null ) { + var markerCluster = new MarkerClusterer(_this.map, markers, _this.settings.markerCluster); + } + + // Handle clicks from the list + _this.listClick(_this.map, infowindow, storeStart, page); + + // Add the list li background colors - this wil be dropped in a future version in favor of CSS + $('.' + _this.settings.locationList + ' ul > li:even').css('background', _this.settings.listColor1); + $('.' + _this.settings.locationList + ' ul > li:odd').css('background', _this.settings.listColor2); + + // Visible markers list + _this.visibleMarkersList(_this.map, markers); + + // Modal ready callback + if (_this.settings.modal === true && _this.settings.callbackModalReady) { + _this.settings.callbackModalReady.call(this); + } + + // Filters callback + if (_this.settings.callbackFilters) { + _this.settings.callbackFilters.call(this, filters); + } + }, + + /** + * console.log helper function + * + * http://www.briangrinstead.com/blog/console-log-helper-function + */ + writeDebug: function () { + if (window.console && this.settings.debug) { + // Only run on the first time through - reset this function to the appropriate console.log helper + if (Function.prototype.bind) { + this.writeDebug = Function.prototype.bind.call(console.log, console, 'StoreLocator :'); + } else { + this.writeDebug = function () { + arguments[0] = 'StoreLocator : ' + arguments[0]; + Function.prototype.apply.call(console.log, console, arguments); + }; + } + this.writeDebug.apply(this, arguments); + } + } + + }); + + // A really lightweight plugin wrapper around the constructor, + // preventing against multiple instantiations and allowing any + // public function (ie. a function whose name doesn't start + // with an underscore) to be called via the jQuery plugin, + // e.g. $(element).defaultPluginName('functionName', arg1, arg2) + $.fn[ pluginName ] = function (options) { + var args = arguments; + // Is the first parameter an object (options), or was omitted, instantiate a new instance of the plugin + if (options === undefined || typeof options === 'object') { + return this.each(function () { + // Only allow the plugin to be instantiated once, so we check that the element has no plugin instantiation yet + if (!$.data(this, 'plugin_' + pluginName)) { + // If it has no instance, create a new one, pass options to our plugin constructor, and store the plugin instance in the elements jQuery data object. + $.data(this, 'plugin_' + pluginName, new Plugin( this, options )); + } + }); + // Treat this as a call to a public method + } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') { + // Cache the method call to make it possible to return a value + var returns; + + this.each(function () { + var instance = $.data(this, 'plugin_' + pluginName); + + // Tests that there's already a plugin-instance and checks that the requested public method exists + if (instance instanceof Plugin && typeof instance[options] === 'function') { + + // Call the method of our plugin instance, and pass it the supplied arguments. + returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) ); + } + + // Allow instances to be destroyed via the 'destroy' method + if (options === 'destroy') { + $.data(this, 'plugin_' + pluginName, null); + } + }); + + // If the earlier cached method gives a value back return the value, otherwise return this to preserve chainability. + return returns !== undefined ? returns : this; + } + }; + + +})(jQuery, window, document); diff --git a/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/jquery.storelocator.min.js b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/jquery.storelocator.min.js new file mode 100755 index 0000000..35db365 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/jquery.storelocator.min.js @@ -0,0 +1,6 @@ +/*! jQuery Google Maps Store Locator - v2.7.2 - 2016-12-03 +* http://www.bjornblog.com/web/jquery-store-locator-plugin +* Copyright (c) 2016 Bjorn Holine; Licensed MIT */ + +!function(a,b,c,d){"use strict";function e(b,c){g=a(b),this.element=b,this.settings=a.extend({},H,c),this._defaults=H,this._name=f,this.init()}var f="storeLocator";if("undefined"==typeof a.fn[f]&&"undefined"!=typeof google){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z=[],A=[],B=[],C=[],D={},E={},F={},G={},H={mapID:"bh-sl-map",locationList:"bh-sl-loc-list",formContainer:"bh-sl-form-container",formID:"bh-sl-user-location",addressID:"bh-sl-address",regionID:"bh-sl-region",mapSettings:{zoom:12,mapTypeId:google.maps.MapTypeId.ROADMAP},markerImg:null,markerDim:null,catMarkers:null,selectedMarkerImg:null,selectedMarkerImgDim:null,disableAlphaMarkers:!1,lengthUnit:"m",storeLimit:26,distanceAlert:60,dataType:"xml",dataLocation:"data/locations.xml",dataRaw:null,xmlElement:"marker",listColor1:"#ffffff",listColor2:"#eeeeee",originMarker:!1,originMarkerImg:null,originMarkerDim:null,bounceMarker:!0,slideMap:!0,modal:!1,overlay:"bh-sl-overlay",modalWindow:"bh-sl-modal-window",modalContent:"bh-sl-modal-content",closeIcon:"bh-sl-close-icon",defaultLoc:!1,defaultLat:null,defaultLng:null,autoComplete:!1,autoCompleteOptions:{},autoGeocode:!1,geocodeID:null,maxDistance:!1,maxDistanceID:"bh-sl-maxdistance",fullMapStart:!1,fullMapStartBlank:!1,fullMapStartListLimit:!1,noForm:!1,loading:!1,loadingContainer:"bh-sl-loading",featuredLocations:!1,pagination:!1,locationsPerPage:10,inlineDirections:!1,nameSearch:!1,searchID:"bh-sl-search",nameAttribute:"name",visibleMarkersList:!1,dragSearch:!1,infowindowTemplatePath:"assets/js/plugins/storeLocator/templates/infowindow-description.html",listTemplatePath:"assets/js/plugins/storeLocator/templates/location-list-description.html",KMLinfowindowTemplatePath:"assets/js/plugins/storeLocator/templates/kml-infowindow-description.html",KMLlistTemplatePath:"assets/js/plugins/storeLocator/templates/kml-location-list-description.html",listTemplateID:null,infowindowTemplateID:null,taxonomyFilters:null,taxonomyFiltersContainer:"bh-sl-filters-container",exclusiveFiltering:!1,querystringParams:!1,debug:!1,sessionStorage:!1,markerCluster:null,infoBubble:null,callbackNotify:null,callbackRegion:null,callbackBeforeSend:null,callbackSuccess:null,callbackModalOpen:null,callbackModalReady:null,callbackModalClose:null,callbackJsonp:null,callbackCreateMarker:null,callbackPageChange:null,callbackDirectionsRequest:null,callbackCloseDirections:null,callbackNoResults:null,callbackListClick:null,callbackMarkerClick:null,callbackFilters:null,callbackMapSet:null,addressErrorAlert:"Unable to find address",autoGeocodeErrorAlert:"Automatic location detection failed. Please fill in your address or zip code.",distanceErrorAlert:"Unfortunately, our closest location is more than ",mileLang:"mile",milesLang:"miles",kilometerLang:"kilometer",kilometersLang:"kilometers",noResultsTitle:"No results",noResultsDesc:"No locations were found with the given criteria. Please modify your selections or input.",nextPage:"Next »",prevPage:"« Prev"};a.extend(e.prototype,{init:function(){var b=this;if(this.writeDebug("init"),"km"===this.settings.lengthUnit?F.EarthRadius=6367:F.EarthRadius=3956,k="kml"===this.settings.dataType?"xml":this.settings.dataType,this.settings.inlineDirections===!0&&a("."+this.settings.locationList).prepend('
    '),n=this.settings.mapSettings.zoom,Handlebars.registerHelper("niceURL",function(a){return a?a.replace("https://","").replace("http://",""):void 0}),null!==this.settings.taxonomyFilters&&this.taxonomyFiltering(),this.settings.modal===!0&&(null!==this.settings.taxonomyFilters&&a("."+this.settings.taxonomyFiltersContainer).clone(!0,!0).prependTo(g),g.wrap('
    '),a("."+this.settings.modalWindow).prepend('
    '),a("."+this.settings.overlay).hide()),this.settings.autoComplete===!0){var d=c.getElementById(this.settings.addressID),e=new google.maps.places.Autocomplete(d,this.settings.autoCompleteOptions);this.settings.autoComplete===!0&&e.addListener("place_changed",function(a){b.processForm(a)})}this._loadTemplates()},destroy:function(){this.writeDebug("destroy"),this.reset();var b=a("#"+this.settings.mapID);if(C.length)for(var d=0;d<=C.length;d++)google.maps.event.removeListener(C[d]);a("."+this.settings.locationList+" ul").empty(),b.hasClass("bh-sl-map-open")&&b.empty().removeClass("bh-sl-map-open"),this.settings.modal===!0&&a(". "+this.settings.overlay).remove(),b.attr("style",""),g.hide(),a.removeData(g.get(0)),a(c).off(f),g.unbind()},reset:function(){if(this.writeDebug("reset"),A=[],z=[],B=[],C=[],y=!1,a(c).off("click."+f,"."+this.settings.locationList+" li"),a("."+this.settings.locationList+" .bh-sl-close-directions-container").length&&a(".bh-sl-close-directions-container").remove(),this.settings.inlineDirections===!0){var b=a("."+this.settings.locationList+" .adp");b.length>0&&(b.remove(),a("."+this.settings.locationList+" ul").fadeIn()),a(c).off("click","."+this.settings.locationList+" li .loc-directions a")}this.settings.pagination===!0&&a(c).off("click."+f,".bh-sl-pagination li")},formFiltersReset:function(){if(this.writeDebug("formFiltersReset"),null!==this.settings.taxonomyFilters){var b=a("."+this.settings.taxonomyFiltersContainer+" input"),c=a("."+this.settings.taxonomyFiltersContainer+" select");"object"==typeof b&&(b.each(function(){(a(this).is('input[type="checkbox"]')||a(this).is('input[type="radio"]'))&&a(this).prop("checked",!1)}),c.each(function(){a(this).prop("selectedIndex",0)}))}},mapReload:function(){this.writeDebug("mapReload"),this.reset(),null!==this.settings.taxonomyFilters&&(this.formFiltersReset(),this.taxonomyFiltersInit()),r&&s?(this.settings.mapSettings.zoom=n,this.processForm()):this.mapping(G)},notify:function(a){this.writeDebug("notify",a),this.settings.callbackNotify?this.settings.callbackNotify.call(this,a):alert(a)},geoCodeCalcToRadian:function(a){return this.writeDebug("geoCodeCalcToRadian",a),a*(Math.PI/180)},geoCodeCalcDiffRadian:function(a,b){return this.writeDebug("geoCodeCalcDiffRadian",arguments),this.geoCodeCalcToRadian(b)-this.geoCodeCalcToRadian(a)},geoCodeCalcCalcDistance:function(a,b,c,d,e){return this.writeDebug("geoCodeCalcCalcDistance",arguments),2*e*Math.asin(Math.min(1,Math.sqrt(Math.pow(Math.sin(this.geoCodeCalcDiffRadian(a,c)/2),2)+Math.cos(this.geoCodeCalcToRadian(a))*Math.cos(this.geoCodeCalcToRadian(c))*Math.pow(Math.sin(this.geoCodeCalcDiffRadian(b,d)/2),2))))},getQueryString:function(a){if(this.writeDebug("getQueryString",a),a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))}},getMap:function(){return this.map},_loadTemplates:function(){this.writeDebug("_loadTemplates");var b,c=this,d='
    Error: Could not load plugin templates. Check the paths and ensure they have been uploaded. Paths will be wrong if you do not run this from a web server.
    ';"kml"===this.settings.dataType&&null===this.settings.listTemplateID&&null===this.settings.infowindowTemplateID?a.when(a.get(this.settings.KMLinfowindowTemplatePath,function(a){b=a,j=Handlebars.compile(b)}),a.get(this.settings.KMLlistTemplatePath,function(a){b=a,i=Handlebars.compile(b)})).then(function(){c.locator()},function(){throw a("."+c.settings.formContainer).append(d),new Error("Could not load storeLocator plugin templates")}):null!==this.settings.listTemplateID&&null!==this.settings.infowindowTemplateID?(j=Handlebars.compile(a("#"+this.settings.infowindowTemplateID).html()),i=Handlebars.compile(a("#"+this.settings.listTemplateID).html()),c.locator()):a.when(a.get(this.settings.infowindowTemplatePath,function(a){b=a,j=Handlebars.compile(b)}),a.get(this.settings.listTemplatePath,function(a){b=a,i=Handlebars.compile(b)})).then(function(){c.locator()},function(){throw a("."+c.settings.formContainer).append(d),new Error("Could not load storeLocator plugin templates")})},locator:function(){this.writeDebug("locator"),this.settings.slideMap===!0&&g.hide(),this._start(),this._formEventHandler()},_formEventHandler:function(){this.writeDebug("_formEventHandler");var b=this;this.settings.noForm===!0?(a(c).on("click."+f,"."+this.settings.formContainer+" button",function(a){b.processForm(a)}),a(c).on("keydown."+f,function(c){13===c.keyCode&&a("#"+b.settings.addressID).is(":focus")&&b.processForm(c)})):a(c).on("submit."+f,"#"+this.settings.formID,function(a){b.processForm(a)}),a(".bh-sl-reset").length&&a("#"+this.settings.mapID).length&&a(c).on("click."+f,".bh-sl-reset",function(){b.mapReload()})},_getData:function(b,c,d,e){this.writeDebug("_getData",arguments);var f=this,g="",h="",i="";if("undefined"!=typeof e&&"undefined"!=typeof e.geometry.bounds&&(i=e.formatted_address,g=JSON.stringify(e.geometry.bounds.getNorthEast()),h=JSON.stringify(e.geometry.bounds.getSouthWest())),this.settings.callbackBeforeSend&&this.settings.callbackBeforeSend.call(this,b,c,d,i,g,h),null===f.settings.dataRaw){var j=a.Deferred();return this.settings.loading===!0&&a("."+this.settings.formContainer).append('
    '),a.ajax({type:"GET",url:this.settings.dataLocation+("jsonp"===this.settings.dataType?(this.settings.dataLocation.match(/\?/)?"&":"?")+"callback=?":""),data:{origLat:b,origLng:c,origAddress:d,formattedAddress:i,boundsNorthEast:g,boundsSouthWest:h},dataType:k,jsonpCallback:"jsonp"===this.settings.dataType?this.settings.callbackJsonp:null}).done(function(b){j.resolve(b),f.settings.loading===!0&&a("."+f.settings.formContainer+" ."+f.settings.loadingContainer).remove()}).fail(j.reject),j.promise()}return"xml"===k?a.parseXML(f.settings.dataRaw):"json"===k?Array.isArray&&Array.isArray(f.settings.dataRaw)?f.settings.dataRaw:"string"==typeof f.settings.dataRaw?a.parseJSON(f.settings.dataRaw):[]:void 0},_start:function(){this.writeDebug("_start");var d,e=this,g=this.settings.autoGeocode;if(e.settings.fullMapStartBlank!==!1){var h=a("#"+e.settings.mapID);h.addClass("bh-sl-map-open");var i=e.settings.mapSettings;i.zoom=e.settings.fullMapStartBlank,d=new google.maps.LatLng(this.settings.defaultLat,this.settings.defaultLng),i.center=d,e.map=new google.maps.Map(c.getElementById(e.settings.mapID),i),google.maps.event.addDomListener(b,"resize",function(){var a=e.map.getCenter();google.maps.event.trigger(e.map,"resize"),e.map.setCenter(a)}),e.settings.fullMapStartBlank=!1,i.zoom=n}else this.settings.defaultLoc===!0&&this.defaultLocation(),""!==a.trim(a("#"+this.settings.addressID).val())?(e.writeDebug("Using Address Field"),e.processForm(null),g=!1):this.settings.fullMapStart===!0&&(this.settings.querystringParams===!0&&this.getQueryString(this.settings.addressID)||this.settings.querystringParams===!0&&this.getQueryString(this.settings.searchID)||this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(e.writeDebug("Using Query String"),this.processForm(null),g=!1):this.mapping(null)),this.settings.autoGeocode===!0&&g===!0&&(e.writeDebug("Auto Geo"),e.htmlGeocode()),null!==this.settings.autoGeocode&&(e.writeDebug("Button Geo"),a(c).on("click."+f,"#"+this.settings.geocodeID,function(){e.htmlGeocode()}))},htmlGeocode:function(){this.writeDebug("htmlGeocode",arguments);var a=this;return this.settings.sessionStorage===!0&&b.sessionStorage&&b.sessionStorage.getItem("myGeo")?(this.writeDebug("Using Session Saved Values for GEO"),this.autoGeocodeQuery(JSON.parse(b.sessionStorage.getItem("myGeo"))),!1):void(navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(c){a.writeDebug("Current Position Result");var d={coords:{latitude:c.coords.latitude,longitude:c.coords.longitude,accuracy:c.coords.accuracy}};a.settings.sessionStorage===!0&&b.sessionStorage&&b.sessionStorage.setItem("myGeo",JSON.stringify(d)),a.autoGeocodeQuery(d)},function(b){a._autoGeocodeError(b)}))},googleGeocode:function(a){a.writeDebug("googleGeocode",arguments);var b=new google.maps.Geocoder;this.geocode=function(a,c){b.geocode(a,function(a,b){if(b!==google.maps.GeocoderStatus.OK)throw c(null),new Error("Geocode was not successful for the following reason: "+b);var d={};d.latitude=a[0].geometry.location.lat(),d.longitude=a[0].geometry.location.lng(),d.geocodeResult=a[0],c(d)})}},reverseGoogleGeocode:function(a){a.writeDebug("reverseGoogleGeocode",arguments);var b=new google.maps.Geocoder;this.geocode=function(a,c){b.geocode(a,function(a,b){if(b!==google.maps.GeocoderStatus.OK)throw c(null),new Error("Reverse geocode was not successful for the following reason: "+b);if(a[0]){var d={};d.address=a[0].formatted_address,c(d)}})}},roundNumber:function(a,b){return this.writeDebug("roundNumber",arguments),Math.round(a*Math.pow(10,b))/Math.pow(10,b)},isEmptyObject:function(a){this.writeDebug("isEmptyObject",arguments);for(var b in a)if(a.hasOwnProperty(b))return!1;return!0},hasEmptyObjectVals:function(a){this.writeDebug("hasEmptyObjectVals",arguments);var b=!0;for(var c in a)a.hasOwnProperty(c)&&""!==a[c]&&0!==a[c].length&&(b=!1);return b},modalClose:function(){this.writeDebug("modalClose"),this.settings.callbackModalClose&&this.settings.callbackModalClose.call(this),D={},a("."+this.settings.overlay+" select").prop("selectedIndex",0),a("."+this.settings.overlay+" input").prop("checked",!1),a("."+this.settings.overlay).hide()},_createLocationVariables:function(a){this.writeDebug("_createLocationVariables",arguments);var b;E={};for(var c in A[a])A[a].hasOwnProperty(c)&&(b=A[a][c],"distance"===c&&(b=this.roundNumber(b,2)),E[c]=b)},sortNumerically:function(a){this.writeDebug("sortNumerically",arguments),a.sort(function(a,b){return a.distanceb.distance?1:0})},filterData:function(a,b){this.writeDebug("filterData",arguments);var c=!0;for(var d in b)if(b.hasOwnProperty(d))if(this.settings.exclusiveFiltering===!0){for(var e=b[d],f=[],g=0;g0&&(c+='
  • '+this.settings.prevPage+"
  • ");for(var f=0;f'+g+"":'
  • '+g+"
  • "}return b>d&&(c+='
  • '+this.settings.nextPage+"
  • "),c},paginationSetup:function(b){this.writeDebug("paginationSetup",arguments);var c,d="",e=a(".bh-sl-pagination-container .bh-sl-pagination");c=-1===this.settings.storeLimit||A.length26||null!==this.settings.catMarkers||null!==this.settings.markerImg||this.settings.fullMapStart===!0&&y===!0&&(isNaN(this.settings.fullMapStartListLimit)||this.settings.fullMapStartListLimit>26||-1===this.settings.fullMapStartListLimit)?g=new google.maps.Marker({position:a,map:e,draggable:!1,icon:h}):(i={url:"https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-b.png&text="+d+"&psize=16&font=fonts/Roboto-Regular.ttf&color=ff333333&ax=44&ay=48"},g=new google.maps.Marker({position:a,map:e,icon:i,draggable:!1})),g},_defineLocationData:function(b,c,d){this.writeDebug("_defineLocationData",arguments);var e="";this._createLocationVariables(b.get("id"));var f;f=E.distance<=1?"km"===this.settings.lengthUnit?this.settings.kilometerLang:this.settings.mileLang:"km"===this.settings.lengthUnit?this.settings.kilometersLang:this.settings.milesLang;var g=b.get("id");return e=this.settings.disableAlphaMarkers===!0||-1===this.settings.storeLimit||this.settings.storeLimit>26||this.settings.fullMapStart===!0&&y===!0&&(isNaN(this.settings.fullMapStartListLimit)||this.settings.fullMapStartListLimit>26||-1===this.settings.fullMapStartListLimit)?g+1:d>0?String.fromCharCode("A".charCodeAt(0)+(c+g)):String.fromCharCode("A".charCodeAt(0)+g),{location:[a.extend(E,{markerid:g,marker:e,length:f,origin:l})]}},listSetup:function(b,c,d){this.writeDebug("listSetup",arguments);var e=this._defineLocationData(b,c,d),f=i(e);a("."+this.settings.locationList+" ul").append(f)},changeSelectedMarker:function(a){var b;"undefined"!=typeof x&&x.setIcon(w),b=null===this.settings.selectedMarkerImgDim?this.markerImage(this.settings.selectedMarkerImg):this.markerImage(this.settings.selectedMarkerImg,this.settings.selectedMarkerImgDim.width,this.settings.selectedMarkerImgDim.height),w=a.icon,a.setIcon(b),x=a},createInfowindow:function(b,c,d,e,f){this.writeDebug("createInfowindow",arguments);var g=this,h=this._defineLocationData(b,e,f),i=j(h);"left"===c?(d.setContent(i),d.open(b.get("map"),b)):google.maps.event.addListener(b,"click",function(){d.setContent(i),d.open(b.get("map"),b);var c=b.get("id"),e=a("."+g.settings.locationList+" li[data-markerid="+c+"]");if(e.length>0){g.settings.callbackMarkerClick&&g.settings.callbackMarkerClick.call(this,b,c,e),a("."+g.settings.locationList+" li").removeClass("list-focus"),e.addClass("list-focus");var f=a("."+g.settings.locationList);f.animate({scrollTop:e.offset().top-f.offset().top+f.scrollTop()})}null!==g.settings.selectedMarkerImg&&g.changeSelectedMarker(b)})},autoGeocodeQuery:function(b){this.writeDebug("autoGeocodeQuery",arguments);var c,d=this,e=null,f=a("#"+this.settings.maxDistanceID);this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(e=this.getQueryString(this.settings.maxDistanceID),""!==f.val()&&(e=f.val())):this.settings.maxDistance===!0&&(e=f.val()||"");var g=new this.reverseGoogleGeocode(this),h=new google.maps.LatLng(b.coords.latitude,b.coords.longitude);g.geocode({latLng:h},function(a){null!==a?(c=q=a.address,r=G.lat=b.coords.latitude,s=G.lng=b.coords.longitude,G.origin=c,G.distance=e,d.mapping(G)):d.notify(d.settings.addressErrorAlert)})},_autoGeocodeError:function(){this.writeDebug("_autoGeocodeError"),this.notify(this.settings.autoGeocodeErrorAlert)},defaultLocation:function(){this.writeDebug("defaultLocation");var b,c=this,d=null,e=a("#"+this.settings.maxDistanceID);this.settings.querystringParams===!0&&this.getQueryString(this.settings.maxDistanceID)?(d=this.getQueryString(this.settings.maxDistanceID),""!==e.val()&&(d=e.val())):this.settings.maxDistance===!0&&(d=e.val()||"");var f=new this.reverseGoogleGeocode(this),g=new google.maps.LatLng(this.settings.defaultLat,this.settings.defaultLng);f.geocode({latLng:g},function(a){null!==a?(b=q=a.address,r=G.lat=c.settings.defaultLat,s=G.lng=c.settings.defaultLng,G.distance=d,G.origin=b,c.mapping(G)):c.notify(c.settings.addressErrorAlert)})},paginationChange:function(a){this.writeDebug("paginationChange",arguments),this.settings.callbackPageChange&&this.settings.callbackPageChange.call(this,a),G.page=a,this.mapping(G)},getAddressByMarker:function(a){this.writeDebug("getAddressByMarker",arguments);var b="";return A[a].address&&(b+=A[a].address+" "),A[a].address2&&(b+=A[a].address2+" "),A[a].city&&(b+=A[a].city+", "),A[a].state&&(b+=A[a].state+" "),A[a].postal&&(b+=A[a].postal+" "),A[a].country&&(b+=A[a].country+" "),b},clearMarkers:function(){this.writeDebug("clearMarkers");var a=null;a=A.lengthb;b++)C[b].setMap(null)},directionsRequest:function(b,d,e){this.writeDebug("directionsRequest",arguments),this.settings.callbackDirectionsRequest&&this.settings.callbackDirectionsRequest.call(this,b,d,e);var f=this.getAddressByMarker(d);if(f){a("."+this.settings.locationList+" ul").hide(),this.clearMarkers(),null!==u&&"undefined"!=typeof u&&(u.setMap(null),u=null),u=new google.maps.DirectionsRenderer,v=new google.maps.DirectionsService,u.setMap(e),u.setPanel(a(".bh-sl-directions-panel").get(0));var g={origin:b,destination:f,travelMode:google.maps.TravelMode.DRIVING};v.route(g,function(a,b){b===google.maps.DirectionsStatus.OK&&u.setDirections(a)}),a("."+this.settings.locationList).prepend('
    ')}a(c).off("click","."+this.settings.locationList+" li .loc-directions a")},closeDirections:function(){this.writeDebug("closeDirections"),this.settings.callbackCloseDirections&&this.settings.callbackCloseDirections.call(this),this.reset(),r&&s&&(0===this.countFilters()?this.settings.mapSettings.zoom=n:this.settings.mapSettings.zoom=0,this.processForm(null)),a(c).off("click."+f,"."+this.settings.locationList+" .bh-sl-close-icon")},processForm:function(b){this.writeDebug("processForm",arguments);var c=this,d=null,e=a("#"+this.settings.addressID),f=a("#"+this.settings.searchID),g=a("#"+this.settings.maxDistanceID),h="";if("undefined"!=typeof b&&null!==b&&b.preventDefault(),this.settings.querystringParams===!0&&(this.getQueryString(this.settings.addressID)||this.getQueryString(this.settings.searchID)||this.getQueryString(this.settings.maxDistanceID))?(q=this.getQueryString(this.settings.addressID),p=this.getQueryString(this.settings.searchID),d=this.getQueryString(this.settings.maxDistanceID),""!==e.val()&&(q=e.val()),""!==f.val()&&(p=f.val()),""!==g.val()&&(d=g.val())):(q=e.val()||"",p=f.val()||"",this.settings.maxDistance===!0&&(d=g.val()||"")),h=this.settings.callbackRegion?this.settings.callbackRegion.call(this,q,p,d):a("#"+this.settings.regionID).val(),""===q&&""===p)this._start();else if(""!==q)if("undefined"!=typeof l&&"undefined"!=typeof r&&"undefined"!=typeof s&&q===l)G.lat=r,G.lng=s,G.origin=q,G.name=p,G.distance=d,c.mapping(G);else{var i=new this.googleGeocode(this);i.geocode({address:q,region:h},function(a){null!==a?(r=a.latitude,s=a.longitude,G.lat=r,G.lng=s,G.origin=q,G.name=p,G.distance=d,G.geocodeResult=a.geocodeResult,c.mapping(G)):c.notify(c.settings.addressErrorAlert)})}else""!==p&&(""===q&&delete G.origin,G.name=p,c.mapping(G))},locationsSetup:function(a,b,c,d,e){if(this.writeDebug("locationsSetup",arguments),"undefined"!=typeof d&&(a.distance||(a.distance=this.geoCodeCalcCalcDistance(b,c,a.lat,a.lng,F.EarthRadius))),this.settings.maxDistance===!0&&"undefined"!=typeof e&&null!==e){if(!(a.distance<=e))return;A.push(a)}else if(this.settings.maxDistance===!0&&this.settings.querystringParams===!0&&"undefined"!=typeof e&&null!==e){if(!(a.distance<=e))return;A.push(a)}else A.push(a)},countFilters:function(){this.writeDebug("countFilters");var a=0;if(!this.isEmptyObject(D))for(var b in D)D.hasOwnProperty(b)&&(a+=D[b].length);return a},_existingCheckedFilters:function(b){this.writeDebug("_existingCheckedFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" input[type=checkbox]").each(function(){if(a(this).prop("checked")){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&D[b].push(c)}})},_existingSelectedFilters:function(b){this.writeDebug("_existingSelectedFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" select").each(function(){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&(D[b]=[c])})},_existingRadioFilters:function(b){this.writeDebug("_existingRadioFilters",arguments),a("#"+this.settings.taxonomyFilters[b]+" input[type=radio]").each(function(){if(a(this).prop("checked")){var c=a(this).val();"undefined"!=typeof c&&""!==c&&-1===D[b].indexOf(c)&&(D[b]=[c])}})},checkFilters:function(){this.writeDebug("checkFilters");for(var a in this.settings.taxonomyFilters)this.settings.taxonomyFilters.hasOwnProperty(a)&&(this._existingCheckedFilters(a),this._existingSelectedFilters(a),this._existingRadioFilters(a))},checkQueryStringFilters:function(){this.writeDebug("checkQueryStringFilters",arguments);for(var a in D)if(D.hasOwnProperty(a)){var b=this.getQueryString(a);"undefined"!=typeof b&&""!==b&&-1===D[a].indexOf(b)&&(D[a]=[b])}},getFilterKey:function(a){this.writeDebug("getFilterKey",arguments);for(var b in this.settings.taxonomyFilters)if(this.settings.taxonomyFilters.hasOwnProperty(b))for(var c=0;c-1&&(D[f].splice(g,1),a("#"+b.settings.mapID).hasClass("bh-sl-map-open")===!0&&(r&&s?(0===b.countFilters()?b.settings.mapSettings.zoom=n:b.settings.mapSettings.zoom=0,b.processForm()):b.mapping(G)))}}else(a(this).is("select")||a(this).is('input[type="radio"]'))&&(b.checkFilters(),d=a(this).val(),e=a(this).closest(".bh-sl-filters").attr("id"),f=b.getFilterKey(e),d?f&&(D[f]=[d],a("#"+b.settings.mapID).hasClass("bh-sl-map-open")===!0&&(r&&s?(b.settings.mapSettings.zoom=0,b.processForm()):b.mapping(G))):(f&&(D[f]=[]),b.reset(),r&&s?(b.settings.mapSettings.zoom=n,b.processForm()):b.mapping(G)))})},checkVisibleMarkers:function(b,c){this.writeDebug("checkVisibleMarkers",arguments);var d,e,f=this;a("."+this.settings.locationList+" ul").empty(),a(b).each(function(b,g){c.getBounds().contains(g.getPosition())&&(f.listSetup(g,0,0),e=i(d),a("."+f.settings.locationList+" ul").append(e))}),a("."+this.settings.locationList+" ul li:even").css("background",this.settings.listColor1),a("."+this.settings.locationList+" ul li:odd").css("background",this.settings.listColor2)},dragSearch:function(a){this.writeDebug("dragSearch",arguments);var b,c=a.getCenter(),d=this;this.settings.mapSettings.zoom=a.getZoom(),r=G.lat=c.lat(),s=G.lng=c.lng();var e=new this.reverseGoogleGeocode(this);b=new google.maps.LatLng(G.lat,G.lng),e.geocode({latLng:b},function(a){null!==a?(G.origin=q=a.address,d.mapping(G)):d.notify(d.settings.addressErrorAlert)})},emptyResult:function(){this.writeDebug("emptyResult",arguments);var b,d,e=a("."+this.settings.locationList+" ul"),f=this.settings.mapSettings;this.map=new google.maps.Map(c.getElementById(this.settings.mapID),f),this.settings.callbackNoResults&&this.settings.callbackNoResults.call(this,this.map,f),e.empty(),d=a('
  • '+this.settings.noResultsTitle+'

    '+this.settings.noResultsDesc+"
  • ").hide().fadeIn(),e.append(d),b=r&&s?new google.maps.LatLng(r,s):new google.maps.LatLng(0,0),this.map.setCenter(b),n&&this.map.setZoom(n)},originMarker:function(a,b,c){if(this.writeDebug("originMarker",arguments),this.settings.originMarker===!0){var d,e="";"undefined"!=typeof b&&(e=null!==this.settings.originMarkerImg?null===this.settings.originMarkerDim?this.markerImage(this.settings.originMarkerImg):this.markerImage(this.settings.originMarkerImg,this.settings.originMarkerDim.width,this.settings.originMarkerDim.height):{url:"https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png"},d=new google.maps.Marker({position:c,map:a,icon:e,draggable:!1}))}},modalWindow:function(){if(this.writeDebug("modalWindow"),this.settings.modal===!0){var b=this;b.settings.callbackModalOpen&&b.settings.callbackModalOpen.call(this),a("."+b.settings.overlay).fadeIn(),a(c).on("click."+f,"."+b.settings.closeIcon+", ."+b.settings.overlay,function(){b.modalClose()}),a(c).on("click."+f,"."+b.settings.modalWindow,function(a){a.stopPropagation()}),a(c).on("keyup."+f,function(a){27===a.keyCode&&b.modalClose()})}},listClick:function(b,d,e,g){this.writeDebug("listClick",arguments);var h=this;a(c).on("click."+f,"."+h.settings.locationList+" li",function(){var c=a(this).data("markerid"),f=C[c];h.settings.callbackListClick&&h.settings.callbackListClick.call(this,c,f),b.panTo(f.getPosition());var i="left";h.settings.bounceMarker===!0?(f.setAnimation(google.maps.Animation.BOUNCE),setTimeout(function(){f.setAnimation(null),h.createInfowindow(f,i,d,e,g)},700)):h.createInfowindow(f,i,d,e,g),null!==h.settings.selectedMarkerImg&&h.changeSelectedMarker(f),a("."+h.settings.locationList+" li").removeClass("list-focus"),a("."+h.settings.locationList+" li[data-markerid="+c+"]").addClass("list-focus")}),a(c).on("click."+f,"."+h.settings.locationList+" li a",function(a){a.stopPropagation()})},resultsTotalCount:function(b){this.writeDebug("resultsTotalCount",arguments);var c=a(".bh-sl-total-results");"undefined"==typeof b||0>=b||0===c.length||c.text(b)},inlineDirections:function(b,d){if(this.writeDebug("inlineDirections",arguments),this.settings.inlineDirections===!0&&"undefined"!=typeof d){var e=this;a(c).on("click."+f,"."+e.settings.locationList+" li .loc-directions a",function(g){g.preventDefault();var h=a(this).closest("li").attr("data-markerid");e.directionsRequest(d,h,b),a(c).on("click."+f,"."+e.settings.locationList+" .bh-sl-close-icon",function(){e.closeDirections()})})}},visibleMarkersList:function(a,b){if(this.writeDebug("visibleMarkersList",arguments),this.settings.visibleMarkersList===!0){var c=this;google.maps.event.addListenerOnce(a,"idle",function(){c.checkVisibleMarkers(b,a)}),google.maps.event.addListener(a,"center_changed",function(){c.checkVisibleMarkers(b,a)}),google.maps.event.addListener(a,"zoom_changed",function(){c.checkVisibleMarkers(b,a)})}},mapping:function(a){this.writeDebug("mapping",arguments);var b,c,d,e,f,g,h=this;this.isEmptyObject(a)||(b=a.lat,c=a.lng,d=a.geocodeResult,e=a.origin,g=a.page),h.settings.pagination===!0&&("undefined"==typeof g||l!==q)&&(g=0),"undefined"==typeof e&&this.settings.nameSearch===!0?o=h._getData():(f=new google.maps.LatLng(b,c),"undefined"!=typeof l&&e===l&&"undefined"!=typeof m?(e=l,o=m):o=h._getData(r,s,e,d)),null!==h.settings.taxonomyFilters&&h.hasEmptyObjectVals(D)&&h.checkFilters(),null!==h.settings.dataRaw?h.processData(a,f,o,g):o.done(function(b){h.processData(a,f,b,g)})},processData:function(d,e,i,j){this.writeDebug("processData",arguments);var k,q,r,s,u,v,w,x,E,F,G,H,I,J=this,K=0,L={};this.isEmptyObject(d)||(k=d.lat,q=d.lng,r=d.origin,s=d.name,u=d.distance);var M=a("#"+J.settings.mapID),N="km"===J.settings.lengthUnit?J.settings.kilometersLang:J.settings.milesLang; +if(m=o,"undefined"!=typeof r&&(l=r),J.settings.callbackSuccess&&J.settings.callbackSuccess.call(this),H=M.hasClass("bh-sl-map-open"),J.settings.fullMapStart===!0&&H===!1||J.settings.autoGeocode===!0&&H===!1||J.settings.defaultLoc===!0&&H===!1?y=!0:J.reset(),M.addClass("bh-sl-map-open"),"json"===J.settings.dataType||"jsonp"===J.settings.dataType)for(var O=0;K0)for(var T=0;Tu)&&J.notify(J.settings.distanceErrorAlert+u+" "+N);else{if("undefined"==typeof A[0])throw new Error("No locations found. Please check the dataLocation setting and path.");-1!==J.settings.distanceAlert&&A[0].distance>J.settings.distanceAlert&&(J.notify(J.settings.distanceErrorAlert+J.settings.distanceAlert+" "+N),G=!0)}if(J.settings.slideMap===!0&&g.slideDown(),J.isEmptyObject(A)||"none"===A[0].result)return void J.emptyResult();if(J.settings.pagination===!0&&J.paginationSetup(j),J.modalWindow(),t=-1===J.settings.storeLimit||A.length26||-1===this.settings.fullMapStartListLimit)?A.length:J.settings.storeLimit,J.settings.pagination===!0?(E=J.settings.locationsPerPage,x=j*J.settings.locationsPerPage,x+E>A.length&&(E=J.settings.locationsPerPage-(x+E-A.length)),A=A.slice(x,x+E),t=A.length):(E=t,x=0),J.resultsTotalCount(A.length),J.settings.fullMapStart===!0&&y===!0||0===J.settings.mapSettings.zoom||"undefined"==typeof r||G===!0)F=J.settings.mapSettings,w=new google.maps.LatLngBounds;else if(J.settings.pagination===!0){var U=new google.maps.LatLng(A[0].lat,A[0].lng);0===j?(J.settings.mapSettings.center=e,F=J.settings.mapSettings):(J.settings.mapSettings.center=U,F=J.settings.mapSettings)}else J.settings.mapSettings.center=e,F=J.settings.mapSettings;if(J.map=new google.maps.Map(c.getElementById(J.settings.mapID),F),google.maps.event.addDomListener(b,"resize",function(){var a=J.map.getCenter();google.maps.event.trigger(J.map,"resize"),J.map.setCenter(a)}),J.settings.dragSearch===!0&&J.map.addListener("dragend",function(){J.dragSearch(h)}),g.data(J.settings.mapID.replace("#",""),J.map),J.settings.callbackMapSet&&J.settings.callbackMapSet.call(this,J.map,e,n,F),"undefined"!=typeof InfoBubble&&null!==J.settings.infoBubble){var V=J.settings.infoBubble;V.map=J.map,I=new InfoBubble(V)}else I=new google.maps.InfoWindow;J.originMarker(J.map,r,e),a(c).on("click."+f,".bh-sl-pagination li",function(b){b.preventDefault(),J.paginationChange(a(this).attr("data-page"))}),J.inlineDirections(J.map,r);for(var W=0;E-1>=W;W++){var X="";X=j>0?String.fromCharCode("A".charCodeAt(0)+(x+W)):String.fromCharCode("A".charCodeAt(0)+W);var Y=new google.maps.LatLng(A[W].lat,A[W].lng);v=J.createMarker(Y,A[W].name,A[W].address,X,J.map,A[W].category),v.set("id",W),C[W]=v,(J.settings.fullMapStart===!0&&y===!0||0===J.settings.mapSettings.zoom||"undefined"==typeof r||G===!0)&&w.extend(Y),J.createInfowindow(v,null,I,x,j)}(J.settings.fullMapStart===!0&&y===!0||0===J.settings.mapSettings.zoom||"undefined"==typeof r||G===!0)&&J.map.fitBounds(w);var Z=a("."+J.settings.locationList+" ul");if(Z.empty(),y&&J.settings.fullMapStartListLimit!==!1&&!isNaN(J.settings.fullMapStartListLimit)&&-1!==J.settings.fullMapStartListLimit)for(var $=0;$ li:even").css("background",J.settings.listColor1),a("."+J.settings.locationList+" ul > li:odd").css("background",J.settings.listColor2),J.visibleMarkersList(J.map,C),J.settings.modal===!0&&J.settings.callbackModalReady&&J.settings.callbackModalReady.call(this),J.settings.callbackFilters&&J.settings.callbackFilters.call(this,D)},writeDebug:function(){b.console&&this.settings.debug&&(Function.prototype.bind?this.writeDebug=Function.prototype.bind.call(console.log,console,"StoreLocator :"):this.writeDebug=function(){arguments[0]="StoreLocator : "+arguments[0],Function.prototype.apply.call(console.log,console,arguments)},this.writeDebug.apply(this,arguments))}}),a.fn[f]=function(b){var c=arguments;if(b===d||"object"==typeof b)return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))});if("string"==typeof b&&"_"!==b[0]&&"init"!==b){var g;return this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&(g=d[b].apply(d,Array.prototype.slice.call(c,1))),"destroy"===b&&a.data(this,"plugin_"+f,null)}),g!==d?g:this}}}}(jQuery,window,document); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/templates/infowindow-description.html b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/infowindow-description.html similarity index 61% rename from thirdparty/jquery-store-locator/templates/infowindow-description.html rename to thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/infowindow-description.html index c7b4f1e..d634f71 100755 --- a/thirdparty/jquery-store-locator/templates/infowindow-description.html +++ b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/infowindow-description.html @@ -2,10 +2,10 @@
    {{name}}
    {{address}}
    {{address2}}
    -
    {{city}}, {{state}} {{postal}}
    +
    {{city}}{{#if city}},{{/if}} {{state}} {{postal}}
    {{hours1}}
    {{hours2}}
    {{hours3}}
    {{phone}}
    - + {{/location}} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/templates/kml-infowindow-description.html b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/kml-infowindow-description.html similarity index 100% rename from thirdparty/jquery-store-locator/templates/kml-infowindow-description.html rename to thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/kml-infowindow-description.html diff --git a/thirdparty/jquery-store-locator/templates/kml-location-list-description.html b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/kml-location-list-description.html similarity index 100% rename from thirdparty/jquery-store-locator/templates/kml-location-list-description.html rename to thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/kml-location-list-description.html diff --git a/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/location-list-description.html b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/location-list-description.html new file mode 100755 index 0000000..e2b7d15 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/templates/location-list-description.html @@ -0,0 +1,19 @@ +{{#location}} +
  • +
    {{marker}}
    +
    +
    +
    {{name}}
    +
    {{address}}
    +
    {{address2}}
    +
    {{city}}{{#if city}},{{/if}} {{state}} {{postal}}
    +
    {{phone}}
    + + {{#if distance}} +
    {{distance}} {{length}}
    + + {{/if}} +
    +
    +
  • +{{/location}} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/autocomplete-example.html b/thirdparty/jquery-store-locator-plugin/autocomplete-example.html new file mode 100755 index 0000000..75c6a8c --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/autocomplete-example.html @@ -0,0 +1,50 @@ + + + + Autocomplete Example + + + + + + +
    + + +
    +
    +
    + + +
    + + +
    +
    + +
    +
    +
    +
      +
      +
      +
      + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/autogeocode-example.html b/thirdparty/jquery-store-locator-plugin/autogeocode-example.html new file mode 100755 index 0000000..612ea44 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/autogeocode-example.html @@ -0,0 +1,48 @@ + + + + Map Example - Auto geocoding + + + + + + +
      + + +
      +
      +
      + + +
      + + +
      +
      + +
      +
      +
      +
        +
        +
        +
        + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/bootstrap-example.html b/thirdparty/jquery-store-locator-plugin/bootstrap-example.html new file mode 100755 index 0000000..93b9b61 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/bootstrap-example.html @@ -0,0 +1,68 @@ + + + + Map Example + + + + + + + + + +
        +
        +
        +

        Using Chipotle as an Example

        +

        I used locations around Minneapolis and the southwest suburbs. So, for example, Edina, Plymouth, Eden + Prarie, etc. would be good for testing the functionality. You can use just the city as the address - ex: + Edina, MN.

        + +
        +
        +
        + + +
        + + +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
          +
          +
          +
          +
          +
          + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/categories-example.html b/thirdparty/jquery-store-locator-plugin/categories-example.html new file mode 100755 index 0000000..ec7c448 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/categories-example.html @@ -0,0 +1,142 @@ + + + + Map Example - Categories + + + + + + +
          + + +
          +
          +
          + + + +
          + + + +
          +
            +
          • Categories

          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          + +
            +
          • Features

          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          + +
            +
          • City

          • +
          • + +
          • +
          + +
            +
          • Zip

          • +
          • + 55416 +
          • +
          • + 55343 +
          • +
          • + 55402 +
          • +
          • + 55317 +
          • +
          +
          +
          + +
          + +
          +
          +
          +
            +
            +
            +
            + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/category-markers-example.html b/thirdparty/jquery-store-locator-plugin/category-markers-example.html new file mode 100755 index 0000000..eceb1b8 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/category-markers-example.html @@ -0,0 +1,54 @@ + + + + Map Example - Category Markers + + + + + + +
            + + +
            +
            +
            + + +
            + + +
            +
            + +
            +
            +
            +
              +
              +
              +
              + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/cluster-example.html b/thirdparty/jquery-store-locator-plugin/cluster-example.html new file mode 100755 index 0000000..e8cbcd7 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/cluster-example.html @@ -0,0 +1,53 @@ + + + + Cluster Example + + + + + + +
              + + +
              +
              +
              + + +
              + + +
              +
              + +
              +
              +
              +
                +
                +
                +
                + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/data/locations.json b/thirdparty/jquery-store-locator-plugin/data/locations.json new file mode 100755 index 0000000..dc97572 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/data/locations.json @@ -0,0 +1 @@ +[{"id":"1","name":"Chipotle Minneapolis","lat":"44.947464","lng":"-93.320826","address":"3040 Excelsior Blvd","address2":"","city":"Minneapolis","state":"MN","postal":"55416","phone":"612-922-6662","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"2","name":"Chipotle St. Louis Park","lat":"44.930810","lng":"-93.347877","address":"5480 Excelsior Blvd.","address2":"","city":"St. Louis Park","state":"MN","postal":"55416","phone":"952-922-1970","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"3","name":"Chipotle Minneapolis","lat":"44.9553438","lng":"-93.29719699999998","address":"2600 Hennepin Ave.","address2":"","city":"Minneapolis","state":"MN","postal":"55404","phone":"612-377-6035","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"4","name":"Chipotle Golden Valley","lat":"44.983935","lng":"-93.380542","address":"515 Winnetka Ave. N","address2":"","city":"Golden Valley","state":"MN","postal":"55427","phone":"763-544-2530","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"5","name":"Chipotle Hopkins","lat":"44.924363","lng":"-93.410158","address":"786 Mainstreet","address2":"","city":"Hopkins","state":"MN","postal":"55343","phone":"952-935-0044","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"6","name":"Chipotle Minneapolis","lat":"44.973557","lng":"-93.275111","address":"1040 Nicollet Ave","address2":"","city":"Minneapolis","state":"MN","postal":"55403","phone":"612-659-7955","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"7","name":"Chipotle Minneapolis","lat":"44.97774","lng":"-93.270909","address":"50 South 6th","address2":"","city":"Minneapolis","state":"MN","postal":"55402","phone":"612-333-0434","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"8","name":"Chipotle Edina","lat":"44.879826","lng":"-93.321280","address":"6801 York Avenue South","address2":"","city":"Edina","state":"MN","postal":"55435","phone":"952-926-6651","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"9","name":"Chipotle Minnetonka","lat":"44.970495","lng":"-93.437430","address":"12509 Wayzata Blvd","address2":"","city":"Minnetonka","state":"MN","postal":"55305","phone":"952-252-4900","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"10","name":"Chipotle Minneapolis","lat":"44.972808","lng":"-93.247153","address":"229 Cedar Ave S","address2":"","city":"Minneapolis","state":"MN","postal":"55454","phone":"612-659-7830","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"11","name":"Chipotle Minneapolis","lat":"44.987687","lng":"-93.257581","address":"225 Hennepin Ave E","address2":"","city":"Minneapolis","state":"MN","postal":"55414","phone":"612-331-6330","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"12","name":"Chipotle Minneapolis","lat":"44.973665","lng":"-93.227023","address":"800 Washington Ave SE","address2":"","city":"Minneapolis","state":"MN","postal":"55414","phone":"612-378-7078","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"13","name":"Chipotle Bloomington","lat":"44.8458631","lng":"-93.2860161","address":"322 South Ave","address2":"","city":"Bloomington","state":"MN","postal":"55425","phone":"952-252-3800","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"14","name":"Chipotle Wayzata","lat":"44.9716626","lng":"-93.4967757","address":"1313 Wayzata Blvd","address2":"","city":"Wayzata","state":"MN","postal":"55391","phone":"952-473-7100","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"15","name":"Chipotle Eden Prairie","lat":"44.859761","lng":"-93.436379","address":"13250 Technology Dr","address2":"","city":"Eden Prairie","state":"MN","postal":"55344","phone":"952-934-5955","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"16","name":"Chipotle Plymouth","lat":"45.019846","lng":"-93.481832","address":"3425 Vicksburg Lane N","address2":"","city":"Plymouth","state":"MN","postal":"55447","phone":"763-519-0063","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"17","name":"Chipotle Roseville","lat":"44.998965","lng":"-93.194622","address":"860 Rosedale Center Plaza","address2":"","city":"Roseville","state":"MN","postal":"55113","phone":"651-633-2300","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"18","name":"Chipotle St. Paul","lat":"44.939865","lng":"-93.136768","address":"867 Grand Ave","address2":"","city":"St. Paul","state":"MN","postal":"55105","phone":"651-602-0560","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"19","name":"Chipotle Chanhassen","lat":"44.858736","lng":"-93.533661","address":"560 W 79th","address2":"","city":"Chanhassen","state":"MN","postal":"55317","phone":"952-294-0301","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"20","name":"Chipotle St. Paul","lat":"44.945127","lng":"-93.095368","address":"29 5th St West","address2":"","city":"St. Paul","state":"MN","postal":"55102","phone":"651-291-5411","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""}] \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/locations.kml b/thirdparty/jquery-store-locator-plugin/data/locations.kml similarity index 99% rename from thirdparty/jquery-store-locator/locations.kml rename to thirdparty/jquery-store-locator-plugin/data/locations.kml index 3df98a8..1855c35 100755 --- a/thirdparty/jquery-store-locator/locations.kml +++ b/thirdparty/jquery-store-locator-plugin/data/locations.kml @@ -164,7 +164,7 @@ ]]> #style1 - -93.297470,44.955273,0.000000 + -93.29719699999998,44.9553438,0.000000 diff --git a/thirdparty/jquery-store-locator/locations.xml b/thirdparty/jquery-store-locator-plugin/data/locations.xml similarity index 56% rename from thirdparty/jquery-store-locator/locations.xml rename to thirdparty/jquery-store-locator-plugin/data/locations.xml index 6857666..4edbe8b 100755 --- a/thirdparty/jquery-store-locator/locations.xml +++ b/thirdparty/jquery-store-locator-plugin/data/locations.xml @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/default-location-example.html b/thirdparty/jquery-store-locator-plugin/default-location-example.html new file mode 100755 index 0000000..52f5290 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/default-location-example.html @@ -0,0 +1,53 @@ + + + + Map Example - Default Location + + + + + + +
                + + +
                +
                +
                + + +
                + + +
                +
                + +
                +
                +
                +
                  +
                  +
                  +
                  + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/fullmapstartblank-example.html b/thirdparty/jquery-store-locator-plugin/fullmapstartblank-example.html new file mode 100755 index 0000000..688a117 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/fullmapstartblank-example.html @@ -0,0 +1,54 @@ + + + + Map Example - fullMapStartBlank + + + + + + +
                  + + +
                  +
                  +
                  + + +
                  + + +
                  +
                  + +
                  +
                  +
                  +
                    +
                    +
                    +
                    + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/geocode.html b/thirdparty/jquery-store-locator-plugin/geocode.html new file mode 100755 index 0000000..3dd646c --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/geocode.html @@ -0,0 +1,44 @@ + + + + Geocode + + + + + + + +
                    + +
                    +
                    +
                    + + +
                    + + +
                    +
                    + +
                    +
                    + + + + + + + diff --git a/thirdparty/jquery-store-locator-plugin/index.html b/thirdparty/jquery-store-locator-plugin/index.html new file mode 100755 index 0000000..73556b4 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/index.html @@ -0,0 +1,48 @@ + + + + Map Example + + + + + + +
                    + + +
                    +
                    +
                    + + +
                    + + +
                    +
                    + +
                    +
                    +
                    +
                      +
                      +
                      +
                      + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/infobubble-example.html b/thirdparty/jquery-store-locator-plugin/infobubble-example.html new file mode 100755 index 0000000..3800418 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/infobubble-example.html @@ -0,0 +1,63 @@ + + + + Infobubble Example + + + + + + +
                      + + +
                      +
                      +
                      + + +
                      + + +
                      +
                      + +
                      +
                      +
                      +
                        +
                        +
                        +
                        + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/inline-directions.html b/thirdparty/jquery-store-locator-plugin/inline-directions.html new file mode 100755 index 0000000..26a18cf --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/inline-directions.html @@ -0,0 +1,50 @@ + + + + Map Example - Inline Directions + + + + + + +
                        + + +
                        +
                        +
                        + + +
                        + + +
                        +
                        + +
                        +
                        +
                        +
                          +
                          +
                          +
                          + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/json-example.html b/thirdparty/jquery-store-locator-plugin/json-example.html new file mode 100755 index 0000000..66c9f39 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/json-example.html @@ -0,0 +1,51 @@ + + + + Map Example - JSON Data + + + + + + +
                          + + +
                          +
                          +
                          + + +
                          + + +
                          +
                          + +
                          +
                          +
                          +
                            +
                            +
                            +
                            + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/kml-example.html b/thirdparty/jquery-store-locator-plugin/kml-example.html new file mode 100755 index 0000000..18344ff --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/kml-example.html @@ -0,0 +1,51 @@ + + + + Map Example - KML Data + + + + + + +
                            + + +
                            +
                            +
                            + + +
                            + + +
                            +
                            + +
                            +
                            +
                            +
                              +
                              +
                              +
                              + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/maxdistance-example.html b/thirdparty/jquery-store-locator-plugin/maxdistance-example.html new file mode 100755 index 0000000..9b71e95 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/maxdistance-example.html @@ -0,0 +1,54 @@ + + + + Map Example - Maximum Distance + + + + + + +
                              + + +
                              +
                              +
                              + + + +
                              + + +
                              +
                              + +
                              +
                              +
                              +
                                +
                                +
                                +
                                + + + + + + + + + diff --git a/thirdparty/jquery-store-locator-plugin/modal-example.html b/thirdparty/jquery-store-locator-plugin/modal-example.html new file mode 100755 index 0000000..045777f --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/modal-example.html @@ -0,0 +1,51 @@ + + + + Map Example - Modal Window + + + + + + +
                                + + +
                                +
                                +
                                + + +
                                + + +
                                +
                                + +
                                +
                                +
                                +
                                  +
                                  +
                                  +
                                  + + + + + + + + + diff --git a/thirdparty/jquery-store-locator-plugin/namesearch-example.html b/thirdparty/jquery-store-locator-plugin/namesearch-example.html new file mode 100755 index 0000000..73065c6 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/namesearch-example.html @@ -0,0 +1,52 @@ + + + + NameSearch Example + + + + + + +
                                  + + +
                                  +
                                  +
                                  + + + + + +
                                  + + +
                                  +
                                  + +
                                  +
                                  +
                                  +
                                    +
                                    +
                                    +
                                    + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/noform-example.html b/thirdparty/jquery-store-locator-plugin/noform-example.html new file mode 100755 index 0000000..effa190 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/noform-example.html @@ -0,0 +1,45 @@ + + + + Map Example - No Form for ASP.net + + + + + + +
                                    + + +
                                    +
                                    + + +
                                    + +
                                    + +
                                    +
                                    +
                                    +
                                      +
                                      +
                                      +
                                      + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/pagination-example.html b/thirdparty/jquery-store-locator-plugin/pagination-example.html new file mode 100755 index 0000000..f0f9ab7 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/pagination-example.html @@ -0,0 +1,53 @@ + + + + Map Example - Pagination + + + + + + +
                                      + + +
                                      +
                                      +
                                      + + +
                                      + + +
                                      +
                                      + +
                                      +
                                      +
                                      +
                                        +
                                        +
                                        +
                                          +
                                          +
                                          +
                                          + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/query-string-example/index.html b/thirdparty/jquery-store-locator-plugin/query-string-example/index.html new file mode 100755 index 0000000..938f33d --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/query-string-example/index.html @@ -0,0 +1,31 @@ + + + + Map Example + + + + + + +
                                          + + +
                                          +
                                          +
                                          + + +
                                          + + +
                                          +
                                          +
                                          + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/query-string-example/submit.html b/thirdparty/jquery-store-locator-plugin/query-string-example/submit.html new file mode 100755 index 0000000..1feb352 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/query-string-example/submit.html @@ -0,0 +1,55 @@ + + + + Map Example + + + + + + +
                                          + + +
                                          +
                                          +
                                          + + +
                                          + + +
                                          +
                                          + +
                                          +
                                          +
                                          +
                                            +
                                            +
                                            +
                                            + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator-plugin/rawdata-example.php b/thirdparty/jquery-store-locator-plugin/rawdata-example.php new file mode 100755 index 0000000..1e879e4 --- /dev/null +++ b/thirdparty/jquery-store-locator-plugin/rawdata-example.php @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + +'; + +?> + + + + + Map Example - Raw Data + + + + + + +
                                            + + +
                                            +
                                            +
                                            + + +
                                            + + +
                                            +
                                            + +
                                            +
                                            +
                                            +
                                              +
                                              +
                                              +
                                              + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/autogeocode-example.html b/thirdparty/jquery-store-locator/autogeocode-example.html deleted file mode 100755 index 100eee7..0000000 --- a/thirdparty/jquery-store-locator/autogeocode-example.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - Auto geocoding - - - - - - -
                                              - - -
                                              -
                                              -
                                              - - -
                                              - - -
                                              -
                                              - -
                                              -
                                              -
                                                -
                                                -
                                                -
                                                -
                                                - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/css/map-style.css b/thirdparty/jquery-store-locator/css/map-style.css deleted file mode 100755 index b1ccadc..0000000 --- a/thirdparty/jquery-store-locator/css/map-style.css +++ /dev/null @@ -1 +0,0 @@ -#page-header{float:left;}#store-locator-container{float:left;margin-left:20px;width:875px;font:normal 12px Arial,Helvetica,sans-serif;color:#333;}#store-locator-container #form-container{clear:left;float:left;margin-top:15px;width:100%;}#store-locator-container #map-container{clear:left;float:left;margin-top:27px;height:530px;width:875px;}#store-locator-container #map-container a{color:#e76737;text-decoration:none;}#store-locator-container #map-container a:hover,#store-locator-container #map-container a:active{text-decoration:underline;}#store-locator-container #map-container .custom-marker{width:32px;height:37px;color:#fff;background:url(../images/custom-marker.png) no-repeat;padding:3px;cursor:pointer;}#store-locator-container #loc-list{float:left;width:240px;height:530px;overflow:auto;}#store-locator-container #loc-list ul{display:block;clear:left;float:left;list-style:none;margin:0;padding:0;}#store-locator-container #loc-list ul li{display:block;clear:left;float:left;margin:6px 10px;cursor:pointer;width:200px;border:1px solid #fff;}#store-locator-container #loc-list .list-label{float:left;margin:10px 0 0 6px;padding:2px 3px;width:17px;text-align:center;background:#451400;color:#fff;font-weight:bold;}#store-locator-container #loc-list .list-details{float:left;margin-left:6px;width:165px;}#store-locator-container #loc-list .list-details .list-content{padding:10px;}#store-locator-container #loc-list .list-details .loc-dist{font-weight:bold;font-style:italic;color:#8e8e8e;}#store-locator-container #loc-list .list-focus{border:1px solid rgba(82, 168, 236, 0.9);-moz-box-shadow:0 0 8px rgba(82, 168, 236, 0.7);-webkit-box-shadow:0 0 8px rgba(82, 168, 236, 0.7);box-shadow:0 0 8px rgba(82, 168, 236, 0.7);transition:border 0.2s linear 0s,box-shadow 0.2s linear 0s;}#store-locator-container .loc-name{color:#AD2118;font-weight:bold;}#store-locator-container #search-form{clear:left;float:left;height:60px;}#store-locator-container #form-input{float:left;margin-top:3px;}#store-locator-container #form-input label{font-weight:bold;}#store-locator-container #form-input input{padding:4px;line-height:16px;border:1px solid #ccc;}#store-locator-container #address{margin:0 0 0 10px;}#store-locator-container #submit{float:left;cursor:pointer;margin:3px 0 0 10px;padding:3px 6px;background:#ae2118;border:1px solid #961f17;color:#fff;-webkit-border-radius:4px;border-radius:4px;}#store-locator-container #loading-map{float:left;margin:4px 0 0 10px;width:16px;height:16px;background:url(../images/ajax-loader.gif) no-repeat;}#store-locator-container #map{float:left;width:635px;height:530px;}.gm-style div,.gm-style span,.gm-style label,.gm-style a{font-family:Arial,Helvetica,sans-serif;}#overlay{position:fixed;left:0px;top:0px;width:100%;height:100%;z-index:10000;background:url(../images/overlay-bg.png) repeat;}#overlay #modal-window{position:absolute;left:50%;margin-left:-460px;margin-top:60px;width:920px;height:590px;z-index:10010;background:#fff;border-radius:10px;box-shadow:0 0 10px #656565;}#overlay #modal-window #modal-content{float:left;padding:0 22px;}#overlay #modal-window #close-icon{position:absolute;top:-6px;right:-6px;width:18px;height:18px;cursor:pointer;background:#2c2c2c url(../images/close-icon.png) 3px 3px no-repeat;border:1px solid #000;border-radius:3px;box-shadow:0 0 3px #656565;}#geocode-result{clear:left;float:left;margin-top:30px;width:100%;} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/css/map-style.less b/thirdparty/jquery-store-locator/css/map-style.less deleted file mode 100755 index 4079f66..0000000 --- a/thirdparty/jquery-store-locator/css/map-style.less +++ /dev/null @@ -1,220 +0,0 @@ -#page-header{ - float: left; -} - -#store-locator-container{ - float: left; - margin-left: 20px; - width: 875px; - font: normal 12px Arial, Helvetica, sans-serif; - color: #333; - - #form-container{ - clear: left; - float: left; - margin-top: 15px; - width: 100%; - } - - #map-container{ - clear: left; - float: left; - margin-top: 27px; - height: 530px; - width: 875px; - - a{ - color: #e76737; - text-decoration: none; - &:hover, &:active{ - text-decoration: underline; - } - } - - .custom-marker{ - width: 32px; - height: 37px; - color: #fff; - background: url(../images/custom-marker.png) no-repeat; - padding: 3px; - cursor: pointer; - } - } - - #loc-list{ - float: left; - width: 240px; - height: 530px; - overflow: auto; - - ul{ - display: block; - clear: left; - float: left; - list-style: none; - margin: 0; - padding: 0; - - li{ - display: block; - clear: left; - float: left; - margin: 6px 10px; - cursor: pointer; - width: 200px; - border: 1px solid #fff; /* Adding this to prevent moving li elements when adding the list-focus class*/ - } - } - - .list-label{ - float: left; - margin: 10px 0 0 6px; - padding: 2px 3px; - width: 17px; - text-align: center; - background: #451400; - color: #fff; - font-weight: bold; - } - - .list-details{ - float: left; - margin-left: 6px; - width: 165px; - - .list-content{ - padding: 10px; - } - - .loc-dist{ - font-weight: bold; - font-style: italic; - color: #8e8e8e; - } - } - - .list-focus{ - border: 1px solid rgba(82,168,236,0.9); - -moz-box-shadow: 0 0 8px rgba(82,168,236,0.7); - -webkit-box-shadow: 0 0 8px rgba(82,168,236,0.7); - box-shadow: 0 0 8px rgba(82,168,236,0.7); - transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; - } - } - - .loc-name{ - /* Picked up by both list and infowindows */ - color: #AD2118; - font-weight: bold; - } - - #search-form{ - clear: left; - float: left; - height: 60px; - } - - #form-input{ - float: left; - margin-top: 3px; - - label{ - font-weight: bold; - } - - input{ - padding: 4px; - line-height: 16px; - border: 1px solid #ccc; - } - } - - #address{ - margin: 0 0 0 10px; - } - - #submit{ - float: left; - cursor: pointer; - margin: 3px 0 0 10px; - padding: 3px 6px; - background: #ae2118; - border: 1px solid #961f17; - color: #fff; - -webkit-border-radius: 4px; - border-radius: 4px; - } - - #loading-map - { - float: left; - margin: 4px 0 0 10px; - width: 16px; - height: 16px; - background: url(../images/ajax-loader.gif) no-repeat; - } - - #map{ - float: left; - width: 635px; - height: 530px; - } -} - -/* Infowindow Roboto font override */ -.gm-style div, .gm-style span, .gm-style label, .gm-style a{ - font-family: Arial, Helvetica, sans-serif; -} - -/* Modal window */ - -#overlay{ - position: fixed; - left: 0px; - top: 0px; - width:100%; - height:100%; - z-index: 10000; - background: url(../images/overlay-bg.png) repeat; - - #modal-window{ - position: absolute; - left: 50%; - margin-left: -460px; /* width divided by 2 */ - margin-top: 60px; - width: 920px; - height: 590px; - z-index: 10010; - background: #fff; - border-radius: 10px; - box-shadow: 0 0 10px #656565; - - #modal-content{ - float: left; - padding: 0 22px; /* there's already a margin on the top of the map-container div */ - } - - #close-icon{ - position: absolute; - top: -6px; - right: -6px; - width: 18px; - height: 18px; - cursor: pointer; - background: #2c2c2c url(../images/close-icon.png) 3px 3px no-repeat; - border: 1px solid #000; - border-radius: 3px; - box-shadow: 0 0 3px #656565; - } - } -} - - -/* The following is for the geocode page and not the store locator */ - -#geocode-result{ - clear: left; - float: left; - margin-top: 30px; - width: 100%; -} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/css/map.css b/thirdparty/jquery-store-locator/css/map.css deleted file mode 100755 index d955af5..0000000 --- a/thirdparty/jquery-store-locator/css/map.css +++ /dev/null @@ -1,222 +0,0 @@ -#page-header { - float: left; -} - -#store-locator-container { - float: left; - margin-left: 20px; - width: 875px; - font: normal 12px Arial,Helvetica,sans-serif; - color: #333; -} - -#store-locator-container #form-container { - clear: left; - float: left; - margin-top: 15px; - width: 100%; -} - -#store-locator-container #map-container { - clear: left; - float: left; - margin-top: 27px; - height: 530px; - width: 875px; -} - -#store-locator-container #map-container a { - color: #e76737; - text-decoration: none; -} - -#store-locator-container #map-container a:hover, -#store-locator-container #map-container a:active { - text-decoration: underline; -} - -#store-locator-container #map-container .custom-marker { - width: 32px; - height: 37px; - color: #fff; - background: url(../images/custom-marker.png) no-repeat; - padding: 3px; - cursor: pointer; -} - -#store-locator-container #loc-list { - float: left; - width: 240px; - height: 530px; - overflow: auto; -} - -#store-locator-container #loc-list ul { - display: block; - clear: left; - float: left; - list-style: none; - margin: 0; - padding: 0; -} - -#store-locator-container #loc-list ul li { - display: block; - clear: left; - float: left; - margin: 6px 10px; - cursor: pointer; - width: 200px; - border: 1px solid #fff; /* Adding this to prevent moving li elements when adding the list-focus class*/ -} - -#store-locator-container #loc-list .list-label { - float: left; - margin: 10px 0 0 6px; - padding: 2px 3px; - width: 17px; - text-align: center; - background: #451400; - color: #fff; - font-weight: bold; -} - -#store-locator-container #loc-list .list-details { - float: left; - margin-left: 6px; - width: 165px; -} - -#store-locator-container #loc-list .list-details .list-content { - padding: 10px; -} - -#store-locator-container #loc-list .list-details .loc-dist { - font-weight: bold; - font-style: italic; - color: #8e8e8e; -} - -#store-locator-container #loc-list .list-focus { - border: 1px solid rgba(82, 168, 236, 0.9); - -moz-box-shadow: 0 0 8px rgba(82, 168, 236, 0.7); - -webkit-box-shadow: 0 0 8px rgba(82, 168, 236, 0.7); - box-shadow: 0 0 8px rgba(82, 168, 236, 0.7); - transition: border 0.2s linear 0s,box-shadow 0.2s linear 0s; -} - -#store-locator-container .loc-name { - color: #AD2118; - font-weight: bold; -} - -#store-locator-container #search-form { - clear: left; - float: left; - height: 60px; -} - -#store-locator-container #form-input { - float: left; - margin-top: 3px; -} - -#store-locator-container #form-input label { - font-weight: bold; -} - -#store-locator-container #form-input input { - padding: 4px; - line-height: 16px; - border: 1px solid #ccc; -} - -#store-locator-container #address { - margin: 0 0 0 10px; -} - -#store-locator-container #submit { - float: left; - cursor: pointer; - margin: 3px 0 0 10px; - padding: 3px 6px; - background: #ae2118; - border: 1px solid #961f17; - color: #fff; - -webkit-border-radius: 4px; - border-radius: 4px; -} - -#store-locator-container #loading-map { - float: left; - margin: 4px 0 0 10px; - width: 16px; - height: 16px; - background: url(../images/ajax-loader.gif) no-repeat; -} - -#store-locator-container #map { - float: left; - width: 635px; - height: 530px; -} - -/* Infowindow Roboto font override */ -.gm-style div, -.gm-style span, -.gm-style label, -.gm-style a { - font-family: Arial,Helvetica,sans-serif; -} - -/* Modal window */ - -#overlay { - position: fixed; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - z-index: 10000; - background: url(../images/overlay-bg.png) repeat; -} - -#overlay #modal-window { - position: absolute; - left: 50%; - margin-left: -460px; /* width divided by 2 */ - margin-top: 60px; - width: 920px; - height: 590px; - z-index: 10010; - background: #fff; - border-radius: 10px; - box-shadow: 0 0 10px #656565; -} - -#overlay #modal-window #modal-content { - float: left; - padding: 0 22px; /* there's already a margin on the top of the map-container div */ -} - -#overlay #modal-window #close-icon { - position: absolute; - top: -6px; - right: -6px; - width: 18px; - height: 18px; - cursor: pointer; - background: #2c2c2c url(../images/close-icon.png) 3px 3px no-repeat; - border: 1px solid #000; - border-radius: 3px; - box-shadow: 0 0 3px #656565; -} - -/* The following is for the geocode page and not the store locator */ - -#geocode-result { - clear: left; - float: left; - margin-top: 30px; - width: 100%; -} diff --git a/thirdparty/jquery-store-locator/default-location-example.html b/thirdparty/jquery-store-locator/default-location-example.html deleted file mode 100755 index 29475de..0000000 --- a/thirdparty/jquery-store-locator/default-location-example.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - Default Location - - - - - - -
                                                - - -
                                                -
                                                -
                                                - - -
                                                - - -
                                                -
                                                - -
                                                -
                                                -
                                                  -
                                                  -
                                                  -
                                                  -
                                                  - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/geocode.html b/thirdparty/jquery-store-locator/geocode.html deleted file mode 100755 index 34bc45e..0000000 --- a/thirdparty/jquery-store-locator/geocode.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - Geocode - - - - - - -
                                                  - -
                                                  -
                                                  -
                                                  - - -
                                                  - - -
                                                  -
                                                  - -
                                                  -
                                                  - - - - - - - diff --git a/thirdparty/jquery-store-locator/index.html b/thirdparty/jquery-store-locator/index.html deleted file mode 100755 index efb298c..0000000 --- a/thirdparty/jquery-store-locator/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - - - - - - -
                                                  - - -
                                                  -
                                                  -
                                                  - - -
                                                  - - -
                                                  -
                                                  - -
                                                  -
                                                  -
                                                    -
                                                    -
                                                    -
                                                    -
                                                    - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/js/geocode.js b/thirdparty/jquery-store-locator/js/geocode.js deleted file mode 100755 index 98d7707..0000000 --- a/thirdparty/jquery-store-locator/js/geocode.js +++ /dev/null @@ -1,49 +0,0 @@ -//Geocode function for the origin location -function GoogleGeocode() { - geocoder = new google.maps.Geocoder(); - this.geocode = function(address, callbackFunction) { - geocoder.geocode( { 'address': address}, function(results, status) { - if (status == google.maps.GeocoderStatus.OK) { - var result = {}; - result.latitude = results[0].geometry.location.lat(); - result.longitude = results[0].geometry.location.lng(); - callbackFunction(result); - } else { - alert("Geocode was not successful for the following reason: " + status); - callbackFunction(null); - } - }); - }; -} - -//Process form input -$(function() { - $('#user-location').on('submit', function(e){ - //Stop the form submission - e.preventDefault(); - //Get the user input and use it - var userinput = $('form #address').val(); - - if (userinput == "") - { - alert("The input box was blank."); - } - - var g = new GoogleGeocode(); - var address = userinput; - - g.geocode(address, function(data) { - if(data != null) { - olat = data.latitude; - olng = data.longitude; - - $('#geocode-result').append("Latitude: " + olat + "
                                                    " + "Longitude: " + olng + "

                                                    "); - - } else { - //Unable to geocode - alert('ERROR! Unable to geocode address'); - } - }); - - }); -}); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/js/handlebars-1.0.0.js b/thirdparty/jquery-store-locator/js/handlebars-1.0.0.js deleted file mode 100755 index 973d3c1..0000000 --- a/thirdparty/jquery-store-locator/js/handlebars-1.0.0.js +++ /dev/null @@ -1,2278 +0,0 @@ -/* - -Copyright (C) 2011 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -// lib/handlebars/browser-prefix.js -var Handlebars = {}; - -(function(Handlebars, undefined) { -; -// lib/handlebars/base.js - -Handlebars.VERSION = "1.0.0"; -Handlebars.COMPILER_REVISION = 4; - -Handlebars.REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '>= 1.0.0' -}; - -Handlebars.helpers = {}; -Handlebars.partials = {}; - -var toString = Object.prototype.toString, - functionType = '[object Function]', - objectType = '[object Object]'; - -Handlebars.registerHelper = function(name, fn, inverse) { - if (toString.call(name) === objectType) { - if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); } - Handlebars.Utils.extend(this.helpers, name); - } else { - if (inverse) { fn.not = inverse; } - this.helpers[name] = fn; - } -}; - -Handlebars.registerPartial = function(name, str) { - if (toString.call(name) === objectType) { - Handlebars.Utils.extend(this.partials, name); - } else { - this.partials[name] = str; - } -}; - -Handlebars.registerHelper('helperMissing', function(arg) { - if(arguments.length === 2) { - return undefined; - } else { - throw new Error("Missing helper: '" + arg + "'"); - } -}); - -Handlebars.registerHelper('blockHelperMissing', function(context, options) { - var inverse = options.inverse || function() {}, fn = options.fn; - - var type = toString.call(context); - - if(type === functionType) { context = context.call(this); } - - if(context === true) { - return fn(this); - } else if(context === false || context == null) { - return inverse(this); - } else if(type === "[object Array]") { - if(context.length > 0) { - return Handlebars.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - return fn(context); - } -}); - -Handlebars.K = function() {}; - -Handlebars.createFrame = Object.create || function(object) { - Handlebars.K.prototype = object; - var obj = new Handlebars.K(); - Handlebars.K.prototype = null; - return obj; -}; - -Handlebars.logger = { - DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, - - methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'}, - - // can be overridden in the host environment - log: function(level, obj) { - if (Handlebars.logger.level <= level) { - var method = Handlebars.logger.methodMap[level]; - if (typeof console !== 'undefined' && console[method]) { - console[method].call(console, obj); - } - } - } -}; - -Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); }; - -Handlebars.registerHelper('each', function(context, options) { - var fn = options.fn, inverse = options.inverse; - var i = 0, ret = "", data; - - var type = toString.call(context); - if(type === functionType) { context = context.call(this); } - - if (options.data) { - data = Handlebars.createFrame(options.data); - } - - if(context && typeof context === 'object') { - if(context instanceof Array){ - for(var j = context.length; i 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -/* Jison generated lexer */ -var lexer = (function(){ -var lexer = ({EOF:1, -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, -setInput:function (input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; - if (this.options.ranges) this.yylloc.range = [0,0]; - this.offset = 0; - return this; - }, -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length-len-1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length-1); - this.matched = this.matched.substr(0, this.matched.length-1); - - if (lines.length-1) this.yylineno -= lines.length-1; - var r = this.yylloc.range; - - this.yylloc = {first_line: this.yylloc.first_line, - last_line: this.yylineno+1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, -more:function () { - this._more = true; - return this; - }, -less:function (n) { - this.unput(this.match.slice(n)); - }, -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); - }, -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c+"^"; - }, -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, - match, - tempMatch, - index, - col, - lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i=0;i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = {first_line: this.yylloc.last_line, - last_line: this.yylineno+1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); - if (this.done && this._input) this.done = false; - if (token) return token; - else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), - {text: "", token: null, line: this.yylineno}); - } - }, -lex:function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, -begin:function begin(condition) { - this.conditionStack.push(condition); - }, -popState:function popState() { - return this.conditionStack.pop(); - }, -_currentRules:function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; - }, -topState:function () { - return this.conditionStack[this.conditionStack.length-2]; - }, -pushState:function begin(condition) { - this.begin(condition); - }}); -lexer.options = {}; -lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { - -var YYSTATE=YY_START -switch($avoiding_name_collisions) { -case 0: yy_.yytext = "\\"; return 14; -break; -case 1: - if(yy_.yytext.slice(-1) !== "\\") this.begin("mu"); - if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu"); - if(yy_.yytext) return 14; - -break; -case 2: return 14; -break; -case 3: - if(yy_.yytext.slice(-1) !== "\\") this.popState(); - if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1); - return 14; - -break; -case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15; -break; -case 5: return 25; -break; -case 6: return 16; -break; -case 7: return 20; -break; -case 8: return 19; -break; -case 9: return 19; -break; -case 10: return 23; -break; -case 11: return 22; -break; -case 12: this.popState(); this.begin('com'); -break; -case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; -break; -case 14: return 22; -break; -case 15: return 37; -break; -case 16: return 36; -break; -case 17: return 36; -break; -case 18: return 40; -break; -case 19: /*ignore whitespace*/ -break; -case 20: this.popState(); return 24; -break; -case 21: this.popState(); return 18; -break; -case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; -break; -case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31; -break; -case 24: return 38; -break; -case 25: return 33; -break; -case 26: return 33; -break; -case 27: return 32; -break; -case 28: return 36; -break; -case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36; -break; -case 30: return 'INVALID'; -break; -case 31: return 5; -break; -} -}; -lexer.rules = [/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; -lexer.conditions = {"mu":{"rules":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":false},"emu":{"rules":[3],"inclusive":false},"com":{"rules":[4],"inclusive":false},"INITIAL":{"rules":[0,1,2,31],"inclusive":true}}; -return lexer;})() -parser.lexer = lexer; -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})();; -// lib/handlebars/compiler/base.js - -Handlebars.Parser = handlebars; - -Handlebars.parse = function(input) { - - // Just return if an already-compile AST was passed in. - if(input.constructor === Handlebars.AST.ProgramNode) { return input; } - - Handlebars.Parser.yy = Handlebars.AST; - return Handlebars.Parser.parse(input); -}; -; -// lib/handlebars/compiler/ast.js -Handlebars.AST = {}; - -Handlebars.AST.ProgramNode = function(statements, inverse) { - this.type = "program"; - this.statements = statements; - if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); } -}; - -Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) { - this.type = "mustache"; - this.escaped = !unescaped; - this.hash = hash; - - var id = this.id = rawParams[0]; - var params = this.params = rawParams.slice(1); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var eligibleHelper = this.eligibleHelper = id.isSimple; - - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - this.isHelper = eligibleHelper && (params.length || hash); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. -}; - -Handlebars.AST.PartialNode = function(partialName, context) { - this.type = "partial"; - this.partialName = partialName; - this.context = context; -}; - -Handlebars.AST.BlockNode = function(mustache, program, inverse, close) { - var verifyMatch = function(open, close) { - if(open.original !== close.original) { - throw new Handlebars.Exception(open.original + " doesn't match " + close.original); - } - }; - - verifyMatch(mustache.id, close); - this.type = "block"; - this.mustache = mustache; - this.program = program; - this.inverse = inverse; - - if (this.inverse && !this.program) { - this.isInverse = true; - } -}; - -Handlebars.AST.ContentNode = function(string) { - this.type = "content"; - this.string = string; -}; - -Handlebars.AST.HashNode = function(pairs) { - this.type = "hash"; - this.pairs = pairs; -}; - -Handlebars.AST.IdNode = function(parts) { - this.type = "ID"; - - var original = "", - dig = [], - depth = 0; - - for(var i=0,l=parts.length; i 0) { throw new Handlebars.Exception("Invalid path: " + original); } - else if (part === "..") { depth++; } - else { this.isScoped = true; } - } - else { dig.push(part); } - } - - this.original = original; - this.parts = dig; - this.string = dig.join('.'); - this.depth = depth; - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - this.isSimple = parts.length === 1 && !this.isScoped && depth === 0; - - this.stringModeValue = this.string; -}; - -Handlebars.AST.PartialNameNode = function(name) { - this.type = "PARTIAL_NAME"; - this.name = name.original; -}; - -Handlebars.AST.DataNode = function(id) { - this.type = "DATA"; - this.id = id; -}; - -Handlebars.AST.StringNode = function(string) { - this.type = "STRING"; - this.original = - this.string = - this.stringModeValue = string; -}; - -Handlebars.AST.IntegerNode = function(integer) { - this.type = "INTEGER"; - this.original = - this.integer = integer; - this.stringModeValue = Number(integer); -}; - -Handlebars.AST.BooleanNode = function(bool) { - this.type = "BOOLEAN"; - this.bool = bool; - this.stringModeValue = bool === "true"; -}; - -Handlebars.AST.CommentNode = function(comment) { - this.type = "comment"; - this.comment = comment; -}; -; -// lib/handlebars/utils.js - -var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - -Handlebars.Exception = function(message) { - var tmp = Error.prototype.constructor.apply(this, arguments); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } -}; -Handlebars.Exception.prototype = new Error(); - -// Build out our basic SafeString type -Handlebars.SafeString = function(string) { - this.string = string; -}; -Handlebars.SafeString.prototype.toString = function() { - return this.string.toString(); -}; - -var escape = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" -}; - -var badChars = /[&<>"'`]/g; -var possible = /[&<>"'`]/; - -var escapeChar = function(chr) { - return escape[chr] || "&"; -}; - -Handlebars.Utils = { - extend: function(obj, value) { - for(var key in value) { - if(value.hasOwnProperty(key)) { - obj[key] = value[key]; - } - } - }, - - escapeExpression: function(string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof Handlebars.SafeString) { - return string.toString(); - } else if (string == null || string === false) { - return ""; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = string.toString(); - - if(!possible.test(string)) { return string; } - return string.replace(badChars, escapeChar); - }, - - isEmpty: function(value) { - if (!value && value !== 0) { - return true; - } else if(toString.call(value) === "[object Array]" && value.length === 0) { - return true; - } else { - return false; - } - } -}; -; -// lib/handlebars/compiler/compiler.js - -/*jshint eqnull:true*/ -var Compiler = Handlebars.Compiler = function() {}; -var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {}; - -// the foundHelper register will disambiguate helper lookup from finding a -// function in a context. This is necessary for mustache compatibility, which -// requires that context functions in blocks are evaluated by blockHelperMissing, -// and then proceed as if the resulting value was provided to blockHelperMissing. - -Compiler.prototype = { - compiler: Compiler, - - disassemble: function() { - var opcodes = this.opcodes, opcode, out = [], params, param; - - for (var i=0, l=opcodes.length; i 0) { - this.source[1] = this.source[1] + ", " + locals.join(", "); - } - - // Generate minimizer alias mappings - if (!this.isChild) { - for (var alias in this.context.aliases) { - if (this.context.aliases.hasOwnProperty(alias)) { - this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; - } - } - } - - if (this.source[1]) { - this.source[1] = "var " + this.source[1].substring(2) + ";"; - } - - // Merge children - if (!this.isChild) { - this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; - } - - if (!this.environment.isSimple) { - this.source.push("return buffer;"); - } - - var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; - - for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); } - return this.topStackName(); - }, - topStackName: function() { - return "stack" + this.stackSlot; - }, - flushInline: function() { - var inlineStack = this.inlineStack; - if (inlineStack.length) { - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - this.pushStack(entry); - } - } - } - }, - isInline: function() { - return this.inlineStack.length; - }, - - popStack: function(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - if (!inline) { - this.stackSlot--; - } - return item; - } - }, - - topStack: function(wrapped) { - var stack = (this.isInline() ? this.inlineStack : this.compileStack), - item = stack[stack.length - 1]; - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - return item; - } - }, - - quotedString: function(str) { - return '"' + str - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') - .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - setupHelper: function(paramSize, name, missingParams) { - var params = []; - this.setupParams(paramSize, params, missingParams); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - name: foundHelper, - callParams: ["depth0"].concat(params).join(", "), - helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ") - }; - }, - - // the params and contexts arguments are passed in arrays - // to fill in - setupParams: function(paramSize, params, useRegister) { - var options = [], contexts = [], types = [], param, inverse, program; - - options.push("hash:" + this.popStack()); - - inverse = this.popStack(); - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - if (!program) { - this.context.aliases.self = "this"; - program = "self.noop"; - } - - if (!inverse) { - this.context.aliases.self = "this"; - inverse = "self.noop"; - } - - options.push("inverse:" + inverse); - options.push("fn:" + program); - } - - for(var i=0; i= 1.0.0"}; -d.helpers={};d.partials={};var n=Object.prototype.toString,b="[object Function]",h="[object Object]";d.registerHelper=function(l,u,i){if(n.call(l)===h){if(i||u){throw new d.Exception("Arg not supported with multiple helpers"); -}d.Utils.extend(this.helpers,l);}else{if(i){u.not=i;}this.helpers[l]=u;}};d.registerPartial=function(i,l){if(n.call(i)===h){d.Utils.extend(this.partials,i); -}else{this.partials[i]=l;}};d.registerHelper("helperMissing",function(i){if(arguments.length===2){return c;}else{throw new Error("Missing helper: '"+i+"'"); -}});d.registerHelper("blockHelperMissing",function(u,l){var i=l.inverse||function(){},w=l.fn;var v=n.call(u);if(v===b){u=u.call(this);}if(u===true){return w(this); -}else{if(u===false||u==null){return i(this);}else{if(v==="[object Array]"){if(u.length>0){return d.helpers.each(u,l);}else{return i(this);}}else{return w(u); -}}}});d.K=function(){};d.createFrame=Object.create||function(i){d.K.prototype=i;var l=new d.K();d.K.prototype=null;return l;};d.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(u,i){if(d.logger.level<=u){var l=d.logger.methodMap[u]; -if(typeof console!=="undefined"&&console[l]){console[l].call(console,i);}}}};d.log=function(l,i){d.logger.log(l,i);};d.registerHelper("each",function(l,C){var A=C.fn,v=C.inverse; -var x=0,y="",w;var z=n.call(l);if(z===b){l=l.call(this);}if(C.data){w=d.createFrame(C.data);}if(l&&typeof l==="object"){if(l instanceof Array){for(var u=l.length; -x2){G.push("'"+this.terminals_[Q]+"'");}}if(this.lexer.showPosition){S="Parse error on line "+(J+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+G.join(", ")+", got '"+(this.terminals_[V]||V)+"'"; -}else{S="Parse error on line "+(J+1)+": Unexpected "+(V==1?"end of input":"'"+(this.terminals_[V]||V)+"'");}this.parseError(S,{text:this.lexer.match,token:this.terminals_[V]||V,line:this.lexer.yylineno,loc:B,expected:G}); -}}if(U[0] instanceof Array&&U.length>1){throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+V);}switch(U[0]){case 1:F.push(V); -Y.push(this.lexer.yytext);K.push(this.lexer.yylloc);F.push(U[1]);V=null;if(!R){W=this.lexer.yyleng;A=this.lexer.yytext;J=this.lexer.yylineno;B=this.lexer.yylloc; -if(C>0){C--;}}else{V=R;R=null;}break;case 2:X=this.productions_[U[1]][1];T.$=Y[Y.length-X];T._$={first_line:K[K.length-(X||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(X||1)].first_column,last_column:K[K.length-1].last_column}; -if(D){T._$.range=[K[K.length-(X||1)].range[0],K[K.length-1].range[1]];}L=this.performAction.call(T,A,W,J,this.yy,U[1],Y,K);if(typeof L!=="undefined"){return L; -}if(X){F=F.slice(0,-1*X*2);Y=Y.slice(0,-1*X);K=K.slice(0,-1*X);}F.push(this.productions_[U[1]][0]);Y.push(T.$);K.push(T._$);z=Z[F[F.length-2]][F[F.length-1]]; -F.push(z);break;case 3:return true;}}return true;}};var i=(function(){var C=({EOF:1,parseError:function E(H,G){if(this.yy.parser){this.yy.parser.parseError(H,G); -}else{throw new Error(H);}},setInput:function(G){this._input=G;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match=""; -this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges){this.yylloc.range=[0,0];}this.offset=0; -return this;},input:function(){var H=this._input[0];this.yytext+=H;this.yyleng++;this.offset++;this.match+=H;this.matched+=H;var G=H.match(/(?:\r\n?|\n).*/g); -if(G){this.yylineno++;this.yylloc.last_line++;}else{this.yylloc.last_column++;}if(this.options.ranges){this.yylloc.range[1]++;}this._input=this._input.slice(1); -return H;},unput:function(I){var G=I.length;var H=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-G-1); -this.offset-=G;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1); -if(H.length-1){this.yylineno-=H.length-1;}var J=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:H?(H.length===K.length?this.yylloc.first_column:0)+K[K.length-H.length].length-H[0].length:this.yylloc.first_column-G}; -if(this.options.ranges){this.yylloc.range=[J[0],J[0]+this.yyleng-G];}return this;},more:function(){this._more=true;return this;},less:function(G){this.unput(this.match.slice(G)); -},pastInput:function(){var G=this.matched.substr(0,this.matched.length-this.match.length);return(G.length>20?"...":"")+G.substr(-20).replace(/\n/g,""); -},upcomingInput:function(){var G=this.match;if(G.length<20){G+=this._input.substr(0,20-G.length);}return(G.substr(0,20)+(G.length>20?"...":"")).replace(/\n/g,""); -},showPosition:function(){var G=this.pastInput();var H=new Array(G.length+1).join("-");return G+this.upcomingInput()+"\n"+H+"^";},next:function(){if(this.done){return this.EOF; -}if(!this._input){this.done=true;}var M,K,H,J,I,G;if(!this._more){this.yytext="";this.match="";}var N=this._currentRules();for(var L=0;LK[0].length)){K=H;J=L;if(!this.options.flex){break;}}}if(K){G=K[0].match(/(?:\r\n?|\n).*/g);if(G){this.yylineno+=G.length;}this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+K[0].length}; -this.yytext+=K[0];this.match+=K[0];this.matches=K;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]; -}this._more=false;this._input=this._input.slice(K[0].length);this.matched+=K[0];M=this.performAction.call(this,this.yy,this,N[J],this.conditionStack[this.conditionStack.length-1]); -if(this.done&&this._input){this.done=false;}if(M){return M;}else{return;}}if(this._input===""){return this.EOF;}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}); -}},lex:function z(){var G=this.next();if(typeof G!=="undefined"){return G;}else{return this.lex();}},begin:function A(G){this.conditionStack.push(G);},popState:function F(){return this.conditionStack.pop(); -},_currentRules:function D(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;},topState:function(){return this.conditionStack[this.conditionStack.length-2]; -},pushState:function A(G){this.begin(G);}});C.options={};C.performAction=function B(K,H,J,G){var I=G;switch(J){case 0:H.yytext="\\";return 14;break;case 1:if(H.yytext.slice(-1)!=="\\"){this.begin("mu"); -}if(H.yytext.slice(-1)==="\\"){H.yytext=H.yytext.substr(0,H.yyleng-1),this.begin("emu");}if(H.yytext){return 14;}break;case 2:return 14;break;case 3:if(H.yytext.slice(-1)!=="\\"){this.popState(); -}if(H.yytext.slice(-1)==="\\"){H.yytext=H.yytext.substr(0,H.yyleng-1);}return 14;break;case 4:H.yytext=H.yytext.substr(0,H.yyleng-4);this.popState();return 15; -break;case 5:return 25;break;case 6:return 16;break;case 7:return 20;break;case 8:return 19;break;case 9:return 19;break;case 10:return 23;break;case 11:return 22; -break;case 12:this.popState();this.begin("com");break;case 13:H.yytext=H.yytext.substr(3,H.yyleng-5);this.popState();return 15;break;case 14:return 22; -break;case 15:return 37;break;case 16:return 36;break;case 17:return 36;break;case 18:return 40;break;case 19:break;case 20:this.popState();return 24;break; -case 21:this.popState();return 18;break;case 22:H.yytext=H.yytext.substr(1,H.yyleng-2).replace(/\\"/g,'"');return 31;break;case 23:H.yytext=H.yytext.substr(1,H.yyleng-2).replace(/\\'/g,"'"); -return 31;break;case 24:return 38;break;case 25:return 33;break;case 26:return 33;break;case 27:return 32;break;case 28:return 36;break;case 29:H.yytext=H.yytext.substr(1,H.yyleng-2); -return 36;break;case 30:return"INVALID";break;case 31:return 5;break;}};C.rules=[/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; -C.conditions={mu:{rules:[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:false},emu:{rules:[3],inclusive:false},com:{rules:[4],inclusive:false},INITIAL:{rules:[0,1,2,31],inclusive:true}}; -return C;})();y.lexer=i;function w(){this.yy={};}w.prototype=y;y.Parser=w;return new w;})();d.Parser=r;d.parse=function(i){if(i.constructor===d.AST.ProgramNode){return i; -}d.Parser.yy=d.AST;return d.Parser.parse(i);};d.AST={};d.AST.ProgramNode=function(l,i){this.type="program";this.statements=l;if(i){this.inverse=new d.AST.ProgramNode(i); -}};d.AST.MustacheNode=function(x,u,l){this.type="mustache";this.escaped=!l;this.hash=u;var w=this.id=x[0];var v=this.params=x.slice(1);var i=this.eligibleHelper=w.isSimple; -this.isHelper=i&&(v.length||u);};d.AST.PartialNode=function(i,l){this.type="partial";this.partialName=i;this.context=l;};d.AST.BlockNode=function(u,l,i,w){var v=function(x,y){if(x.original!==y.original){throw new d.Exception(x.original+" doesn't match "+y.original); -}};v(u.id,w);this.type="block";this.mustache=u;this.program=l;this.inverse=i;if(this.inverse&&!this.program){this.isInverse=true;}};d.AST.ContentNode=function(i){this.type="content"; -this.string=i;};d.AST.HashNode=function(i){this.type="hash";this.pairs=i;};d.AST.IdNode=function(z){this.type="ID";var y="",w=[],A=0;for(var x=0,u=z.length; -x0){throw new d.Exception("Invalid path: "+y);}else{if(v===".."){A++; -}else{this.isScoped=true;}}}else{w.push(v);}}this.original=y;this.parts=w;this.string=w.join(".");this.depth=A;this.isSimple=z.length===1&&!this.isScoped&&A===0; -this.stringModeValue=this.string;};d.AST.PartialNameNode=function(i){this.type="PARTIAL_NAME";this.name=i.original;};d.AST.DataNode=function(i){this.type="DATA"; -this.id=i;};d.AST.StringNode=function(i){this.type="STRING";this.original=this.string=this.stringModeValue=i;};d.AST.IntegerNode=function(i){this.type="INTEGER"; -this.original=this.integer=i;this.stringModeValue=Number(i);};d.AST.BooleanNode=function(i){this.type="BOOLEAN";this.bool=i;this.stringModeValue=i==="true"; -};d.AST.CommentNode=function(i){this.type="comment";this.comment=i;};var q=["description","fileName","lineNumber","message","name","number","stack"];d.Exception=function(u){var l=Error.prototype.constructor.apply(this,arguments); -for(var i=0;i":">",'"':""","'":"'","`":"`"};var e=/[&<>"'`]/g;var p=/[&<>"'`]/;var t=function(i){return k[i]||"&"; -};d.Utils={extend:function(u,l){for(var i in l){if(l.hasOwnProperty(i)){u[i]=l[i];}}},escapeExpression:function(i){if(i instanceof d.SafeString){return i.toString(); -}else{if(i==null||i===false){return"";}}i=i.toString();if(!p.test(i)){return i;}return i.replace(e,t);},isEmpty:function(i){if(!i&&i!==0){return true;}else{if(n.call(i)==="[object Array]"&&i.length===0){return true; -}else{return false;}}}};var j=d.Compiler=function(){};var g=d.JavaScriptCompiler=function(){};j.prototype={compiler:j,disassemble:function(){var z=this.opcodes,y,w=[],B,A; -for(var x=0,u=z.length;x0){this.source[1]=this.source[1]+", "+w.join(", ");}if(!this.isChild){for(var A in this.context.aliases){if(this.context.aliases.hasOwnProperty(A)){this.source[1]=this.source[1]+", "+A+"="+this.context.aliases[A]; -}}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";";}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n"; -}if(!this.environment.isSimple){this.source.push("return buffer;");}var y=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"]; -for(var z=0,x=this.environment.depths.list.length;zthis.stackVars.length){this.stackVars.push("stack"+this.stackSlot);}return this.topStackName();},topStackName:function(){return"stack"+this.stackSlot; -},flushInline:function(){var v=this.inlineStack;if(v.length){this.inlineStack=[];for(var u=0,l=v.length;u
                                                    '); - $('#' + settings.modalWindowDiv).prepend('
                                                    <\/div>'); - $('#' + settings.overlayDiv).hide(); - } - - if(settings.slideMap === true){ - //Let's hide the map container to begin - $this.hide(); - } - - //Calculate geocode distance functions - you could use Google's distance service instead - var GeoCodeCalc = {}; - if(settings.lengthUnit === "km"){ - //Kilometers - GeoCodeCalc.EarthRadius = 6367.0; - } - else{ - //Default is miles - GeoCodeCalc.EarthRadius = 3956.0; - } - GeoCodeCalc.ToRadian = function(v) { return v * (Math.PI / 180);}; - GeoCodeCalc.DiffRadian = function(v1, v2) { - return GeoCodeCalc.ToRadian(v2) - GeoCodeCalc.ToRadian(v1); - }; - GeoCodeCalc.CalcDistance = function(lat1, lng1, lat2, lng2, radius) { - return radius * 2 * Math.asin( Math.min(1, Math.sqrt( ( Math.pow(Math.sin((GeoCodeCalc.DiffRadian(lat1, lat2)) / 2.0), 2.0) + Math.cos(GeoCodeCalc.ToRadian(lat1)) * Math.cos(GeoCodeCalc.ToRadian(lat2)) * Math.pow(Math.sin((GeoCodeCalc.DiffRadian(lng1, lng2)) / 2.0), 2.0) ) ) ) ); - }; - - start(); - - function start(){ - //If a default location is set - if(settings.defaultLoc === true){ - //The address needs to be determined for the directions link - var r = new ReverseGoogleGeocode(); - var latlng = new google.maps.LatLng(settings.defaultLat, settings.defaultLng); - r.geocode(latlng, function(data) { - if(data !== null) { - var originAddress = data.address; - mapping(settings.defaultLat, settings.defaultLng, originAddress); - } else { - //Unable to geocode - alert(settings.addressErrorAlert); - } - }); - } - - //If show full map option is true - if(settings.fullMapStart === true){ - //Just do the mapping without an origin - mapping(); - } - - //HTML5 geolocation API option - if(settings.autoGeocode === true){ - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(autoGeocode_query, autoGeocode_error); - } - } - } - - //Geocode function for the origin location - function GoogleGeocode(){ - geocoder = new google.maps.Geocoder(); - this.geocode = function(address, callbackFunction) { - geocoder.geocode( { 'address': address}, function(results, status) { - if (status === google.maps.GeocoderStatus.OK) { - var result = {}; - result.latitude = results[0].geometry.location.lat(); - result.longitude = results[0].geometry.location.lng(); - callbackFunction(result); - } else { - alert(settings.geocodeErrorAlert + status); - callbackFunction(null); - } - }); - }; - } - - //Reverse geocode to get address for automatic options needed for directions link - function ReverseGoogleGeocode(){ - geocoder = new google.maps.Geocoder(); - this.geocode = function(latlng, callbackFunction) { - geocoder.geocode( {'latLng': latlng}, function(results, status) { - if (status === google.maps.GeocoderStatus.OK) { - if (results[0]) { - var result = {}; - result.address = results[0].formatted_address; - callbackFunction(result); - } - } else { - alert(settings.geocodeErrorAlert + status); - callbackFunction(null); - } - }); - }; - } - - //Used to round miles to display - function roundNumber(num, dec){ - return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); - } - - //If location is detected automatically - function autoGeocode_query(position){ - //The address needs to be determined for the directions link - var r = new ReverseGoogleGeocode(); - var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); - r.geocode(latlng, function(data) { - if(data !== null) { - var originAddress = data.address; - mapping(position.coords.latitude, position.coords.longitude, originAddress); - // Dynamic - set value of address input - $('#' + settings.inputID).val(originAddress); - } else { - //Unable to geocode - alert(settings.addressErrorAlert); - } - }); - } - - function autoGeocode_error(error){ - //If automatic detection doesn't work show an error - alert(settings.autoGeocodeErrorAlert); - } - - //Set up the normal mapping - function begin_mapping(distance){ - //Get the user input and use it - var userinput = $('#' + settings.inputID).val(); - - if (userinput === ""){ - start(); - } - else{ - var g = new GoogleGeocode(); - var address = userinput; - g.geocode(address, function(data) { - if(data !== null) { - olat = data.latitude; - olng = data.longitude; - if(settings.autoGeocode === false){ - settings.storeLimit = 26; - } - mapping(olat, olng, userinput, distance); - } else { - //Unable to geocode - alert(settings.addressErrorAlert); - } - }); - } - } - - //Process form input - $(function(){ - //Handle form submission - function get_form_values(e){ - //Stop the form submission - e.preventDefault(); - - if(settings.maxDistance === true){ - var maxDistance = $('#' + settings.maxDistanceID).val(); - //Start the mapping - begin_mapping(maxDistance); - } - else{ - //Start the mapping - begin_mapping(); - } - } - - //ASP.net or regular submission? - if(settings.noForm === true){ - $(document).on('click.'+prefix, '#' + settings.formContainerDiv + ' #submit', function(e){ - get_form_values(e); - }); - /* - //trying to prevent js from filtering when Address field changes - $(document).on('keyup.'+prefix, function(e){ - if (e.keyCode === 13 && $('#' + settings.inputID).is(':focus')) { - get_form_values(e); - } - }); - */ - } - else{ - $(document).on('submit.'+prefix, '#' + settings.formID, function(e){ - get_form_values(e); - }); - } - }); - - //Now all the mapping stuff - function mapping(orig_lat, orig_lng, origin, maxDistance){ - $(function(){ - - // Enable the visual refresh https://developers.google.com/maps/documentation/javascript/basics#VisualRefresh - google.maps.visualRefresh = true; - - var dataTypeRead; - - //KML is read as XML - if(settings.dataType === 'kml'){ - dataTypeRead = "xml"; - } - else{ - dataTypeRead = settings.dataType; - } - - //Process the data - $.ajax({ - type: "GET", - url: settings.dataLocation + (settings.dataType === 'jsonp' ? (settings.dataLocation.match(/\?/) ? '&' : '?') + 'callback=?' : ''), - dataType: dataTypeRead, - jsonpCallback: (settings.dataType === 'jsonp' ? settings.jsonpCallback : null), - beforeSend: function (){ - // Callback - if(settings.callbackBeforeSend){ - settings.callbackBeforeSend.call(this); - } - - //Loading - if(settings.loading === true){ - $('#' + settings.formContainerDiv).append('
                                                    <\/div>'); - } - - }, - complete: function (event, request, options){ - // Callback - if(settings.callbackComplete){ - settings.callbackComplete.call(this, event, request, options); - } - - //Loading remove - if(settings.loading === true){ - $('#' + settings.loadingDiv).remove(); - } - }, - success: function (data, xhr, options){ - // Callback - if(settings.callbackSuccess){ - settings.callbackSuccess.call(this, data, xhr, options); - } - - //After the store locations file has been read successfully - var i = 0; - var firstRun; - - //Set a variable for fullMapStart so we can detect the first run - if(settings.fullMapStart === true && $('#' + settings.mapDiv).hasClass('mapOpen') === false){ - firstRun = true; - } - else{ - reset(); - } - - $('#' + settings.mapDiv).addClass('mapOpen'); - - //Depending on your data structure and what you want to include in the maps, you may need to change the following variables or comment them out - if(settings.dataType === 'json' || settings.dataType === 'jsonp'){ - //Process JSON - $.each(data, function(){ - var key, value, locationData = {}; - - // Parse each data variables - for( key in this ){ - value = this[key]; - - if(key === 'web'){ - if ( value ) value = value.replace("http://",""); // Remove scheme (todo: should NOT be done) - } - - locationData[key] = value; - } - - if(!locationData['distance']){ - locationData['distance'] = GeoCodeCalc.CalcDistance(orig_lat,orig_lng,locationData['lat'],locationData['lng'], GeoCodeCalc.EarthRadius); - } - - //Create the array - if(settings.maxDistance === true && firstRun !== true && maxDistance){ - if(locationData['distance'] < maxDistance){ - locationset[i] = locationData; - } - else{ - return; - } - } - else{ - locationset[i] = locationData; - } - - i++; - }); - } - else if(settings.dataType === 'kml'){ - //Process KML - $(data).find('Placemark').each(function(){ - var locationData = { - 'name': $(this).find('name').text(), - 'lat': $(this).find('coordinates').text().split(",")[1], - 'lng': $(this).find('coordinates').text().split(",")[0], - 'description': $(this).find('description').text() - }; - - locationData['distance'] = GeoCodeCalc.CalcDistance(orig_lat,orig_lng,locationData['lat'],locationData['lng'], GeoCodeCalc.EarthRadius); - - //Create the array - if(settings.maxDistance === true && firstRun !== true && maxDistance){ - if(locationData['distance'] < maxDistance){ - locationset[i] = locationData; - } - else{ - return; - } - } - else{ - locationset[i] = locationData; - } - - i++; - }); - } - else{ - //Process XML - $(data).find('marker').each(function(){ - var locationData = { - 'name': $(this).attr('name'), - 'lat': $(this).attr('lat'), - 'lng': $(this).attr('lng'), - 'address': $(this).attr('address'), - 'address2': $(this).attr('address2'), - 'city': $(this).attr('city'), - 'state': $(this).attr('state'), - 'postal': $(this).attr('postal'), - 'country': $(this).attr('country'), - 'phone': $(this).attr('phone'), - 'email': $(this).attr('email'), - 'web': $(this).attr('web'), - 'hours1': $(this).attr('hours1'), - 'hours2': $(this).attr('hours2'), - 'hours3': $(this).attr('hours3'), - 'category': $(this).attr('category'), - 'featured': $(this).attr('featured'), - 'distance': parseFloat($(this).attr('distance')) - }; - - if(locationData['web']) locationData['web'] = locationData['web'].replace("http://",""); // Remove scheme (todo: should NOT be done) - - //locationData['distance'] = GeoCodeCalc.CalcDistance(orig_lat,orig_lng,locationData['lat'],locationData['lng'], GeoCodeCalc.EarthRadius); - - //Create the array - var selectedCat = $('#' + settings.categoryID).val(); - if (selectedCat) { - - if(locationData['category'] === selectedCat){ - locationset[i] = locationData; - } - else{ - return; - } - } - else if(settings.maxDistance === true && firstRun !== true && maxDistance){ - if(locationData['distance'] < maxDistance){ - locationset[i] = locationData; - } - else{ - return; - } - } - else{ - locationset[i] = locationData; - } - - i++; - }); - } - - //Distance sorting function - function sort_numerically(locationsarray){ - locationsarray.sort(function(a, b){ - return ((a['distance'] < b['distance']) ? -1 : ((a['distance'] > b['distance']) ? 1 : 0)); - }); - } - - //Sort the multi-dimensional array by distance - sort_numerically(locationset); - - //Featured locations filtering - if(settings.featuredLocations === true){ - //Create array for featured locations - featuredset = $.grep(locationset, function(val, i){ - return val['featured'] === "true"; - }); - - //Create array for normal locations - normalset = $.grep(locationset, function(val, i){ - return val['featured'] !== "true"; - }); - - //Combine the arrays - locationset = []; - locationset = featuredset.concat(normalset); - - } - - //Get the length unit - var distUnit = (settings.lengthUnit === "km") ? settings.kilometersLang : settings.milesLang ; - - //Check the closest marker - if(settings.maxDistance === true && firstRun !== true && maxDistance){ - if(locationset[0] === undefined || locationset[0]['distance'] > maxDistance){ - alert(settings.distanceErrorAlert + maxDistance + " " + distUnit); - return; - } - } - else{ - if(settings.distanceAlert !== -1 && locationset[0]['distance'] > settings.distanceAlert){ - alert(settings.distanceErrorAlert + settings.distanceAlert + " " + distUnit); - } - } - - //Create the map with jQuery - $(function(){ - - var key, value, locationData = {}; - - //Instead of repeating the same thing twice below - function create_location_variables(loopcount){ - for ( key in locationset[loopcount] ) { - value = locationset[loopcount][key]; - - if(key === 'distance'){ - value = roundNumber(value,2); - } - - locationData[key] = value; - } - } - - //Define the location data for the templates - function define_location_data(currentMarker){ - create_location_variables(currentMarker.get("id")); - - var distLength; - if(locationData['distance'] <= 1){ - if(settings.lengthUnit === "km"){ - distLength = settings.kilometerLang; - } - else{ - distLength = settings.mileLang; - } - } - else{ - if(settings.lengthUnit === "km"){ - distLength = settings.kilometersLang; - } - else{ - distLength = settings.milesLang; - } - } - - //Set up alpha character - var markerId = currentMarker.get("id"); - //Use dot markers instead of alpha if there are more than 26 locations - if(settings.storeLimit === -1 || settings.storeLimit > 26){ - var indicator = markerId + 1; - } - else{ - var indicator = String.fromCharCode("A".charCodeAt(0) + markerId); - } - - //Define location data - var locations = { - location: [$.extend(locationData, { - 'markerid': markerId, - 'marker': indicator, - 'length': distLength, - 'origin': origin - })] - }; - - return locations; - } - - //Slide in the map container - if(settings.slideMap === true){ - $this.slideDown(); - } - //Set up the modal window - if(settings.modalWindow === true){ - // Callback - if (settings.callbackModalOpen){ - settings.callbackModalOpen.call(this); - } - - function modalClose(){ - // Callback - if (settings.callbackModalOpen){ - settings.callbackModalOpen.call(this); - } - - $('#' + settings.overlayDiv).hide(); - } - - //Pop up the modal window - $('#' + settings.overlayDiv).fadeIn(); - //Close modal when close icon is clicked and when background overlay is clicked - $(document).on('click.'+prefix, '#' + settings.modalCloseIconDiv + ', #' + settings.overlayDiv, function(){ - modalClose(); - }); - //Prevent clicks within the modal window from closing the entire thing - $(document).on('click.'+prefix, '#' + settings.modalWindowDiv, function(e){ - e.stopPropagation(); - }); - //Close modal when escape key is pressed - $(document).on('keyup.'+prefix, function(e){ - if (e.keyCode === 27) { - modalClose(); - } - }); - } - - //Google maps settings - if((settings.fullMapStart === true && firstRun === true) || settings.zoomLevel === 0){ - var myOptions = { - mapTypeId: google.maps.MapTypeId.ROADMAP - }; - var bounds = new google.maps.LatLngBounds (); - } - else{ - var myOptions = { - zoom: settings.zoomLevel, - center: new google.maps.LatLng(orig_lat, orig_lng), - mapTypeId: google.maps.MapTypeId.ROADMAP - }; - } - - var map = new google.maps.Map(document.getElementById(settings.mapDiv),myOptions); - $this.data('map', map); - - //Create one infowindow to fill later - var infowindow = new google.maps.InfoWindow(); - - //Avoid error if number of locations is less than the default of 26 - if(settings.storeLimit === -1 || (locationset.length-1) < settings.storeLimit-1){ - storenum = locationset.length-1; - } - else{ - storenum = settings.storeLimit-1; - } - - //Add origin marker if the setting is set - if(settings.originMarker === true && settings.fullMapStart === false){ - var originPoint = new google.maps.LatLng(orig_lat, orig_lng); - var marker = new google.maps.Marker({ - position: originPoint, - map: map, - icon: 'https://maps.google.com/mapfiles/ms/icons/'+ settings.originpinColor +'-dot.png', - draggable: false - }); - } - - //Add markers and infowindows loop - for(var y = 0; y <= storenum; y++) { - var letter = String.fromCharCode("A".charCodeAt(0) + y); - var point = new google.maps.LatLng(locationset[y]['lat'], locationset[y]['lng']); - marker = createMarker(point, locationset[y]['name'], locationset[y]['address'], letter ); - marker.set("id", y); - markers[y] = marker; - if((settings.fullMapStart === true && firstRun === true) || settings.zoomLevel === 0){ - bounds.extend(point); - } - //Pass variables to the pop-up infowindows - create_infowindow(marker); - } - - //Center and zoom if no origin or zoom was provided - if((settings.fullMapStart === true && firstRun === true) || settings.zoomLevel === 0){ - map.fitBounds(bounds); - } - - //Create the links that focus on the related marker - $("#" + settings.listDiv + ' ul').empty(); - $(markers).each(function(x, marker){ - var letter = String.fromCharCode("A".charCodeAt(0) + x); - //This needs to happen outside the loop or there will be a closure problem with creating the infowindows attached to the list click - var currentMarker = markers[x]; - listClick(currentMarker); - }); - - function listClick(marker){ - //Define the location data - var locations = define_location_data(marker); - - //Set up the list template with the location data - var listHtml = listTemplate(locations); - $('#' + settings.listDiv + ' ul').append(listHtml); - } - - //Handle clicks from the list - $(document).on('click.'+prefix, '#' + settings.listDiv + ' li', function(){ - var markerId = $(this).data('markerid'); - - var selectedMarker = markers[markerId]; - - //Focus on the list - $('#' + settings.listDiv + ' li').removeClass('list-focus'); - $('#' + settings.listDiv + ' li[data-markerid=' + markerId +']').addClass('list-focus'); - - map.panTo(selectedMarker.getPosition()); - var listLoc = "left"; - if(settings.bounceMarker === true){ - selectedMarker.setAnimation(google.maps.Animation.BOUNCE); - setTimeout(function() { selectedMarker.setAnimation(null); create_infowindow(selectedMarker, listLoc); }, 700); - } - else{ - create_infowindow(selectedMarker, listLoc); - } - }); - - //Add the list li background colors - $("#" + settings.listDiv + " ul li:even").css('background', "#" + settings.listColor1); - $("#" + settings.listDiv + " ul li:odd").css('background', "#" + settings.listColor2); - - //Custom marker function - alphabetical - function createMarker(point, name, address, letter){ - //Set up pin icon with the Google Charts API for all of our markers - var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=" + letter + "|" + settings.pinColor + "|" + settings.pinTextColor, - new google.maps.Size(21, 34), - new google.maps.Point(0,0), - new google.maps.Point(10, 34)); - - //Create the markers - if(settings.storeLimit === -1 || settings.storeLimit > 26){ - var marker = new google.maps.Marker({ - position: point, - map: map, - draggable: false - }); - } - else{ - var marker = new google.maps.Marker({ - position: point, - map: map, - icon: pinImage, - draggable: false - }); - } - - return marker; - } - - //Infowindows - function create_infowindow(marker, location){ - - //Define the location data - var locations = define_location_data(marker); - - //Set up the infowindow template with the location data - var formattedAddress = infowindowTemplate(locations); - - //Opens the infowindow when list item is clicked - if(location === "left"){ - infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); - } - //Opens the infowindow when the marker is clicked - else{ - google.maps.event.addListener(marker, 'click', function() { - infowindow.setContent(formattedAddress); - infowindow.open(marker.get('map'), marker); - //Focus on the list - $('#' + settings.listDiv + ' li').removeClass('list-focus'); - markerId = marker.get("id"); - $('#' + settings.listDiv + ' li[data-markerid=' + markerId +']').addClass('list-focus'); - - //Scroll list to selected marker - var container = $('#' + settings.listDiv),scrollTo = $('#' + settings.listDiv + ' li[data-markerid=' + markerId +']'); - $('#' + settings.listDiv).animate({ - scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop() - }); - }); - } - - } - - }); - } - }); - }); - } - - } - - }); -}; -})(jQuery); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/js/jquery.storelocator.min.js b/thirdparty/jquery-store-locator/js/jquery.storelocator.min.js deleted file mode 100755 index 0ca2967..0000000 --- a/thirdparty/jquery-store-locator/js/jquery.storelocator.min.js +++ /dev/null @@ -1,58 +0,0 @@ -/* -* storeLocator v1.4.9 - jQuery Google Maps Store Locator Plugin -* (c) Copyright 2013, Bjorn Holine (http://www.bjornblog.com) -* Released under the MIT license -* Distance calculation function by Chris Pietschmann: http://pietschsoft.com/post/2008/02/01/Calculate-Distance-Between-Geocodes-in-C-and-JavaScript.aspx -*/ - -(function(a){a.fn.storeLocator=function(b){var c=a.extend({mapDiv:"map",listDiv:"loc-list",formContainerDiv:"form-container",formID:"user-location",inputID:"address",zoomLevel:12,pinColor:"fe7569",pinTextColor:"000000",lengthUnit:"m",storeLimit:26,distanceAlert:60,dataType:"xml",dataLocation:"locations.xml",listColor1:"ffffff",listColor2:"eeeeee",originMarker:false,originpinColor:"blue",bounceMarker:true,slideMap:true,modalWindow:false,overlayDiv:"overlay",modalWindowDiv:"modal-window",modalContentDiv:"modal-content",modalCloseIconDiv:"close-icon",defaultLoc:false,defaultLat:"",defaultLng:"",autoGeocode:false,maxDistance:false,maxDistanceID:"maxdistance",fullMapStart:false,noForm:false,loading:false,loadingDiv:"loading-map",featuredLocations:false,infowindowTemplatePath:"templates/infowindow-description.html",listTemplatePath:"templates/location-list-description.html",KMLinfowindowTemplatePath:"templates/kml-infowindow-description.html",KMLlistTemplatePath:"templates/kml-location-list-description.html",callbackBeforeSend:null,callbackComplete:null,callbackSuccess:null,callbackModalOpen:null,callbackModalClose:null,jsonpCallback:null,geocodeErrorAlert:"Geocode was not successful for the following reason: ",addressErrorAlert:"Unable to find address",autoGeocodeErrorAlert:"Automatic location detection failed. Please fill in your address or zip code.",distanceErrorAlert:"Unfortunately, our closest location is more than ",mileLang:"mile",milesLang:"miles",kilometerLang:"kilometer",kilometersLang:"kilometers"},b); -return this.each(function(){var h=a(this);var e,g;f();function f(){if(c.dataType==="kml"){a.get(c.KMLinfowindowTemplatePath,function(i){var j=i;g=Handlebars.compile(j); -});a.get(c.KMLlistTemplatePath,function(i){var j=i;e=Handlebars.compile(j);d();});}else{a.get(c.infowindowTemplatePath,function(i){var j=i;g=Handlebars.compile(j); -});a.get(c.listTemplatePath,function(i){var j=i;e=Handlebars.compile(j);d();});}}function d(){var i,y,s,o,B,m;var r=[];var k=[];var w=[];var x=[];var u="storeLocator"; -function z(){r=[];k=[];w=[];x=[];a(document).off("click."+u,"#"+c.listDiv+" li");}if(c.modalWindow===true){h.wrap('
                                                    '); -a("#"+c.modalWindowDiv).prepend('
                                                    ');a("#"+c.overlayDiv).hide();}if(c.slideMap===true){h.hide();}var l={};if(c.lengthUnit==="km"){l.EarthRadius=6367; -}else{l.EarthRadius=3956;}l.ToRadian=function(D){return D*(Math.PI/180);};l.DiffRadian=function(E,D){return l.ToRadian(D)-l.ToRadian(E);};l.CalcDistance=function(H,G,F,E,D){return D*2*Math.asin(Math.min(1,Math.sqrt((Math.pow(Math.sin((l.DiffRadian(H,F))/2),2)+Math.cos(l.ToRadian(H))*Math.cos(l.ToRadian(F))*Math.pow(Math.sin((l.DiffRadian(G,E))/2),2))))); -};j();function j(){if(c.defaultLoc===true){var D=new C();var E=new google.maps.LatLng(c.defaultLat,c.defaultLng);D.geocode(E,function(G){if(G!==null){var F=G.address; -p(c.defaultLat,c.defaultLng,F);}else{alert(c.addressErrorAlert);}});}if(c.fullMapStart===true){p();}if(c.autoGeocode===true){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(q,A); -}}}function v(){geocoder=new google.maps.Geocoder();this.geocode=function(D,E){geocoder.geocode({address:D},function(H,G){if(G===google.maps.GeocoderStatus.OK){var F={}; -F.latitude=H[0].geometry.location.lat();F.longitude=H[0].geometry.location.lng();E(F);}else{alert(c.geocodeErrorAlert+G);E(null);}});};}function C(){geocoder=new google.maps.Geocoder(); -this.geocode=function(E,D){geocoder.geocode({latLng:E},function(H,G){if(G===google.maps.GeocoderStatus.OK){if(H[0]){var F={};F.address=H[0].formatted_address; -D(F);}}else{alert(c.geocodeErrorAlert+G);D(null);}});};}function t(D,E){return Math.round(D*Math.pow(10,E))/Math.pow(10,E);}function q(D){var E=new C(); -var F=new google.maps.LatLng(D.coords.latitude,D.coords.longitude);E.geocode(F,function(H){if(H!==null){var G=H.address;p(D.coords.latitude,D.coords.longitude,G); -}else{alert(c.addressErrorAlert);}});}function A(D){alert(c.autoGeocodeErrorAlert);}function n(G){var F=a("#"+c.inputID).val();if(F===""){j();}else{var E=new v(); -var D=F;E.geocode(D,function(H){if(H!==null){y=H.latitude;s=H.longitude;p(y,s,F,G);}else{alert(c.addressErrorAlert);}});}}a(function(){function D(F){F.preventDefault(); -if(c.maxDistance===true){var E=a("#"+c.maxDistanceID).val();n(E);}else{n();}}if(c.noForm===true){a(document).on("click."+u,"#"+c.formContainerDiv+" #submit",function(E){D(E); -});a(document).on("keyup."+u,function(E){if(E.keyCode===13&&a("#"+c.inputID).is(":focus")){D(E);}});}else{a(document).on("submit."+u,"#"+c.formID,function(E){D(E); -});}});function p(D,F,E,G){a(function(){google.maps.visualRefresh=true;var H;if(c.dataType==="kml"){H="xml";}else{H=c.dataType;}a.ajax({type:"GET",url:c.dataLocation+(c.dataType==="jsonp"?(c.dataLocation.match(/\?/)?"&":"?")+"callback=?":""),dataType:H,jsonpCallback:(c.dataType==="jsonp"?c.jsonpCallback:null),beforeSend:function(){if(c.callbackBeforeSend){c.callbackBeforeSend.call(this); -}if(c.loading===true){a("#"+c.formContainerDiv).append('
                                                    ');}},complete:function(K,J,I){if(c.callbackComplete){c.callbackComplete.call(this,K,J,I); -}if(c.loading===true){a("#"+c.loadingDiv).remove();}},success:function(L,N,I){if(c.callbackSuccess){c.callbackSuccess.call(this,L,N,I);}var K=0;var M;if(c.fullMapStart===true&&a("#"+c.mapDiv).hasClass("mapOpen")===false){M=true; -}else{z();}a("#"+c.mapDiv).addClass("mapOpen");if(c.dataType==="json"||c.dataType==="jsonp"){a.each(L,function(){var P,Q,R={};for(P in this){Q=this[P]; -if(P==="web"){if(Q){Q=Q.replace("http://","");}}R[P]=Q;}if(!R.distance){R.distance=l.CalcDistance(D,F,R.lat,R.lng,l.EarthRadius);}if(c.maxDistance===true&&M!==true&&G){if(R.distanceQ.distance)?1:0));});}J(r);if(c.featuredLocations===true){k=a.grep(r,function(Q,P){return Q.featured==="true"; -});w=a.grep(r,function(Q,P){return Q.featured!=="true";});r=[];r=k.concat(w);}var O=(c.lengthUnit==="km")?c.kilometersLang:c.milesLang;if(c.maxDistance===true&&M!==true&&G){if(r[0]===undefined||r[0]["distance"]>G){alert(c.distanceErrorAlert+G+" "+O); -return;}}else{if(c.distanceAlert!==-1&&r[0]["distance"]>c.distanceAlert){alert(c.distanceErrorAlert+c.distanceAlert+" "+O);}}a(function(){var ag,ac,V={}; -function W(ah){for(ag in r[ah]){ac=r[ah][ag];if(ag==="distance"){ac=t(ac,2);}V[ag]=ac;}}function R(al){W(al.get("id"));var aj;if(V.distance<=1){if(c.lengthUnit==="km"){aj=c.kilometerLang; -}else{aj=c.mileLang;}}else{if(c.lengthUnit==="km"){aj=c.kilometersLang;}else{aj=c.milesLang;}}var ak=al.get("id");if(c.storeLimit===-1||c.storeLimit>26){var ai=ak+1; -}else{var ai=String.fromCharCode("A".charCodeAt(0)+ak);}var ah={location:[a.extend(V,{markerid:ak,marker:ai,length:aj,origin:E})]};return ah;}if(c.slideMap===true){h.slideDown(); -}if(c.modalWindow===true){if(c.callbackModalOpen){c.callbackModalOpen.call(this);}function Q(){if(c.callbackModalOpen){c.callbackModalOpen.call(this);}a("#"+c.overlayDiv).hide(); -}a("#"+c.overlayDiv).fadeIn();a(document).on("click."+u,"#"+c.modalCloseIconDiv+", #"+c.overlayDiv,function(){Q();});a(document).on("click."+u,"#"+c.modalWindowDiv,function(ah){ah.stopPropagation(); -});a(document).on("keyup."+u,function(ah){if(ah.keyCode===27){Q();}});}if((c.fullMapStart===true&&M===true)||c.zoomLevel===0){var aa={mapTypeId:google.maps.MapTypeId.ROADMAP}; -var T=new google.maps.LatLngBounds();}else{var aa={zoom:c.zoomLevel,center:new google.maps.LatLng(D,F),mapTypeId:google.maps.MapTypeId.ROADMAP};}var ae=new google.maps.Map(document.getElementById(c.mapDiv),aa); -h.data("map",ae);var Y=new google.maps.InfoWindow();if(c.storeLimit===-1||(r.length-1)26){var ai=new google.maps.Marker({position:ah,map:ae,draggable:false});}else{var ai=new google.maps.Marker({position:ah,map:ae,icon:al,draggable:false}); -}return ai;}function S(ak,aj){var ai=R(ak);var ah=g(ai);if(aj==="left"){Y.setContent(ah);Y.open(ak.get("map"),ak);}else{google.maps.event.addListener(ak,"click",function(){Y.setContent(ah); -Y.open(ak.get("map"),ak);a("#"+c.listDiv+" li").removeClass("list-focus");markerId=ak.get("id");a("#"+c.listDiv+" li[data-markerid="+markerId+"]").addClass("list-focus"); -var al=a("#"+c.listDiv),am=a("#"+c.listDiv+" li[data-markerid="+markerId+"]");a("#"+c.listDiv).animate({scrollTop:am.offset().top-al.offset().top+al.scrollTop()}); -});}}});}});});}}});};})(jQuery); \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/json-example.html b/thirdparty/jquery-store-locator/json-example.html deleted file mode 100755 index 44a2c6b..0000000 --- a/thirdparty/jquery-store-locator/json-example.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - JSON Data - - - - - - -
                                                    - - -
                                                    -
                                                    -
                                                    - - -
                                                    - - -
                                                    -
                                                    - -
                                                    -
                                                    -
                                                      -
                                                      -
                                                      -
                                                      -
                                                      - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/kml-example.html b/thirdparty/jquery-store-locator/kml-example.html deleted file mode 100755 index 8ab54fa..0000000 --- a/thirdparty/jquery-store-locator/kml-example.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - KML Data - - - - - - -
                                                      - - -
                                                      -
                                                      -
                                                      - - -
                                                      - - -
                                                      -
                                                      - -
                                                      -
                                                      -
                                                        -
                                                        -
                                                        -
                                                        -
                                                        - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/license.txt b/thirdparty/jquery-store-locator/license.txt deleted file mode 100755 index 6c15aac..0000000 --- a/thirdparty/jquery-store-locator/license.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2013 Bjorn Holine - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/locations.json b/thirdparty/jquery-store-locator/locations.json deleted file mode 100755 index 9c099bd..0000000 --- a/thirdparty/jquery-store-locator/locations.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":"1","name":"Chipotle Minneapolis","lat":"44.947464","lng":"-93.320826","address":"3040 Excelsior Blvd","address2":"","city":"Minneapolis","state":"MN","postal":"55416","phone":"612-922-6662","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"2","name":"Chipotle St. Louis Park","lat":"44.930810","lng":"-93.347877","address":"5480 Excelsior Blvd.","address2":"","city":"St. Louis Park","state":"MN","postal":"55416","phone":"952-922-1970","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"3","name":"Chipotle Minneapolis","lat":"44.991565","lng":"-93.216323","address":"2600 Hennepin Ave.","address2":"","city":"Minneapolis","state":"MN","postal":"55404","phone":"612-377-6035","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"4","name":"Chipotle Golden Valley","lat":"44.983935","lng":"-93.380542","address":"515 Winnetka Ave. N","address2":"","city":"Golden Valley","state":"MN","postal":"55427","phone":"763-544-2530","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"5","name":"Chipotle Hopkins","lat":"44.924363","lng":"-93.410158","address":"786 Mainstreet","address2":"","city":"Hopkins","state":"MN","postal":"55343","phone":"952-935-0044","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"6","name":"Chipotle Minneapolis","lat":"44.973557","lng":"-93.275111","address":"1040 Nicollet Ave","address2":"","city":"Minneapolis","state":"MN","postal":"55403","phone":"612-659-7955","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"7","name":"Chipotle Minneapolis","lat":"44.97774","lng":"-93.270909","address":"50 South 6th","address2":"","city":"Minneapolis","state":"MN","postal":"55402","phone":"612-333-0434","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"8","name":"Chipotle Edina","lat":"44.879826","lng":"-93.321280","address":"6801 York Avenue South","address2":"","city":"Edina","state":"MN","postal":"55435","phone":"952-926-6651","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"9","name":"Chipotle Minnetonka","lat":"44.970495","lng":"-93.437430","address":"12509 Wayzata Blvd","address2":"","city":"Minnetonka","state":"MN","postal":"55305","phone":"952-252-4900","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"10","name":"Chipotle Minneapolis","lat":"44.972808","lng":"-93.247153","address":"229 Cedar Ave S","address2":"","city":"Minneapolis","state":"MN","postal":"55454","phone":"612-659-7830","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"11","name":"Chipotle Minneapolis","lat":"44.987687","lng":"-93.257581","address":"225 Hennepin Ave E","address2":"","city":"Minneapolis","state":"MN","postal":"55414","phone":"612-331-6330","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"12","name":"Chipotle Minneapolis","lat":"44.973665","lng":"-93.227023","address":"800 Washington Ave SE","address2":"","city":"Minneapolis","state":"MN","postal":"55414","phone":"612-378-7078","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"13","name":"Chipotle Bloomington","lat":"44.8458631","lng":"-93.2860161","address":"322 South Ave","address2":"","city":"Bloomington","state":"MN","postal":"55425","phone":"952-252-3800","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"14","name":"Chipotle Wayzata","lat":"44.9716626","lng":"-93.4967757","address":"1313 Wayzata Blvd","address2":"","city":"Wayzata","state":"MN","postal":"55391","phone":"952-473-7100","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"15","name":"Chipotle Eden Prairie","lat":"44.859761","lng":"-93.436379","address":"13250 Technology Dr","address2":"","city":"Eden Prairie","state":"MN","postal":"55344","phone":"952-934-5955","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"16","name":"Chipotle Plymouth","lat":"45.019846","lng":"-93.481832","address":"3425 Vicksburg Lane N","address2":"","city":"Plymouth","state":"MN","postal":"55447","phone":"763-519-0063","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"17","name":"Chipotle Roseville","lat":"44.998965","lng":"-93.194622","address":"860 Rosedale Center Plaza","address2":"","city":"Roseville","state":"MN","postal":"55113","phone":"651-633-2300","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"18","name":"Chipotle St. Paul","lat":"44.939865","lng":"-93.136768","address":"867 Grand Ave","address2":"","city":"St. Paul","state":"MN","postal":"55105","phone":"651-602-0560","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"19","name":"Chipotle Chanhassen","lat":"44.858736","lng":"-93.533661","address":"560 W 79th","address2":"","city":"Chanhassen","state":"MN","postal":"55317","phone":"952-294-0301","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""},{"id":"20","name":"Chipotle St. Paul","lat":"44.945127","lng":"-93.095368","address":"29 5th St West","address2":"","city":"St. Paul","state":"MN","postal":"55102","phone":"651-291-5411","web":"http:\/\/www.chipotle.com","hours1":"Mon-Sun 11am-10pm","hours2":"","hours3":""}] \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/maxdistance-example.html b/thirdparty/jquery-store-locator/maxdistance-example.html deleted file mode 100755 index d834564..0000000 --- a/thirdparty/jquery-store-locator/maxdistance-example.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - Map Example - Maximum Distance - - - - - - -
                                                        - - -
                                                        -
                                                        -
                                                        - - - -
                                                        - - -
                                                        -
                                                        - -
                                                        -
                                                        -
                                                          -
                                                          -
                                                          -
                                                          -
                                                          - -
                                                          - - - - - - - - - diff --git a/thirdparty/jquery-store-locator/modal-example.html b/thirdparty/jquery-store-locator/modal-example.html deleted file mode 100755 index a837659..0000000 --- a/thirdparty/jquery-store-locator/modal-example.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - Map Example - Modal Window - - - - - - -
                                                          - - -
                                                          -
                                                          -
                                                          - - -
                                                          - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                            -
                                                            -
                                                            -
                                                            -
                                                            - - - - - - - - - diff --git a/thirdparty/jquery-store-locator/noform-example.html b/thirdparty/jquery-store-locator/noform-example.html deleted file mode 100755 index 86122e5..0000000 --- a/thirdparty/jquery-store-locator/noform-example.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Map Example - No Form for ASP.net - - - - - - -
                                                            - - -
                                                            -
                                                            - - -
                                                            - -
                                                            - -
                                                            -
                                                            -
                                                              -
                                                              -
                                                              -
                                                              -
                                                              - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/readme.md b/thirdparty/jquery-store-locator/readme.md deleted file mode 100755 index 7219fd2..0000000 --- a/thirdparty/jquery-store-locator/readme.md +++ /dev/null @@ -1,182 +0,0 @@ -# [jQuery Google Maps Store Locator Plugin](http://www.bjornblog.com/web/jquery-store-locator-plugin) - -### [Please see my blog for more information and examples](http://www.bjornblog.com/web/jquery-store-locator-plugin). - -This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information. How you create the data file is up to you. I originally created this for a company that didn’t have many locations, so I just used a static XML file. I also decided to geocode all the locations beforehand, to make sure it was quick and to avoid any potential geocoding errors. However, if you’re familiar with JavaScript you could easily make a modification to geocode everything on the fly (I may add this as an option at some point). - -A note on the distance calculation: this plugin currently uses a distance function that was originally programmed by [Chris Pietschmann](http://pietschsoft.com/post/2008/02/01/Calculate-Distance-Between-Geocodes-in-C-and-JavaScript.aspx). Google Maps API version 3 does include a distance calculation service ([Google Distance Matrix API](http://code.google.com/apis/maps/documentation/distancematrix/)) but I decided not to use it because of the current request limits, which seem somewhat low. In addition, because the plugin currently calculates each location’s distance one by one, it appeared that I would have to re-structure some things to make all the distance calculations at once (or risk making many request for one location lookup). So, the distance calculation is “as the crow flies” instead of a road distance. - -Handlebars is now required: It’s very important to note that the plugin now requires the Handlebars template engine. I made this change so that the data that’s displayed in the location list and the infowindows can be easily customized. I also wanted to separate the bulk of the layout additions from the main plugin file. Handlebars pretty slick, will read Mustache templates, and the built-in helpers can really come in handy. Depending on what your data source is, 2 of the 4 total templates will be used (KML vs XML or JSON) and there are options to set the paths of each template if you don’t want them in the default location. If you’re developing something for mobile devices the templates can be pre-compiled for even faster loading. - -## Changelog - -### Version 1.4.9 - -More contributions from [Mathieu Boillat](https://github.com/ollea) and [Jimmy Rittenborg](https://github.com/JimmyRittenborg) in addition to a few style updates: - -* Store the map object into the jQuery object in order to retrieve it by calling $object.data('map'). -* Possibility to add custom variables in locations -* If 'distance' variable is set in location, do not calculate it -* Enabling the new Google Maps [https://developers.google.com/maps/documentation/javascript/basics#VisualRefresh](visual refresh) -* Replaced submit image button image with button tag and CSS3 -* Overrode new infowindow Roboto font for consistent style -* Removed icon shadows because they are no longer work in the upcoming version of Google Maps: see [https://developers.google.com/maps/documentation/javascript/basics#VisualRefresh](Changes in the visual refresh section) -* Changed "locname" to "name" for each location in the JSON file to match other location data types and to avoid renaming -* Simplified some parts of the code - -### Version 1.4.8 - -This update is made up of contributions from [Mathieu Boillat](https://github.com/ollea) and [Jimmy Rittenborg](https://github.com/JimmyRittenborg): - -* Added the possibility to set the 'storeLimit' option to -1, which means unlimited -* Added the possibility to set the 'distanceAlert' option to -1, which means disable distance alert -* Added little checks to only format 'web' variable when it is not null otherwise javascript would gives an error -* Possibility to add custom variables in locations -* If 'distance' variable is set in location, do not calculate it -* Simplified some parts of the code -* If noForm is true, only simulate the submit when the field is actually in focus - -### Version 1.4.7 - -Added ability to feature locations so that they always show at the top of the location list. To use, set the featuredLocations option to true and add featured="true" to featured locations in your XML or JSON locations data. - -### Version 1.4.6 - -Fixed a bug where infowindows wouldn't open if the map div was changed. - -### Version 1.4.5 - -A minor update that includes the latest versions of jQuery and Handlebars, two new location variables and some clean-up. - -* Added email and country variables for locations -* Updated included Handlebars version to v1.0.0 -* Updated jQuery call to v1.10.1 -* Some bracket clean-up - -### Version 1.4.4 - -This update includes a bug fix for form re-submissions that was most apparent with the maximum distance example. It also includes a new jsonpCallback setting that was submitted by quayzar. - -* Moved markers array declaration up to line 115 -* Added a reset function that resets both the locationset and markers array and resets the list click event handler -* Includes quayzar's jsonpCallback callback - -### Version 1.4.3 - -A minor update with some clean up and additional language options. - -**Additions:** - -* Added several options for messaging so they can be easily translated into other languages -* Added event namespacing -* Added category to location variables - -**Fixes:** - -* The distance error would only display "miles" in the alert. It will now show miles or kilometers depending on what the lengthUnit option is set to. - -### Version 1.4.2 - -This is another minor patch with a few important fixes and one addition. The plugin has also been submitted to the official [jQuery plugin registry](http://plugins.jquery.com/), which is finally back online. - -**Additions:** - -* Added a "loading" option, which displays a loading gif next to the search button if set to true -* Added missing modal window callback functions - -**Fixes:** - -* The locationset array wasn't being reset on re-submission, which was a more obvious problem when trying to use the maxDistance option. Accidentally removed in 1.4.1. -* When using the fullMapStart option the map wouldn't center and zoom on closest points after form submission -* Using the fullMapStart and maxDistance options together would cause errors -* Wrapped template loading and the rest of the script in separate functions to ensure that the template files are loaded before the rest of the script runs -* Changed all modal window DIVs to use options for full customization. I thought about having a third template for the modal but it seems like overkill. -* Updated the jQuery version in all the example files to 1.9.1 and switched the source to use the Media Temple CDN version because Google is taking too long to update their version. - -Note that if you try to use the minified version of jQuery 1.9.0 the plugin will error out in Internet Explorer due to the bug described in [ticket 13315](http://bugs.jquery.com/ticket/13315). - -### Version 1.4.1 - -This is a minor patch to switch array declarations to a [faster method](http://jsperf.com/new-array-vs-vs-array), fix line 682 to target with the loc-list setting instead of the div ID, and remove -a duplicate locationset declaration on line 328. - -### Version 1.4 - -This is a large update that has many updates and improvements. It’s very important to note that the plugin now requires the [Handlebars](http://handlebarsjs.com) template engine. I made this change so that the data that’s displayed in the location list and the infowindows can be easily customized. I also wanted to separate the bulk of the layout additions from the main plugin file. Handlebars pretty slick, will read Mustache templates, and the built-in helpers can really come in handy. Depending on what your data source is, 2 of the 4 total templates will be used (KML vs XML or JSON) and there are options to set the paths of each template if you don’t want them in the default location. If you’re developing something for mobile devices the templates can be pre-compiled for even faster loading. Additionally, I’d also like to note that it probably makes more sense to use KML now as the data source over the other options but I’m definitely leaving XML and JSON support in. XML is still the default datatype but I may switch it to KML in the future. - -####New features:#### - -**Kilometers option** -This was a no-brainer. You could make the change without too much trouble before but I thought I’d make it easier for the rest of the world. - -**Origin marker option** -If you’d like to show the origin point, the originMarker option should be set to true. The default color is blue but you can also change that with the originpinColor option. I’m actually not positive how many colors Google has available but I know red, green and blue work - I would just try the color you want to see if it works. - -**KML support** -Another obvious add-on. If you’d like to use this plugin with more customized data this would be the method I’d recommend because the templates are simplified to just name and description. So, you could put anything in the descriptions and not have to worry about line by line formatting. This method also allows you to create a map with Google “My Maps” and export the KML for use with this plugin. - -**Better JSONP support and 5 callbacks** -Thanks to “Blackout” for passing these additions on. It should make working with JSONP easier and the callbacks should be helpful for anyone wanting to hook in add some more advanced customization. - -**ASP.net WebForms support** -If you’re woking with ASP.net WebForms, including form tags is obviously going to cause some problems. If you’re in this situation simply set the new noForm option to true and make sure the formContainerDiv setting matches your template. - -**Maximum distance option** -You can now easily add a distance dropdown with any options that you’d like. I’ve specifically added a new HTML file as an example. - -**Location limit now supports any number** -This plugin was previously limited to only display a maximum of 26 locations at one time (based on the English alphabet). You can now set the limit to whatever you’d like and if there are more than 26 it will switch to just show dot markers with numbers in the location list. - -**Open with a full map of all locations** -I had several requests asking how to accomplish this so I’ve added it as an option. There’s a new fullMapStart option that if set to true, will immediately display a map with all locations and the zoom will automatically fit all the markers and center. - -**Reciprocal focus** -“JO” was particularly interested in adding this to the plugin and I finally got around to it. To accomplish reciprocal focus I add an ID to each marker and then add that same ID to each list element in the location list taking advantage of [HTML5’s new data- attributes](http://ejohn.org/blog/html-5-data-attributes). I also added some jQuery to make the location list scroll to the correct position when its marker is clicked on the map. - -**Notes:** - -A few option names have changed, so be sure to take note of the changes before updating your files - especially people using JSON data. - -I've included a basic [LESS](http://lesscss.org) stylesheet without variables that can be used in place of the main map.css stylesheet. If you want to use it make any changes you want and compile it or include it in your main LESS file. - -I’m somewhat concerned about the markers for future versions. Google has deprecated the Image Charts API, which is annoying (they always seem to deprecate the best things), but these should still continue to work for a long time. With that said though, my opinion of the look of Google’s markers is that they’re quite ugly. I was working on adding a new custom markers that could be controlled with CSS via the [Rich Marker utility](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/examples/richmarker.html) but I was unable to get that to work with the marker animations. I was also looking into using [Nicolas Mollet’s custom marker icons](http://mapicons.nicolasmollet.com), which look very nice compared to Google’s, but that project is apparently under maintenance until further notice. If you have suggestions on this concern I’d be interested in hearing them. - -### Version 1.3.3 - -Forgot to remove one of the UTF-8 encoding lines in the Geocoder function. - -### Version 1.3.2 - -Only a few special characters were working with the previous fix. Removed special encoding and all seem to be working now. - -### Version 1.3.1 - -Replaced .serialize with .val on line 169 and added the line directly below, which encodes the string in UTF-8. This should solve special character issues with international addresses. - -### Version 1.3 - -Added directions links to left column location list and HTML5 geolocation API option. Also did a little cleanup. - -### Version 1.2 - -Added JSON compatibility, distance to location list, and an option for a default location. Also updated jQuery calls to the latest version (1.7.2) and removed an unnecessary line in the process form input function. - -### Version 1.1.3 - -Serlialize was targeting any form on the page instead of the specific formID. Thanks to Scott for pointing it out. - -### Version 1.1.2 - -Changed it so that the processing stops if the user input is blank. - -### Version 1.1.1 - -Added a modal window option. Set slideMap to false and modalWindow to true to use it. Also started using the new [jQuery .on() event api](http://blog.jquery.com/2011/11/03/jquery-1-7-released/) - make sure you're using jQuery v1.7+ or this won't work. - -### Version 1.0.1 - -Left a couple of console.logs in my code, which was causing IE to hang. - -### Version 1.0 - -This is my first jQuery plugin and the first time I’ve published anything on Github. Let me know if I can improve something or if I’m making some kind of mistake. \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/storelocator.jquery.json b/thirdparty/jquery-store-locator/storelocator.jquery.json deleted file mode 100755 index d1cb96b..0000000 --- a/thirdparty/jquery-store-locator/storelocator.jquery.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "storelocator", - "title": "jQuery Google Maps Store Locator", - "description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.", - "keywords": ["locator","store", "location", "locations", "maps", "map", "stores", "find"], - "version": "1.4.9", - "author": { - "name": "Bjorn Holine", - "url": "http://www.bjornblog.com/" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/blob/master/license.txt" - } - ], - "homepage": "http://www.bjornblog.com/web/jquery-store-locator-plugin", - "docs": "http://www.bjornblog.com/web/jquery-store-locator-plugin", - "demo": "http://bjornblog.com/storelocator/", - "dependencies": { - "jquery": ">=1.7", - "handlebars": ">=1.0" - } -} \ No newline at end of file diff --git a/thirdparty/jquery-store-locator/templates/location-list-description.html b/thirdparty/jquery-store-locator/templates/location-list-description.html deleted file mode 100755 index 3893610..0000000 --- a/thirdparty/jquery-store-locator/templates/location-list-description.html +++ /dev/null @@ -1,17 +0,0 @@ -{{#location}} -
                                                            • -
                                                              {{marker}}
                                                              -
                                                              -
                                                              -
                                                              {{name}}
                                                              -
                                                              {{address}}
                                                              -
                                                              {{address2}}
                                                              -
                                                              {{city}}, {{state}} {{postal}}
                                                              -
                                                              {{phone}}
                                                              - - {{#if distance}}
                                                              {{distance}} {{length}}
                                                              - {{/if}} -
                                                              -
                                                              -
                                                            • -{{/location}} \ No newline at end of file