1/* Minification failed. Returning unminified contents. 2(465,9-10): run-time error JS1010: Expected identifier: . 3(465,9-10): run-time error JS1195: Expected expression: . 4(631,11-12): run-time error JS1010: Expected identifier: . 5(631,11-12): run-time error JS1195: Expected expression: . 6 */ 7/*! 8 * Bootstrap v3.3.6 (http://getbootstrap.com) 9 * Copyright 2011-2015 Twitter, Inc. 10 * Licensed under the MIT license 11 */�
vendor: 32,004 bytes, lines 11-12
11 12if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
vendor: 2,455 bytes, lines 12-13
12 13d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
vendor: 4,338 bytes, lines 13-73
13e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);; 14var LVWControllers = angular.module('LVWControllers', []); 15 16var LVWDirectives = angular.module('LVWDirectives', []); 17 18var LVWServices = angular.module('LVWServices', []); 19 20var LVWFilters = angular.module('LVWFilters', []); 21 22var app = angular.module('LVWApp', 23 ['LVWControllers', 24 'LVWDirectives', 25 'LVWServices', 26 'LVWFilters', 27 'ui.bootstrap', 28 'ui.bootstrap.datetimepicker', 29 'ui.dateTimeInput', 30 'ngSanitize' 31 ]); 32 33 34app.run(['$rootScope', function ($rootScope) { 35 //Setup any rootscope variables here. 36 37 $rootScope.getPacificTimeZone = function (date) { 38 return moment.tz(date, "America/Los_Angeles").format('z');; 39 }; 40 41}]); 42 43 44 45; 46 47LVWServices.factory('ApostilleCountriesService', ['$http', function ($http) { 48 var getApostilleCountriesList = function (success, error) { 49 return apostilleList = [ 50 { name: 'Albania', code: 'AL' }, 51 { name: 'American Samoa', code: 'AS' }, 52 { name: 'Andorra', code: 'AD' }, 53 { name: 'Antigua and Barbuda', code: 'AG' }, 54 { name: 'Argentina', code: 'AR' }, 55 { name: 'Armenia', code: 'AM' }, 56 { name: 'Australia', code: 'AU' }, 57 { name: 'Austria', code: 'AT' }, 58 { name: 'Azerbaijan', code: 'AZ' }, 59 { name: 'Bahamas', code: 'BS' }, 60 { name: 'Bahrain', code: 'BH' }, 61 { name: 'Barbados', code: 'BB' }, 62 { name: 'Belarus', code: 'BY' }, 63 { name: 'Belgium', code: 'BE' }, 64 { name: 'Belize', code: 'BZ' }, 65 { name: 'Bolivia', code: 'BO' }, 66 { name: 'Bosnia and Herzegovina', code: 'BA' }, 67 { name: 'Botswana', code: 'BW' }, 68 { name: 'Brazil', code: 'BR' }, 69 { name: 'Brunei Darussalam', code: 'BN' }, 70 { name: 'Bulgaria', code: 'BG' }, 71 { name: 'Burundi', code: 'BI' }, 72 { name: 'Canada', code: 'CA' }, 73 { name: 'Cape Verde', code: 'CV' },
74 { name: 'Chile', code: 'CL' }, 75 { name: 'China', code: 'CN' }, 76 { name: 'Colombia', code: 'CO' }, 77 { name: 'Cook Islands', code: 'CK' }, 78 { name: 'Costa Rica', code: 'CR' }, 79 { name: 'Croatia', code: 'HR' }, 80 { name: 'Cyprus', code: 'CY' }, 81 { name: 'Czech Republic', code: 'CZ' }, 82 { name: 'Denmark', code: 'DK' }, 83 { name: 'Dominica', code: 'DM' }, 84 { name: 'Dominican Republic', code: 'DO' }, 85 { name: 'Ecuador', code: 'EC' }, 86 { name: 'El Salvador', code: 'SV' }, 87 { name: 'Estonia', code: 'EE' }, 88 { name: 'Fiji', code: 'FJ' }, 89 { name: 'Finland', code: 'FI' }, 90 { name: 'France', code: 'FR' }, 91 { name: 'Georgia', code: 'GE' }, 92 { name: 'Germany', code: 'DE' }, 93 { name: 'Greece', code: 'GR' }, 94 { name: 'Grenada', code: 'GD' }, 95 { name: 'Guatemala', code: 'GT' }, 96 { name: 'Guyana', code: 'GY' }, 97 { name: 'Honduras', code: 'HN' }, 98 { name: 'Hong Kong', code: 'HK' }, 99 { name: 'Hungary', code: 'HU' }, 100 { name: 'Iceland', code: 'IS' }, 101 { name: 'India', code: 'IN' }, 102 { name: 'Indonesia', code: 'ID' }, 103 { name: 'Ireland', code: 'IE' }, 104 { name: 'Israel', code: 'IL' }, 105 { name: 'Italy', code: 'IT' }, 106 { name: 'Jamaica', code: 'JM' }, 107 { name: 'Japan', code: 'JP' }, 108 { name: 'Kazakhstan', code: 'KZ' }, 109 { name: 'Korea, Republic of', code: 'KR' }, 110 { name: 'Kosovo', code: 'KV' }, 111 { name: 'Kyrgyzstan', code: 'KG' }, 112 { name: 'Latvia', code: 'LV' }, 113 { name: 'Lesotho', code: 'LS' }, 114 { name: 'Liberia', code: 'LR' }, 115 { name: 'Liechtenstein', code: 'LI' }, 116 { name: 'Lithuania', code: 'LT' }, 117 { name: 'Luxembourg', code: 'LU' }, 118 { name: 'Malawi', code: 'MW' }, 119 { name: 'Malta', code: 'MT' }, 120 { name: 'Marshall Islands', code: 'MH' }, 121 { name: 'Mauritius', code: 'MU' }, 122 { name: 'Mexico', code: 'MX' }, 123 { name: 'Moldova, Republic of', code: 'MD' }, 124 { name: 'Monaco', code: 'MC' }, 125 { name: 'Mongolia', code: 'MN' }, 126 { name: 'Montenegro', code: 'MNE' }, 127 { name: 'Morocco', code: 'MA' }, 128 { name: 'Namibia', code: 'NA' }, 129 { name: 'Netherlands', code: 'NL' }, 130 { name: 'New Zealand', code: 'NZ' }, 131 { name: 'Nicaragua', code: 'NI' }, 132 { name: 'Niue', code: 'NU' }, 133 { name: 'Northern Ireland', code: 'NIR' }, 134 { name: 'North Macedonia, Republic of ', code: 'MK' }, 135 { name: 'Norway', code: 'NO' }, 136 { name: 'Oman', code: 'OM' }, 137 { name: 'Pakistan', code: 'PK' }, 138 { name: 'Palau', code: 'PW' }, 139 { name: 'Panama', code: 'PA' }, 140 { name: 'Paraguay', code: 'PY' }, 141 { name: 'Peru', code: 'PE' }, 142 { name: 'Philippines', code: 'PH' }, 143 { name: 'Poland', code: 'PL' }, 144 { name: 'Portugal', code: 'PT' }, 145 { name: 'Romania', code: 'RO' }, 146 { name: 'Russian Federation', code: 'RU' }, 147 { name: 'Rwanda', code: 'RW' }, 148 { name: 'Saint Kitts and Nevis', code: 'KN' }, 149 { name: 'Saint Lucia', code: 'LC' }, 150 { name: 'Saint Vincent and the Grenadines', code: 'VC' }, 151 { name: 'Samoa', code: 'WS' }, 152 { name: 'San Marino', code: 'SM' }, 153 { name: 'Sao Tome and Principe', code: 'ST' }, 154 { name: 'Saudi Arabia', code: 'SA' }, 155 { name: 'Senegal', code: 'SN' }, 156 { name: 'Serbia', code: 'CS' }, 157 { name: 'Seychelles', code: 'SC' }, 158 { name: 'Singapore', code: 'SG' }, 159 { name: 'Slovakia', code: 'SK' }, 160 { name: 'Slovenia', code: 'SI' }, 161 { name: 'South Africa', code: 'ZA' }, 162 { name: 'Spain', code: 'ES' }, 163 { name: 'Sri Lanka', code: 'LK' }, 164 { name: 'Sudan', code: 'SD' }, 165 { name: 'Suriname', code: 'SR' }, 166 { name: 'Swaziland', code: 'SZ' }, 167 { name: 'Sweden', code: 'SE' }, 168 { name: 'Switzerland', code: 'CH' }, 169 { name: 'Tajikistan', code: 'TJ' }, 170 { name: 'Tonga', code: 'TO' }, 171 { name: 'Trinidad and Tobago', code: 'TT' }, 172 { name: 'Tunisia', code: 'TN' }, 173 { name: 'Turkey', code: 'TR' }, 174 { name: 'Ukraine', code: 'UA' }, 175 { name: 'United Kingdom', code: 'GB' }, 176 { name: 'Uruguay', code: 'UY' }, 177 { name: 'Uzbekistan', code: 'UZ' }, 178 { name: 'Vanuatu', code: 'VU' }, 179 { name: 'Venezuela', code: 'VE' } 180 ]; 181 }; 182 183 return { 184 getApostilleCountriesList 185 }; 186}]); 187 188 189 190; 191 192LVWServices.factory('CountriesService', ['$http', function ($http) { 193 194 195 var getCountries = function (success, error) { 196 return countriesObj = [ 197 { name: 'Afghanistan', code: 'AF' }, 198 { name: 'Aland Islands', code: 'AX' }, 199 { name: 'Albania', code: 'AL' }, 200 { name: 'Algeria', code: 'DZ' }, 201 { name: 'American Samoa', code: 'AS' }, 202 { name: 'Andorra', code: 'AD' }, 203 { name: 'Angola', code: 'AO' }, 204 { name: 'Anguilla', code: 'AI' }, 205 { name: 'Antarctica', code: 'AQ' }, 206 { name: 'Antigua and Barbuda', code: 'AG' }, 207 { name: 'Argentina', code: 'AR' }, 208 { name: 'Armenia', code: 'AM' }, 209 { name: 'Aruba', code: 'AW' }, 210 { name: 'Australia', code: 'AU' }, 211 { name: 'Austria', code: 'AT' }, 212 { name: 'Azerbaijan', code: 'AZ' }, 213 { name: 'Bahamas', code: 'BS' }, 214 { name: 'Bahrain', code: 'BH' }, 215 { name: 'Bangladesh', code: 'BD' }, 216 { name: 'Barbados', code: 'BB' }, 217 { name: 'Belarus', code: 'BY' },
218 { name: 'Belgium', code: 'BE' }, 219 { name: 'Belize', code: 'BZ' }, 220 { name: 'Benin', code: 'BJ' }, 221 { name: 'Bermuda', code: 'BM' }, 222 { name: 'Bhutan', code: 'BT' }, 223 { name: 'Bolivia', code: 'BO' }, 224 { name: 'Bosnia and Herzegovina', code: 'BA' }, 225 { name: 'Botswana', code: 'BW' }, 226 { name: 'Bouvet Island', code: 'BV' }, 227 { name: 'Brazil', code: 'BR' }, 228 { name: 'British Indian Ocean Territory', code: 'IO' }, 229 { name: 'Brunei Darussalam', code: 'BN' }, 230 { name: 'Bulgaria', code: 'BG' }, 231 { name: 'Burkina Faso', code: 'BF' }, 232 { name: 'Burundi', code: 'BI' }, 233 { name: 'Cambodia', code: 'KH' }, 234 { name: 'Cameroon', code: 'CM' }, 235 { name: 'Canada', code: 'CA' }, 236 { name: 'Cape Verde', code: 'CV' }, 237 { name: 'Cayman Islands', code: 'KY' }, 238 { name: 'Central African Republic', code: 'CF' }, 239 { name: 'Chad', code: 'TD' }, 240 { name: 'Chile', code: 'CL' }, 241 { name: 'China', code: 'CN' }, 242 { name: 'Christmas Island', code: 'CX' }, 243 { name: 'Cocos (Keeling) Islands', code: 'CC' }, 244 { name: 'Colombia', code: 'CO' }, 245 { name: 'Comoros', code: 'KM' }, 246 { name: 'Congo', code: 'CG' }, 247 { name: 'Congo, The Democratic Republic of the', code: 'CD' }, 248 { name: 'Cook Islands', code: 'CK' }, 249 { name: 'Costa Rica', code: 'CR' }, 250 { name: 'Cote DIvoire', code: 'CI' }, 251 { name: 'Croatia', code: 'HR' }, 252 { name: 'Cuba', code: 'CU' }, 253 { name: 'Cyprus', code: 'CY' }, 254 { name: 'Czech Republic', code: 'CZ' }, 255 { name: 'Denmark', code: 'DK' }, 256 { name: 'Djibouti', code: 'DJ' }, 257 { name: 'Dominica', code: 'DM' }, 258 { name: 'Dominican Republic', code: 'DO' }, 259 { name: 'Ecuador', code: 'EC' }, 260 { name: 'Egypt', code: 'EG' }, 261 { name: 'El Salvador', code: 'SV' }, 262 { name: 'Equatorial Guinea', code: 'GQ' }, 263 { name: 'Eritrea', code: 'ER' }, 264 { name: 'Estonia', code: 'EE' }, 265 { name: 'Ethiopia', code: 'ET' }, 266 { name: 'Falkland Islands (Malvinas)', code: 'FK' }, 267 { name: 'Faroe Islands', code: 'FO' }, 268 { name: 'Fiji', code: 'FJ' }, 269 { name: 'Finland', code: 'FI' }, 270 { name: 'France', code: 'FR' }, 271 { name: 'French Guiana', code: 'GF' }, 272 { name: 'French Polynesia', code: 'PF' }, 273 { name: 'French Southern Territories', code: 'TF' }, 274 { name: 'Gabon', code: 'GA' }, 275 { name: 'Gambia', code: 'GM' }, 276 { name: 'Georgia', code: 'GE' }, 277 { name: 'Germany', code: 'DE' }, 278 { name: 'Ghana', code: 'GH' }, 279 { name: 'Gibraltar', code: 'GI' }, 280 { name: 'Greece', code: 'GR' }, 281 { name: 'Greenland', code: 'GL' }, 282 { name: 'Grenada', code: 'GD' }, 283 { name: 'Guadeloupe', code: 'GP' }, 284 { name: 'Guam', code: 'GU' }, 285 { name: 'Guatemala', code: 'GT' }, 286 { name: 'Guernsey', code: 'GG' }, 287 { name: 'Guinea', code: 'GN' }, 288 { name: 'Guinea-Bissau', code: 'GW' }, 289 { name: 'Guyana', code: 'GY' }, 290 { name: 'Haiti', code: 'HT' }, 291 { name: 'Heard Island and Mcdonald Islands', code: 'HM' }, 292 { name: 'Holy See (Vatican City State)', code: 'VA' }, 293 { name: 'Honduras', code: 'HN' }, 294 { name: 'Hong Kong', code: 'HK' }, 295 { name: 'Hungary', code: 'HU' }, 296 { name: 'Iceland', code: 'IS' }, 297 { name: 'India', code: 'IN' }, 298 { name: 'Indonesia', code: 'ID' },
299 { name: 'Iran, Islamic Republic Of', code: 'IR' }, 300 { name: 'Iraq', code: 'IQ' }, 301 { name: 'Ireland', code: 'IE' }, 302 { name: 'Isle of Man', code: 'IM' }, 303 { name: 'Israel', code: 'IL' }, 304 { name: 'Italy', code: 'IT' }, 305 { name: 'Jamaica', code: 'JM' }, 306 { name: 'Japan', code: 'JP' }, 307 { name: 'Jersey', code: 'JE' }, 308 { name: 'Jordan', code: 'JO' }, 309 { name: 'Kazakhstan', code: 'KZ' }, 310 { name: 'Kenya', code: 'KE' }, 311 { name: 'Kiribati', code: 'KI' }, 312 { name: 'Korea, Democratic People\'s Republic of', code: 'KP' }, 313 { name: 'Korea, Republic of', code: 'KR' }, 314 { name: 'Kuwait', code: 'KW' }, 315 { name: 'Kyrgyzstan', code: 'KG' }, 316 { name: 'Lao People\'s Democratic Republic', code: 'LA' }, 317 { name: 'Latvia', code: 'LV' }, 318 { name: 'Lebanon', code: 'LB' }, 319 { name: 'Lesotho', code: 'LS' }, 320 { name: 'Liberia', code: 'LR' }, 321 { name: 'Libyan Arab Jamahiriya', code: 'LY' }, 322 { name: 'Liechtenstein', code: 'LI' }, 323 { name: 'Lithuania', code: 'LT' }, 324 { name: 'Luxembourg', code: 'LU' }, 325 { name: 'Macao', code: 'MO' }, 326 { name: 'Macedonia, The Former Yugoslav Republic of', code: 'MK' }, 327 { name: 'Madagascar', code: 'MG' }, 328 { name: 'Malawi', code: 'MW' }, 329 { name: 'Malaysia', code: 'MY' }, 330 { name: 'Maldives', code: 'MV' }, 331 { name: 'Mali', code: 'ML' }, 332 { name: 'Malta', code: 'MT' }, 333 { name: 'Marshall Islands', code: 'MH' }, 334 { name: 'Martinique', code: 'MQ' }, 335 { name: 'Mauritania', code: 'MR' }, 336 { name: 'Mauritius', code: 'MU' }, 337 { name: 'Mayotte', code: 'YT' }, 338 { name: 'Mexico', code: 'MX' }, 339 { name: 'Micronesia, Federated States of', code: 'FM' }, 340 { name: 'Moldova, Republic of', code: 'MD' }, 341 { name: 'Monaco', code: 'MC' }, 342 { name: 'Mongolia', code: 'MN' }, 343 { name: 'Montserrat', code: 'MS' }, 344 { name: 'Morocco', code: 'MA' }, 345 { name: 'Mozambique', code: 'MZ' }, 346 { name: 'Myanmar', code: 'MM' }, 347 { name: 'Namibia', code: 'NA' }, 348 { name: 'Nauru', code: 'NR' }, 349 { name: 'Nepal', code: 'NP' }, 350 { name: 'Netherlands', code: 'NL' }, 351 { name: 'Netherlands Antilles', code: 'AN' }, 352 { name: 'New Caledonia', code: 'NC' }, 353 { name: 'New Zealand', code: 'NZ' }, 354 { name: 'Nicaragua', code: 'NI' }, 355 { name: 'Niger', code: 'NE' }, 356 { name: 'Nigeria', code: 'NG' }, 357 { name: 'Niue', code: 'NU' }, 358 { name: 'Norfolk Island', code: 'NF' }, 359 { name: 'Northern Mariana Islands', code: 'MP' }, 360 { name: 'Norway', code: 'NO' }, 361 { name: 'Oman', code: 'OM' }, 362 { name: 'Pakistan', code: 'PK' }, 363 { name: 'Palau', code: 'PW' }, 364 { name: 'Palestinian Territory, Occupied', code: 'PS' }, 365 { name: 'Panama', code: 'PA' }, 366 { name: 'Papua New Guinea', code: 'PG' }, 367 { name: 'Paraguay', code: 'PY' }, 368 { name: 'Peru', code: 'PE' }, 369 { name: 'Philippines', code: 'PH' }, 370 { name: 'Pitcairn', code: 'PN' }, 371 { name: 'Poland', code: 'PL' }, 372 { name: 'Portugal', code: 'PT' }, 373 { name: 'Puerto Rico', code: 'PR' }, 374 { name: 'Qatar', code: 'QA' }, 375 { name: 'Reunion', code: 'RE' }, 376 { name: 'Romania', code: 'RO' }, 377 { name: 'Russian Federation', code: 'RU' }, 378 { name: 'RWANDA', code: 'RW' }, 379 { name: 'Saint Helena', code: 'SH' }, 380 { name: 'Saint Kitts and Nevis', code: 'KN' }, 381 { name: 'Saint Lucia', code: 'LC' }, 382 { name: 'Saint Pierre and Miquelon', code: 'PM' }, 383 { name: 'Saint Vincent and the Grenadines', code: 'VC' }, 384 { name: 'Samoa', code: 'WS' }, 385 { name: 'San Marino', code: 'SM' }, 386 { name: 'Sao Tome and Principe', code: 'ST' }, 387 { name: 'Saudi Arabia', code: 'SA' }, 388 { name: 'Senegal', code: 'SN' }, 389 { name: 'Serbia and Montenegro', code: 'CS' }, 390 { name: 'Seychelles', code: 'SC' }, 391 { name: 'Sierra Leone', code: 'SL' }, 392 { name: 'Singapore', code: 'SG' }, 393 { name: 'Sint Maarten', code: 'SX' }, 394 { name: 'Slovakia', code: 'SK' }, 395 { name: 'Slovenia', code: 'SI' }, 396 { name: 'Solomon Islands', code: 'SB' }, 397 { name: 'Somalia', code: 'SO' }, 398 { name: 'South Africa', code: 'ZA' }, 399 { name: 'South Georgia and the South Sandwich Islands', code: 'GS' }, 400 { name: 'Spain', code: 'ES' }, 401 { name: 'Sri Lanka', code: 'LK' }, 402 { name: 'Sudan', code: 'SD' }, 403 { name: 'Suriname', code: 'SR' }, 404 { name: 'Svalbard and Jan Mayen', code: 'SJ' }, 405 { name: 'Swaziland', code: 'SZ' }, 406 { name: 'Sweden', code: 'SE' }, 407 { name: 'Switzerland', code: 'CH' }, 408 { name: 'Syrian Arab Republic', code: 'SY' }, 409 { name: 'Taiwan, Province of China', code: 'TW' }, 410 { name: 'Tajikistan', code: 'TJ' }, 411 { name: 'Tanzania, United Republic of', code: 'TZ' }, 412 { name: 'Thailand', code: 'TH' }, 413 { name: 'Timor-Leste', code: 'TL' }, 414 { name: 'Togo', code: 'TG' }, 415 { name: 'Tokelau', code: 'TK' }, 416 { name: 'Tonga', code: 'TO' }, 417 { name: 'Trinidad and Tobago', code: 'TT' }, 418 { name: 'Tunisia', code: 'TN' }, 419 { name: 'Turkey', code: 'TR' }, 420 { name: 'Turkmenistan', code: 'TM' }, 421 { name: 'Turks and Caicos Islands', code: 'TC' }, 422 { name: 'Tuvalu', code: 'TV' }, 423 { name: 'Uganda', code: 'UG' }, 424 { name: 'Ukraine', code: 'UA' }, 425 { name: 'United Arab Emirates', code: 'AE' }, 426 { name: 'United Kingdom', code: 'GB' }, 427 { name: 'United States', code: 'US' }, 428 { name: 'United States Minor Outlying Islands', code: 'UM' }, 429 { name: 'Uruguay', code: 'UY' }, 430 { name: 'Uzbekistan', code: 'UZ' }, 431 { name: 'Vanuatu', code: 'VU' }, 432 { name: 'Venezuela', code: 'VE' }, 433 { name: 'Vietnam', code: 'VN' }, 434 { name: 'Virgin Islands, British', code: 'VG' }, 435 { name: 'Virgin Islands, U.S.', code: 'VI' }, 436 { name: 'Wallis and Futuna', code: 'WF' }, 437 { name: 'Western Sahara', code: 'EH' }, 438 { name: 'Yemen', code: 'YE' }, 439 { name: 'Zambia', code: 'ZM' }, 440 { name: 'Zimbabwe', code: 'ZW' } 441 ]; 442 }; 443 444 return { 445 getCountries: getCountries 446 }; 447}]); 448 449 450 451; 452/*globals define, module, require */ 453/*jslint vars:true */ 454 455/** 456 * @license angular-date-time-input 457 * (c) 2013-2015 Knight Rider Consulting, Inc. http://www.knightrider.com 458 * License: MIT 459 * 460 * @author Dale "Ducky" Lotts 461 * @since 2013-Sep-23 462 */ 463 464(function (factory) { 465 'use strict'; 466 /* istanbul ignore if */ 467 if (typeof define === 'function' && /* istanbul ignore next */ define.amd) { 468 define(['angular', 'moment'], factory); // AMD 469 /* istanbul ignore next */ 470 } else if (typeof exports === 'object') { 471 module.exports = factory(require('angular'), require('moment')); // CommonJS 472 } else { 473 factory(window.angular, window.moment); // Browser global 474 } 475}(function (angular, moment) { 476 'use strict'; 477 angular.module('ui.dateTimeInput', []) 478 .service('dateTimeParserFactory', DateTimeParserFactoryService) 479 .directive('dateTimeInput', DateTimeInputDirective); 480 481 DateTimeParserFactoryService.$inject = []; 482 483 function DateTimeParserFactoryService() { 484 return function ParserFactory(modelType, inputFormats, dateParseStrict) { 485 var result; 486 // Behaviors 487 switch (modelType) { 488 case 'Date': 489 result = handleEmpty(dateParser); 490 break; 491 case 'moment': 492 result = handleEmpty(momentParser); 493 break; 494 case 'milliseconds': 495 result = handleEmpty(millisecondParser); 496 break; 497 default: // It is assumed that the modelType is a formatting string. 498 result = handleEmpty(stringParserFactory(modelType)); 499 } 500 501 return result; 502 503 function handleEmpty(delegate) { 504 return function (viewValue) { 505 if (angular.isUndefined(viewValue) || viewValue === '' || viewValue === null) { 506 return null; 507 } else { 508 return delegate(viewValue); 509 } 510 }; 511 } 512 513 function dateParser(viewValue) { 514 return momentParser(viewValue).toDate(); 515 } 516 517 function momentParser(viewValue) { 518 return moment(viewValue, inputFormats, moment.locale(), dateParseStrict); 519 } 520 521 function millisecondParser(viewValue) { 522 return moment.utc(viewValue, inputFormats, moment.locale(), dateParseStrict).valueOf(); 523 } 524 525 function stringParserFactory(modelFormat) { 526 return function stringParser(viewValue) { 527 return momentParser(viewValue).format(modelFormat); 528 }; 529 } 530 }; 531 } 532 533 DateTimeInputDirective.$inject = ['dateTimeParserFactory']; 534 535 function DateTimeInputDirective(dateTimeParserFactory) { 536 return { 537 require: 'ngModel', 538 restrict: 'A', 539 scope: { 540 'dateFormats': '=' 541 }, 542 link: linkFunction 543 }; 544 545 function linkFunction(scope, element, attrs, controller) { 546 547 // validation 548 if (angular.isDefined(scope.dateFormats) && !angular.isString(scope.dateFormats) && !angular.isArray(scope.dateFormats)) {
549 throw 'date-formats must be a single string or an array of strings i.e. date-formats="[\'YYYY-MM-DD\']" '; 550 } 551 552 if (angular.isDefined(attrs.modelType) && (!angular.isString(attrs.modelType) || attrs.modelType.length === 0 )) { 553 throw 'model-type must be "Date", "moment", "milliseconds", or a moment format string'; 554 } 555 556 // variables 557 var displayFormat = attrs.dateTimeInput || moment.defaultFormat; 558 559 var dateParseStrict = (attrs.dateParseStrict === undefined || attrs.dateParseStrict === 'true'); 560 561 var modelType = (attrs.modelType || 'Date'); 562 563 var inputFormats = [attrs.dateTimeInput, modelType].concat(scope.dateFormats).concat([moment.ISO_8601]).filter(unique); 564 565 // Behaviors 566 controller.$parsers.unshift(dateTimeParserFactory(modelType, inputFormats, dateParseStrict)); 567 568 controller.$formatters.push(formatter); 569 570 controller.$validators.dateTimeInput = validator; 571 572 element.bind('blur', applyFormatters); 573 574 // Implementation 575 576 function unique(value, index, self) { 577 return ['Date', 'moment', 'milliseconds', undefined].indexOf(value) === -1 && 578 self.indexOf(value) === index; 579 } 580 581 function validator(modelValue, viewValue) { 582 if (angular.isUndefined(viewValue) || viewValue === '' || viewValue === null) { 583 return true; 584 } 585 return moment(viewValue, inputFormats, moment.locale(), dateParseStrict).isValid(); 586 } 587 588 function formatter(modelValue) { 589 if (angular.isUndefined(modelValue) || modelValue === '' || modelValue === null) { 590 return null; 591 } 592 593 if (angular.isDate(modelValue)) { 594 return moment(modelValue).format(displayFormat); 595 } else if (angular.isNumber(modelValue)) { 596 return moment.utc(modelValue).format(displayFormat); 597 } 598 return moment(modelValue, inputFormats, moment.locale(), dateParseStrict).format(displayFormat); 599 } 600 601 function applyFormatters() { 602 controller.$viewValue = controller.$formatters.filter(keepAll).reverse().reduce(applyFormatter, controller.$modelValue); 603 controller.$render(); 604 605 function keepAll() { 606 return true; 607 } 608 609 function applyFormatter(memo, formatter) { 610 return formatter(memo); 611 } 612 } 613 } 614 } 615})) 616; 617; 618/*globals define, jQuery, module, require */ 619/*jslint vars:true */ 620 621/** 622 * @license angular-bootstrap-datetimepicker version: 0.4.0 623 * Copyright 2016 Knight Rider Consulting, Inc. http://www.knightrider.com 624 * License: MIT 625 * 626 * @author Dale "Ducky" Lotts 627 * @since 2013-Jul-8 628 */ 629 630(function (factory) { 631 'use strict'; 632 /* istanbul ignore if */ 633 if (typeof define === 'function' && /* istanbul ignore next */ define.amd) { 634 define(['angular', 'moment'], factory); // AMD 635 /* istanbul ignore next */ 636 } else if (typeof exports === 'object') { 637 module.exports = factory(require('angular'), require('moment')); // CommonJS 638 } else { 639 factory(window.angular, window.moment); // Browser global 640 } 641}(function (angular, moment) { 642 'use strict'; 643 angular.module('ui.bootstrap.datetimepicker', []) 644 .service('dateTimePickerConfig', DateTimePickerConfigProvider) 645 .service('dateTimePickerValidator', DateTimePickerValidatorService) 646 .directive('datetimepicker', DatetimepickerDirective); 647 648 DatetimepickerDirective.$inject = ['dateTimePickerConfig', 'dateTimePickerValidator']; 649 650 function DatetimepickerDirective(defaultConfig, configurationValidator) { 651 652 var directiveDefinition = { 653 bindToController: false, 654 controller: DirectiveController, 655 controllerAs: 'dateTimePickerController', 656 replace: true, 657 require: 'ngModel', 658 restrict: 'E', 659 scope: { 660 beforeRender: '&', 661 onSetTime: '&' 662 }, 663 templateUrl: 'templates/datetimepicker.html' 664 }; 665 666 DirectiveController.$inject = ['$scope', '$element', '$attrs']; 667 668 function DirectiveController($scope, $element, $attrs) { 669 // Configuration 670 var ngModelController = $element.controller('ngModel'); 671 672 var configuration = createConfiguration(); 673 $scope.screenReader = configuration.screenReader; 674 675 // Behavior 676 $scope.changeView = changeView; 677 ngModelController.$render = $render; 678 679 if (configuration.configureOn) { 680 $scope.$on(configuration.configureOn, function () { 681 configuration = createConfiguration(); 682 $scope.screenReader = configuration.screenReader; 683 ngModelController.$render(); 684 }); 685 } 686 687 if (configuration.renderOn) { 688 $scope.$on(configuration.renderOn, ngModelController.$render); 689 } 690 691 // Implementation 692 693 var viewToModelFactory = { 694 year: yearModelFactory, 695 696 month: monthModelFactory, 697 698 day: dayModelFactory, 699 700 hour: hourModelFactory, 701 702 minute: minuteModelFactory, 703 704 setTime: setTime 705 }; 706 707 function changeView(viewName, dateObject, event) { 708 if (event) { 709 event.stopPropagation(); 710 event.preventDefault(); 711 } 712 713 if (viewName && (dateObject.utcDateValue > -Infinity) && dateObject.selectable && viewToModelFactory[viewName]) { 714 var result = viewToModelFactory[viewName](dateObject.utcDateValue); 715 716 var weekDates = []; 717 if (result.weeks) { 718 for (var i = 0; i < result.weeks.length; i += 1) { 719 var week = result.weeks[i]; 720 for (var j = 0; j < week.dates.length; j += 1) { 721 var weekDate = week.dates[j];
722 weekDates.push(weekDate); 723 } 724 } 725 } 726 727 $scope.beforeRender({ 728 $view: result.currentView, 729 $dates: result.dates || weekDates, 730 $leftDate: result.leftDate, 731 $upDate: result.previousViewDate, 732 $rightDate: result.rightDate 733 }); 734 735 $scope.data = result; 736 } 737 } 738 739 function yearModelFactory(milliseconds) { 740 var selectedDate = moment.utc(milliseconds).startOf('year'); 741 // View starts one year before the decade starts and ends one year after the decade ends 742 // i.e. passing in a date of 1/1/2013 will give a range of 2009 to 2020 743 // Truncate the last digit from the current year and subtract 1 to get the start of the decade 744 var startDecade = (parseInt(selectedDate.year() / 10, 10) * 10); 745 var startDate = moment.utc(startOfDecade(milliseconds)).subtract(1, 'year').startOf('year'); 746 747 var activeYear = formatValue(ngModelController.$modelValue, 'YYYY'); 748 749 var result = { 750 'currentView': 'year', 751 'nextView': configuration.minView === 'year' ? 'setTime' : 'month', 752 'previousViewDate': new DateObject({ 753 utcDateValue: null, 754 display: startDecade + '-' + (startDecade + 9) 755 }), 756 'leftDate': new DateObject({utcDateValue: moment.utc(startDate).subtract(9, 'year').valueOf()}), 757 'rightDate': new DateObject({utcDateValue: moment.utc(startDate).add(11, 'year').valueOf()}), 758 'dates': [] 759 }; 760 761 for (var i = 0; i < 12; i += 1) { 762 var yearMoment = moment.utc(startDate).add(i, 'years'); 763 var dateValue = { 764 'utcDateValue': yearMoment.valueOf(), 765 'display': yearMoment.format('YYYY'), 766 'past': yearMoment.year() < startDecade, 767 'future': yearMoment.year() > startDecade + 9, 768 'active': yearMoment.format('YYYY') === activeYear 769 }; 770 771 result.dates.push(new DateObject(dateValue)); 772 } 773 774 return result; 775 } 776 777 function monthModelFactory(milliseconds) { 778 779 var startDate = moment.utc(milliseconds).startOf('year'); 780 var previousViewDate = startOfDecade(milliseconds); 781 var activeDate = formatValue(ngModelController.$modelValue, 'YYYY-MMM'); 782 783 var result = { 784 'previousView': 'year', 785 'currentView': 'month', 786 'nextView': configuration.minView === 'month' ? 'setTime' : 'day', 787 'previousViewDate': new DateObject({ 788 utcDateValue: previousViewDate.valueOf(), 789 display: startDate.format('YYYY') 790 }), 791 'leftDate': new DateObject({utcDateValue: moment.utc(startDate).subtract(1, 'year').valueOf()}), 792 'rightDate': new DateObject({utcDateValue: moment.utc(startDate).add(1, 'year').valueOf()}), 793 'dates': [] 794 }; 795 796 for (var i = 0; i < 12; i += 1) { 797 var monthMoment = moment.utc(startDate).add(i, 'months'); 798 var dateValue = { 799 'utcDateValue': monthMoment.valueOf(), 800 'display': monthMoment.format('MMM'), 801 'active': monthMoment.format('YYYY-MMM') === activeDate 802 }; 803 804 result.dates.push(new DateObject(dateValue)); 805 } 806 807 return result; 808 } 809 810 function dayModelFactory(milliseconds) { 811 812 var selectedDate = moment.utc(milliseconds); 813 var startOfMonth = moment.utc(selectedDate).startOf('month'); 814 var previousViewDate = moment.utc(selectedDate).startOf('year'); 815 var endOfMonth = moment.utc(selectedDate).endOf('month'); 816 817 var startDate = moment.utc(startOfMonth).subtract(Math.abs(startOfMonth.weekday()), 'days'); 818 819 var activeDate = formatValue(ngModelController.$modelValue, 'YYYY-MMM-DD'); 820 821 var result = { 822 'previousView': 'month', 823 'currentView': 'day', 824 'nextView': configuration.minView === 'day' ? 'setTime' : 'hour', 825 'previousViewDate': new DateObject({ 826 utcDateValue: previousViewDate.valueOf(), 827 display: startOfMonth.format('YYYY-MMM') 828 }), 829 'leftDate': new DateObject({utcDateValue: moment.utc(startOfMonth).subtract(1, 'months').valueOf()}), 830 'rightDate': new DateObject({utcDateValue: moment.utc(startOfMonth).add(1, 'months').valueOf()}), 831 'dayNames': [], 832 'weeks': [] 833 }; 834 835 836 for (var dayNumber = 0; dayNumber < 7; dayNumber += 1) { 837 result.dayNames.push(moment.utc().weekday(dayNumber).format('dd')); 838 } 839 840 for (var i = 0; i < 6; i += 1) { 841 var week = {dates: []}; 842 for (var j = 0; j < 7; j += 1) { 843 var monthMoment = moment.utc(startDate).add((i * 7) + j, 'days'); 844 var dateValue = { 845 'utcDateValue': monthMoment.valueOf(), 846 'display': monthMoment.format('D'), 847 'active': monthMoment.format('YYYY-MMM-DD') === activeDate, 848 'past': monthMoment.isBefore(startOfMonth), 849 'future': monthMoment.isAfter(endOfMonth) 850 }; 851 week.dates.push(new DateObject(dateValue)); 852 } 853 result.weeks.push(week); 854 } 855 856 return result; 857 } 858 859 function hourModelFactory(milliseconds) { 860 var selectedDate = moment.utc(milliseconds).startOf('day'); 861 var previousViewDate = moment.utc(selectedDate).startOf('month'); 862 863 var activeFormat = formatValue(ngModelController.$modelValue, 'YYYY-MM-DD H'); 864 865 var result = { 866 'previousView': 'day', 867 'currentView': 'hour', 868 'nextView': configuration.minView === 'hour' ? 'setTime' : 'minute', 869 'previousViewDate': new DateObject({ 870 utcDateValue: previousViewDate.valueOf(), 871 display: selectedDate.format('ll') 872 }), 873 'leftDate': new DateObject({utcDateValue: moment.utc(selectedDate).subtract(1, 'days').valueOf()}), 874 'rightDate': new DateObject({utcDateValue: moment.utc(selectedDate).add(1, 'days').valueOf()}), 875 'dates': [] 876 }; 877 878 for (var i = 0; i < 24; i += 1) { 879 var hourMoment = moment.utc(selectedDate).add(i, 'hours'); 880 var dateValue = { 881 'utcDateValue': hourMoment.valueOf(), 882 'display': hourMoment.format('LT'), 883 'active': hourMoment.format('YYYY-MM-DD H') === activeFormat 884 }; 885 886 result.dates.push(new DateObject(dateValue)); 887 } 888 889 return result; 890 } 891 892 function minuteModelFactory(milliseconds) { 893 var selectedDate = moment.utc(milliseconds).startOf('hour'); 894 var previousViewDate = moment.utc(selectedDate).startOf('day'); 895 var activeFormat = formatValue(ngModelController.$modelValue, 'YYYY-MM-DD H:mm'); 896 897 var result = { 898 'previousView': 'hour', 899 'currentView': 'minute', 900 'nextView': 'setTime', 901 'previousViewDate': new DateObject({ 902 utcDateValue: previousViewDate.valueOf(), 903 display: selectedDate.format('lll') 904 }), 905 'leftDate': new DateObject({utcDateValue: moment.utc(selectedDate).subtract(1, 'hours').valueOf()}), 906 'rightDate': new DateObject({utcDateValue: moment.utc(selectedDate).add(1, 'hours').valueOf()}), 907 'dates': [] 908 }; 909 910 var limit = 60 / configuration.minuteStep; 911 912 for (var i = 0; i < limit; i += 1) { 913 var hourMoment = moment.utc(selectedDate).add(i * configuration.minuteStep, 'minute'); 914 var dateValue = { 915 'utcDateValue': hourMoment.valueOf(), 916 'display': hourMoment.format('LT'), 917 'active': hourMoment.format('YYYY-MM-DD H:mm') === activeFormat 918 }; 919 920 result.dates.push(new DateObject(dateValue)); 921 } 922 923 return result; 924 } 925 926 function setTime(milliseconds) { 927 var tempDate = new Date(milliseconds); 928 var newDate = new Date(tempDate.getUTCFullYear(), tempDate.getUTCMonth(), tempDate.getUTCDate(), tempDate.getUTCHours(), tempDate.getUTCMinutes(), tempDate.getUTCSeconds(), tempDate.getUTCMilliseconds()); 929 930 switch (configuration.modelType) { 931 case 'Date': 932 // No additional work needed 933 break; 934 case 'moment': 935 newDate = moment(newDate); 936 break; 937 case 'milliseconds': 938 newDate = milliseconds; 939 break; 940 default: // It is assumed that the modelType is a formatting string. 941 newDate = moment(newDate).format(configuration.modelType); 942 } 943 944 var oldDate = ngModelController.$modelValue; 945 ngModelController.$setViewValue(newDate); 946 947 if (configuration.dropdownSelector) { 948 jQuery(configuration.dropdownSelector).dropdown('toggle'); 949 } 950 951 $scope.onSetTime({newDate: newDate, oldDate: oldDate}); 952 953 return viewToModelFactory[configuration.startView](milliseconds); 954 } 955 956 function $render() { 957 $scope.changeView(configuration.startView, new DateObject({utcDateValue: getUTCTime(ngModelController.$viewValue)})); 958 } 959 960 function startOfDecade(milliseconds) { 961 var startYear = (parseInt(moment.utc(milliseconds).year() / 10, 10) * 10); 962 return moment.utc(milliseconds).year(startYear).startOf('year'); 963 } 964 965 function formatValue(timeValue, formatString) { 966 if (timeValue) { 967 return getMoment(timeValue).format(formatString); 968 } else { 969 return ''; 970 } 971 } 972 973 /** 974 * Converts a time value into a moment. 975 * 976 * This function is now necessary because moment logs a warning when parsing a string without a format. 977 * @param modelValue 978 * a time value in any of the supported formats (Date, moment, milliseconds, and string) 979 * @returns {moment} 980 * representing the specified time value. 981 */ 982 983 function getMoment(modelValue) { 984 return moment(modelValue, angular.isString(modelValue) ? configuration.parseFormat : undefined); 985 } 986 987 /** 988 * Converts a time value to UCT/GMT time. 989 * @param modelValue 990 * a time value in any of the supported formats (Date, moment, milliseconds, and string) 991 * @returns {number} 992 * number of milliseconds since 1/1/1970 993 */ 994 995 function getUTCTime(modelValue) { 996 var tempDate = new Date(); 997 if (modelValue) { 998 var tempMoment = getMoment(modelValue); 999 if (tempMoment.isValid()) { 1000 tempDate = tempMoment.toDate(); 1001 } else { 1002 throw 'Invalid date: ' + modelValue; 1003 } 1004 } 1005 return tempDate.getTime() - (tempDate.getTimezoneOffset() * 60000); 1006 } 1007 1008 function createConfiguration() { 1009 var directiveConfig = {}; 1010 1011 if ($attrs.datetimepickerConfig) { 1012 directiveConfig = $scope.$parent.$eval($attrs.datetimepickerConfig); 1013 } 1014 1015 var configuration = angular.extend({}, defaultConfig, directiveConfig); 1016 1017 configurationValidator.validate(configuration); 1018 1019 return configuration; 1020 } 1021 } 1022 1023 function DateObject() { 1024 1025 var tempDate = new Date(); 1026 var localOffset = tempDate.getTimezoneOffset() * 60000; 1027 1028 this.utcDateValue = tempDate.getTime(); 1029 this.selectable = true; 1030 1031 1032 this.localDateValue = function localDateValue() { 1033 return this.utcDateValue + localOffset; 1034 }; 1035
1036 var validProperties = ['utcDateValue', 'localDateValue', 'display', 'active', 'selectable', 'past', 'future']; 1037 1038 for (var prop in arguments[0]) { 1039 /* istanbul ignore else */ 1040 //noinspection JSUnfilteredForInLoop 1041 if (validProperties.indexOf(prop) >= 0) { 1042 //noinspection JSUnfilteredForInLoop 1043 this[prop] = arguments[0][prop]; 1044 } 1045 } 1046 } 1047 1048 return directiveDefinition; 1049 } 1050 1051 function DateTimePickerConfigProvider() { 1052 1053 var defaultConfiguration = { 1054 configureOn: null, 1055 dropdownSelector: null, 1056 minuteStep: 5, 1057 minView: 'minute', 1058 modelType: 'Date', 1059 parseFormat: 'YYYY-MM-DDTHH:mm:ss.SSSZZ', 1060 renderOn: null, 1061 startView: 'day' 1062 }; 1063 1064 var defaultLocalization = { 1065 'bg': {previous: 'пÑедиÑна', next: 'ÑледваÑа'}, 1066 'ca': {previous: 'anterior', next: 'següent'}, 1067 'da': {previous: 'forrige', next: 'næste'}, 1068 'de': {previous: 'vorige', next: 'weiter'}, 1069 'en-au': {previous: 'previous', next: 'next'}, 1070 'en-gb': {previous: 'previous', next: 'next'}, 1071 'en': {previous: 'previous', next: 'next'}, 1072 'es-us': {previous: 'atrás', next: 'siguiente'}, 1073 'es': {previous: 'atrás', next: 'siguiente'}, 1074 'fi': {previous: 'edellinen', next: 'seuraava'}, 1075 'fr': {previous: 'précédent', next: 'suivant'}, 1076 'hu': {previous: 'elÅzÅ', next: 'következÅ'}, 1077 'it': {previous: 'precedente', next: 'successivo'}, 1078 'ja': {previous: 'åã¸', next: '次ã¸'}, 1079 'ml': {previous: 'à´®àµàµ»à´ªàµà´³àµà´³à´¤àµ', next: 'à´ à´àµà´¤àµà´¤à´¤àµ'}, 1080 'nl': {previous: 'vorige', next: 'volgende'}, 1081 'pl': {previous: 'poprzednia', next: 'nastÄpna'}, 1082 'pt-br': {previous: 'anteriores', next: 'próximos'}, 1083 'pt': {previous: 'anterior', next: 'próximo'}, 1084 'ro': {previous: 'anterior', next: 'urmÄtor'}, 1085 'ru': {previous: 'пÑедÑдÑÑаÑ', next: 'ÑледÑÑÑаÑ'}, 1086 'sk': {previous: 'predoÅ¡lá', next: 'ÄalÅ¡ia'}, 1087 'sv': {previous: 'föregÃ¥ende', next: 'nästa'}, 1088 'tr': {previous: 'önceki', next: 'sonraki'}, 1089 'uk': {previous: 'назад', next: 'далÑ'}, 1090 'zh-cn': {previous: 'ä¸ä¸é¡µ', next: 'ä¸ä¸é¡µ'}, 1091 'zh-tw': {previous: 'ä¸ä¸é ', next: 'ä¸ä¸é '} 1092 }; 1093 1094 var screenReader = defaultLocalization[moment.locale().toLowerCase()]; 1095 1096 return angular.extend({}, defaultConfiguration, {screenReader: screenReader}); 1097 1098 } 1099 1100 DateTimePickerValidatorService.$inject = ['$log']; 1101 1102 function DateTimePickerValidatorService($log) { 1103 return { 1104 validate: validator 1105 }; 1106 function validator(configuration) { 1107 1108 var validOptions = [ 1109 'configureOn', 1110 'dropdownSelector', 1111 'minuteStep', 1112 'minView', 1113 'modelType', 1114 'parseFormat', 1115 'renderOn', 1116 'startView', 1117 'screenReader' 1118 ]; 1119 1120 for (var prop in configuration) { 1121 //noinspection JSUnfilteredForInLoop 1122 if (validOptions.indexOf(prop) < 0) { 1123 throw ('invalid option: ' + prop); 1124 } 1125 } 1126 1127 // Order of the elements in the validViews array is significant. 1128 var validViews = ['minute', 'hour', 'day', 'month', 'year']; 1129 1130 if (validViews.indexOf(configuration.startView) < 0) { 1131 throw ('invalid startView value: ' + configuration.startView); 1132 } 1133 1134 if (validViews.indexOf(configuration.minView) < 0) { 1135 throw ('invalid minView value: ' + configuration.minView); 1136 } 1137 1138 if (validViews.indexOf(configuration.minView) > validViews.indexOf(configuration.startView)) { 1139 throw ('startView must be greater than minView'); 1140 } 1141 1142 if (!angular.isNumber(configuration.minuteStep)) { 1143 throw ('minuteStep must be numeric'); 1144 } 1145 if (configuration.minuteStep <= 0 || configuration.minuteStep >= 60) { 1146 throw ('minuteStep must be greater than zero and less than 60'); 1147 } 1148 if (configuration.configureOn !== null && !angular.isString(configuration.configureOn)) { 1149 throw ('configureOn must be a string'); 1150 } 1151 if (configuration.configureOn !== null && configuration.configureOn.length < 1) { 1152 throw ('configureOn must not be an empty string'); 1153 } 1154 if (configuration.renderOn !== null && !angular.isString(configuration.renderOn)) { 1155 throw ('renderOn must be a string'); 1156 } 1157 if (configuration.renderOn !== null && configuration.renderOn.length < 1) { 1158 throw ('renderOn must not be an empty string'); 1159 } 1160 if (configuration.modelType !== null && !angular.isString(configuration.modelType)) { 1161 throw ('modelType must be a string'); 1162 } 1163 if (configuration.modelType !== null && configuration.modelType.length < 1) { 1164 throw ('modelType must not be an empty string'); 1165 } 1166 if (configuration.modelType !== 'Date' && configuration.modelType !== 'moment' && configuration.modelType !== 'milliseconds') { 1167 // modelType contains string format, overriding parseFormat with modelType 1168 configuration.parseFormat = configuration.modelType; 1169 } 1170 if (configuration.dropdownSelector !== null && !angular.isString(configuration.dropdownSelector)) { 1171 throw ('dropdownSelector must be a string'); 1172 } 1173 1174 /* istanbul ignore next */ 1175 if (configuration.dropdownSelector !== null && ((typeof jQuery === 'undefined') || (typeof jQuery().dropdown !== 'function'))) { 1176 $log.error('Please DO NOT specify the dropdownSelector option unless you are using jQuery AND Bootstrap.js. ' + 1177 'Please include jQuery AND Bootstrap.js, or write code to close the dropdown in the on-set-time callback. \n\n' + 1178 'The dropdownSelector configuration option is being removed because it will not function properly.'); 1179 delete configuration.dropdownSelector; 1180 } 1181 } 1182 } 1183})); 1184; 1185/*globals angular */ 1186 1187/** 1188 * @license angular-bootstrap-datetimepicker version: 0.4.0 1189 * Copyright 2016 Knight Rider Consulting, Inc. http://www.knightrider.com 1190 * License: MIT 1191 * 1192 * @author Dale "Ducky" Lotts 1193 * @since 2016-Jan-31 1194 */ 1195 1196(function () { 1197 'use strict'; 1198 angular.module('ui.bootstrap.datetimepicker').run(['$templateCache', function ($templateCache) { 1199 $templateCache.put('templates/datetimepicker.html', '<div class="datetimepicker table-responsive">\n <table class="table table-condensed {{ data.currentView }}-view">\n <thead>\n <tr>\n <th class="left" data-ng-click="changeView(data.currentView, data.leftDate, $event)" data-ng-show="data.leftDate.selectable"><i class="glyphicon glyphicon-arrow-left"><span class="sr-only">{{ screenReader.previous }}</span></i>\n </th>\n <th class="switch" colspan="5" data-ng-show="data.previousViewDate.selectable" data-ng-click="changeView(data.previousView, data.previousViewDate, $event)">{{ data.previousViewDate.display }}</th>\n <th class="right" data-ng-click="changeView(data.currentView, data.rightDate, $event)" data-ng-show="data.rightDate.selectable"><i class="glyphicon glyphicon-arrow-right"><span class="sr-only">{{ screenReader.next }}</span></i>\n </th>\n </tr>\n <tr>\n <th class="dow" data-ng-repeat="day in data.dayNames">{{ day }}</th>\n </tr>\n </thead>\n <tbody>\n <tr data-ng-if="data.currentView !== \'day\'">\n <td colspan="7">
1199\n <span class="{{ data.currentView }}" data-ng-repeat="dateObject in data.dates" data-ng-class="{active: dateObject.active, past: dateObject.past, future: dateObject.future, disabled: !dateObject.selectable}" data-ng-click="changeView(data.nextView, dateObject, $event)">{{ dateObject.display }}</span></td>\n </tr>\n <tr data-ng-if="data.currentView === \'day\'" data-ng-repeat="week in data.weeks">\n <td data-ng-repeat="dateObject in week.dates" data-ng-click="changeView(data.nextView, dateObject, $event)" class="day" data-ng-class="{active: dateObject.active, past: dateObject.past, future: dateObject.future, disabled: !dateObject.selectable}">{{ dateObject.display }}</td>\n </tr>\n </tbody>\n </table>\n</div>'); 1200 }]); 1201}()); 1202; 1203LVWServices.factory('StatesService', ['$http', function ($http) { 1204 1205 1206 var getStates = function (success, error) { 1207 return statesObj = [ 1208 { name: 'Alabama', abbreviation: 'AL' }, 1209 { name: 'Alaska', abbreviation: 'AK' }, 1210 { name: 'Arizona', abbreviation: 'AZ' }, 1211 { name: 'Arkansas', abbreviation: 'AR' }, 1212 { name: 'California', abbreviation: 'CA' }, 1213 { name: 'Colorado', abbreviation: 'CO' }, 1214 { name: 'Connecticut', abbreviation: 'CT' }, 1215 { name: 'Delaware', abbreviation: 'DE' }, 1216 { name: 'District of Columbia', abbreviation: 'DC' }, 1217 { name: 'Florida', abbreviation: 'FL' }, 1218 { name: 'Georgia', abbreviation: 'GA' }, 1219 { name: 'Hawaii', abbreviation: 'HI' }, 1220 { name: 'Idaho', abbreviation: 'ID' }, 1221 { name: 'Illinois', abbreviation: 'IL' }, 1222 { name: 'Indiana', abbreviation: 'IN' }, 1223 { name: 'Iowa', abbreviation: 'IA' }, 1224 { name: 'Kansas', abbreviation: 'KS' }, 1225 { name: 'Kentucky', abbreviation: 'KY' }, 1226 { name: 'Louisiana', abbreviation: 'LA' }, 1227 { name: 'Maine', abbreviation: 'ME' }, 1228 { name: 'Maryland', abbreviation: 'MD' }, 1229 { name: 'Massachusetts', abbreviation: 'MA' }, 1230 { name: 'Michigan', abbreviation: 'MI' }, 1231 { name: 'Minnesota', abbreviation: 'MN' }, 1232 { name: 'Mississippi', abbreviation: 'MS' }, 1233 { name: 'Missouri', abbreviation: 'MO' }, 1234 { name: 'Montana', abbreviation: 'MT' }, 1235 { name: 'Nebraska', abbreviation: 'NE' }, 1236 { name: 'Nevada', abbreviation: 'NV' }, 1237 { name: 'New Hampshire', abbreviation: 'NH' }, 1238 { name: 'New Jersey', abbreviation: 'NJ' }, 1239 { name: 'New Mexico', abbreviation: 'NM' }, 1240 { name: 'New York', abbreviation: 'NY' }, 1241 { name: 'North Carolina', abbreviation: 'NC' }, 1242 { name: 'North Dakota', abbreviation: 'ND' }, 1243 { name: 'Ohio', abbreviation: 'OH' }, 1244 { name: 'Oklahoma', abbreviation: 'OK' }, 1245 { name: 'Oregon', abbreviation: 'OR' }, 1246 { name: 'Pennsylvania', abbreviation: 'PA' }, 1247 { name: 'Rhode Island', abbreviation: 'RI' }, 1248 { name: 'South Carolina', abbreviation: 'SC' }, 1249 { name: 'South Dakota', abbreviation: 'SD' }, 1250 { name: 'Tennessee', abbreviation: 'TN' }, 1251 { name: 'Texas', abbreviation: 'TX' }, 1252 { name: 'Utah', abbreviation: 'UT' }, 1253 { name: 'Vermont', abbreviation: 'VT' }, 1254 { name: 'Virgin Islands', abbreviation: 'VI' }, 1255 { name: 'Virginia', abbreviation: 'VA' }, 1256 { name: 'Washington', abbreviation: 'WA' }, 1257 { name: 'West Virginia', abbreviation: 'WV' }, 1258 { name: 'Wisconsin', abbreviation: 'WI' }, 1259 { name: 'Wyoming', abbreviation: 'WY' } 1260 ]; 1261 }; 1262 1263 return { 1264 getStates: getStates 1265 }; 1266}]);; 1267LVWDirectives.directive("gallery", ["$http", function ($http) { 1268 return { 1269 scope: { 1270 keys: "=", 1271 maxkey: "=", 1272 keyprefix: "=" 1273 }, 1274 restrict: "E", 1275 templateUrl: '/views/shared/_galleryTemplate.html', 1276 controller: ['$scope', '$http', function ($scope, $http) { 1277 $scope.galleryKeys = $scope.keys === undefined ? [] : $scope.keys; 1278 $scope.maxGalleryNumber = $scope.maxkey === undefined ? 0 : $scope.maxkey; 1279 $scope.selectedImg = null; 1280 $scope.largeImgixVars = "?w=900&h=600&fit=crop&crop=faces,top,right&auto=format,compress"; 1281 $scope.smallImgixVars = "?w=450&h=300&fit=crop&crop=faces,top,right&auto=format,compress"; 1282 $scope.galleryRows = []; 1283 $scope.galleryID = ""; 1284 1285 $scope.isEditing = function () { 1286 if (!folly || !folly.editGallery) { 1287 return false; 1288 } 1289 1290 return folly.editGallery; 1291 }; 1292 1293 $scope.getImgUrl = function (value) { 1294 if (value == null) { 1295 return ""; 1296 } else if (value.value === 'holder.png') { 1297 return "//" + folly.constants.imgixDomain + value.value; 1298 } else if (value.value.includes("https://")) { 1299 return value.value; 1300 } else { 1301 return "//" + folly.constants.imgixDomain + "folly" + value.key + "/" + value.value; 1302 } 1303 } 1304 1305 $scope.addImg = function () { 1306 $scope.maxGalleryNumber++; 1307 1308 if ($scope.keyprefix[$scope.keyprefix.length - 1] != "/") 1309 { 1310 $scope.keyprefix = $scope.keyprefix + "/"; 1311 } 1312 1313 key = $scope.keyprefix + 'gallery/' + $scope.maxGalleryNumber; 1314 1315 $scope.galleryKeys.push({ 1316 key: key, 1317 value: 'holder.png' 1318 }); 1319 1320 folly.initImages(); 1321 }; 1322 1323 $scope.deleteGalleryImg = function(key) { 1324 for (var i=0; i<$scope.galleryKeys.length; i++) { 1325 var item = $scope.galleryKeys[i]; 1326 1327 if (item.key == key.key) { 1328 $scope.galleryKeys.splice(i,1); 1329 1330 var cred = folly.getCredentials(function () { folly.apiGet(endpoint, params, successCallback); }); 1331 1332 if (cred == null) 1333 return; 1334 1335 1336 $http.post("/folly/delete", { 1337 path: item.key, 1338 token: cred.token 1339 }).then(function (){ 1340 1341 }); 1342 1343 break; 1344 } 1345 else { 1346 continue; 1347 } 1348 1349 } 1350 1351 }; 1352 1353 $scope.selectImg = function(img) { 1354 1355 if (img == null && $scope.galleryKeys.length == 0) { 1356 return; 1357 } else if (img == null) { 1358 $scope.selectedImg = $scope.galleryKeys[0]; 1359 } else { 1360 $scope.selectedImg = img; 1361 } 1362 }; 1363 1364 $scope.galleryInit = function () { 1365 //multi gallery support 1366 //keys may have keys for more than one gallery on the page. Filter out the galleryKeys that don't have the key prefix 1367 var filteredKeys = []; 1368 for (var i = 0; i < $scope.galleryKeys.length; i++) { 1369 if ($scope.galleryKeys[i].key.indexOf($scope.keyprefix) >= 0) { 1370 filteredKeys.push($scope.galleryKeys[i]); 1371 } 1372 } 1373 $scope.galleryKeys = filteredKeys; 1374 1375 //galleryID will be the last part of the key 1376 var parts = $scope.keyprefix.split("/"); 1377 1378 if (parts[parts.length - 1] == "" && parts.length > 1) { 1379 $scope.galleryID = parts[parts.length - 2]; 1380 } else { 1381 $scope.galleryID = parts[parts.length - 1]; 1382 } 1383 1384 1385 1386 1387 var rowItems = []; 1388 1389 for (var i=0; i<$scope.galleryKeys.length; i++) { 1390 var item = $scope.galleryKeys[i]; 1391 1392 if (rowItems.length < 4) { 1393 rowItems.push(item); 1394 } else { 1395 $scope.galleryRows.push(rowItems); 1396 rowItems = []; 1397 rowItems.push(item); 1398 } 1399 } 1400 1401 if (rowItems.length > 0) { 1402 $scope.galleryRows.push(rowItems); 1403 } 1404 1405 folly.onAuthenticateSuccess(function () { 1406 folly.editGallery = true; 1407 $scope.$apply(); 1408 }); 1409 1410 folly.onLogout(function () { 1411 folly.editGallery = false; 1412 $scope.$apply(); 1413 window.location.reload(); 1414 }); 1415 1416 $('.myCarousel').carousel({ 1417 interval: false 1418 }) 1419 }; 1420 1421 $scope.galleryInit(); 1422 $scope.selectImg(null); 1423 1424 1425 }] 1426 }; 1427}]);; 1428LVWDirectives.directive("lightbox", ["$uibModal", function ($uibModal) { 1429 return { 1430 scope: { 1431 1432 }, 1433 restrict: "A",
1434 link: function (scope, element, attrs) { 1435 1436 element.bind("click", function (event) { 1437 1438 var src = element.attr("src"); 1439 1440 1441 var modalInstance = $uibModal.open({ 1442 templateUrl: '/views/shared/JSPartials/_lightbox.html', 1443 controller: ['$scope', '$uibModalInstance', 'imgSrc', function ($scope, $uibModalInstance, imgSrc) { 1444 //update the folly vars 1445 var queryIndex = imgSrc.indexOf("?"); 1446 1447 if (queryIndex > 0) { 1448 imgSrc = imgSrc.substring(0, queryIndex); 1449 imgSrc = imgSrc + "?w=1500&fit=crop&auto=format,compress"; 1450 1451 } 1452 1453 $scope.img = imgSrc; 1454 1455 1456 $scope.cancel = function () { 1457 $uibModalInstance.dismiss('cancel'); 1458 }; 1459 }], 1460 resolve: { 1461 imgSrc: function () { 1462 return src; 1463 } 1464 }, 1465 size: "lg" 1466 }); 1467 1468 modalInstance.result.then(function (newNote) { 1469 1470 }, function () { 1471 //canceled 1472 }); 1473 1474 event.preventDefault(); 1475 }); 1476 1477 1478 } 1479 }; 1480}]);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.