/** * jQuery NavToSelect v0.5.2 * https://github.com/amazingSurge/jquery-navToSelect * * Copyright (c) amazingSurge * Released under the LGPL-3.0 license */ !function(e,t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("undefined"!=typeof exports)t(require("jquery"));else{var n={exports:{}};t(e.jQuery),e.jqueryNavToSelectEs=n.exports}}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(e){return e&&e.__esModule?e:{default:e}}(e),i=function(){function e(e,t){for(var n=0;n",{class:this.options.namespace}).html(this.buildOptions(e,1)),null===this.options.prependTo?this.$element.after(this.$select):this.$select.prependTo(this.options.prependTo),this._isBuilded=!0}},{key:"buildOption",value:function(e,t){var n=new Array(t).join(this.options.indentString);return 1!==t&&this.options.indentSpace&&(n+=" "),'"}},{key:"buildOptions",value:function(e,t){var i=this;if(t>this.options.maxLevel)return"";var l="";return n.default.each(e,function(e,n){!1===n.linkable&&void 0!==n.items&&1===t&&i.options.useOptgroup&&(l+='',l+=i.buildOptions(n.items,t+1),l+=""),void 0!==n.items?(l+=i.buildOption(n,t),l+=i.buildOptions(n.items,t+1)):l+=i.buildOption(n,t)}),l}},{key:"getItems",value:function(){var e=[];return this.options.placeholder&&(e=e.concat({value:"#",label:this.options.placeholder,linkable:!1})),e=e.concat(this.options.getItemsFromList.call(this,this.$element,1))}},{key:"getItemValue",value:function(e){return e.find(this.options.linkSelector).attr("href")}},{key:"isLinkable",value:function(e){return"#"!==this.getItemValue(e)}},{key:"isActived",value:function(e){return e.is("."+this.options.activeClass)}},{key:"isBuilded",value:function(){return this._isBuilded}},{key:"trigger",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i1?t-1:0),l=1;l