text: /*!
   * @copyright &copy; Kartik Visweswaran, Krajee.com, 2013 - 2015
   * @version 1.4.2
   *
   * A multi level dependent dropdown JQuery plugin. The plugin
   * allows nested and combined dependencies.
   * 
   * For more JQuery plugins visit http://plugins.krajee.com
   * For more Yii related demos visit http://demos.krajee.com
   */!function(e){"use strict";var t=function(t,a){return null===t||void 0===t||0===t.length||a&&""===e.trim(t)},a=function(t,a,n,d){var r={value:a,text:n};a===d&&null!==d&&(r.selected="selected"),e("<option/>",r).appendTo(t)},n=function(e,t){var a,n,d,r={};if(0===e.length)return{};for(a=0;a<e.length;a++)n=e[a],d=t[a],r[n]=d;return r},d=function(t,a){var n=this;n.$element=e(t),e.each(a,function(e,t){n[e]=t}),n.initData(),n.init()};d.prototype={constructor:d,initData:function(){var e=this,t=e.$element;t.data("url",e.url).data("depends",e.depends).data("placeholder",e.placeholder).data("loading",e.loading).data("loadingClass",e.loadingClass).data("loadingText",e.loadingText).data("emptyMsg",e.emptyMsg).data("initialize",e.initialize).data("params",e.params)},init:function(){var a,n=this,d=n.depends,r=n.$element,i=d.length,o=r.find("option").length,l=n.initDepends||n.depends;(0===o||r.find('option[value=""]').length===o)&&r.attr("disabled","disabled");for(var p=0;i>p;p++)a=e("#"+d[p]),a.on("depdrop.change change select2:select krajeeselect2:cleared",function(e){(t(a.data("select2"))||"change"!==e.type)&&n.setDep(a,d,i,r.val())});if(n.initialize===!0)for(var p=0;p<l.length;p++)e("#"+l[p]).trigger("depdrop.change");r.trigger("depdrop.init")},setDep:function(t,a,n,d){for(var r,i,o=this,l=o.$element,p={},s=d,c=0;n>c;c++)r=e("#"+a[c]),i=r.attr("type"),p[c]="checkbox"===i||"radio"===i?r.prop("checked"):r.val();o.processDep(l,t.attr("id"),p,s,a)},processDep:function(d,r,i,o,l){var p,s,c,g,u,f=this,h=0,m={},v={depdrop_parents:i},y=n(l,i),b={},C=d.data("url"),x=d.data("placeholder"),D=d.data("loading"),T=d.data("loadingClass"),j=d.data("loadingText"),_=d.data("emptyMsg"),k=d.data("params");if(!t(k)){for(c=0;c<k.length;c++)g=k[c],u=e("#"+k[c]).val(),m[c]=u,b[g]=u;v={depdrop_parents:i,depdrop_params:m}}v.depdrop_all_params=e.extend(y,b),s={url:C,type:"post",data:v,dataType:"json",beforeSend:function(){d.trigger("depdrop.beforeChange",[r,e("#"+r).val(),o]),d.attr("disabled","disabled").html(""),D&&d.removeClass(T).addClass(T).html('<option id="">'+j+"</option>")},success:function(n){p=t(n.selected)?o===!1?null:o:n.selected,t(n)?a(d,"",_,""):(d.html(f.getSelect(n.output,x,p)),d.find("optgroup").length>0&&d.find('option[value=""]').attr("disabled","disabled"),0!==n.output.length&&d.val(p).removeAttr("disabled")),h=d.find("option").length,d.find('option[value=""]').length>0&&(h-=1),d.trigger("depdrop.change",[r,e("#"+r).val(),h,o])},error:function(){d.trigger("depdrop.error",[r,e("#"+r).val(),o])},complete:function(){D&&d.removeClass(T),d.trigger("depdrop.afterChange",[r,e("#"+r).val(),o])}},e.ajax(s)},getSelect:function(n,d,r){var i=this,o=e("<select>"),l=i.idParam,p=i.nameParam;return d!==!1&&a(o,"",d,r),t(n)&&(n={}),e.each(n,function(t,n){if(n[l])a(o,n[l],n[p],r);else{var d=e("<optgroup>",{label:t});e.each(n,function(e,t){a(d,t[l],t[p],r)}),d.appendTo(o)}}),o.html()}},e.fn.depdrop=function(t){var a=Array.apply(null,arguments);return a.shift(),this.each(function(){var n=e(this),r=n.data("depdrop"),i="object"==typeof t&&t;r||(r=new d(this,e.extend({},e.fn.depdrop.defaults,i,e(this).data())),n.data("depdrop",r)),"string"==typeof t&&r[t].apply(r,a)})},e.fn.depdrop.defaults={url:"",loading:!0,loadingClass:"kv-loading",loadingText:"Loading ...",placeholder:"Select ...",emptyMsg:"No data found",initialize:!1,idParam:"id",nameParam:"name",params:{}},e.fn.depdrop.Constructor=d,e(function(){e("select.depdrop").depdrop()})}(window.jQuery);