text: +function(a){"function"==typeof define&&define.amd?define("adcom/object",["jquery"],a):a(window.jQuery)}(function(a){"use strict";a.fn.selectn=function(a,b){var c;a=a.replace(/\[([-_\w]+)\]/g,".$1"),c=a.split(".");for(var d=b||(1,eval)("this"),e=c.length,f=0;e>f;f+=1)d&&(d=d[c[f]]);return d},a.deparam=function(b,c){var d={},e={"true":!0,"false":!1,"null":null};return a.each(b.replace(/\+/g," ").split("&"),function(b,f){var g,h=f.split("="),i=decodeURIComponent(h[0]),j=d,k=0,l=i.split("]["),m=l.length-1;if(/\[/.test(l[0])&&/\]$/.test(l[m])?(l[m]=l[m].replace(/\]$/,""),l=l.shift().split("[").concat(l),m=l.length-1):m=0,2===h.length)if(g=decodeURIComponent(h[1]),c&&(g=g&&!isNaN(g)?+g:"undefined"===g?void 0:void 0!==e[g]?e[g]:g),m)for(;m>=k;k++)i=""===l[k]?j.length:l[k],j=j[i]=m>k?j[i]||(l[k+1]&&isNaN(l[k+1])?{}:[]):g;else a.isArray(d[i])?d[i].push(g):d[i]=void 0!==d[i]?[d[i],g]:g;else i&&(d[i]=c?void 0:"")}),d}}),+function(a){"function"==typeof define&&define.amd?define("adcom/list",["jquery","adcom/object"],a):a(window.jQuery)}(function(a){"use strict";function b(c){var d=Array.prototype.slice.call(arguments,b.length);return this.each(function(){var b=a(this),f=b.data("ac.list"),g=a.extend({},e.DEFAULTS,b.data(),"object"==typeof c&&c);f||b.data("ac.list",f=new e(this,g)),"string"==typeof c?f[c].apply(f,d):"object"==typeof c&&f.updateOptions(c),"string"!=typeof c&&g.show&&!g.remote&&f.show()})}function c(b,c){return a.makeArray(b).concat(a.makeArray(a(b).parents())).reduce(function(b,d){return b?b:void 0!==a(d).data(c)?a(d):void 0},null)}function d(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"},c=function(a){return b[a]},d="(?:"+Object.getOwnPropertyNames(b).join("|")+")",e=RegExp(d),f=RegExp(d,"g");return a=null==a?"":""+a,e.test(a)?a.replace(f,c):a}var e=function(b,c){this.options=c,this.$element=a(b),this.$states=this.options.states,this.$rendered=[],this.$items="string"==typeof this.options.items?JSON.parse(this.options.items):this.options.items,this.template=this.parseTemplate(this.options.template),this.filters={},this.updateOptions({currentPage:this.options.currentPage,pageSize:this.options.pageSize,sort:this.options.sort,filters:this.options.filters}),this.setInitialState(),this.options.remote&&a.getJSON(this.options.remote,a.proxy(function(b){this.$items=b,this.options.show&&this.show(),this.$element.trigger(a.Event("loaded.ac.list",{items:b}))},this))};e.VERSION="0.1.0",e.TRIGGER_EVENTS=a.map("click keydown keypress keyup focus blur focusin focusout change select submit".split(" "),function(a){return a+".ac.list.data-api"}).join(" "),e.DEFAULTS={show:!0,selectedClass:"",locale:"en",sort:null,filters:{},states:[],items:[],currentPage:1},e.prototype.updateOptions=function(a){a.template&&(this.template=this.parseTemplate(a.template)),a.currentPage&&(this.currentPage=parseInt(a.currentPage)),a.pageSize&&(this.pageSize=parseInt(a.pageSize)),a.sort&&this.setSort(a.sort),a.filters&&this.setFilter(a.filters),a.items&&(this.$states=a.states||[],this.$rendered=[],this.$items="string"==typeof a.items?JSON.parse(a.items):a.items,this.show())},e.prototype.show=function(){this.$element.trigger("show.ac.list");var b=this.getCurrentItems();this.$element.empty(),this.$rendered=[],a.each(b,a.proxy(function(b,c){this.renderItem(c);a(this.$element).append(this.renderItem(c))},this)),this.$element.removeClass("loading"),this.$element.trigger(a.Event("shown.ac.list",{items:b}))},e.prototype.select=function(b){var c=this;b=a.map([b],function(a){return a}),a(b).each(function(a,b){c.changeState(b,!0)})},e.prototype.deselect=function(b){var c=this;b=a.map([b],function(a){return a}),a(b).each(function(a,b){c.changeState(b,!1)})},e.prototype.toggle=function(b){var c=this;b=a.map([b],function(a){return a}),a(b).each(function(b,d){var e="number"==typeof d?d:a(d).data("ac.list.index");c.changeState(d,c.$states[e]?!1:!0)})},e.prototype.changeState=function(b,c){if("number"==typeof b)var d=this.$items[b],e=b,f=a(this.$rendered[e]);else var f=a(b),d=f.data("ac.list.item"),e=f.data("ac.list.index");this.$element.trigger(a.Event("toggle.ac.list",{item:d,target:f,index:e,state:c})),this.$states[e]=c,f&&f[c?"addClass":"removeClass"](this.options.selectedClass),this.$element.trigger(a.Event("toggled.ac.list",{item:d,target:f,index:e,state:c}))},e.prototype.getSelected=function(){var b=[],c=this;return a.each(this.$items,function(a,d){c.$states[a]&&b.push(d)}),b},e.prototype.setInitialState=function(){var b=this;this.toggleFilter(a("[data-filter][data-target]").filter(".active, :checked")),a("[data-sort]").each(function(){var c=a(this);if(a(c.data("target"))[0]==b.$element[0]){var d=c.data("sort");c.hasClass("sort-ascending")&&b.setSort(d+".ascending"),c.hasClass("sort-descending")&&b.setSort(d+".descending")}})},e.prototype.parseTemplate=function(a){return"function"==typeof a?a:this.compileTemplate("string"==typeof a?a:d(this.$element.html()))},e.prototype.compileTemplate=function(a){return this.options.templateEngine?this.options.templateEngine(a):function(){return a}},e.prototype.getSort=function(b){if("function"==typeof b||null===b||void 0===b)return b;var c=[];a.each(b,function(a,b){var d=b.match(/\.des(c(end(ing)?)?)?$/)?-1:1;b=b.replace(/\.((des(c(end(ing)?)?)?)|(asc(end(ing)?)?)?)$/,""),c.push([b,d])});var d=function(a,b){return a.localeCompare(b)};return"undefined"!=typeof Intl&&(d=Intl.Collator(this.options.locale,{sensitivity:"base",numeric:!0,ignorePunctuation:!0}).compare),function(b,e){for(var f=0;f<c.length;f++){var g=c[f][0],h=c[f][1],i=a.fn.selectn(g,b),j=a.fn.selectn(g,e),k=String(("function"==typeof i?i():i)||""),l=String(("function"==typeof j?j():j)||"");return h*d(k,l)}return 0}},e.prototype.getFilter=function(b,c){if("function"==typeof c||void 0===c)return c;var d="string"==typeof b?b.split(/,\s*/):[b],e=new RegExp(c,"i");return function(b){var c=!1;return a.each(d,function(d,f){if(!c){var g=a.fn.selectn(f,b);"function"==typeof g&&(g=g()),String(g).match(e)&&(c=!0)}}),c}},e.prototype.setSort=function(b){"string"==typeof b&&(b=b.split(/,\s*/)),this.$element.trigger(a.Event("sortChange.ac.list",{fields:b})),this.sort=this.getSort(b),this.currentPage=1,this.$element.trigger(a.Event("sortChanged.ac.list",{fields:b,"function":this.sort}))},e.prototype.setFilter=function(b,c){return"object"==typeof b?a.each(b,a.proxy(function(a,b){this.setFilter(a,b)},this)):(this.$element.trigger(a.Event("filterChange.ac.list",{key:b,filter:c})),void 0===c?delete this.filters[b]:this.filters[b]=this.getFilter(b,c),this.currentPage=1,void this.$element.trigger(a.Event("filterChanged.ac.list",{key:b,filter:c,"function":this.filters[b]})))},e.prototype.setCurrentPage=function(b){b=parseInt(b),this.$element.trigger(a.Event("pageChange.ac.list",{page:b})),this.currentPage=b,this.$element.trigger(a.Event("pageChanged.ac.list",{page:this.currentPage}))},e.prototype.getCurrentItems=function(){var a=this.$items.slice(0);return this.filters&&Object.keys(this.filters).length&&(a=this.getFilteredItems(a)),this.sort&&(a=this.getSortedItems(a)),a=this.getPaginatedItems(a)},e.prototype.getFilteredItems=function(b){var c=this;if(!a.isEmptyObject(this.filters)){var d=[];return a.each(b,function(b,e){var f=!0;a.each(c.filters,function(a,b){f&&b(e)||(f=!1)}),f&&d.push(e)}),d}return b},e.prototype.getSortedItems=function(a){return this.sort?a.sort(this.sort):a},e.prototype.getPaginatedItems=function(b){var c=b.length,d=this.pageSize||c,e=Math.ceil(c/d),f=(this.currentPage-1)*d,g=f+d,h=Math.min(f+1,c),i=Math.min(g,c);return b=b.slice(f,g),this.$element.trigger(a.Event("paginated.ac.list",{page:this.currentPage,pages:e,count:c,items:b,start:h,end:i})),b},e.prototype.renderItem=function(b){var c=b,d=this.$items.indexOf(b),e=a(this.template(c)),f=a.grep(a.makeArray(e),function(a){return-1==[1,3,11].indexOf(a.nodeType)?!1:3==a.nodeType&&a.nodeValue.match(/^\s*$/)?!1:!0}),g=f[0];f.length>1&&(g=a("<div>"),f.forEach(function(a){g.append(a)})),this.$states[d]&&a(g).addClass(this.options.selectedClass);var h=void 0===a(g).data("field")?a(g).find("[data-field]"):a(g);return h.each(function(b,d){var e=a(d).attr("data-field"),f="function"!=typeof c[e]?c[e]:c[e]();a(d).html(String(f||""))}),a(g).data("ac.list.item",c),a(g).data("ac.list.index",d),a(g).on("update.ac.list",a.proxy(function(b){this.update(a(g),b.item)},this)),this.$rendered[d]=g,g},e.prototype.getItemIndex=function(b){return"number"==typeof b?b:a(b)[0]instanceof HTMLElement?a(b).data("ac.list.index"):this.$items.indexOf(b)},e.prototype.add=function(a,b){b=void 0==b?this.$items.length:b,this.$items.splice(b,0,a),this.$states.splice(b,0,void 0),this.$rendered.splice(b,0,void 0),this.show()},e.prototype.update=function(b,c){var d=this.getItemIndex(b);if(-1==d)throw"Item not found in List, and could not be updated.";if(this.$items[d]=c,this.$rendered[d]){var e=a(this.$rendered[d]),f=this.renderItem(c);e.replaceWith(f),this.$rendered[d]=f[0]}this.show()},e.prototype["delete"]=function(a){var b=this.getItemIndex(a);if(-1==b)throw"Item not found in List, and could not be deleted.";this.$items.splice(b,1),this.$states.splice(b,1),this.$rendered.splice(b,1),this.show()},e.prototype.destroy=function(){this.$element.off(".ac.list").removeData("ac.list"),this.$element.empty(),this.$states=this.$rendered=[]},e.prototype.toggleSort=function(b){var c=this;b.each(function(){var b=a(this),d=(a(b.data("target")),b.data("sort")),e=(b.data("states")||"ascending,descending").split(/,\s*/),f=((b.attr("class")||"").match(/(?:^|\s)sort-(ascending|descending)/)||[])[1],g=e.indexOf(f),h=e[(g+1)%e.length];a('[data-sort][data-target="'+b.data("target")+'"]').removeClass("sort-ascending sort-descending"),"off"===h?c.setSort(null):(b.addClass("sort-"+h),c.setSort(d+"."+h))})},e.prototype.toggleFilter=function(b){var c=this;b.each(function(){var b=a(this),d=a(b.data("target"));if(d[0]===c.$element[0]){var e=b.attr("data-filter"),f=b.attr("data-pattern");b.is(":checkbox")&&b.is(":not(:checked)")?f=void 0:!f&&b.is(":input")&&b.is(":checkbox:checked, :not(:checkbox)")&&(f=b.val()),f||(f=void 0),c.setFilter(e,f)}})};var f=a.fn.list;a.fn.list=b,a.fn.list.Constructor=e,a.fn.list.noConflict=function(){return a.fn.list=f,this},a(document).on("click.ac.list.data-api",'[data-toggle="select"]',function(){var d=a(this).closest('[data-toggle="select"]'),e=c(d,"ac.list.item"),f=c(d,"ac.list");b.call(f,"toggle",e)}),a(document).on("click.ac.list.data-api","[data-sort]",function(c){var d=a(this).closest("[data-sort]"),e=a(d.data("target"));d.is("a")&&c.preventDefault(),b.call(e,"toggleSort",d),b.call(e,"show")}),a(document).on(e.TRIGGER_EVENTS,"[data-filter]",function(c){var d=a(this).closest("[data-filter]"),e=a(d.data("target")),f=d.is(":input")?"change":"click",g=(d.attr("data-trigger")||f).split(" ");-1!=g.indexOf(c.type)&&(d.is("a")&&"click"===c.type&&c.preventDefault(),b.call(e,"toggleFilter",d),b.call(e,"show"))}),a(document).on("click.ac.list.data-api","[data-page]",function(c){var d=a(this).closest("[data-page]"),e=a(d.data("target"));d.is("a")&&c.preventDefault(),b.call(e,"setCurrentPage",d.data("page")),b.call(e,"show")})}),+function(a){"function"==typeof define&&define.amd?define("adcom/form",["jquery","adcom/object"],a):a(window.jQuery)}(function(a){"use strict";function b(c){var d=Array.prototype.slice.call(arguments,b.length);return this.each(function(){var b=a(this),f=b.data("ac.form"),g=a.extend({},e.DEFAULTS,b.data(),"object"==typeof c&&c);f||b.data("ac.form",f=new e(this,g)),"string"==typeof c?f[c].apply(f,d):g.show&&void 0!==g.serialized&&f.show("string"===g.serialized?JSON.parse(g.serialized):g.serialized,d[0]||{})})}function c(b,c){return a.makeArray(b).concat(a.makeArray(a(b).parents())).reduce(function(b,d){return b?b:void 0!==a(d).data(c)?a(d):void 0},null)}function d(){var a=!1,b=document.createElement("form");return"checkValidity"in b&&"addEventListener"in b?"reportValidity"in b?!0:(b.style.cssText="position: absolute; top: -99999em;",b.addEventListener("submit",function(a){window.opera||a.preventDefault(),a.stopPropagation()},!1),b.innerHTML='<input name="test" required><button></button>',document.body.appendChild(b),b.getElementsByTagName("input")[0].addEventListener("invalid",function(b){a=!0,b.preventDefault(),b.stopPropagation()},!1),b.getElementsByTagName("button")[0].click(),document.body.removeChild(b),a):!1}var e=function(b,c){this.options=c,this.$element=a(b),("undefined"==typeof this.$element.attr("data-original-novalidate")||null===this.$element.attr("data-original-novalidate"))&&this.$element.attr("data-original-novalidate","undefined"!=typeof this.$element.attr("novalidate")&&this.$element.attr("novalidate")!==!1),this.$element.attr("novalidate",""),this.$validate=!this.$element.data("original-novalidate"),this.$nativeValidation=d(),this.muteInvalidInput=!1,this.$displayNativeValidation=a('<input style="display: none;" type="submit" onsubmit="return false;">'),this.$element.append(this.$displayNativeValidation)};e.VERSION="0.1.0",e.DEFAULTS={show:!0,action:!0},e.prototype.show=function(b,c,d){c=c||{};var e=a.Event("show.ac.form",{serialized:b,sourceData:this.sourceData,sourceElement:this.sourceElement,relatedTarget:d});this.$element.trigger(e),e.isDefaultPrevented()||(this.$element[0].reset(),this.$element.find(":input[name]").each(function(c,d){var e=d.name||a(d).attr("name"),f=a.fn.selectn(e,b);/^(?:radio|checkbox)$/i.test(d.type)?f==d.value&&(d.checked=!0):a(d).val(f)}),this.sourceElement=c.sourceElement,this.sourceData=c.sourceData,a(this.$element[0]).one("reset",a.proxy(function(){this.sourceElement=this.sourceData=null},this)),this.$element.trigger(a.Event("shown.ac.form",{serialized:b,sourceData:this.sourceData,sourceElement:this.sourceElement,relatedTarget:d})))},e.prototype.serialize=function(){return{array:this.$element.serializeArray(),object:a.deparam(this.$element.serialize())}},e.prototype.validate=function(b){var c=this;if(this.$validate){var d=a.Event("validate.ac.form",this.serialize());if(this.$element.trigger(d),!d.isDefaultPrevented()){this.muteInvalidInput=!0;var e=this.$element[0].checkValidity();this.muteInvalidInput=!1,e||(this.invalid(),b&&(b.preventDefault(),b.stopImmediatePropagation())),setTimeout(function(){c.$element.trigger(a.Event("validated.ac.form",{isValid:e}))})}}},e.prototype.invalid=function(){var b=this,c=a.Event("invalid.ac.form",{nativeValidation:this.$nativeValidation});return this.$element.trigger(c),c.isDefaultPrevented()?void 0:this.$nativeValidation?void setTimeout(function(){b.$element.removeAttr("novalidate"),b.$displayNativeValidation.click(),b.$element.attr("novalidate","")},0):this.$element[0].checkValidity()},e.prototype.addEventAttributes=function(b){a.extend(b,this.serialize(),{relatedTarget:this.$element,sourceElement:this.sourceElement,sourceData:this.sourceData})},e.prototype.destroy=function(){this.$element.off(".ac.form").removeData("ac.form"),this.$validate?this.$element.removeAttr("novalidate"):this.$element.attr("novalidate","")};var f=a.fn.form;a.fn.form=b,a.fn.form.Constructor=e,a.fn.form.noConflict=function(){return a.fn.form=f,this},a.event.special.submit={add:function(b){var c,d=b.handler;b.handler=function(b){var e=b.originalEvent||b;return(c=a(this).data("ac.form"))&&(e._validated||c.validate(b),b._addedAttributes||c.addEventAttributes(b),e._validated=b._addedAttributes=!0),b.isImmediatePropagationStopped()?void 0:d.apply(this,arguments)}}},a.event.special.invalid={add:function(b){var c,d=b.handler;b.handler=function(b){if(a(this).is(":input")&&(c=a(this).closest("form").data("ac.form"))){if(c.muteInvalidInput)return;b.nativeValidation=c.$nativeValidation}return d.apply(this,arguments)}}},a(document).on("click.ac.form.data-api",'[data-toggle="form"]',function(){var d=a(a(this).closest('[data-toggle="form"]')[0]),e=a(a(d.data("target"))[0]),f=d.data("source")||"serialized",g=c(d,f);if(g){var h=g.data(f);"string"===h?JSON.parse(h):h,e.form({show:!1}),b.call(e,"show",h,{sourceElement:g.clone(!0,!1),sourceData:h},d[0])}}),a(document).on("submit.ac.form.data-api","form",function(c){var d=a(this),e=d.data("ac.form")||b.call(d).data("ac.form");e.options.action||c.preventDefault()})}),+function(a){"function"==typeof define&&define.amd?define("adcom/session",["jquery"],a):window.Session=a(window.jQuery)}(function(a){"use strict";var b=function(c){if(this.options=a.extend({},b.DEFAULTS,c),this.$key=this.options.key,!this.$key)throw"Session cannot be initialized without a key (options.key)";this.$storage=this.options.persistent===!0?window.localStorage:window.sessionStorage,this.data=this.fetchSession()};return b.VERSION="0.1.0",b.DEFAULTS={persistent:!1,namespace:null},b.prototype.set=function(a,b){this.options.namespace&&(a=this.options.namespace+"."+b),this.data[a]=b,this.saveSession()},b.prototype.get=function(a){return this.options.namespace&&(a=this.options.namespace+"."+value),this.data[a]},b.prototype.fetchSession=function(){return this.$storage?JSON.parse(this.$storage.getItem(this.$key)||"{}"):{}},b.prototype.saveSession=function(){if(this.$storage)try{this.$storage.setItem(this.$key,JSON.stringify(this.data))}catch(a){console.log("unable to save session",a)}},b.prototype.removeSession=function(){this.$storage&&this.$storage.removeItem(this.$key)},b}),+function(a){"function"==typeof define&&define.amd?define("adcom/persist",["jquery"],a):a(window.jQuery)}(function(a){"use strict";function b(a,c,d){if(d=d||[],0==a.childNodes.length&&a!=c)return!1;if(a==c)return!0;for(var e=0;e<a.childNodes.length;e++){var f=a.childNodes[e];if(b(f,c,d)!==!1)return d.unshift(e),d}}function c(b){var e=Array.prototype.slice.call(arguments,c.length);return this.each(function(){var c=a(this),f=c.data("ac.persist");"object"==typeof b&&b&&f&&(f=!1);var g=a.extend({},d.DEFAULTS,c.data(),f&&f.options,"object"==typeof b&&b);f||c.data("ac.persist",f=new d(this,g)),"string"==typeof b&&f[b].apply(f,e)})}var d=function(b,c){this.options=c,this.$element=a(b),this.$key=this.options.key||this.$element.attr("id"),this.observations={},this.filters={}};d.VERSION="0.1.0",d.DEFAULTS={key:null},d.prototype.attributes=function(b,c){var d=this;b="string"==typeof b?b.split(/[,\s]+/):b,c="string"==typeof c?c.split(/[,\s]+/):c,b.forEach(function(b){var e={element:d.$key,type:"attributes",path:b};d.filters[e]=c;var f=a.Event("add.ac.persist",{key:e});if(d.$element.trigger(f),!f.isDefaultPrevented()){var g=new MutationObserver(function(f){f.forEach(function(f){var g=d.$element[0].getAttribute(b);c&&(g=a.unique(a.grep(g.split(/[,\s]+/),function(a){return c.indexOf(a)>-1})).join(" "));var h=a.Event("mutation.ac.persist",{key:e,mutation:f,value:g});d.$element.trigger(h)})}),f=a.Event("added.ac.persist",{key:e});d.$element.trigger(f);var h=a.extend({},d.options,{attributes:!0,attributeFilter:[b]});g.observe(d.$element[0],h),d.observations[e]&&d.observations[e].disconnect(),d.observations[e]=g}})},d.prototype.attribute=d.prototype.attributes,d.prototype.characterData=function(){var c=this,d={element:this.$key,type:"characterData"},e=a.Event("add.ac.persist",{key:d});if(this.$element.trigger(e),!e.isDefaultPrevented()){var f=new MutationObserver(function(e){e.forEach(function(e){var f=b(c.$element[0],e.target),g=e.target.data,h=a.Event("mutation.ac.persist",{mutation:e,value:g,key:a.extend({path:f.join(".")},d)});c.$element.trigger(h)})}),e=a.Event("added.ac.persist",{key:d});this.$element.trigger(e);var g=a.extend({},this.options,{characterData:!0,subtree:!0});f.observe(c.$element[0],g),c.observations[d]&&c.observations[d].disconnect(),c.observations[d]=f}},d.prototype.update=function(b,c){switch(b.type){case"attributes":var d=this.filters[b];if(d){var e=this.$element[0].getAttribute(b.path).split(/[,\s]+/),f=c.split(/[,\s]+/),g=a.grep(e,function(a){return d.indexOf(a)<0});g=a.unique(a.merge(g,f)),c=g.join(" ")}this.$element.attr(b.path,c);break;case"characterData":var h=this.$element[0];b.path.split(".").forEach(function(a){h=h.childNodes[a]}),window.node=h,h.replaceData(0,h.length,c)}};var e=a.fn.persist;return a.fn.persist=c,a.fn.persist.Constructor=d,a.fn.persist.noConflict=function(){return a.fn.persist=e,this},d}),+function(a){"function"==typeof define&&define.amd?define("adcom/message",["jquery"],a):a(window.jQuery)}(function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("ac.message");"object"==typeof b&&b&&f&&(f=!1);var g=a.extend({},c.DEFAULTS,e.data(),f&&f.options,"object"==typeof b&&b);f||e.data("ac.message",f=new c(e,g)),"string"==typeof b&&f[b](d),a.extend(f.options,g),g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$element=a(b)[0]==document?a('<div class="message fade '+this.options["class"]+'">').appendTo("body"):a(b),this.$body=a(document.body),this.isShown=null,this.$element.on("click.dismiss.ac.message",'[data-dismiss="message"]',a.proxy(this.hide,this))};c.VERSION="0.1.0",c.TRANSITION_DURATION=300,c.DEFAULTS={show:!0,html:!1,dismiss:!0,"class":""},c.prototype.show=function(b){var d=this,e=a.Event("show.ac.message",{relatedTarget:b});if(this.$element.trigger(e),!this.isShown&&!e.isDefaultPrevented()){this.$body.trigger("click.dismiss.ac.message");var f=this.$element.is(":visible")?c.TRANSITION_DURATION:0,g=a.support.transition&&this.$element.hasClass("fade");this.isShown=!0,this.$element.parent().length||this.$element.appendTo(this.$body),this.options.content&&this.$element.children().detach().end()[this.options.html?"string"==typeof this.options.content?"html":"append":"text"](this.options.content),setTimeout(function(){d.$element.show().scrollTop(0),g&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.options.expire&&d.options.expire>0&&(d.expireTimeout=setTimeout(a.proxy(d.hide,d),d.options.expire)),d.options.dismiss&&(d.$body.one("click.dismiss.ac.message",function(){d.hide()}),d.$element.on("click.ac.message",function(a){a.stopPropagation()}));var c=a.Event("shown.ac.message",{relatedTarget:b});d.$element.trigger(c)},f)}},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.ac.message"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$element.addClass("out").removeClass("in"),this.$body.off("click.dismiss.ac.message"),this.expireTimeout&&(clearTimeout(this.expireTimeout),this.expireTimeout=null),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideMessage,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideMessage())},c.prototype.hideMessage=function(){this.isShown||this.$element.hide(),this.$element.removeClass("out").trigger("hidden.ac.message")};var d=a.fn.message;a.fn.message=b,a.fn.message.Constructor=c,a.fn.message.noConflict=function(){return a.fn.message=d,this},a(document).on("click.ac.message.data-api",'[data-toggle="message"]',function(c){var d=a(this),e=a(d.attr("data-target")||document),f=a.extend({},e.data(),d.data());d.is("a")&&c.preventDefault(),b.call(e,f,this)})}),+function(a){"function"==typeof define&&define.amd&&define("adcom",["adcom/list","adcom/form","adcom/message","adcom/persist","adcom/session"],a)}(function(){"use strict"});