/* Minification failed. Returning unminified contents.
(172,41-42): run-time error JS1002: Syntax error: .
(173,58-59): run-time error JS1195: Expected expression: >
(173,83-84): run-time error JS1004: Expected ';': )
(175,1-2): run-time error JS1002: Syntax error: }
(176,37-38): run-time error JS1004: Expected ';': {
(187,27-28): run-time error JS1014: Invalid character: `
(187,30-31): run-time error JS1004: Expected ';': {
(187,49-50): run-time error JS1014: Invalid character: `
(198,20-21): run-time error JS1014: Invalid character: `
(198,22-23): run-time error JS1004: Expected ';': {
(198,30-31): run-time error JS1004: Expected ';': {
(198,50-51): run-time error JS1014: Invalid character: `
(200,16-17): run-time error JS1014: Invalid character: `
(200,19-20): run-time error JS1004: Expected ';': {
(200,39-40): run-time error JS1014: Invalid character: `
(204,28-29): run-time error JS1195: Expected expression: >
(214,23-24): run-time error JS1014: Invalid character: `
(214,25-26): run-time error JS1004: Expected ';': {
(214,30-31): run-time error JS1195: Expected expression: =
(214,49-50): run-time error JS1004: Expected ';': {
(214,78-79): run-time error JS1195: Expected expression: /
(214,79-80): run-time error JS1014: Invalid character: `
(220,23-24): run-time error JS1014: Invalid character: `
(220,25-26): run-time error JS1004: Expected ';': {
(220,30-31): run-time error JS1195: Expected expression: =
(220,49-50): run-time error JS1004: Expected ';': {
(220,72-73): run-time error JS1014: Invalid character: `
(226,23-24): run-time error JS1014: Invalid character: `
(226,25-26): run-time error JS1004: Expected ';': {
(226,30-31): run-time error JS1195: Expected expression: =
(226,49-50): run-time error JS1004: Expected ';': {
(226,78-79): run-time error JS1195: Expected expression: /
(226,79-80): run-time error JS1014: Invalid character: `
(230,44-45): run-time error JS1014: Invalid character: `
(230,46-47): run-time error JS1195: Expected expression: ^
(230,49-50): run-time error JS1195: Expected expression: )
(230,58-59): run-time error JS1195: Expected expression: =
(230,63-64): run-time error JS1195: Expected expression: ]
(230,71-72): run-time error JS1014: Invalid character: `
(236,19-20): run-time error JS1014: Invalid character: `
(236,20-21): run-time error JS1195: Expected expression: .
(236,30-31): run-time error JS1006: Expected ')': a
(236,47-48): run-time error JS1014: Invalid character: `
(236,48-49): run-time error JS1004: Expected ';': )
(237,11-12): run-time error JS1014: Invalid character: `
(237,12-13): run-time error JS1195: Expected expression: .
(237,22-23): run-time error JS1004: Expected ';': a
(237,39-40): run-time error JS1014: Invalid character: `
(237,40-41): run-time error JS1004: Expected ';': )
(237,42-47): run-time error JS1197: Too many errors. The file might not be a JavaScript file: click
(234,1-34): run-time error JS1301: End of file encountered before function is properly closed: function enableIncomingTabPanel()
(237,48-49): run-time error JS1195: Expected expression: )
(241,27-28): run-time error JS1195: Expected expression: >
(241,29-30): run-time error JS1197: Too many errors. The file might not be a JavaScript file: {
 */
/*!
 * Bootstrap v3.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under the MIT license
 */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.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(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.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(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.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},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.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 o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(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},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.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>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);;
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
 * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
 *  */

!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);;
/*Fixes the Theatre Select Div to the top of the screen, when scrolling*/

$(document).ready(function () {

    //Common
    var body = $('body');
    var topSnipeBanner = $('.snipe-container');
    var topSnipeBannerHeight = topSnipeBanner.length ? topSnipeBanner.outerHeight() : 0;
    var topSnipeIsScrollabe = topSnipeBanner.hasClass('snipe-scrollable') ? true : false;
    var headerNavBar = $('header .navbar');
    var mobileNavBar = $('#mobileNavBar');
    var showtimeBlockHeader = $('.showtimeBlockHeader'); //Date picker
    var sbhNudge = 10;
    var sbhHeight = showtimeBlockHeader.outerHeight() + sbhNudge;
    var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

    //Page heading
    var pageTitleBlock = $('.page-title-block');
    var pageTitleBlockHeight = pageTitleBlock.length ? pageTitleBlock.outerHeight() : 0;

    //Tabbed navigation
    var tabbedNav = $('.tabbed-navigation');
    var tabbedNavHeight = tabbedNav.length ? tabbedNav.outerHeight() : 0;

    //Theatre page
    var theatreSelector = $('#theatreSelector'); //Heading
    var tsHeight = theatreSelector.outerHeight(true);
    var theatreBlockTabs = $('.theatreBlockTabs');

    //Movie page
    var topTitleBlock = $('.topTitleBlock:not(.topTheatreBlock)'); //Heading
    var ttbHeight = topTitleBlock.length ? topTitleBlock.outerHeight() : 0;
    var mdsHeight = $('.movieDateSelector').outerHeight();
    var searchResults = $('#SearchResults'); //Body
    var movieHeadingSpacer = $('#movieHeadingSpacer');
    var movieShowtimeColumnSpacer = $('#movieShowtimeColumnSpacer');

    //Movies page
    var moviesTitleTabs = $('.containerTitleTabs');

    //SmartBanner iOS behavior
    var smartbanner = null;
    var smartbannerExit = null;
    var smartbannerHeight = 0;

    var t = setInterval(initSmartBanner, 1000);

    function initSmartBanner() {
        smartbanner = $('.smartbanner--ios');

        if (smartbanner.length) {
            smartbannerHeight = smartbanner.outerHeight();

            smartbannerExit = smartbanner.find('.js_smartbanner__exit');

            $(smartbannerExit).click(function () {
                smartbannerHeight = 0;

                handleHeaderSmartBannerPosition();
            });

            handleHeaderSmartBannerPosition();

            $('.js_smartbanner').insertBefore('header');

            clearInterval(t);
        }
    }

    // Stop checking for the SmartBanner after a set time
    setTimeout(function () {
        clearInterval(t);
    }, 5000);

    function handleHeaderSmartBannerPosition() {
        let headerNavBarHeight = headerNavBar.outerHeight();

        if (smartbanner.length && $(window).scrollTop() < smartbannerHeight) {
            headerNavBar.addClass('smartbanner--ios');
            topTitleBlock.addClass('smartbanner--ios');
            topSnipeBanner.addClass('smartbanner--ios');
            pageTitleBlock.addClass('smartbanner--ios');
            tabbedNav.addClass('smartbanner--ios');
        } else {
            headerNavBar.removeClass('smartbanner--ios');
            topTitleBlock.removeClass('smartbanner--ios');
            topSnipeBanner.removeClass('smartbanner--ios');
            pageTitleBlock.removeClass('smartbanner--ios');
            tabbedNav.removeClass('smartbanner--ios');
        }
    }

    function checkStickyMovieDetail() {
        let headerNavBarHeight = (topSnipeIsScrollabe ? topSnipeBannerHeight + smartbannerHeight : smartbannerHeight);
        let headerHeadingHeight = (!topSnipeIsScrollabe ? topSnipeBannerHeight + headerNavBar.outerHeight() + theatreSelector.outerHeight() + showtimeBlockHeader.outerHeight() : headerNavBar.outerHeight() + theatreSelector.outerHeight() + showtimeBlockHeader.outerHeight());
        var headingRefPos = movieHeadingSpacer.offset().top - $(window).scrollTop();
        var datePickerRefPos = movieShowtimeColumnSpacer.offset().top - $(window).scrollTop();

        //The Movie Detail heading
        if ($(window).scrollTop() > headerNavBarHeight) {
            topTitleBlock.addClass("stick");
            mobileNavBar.addClass("stuck");
            movieHeadingSpacer.height(ttbHeight);
            theatreBlockTabs.css('display', 'none');
        } else {
            topTitleBlock.removeClass("stick");
            mobileNavBar.removeClass("stuck");
            movieHeadingSpacer.height(0);
            ttbHeight = topTitleBlock.outerHeight(true);
            theatreBlockTabs.css('display', 'block');
        }
        //The Movie Detail date picker
        if (datePickerRefPos < headerHeadingHeight) {
            if (!topTitleBlock.hasClass("stuck")) {
                showtimeBlockHeader.addClass("stick");
                topTitleBlock.addClass("stuck");
                movieShowtimeColumnSpacer.height(sbhHeight);
            }
        } else {
            showtimeBlockHeader.removeClass("stick");
            topTitleBlock.removeClass("stuck");
            movieShowtimeColumnSpacer.height(0);
            sbhHeight = showtimeBlockHeader.outerHeight() + sbhNudge;
        }
    }

    function stickyTitleOffset() {
        var stickyMovieTitleBlock = $('.page-title-offset');

        if (stickyMovieTitleBlock.length > 0 && $('.snipe-fixed').length > 0) {
            stickyMovieTitleBlock.css('top', $('header.header').outerHeight() + $('.snipe-fixed').outerHeight());
        } else if (stickyMovieTitleBlock.length > 0) {
            stickyMovieTitleBlock.css('top', $('header.header').outerHeight());
        }
    }

    if (movieShowtimeColumnSpacer.length) {
        var timer;
        $(window).scroll(function () {
            clearTimeout(timer);
            timer = setTimeout(function () {
                checkStickyMovieDetail();
            }, 5);
        });
        //This is better than nothing, but Chrome doesn't call it until after you scroll again
        $(window).resize(function () {
            clearTimeout(timer);
            timer = setTimeout(function () {
                tsHeight = theatreSelector.outerHeight(true);
                ttbHeight = topTitleBlock.outerHeight(true);
                sbhHeight = showtimeBlockHeader.outerHeight() + sbhNudge;
                windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
                stickyTitleOffset();
            }, 5);
        });
    }
});;
if (!String.prototype.format) {
    // FIXME: we shouldn't be adding to the native types
    /* eslint-disable-next-line no-extend-native */
    String.prototype.format = function (...args) {
        return this.replace(/{(\d+)}/g, (match, number) => (args[number] || match));
    };
}
if (!String.prototype.safeIntParse) {
    // FIXME: we shouldn't be adding to the native types
    /* eslint-disable-next-line no-extend-native */
    String.prototype.safeIntParse = function () {
        return !isNaN(parseInt(this)) ? parseInt(this) : 0;
    };
}
if (!Number.prototype.formatCurrency) {
    // FIXME: we shouldn't be adding to the native types
    /* eslint-disable-next-line no-extend-native */
    Number.prototype.formatCurrency = function () {
        const formatted = `$${(this).toFixed(2)}`;
        return formatted;
    };
}
if (!Number.prototype.formatCurrencyNegative) {
    // FIXME: we shouldn't be adding to the native types
    /* eslint-disable-next-line no-extend-native */
    Number.prototype.formatCurrencyNegative = function () {
        const sign = this.toString().charAt(0);
        const value = Math.abs(this);
        if (sign === '-') {
            return `${sign}$${(value).toFixed(2)}`;
        }
        return `$${(value).toFixed(2)}`;
    };
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
const filterInt = (value) => {
    if (/^(-|\+)?([0-9]+|Infinity)$/.test(value)) {
        return Number(value);
    }
    return NaN;
};
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function setCookie(key, value) {
    const expires = new Date();
    expires.setTime(expires.getTime() + 31536000000); // 1 year
    document.cookie = `${key}=${value};expires=${expires.toUTCString()};path=/`;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function setCookieWithDuration(key, value, duration) {
    const expires = new Date();
    expires.setTime(expires.getTime() + duration);
    document.cookie = `${key}=${value};expires=${expires.toUTCString()}`;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function setCookieWithDurationAtRootPath(key, value, duration) {
    const expires = new Date();
    expires.setTime(expires.getTime() + duration);
    document.cookie = `${key}=${value};expires=${expires.toUTCString()};path=/`;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function getCookie(key) {
    const keyValue = document.cookie.match(`(^|;) ?${key}=([^;]*)(;|$)`);
    return keyValue ? keyValue[2] : undefined;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function enableIncomingTabPanel() {
    const hash = document.location.hash;
    if (hash && $(`.nav-tabs a[href="${hash}"]`).length) {
        $(`.nav-tabs a[href="${hash}"]`).click();
    }
    // Change hash for page-reload
    $('.nav-tabs a:not(.prevent-hash)')
        .on('click', (e) => {
        let anchor = e.target;
        if (window.location.hash !== (anchor.hash || '')) {
            window.location.hash = anchor.hash;
        }
    });
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function getParameterByName(name, url) {
    let updatedUrl = url;
    if (!updatedUrl) {
        updatedUrl = window.location.href;
    }
    const updatedName = name.replace(/[[\]]/g, '\\$&');
    const regex = new RegExp(`[?&]${updatedName}(=([^&#]*)|&|#|$)`);
    const results = regex.exec(updatedUrl);
    if (!results) {
        return null;
    }
    if (!results[2]) {
        return '';
    }
    return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function setParameterByName(name, value, url) {
    let updatedUrl = url;
    if (!updatedUrl) {
        updatedUrl = window.location.search;
    }
    // FIXME: what regex is this supposed to represent? we are escaping a square bracket?
    const updatedName = name.replace(/[[]]/g, '\\$&');
    const regex = new RegExp(`([?&])${updatedName}(=([^&#]*)(&|#|$))`);
    const results = regex.exec(updatedUrl);
    if (results) {
        // replace name/value pair
        return updatedUrl.replace(regex, `$1${updatedName}=${value}$4`);
    }
    // concat name/value pair
    const delim = updatedUrl.indexOf('?') < 0 ? '?' : '&';
    return `${updatedUrl + delim + updatedName}=${value}`;
}
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function stringToDate(date, format) {
    const delimiter = format.match(/\W/g)[0];
    const formatLowerCase = format.toLowerCase();
    const formatItems = formatLowerCase.split(delimiter);
    const dateItems = date.split(delimiter);
    const monthIndex = formatItems.indexOf('MM');
    const dayIndex = formatItems.indexOf('dd');
    const yearIndex = formatItems.indexOf('yyyy');
    let month = parseInt(dateItems[monthIndex]);
    month -= 1;
    return new Date(parseInt(dateItems[yearIndex]), month, parseInt(dateItems[dayIndex]));
}
//# sourceMappingURL=functions.js.map;
/* eslint-disable spaced-comment */
/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="../typings/linq/linq.d.ts" />
/* eslint-enable spaced-comment */
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-unused-vars */
var Cinemark;
(function (Cinemark) {
    let Models;
    (function (Models) {
        /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
        class BaseModel {
            static parseJson(data) {
                /* eslint-disable-next-line @typescript-eslint/prefer-optional-chain */
                return JSON && JSON.parse && data.length > 0
                    ? JSON.parse(data, (key, value) => {
                        if (key !== 'brokerProduct') {
                            return value;
                        }
                    })
                    /* eslint-disable-next-line no-new-func */ /* eslint-disable-next-line @typescript-eslint/no-implied-eval */
                    : (new Function(`return ${data}`))();
            }
            /* eslint-disable-next-line @typescript-eslint/prefer-function-type */
            static fromJsonArray(m, json) {
                const models = new Array();
                const parsedValues = this.parseJson(json);
                if (parsedValues !== undefined) {
                    parsedValues.forEach((e) => {
                        const newModel = this.fromJson(m, e, false);
                        models.push(newModel);
                    });
                }
                return models;
            }
            /* eslint-disable-next-line @typescript-eslint/prefer-function-type */
            static fromJson(m, json, parseJson = true) {
                if (parseJson) {
                    // FIXME: we shouldn't reassign parameters, but not sure if the param is used again after assignment somewhere else
                    /* eslint-disable-next-line no-param-reassign */
                    json = BaseModel.parseJson(json);
                }
                /* eslint-disable-next-line new-cap */
                const model = new m();
                const newModel = jQuery.extend(model, json);
                return newModel;
            }
        }
        Models.BaseModel = BaseModel;
        class Theater extends BaseModel {
            constructor() {
                super(...arguments);
                this.isFavorite = false;
            }
        }
        Models.Theater = Theater;
        class Amenity extends BaseModel {
        }
        Models.Amenity = Amenity;
        class Product extends BaseModel {
            getStateBasedListPrice(stateCode) {
                let price = this.basePrice;
                const x = Enumerable.from(this.priceList)
                    .firstOrDefault(p => p.key.toLowerCase() === stateCode.toLowerCase());
                if (typeof x !== 'undefined' && x !== null) {
                    price = parseFloat(x.value);
                }
                return price;
            }
        }
        Models.Product = Product;
        class BoxProduct extends Product {
            constructor() {
                super(...arguments);
                this.linkedShowtimeId = 0;
                this.isPrimaryShowtime = true;
            }
            asRequestString() {
                const request = `${this.id}-${this.variantId}-${this.showtimeId}-${this.linkedShowtimeId}-${this.isPrimaryShowtime}-${this.quantity}`;
                return request;
            }
        }
        Models.BoxProduct = BoxProduct;
        class PriceAdjustment {
        }
        Models.PriceAdjustment = PriceAdjustment;
        class ConcessionProduct extends Product {
        }
        Models.ConcessionProduct = ConcessionProduct;
        class ConcessionComboProduct extends ConcessionProduct {
        }
        Models.ConcessionComboProduct = ConcessionComboProduct;
        class ShoppingCartItem extends BaseModel {
        }
        Models.ShoppingCartItem = ShoppingCartItem;
        class ConcessionItem extends ShoppingCartItem {
        }
        Models.ConcessionItem = ConcessionItem;
        class ConcessionComboItem extends ConcessionItem {
        }
        Models.ConcessionComboItem = ConcessionComboItem;
        class ComboSlot extends BaseModel {
        }
        Models.ComboSlot = ComboSlot;
        class ComboComponent extends ConcessionProduct {
        }
        Models.ComboComponent = ComboComponent;
        class ProductUpsellDetails {
        }
        Models.ProductUpsellDetails = ProductUpsellDetails;
        class ProductModifierSection extends BaseModel {
        }
        Models.ProductModifierSection = ProductModifierSection;
        class ProductModifier extends BaseModel {
        }
        Models.ProductModifier = ProductModifier;
        class Movie extends BaseModel {
        }
        Models.Movie = Movie;
        class Ticket extends ShoppingCartItem {
        }
        Models.Ticket = Ticket;
        class Payment extends BaseModel {
        }
        Models.Payment = Payment;
        class IngredientModifier extends BaseModel {
        }
        Models.IngredientModifier = IngredientModifier;
        class Observer {
            constructor() {
                this.observers = new Array();
            }
            attach(callback) {
                this.observers.push(callback);
            }
            notify(...args) {
                for (let i = 0, len = this.observers.length; i < len; i++) {
                    this.observers[i].apply(null, args);
                }
            }
        }
        Models.Observer = Observer;
        class MarketingArea extends BaseModel {
        }
        Models.MarketingArea = MarketingArea;
        class GiftCard extends BaseModel {
            constructor() {
                super(...arguments);
                this.tipAmount = 0;
            }
        }
        Models.GiftCard = GiftCard;
        class Purchase extends BaseModel {
        }
        Models.Purchase = Purchase;
        class WalletPaymentInfo extends BaseModel {
        }
        Models.WalletPaymentInfo = WalletPaymentInfo;
        class DiscountDetail extends BaseModel {
        }
        Models.DiscountDetail = DiscountDetail;
        class RedemptionDetail extends BaseModel {
        }
        Models.RedemptionDetail = RedemptionDetail;
        class RoktCustomerDataViewModel extends BaseModel {
        }
        Models.RoktCustomerDataViewModel = RoktCustomerDataViewModel;
        class ChangeSubscriptionPlanDetail extends BaseModel {
        }
        Models.ChangeSubscriptionPlanDetail = ChangeSubscriptionPlanDetail;
        class SubscriptionPricingDetail extends BaseModel {
        }
        Models.SubscriptionPricingDetail = SubscriptionPricingDetail;
        class SubscriptionsBillingZipUpdatedViewModel extends BaseModel {
        }
        Models.SubscriptionsBillingZipUpdatedViewModel = SubscriptionsBillingZipUpdatedViewModel;
        class StoreCredit extends BaseModel {
        }
        Models.StoreCredit = StoreCredit;
        class Seat extends BaseModel {
        }
        Models.Seat = Seat;
        class WebsiteTransDetail extends BaseModel {
        }
        Models.WebsiteTransDetail = WebsiteTransDetail;
        class TicketDetail extends WebsiteTransDetail {
        }
        Models.TicketDetail = TicketDetail;
        class ConcessionDetail extends WebsiteTransDetail {
        }
        Models.ConcessionDetail = ConcessionDetail;
        class StartingSoon extends BaseModel {
        }
        Models.StartingSoon = StartingSoon;
        class ConcessionItemCategory extends BaseModel {
        }
        Models.ConcessionItemCategory = ConcessionItemCategory;
        class ConcessionProductHistory extends BaseModel {
        }
        Models.ConcessionProductHistory = ConcessionProductHistory;
        class ProductHistoryGroup {
        }
        Models.ProductHistoryGroup = ProductHistoryGroup;
        class LoyaltyReward extends BaseModel {
        }
        Models.LoyaltyReward = LoyaltyReward;
        class ModelErrors extends BaseModel {
        }
        Models.ModelErrors = ModelErrors;
        class ModelError extends BaseModel {
        }
        Models.ModelError = ModelError;
        class ShowtimeByTrailer extends BaseModel {
        }
        Models.ShowtimeByTrailer = ShowtimeByTrailer;
        class ShippingInfo extends BaseModel {
        }
        Models.ShippingInfo = ShippingInfo;
        class ItemWithIdAndName extends BaseModel {
        }
        Models.ItemWithIdAndName = ItemWithIdAndName;
        class ConcessionItemsThatRequireAttention extends BaseModel {
        }
        Models.ConcessionItemsThatRequireAttention = ConcessionItemsThatRequireAttention;
    })(Models = Cinemark.Models || (Cinemark.Models = {}));
})(Cinemark || (Cinemark = {}));
//# sourceMappingURL=models.js.map;
/// <reference path="tealium.ts" />
/// <reference path="../typings/spin/spin.d.ts"/>
/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="models.ts"/>
/// <reference path="functions.ts"/>
/// <reference path="theaterSearch.ts"/>
/// <reference path="geolocation.ts"/>
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var Cinemark;
(function (Cinemark) {
    var spinner;
    var spinDiv;
    Cinemark.spinnerOptions = {
        lines: 11,
        length: 16,
        width: 7,
        radius: 18,
        scale: 1,
        corners: 1,
        color: "#000",
        opacity: 0.1,
        rotate: 0,
        direction: 1,
        speed: 1.1,
        trail: 60,
        fps: 20,
        zIndex: 2e9,
        className: "spinner",
        top: "50%",
        left: "50%",
        shadow: false,
        hwaccel: false,
        position: "fixed" // Element positioning
    };
    function getBaseUmbracoApiUrl() {
        return this.baseUrl + "/umbraco/surface/";
    }
    Cinemark.getBaseUmbracoApiUrl = getBaseUmbracoApiUrl;
    function getBaseUrl() {
        return this.baseUrl;
    }
    Cinemark.getBaseUrl = getBaseUrl;
    function setBaseUrl(url) {
        this.baseUrl = url;
    }
    Cinemark.setBaseUrl = setBaseUrl;
    function isBetween(numberToCheck, firstValue, secondValue) {
        var min = Math.min.apply(Math, [firstValue, secondValue]), max = Math.max.apply(Math, [firstValue, secondValue]);
        return numberToCheck >= min && numberToCheck <= max;
    }
    Cinemark.isBetween = isBetween;
    function getAntiForgeryToken(parentElement) {
        var token = "";
        if (parentElement.querySelector('input[name="__RequestVerificationToken"]') === null) {
            token = $('input[name="__RequestVerificationToken"]').val();
        }
        else {
            token = parentElement.querySelector('input[name="__RequestVerificationToken"]').value;
        }
        return token;
    }
    Cinemark.getAntiForgeryToken = getAntiForgeryToken;
    function parseJSON(data) {
        return JSON && JSON.parse
            ? JSON.parse(data, (key, value) => {
                if (key !== "brokerProduct") {
                    return value;
                }
            })
            : (new Function("return " + data))();
    }
    Cinemark.parseJSON = parseJSON;
    function formatCurrency(amount) {
        var formatted = `$${(amount).toFixed(2)}`;
        return formatted;
    }
    Cinemark.formatCurrency = formatCurrency;
    /**
    * Converts num to a decimal string (if it isn't one already) and then rounds it
    * to at most dp decimal places.
    *
    * For explanation of why you'd want to perform rounding operations on a String
    * rather than a Number, see http://stackoverflow.com/a/38676273/1709587
    *
    * @param {(number|string)} num
    * @param {number} dp
    * @return {string}
    */
    function roundStringNumberWithoutTrailingZeroes(num, dp) {
        if (arguments.length != 2)
            throw new Error("2 arguments required");
        num = String(num);
        if (num.indexOf('e+') != -1) {
            // Can't round numbers this large because their string representation
            // contains an exponent, like 9.99e+37
            throw new Error("num too large");
        }
        if (num.indexOf('.') == -1) {
            // convert back to a number
            return Number(num);
        }
        var parts = num.split('.'), beforePoint = parts[0], afterPoint = parts[1], shouldRoundUp = afterPoint[dp] >= 5, finalNumber;
        afterPoint = afterPoint.slice(0, dp);
        if (!shouldRoundUp) {
            finalNumber = beforePoint + '.' + afterPoint;
        }
        else if (/^9+$/.test(afterPoint)) {
            // If we need to round up a number like 1.9999, increment the integer
            // before the decimal point and discard the fractional part.
            finalNumber = Number(beforePoint) + 1;
        }
        else {
            // Starting from the last digit, increment digits until we find one
            // that is not 9, then stop
            var i = dp - 1;
            while (true) {
                if (afterPoint[i] == '9') {
                    afterPoint = afterPoint.substr(0, i) +
                        '0' +
                        afterPoint.substr(i + 1);
                    i--;
                }
                else {
                    afterPoint = afterPoint.substr(0, i) +
                        (Number(afterPoint[i]) + 1) +
                        afterPoint.substr(i + 1);
                    break;
                }
            }
            finalNumber = beforePoint + '.' + afterPoint;
        }
        // Remove trailing zeroes from fractional part before returning
        return parseFloat(finalNumber.replace(/0+$/, ''));
    }
    Cinemark.roundStringNumberWithoutTrailingZeroes = roundStringNumberWithoutTrailingZeroes;
    function errorMessage(positionError) {
        var errorMessage = "";
        switch (positionError.code) {
            case positionError.PERMISSION_DENIED:
                errorMessage = "User denied the request for Geolocation.";
                break;
            case positionError.POSITION_UNAVAILABLE:
                errorMessage = "Location information is unavailable.";
                break;
            case positionError.TIMEOUT:
                errorMessage = "The request to get user location timed out.";
                break;
            default:
                errorMessage = "An unknown error occurred.";
                break;
        }
        return errorMessage;
    }
    Cinemark.errorMessage = errorMessage;
    function getCreditCardIssuer(cardNumber) {
        var re = new RegExp("^4");
        if (cardNumber.match(re) != null)
            return "Visa";
        re = new RegExp("^5[1-5]");
        if (cardNumber.match(re) != null)
            return "MasterCard";
        re = new RegExp("^3[47]");
        if (cardNumber.match(re) != null)
            return "AmericanExpress";
        re = new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)");
        if (cardNumber.match(re) != null)
            return "Discover";
        re = new RegExp("^36");
        if (cardNumber.match(re) != null)
            return "unknown card: Diners";
        re = new RegExp("^30[0-5]");
        if (cardNumber.match(re) != null)
            return "unknown card: Diners - Carte Blanche";
        re = new RegExp("^35(2[89]|[3-8][0-9])");
        if (cardNumber.match(re) != null)
            return "unknown card: JCB";
        re = new RegExp("^(4026|417500|4508|4844|491(3|7))");
        if (cardNumber.match(re) != null)
            return "unknown card: Visa Electron";
        return "unknown";
    }
    Cinemark.getCreditCardIssuer = getCreditCardIssuer;
    function initializeSpinner(selector) {
        spinDiv = jQuery(selector)[0];
        if (spinDiv !== undefined) {
            spinner = new Spinner(Cinemark.spinnerOptions);
            // wire up spinner to start/stop for all ajax calls
            $(document)
                .ajaxStart(() => {
                spinner.spin(spinDiv);
            })
                .ajaxStop(() => {
                spinner.stop();
            });
        }
    }
    Cinemark.initializeSpinner = initializeSpinner;
    function getParameterByName(name, url = window.location.href) {
        name = name.replace(/[\[\]]/g, '\\$&');
        var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
        if (!results)
            return null;
        if (!results[2])
            return '';
        return decodeURIComponent(results[2].replace(/\+/g, ' '));
    }
    Cinemark.getParameterByName = getParameterByName;
    function scrollToTop(element) {
        $('html, body')
            .animate({
            'scrollTop': $(element).offset().top
        }, 500);
    }
    Cinemark.scrollToTop = scrollToTop;
    function startSpinner() {
        spinner.spin(spinDiv);
        Cinemark.ARIALiveUpdateAddMessage('Content is loading');
    }
    Cinemark.startSpinner = startSpinner;
    function stopSpinner() {
        spinner.stop();
        Cinemark.ARIALiveUpdateAddMessage('Content has finished loading');
    }
    Cinemark.stopSpinner = stopSpinner;
    function formatNumericInputValue(input) {
        input.addEventListener('keyup', (e) => {
            const originalValue = input.value;
            const regex = /\D/g;
            const updatedValue = originalValue.replace(regex, '');
            input.value = updatedValue;
        });
    }
    Cinemark.formatNumericInputValue = formatNumericInputValue;
    function validateEmailAddress(emailAddressField, invalidEmailMessageDiv) {
        var emailAddress = emailAddressField.value;
        emailAddress = emailAddress.replace('+', '%2B'); // plus signs in email address get url-encoded to spaces in the subsequent api call, this escapes them to preserve the +
        var url = `${Cinemark.getBaseUmbracoApiUrl()}membership/ValidateEmailAddress?emailAddress=${emailAddress}`;
        if (emailAddress.length > 0) {
            $.ajax({
                type: "GET",
                cache: false,
                url: url,
                success: (emailValidationResult) => {
                    var invalid = emailValidationResult.IsSuccess &&
                        (!emailValidationResult.IsValid || emailValidationResult.IsEmailSuggested);
                    var messageSpan = invalidEmailMessageDiv.getElementsByTagName("span")[0];
                    if (emailValidationResult.IsValid) {
                        sessionStorage.setItem(emailAddressField.value, emailValidationResult.IsValid);
                    }
                    if (messageSpan != null) {
                        messageSpan.innerHTML = invalid ? emailValidationResult.Message : "";
                    }
                    invalidEmailMessageDiv.hidden = !invalid;
                    if (emailAddressField != null && emailValidationResult.IsEmailSuggested) {
                        invalidEmailMessageDiv.onclick = (event) => {
                            emailAddressField.value = emailValidationResult.SuggestedEmailAddress;
                            if (messageSpan != null) {
                                messageSpan.innerHTML = "";
                            }
                            invalidEmailMessageDiv.hidden = true;
                        };
                    }
                    else {
                        invalidEmailMessageDiv.onclick = null;
                    }
                }
            });
        }
    }
    Cinemark.validateEmailAddress = validateEmailAddress;
    function postClientSideError(errorType) {
        var url = `${Cinemark.getBaseUmbracoApiUrl()}Error/PostClientSideError`;
        $.ajax({
            global: false,
            type: "POST",
            url: url,
            data: { errorType: errorType },
            error: (request) => {
                //do nothing
            }
        });
    }
    Cinemark.postClientSideError = postClientSideError;
    function ajax(url, method = 'GET', data = null, contentType = 'application/json') {
        return new Promise((resolve, reject) => {
            const xhr = new XMLHttpRequest();
            xhr.open(method, url, true);
            xhr.setRequestHeader('Content-Type', contentType);
            xhr.onreadystatechange = () => {
                if (xhr.readyState === 4) {
                    if (xhr.status >= 200 && xhr.status < 300) {
                        if (contentType === 'application/json') {
                            resolve(JSON.parse(xhr.responseText));
                        }
                        else {
                            resolve(xhr.responseText);
                        }
                    }
                    else {
                        reject(xhr.statusText);
                    }
                }
            };
            xhr.onerror = () => reject(xhr.statusText);
            if (method === 'POST' && data) {
                xhr.send(JSON.stringify(data));
            }
            else {
                xhr.send();
            }
        });
    }
    Cinemark.ajax = ajax;
    class Error {
        constructor(type, message) {
            this.type = "";
            this.type = type;
            this.message = message;
        }
    }
    Cinemark.Error = Error;
    class ValidationSummary {
        constructor(form, rules, validationSummary, checkoutRules = null) {
            this.form = form;
            this.rules = rules;
            this.checkoutRules = checkoutRules;
            this.validationSummaryDiv = validationSummary;
        }
        clearErrorSummary() {
            if (typeof this.validationSummaryDiv !== "undefined" && this.validationSummaryDiv !== null) {
                var errors = jQuery(this.validationSummaryDiv.getElementsByClassName("error"));
                if (typeof errors !== "undefined") {
                    jQuery(errors).hide();
                }
                var errorSummaries = jQuery(this.validationSummaryDiv).children("ul#errorSummary");
                if (typeof errorSummaries !== "undefined") {
                    jQuery(errorSummaries).hide();
                }
                jQuery(this.validationSummaryDiv).children("ul#errorSummary").hide();
                this.validationSummaryDiv.classList.add("validation-summary-valid");
                this.validationSummaryDiv.classList.remove("validation-summary-errors");
                this.validationSummaryDiv.hidden = true;
            }
        }
        refreshErrorSummary() {
            var errors;
            if (this.checkoutRules != null) {
                if (typeof this.checkoutRules !== "undefined" && typeof this.checkoutRules.errors !== "undefined")
                    errors = this.rules.errors.concat(this.checkoutRules.errors);
            }
            else {
                errors = this.rules.errors;
            }
            if (errors.length > 0) {
                var listItem;
                jQuery(this.validationSummaryDiv).children("ul#errorSummary").remove();
                var unorderedList = document.createElement("ul");
                unorderedList.id = "errorSummary";
                errors.forEach(e => {
                    listItem = document.createElement("li");
                    listItem.innerHTML = e.message;
                    listItem.classList.add(e.type);
                    listItem.classList.add("error");
                    unorderedList.appendChild(listItem);
                });
                jQuery(this.validationSummaryDiv).prepend(unorderedList);
                this.validationSummaryDiv.classList.remove("validation-summary-valid");
                this.validationSummaryDiv.classList.add("validation-summary-errors");
                this.rules.errors = [];
                if (this.checkoutRules != null) {
                    this.checkoutRules.errors = [];
                }
            }
            this.validationSummaryDiv.hidden = false;
        }
        refreshErrorSummaryWithConditionalMessaging(triggerMessage, conditionalMessageListItem) {
            if (this.rules.errors.length > 0) {
                var listItem;
                $("#errorSummary").remove();
                var unorderedList = document.createElement("ul");
                unorderedList.id = "errorSummary";
                this.rules.errors.forEach(e => {
                    listItem = document.createElement("li");
                    listItem.innerHTML = e.message;
                    listItem.classList.add(e.type);
                    listItem.classList.add("error");
                    unorderedList.appendChild(listItem);
                    if (e.message == triggerMessage) {
                        conditionalMessageListItem.classList.add(e.type);
                        conditionalMessageListItem.classList.add("error");
                        unorderedList.appendChild(conditionalMessageListItem);
                    }
                });
                jQuery(this.validationSummaryDiv).prepend(unorderedList);
                this.validationSummaryDiv.classList.remove("validation-summary-valid");
                this.validationSummaryDiv.classList.add("validation-summary-errors");
                this.rules.errors = [];
            }
            this.validationSummaryDiv.hidden = false;
        }
        refreshWarningSummary() {
            if (this.rules.warnings.length > 0) {
                var listItem;
                this.validationSummaryDiv.innerHTML = "";
                var unorderedList = document.createElement("ul");
                this.rules.warnings.forEach(w => {
                    listItem = document.createElement("li");
                    listItem.innerText = w;
                    listItem.classList.add("warning");
                    unorderedList.appendChild(listItem);
                });
                this.validationSummaryDiv.appendChild(unorderedList);
                this.validationSummaryDiv.hidden = false;
                this.rules.errors = [];
            }
        }
    }
    Cinemark.ValidationSummary = ValidationSummary;
    class FavoriteTheater {
        constructor() {
            this.favToggleDiv = $("span.favToggle");
        }
        initialize() {
            this.bindFavIcons();
        }
        bindFavIcons() {
            this.favToggleDiv.on("click", (e) => {
                e.preventDefault();
                var favTheaterToggle = e.currentTarget;
                var favTheaterIcon = favTheaterToggle.querySelector("svg");
                var theaterId = favTheaterToggle.getAttribute("data-theaterId");
                if (favTheaterIcon.classList.contains("favoriteOn")) {
                    favTheaterIcon.classList.remove("favoriteOn");
                    favTheaterIcon.classList.add("favoriteOff");
                    this.toggleFavoriteTheater(theaterId, false);
                }
                else {
                    favTheaterIcon.classList.remove("favoriteOff");
                    favTheaterIcon.classList.add("favoriteOn");
                    this.toggleFavoriteTheater(theaterId, true);
                }
                return false;
            });
        }
        toggleFavoriteTheater(theaterId, isFavorite) {
            var toggleFavTheaterUrl = `${Cinemark.getBaseUmbracoApiUrl()}Account/ToggleFavoriteTheater`;
            var token = Cinemark.getAntiForgeryToken($("#FavoriteTheaterForm")[0]);
            showToastMessage('toast', `Theatre ${isFavorite ? 'Added to' : 'Removed from'} Favorites`);
            $.ajax({
                type: 'POST',
                cache: false,
                headers: { "cache-control": "no-cache" },
                url: toggleFavTheaterUrl,
                data: {
                    theaterId: theaterId,
                    isFavorite: isFavorite,
                    __RequestVerificationToken: token
                },
                success: (data) => {
                    return false;
                },
                error: (XMLHttpRequest, textStatus, errorThrown) => {
                    Cinemark.showToastMessage('toast', 'Unable to mark the theatre as favorite. ' + errorThrown);
                }
            });
        }
    }
    Cinemark.FavoriteTheater = FavoriteTheater;
    function showToastMessage(elementId, message = "") {
        var toaster = document.getElementById(elementId);
        var main = document.getElementById('main');
        var header = document.getElementsByTagName('header');
        if (header.length) {
            toaster.style.top = `${header[0].offsetHeight + 20}px`;
        }
        else {
            toaster.style.top = '20px';
        }
        if (toaster) {
            if (message.length > 0) {
                toaster.innerHTML = message;
                toaster.className += toaster.className ? " show" : "show";
            }
            if (main) {
                main.style.position = 'relative';
            }
        }
        //Hide success toast
        setTimeout(() => {
            if (toaster) {
                toaster.className = toaster.className.replace("show", "");
            }
            if (main) {
                main.style.position = 'static';
            }
        }, 3000);
    }
    Cinemark.showToastMessage = showToastMessage;
    function watchListEmailSubscribed() {
        let watchListRemindPanel = $("#WatchListRemindPanel");
        let watchListSubscriptionMessageId = $("#WatchListSubscriptionMessageId");
        let watchListAddedPanel = $('#watchListAddedPanel');
        showToastMessage("toast", "Subscribed to Emails");
        watchListRemindPanel.addClass('hidden');
        watchListAddedPanel.removeClass('hidden');
        const isFeatured = watchListSubscriptionMessageId.attr('data-isFeatured') === "True" ? true : false;
        const isFromWatchList = watchListSubscriptionMessageId.attr('data-isFromWatchList') === "True" ? true : false;
        if (isFeatured || isFromWatchList) {
            watchListSubscriptionMessageId.removeClass('hidden');
        }
    }
    Cinemark.watchListEmailSubscribed = watchListEmailSubscribed;
    function onClickCloseWatchListSubscriptionPannel() {
        if (!localStorage.getItem("CloseWatchListSubscriptionPannel")) {
            localStorage.setItem("CloseWatchListSubscriptionPannel", "true");
        }
        CloseWatchListSubscriptionPannel();
    }
    Cinemark.onClickCloseWatchListSubscriptionPannel = onClickCloseWatchListSubscriptionPannel;
    function CloseWatchListSubscriptionPannel() {
        let WatchListRemindPanel = $("#WatchListRemindPanel");
        if (localStorage.getItem("CloseWatchListSubscriptionPannel") === "true") {
            WatchListRemindPanel.addClass('hidden');
        }
    }
    Cinemark.CloseWatchListSubscriptionPannel = CloseWatchListSubscriptionPannel;
    class WatchList {
        constructor() {
            this.watchListToggleDiv = $("div.watchListToggle");
            this.watchListCheckbox = $('.wl-checkbox');
            this.watchListPanel = $('#watchListPanel');
            this.watchListPanelAddButton = $('#WatchListPanelAddButton');
            this.watchListAddedPanel = $('#watchListAddedPanel');
            this.watchListRemindPanel = $('#WatchListRemindPanel');
            this.watchListRemindPanelButton = $('#btnWatchListSubscription');
            this.watchListLandingPageDiv = $('#watchListLandingPageDiv');
            this.tealium = new Cinemark.Tracking.Tealium;
        }
        initialize() {
            this.bindWatchListIcons();
        }
        bindWatchListIcons() {
            this.watchListToggleDiv.unbind("click");
            this.watchListToggleDiv.bind("click");
            this.watchListToggleDiv.on("click", (e) => {
                this.currentElement = $(e.currentTarget);
                this.movieId = this.currentElement.attr("data-movieId");
                this.movieTitle = this.currentElement.attr("data-movie-title");
                this.isComingSoon = this.currentElement.attr("data-isComingSoon") === "True" ? true : false;
                this.isUserAuthenticated = this.currentElement.attr("data-isuserauthenticated") === "True" ? true : false;
                this.isAddedToWatchList = (this.currentElement.attr("data-watchlist") === "true" ? true : false);
                if (this.isUserAuthenticated) {
                    this.toggleWatchList(this.movieId, this.movieTitle, !this.isAddedToWatchList, this.isComingSoon);
                }
            });
            this.watchListCheckbox.unbind("click");
            this.watchListCheckbox.bind("click");
            this.watchListCheckbox.on("click", (e) => {
                this.currentElement = $(e.currentTarget);
                this.movieId = this.currentElement.attr("data-movieId");
                this.movieTitle = this.currentElement.attr("data-movie-title");
                this.isComingSoon = this.currentElement.attr("data-isComingSoon") === "True" ? true : false;
                this.isUserAuthenticated = this.currentElement.attr("data-isuserauthenticated") === "True" ? true : false;
                this.isAddedToWatchList = (this.currentElement.attr("data-watchlist") === "true" ? true : false);
                if (this.isUserAuthenticated) {
                    this.toggleWatchList(this.movieId, this.movieTitle, !this.isAddedToWatchList, this.isComingSoon);
                }
            });
            this.watchListPanelAddButton.on('click', (e) => {
                this.currentElement = $(e.currentTarget);
                this.movieId = this.currentElement.attr("data-movieId");
                this.movieTitle = this.currentElement.attr("data-movie-title");
                this.isComingSoon = this.currentElement.attr("data-isComingSoon") === "True" ? true : false;
                this.isUserAuthenticated = this.currentElement.attr("data-isuserauthenticated") === "True" ? true : false;
                this.isAddedToWatchList = this.isAddedToWatchList === true ? this.isAddedToWatchList : this.currentElement.attr("data-watchlist") === "true" ? true : false;
                if (this.isUserAuthenticated) {
                    this.toggleWatchList(this.movieId, this.movieTitle, !this.isAddedToWatchList, this.isComingSoon, false, false);
                }
            });
            if (this.watchListPanelAddButton.length) {
                this.isAddedToWatchList = this.watchListPanelAddButton.attr('data-watchlist') === 'true' ? true : false;
                this.isRemindMeSubscribed = this.watchListPanelAddButton.attr('data-iswatchlistremindmesubscribed') === 'True' ? true : false;
                if (this.isAddedToWatchList && !this.isRemindMeSubscribed) {
                    this.watchListRemindPanel.removeClass('hidden');
                }
                else {
                    this.watchListRemindPanel.addClass('hidden');
                }
            }
        }
        updateWatchList() {
            $.ajax({
                type: 'GET',
                dataType: 'html',
                url: `${Cinemark.getBaseUmbracoApiUrl()}LandingPage/UpdateWatchList`,
                success: (data) => {
                    $('#watchListLandingPageDiv').html(data);
                    $("#watchListSlider").slick({
                        slidesToShow: 3,
                        slidesToScroll: 3,
                        //draggable: false,
                        infinite: false,
                        speed: 750,
                        responsive: [
                            {
                                breakpoint: 992,
                                settings: {
                                    slidesToShow: 2,
                                    slidesToScroll: 2,
                                    draggable: true
                                }
                            },
                            {
                                breakpoint: 768,
                                settings: {
                                    slidesToShow: 1,
                                    slidesToScroll: 1,
                                    draggable: true,
                                    //arrows: false
                                }
                            }
                        ]
                    });
                    new Cinemark.WatchList().initialize();
                },
                error: (XMLHttpRequest, textStatus, errorThrown) => {
                    let icon = '<svg class="svg svgIcon red" role="img"><title>Warning icon</title><use xlink:href="/images/icons.svg#warning" /></svg>';
                    let message = "Couldn't update Watch List.";
                    showToastMessage("toast", `${icon} <span class="error">${message}</span>`);
                }
            });
        }
        toggleWatchListUI(isAddedToWatchList, isFromUndoWatchList = false, movieId, movieTitle, isFavorite, isComingSoon, isFromAccountUndo = false) {
            let self = this;
            if (!isFromUndoWatchList) {
                $('.watch-list-item.' + movieId).fadeOut();
            }
            else {
                $('.watch-list-item.' + movieId).fadeIn();
            }
            const isWatchListRemindMeSubscribed = $(this.watchListPanelAddButton).attr("data-isWatchListRemindMeSubscribed") === 'True' ? true : false;
            self.isSubscribedToEmail = self.isSubscribedToEmail === true ? self.isSubscribedToEmail : isWatchListRemindMeSubscribed;
            let watchListElement;
            let toastMessage = isComingSoon && isWatchListRemindMeSubscribed ? "Added to Watch List & Reminder Set" : "Added to Watch List";
            if (isFromAccountUndo && isFavorite) {
                showToastMessage("toast", toastMessage);
                return;
            }
            else if (isFromAccountUndo) {
                showToastMessage("toast", `Removed from Watch List <a href="javascript:void(0);" onclick="let undo = new Cinemark.WatchList; undo.toggleWatchList(${movieId}, '${movieTitle}', ${!isFavorite}, ${isComingSoon}, false, true);" class="undo-style">Undo</a>`);
                return;
            }
            // Collect all watch list items on the page
            watchListElement = $('.watchListToggle[data-movieid="' + movieId + '"]');
            // Loop through each watch list item to update the ui
            watchListElement.each((i, el) => {
                let watchListTitle = $(el).find('.watchListTitle')[0];
                if (isAddedToWatchList) {
                    $(el).attr("data-watchlist", "false");
                    if ($(watchListTitle).length) {
                        const message = isComingSoon ? "Remind Me" : "Add to Watch List";
                        $(watchListTitle).text(message);
                    }
                }
                else {
                    $(el).attr("data-watchlist", "true");
                    if ($(watchListTitle).length)
                        $(watchListTitle).text('Added to Watch List');
                }
            });
            let watchListCheckbox = $('.wl-checkbox[data-movieid="' + movieId + '"]');
            watchListCheckbox.each((i, el) => {
                if (isAddedToWatchList) {
                    $(el).attr("data-watchlist", "false");
                    $(el).prop("checked", false);
                }
                else {
                    $(el).attr("data-watchlist", "true");
                    $(el).prop("checked", true);
                }
            });
            // Check if subscribed to notification emails and if added to WatchList
            if (isAddedToWatchList) {
                this.watchListAddedPanel.addClass('hidden');
                this.watchListRemindPanel.addClass('hidden');
                this.watchListPanel.removeClass('hidden');
            }
            else if (this.isSubscribedToEmail && !isAddedToWatchList) {
                this.watchListPanel.addClass('hidden');
                this.watchListRemindPanel.addClass('hidden');
                this.watchListAddedPanel.removeClass('hidden');
            }
            else {
                this.watchListPanel.addClass('hidden');
                this.watchListAddedPanel.addClass('hidden');
                this.watchListRemindPanel.removeClass('hidden');
            }
            // Display toast notification
            if (isAddedToWatchList) {
                showToastMessage("toast", `Removed from Watch List <a href="javascript:void(0);" onclick="let undo = new Cinemark.WatchList; undo.toggleWatchList(${movieId}, '${movieTitle}', ${!isFavorite},${isComingSoon}, true, false);" class="undo-style">Undo</a>`);
            }
            else {
                showToastMessage("toast", toastMessage);
            }
            // Handle email subscription click
            this.watchListRemindPanelButton.click(function () {
                self.isSubscribedToEmail = true;
                self.watchListPanel.addClass('hidden');
                self.watchListAddedPanel.removeClass('hidden');
                self.watchListRemindPanel.addClass('hidden');
            });
            this.isSubscribedToEmail = self.isSubscribedToEmail;
            if (isAddedToWatchList) {
                this.isAddedToWatchList = false;
            }
            else {
                this.isAddedToWatchList = true;
            }
            if (this.watchListLandingPageDiv !== undefined && this.watchListLandingPageDiv.length !== 0) {
                this.updateWatchList();
            }
        }
        toggleWatchList(movieId, movieTitle, isFavorite, isComingSoon, isFromUndoWatchlist = false, isFromAccountUndo = false) {
            let self = this;
            let toggleWatchListUrl = "/umbraco/Surface/AccountSurface/ToggleWatchList";
            var token = Cinemark.getAntiForgeryToken($("#WatchlistForm")[0]);
            $.ajax({
                type: 'POST',
                cache: false,
                headers: { "cache-control": "no-cache" },
                url: toggleWatchListUrl,
                data: {
                    movieId: movieId,
                    isFavorite: isFavorite,
                    __RequestVerificationToken: token
                },
                success: (data, textStatus, errorThrown) => {
                    let watchListCount = Number(data);
                    let tealiumData;
                    if (typeof utag_data !== 'undefined') {
                        tealiumData = {
                            'customer_id': utag_data.customer_id,
                            'customer_type': utag_data.customer_type,
                            'link_action': 'Click',
                            'link_category': 'Watch List',
                            'link_name': '',
                            'product_id': movieId,
                            'product_name': movieTitle,
                        };
                        if (isFavorite) {
                            ARIALiveUpdateAddMessage(`${movieTitle} Added to Watch List`);
                            tealiumData.link_name = 'Add to Watch List';
                            self.tealium.TrackEvent('watch_list_add', tealiumData);
                        }
                        else {
                            ARIALiveUpdateAddMessage(`${movieTitle} Removed from Watch List`);
                            tealiumData.link_name = 'Remove from Watch List';
                            self.tealium.TrackEvent('watch_list_remove', tealiumData);
                        }
                    }
                    $("#watchListId").attr('data-watchListCount', watchListCount);
                    if (watchListCount > 0) {
                        $("#watchListId").removeClass("hidden");
                    }
                    else {
                        $("#watchListId").addClass("hidden");
                    }
                    this.toggleWatchListUI(!isFavorite, isFromUndoWatchlist, movieId, movieTitle, isFavorite, isComingSoon, isFromAccountUndo);
                },
                error: (XMLHttpRequest, textStatus, errorThrown) => {
                    let icon = '<svg class="svg svgIcon red" role="img"><title>Warning icon</title><use xlink:href="/images/icons.svg#warning" /></svg>';
                    let message = isFavorite ? "Couldn't add to Watch List." : "Couldn't remove from Watch List.";
                    showToastMessage("toast", `${icon} <span class="error">${message}</span>`);
                }
            });
        }
    }
    Cinemark.WatchList = WatchList;
    class RebrandingBanner {
        constructor(apiUrl, cookie) {
            this.rebrandingBanner = $("#rebrandingAnnouncement");
            this.apiUrl = apiUrl;
            this.cookie = cookie;
            this.cookieExists = getCookie(cookie) !== undefined;
            this.checkDesktopVisibility();
        }
        mobileMenuClicked() {
            let that = this;
            if (!this.cookieExists) {
                that.sendBannerView();
            }
        }
        checkDesktopVisibility() {
            let that = this;
            //if they don't have a cookie and desktop banner is visible
            if (!this.cookieExists && this.rebrandingBanner.is(":visible")) {
                that.sendBannerView();
            }
        }
        sendBannerView() {
            //controller also checks for cookie, so set cookie after call
            let that = this;
            $.ajax({
                url: `${Cinemark.getBaseUmbracoApiUrl()}${that.apiUrl}`,
                type: "POST"
            });
            this.cookieExists = true;
            setCookieWithDurationAtRootPath(this.cookie, "", 86400000);
        }
    }
    Cinemark.RebrandingBanner = RebrandingBanner;
    class Modal {
        constructor(modal) {
            this.modal = modal;
        }
        // This will initialize all modals in the DOM, still need to individually handle AJAX loaded modals
        initialize() {
            this.handleModalOpen();
            this.handleModalClose();
        }
        handleModalOpen() {
            this.modal.on('shown.bs.modal', function (e) {
                let targetModal = $(e.target);
                // For accessibility
                targetModal.attr('aria-modal', 'true');
                targetModal.attr('aria-hidden', 'false');
                // Hide all sibling content underneath the open modal
                targetModal.siblings(':not(script, noscript, style, meta, link)').attr('aria-hidden', 'true');
            });
        }
        handleModalClose() {
            this.modal.on('hidden.bs.modal', function (e) {
                let targetModal = $(e.target);
                // For accessibility
                targetModal.attr('aria-modal', 'false');
                targetModal.attr('aria-hidden', 'true');
                // Show all sibling content again when modal closes
                targetModal.siblings().removeAttr('aria-hidden');
            });
        }
    }
    Cinemark.Modal = Modal;
    class LocationSearch {
        constructor() {
            this.routeToTheaters = "/theatre-search/";
            this.routeToTheatersHash = "#theaters";
            this.geoLocationButton = $('.geoLocationButton');
            this.locationSearchForm = $('#UserLocationForm');
            this.locationSearch = $('.location-search');
            this.locationSearchInput = this.locationSearch.find('.locationSearchInput');
            this.routeToSetTheatersBySearchText = "theater/SetSearchText?";
            this.isClickedByHeader = false;
        }
        initialize() {
            var self = this;
            const lastTextSearchCookie = getCookie('LastTextSearch');
            const lastViewedTheaterUrlCookie = getCookie('LastViewedTheaterUrl');
            const mainHeaderZipCodeValue = $("#mainHeaderZipCode").val();
            if (!mainHeaderZipCodeValue && !lastViewedTheaterUrlCookie && lastTextSearchCookie) {
                $("#mainHeaderZipCode").text(lastTextSearchCookie);
            }
            this.closeOnOutsideClick();
            $(document)
                .on("GeoCallbackComplete", (e, success, lat, long, permissiondenied) => {
                if (success) {
                    self.findTheatersWithGeoPosition(lat.toString(), long.toString());
                }
            });
            this.geoLocationButton.click(() => {
                // ReSharper disable once UnusedLocals
                // do not remove this. functionality is contained in the 
                // GeoLocation constructor
                const geoLocation = new Cinemark.GeoLocation();
                self.isClickedByHeader = true;
            });
            this.locationSearchForm.submit((e) => {
                var locationSearchErrorDisplay = $('#locationSearchErrorDisplay');
                var locationSearchInput = this.locationSearchInput.val();
                locationSearchErrorDisplay.text('').hide();
                e.preventDefault();
                // Check Zip Code valid and if there are theaters
                $.when(this.checkIfZipCodeValid(locationSearchInput)).done(function (checkIfZipCodeValidResult) {
                    if (!checkIfZipCodeValidResult.Result) {
                        locationSearchErrorDisplay.text(checkIfZipCodeValidResult.ErrorMessage).show();
                    }
                    else {
                        self.findTheatersBySearchTextToTheaters(locationSearchInput);
                    }
                });
            });
        }
        findTheatersWithGeoPosition(latitude, longitude) {
            if (this.isClickedByHeader) {
                var geolocation = latitude + "," + longitude;
                var routeToGetListOfTheatresByGeo = "theaters/GetTheatresByGeo";
                var url = `${Cinemark.getBaseUmbracoApiUrl()}${routeToGetListOfTheatresByGeo}?contentId=0&geoPosition=${geolocation}`;
                this.isClickedByHeader = false;
                $.ajax({
                    type: 'GET',
                    cache: false,
                    url: url,
                    success: (data) => {
                        setCookie("LastViewedTheaterId", data.Result);
                        window.location.reload();
                        return false;
                    }
                });
            }
        }
        findTheatersBySearchText(searchText) {
            $.ajax({
                type: 'GET',
                cache: false,
                url: `${Cinemark.getBaseUmbracoApiUrl()}${this.routeToSetTheatersBySearchText}searchText=${searchText}`,
                success: (data) => {
                    window.location.href = `${Cinemark.getBaseUrl()}${this.routeToTheaters}?z=${searchText}${this.routeToTheatersHash}`;
                    return false;
                }
            });
        }
        findTheatersBySearchTextToTheaters(searchText) {
            var routeToGetListOfTheatresBySearchText = "theaters/GetTheatresByText?";
            var url = `${Cinemark.getBaseUmbracoApiUrl()}${routeToGetListOfTheatresBySearchText}contentId=0&searchText=${searchText}`;
            $.ajax({
                type: 'GET',
                cache: false,
                url: url,
                success: (data) => {
                    setCookie('LastViewedTheaterId', data.Result);
                    if (isAuthenticated) {
                        window.location.href = `/theatre-${data.Result}`;
                    }
                    else {
                        window.location.href = '/theatres';
                    }
                    return false;
                }
            });
        }
        checkIfZipCodeValid(searchText) {
            var routeToGetIsZipCodeValid = 'theaters/GetIsZipCodeValid?';
            var url = `${Cinemark.getBaseUmbracoApiUrl()}${routeToGetIsZipCodeValid}searchText=${searchText}`;
            return $.ajax({
                type: 'GET',
                cache: false,
                url: url,
                success: function (data) {
                    return data;
                },
                error: function (error) {
                    console.log(error);
                }
            });
        }
        setCookieAndGoToTheatres(cookieName, cookieValue) {
            setCookie(cookieName, cookieValue);
            window.location.href = `${Cinemark
                .getBaseUrl()}${this.routeToTheaters}`;
            return false;
        }
        closeOnOutsideClick() {
            $(document).click((event) => {
                let container = this.locationSearch;
                if (container.hasClass('in') && !$(event.target).closest(container).length) {
                    container.collapse('hide');
                }
            });
        }
    }
    Cinemark.LocationSearch = LocationSearch;
    class Search {
        constructor() {
            this.searchNavLink = $('.searchNavLink');
            this.search = $('.search-cinemark');
            this.searchFormDesktop = this.search.find('.search-cinemark-desktop');
            this.searchFormDesktopInput = this.search.find('#searchInputDesktop');
            this.searchFormDesktopSubmit = this.search.find('.searchSubmitDesktop');
            this.searchFormMobile = this.search.find('.search-cinemark-mobile');
            this.searchFormMobileInput = this.search.find('#searchInput');
            this.searchFormMobileSubmit = this.search.find('.searchSubmit');
        }
        initialize() {
            this.focusInputOnOpen();
            this.handleSubmitSearch();
            this.handleSubmitSearchDesktop();
            this.closeOnOutsideClick();
        }
        focusInputOnOpen() {
            let self = this;
            this.searchNavLink.click(function (e) {
                self.search.on('shown.bs.collapse', function (e) {
                    self.search.find('form:visible input[type="text"]').focus();
                });
            });
        }
        handleSubmitSearch() {
            let self = this;
            this.searchFormMobileSubmit.click(function (e) {
                e.preventDefault();
                if (self.searchFormMobileInput.val() != null && self.searchFormMobileInput.val() != undefined && self.searchFormMobileInput.val() != '') {
                    self.searchFormMobile.submit();
                }
                else {
                    self.searchFormMobileInput.focus();
                }
            });
        }
        handleSubmitSearchDesktop() {
            let self = this;
            this.searchFormDesktopSubmit.click(function (e) {
                e.preventDefault();
                if (self.searchFormDesktopInput.val() != null && self.searchFormDesktopInput.val() != undefined && self.searchFormDesktopInput.val() != '') {
                    self.searchFormDesktop.submit();
                }
                else {
                    self.searchFormDesktopInput.focus();
                }
            });
        }
        closeOnOutsideClick() {
            $(document).click((event) => {
                let container = this.search;
                if (container.hasClass('in') && !$(event.target).closest(container).length) {
                    container.collapse('hide');
                }
            });
        }
    }
    Cinemark.Search = Search;
    class ToggleVisibility {
        constructor() {
            this.checkbox = $('input[type="checkbox"].toggleVisibility');
        }
        initialize() {
            $(this.checkbox).each(function () {
                $(this).change(function () {
                    const pwd = $(this).siblings('input');
                    const type = pwd.attr('type');
                    pwd.attr('type', type === 'password' ? 'text' : 'password');
                });
            });
        }
    }
    Cinemark.ToggleVisibility = ToggleVisibility;
    class PromoBanner {
        initialize() {
            this.handlePromoBannerDisplay();
        }
        handlePromoBannerDisplay() {
            if ($('#promoBanner').length) {
                $('#closeBanner').click(function (e) {
                    e.preventDefault();
                    $('#promoBanner').hide();
                });
            }
        }
    }
    Cinemark.PromoBanner = PromoBanner;
    class ClearFormField {
        constructor() {
            this.input = $('input[type="text"]#searchInputDesktop, input[type="text"]#searchInput, input[type="tel"]#locationSearchInput, input[type="tel"].unlocatedInput__inputBox');
        }
        initialize() {
            this.wrapFormField();
            this.bindClearFieldEvent();
        }
        wrapFormField() {
            $(this.input).each(function () {
                $(this).wrap('<div class="clearField"></div>').after('<button type="button" class="clearText"><span class="sr-only">Clear form field</span><img src="/images/ic_clear.svg" alt="Clear field" /></button>');
            });
        }
        bindClearFieldEvent() {
            $('.clearText').click(function (e) {
                e.preventDefault();
                $(this).siblings('input').val('').focus();
            });
        }
    }
    Cinemark.ClearFormField = ClearFormField;
    class ZipInputValidation {
        initialize() {
            this.doValidation();
        }
        doValidation() {
            if (jQuery('#TheaterSearchForm #SearchText, #MobileTheaterSearchForm #MobileSearchText, #locationSearchInput, #ZipSearchTextModal, #formEditPaymentMethod #BillingZipCode, #registrationForm #ZipCode, #CardSecurityCode').length)
                jQuery('#TheaterSearchForm #SearchText, #MobileTheaterSearchForm #MobileSearchText, #locationSearchInput, #ZipSearchTextModal, #formEditPaymentMethod #BillingZipCode, #registrationForm #ZipCode, #CardSecurityCode').on("input", function () {
                    this.value = this.value.replace(/\D/g, '');
                });
        }
    }
    Cinemark.ZipInputValidation = ZipInputValidation;
    class DismissBulletin {
        initialize() {
            this.dismiss();
        }
        dismiss() {
            if ($('#closeBulletinButton').length) {
                var closeBulletinButton = $('#closeBulletinButton');
                closeBulletinButton.click(function (e) {
                    e.preventDefault();
                    $('#bulletin').remove();
                });
            }
        }
    }
    Cinemark.DismissBulletin = DismissBulletin;
    function ARIALiveUpdateAddMessage(text) {
        // Create a new node within the ARIA Live update region
        $('#ARIALiveUpdate').each(function () {
            $(this).html(`<p>${text}</p>`);
            // Remove message after 0.5 seconds
            setTimeout(ARIALiveUpdateRemoveMessage, 500);
        });
    }
    Cinemark.ARIALiveUpdateAddMessage = ARIALiveUpdateAddMessage;
    function ARIALiveUpdateRemoveMessage() {
        // Remove message from ARIA Live Update region
        $('#ARIALiveUpdate').each(function () {
            $(this).empty();
        });
    }
    Cinemark.ARIALiveUpdateRemoveMessage = ARIALiveUpdateRemoveMessage;
    function scrollGuestShowtimesDropdownIntoView() {
        const guestShowtimes = document.getElementById('divGuestShowTimes');
        if (guestShowtimes) {
            guestShowtimes.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" });
        }
    }
    Cinemark.scrollGuestShowtimesDropdownIntoView = scrollGuestShowtimesDropdownIntoView;
    class AppTealiumEvents {
        constructor(container = null) {
            this.tealium = new Cinemark.Tracking.Tealium;
            if (container) {
                this.container = container;
                this.trackLinks = Array.prototype.slice.call(container.querySelectorAll('a[data-link-name]'));
                this.trackButtons = Array.prototype.slice.call(container.querySelectorAll('button[data-link-name]'));
            }
            else {
                this.urlSearchParams = new URLSearchParams(document.location.search);
                this.signInForm = document.forms['signInForm'];
                this.signOutLinks = Array.prototype.slice.call(document.querySelectorAll('.signout-link'));
                this.trackLinks = Array.prototype.slice.call(document.querySelectorAll('a[data-link-name]'));
                this.trackButtons = Array.prototype.slice.call(document.querySelectorAll('button[data-link-name]'));
            }
        }
        initialize() {
            if (!this.container) {
                let hasLoginParam = this.urlSearchParams.has('login');
                //let hasLogoutParam: boolean = this.urlSearchParams.has('logout');
                //let hasRegisterParam: boolean = this.urlSearchParams.has('register');
                if (hasLoginParam) {
                    let tealiumData;
                    if (typeof utag_data !== 'undefined') {
                        tealiumData = {
                            'customer_id': utag_data.customer_id,
                            'customer_type': utag_data.customer_type,
                            'page_name': 'Sign In'
                        };
                    }
                    let tealiumEvent = hasLoginParam ? 'user_login' : null;
                    this.tealium.TrackEvent(tealiumEvent, tealiumData);
                }
            }
            if (this.trackLinks.length) {
                this.trackLinks.map((link) => {
                    link.addEventListener('click', (e) => {
                        e.preventDefault();
                        let tealiumData;
                        if (typeof utag_data !== 'undefined') {
                            tealiumData = {
                                'customer_id': utag_data.customer_id,
                                'customer_type': utag_data.customer_type,
                                'link_action': 'Click',
                                'link_category': link.getAttribute('data-link-category') ? link.getAttribute('data-link-category') : 'Link Click',
                                'link_name': link.getAttribute('data-link-name') ? link.getAttribute('data-link-name') : link.text,
                            };
                        }
                        let url = link.getAttribute('href');
                        let target = link.getAttribute('target');
                        try {
                            this.tealium.TrackEvent('link_click', tealiumData, () => {
                                if (target) {
                                    window.open(url, target);
                                }
                                else {
                                    window.location.href = url;
                                }
                            });
                        }
                        catch (e) {
                            window.location.href = url;
                        }
                    });
                });
            }
            if (this.trackButtons.length) {
                this.trackButtons.map((button) => {
                    button.addEventListener('click', (e) => {
                        e.preventDefault();
                        let tealiumData;
                        if (typeof utag_data !== 'undefined') {
                            tealiumData = {
                                'customer_id': utag_data.customer_id,
                                'customer_type': utag_data.customer_type,
                                'link_action': 'Click',
                                'link_category': button.getAttribute('data-link-category') ? button.getAttribute('data-link-category') : 'Button Click',
                                'link_name': button.getAttribute('data-link-name') ? button.getAttribute('data-link-name') : button.textContent,
                            };
                        }
                        this.tealium.TrackEvent('link_click', tealiumData);
                    });
                });
            }
        }
    }
    Cinemark.AppTealiumEvents = AppTealiumEvents;
    class RoktEvents {
        configureRokt(identifier, roktDataUrl, emailAddress, confirmationNumber, payments) {
            const fullUrl = `${roktDataUrl}${confirmationNumber ? `?confirmationNumber=${confirmationNumber}` : ''}`;
            $.ajax({
                type: "GET",
                url: fullUrl,
                success: (data) => __awaiter(this, void 0, void 0, function* () {
                    var _a, _b, _c, _d;
                    const result = Cinemark.Models.RoktCustomerDataViewModel.fromJson(Cinemark.Models.RoktCustomerDataViewModel, Base64.decode(data));
                    if (typeof mParticle === 'undefined' || !mParticle)
                        return;
                    if (emailAddress && (result.email.toLowerCase() !== emailAddress.toLowerCase() || result.isGuest)) {
                        const identifyRequest = {
                            userIdentities: {
                                email: emailAddress,
                            }
                        };
                        mParticle.Identity.identify(identifyRequest);
                    }
                    const currentUser = mParticle.Identity.getCurrentUser();
                    if (!currentUser)
                        return;
                    const allAttributes = currentUser.getAllUserAttributes();
                    if (result.email && !result.isGuest) {
                        if ((allAttributes === null || allAttributes === void 0 ? void 0 : allAttributes.email) !== result.email) {
                            currentUser.setUserAttribute("email", result.email);
                        }
                        if ((allAttributes === null || allAttributes === void 0 ? void 0 : allAttributes.firstname) !== result.firstName) {
                            currentUser.setUserAttribute("firstname", result.firstName);
                        }
                        if ((allAttributes === null || allAttributes === void 0 ? void 0 : allAttributes.language) !== result.language) {
                            currentUser.setUserAttribute("language", result.language);
                        }
                        if ((allAttributes === null || allAttributes === void 0 ? void 0 : allAttributes.lastname) !== result.lastName) {
                            currentUser.setUserAttribute("lastname", result.lastName);
                        }
                    }
                    if (result.isGuest) {
                        currentUser.setUserAttribute("email", emailAddress);
                    }
                    const paymentTypes = [];
                    payments === null || payments === void 0 ? void 0 : payments.forEach(payment => {
                        paymentTypes.push(payment.paymentTypeName);
                    });
                    yield mParticle.Rokt.selectPlacements({
                        identifier,
                        attributes: {
                            "amount": result.amount,
                            "billingzipcode": result.billingZipcode,
                            "concessions_total": result.concessionsTotal,
                            "ccbin": result.customerCCBin,
                            "confirmationref": result.confirmationRef || confirmationNumber,
                            "country": result.country,
                            "currency": result.currency,
                            "customertype": result.customerType,
                            "eventvenue": result.eventVenue,
                            "gender": result.gender,
                            "locale": result.locale,
                            "member_status": result.memberStatus,
                            "mobile": result.mobile,
                            "movierating": ((_a = result.movieRating) === null || _a === void 0 ? void 0 : _a.toString()) || "",
                            "movietitle": ((_b = result.movieTitle) === null || _b === void 0 ? void 0 : _b.toString()) || "",
                            "notickets": ((_c = result.noTickets) === null || _c === void 0 ? void 0 : _c.toString()) || "",
                            "paymenttype": ((_d = result.paymentType) === null || _d === void 0 ? void 0 : _d.length) ? result.paymentType.toString() : paymentTypes.toString(),
                            "showtime": result.showtime,
                            "transactionid": confirmationNumber,
                            "venuelocation": result.venueLocation
                        },
                    });
                }),
            });
        }
    }
    Cinemark.RoktEvents = RoktEvents;
    function bankersRounding(num, decimalPlaces) {
        var d = decimalPlaces || 0;
        var m = Math.pow(10, d);
        var n = +(d ? num * m : num).toFixed(8); // Avoid rounding errors
        var i = Math.floor(n), f = n - i;
        var e = 1e-8; // Allow for rounding errors in f
        var r = (f > 0.5 - e && f < 0.5 + e) ?
            ((i % 2 == 0) ? i : i + 1) : Math.round(n);
        return d ? r / m : r;
    }
    Cinemark.bankersRounding = bankersRounding;
})(Cinemark || (Cinemark = {}));
$(document)
    .ready(() => {
    document.cookie = "TimezoneOffset=" + new Date().getTimezoneOffset().toString() + "; expires=Thu, 18 Dec 2050 12:00:00 UTC; path=/";
    var baseUrl = window.location.protocol + "//" + window.location.host;
    Cinemark.setBaseUrl(baseUrl);
    /*links and buttons retain clicked class styling*/
    jQuery('button, a')
        .click(function () {
        jQuery(this).toggleClass('clicked');
    });
    new Cinemark.AppTealiumEvents().initialize();
    new Cinemark.LocationSearch().initialize();
    new Cinemark.Search().initialize();
    new Cinemark.FavoriteTheater().initialize();
    new Cinemark.WatchList().initialize();
    new Cinemark.ToggleVisibility().initialize();
    new Cinemark.ClearFormField().initialize();
    new Cinemark.Modal($('.modal')).initialize();
    new Cinemark.ZipInputValidation().initialize();
    new Cinemark.PromoBanner().initialize();
    new Cinemark.DismissBulletin().initialize();
    enableIncomingTabPanel();
    Cinemark.initializeSpinner('#SpinnerPlaceHolder');
    $("#WatchListRemindPanelClose").on("click", () => {
        Cinemark.onClickCloseWatchListSubscriptionPannel();
    });
    $(document)
        .on("click", ".showSpinner", () => {
        Cinemark.startSpinner();
    });
    // Referencing the global variable set in MainHeader.cshtml. Not set in mobile app context.
    //if (typeof (isAnnouncementBannerShown) !== 'undefined' &&
    //    typeof (isAnnouncementBannerShown) === 'boolean' &&
    //    isAnnouncementBannerShown) {
    //    $("#mobileMenuButton").click(() => {
    //    });
    //}
    $("#CardNumber").on("keydown", function (event) {
        if (isNonDigitKeyEntry(event))
            event.preventDefault();
    });
    function isNonDigitKeyEntry(e) {
        var key = e.keyCode ? e.keyCode : e.which;
        return (!([8, 9, 13, 27, 46, 110, 190].indexOf(key) !== -1 ||
            (key === 65 && (e.ctrlKey || e.metaKey)) ||
            (key >= 35 && key <= 40) ||
            (key >= 48 && key <= 57 && !(e.shiftKey || e.altKey)) ||
            (key >= 96 && key <= 105)));
    }
    window.addEventListener('load', (event) => {
        if (!window.location.href.endsWith('ShoppingCart') && window.location.href.indexOf('Confirmation') === -1) {
            localStorage.removeItem('fecOrderData');
        }
    });
});
/* don't close dropdowns when user clicks on .stayOpen item */
$('.stayOpen').click(function (event) {
    event.stopPropagation();
});
/* When one header navbar menu opens, close any other open menus */
$("[data-collapse-group='myDivs']").click(function () {
    var $this = $(this);
    $("[data-collapse-group='myDivs']:not([data-target='" + $this.data("target") + "'])").each(function () {
        $($(this).data("target")).removeClass("in").addClass('collapse');
        $(this).removeClass("clicked").addClass('collapsed');
    });
});
/* If theme selection is enabled, append selected theme to HTML element as a data attribute */
var themeSelector = $('#themeSelect');
var selectedTheme = "";
if (themeSelector) {
    // look for the theme cookie when page loads
    if (getCookie('SelectedTheme') == "light" || getCookie('SelectedTheme') == "dark") {
        selectedTheme = getCookie('SelectedTheme');
        $('#themeSelect option').each(function () {
            if ($(this).prop('value') == selectedTheme) {
                $(this).prop('selected', true);
            }
        });
    }
    themeSelector.change(function (e) {
        $('html').attr('data-theme', this.value);
        setCookie('SelectedTheme', this.value);
    });
}
//# sourceMappingURL=cinemark.js.map;
/* eslint-disable-next-line spaced-comment */
/// <reference path="../typings/google.analytics/ga.d.ts" />
var Cinemark;
(function (Cinemark) {
    var Tracking;
    (function (Tracking) {
        var GoogleAnalytics;
        (function (GoogleAnalytics) {
            let TrackAnalyticsType;
            (function (TrackAnalyticsType) {
                TrackAnalyticsType[TrackAnalyticsType["AddToCart"] = 0] = "AddToCart";
                TrackAnalyticsType[TrackAnalyticsType["ProductDetail"] = 1] = "ProductDetail";
            })(TrackAnalyticsType = GoogleAnalytics.TrackAnalyticsType || (GoogleAnalytics.TrackAnalyticsType = {}));
            let SubmitStatusType;
            (function (SubmitStatusType) {
                SubmitStatusType[SubmitStatusType["Failed"] = 0] = "Failed";
                SubmitStatusType[SubmitStatusType["Success"] = 1] = "Success";
                SubmitStatusType[SubmitStatusType["ExceededLimit"] = 2] = "ExceededLimit";
            })(SubmitStatusType = GoogleAnalytics.SubmitStatusType || (GoogleAnalytics.SubmitStatusType = {}));
            class Transaction {
            }
            GoogleAnalytics.Transaction = Transaction;
            // Click ID, Click Text, Click URL included
            class ClickData {
            }
            GoogleAnalytics.ClickData = ClickData;
            class Item {
                constructor(id, name, category, price, variant, vrcompany) {
                    this.id = id;
                    this.name = name;
                    this.category = category;
                    this.price = price;
                    this.variant = variant === null || variant === void 0 ? void 0 : variant.trim();
                    this.vrcompany = vrcompany;
                }
            }
            GoogleAnalytics.Item = Item;
            class PersonalInformationItem {
                constructor(email, requestType) {
                    this.requestType = requestType;
                    this.email = email;
                }
            }
            GoogleAnalytics.PersonalInformationItem = PersonalInformationItem;
            class SubmitStatus {
            }
            GoogleAnalytics.SubmitStatus = SubmitStatus;
            // Regular ECommerce [deprecated]
            class ECommerce {
                constructor() {
                    ga('require', 'ecommerce');
                }
                clear() {
                    ga('ecommerce:send');
                }
                send() {
                    ga('ecommerce:send');
                }
                addTransaction(transaction) {
                    ga('ecommerce:addTransaction', transaction);
                }
                addItem(item) {
                    ga('ecommerce:addItem', item);
                }
            }
            GoogleAnalytics.ECommerce = ECommerce;
            // Enhanced ECommerce
            class EECommerce {
                constructor() {
                    // FIXME: I can't seem to figure out if these are used outside of .ts files... these can be removed or camel case
                    // depending on if these are used
                    /* eslint-disable @typescript-eslint/naming-convention */
                    this.Undefined = 'Undefined';
                    this.BulkGiftCards = 'Gift Card';
                    this.Subscriptions = 'Subscriptions';
                    this.Passes = 'Passes';
                    this.Vouchers = 'Vouchers';
                    this.addGAToGiftCardTracking = (evt) => {
                        const anchor = evt.currentTarget;
                        const clickId = anchor.getAttribute('clickId');
                        dataLayer.push({
                            event: 'EEGiftCardTracking',
                            ecommerce: {
                                detail: {
                                    clickId,
                                    clickText: anchor.name,
                                    clickUrl: anchor.href,
                                },
                            },
                        });
                    };
                }
                /* eslint-enable @typescript-eslint/naming-convention */
                getMovieCategory(movie, ticketType) {
                    if (movie) {
                        const result = `Movie/${movie.genre ? (`${movie.genre}/`) : `${this.Undefined}/`}${movie.rating ? (`${movie.rating}/`) : `${this.Undefined}/`}${ticketType || this.Undefined}`;
                        return this.makeCategoryFriendly(result);
                    }
                    return (ticketType || this.Undefined);
                }
                getProductCategory(ticket) {
                    let result = ticket.productName;
                    if (ticket.isReload || ticket.productVariantName === 'Renewal') {
                        result += '/Renewal';
                    }
                    else {
                        result += '/New';
                    }
                    return result;
                }
                getMovieAnalyticsItem(model, product, type) {
                    const id = product.cinemarkMovieId.toString();
                    const name = model.movie.movieTitle;
                    const price = product.listPrice;
                    const variant = model.theater.theaterName.trim();
                    const category = this.getMovieCategory(model.movie, product.name);
                    const item = new Item(id, name, category, price, variant, '');
                    if (type === TrackAnalyticsType.AddToCart) {
                        item.quantity = product.quantity;
                    }
                    return item;
                }
                makeCategoryFriendly(category) {
                    let result = category;
                    if (result) {
                        result = result.replace(/,\s/g, ',').replace(/\s/g, '-');
                    }
                    return result;
                }
                addProductView(item) {
                    dataLayer.push({
                        event: 'EEproductDetail',
                        ecommerce: {
                            detail: {
                                products: [{
                                        name: item.name,
                                        id: item.id,
                                        price: item.price,
                                        category: item.category,
                                        variant: item.variant,
                                        dimension2: item.vrcompany,
                                    }],
                            },
                        },
                    });
                }
                addProductToCart(item) {
                    dataLayer.push({
                        event: 'EEaddToCart',
                        ecommerce: {
                            add: {
                                products: [{
                                        id: item.id,
                                        name: item.name,
                                        category: item.category,
                                        variant: item.variant,
                                        price: item.price,
                                        quantity: item.quantity,
                                        dimension2: item.vrcompany,
                                    }],
                            },
                        },
                    });
                }
                getCheckoutBehaviorOption(step, option) {
                    let result = '';
                    if (option) {
                        result = option;
                    }
                    else {
                        switch (step) {
                            case 1:
                                result = 'Seat Selection';
                                break;
                            case 2:
                                result = 'Check Out/Payment Review';
                                break;
                            case 3:
                                result = 'Confirmation';
                                break;
                            default:
                                result = `UnknownStep-${step}`;
                        }
                    }
                    return result;
                }
                addCheckoutBehavior(step, option) {
                    dataLayer.push({
                        event: 'EEcheckout',
                        ecommerce: {
                            checkout: {
                                actionField: { step, option: this.getCheckoutBehaviorOption(step, option) },
                            },
                        },
                    });
                }
                addTransaction(transaction, items) {
                    const products = [];
                    for (let i = 0; i < items.length; i++) {
                        const product = {
                            id: items[i].id,
                            name: items[i].name,
                            category: items[i].category,
                            variant: items[i].variant,
                            price: items[i].price,
                            quantity: items[i].quantity,
                            dimension2: items[i].vrcompany,
                            showdate: items[i].showdate,
                            showtime: items[i].showtime,
                            isupsell: items[i].isUpsell,
                        };
                        products.push(product);
                    }
                    dataLayer.push({
                        event: 'EEtransaction',
                        ecommerce: {
                            purchase: {
                                actionField: {
                                    id: transaction.id,
                                    affiliation: transaction.affiliation,
                                    revenue: transaction.revenue,
                                    tax: transaction.tax,
                                    shipping: transaction.shipping,
                                },
                                products,
                            },
                        },
                    });
                }
                refund(transaction, items) {
                    const products = [];
                    for (let i = 0; i < items.length; i++) {
                        const product = {
                            id: items[i].id,
                            name: items[i].name,
                            category: items[i].category,
                            variant: items[i].variant,
                            price: items[i].price,
                            quantity: items[i].quantity,
                            dimension2: items[i].vrcompany,
                        };
                        products.push(product);
                    }
                    dataLayer.push({
                        event: 'EErefund',
                        ecommerce: {
                            refund: {
                                actionField: {
                                    id: transaction.id,
                                    affiliation: transaction.affiliation,
                                    revenue: transaction.revenue,
                                    tax: transaction.tax,
                                    shipping: transaction.shipping,
                                },
                                products,
                            },
                        },
                    });
                }
                clickStatusFor(status) {
                    dataLayer.push({
                        event: 'EESubmitStatus',
                        submitStatus: {
                            elementText: status.clickElementText,
                            status: status.status,
                        },
                    });
                }
            }
            GoogleAnalytics.EECommerce = EECommerce;
            class Searching {
                trackMainSearch(searchString) {
                    dataLayer.push({
                        event: 'GAEvent',
                        eventCategory: 'search',
                        eventAction: 'main',
                        eventLabel: searchString,
                        transport: 'beacon',
                    });
                }
            }
            GoogleAnalytics.Searching = Searching;
            class DataLayer {
                pushToDataLayer(data) {
                    dataLayer.push({ data });
                }
                // This is more for semantic clarity, but for those less familiar with GTM, the
                // usage of the function is clearly defined instead of requiring understanding of
                // the JSON for the standard "pushToDataLayer" function.
                createEventTriggerEntry(event, eventCategory, eventAction, eventLabel, transport) {
                    dataLayer.push({
                        event,
                        eventCategory,
                        eventAction,
                        eventLabel,
                        transport,
                    });
                }
                // This is more for semantic clarity, but for those less familiar with GTM, the
                // usage of the function is clearly defined instead of requiring understanding of
                // the JSON for the standard "pushToDataLayer" function.
                createSupportingEventDataEntry(key, value) {
                    const valAsJson = typeof value === 'string' ? value : JSON.stringify(value);
                    const entry = JSON.parse(`{"${key}":${valAsJson}}`);
                    dataLayer.push(entry);
                }
            }
            GoogleAnalytics.DataLayer = DataLayer;
        })(GoogleAnalytics = Tracking.GoogleAnalytics || (Tracking.GoogleAnalytics = {}));
    })(Tracking = Cinemark.Tracking || (Cinemark.Tracking = {}));
})(Cinemark || (Cinemark = {}));
(function () {
    Window.prototype['Cinemark.Tracking.GoogleAnalytics.DataLayer'] =
        new Cinemark.Tracking.GoogleAnalytics.DataLayer();
})();
//# sourceMappingURL=googleAnalytics.js.map;
/* eslint-disable-next-line spaced-comment */
/// <reference path="../typings/jquery/jquery.d.ts" />
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
var Cinemark;
(function (Cinemark) {
    var Tracking;
    (function (Tracking) {
        class Tealium {
            /* eslint-disable-next-line @typescript-eslint/naming-convention */
            TrackEvent(eventName, tealiumData = {}, callback = null, eventType = 'link') {
                if (typeof utag === 'undefined') {
                    if (callback) {
                        callback();
                    }
                    return;
                }
                const data = Object.assign(Object.assign({}, tealiumData), { tealium_event: eventName });
                try {
                    switch (eventType) {
                        case 'link':
                            utag.link(data, callback);
                            break;
                        case 'view':
                            utag.view(data, callback);
                            break;
                        default:
                            utag.link(data, callback);
                    }
                }
                catch (error) {
                    if (callback) {
                        callback();
                    }
                }
            }
        }
        Tracking.Tealium = Tealium;
    })(Tracking = Cinemark.Tracking || (Cinemark.Tracking = {}));
})(Cinemark || (Cinemark = {}));
//# sourceMappingURL=tealium.js.map;
//! moment.js
//! version : 2.15.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return md.apply(null,arguments)}
// This is done to register the method called with moment()
// without creating circular dependencies.
function b(a){md=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function e(a){var b;for(b in a)
// even if its not own property I'd still call it non-empty
return!1;return!0}function f(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function g(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function h(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function i(a,b){for(var c in b)h(b,c)&&(a[c]=b[c]);return h(b,"toString")&&(a.toString=b.toString),h(b,"valueOf")&&(a.valueOf=b.valueOf),a}function j(a,b,c,d){return qb(a,b,c,d,!0).utc()}function k(){
// We need to deep clone this object.
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function l(a){return null==a._pf&&(a._pf=k()),a._pf}function m(a){if(null==a._isValid){var b=l(a),c=nd.call(b.parsedDateParts,function(a){return null!=a}),d=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);if(a._strict&&(d=d&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour),null!=Object.isFrozen&&Object.isFrozen(a))return d;a._isValid=d}return a._isValid}function n(a){var b=j(NaN);return null!=a?i(l(b),a):l(b).userInvalidated=!0,b}function o(a){return void 0===a}function p(a,b){var c,d,e;if(o(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),o(b._i)||(a._i=b._i),o(b._f)||(a._f=b._f),o(b._l)||(a._l=b._l),o(b._strict)||(a._strict=b._strict),o(b._tzm)||(a._tzm=b._tzm),o(b._isUTC)||(a._isUTC=b._isUTC),o(b._offset)||(a._offset=b._offset),o(b._pf)||(a._pf=l(b)),o(b._locale)||(a._locale=b._locale),od.length>0)for(c in od)d=od[c],e=b[d],o(e)||(a[d]=e);return a}
// Moment prototype object
function q(b){p(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),pd===!1&&(pd=!0,a.updateOffset(this),pd=!1)}function r(a){return a instanceof q||null!=a&&null!=a._isAMomentObject}function s(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function t(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=s(b)),c}
// compare two arrays, return the number of differences
function u(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&t(a[d])!==t(b[d]))&&g++;return g+f}function v(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function w(b,c){var d=!0;return i(function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,b),d){for(var e,f=[],g=0;g<arguments.length;g++){if(e="","object"==typeof arguments[g]){e+="\n["+g+"] ";for(var h in arguments[0])e+=h+": "+arguments[0][h]+", ";e=e.slice(0,-2)}else e=arguments[g];f.push(e)}v(b+"\nArguments: "+Array.prototype.slice.call(f).join("")+"\n"+(new Error).stack),d=!1}return c.apply(this,arguments)},c)}function x(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),qd[b]||(v(c),qd[b]=!0)}function y(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function z(a){var b,c;for(c in a)b=a[c],y(b)?this[c]=b:this["_"+c]=b;this._config=a,
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _ordinalParseLenient.
this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function A(a,b){var c,e=i({},a);for(c in b)h(b,c)&&(d(a[c])&&d(b[c])?(e[c]={},i(e[c],a[c]),i(e[c],b[c])):null!=b[c]?e[c]=b[c]:delete e[c]);for(c in a)h(a,c)&&!h(b,c)&&d(a[c])&&(
// make sure changes to properties don't modify parent config
e[c]=i({},e[c]));return e}function B(a){null!=a&&this.set(a)}function C(a,b,c){var d=this._calendar[a]||this._calendar.sameElse;return y(d)?d.call(b,c):d}function D(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function E(){return this._invalidDate}function F(a){return this._ordinal.replace("%d",a)}function G(a,b,c,d){var e=this._relativeTime[c];return y(e)?e(a,b,c,d):e.replace(/%d/i,a)}function H(a,b){var c=this._relativeTime[a>0?"future":"past"];return y(c)?c(b):c.replace(/%s/i,b)}function I(a,b){var c=a.toLowerCase();zd[c]=zd[c+"s"]=zd[b]=a}function J(a){return"string"==typeof a?zd[a]||zd[a.toLowerCase()]:void 0}function K(a){var b,c,d={};for(c in a)h(a,c)&&(b=J(c),b&&(d[b]=a[c]));return d}function L(a,b){Ad[a]=b}function M(a){var b=[];for(var c in a)b.push({unit:c,priority:Ad[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function N(b,c){return function(d){return null!=d?(P(this,b,d),a.updateOffset(this,c),this):O(this,b)}}function O(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function P(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}
// MOMENTS
function Q(a){return a=J(a),y(this[a])?this[a]():this}function R(a,b){if("object"==typeof a){a=K(a);for(var c=M(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else if(a=J(a),y(this[a]))return this[a](b);return this}function S(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}
// token:    'M'
// padded:   ['MM', 2]
// ordinal:  'Mo'
// callback: function () { this.month() + 1 }
function T(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Ed[a]=e),b&&(Ed[b[0]]=function(){return S(e.apply(this,arguments),b[1],b[2])}),c&&(Ed[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function U(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function V(a){var b,c,d=a.match(Bd);for(b=0,c=d.length;c>b;b++)Ed[d[b]]?d[b]=Ed[d[b]]:d[b]=U(d[b]);return function(b){var e,f="";for(e=0;c>e;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}
// format date using native date object
function W(a,b){return a.isValid()?(b=X(b,a.localeData()),Dd[b]=Dd[b]||V(b),Dd[b](a)):a.localeData().invalidDate()}function X(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Cd.lastIndex=0;d>=0&&Cd.test(a);)a=a.replace(Cd,c),Cd.lastIndex=0,d-=1;return a}function Y(a,b,c){Wd[a]=y(b)?b:function(a,d){return a&&c?c:b}}function Z(a,b){return h(Wd,a)?Wd[a](b._strict,b._locale):new RegExp($(a))}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function $(a){return _(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function _(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function aa(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=t(a)}),c=0;c<a.length;c++)Xd[a[c]]=d}function ba(a,b){aa(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function ca(a,b,c){null!=b&&h(Xd,a)&&Xd[a](b,c._a,c,a)}function da(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ea(a,b){return a?c(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||fe).test(b)?"format":"standalone"][a.month()]:this._months}function fa(a,b){return a?c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[fe.test(b)?"format":"standalone"][a.month()]:this._monthsShort}function ga(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(
// this is not used
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)f=j([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null):(e=sd.call(this._longMonthsParse,g),-1!==e?e:null):"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:(e=sd.call(this._longMonthsParse,g),-1!==e?e:null)):(e=sd.call(this._longMonthsParse,g),-1!==e?e:(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null))}function ha(a,b,c){var d,e,f;if(this._monthsParseExact)return ga.call(this,a,b,c);
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){
// test the regex
if(e=j([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}
// MOMENTS
function ia(a,b){var c;if(!a.isValid())
// No op
return a;if("string"==typeof b)if(/^\d+$/.test(b))b=t(b);else
// TODO: Another silent failure?
if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),da(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ja(b){return null!=b?(ia(this,b),a.updateOffset(this,!0),this):O(this,"Month")}function ka(){return da(this.year(),this.month())}function la(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=ie),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function ma(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function na(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=j([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=_(d[b]),e[b]=_(e[b]);for(b=0;24>b;b++)f[b]=_(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}
// HELPERS
function oa(a){return pa(a)?366:365}function pa(a){return a%4===0&&a%100!==0||a%400===0}function qa(){return pa(this.year())}function ra(a,b,c,d,e,f,g){
//can't just apply() to create a date:
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
var h=new Date(a,b,c,d,e,f,g);
//the date constructor remaps years 0-99 to 1900-1999
return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function sa(a){var b=new Date(Date.UTC.apply(null,arguments));
//the Date.UTC function remaps years 0-99 to 1900-1999
return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}
// start-of-first-week - start-of-year
function ta(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
d=7+b-c,
// first-week day local weekday -- which local weekday is fwd
e=(7+sa(a,0,d).getUTCDay()-b)%7;return-e+d-1}
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function ua(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ta(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=oa(f)+j):j>oa(a)?(f=a+1,g=j-oa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function va(a,b,c){var d,e,f=ta(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+wa(e,b,c)):g>wa(a.year(),b,c)?(d=g-wa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function wa(a,b,c){var d=ta(a,b,c),e=ta(a+1,b,c);return(oa(a)-d+e)/7}
// HELPERS
// LOCALES
function xa(a){return va(a,this._week.dow,this._week.doy).week}function ya(){return this._week.dow}function za(){return this._week.doy}
// MOMENTS
function Aa(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ba(a){var b=va(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}
// HELPERS
function Ca(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Da(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Ea(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Fa(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ga(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ha(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)f=j([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:null):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null):"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null)))}function Ia(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ha.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){
// test the regex
if(e=j([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}
// MOMENTS
function Ja(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Ca(a,this.localeData()),this.add(a-b,"d")):b}function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function La(a){if(!this.isValid())return null!=a?this:NaN;
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if(null!=a){var b=Da(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Ma(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=pe),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Na(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Oa(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=re),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Pa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],k=[];for(b=0;7>b;b++)c=j([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),k.push(d),k.push(e),k.push(f);for(
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
g.sort(a),h.sort(a),i.sort(a),k.sort(a),b=0;7>b;b++)h[b]=_(h[b]),i[b]=_(i[b]),k[b]=_(k[b]);this._weekdaysRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}
// FORMATTING
function Qa(){return this.hours()%12||12}function Ra(){return this.hours()||24}function Sa(a,b){T(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}
// PARSING
function Ta(a,b){return b._meridiemParse}
// LOCALES
function Ua(a){
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return"p"===(a+"").toLowerCase().charAt(0)}function Va(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wa(a){return a?a.toLowerCase().replace("_","-"):a}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split("-"),b=e.length,c=Wa(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=Ya(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)
//the next array item is better than a shallower substring of this one
break;b--}f++}return null}function Ya(a){var b=null;
// TODO: Find a better way to register and load all the locales in Node
if(!we[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=se._abbr,require("./locale/"+a),
// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
Za(b)}catch(c){}return we[a]}
// This function will load locale and then set the global locale.  If
// no arguments are passed in, it will simply return the current global
// locale key.
function Za(a,b){var c;
// moment.duration._locale = moment._locale = data;
return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}function $a(a,b){if(null!==b){var c=ve;
// treat as if there is no base config
// backwards compat for now: also set the locale
return b.abbr=a,null!=we[a]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=we[a]._config):null!=b.parentLocale&&(null!=we[b.parentLocale]?c=we[b.parentLocale]._config:x("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),we[a]=new B(A(c,b)),Za(a),we[a]}
// useful for testing
return delete we[a],null}function _a(a,b){if(null!=b){var c,d=ve;
// MERGE
null!=we[a]&&(d=we[a]._config),b=A(d,b),c=new B(b),c.parentLocale=we[a],we[a]=c,
// backwards compat for now: also set the locale
Za(a)}else
// pass null for config to unupdate, useful for tests
null!=we[a]&&(null!=we[a].parentLocale?we[a]=we[a].parentLocale:null!=we[a]&&delete we[a]);return we[a]}
// returns locale data
function ab(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return se;if(!c(a)){if(b=Ya(a))return b;a=[a]}return Xa(a)}function bb(){return rd(we)}function cb(a){var b,c=a._a;return c&&-2===l(a).overflow&&(b=c[Zd]<0||c[Zd]>11?Zd:c[$d]<1||c[$d]>da(c[Yd],c[Zd])?$d:c[_d]<0||c[_d]>24||24===c[_d]&&(0!==c[ae]||0!==c[be]||0!==c[ce])?_d:c[ae]<0||c[ae]>59?ae:c[be]<0||c[be]>59?be:c[ce]<0||c[ce]>999?ce:-1,l(a)._overflowDayOfYear&&(Yd>b||b>$d)&&(b=$d),l(a)._overflowWeeks&&-1===b&&(b=de),l(a)._overflowWeekday&&-1===b&&(b=ee),l(a).overflow=b),a}
// date from iso format
function db(a){var b,c,d,e,f,g,h=a._i,i=xe.exec(h)||ye.exec(h);if(i){for(l(a).iso=!0,b=0,c=Ae.length;c>b;b++)if(Ae[b][1].exec(i[1])){e=Ae[b][0],d=Ae[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Be.length;c>b;b++)if(Be[b][1].exec(i[3])){
// match[2] should be 'T' or space
f=(i[2]||" ")+Be[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!ze.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),jb(a)}else a._isValid=!1}
// date from iso format or fallback
function eb(b){var c=Ce.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(db(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}
// Pick the first defined of two or three arguments.
function fb(a,b,c){return null!=a?a:null!=b?b:c}function gb(b){
// hooks is actually the exported moment object
var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function hb(a){var b,c,d,e,f=[];if(!a._d){
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for(d=gb(a),a._w&&null==a._a[$d]&&null==a._a[Zd]&&ib(a),a._dayOfYear&&(e=fb(a._a[Yd],d[Yd]),a._dayOfYear>oa(e)&&(l(a)._overflowDayOfYear=!0),c=sa(e,0,a._dayOfYear),a._a[Zd]=c.getUTCMonth(),a._a[$d]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];
// Zero out whatever was not defaulted, including time
for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];
// Check for 24:00:00.000
24===a._a[_d]&&0===a._a[ae]&&0===a._a[be]&&0===a._a[ce]&&(a._nextDay=!0,a._a[_d]=0),a._d=(a._useUTC?sa:ra).apply(null,f),
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[_d]=24)}}function ib(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=fb(b.GG,a._a[Yd],va(rb(),1,4).year),d=fb(b.W,1),e=fb(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=fb(b.gg,a._a[Yd],va(rb(),f,g).year),d=fb(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>wa(c,f,g)?l(a)._overflowWeeks=!0:null!=i?l(a)._overflowWeekday=!0:(h=ua(c,d,e,f,g),a._a[Yd]=h.year,a._dayOfYear=h.dayOfYear)}
// date from string and format string
function jb(b){
// TODO: Move this to another part of the creation flow to prevent circular deps
if(b._f===a.ISO_8601)return void db(b);b._a=[],l(b).empty=!0;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=X(b._f,b._locale).match(Bd)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(Z(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&l(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Ed[f]?(d?l(b).empty=!1:l(b).unusedTokens.push(f),ca(f,d,b)):b._strict&&!d&&l(b).unusedTokens.push(f);
// add remaining unparsed input length to the string
l(b).charsLeftOver=i-j,h.length>0&&l(b).unusedInput.push(h),
// clear _12h flag if hour is <= 12
b._a[_d]<=12&&l(b).bigHour===!0&&b._a[_d]>0&&(l(b).bigHour=void 0),l(b).parsedDateParts=b._a.slice(0),l(b).meridiem=b._meridiem,
// handle meridiem
b._a[_d]=kb(b._locale,b._a[_d],b._meridiem),hb(b),cb(b)}function kb(a,b,c){var d;
// Fallback
return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}
// date from string and array of format strings
function lb(a){var b,c,d,e,f;if(0===a._f.length)return l(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],jb(b),m(b)&&(f+=l(b).charsLeftOver,f+=10*l(b).unusedTokens.length,l(b).score=f,(null==d||d>f)&&(d=f,c=b));i(a,c||b)}function mb(a){if(!a._d){var b=K(a._i);a._a=g([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),hb(a)}}function nb(a){var b=new q(cb(ob(a)));
// Adding is smart enough around DST
return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function ob(a){var b=a._i,d=a._f;return a._locale=a._locale||ab(a._l),null===b||void 0===d&&""===b?n({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),r(b)?new q(cb(b)):(c(d)?lb(a):f(b)?a._d=b:d?jb(a):pb(a),m(a)||(a._d=null),a))}function pb(b){var d=b._i;void 0===d?b._d=new Date(a.now()):f(d)?b._d=new Date(d.valueOf()):"string"==typeof d?eb(b):c(d)?(b._a=g(d.slice(0),function(a){return parseInt(a,10)}),hb(b)):"object"==typeof d?mb(b):"number"==typeof d?
// from milliseconds
b._d=new Date(d):a.createFromInputFallback(b)}function qb(a,b,f,g,h){var i={};
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
return"boolean"==typeof f&&(g=f,f=void 0),(d(a)&&e(a)||c(a)&&0===a.length)&&(a=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=h,i._l=f,i._i=a,i._f=b,i._strict=g,nb(i)}function rb(a,b,c,d){return qb(a,b,c,d,!1)}
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}
// TODO: Use [].sort instead?
function tb(){var a=[].slice.call(arguments,0);return sb("isBefore",a)}function ub(){var a=[].slice.call(arguments,0);return sb("isAfter",a)}function vb(a){var b=K(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;
// representation for dateAddRemove
this._milliseconds=+k+1e3*j+// 1000
6e4*i+// 1000 * 60
1e3*h*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days=+g+7*f,
// It is impossible translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months=+e+3*d+12*c,this._data={},this._locale=ab(),this._bubble()}function wb(a){return a instanceof vb}function xb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}
// FORMATTING
function yb(a,b){T(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+S(~~(a/60),2)+b+S(~~a%60,2)})}function zb(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Ge)||["-",0,0],f=+(60*e[1])+t(e[2]);return"+"===e[0]?f:-f}
// Return a moment from input, that is local/utc/zone equivalent to model.
function Ab(b,c){var d,e;
// Use low-level api, because this fn is low-level api.
return c._isUTC?(d=c.clone(),e=(r(b)||f(b)?b.valueOf():rb(b).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+e),a.updateOffset(d,!1),d):rb(b).local()}function Bb(a){
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return 15*-Math.round(a._d.getTimezoneOffset()/15)}
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function Cb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=zb(Td,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Bb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?Sb(this,Nb(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Bb(this):null!=b?this:NaN}function Db(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Eb(a){return this.utcOffset(0,a)}function Fb(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Bb(this),"m")),this}function Gb(){if(this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var a=zb(Sd,this._i);0===a?this.utcOffset(0,!0):this.utcOffset(zb(Sd,this._i))}return this}function Hb(a){return this.isValid()?(a=a?rb(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Ib(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Jb(){if(!o(this._isDSTShifted))return this._isDSTShifted;var a={};if(p(a,this),a=ob(a),a._a){var b=a._isUTC?j(a._a):rb(a._a);this._isDSTShifted=this.isValid()&&u(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Kb(){return this.isValid()?!this._isUTC:!1}function Lb(){return this.isValid()?this._isUTC:!1}function Mb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Nb(a,b){var c,d,e,f=a,
// matching against regexp is expensive, do it on demand
g=null;// checks for null or undefined
return wb(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(g=He.exec(a))?(c="-"===g[1]?-1:1,f={y:0,d:t(g[$d])*c,h:t(g[_d])*c,m:t(g[ae])*c,s:t(g[be])*c,ms:t(xb(1e3*g[ce]))*c}):(g=Ie.exec(a))?(c="-"===g[1]?-1:1,f={y:Ob(g[2],c),M:Ob(g[3],c),w:Ob(g[4],c),d:Ob(g[5],c),h:Ob(g[6],c),m:Ob(g[7],c),s:Ob(g[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=Qb(rb(f.from),rb(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new vb(f),wb(a)&&h(a,"_locale")&&(d._locale=a._locale),d}function Ob(a,b){
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var c=a&&parseFloat(a.replace(",","."));
// apply sign while we're at it
return(isNaN(c)?0:c)*b}function Pb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Qb(a,b){var c;return a.isValid()&&b.isValid()?(b=Ab(b,a),a.isBefore(b)?c=Pb(a,b):(c=Pb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}
// TODO: remove 'name' arg after deprecation is removed
function Rb(a,b){return function(c,d){var e,f;
//invert the arguments, but complain about it
return null===d||isNaN(+d)||(x(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}function Sb(b,c,d,e){var f=c._milliseconds,g=xb(c._days),h=xb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&P(b,"Date",O(b,"Date")+g*d),h&&ia(b,O(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Tb(a,b){var c=a.diff(b,"days",!0);return-6>c?"sameElse":-1>c?"lastWeek":0>c?"lastDay":1>c?"sameDay":2>c?"nextDay":7>c?"nextWeek":"sameElse"}function Ub(b,c){
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var d=b||rb(),e=Ab(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(y(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,rb(d)))}function Vb(){return new q(this)}function Wb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf()):!1}function Xb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf()):!1}function Yb(a,b,c,d){return d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function Zb(a,b){var c,d=r(a)?a:rb(a);return this.isValid()&&d.isValid()?(b=J(b||"millisecond"),"millisecond"===b?this.valueOf()===d.valueOf():(c=d.valueOf(),this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf())):!1}function $b(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function _b(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function ac(a,b,c){var d,e,f,g;// 1000
// 1000 * 60
// 1000 * 60 * 60
// 1000 * 60 * 60 * 24, negate dst
// 1000 * 60 * 60 * 24 * 7, negate dst
return this.isValid()?(d=Ab(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=J(b),"year"===b||"month"===b||"quarter"===b?(g=bc(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:s(g)):NaN):NaN}function bc(a,b){
// difference in months
var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
f=a.clone().add(e,"months");
//check for negative zero, return zero if negative zero
// linear across the month
// linear across the month
return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function cc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dc(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?y(Date.prototype.toISOString)?this.toDate().toISOString():W(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):W(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ec(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var c=W(this,b);return this.localeData().postformat(c)}function fc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Nb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function gc(a){return this.from(rb(),a)}function hc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Nb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ic(a){return this.to(rb(),a)}
// If passed a locale key, it will set the locale for this
// instance.  Otherwise, it will return the locale configuration
// variables for this instance.
function jc(a){var b;return void 0===a?this._locale._abbr:(b=ab(a),null!=b&&(this._locale=b),this)}function kc(){return this._locale}function lc(a){
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch(a=J(a)){case"year":this.month(0);/* falls through */
case"quarter":case"month":this.date(1);/* falls through */
case"week":case"isoWeek":case"day":case"date":this.hours(0);/* falls through */
case"hour":this.minutes(0);/* falls through */
case"minute":this.seconds(0);/* falls through */
case"second":this.milliseconds(0)}
// weeks are a special case
// quarters are also special
return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function mc(a){
// 'date' is an alias for 'day', so it should be considered as such.
return a=J(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function nc(){return this._d.valueOf()-6e4*(this._offset||0)}function oc(){return Math.floor(this.valueOf()/1e3)}function pc(){return new Date(this.valueOf())}function qc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function rc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function sc(){
// new Date(NaN).toJSON() === null
return this.isValid()?this.toISOString():null}function tc(){return m(this)}function uc(){return i({},l(this))}function vc(){return l(this).overflow}function wc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function xc(a,b){T(0,[a,a.length],0,b)}
// MOMENTS
function yc(a){return Cc.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zc(a){return Cc.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Ac(){return wa(this.year(),1,4)}function Bc(){var a=this.localeData()._week;return wa(this.year(),a.dow,a.doy)}function Cc(a,b,c,d,e){var f;return null==a?va(this,d,e).year:(f=wa(a,d,e),b>f&&(b=f),Dc.call(this,a,b,c,d,e))}function Dc(a,b,c,d,e){var f=ua(a,b,c,d,e),g=sa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}
// MOMENTS
function Ec(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}
// HELPERS
// MOMENTS
function Fc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Gc(a,b){b[ce]=t(1e3*("0."+a))}
// MOMENTS
function Hc(){return this._isUTC?"UTC":""}function Ic(){return this._isUTC?"Coordinated Universal Time":""}function Jc(a){return rb(1e3*a)}function Kc(){return rb.apply(null,arguments).parseZone()}function Lc(a){return a}function Mc(a,b,c,d){var e=ab(),f=j().set(d,b);return e[c](f,a)}function Nc(a,b,c){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return Mc(a,b,c,"month");var d,e=[];for(d=0;12>d;d++)e[d]=Mc(a,d,c,"month");return e}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function Oc(a,b,c,d){"boolean"==typeof a?("number"==typeof b&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,"number"==typeof b&&(c=b,b=void 0),b=b||"");var e=ab(),f=a?e._week.dow:0;if(null!=c)return Mc(b,(c+f)%7,d,"day");var g,h=[];for(g=0;7>g;g++)h[g]=Mc(b,(g+f)%7,d,"day");return h}function Pc(a,b){return Nc(a,b,"months")}function Qc(a,b){return Nc(a,b,"monthsShort")}function Rc(a,b,c){return Oc(a,b,c,"weekdays")}function Sc(a,b,c){return Oc(a,b,c,"weekdaysShort")}function Tc(a,b,c){return Oc(a,b,c,"weekdaysMin")}function Uc(){var a=this._data;return this._milliseconds=Ue(this._milliseconds),this._days=Ue(this._days),this._months=Ue(this._months),a.milliseconds=Ue(a.milliseconds),a.seconds=Ue(a.seconds),a.minutes=Ue(a.minutes),a.hours=Ue(a.hours),a.months=Ue(a.months),a.years=Ue(a.years),this}function Vc(a,b,c,d){var e=Nb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}
// supports only 2.0-style add(1, 's') or add(duration)
function Wc(a,b){return Vc(this,a,b,1)}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function Xc(a,b){return Vc(this,a,b,-1)}function Yc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Zc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
// The following code bubbles up values, see the tests for
// examples of what that means.
// convert days to months
// 12 months -> 1 year
return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Yc(_c(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=s(f/1e3),i.seconds=a%60,b=s(a/60),i.minutes=b%60,c=s(b/60),i.hours=c%24,g+=s(c/24),e=s($c(g)),h+=e,g-=Yc(_c(e)),d=s(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function $c(a){
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return 4800*a/146097}function _c(a){
// the reverse of daysToMonths
return 146097*a/4800}function ad(a){var b,c,d=this._milliseconds;if(a=J(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+$c(b),"month"===a?c:c/12;switch(b=this._days+Math.round(_c(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;
// Math.floor prevents floating point math errors here
case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}
// TODO: Use this.as('ms')?
function bd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*t(this._months/12)}function cd(a){return function(){return this.as(a)}}function dd(a){return a=J(a),this[a+"s"]()}function ed(a){return function(){return this._data[a]}}function fd(){return s(this.days()/7)}
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function gd(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function hd(a,b,c){var d=Nb(a).abs(),e=jf(d.as("s")),f=jf(d.as("m")),g=jf(d.as("h")),h=jf(d.as("d")),i=jf(d.as("M")),j=jf(d.as("y")),k=e<kf.s&&["s",e]||1>=f&&["m"]||f<kf.m&&["mm",f]||1>=g&&["h"]||g<kf.h&&["hh",g]||1>=h&&["d"]||h<kf.d&&["dd",h]||1>=i&&["M"]||i<kf.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,gd.apply(null,k)}
// This function allows you to set the rounding function for relative time strings
function id(a){return void 0===a?jf:"function"==typeof a?(jf=a,!0):!1}
// This function allows you to set a threshold for relative time strings
function jd(a,b){return void 0===kf[a]?!1:void 0===b?kf[a]:(kf[a]=b,!0)}function kd(a){var b=this.localeData(),c=hd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function ld(){
// for ISO strings we do not use the normal bubbling rules:
//  * milliseconds bubble up until they become hours
//  * days do not bubble at all
//  * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
var a,b,c,d=lf(this._milliseconds)/1e3,e=lf(this._days),f=lf(this._months);a=s(d/60),b=s(a/60),d%=60,a%=60,c=s(f/12),f%=12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var md,nd;nd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;c>d;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var od=a.momentProperties=[],pd=!1,qd={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var rd;rd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)h(a,b)&&c.push(b);return c};var sd,td={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ud={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},vd="Invalid date",wd="%d",xd=/\d{1,2}/,yd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},zd={},Ad={},Bd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Cd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dd={},Ed={},Fd=/\d/,Gd=/\d\d/,Hd=/\d{3}/,Id=/\d{4}/,Jd=/[+-]?\d{6}/,Kd=/\d\d?/,Ld=/\d\d\d\d?/,Md=/\d\d\d\d\d\d?/,Nd=/\d{1,3}/,Od=/\d{1,4}/,Pd=/[+-]?\d{1,6}/,Qd=/\d+/,Rd=/[+-]?\d+/,Sd=/Z|[+-]\d\d:?\d\d/gi,Td=/Z|[+-]\d\d(?::?\d\d)?/gi,Ud=/[+-]?\d+(\.\d{1,3})?/,Vd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wd={},Xd={},Yd=0,Zd=1,$d=2,_d=3,ae=4,be=5,ce=6,de=7,ee=8;sd=Array.prototype.indexOf?Array.prototype.indexOf:function(a){
// I know
var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1},T("M",["MM",2],"Mo",function(){return this.month()+1}),T("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),T("MMMM",0,0,function(a){return this.localeData().months(this,a)}),I("month","M"),L("month",8),Y("M",Kd),Y("MM",Kd,Gd),Y("MMM",function(a,b){return b.monthsShortRegex(a)}),Y("MMMM",function(a,b){return b.monthsRegex(a)}),aa(["M","MM"],function(a,b){b[Zd]=t(a)-1}),aa(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Zd]=e:l(c).invalidMonth=a});
// LOCALES
var fe=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ge="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),he="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ie=Vd,je=Vd;
// FORMATTING
T("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),T(0,["YY",2],0,function(){return this.year()%100}),T(0,["YYYY",4],0,"year"),T(0,["YYYYY",5],0,"year"),T(0,["YYYYYY",6,!0],0,"year"),
// ALIASES
I("year","y"),
// PRIORITIES
L("year",1),
// PARSING
Y("Y",Rd),Y("YY",Kd,Gd),Y("YYYY",Od,Id),Y("YYYYY",Pd,Jd),Y("YYYYYY",Pd,Jd),aa(["YYYYY","YYYYYY"],Yd),aa("YYYY",function(b,c){c[Yd]=2===b.length?a.parseTwoDigitYear(b):t(b)}),aa("YY",function(b,c){c[Yd]=a.parseTwoDigitYear(b)}),aa("Y",function(a,b){b[Yd]=parseInt(a,10)}),
// HOOKS
a.parseTwoDigitYear=function(a){return t(a)+(t(a)>68?1900:2e3)};
// MOMENTS
var ke=N("FullYear",!0);
// FORMATTING
T("w",["ww",2],"wo","week"),T("W",["WW",2],"Wo","isoWeek"),
// ALIASES
I("week","w"),I("isoWeek","W"),
// PRIORITIES
L("week",5),L("isoWeek",5),
// PARSING
Y("w",Kd),Y("ww",Kd,Gd),Y("W",Kd),Y("WW",Kd,Gd),ba(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=t(a)});var le={dow:0,// Sunday is the first day of the week.
doy:6};
// FORMATTING
T("d",0,"do","day"),T("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),T("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),T("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),T("e",0,0,"weekday"),T("E",0,0,"isoWeekday"),
// ALIASES
I("day","d"),I("weekday","e"),I("isoWeekday","E"),
// PRIORITY
L("day",11),L("weekday",11),L("isoWeekday",11),
// PARSING
Y("d",Kd),Y("e",Kd),Y("E",Kd),Y("dd",function(a,b){return b.weekdaysMinRegex(a)}),Y("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Y("dddd",function(a,b){return b.weekdaysRegex(a)}),ba(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);
// if we didn't get a weekday name, mark the date as invalid
null!=e?b.d=e:l(c).invalidWeekday=a}),ba(["d","e","E"],function(a,b,c,d){b[d]=t(a)});
// LOCALES
var me="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pe=Vd,qe=Vd,re=Vd;T("H",["HH",2],0,"hour"),T("h",["hh",2],0,Qa),T("k",["kk",2],0,Ra),T("hmm",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)}),T("hmmss",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)+S(this.seconds(),2)}),T("Hmm",0,0,function(){return""+this.hours()+S(this.minutes(),2)}),T("Hmmss",0,0,function(){return""+this.hours()+S(this.minutes(),2)+S(this.seconds(),2)}),Sa("a",!0),Sa("A",!1),
// ALIASES
I("hour","h"),
// PRIORITY
L("hour",13),Y("a",Ta),Y("A",Ta),Y("H",Kd),Y("h",Kd),Y("HH",Kd,Gd),Y("hh",Kd,Gd),Y("hmm",Ld),Y("hmmss",Md),Y("Hmm",Ld),Y("Hmmss",Md),aa(["H","HH"],_d),aa(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),aa(["h","hh"],function(a,b,c){b[_d]=t(a),l(c).bigHour=!0}),aa("hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d)),l(c).bigHour=!0}),aa("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e)),l(c).bigHour=!0}),aa("Hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d))}),aa("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e))});var se,te=/[ap]\.?m?\.?/i,ue=N("Hours",!0),ve={calendar:td,longDateFormat:ud,invalidDate:vd,ordinal:wd,ordinalParse:xd,relativeTime:yd,months:ge,monthsShort:he,week:le,weekdays:me,weekdaysMin:oe,weekdaysShort:ne,meridiemParse:te},we={},xe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ze=/Z|[+-]\d\d(?::?\d\d)?/,Ae=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],
// YYYYMM is NOT allowed by the standard
["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ce=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=w("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),
// constant that refers to the ISO standard
a.ISO_8601=function(){};var De=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:n()}),Ee=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:n()}),Fe=function(){return Date.now?Date.now():+new Date};yb("Z",":"),yb("ZZ",""),
// PARSING
Y("Z",Td),Y("ZZ",Td),aa(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=zb(Td,a)});
// HELPERS
// timezone chunker
// '+10:00' > ['10',  '00']
// '-1530'  > ['-15', '30']
var Ge=/([\+\-]|\d\d)/gi;
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
a.updateOffset=function(){};
// ASP.NET json date format regex
var He=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Nb.fn=vb.prototype;var Je=Rb(1,"add"),Ke=Rb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Le=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});
// FORMATTING
T(0,["gg",2],0,function(){return this.weekYear()%100}),T(0,["GG",2],0,function(){return this.isoWeekYear()%100}),xc("gggg","weekYear"),xc("ggggg","weekYear"),xc("GGGG","isoWeekYear"),xc("GGGGG","isoWeekYear"),
// ALIASES
I("weekYear","gg"),I("isoWeekYear","GG"),
// PRIORITY
L("weekYear",1),L("isoWeekYear",1),
// PARSING
Y("G",Rd),Y("g",Rd),Y("GG",Kd,Gd),Y("gg",Kd,Gd),Y("GGGG",Od,Id),Y("gggg",Od,Id),Y("GGGGG",Pd,Jd),Y("ggggg",Pd,Jd),ba(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=t(a)}),ba(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),
// FORMATTING
T("Q",0,"Qo","quarter"),
// ALIASES
I("quarter","Q"),
// PRIORITY
L("quarter",7),
// PARSING
Y("Q",Fd),aa("Q",function(a,b){b[Zd]=3*(t(a)-1)}),
// FORMATTING
T("D",["DD",2],"Do","date"),
// ALIASES
I("date","D"),
// PRIOROITY
L("date",9),
// PARSING
Y("D",Kd),Y("DD",Kd,Gd),Y("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),aa(["D","DD"],$d),aa("Do",function(a,b){b[$d]=t(a.match(Kd)[0],10)});
// MOMENTS
var Me=N("Date",!0);
// FORMATTING
T("DDD",["DDDD",3],"DDDo","dayOfYear"),
// ALIASES
I("dayOfYear","DDD"),
// PRIORITY
L("dayOfYear",4),
// PARSING
Y("DDD",Nd),Y("DDDD",Hd),aa(["DDD","DDDD"],function(a,b,c){c._dayOfYear=t(a)}),
// FORMATTING
T("m",["mm",2],0,"minute"),
// ALIASES
I("minute","m"),
// PRIORITY
L("minute",14),
// PARSING
Y("m",Kd),Y("mm",Kd,Gd),aa(["m","mm"],ae);
// MOMENTS
var Ne=N("Minutes",!1);
// FORMATTING
T("s",["ss",2],0,"second"),
// ALIASES
I("second","s"),
// PRIORITY
L("second",15),
// PARSING
Y("s",Kd),Y("ss",Kd,Gd),aa(["s","ss"],be);
// MOMENTS
var Oe=N("Seconds",!1);
// FORMATTING
T("S",0,0,function(){return~~(this.millisecond()/100)}),T(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),T(0,["SSS",3],0,"millisecond"),T(0,["SSSS",4],0,function(){return 10*this.millisecond()}),T(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),T(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),T(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),T(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),T(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),
// ALIASES
I("millisecond","ms"),
// PRIORITY
L("millisecond",16),
// PARSING
Y("S",Nd,Fd),Y("SS",Nd,Gd),Y("SSS",Nd,Hd);var Pe;for(Pe="SSSS";Pe.length<=9;Pe+="S")Y(Pe,Qd);for(Pe="S";Pe.length<=9;Pe+="S")aa(Pe,Gc);
// MOMENTS
var Qe=N("Milliseconds",!1);
// FORMATTING
T("z",0,0,"zoneAbbr"),T("zz",0,0,"zoneName");var Re=q.prototype;Re.add=Je,Re.calendar=Ub,Re.clone=Vb,Re.diff=ac,Re.endOf=mc,Re.format=ec,Re.from=fc,Re.fromNow=gc,Re.to=hc,Re.toNow=ic,Re.get=Q,Re.invalidAt=vc,Re.isAfter=Wb,Re.isBefore=Xb,Re.isBetween=Yb,Re.isSame=Zb,Re.isSameOrAfter=$b,Re.isSameOrBefore=_b,Re.isValid=tc,Re.lang=Le,Re.locale=jc,Re.localeData=kc,Re.max=Ee,Re.min=De,Re.parsingFlags=uc,Re.set=R,Re.startOf=lc,Re.subtract=Ke,Re.toArray=qc,Re.toObject=rc,Re.toDate=pc,Re.toISOString=dc,Re.toJSON=sc,Re.toString=cc,Re.unix=oc,Re.valueOf=nc,Re.creationData=wc,
// Year
Re.year=ke,Re.isLeapYear=qa,
// Week Year
Re.weekYear=yc,Re.isoWeekYear=zc,
// Quarter
Re.quarter=Re.quarters=Ec,
// Month
Re.month=ja,Re.daysInMonth=ka,
// Week
Re.week=Re.weeks=Aa,Re.isoWeek=Re.isoWeeks=Ba,Re.weeksInYear=Bc,Re.isoWeeksInYear=Ac,
// Day
Re.date=Me,Re.day=Re.days=Ja,Re.weekday=Ka,Re.isoWeekday=La,Re.dayOfYear=Fc,
// Hour
Re.hour=Re.hours=ue,
// Minute
Re.minute=Re.minutes=Ne,
// Second
Re.second=Re.seconds=Oe,
// Millisecond
Re.millisecond=Re.milliseconds=Qe,
// Offset
Re.utcOffset=Cb,Re.utc=Eb,Re.local=Fb,Re.parseZone=Gb,Re.hasAlignedHourOffset=Hb,Re.isDST=Ib,Re.isLocal=Kb,Re.isUtcOffset=Lb,Re.isUtc=Mb,Re.isUTC=Mb,
// Timezone
Re.zoneAbbr=Hc,Re.zoneName=Ic,
// Deprecations
Re.dates=w("dates accessor is deprecated. Use date instead.",Me),Re.months=w("months accessor is deprecated. Use month instead",ja),Re.years=w("years accessor is deprecated. Use year instead",ke),Re.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Db),Re.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Jb);var Se=Re,Te=B.prototype;Te.calendar=C,Te.longDateFormat=D,Te.invalidDate=E,Te.ordinal=F,Te.preparse=Lc,Te.postformat=Lc,Te.relativeTime=G,Te.pastFuture=H,Te.set=z,
// Month
Te.months=ea,Te.monthsShort=fa,Te.monthsParse=ha,Te.monthsRegex=ma,Te.monthsShortRegex=la,
// Week
Te.week=xa,Te.firstDayOfYear=za,Te.firstDayOfWeek=ya,
// Day of Week
Te.weekdays=Ea,Te.weekdaysMin=Ga,Te.weekdaysShort=Fa,Te.weekdaysParse=Ia,Te.weekdaysRegex=Ma,Te.weekdaysShortRegex=Na,Te.weekdaysMinRegex=Oa,
// Hours
Te.isPM=Ua,Te.meridiem=Va,Za("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===t(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),
// Side effect imports
a.lang=w("moment.lang is deprecated. Use moment.locale instead.",Za),a.langData=w("moment.langData is deprecated. Use moment.localeData instead.",ab);var Ue=Math.abs,Ve=cd("ms"),We=cd("s"),Xe=cd("m"),Ye=cd("h"),Ze=cd("d"),$e=cd("w"),_e=cd("M"),af=cd("y"),bf=ed("milliseconds"),cf=ed("seconds"),df=ed("minutes"),ef=ed("hours"),ff=ed("days"),gf=ed("months"),hf=ed("years"),jf=Math.round,kf={s:45,// seconds to minute
m:45,// minutes to hour
h:22,// hours to day
d:26,// days to month
M:11},lf=Math.abs,mf=vb.prototype;mf.abs=Uc,mf.add=Wc,mf.subtract=Xc,mf.as=ad,mf.asMilliseconds=Ve,mf.asSeconds=We,mf.asMinutes=Xe,mf.asHours=Ye,mf.asDays=Ze,mf.asWeeks=$e,mf.asMonths=_e,mf.asYears=af,mf.valueOf=bd,mf._bubble=Zc,mf.get=dd,mf.milliseconds=bf,mf.seconds=cf,mf.minutes=df,mf.hours=ef,mf.days=ff,mf.weeks=fd,mf.months=gf,mf.years=hf,mf.humanize=kd,mf.toISOString=ld,mf.toString=ld,mf.toJSON=ld,mf.locale=jc,mf.localeData=kc,
// Deprecations
mf.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ld),mf.lang=Le,
// Side effect imports
// FORMATTING
T("X",0,0,"unix"),T("x",0,0,"valueOf"),
// PARSING
Y("x",Rd),Y("X",Ud),aa("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),aa("x",function(a,b,c){c._d=new Date(t(a))}),
// Side effect imports
a.version="2.15.1",b(rb),a.fn=Se,a.min=tb,a.max=ub,a.now=Fe,a.utc=j,a.unix=Jc,a.months=Pc,a.isDate=f,a.locale=Za,a.invalid=n,a.duration=Nb,a.isMoment=r,a.weekdays=Rc,a.parseZone=Kc,a.localeData=ab,a.isDuration=wb,a.monthsShort=Qc,a.weekdaysMin=Tc,a.defineLocale=$a,a.updateLocale=_a,a.locales=bb,a.weekdaysShort=Sc,a.normalizeUnits=J,a.relativeTimeRounding=id,a.relativeTimeThreshold=jd,a.calendarFormat=Tb,a.prototype=Se;var nf=a;return nf});;
if("document"in self){if(!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))){(function(t){"use strict";if(!("Element"in t))return;var e="classList",i="prototype",n=t.Element[i],s=Object,r=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[i].indexOf||function(t){var e=0,i=this.length;for(;e<i;e++){if(e in this&&this[e]===t){return e}}return-1},o=function(t,e){this.name=t;this.code=DOMException[t];this.message=e},l=function(t,e){if(e===""){throw new o("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(e)){throw new o("INVALID_CHARACTER_ERR","String contains an invalid character")}return a.call(t,e)},c=function(t){var e=r.call(t.getAttribute("class")||""),i=e?e.split(/\s+/):[],n=0,s=i.length;for(;n<s;n++){this.push(i[n])}this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=c[i]=[],f=function(){return new c(this)};o[i]=Error[i];u.item=function(t){return this[t]||null};u.contains=function(t){t+="";return l(this,t)!==-1};u.add=function(){var t=arguments,e=0,i=t.length,n,s=false;do{n=t[e]+"";if(l(this,n)===-1){this.push(n);s=true}}while(++e<i);if(s){this._updateClassName()}};u.remove=function(){var t=arguments,e=0,i=t.length,n,s=false,r;do{n=t[e]+"";r=l(this,n);while(r!==-1){this.splice(r,1);s=true;r=l(this,n)}}while(++e<i);if(s){this._updateClassName()}};u.toggle=function(t,e){t+="";var i=this.contains(t),n=i?e!==true&&"remove":e!==false&&"add";if(n){this[n](t)}if(e===true||e===false){return e}else{return!i}};u.toString=function(){return this.join(" ")};if(s.defineProperty){var h={get:f,enumerable:true,configurable:true};try{s.defineProperty(n,e,h)}catch(d){if(d.number===-2146823252){h.enumerable=false;s.defineProperty(n,e,h)}}}else if(s[i].__defineGetter__){n.__defineGetter__(e,f)}})(self)}else{(function(){"use strict";var t=document.createElement("_");t.classList.add("c1","c2");if(!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var i,n=arguments.length;for(i=0;i<n;i++){t=arguments[i];e.call(this,t)}}};e("add");e("remove")}t.classList.toggle("c3",false);if(t.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){if(1 in arguments&&!this.contains(t)===!e){return e}else{return i.call(this,t)}}}t=null})()}}
;
/* eslint-disable-next-line spaced-comment */
/// <reference path="../typings/facebook-pixel/facebook-pixel.d.ts" />
'use strict';
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
var Cinemark;
(function (Cinemark) {
    var Tracking;
    (function (Tracking) {
        var FaceBookPixel;
        (function (FaceBookPixel) {
            class ViewContentParameters {
            }
            FaceBookPixel.ViewContentParameters = ViewContentParameters;
            class SearchParameters {
            }
            FaceBookPixel.SearchParameters = SearchParameters;
            class AddToCartParameters {
            }
            FaceBookPixel.AddToCartParameters = AddToCartParameters;
            class AddToWishlistParameters {
            }
            FaceBookPixel.AddToWishlistParameters = AddToWishlistParameters;
            class InitiateCheckoutParameters {
            }
            FaceBookPixel.InitiateCheckoutParameters = InitiateCheckoutParameters;
            class AddPaymentInfoParameters {
            }
            FaceBookPixel.AddPaymentInfoParameters = AddPaymentInfoParameters;
            class PurchaseParameters {
            }
            FaceBookPixel.PurchaseParameters = PurchaseParameters;
            class LeadParameters {
            }
            FaceBookPixel.LeadParameters = LeadParameters;
            class CompleteRegistrationParameters {
            }
            FaceBookPixel.CompleteRegistrationParameters = CompleteRegistrationParameters;
            class EntryFormParameters {
            }
            FaceBookPixel.EntryFormParameters = EntryFormParameters;
            class Tracker {
                trackSearch(searchString, contentIds, contentCategory) {
                    const parameters = new SearchParameters();
                    parameters.search_string = searchString;
                    parameters.content_ids = contentIds;
                    if (contentCategory) {
                        parameters.content_category = contentCategory;
                    }
                }
                trackViewContent(contentName, contentIds, contentType, value, currency) {
                    const parameters = new ViewContentParameters();
                    parameters.content_name = contentName;
                    parameters.content_ids = contentIds;
                    parameters.content_type = contentType;
                    // FIXME: what do we care about here? do we care that the value is not null? if so we
                    // can just do if (value) {
                    if (typeof value !== 'undefined') {
                        parameters.value = value;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackAddToCart(contentName, contentIds, contentType, value, currency) {
                    const parameters = new AddToCartParameters();
                    parameters.content_name = contentName;
                    parameters.content_ids = contentIds;
                    parameters.content_type = contentType;
                    parameters.value = value;
                    parameters.currency = currency || 'USD';
                }
                trackAddToWishlist(contentName, contentIds, value, contentCategory, currency) {
                    const parameters = new AddToWishlistParameters();
                    parameters.content_name = contentName;
                    parameters.content_ids = contentIds;
                    if (contentCategory) {
                        parameters.content_category = contentCategory;
                    }
                    // FIXME: what do we care about here? do we care that the value is not null? if so we
                    // can just do if (value) {
                    if (typeof value !== 'undefined') {
                        parameters.value = value;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackInitiateCheckout(contentName, contentIds, value, numberItems, contentCategory, currency) {
                    const parameters = new InitiateCheckoutParameters();
                    parameters.content_name = contentName;
                    parameters.content_ids = contentIds;
                    parameters.value = value;
                    parameters.num_items = numberItems;
                    if (contentCategory) {
                        parameters.content_category = contentCategory;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackPurchase(contentName, contentIds, value, numberItems, contentType, currency) {
                    const parameters = new PurchaseParameters();
                    parameters.content_name = contentName;
                    parameters.content_ids = contentIds;
                    parameters.value = value;
                    parameters.num_items = numberItems;
                    if (contentType) {
                        parameters.content_type = contentType;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackLead(contentName, contentCategory, value, currency) {
                    const parameters = new LeadParameters();
                    parameters.content_name = contentName;
                    parameters.content_category = contentCategory;
                    // FIXME: what do we care about here? do we care that the value is not null? if so we
                    // can just do if (value) {
                    if (typeof value !== 'undefined') {
                        parameters.value = value;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackCompleteRegistration(contentName, status, value, currency) {
                    const parameters = new CompleteRegistrationParameters();
                    if (contentName) {
                        parameters.content_name = contentName;
                    }
                    if (status) {
                        parameters.status = status;
                    }
                    // FIXME: what do we care about here? do we care that the value is not null? if so we
                    // can just do if (value) {
                    if (typeof value !== 'undefined') {
                        parameters.value = value;
                    }
                    parameters.currency = currency || 'USD';
                }
                trackEntryForm(formName) {
                    const parameters = new EntryFormParameters();
                    if (formName) {
                        parameters.form_type = formName;
                    }
                }
            }
            FaceBookPixel.Tracker = Tracker;
        })(FaceBookPixel = Tracking.FaceBookPixel || (Tracking.FaceBookPixel = {}));
    })(Tracking = Cinemark.Tracking || (Cinemark.Tracking = {}));
})(Cinemark || (Cinemark = {}));
//# sourceMappingURL=facebookPixel.js.map;
var Cinemark;
(function (Cinemark) {
    var ButtonUtilities;
    (function (ButtonUtilities) {
        class PreventSubmitButtonDoubleClick {
            constructor() {
                // Wire up onclick event handlers for all submit buttons in forms marked with the
                // "dataPreventSubmitButtonDoubleClick" attribute
                const forms = $('form[dataPreventSubmitButtonDoubleClick]', document);
                for (let fi = 0; fi < forms.length; fi++) {
                    const form = forms[fi];
                    const submitButtons = $("input[type='submit']", form);
                    for (let si = 0; si < submitButtons.length; si++) {
                        submitButtons[si].onclick = (event) => {
                            this.submitButtonOnClick(event);
                        };
                    }
                }
            }
            submitButtonOnClick(event) {
                const targetButton = event.target;
                // Store the value of the clicked submit button in the element marked with the
                // "data-submitButtonValue" attribute if it exists.
                const hidden = $('input[data-submitButtonValue]', targetButton.form)[0];
                if (hidden) {
                    hidden.value = targetButton.value;
                }
                const form = jQuery(targetButton.form);
                if (form.valid()) {
                    // Disable all submit buttons in the parent form in which the target submit button
                    // is embedded
                    const submitButtons = $("input[type='submit']", targetButton.form);
                    for (let si = 0; si < submitButtons.length; si++) {
                        submitButtons[si].disabled = true;
                    }
                }
                // Submit the form if the submit button is NOT marked with the "data-callback"
                if (!targetButton.attributes.getNamedItem('data-callback')) {
                    // targetButton.form.submit();           // this won't fire form.onsubmit event handlers
                    form.trigger('submit'); // this will fire form.onsubmit event handlers, which we need for the spinner in some cases
                }
            }
        }
        ButtonUtilities.PreventSubmitButtonDoubleClick = PreventSubmitButtonDoubleClick;
    })(ButtonUtilities = Cinemark.ButtonUtilities || (Cinemark.ButtonUtilities = {}));
})(Cinemark || (Cinemark = {}));
$(document).ready(() => {
    new Cinemark.ButtonUtilities.PreventSubmitButtonDoubleClick();
});
//# sourceMappingURL=submitButtonUtilities.js.map;
// http://spin.js.org/#v2.3.2
!function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d<l.length;d++)if(c=l[d]+b,void 0!==e[c])return c}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k,l=["webkit","Moz","ms","O"],m={},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(h.defaults={},f(h.prototype,{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=a(null,{className:d.className});if(e(f,{position:d.position,width:0,zIndex:d.zIndex,left:d.left,top:d.top}),b&&b.insertBefore(f,b.firstChild||null),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),"undefined"!=typeof document){k=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}();var o=e(a("group"),{behavior:"url(#default#VML)"});!d(o,"transform")&&o.adj?i():j=d(o,"animation")}return h});;
var window="undefined"==typeof window?{}:window;!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof module&&module.exports?module.exports=e():t.bodymovin=e()}(window,function(){function ProjectInterface(){return{}}function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function roundTo2Decimals(t){return Math.round(1e4*t)/1e4}function roundTo3Decimals(t){return Math.round(100*t)/100}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,r,s){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=0>s?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,r,s){this.type=t,this.currentLoop=e,this.totalLoops=r,this.direction=0>s?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function _addEventListener(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)}function _removeEventListener(t,e){if(e){if(this._cbs[t]){for(var r=0,s=this._cbs[t].length;s>r;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,s-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}function _triggerEvent(t,e){if(this._cbs[t])for(var r=this._cbs[t].length,s=0;r>s;s++)this._cbs[t][s](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var r,s="";for(r=t;r>0;--r)s+=e[Math.round(Math.random()*(e.length-1))];return s}function HSVtoRGB(t,e,r){var s,i,a,n,o,h,l,p;switch(1===arguments.length&&(e=t.s,r=t.v,t=t.h),n=Math.floor(6*t),o=6*t-n,h=r*(1-e),l=r*(1-o*e),p=r*(1-(1-o)*e),n%6){case 0:s=r,i=p,a=h;break;case 1:s=l,i=r,a=h;break;case 2:s=h,i=r,a=p;break;case 3:s=h,i=l,a=r;break;case 4:s=p,i=h,a=r;break;case 5:s=r,i=h,a=l}return[s,i,a]}function RGBtoHSV(t,e,r){1===arguments.length&&(e=t.g,r=t.b,t=t.r);var s,i=Math.max(t,e,r),a=Math.min(t,e,r),n=i-a,o=0===i?0:n/i,h=i/255;switch(i){case a:s=0;break;case t:s=e-r+n*(r>e?6:0),s/=6*n;break;case e:s=r-t+2*n,s/=6*n;break;case r:s=t-e+4*n,s/=6*n}return[s,o,h]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}function componentToHex(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function fillToRgba(t,e){if(!cachedColors[t]){var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);cachedColors[t]=parseInt(r[1],16)+","+parseInt(r[2],16)+","+parseInt(r[3],16)}return"rgba("+cachedColors[t]+","+e+")"}function RenderedFrame(t,e){this.tr=t,this.o=e}function iterateDynamicProperties(t){var e,r=this.dynamicProperties;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(t)}function reversePath(t){var e,r,s=[],i=[],a=[],n={},o=0;t.c&&(s[0]=t.o[0],i[0]=t.i[0],a[0]=t.v[0],o=1),r=t.i.length;var h=r-1;for(e=o;r>e;e+=1)s.push(t.o[h]),i.push(t.i[h]),a.push(t.v[h]),h-=1;return n.i=s,n.o=i,n.v=a,n}function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,r,s,i,a){return t.reset().translate(i,a).rotate(e).scale(r,s).toCSS()},r=function(t){return e(t.tr.r[2],t.tr.s[0],t.tr.s[1],t.tr.p[0],t.tr.p[1])};return{getMatrix:r}}function createElement(t,e,r){if(!e){var s=Object.create(t.prototype,r),i={};return s&&"[object Function]"===i.toString.call(s.init)&&s.init(),s}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype._parent=t.prototype}function extendPrototype(t,e){for(var r in t.prototype)t.prototype.hasOwnProperty(r)&&(e.prototype[r]=t.prototype[r])}function bezFunction(){function t(t,e,r,s,i,a){var n=t*s+e*i+r*a-i*s-a*t-r*e;return n>-1e-4&&1e-4>n}function e(e,r,s,i,a,n,o,h,l){if(0===s&&0===n&&0===l)return t(e,r,i,a,o,h);var p,m=Math.sqrt(Math.pow(i-e,2)+Math.pow(a-r,2)+Math.pow(n-s,2)),f=Math.sqrt(Math.pow(o-e,2)+Math.pow(h-r,2)+Math.pow(l-s,2)),c=Math.sqrt(Math.pow(o-i,2)+Math.pow(h-a,2)+Math.pow(l-n,2));return p=m>f?m>c?m-f-c:c-f-m:c>f?c-f-m:f-m-c,p>-1e-4&&1e-4>p}function r(t){var e,r=t.c,s=t.v,i=t.o,a=t.i,n=t._length,o=[],h=0;for(e=0;n-1>e;e+=1)o[e]=l(s[e],s[e+1],i[e],a[e+1]),h+=o[e].addedLength;return r&&(o[e]=l(s[e],s[0],i[e],a[0]),h+=o[e].addedLength),{lengths:o,totalLength:h}}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var r=e.segments,s=r.length,i=bm_floor((s-1)*t),a=t*e.addedLength,n=0;if(a==r[i].l)return r[i].p;for(var o=r[i].l>a?-1:1,h=!0;h;)r[i].l<=a&&r[i+1].l>a?(n=(a-r[i].l)/(r[i+1].l-r[i].l),h=!1):i+=o,(0>i||i>=s-1)&&(h=!1);return r[i].p+(r[i+1].p-r[i].p)*n}function n(){this.pt1=new Array(2),this.pt2=new Array(2),this.pt3=new Array(2),this.pt4=new Array(2)}function o(t,e,r,s,i,n){var o=a(i,n),h=1-o,l=Math.round(1e3*(h*h*h*t[0]+(o*h*h+h*o*h+h*h*o)*r[0]+(o*o*h+h*o*o+o*h*o)*s[0]+o*o*o*e[0]))/1e3,p=Math.round(1e3*(h*h*h*t[1]+(o*h*h+h*o*h+h*h*o)*r[1]+(o*o*h+h*o*o+o*h*o)*s[1]+o*o*o*e[1]))/1e3;return[l,p]}function h(t,e,r,s,i,o,h){var l=new n;i=0>i?0:i>1?1:i;var p=a(i,h);o=o>1?1:o;var m,f=a(o,h),c=t.length,d=1-p,u=1-f;for(m=0;c>m;m+=1)l.pt1[m]=Math.round(1e3*(d*d*d*t[m]+(p*d*d+d*p*d+d*d*p)*r[m]+(p*p*d+d*p*p+p*d*p)*s[m]+p*p*p*e[m]))/1e3,l.pt3[m]=Math.round(1e3*(d*d*u*t[m]+(p*d*u+d*p*u+d*d*f)*r[m]+(p*p*u+d*p*f+p*d*f)*s[m]+p*p*f*e[m]))/1e3,l.pt4[m]=Math.round(1e3*(d*u*u*t[m]+(p*u*u+d*f*u+d*u*f)*r[m]+(p*f*u+d*f*f+p*u*f)*s[m]+p*f*f*e[m]))/1e3,l.pt2[m]=Math.round(1e3*(u*u*u*t[m]+(f*u*u+u*f*u+u*u*f)*r[m]+(f*f*u+u*f*f+f*u*f)*s[m]+f*f*f*e[m]))/1e3;return l}var l=(Math,function(){function t(t,e){this.l=t,this.p=e}return function(e,r,s,i){var a,n,o,h,l,p,m=defaultCurveSegments,f=0,c=[],d=[],u={addedLength:0,segments:[]};for(o=s.length,a=0;m>a;a+=1){for(l=a/(m-1),p=0,n=0;o>n;n+=1)h=bm_pow(1-l,3)*e[n]+3*bm_pow(1-l,2)*l*s[n]+3*(1-l)*bm_pow(l,2)*i[n]+bm_pow(l,3)*r[n],c[n]=h,null!==d[n]&&(p+=bm_pow(c[n]-d[n],2)),d[n]=c[n];p&&(p=bm_sqrt(p),f+=p),u.segments.push(new t(f,l))}return u.addedLength=f,u}}()),p=function(){var e={};return function(r){var a=r.s,n=r.e,o=r.to,h=r.ti,l=(a.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(r.bezierData=e[l]);var p,m,f,c,d,u,y,g=defaultCurveSegments,v=0,b=null;2===a.length&&(a[0]!=n[0]||a[1]!=n[1])&&t(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&t(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(g=2);var E=new s(g);for(f=o.length,p=0;g>p;p+=1){for(y=new Array(f),d=p/(g-1),u=0,m=0;f>m;m+=1)c=bm_pow(1-d,3)*a[m]+3*bm_pow(1-d,2)*d*(a[m]+o[m])+3*(1-d)*bm_pow(d,2)*(n[m]+h[m])+bm_pow(d,3)*n[m],y[m]=c,null!==b&&(u+=bm_pow(y[m]-b[m],2));u=bm_sqrt(u),v+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=v,r.bezierData=E,e[l]=E}}();return{getBezierLength:l,getSegmentsLength:r,getNewSegment:h,getPointInSegment:o,buildBezierData:p,pointOnLine2D:t,pointOnLine3D:e}}function dataFunctionManager(){function t(i,a,o){var h,l,p,m,f,c,d,u,y=i.length;for(m=0;y>m;m+=1)if(h=i[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(i[m-1].td=h.tt),l=[],p=-1,h.hasMask){var g=h.masksProperties;for(c=g.length,f=0;c>f;f+=1)if(g[f].pt.k.i)s(g[f].pt.k);else for(u=g[f].pt.k.length,d=0;u>d;d+=1)g[f].pt.k[d].s&&s(g[f].pt.k[d].s[0]),g[f].pt.k[d].e&&s(g[f].pt.k[d].e[0])}0===h.ty?(h.layers=e(h.refId,a),t(h.layers,a,o)):4===h.ty?r(h.shapes):5==h.ty&&n(h,o)}}function e(t,e){for(var r=0,s=e.length;s>r;){if(e[r].id===t)return e[r].layers.__used?JSON.parse(JSON.stringify(e[r].layers)):(e[r].layers.__used=!0,e[r].layers);r+=1}}function r(t){var e,i,a,n=t.length,o=!1;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty){if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,i=0;a>i;i+=1)t[e].ks.k[i].s&&s(t[e].ks.k[i].s[0]),t[e].ks.k[i].e&&s(t[e].ks.k[i].e[0]);o=!0}else"gr"==t[e].ty&&r(t[e].it)}function s(t){var e,r=t.i.length;for(e=0;r>e;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function i(t,e){var r=e?e.split("."):[100,100,100];return t[0]>r[0]?!0:r[0]>t[0]?!1:t[1]>r[1]?!0:r[1]>t[1]?!1:t[2]>r[2]?!0:r[2]>t[2]?!1:void 0}function a(e,r){e.__complete||(l(e),o(e),h(e),p(e),t(e.layers,e.assets,r),e.__complete=!0)}function n(t,e){var r,s,i=t.t.d.k,a=i.length;for(s=0;a>s;s+=1){var n=t.t.d.k[s].s;r=[];var o,h,l,p,m,f,c,d=0,u=t.t.m.g,y=0,g=0,v=0,b=[],E=0,P=0,S=e.getFontByName(n.f),x=0,C=S.fStyle.split(" "),k="normal",A="normal";h=C.length;var M;for(o=0;h>o;o+=1)M=C[o].toLowerCase(),"italic"===M?A="italic":"bold"===M?k="700":"black"===M?k="900":"medium"===M?k="500":"regular"===M||"normal"===M?k="400":("light"===M||"thin"===M)&&(k="200");if(n.fWeight=k,n.fStyle=A,h=n.t.length,n.sz){var D=n.sz[0],T=-1;for(o=0;h>o;o+=1)l=!1," "===n.t.charAt(o)?T=o:13===n.t.charCodeAt(o)&&(E=0,l=!0),e.chars?(c=e.getCharData(n.t.charAt(o),S.fStyle,S.fFamily),x=l?0:c.w*n.s/100):x=e.measureText(n.t.charAt(o),n.f,n.s),E+x>D?(-1===T?(n.t=n.t.substr(0,o)+"\r"+n.t.substr(o),h+=1):(o=T,n.t=n.t.substr(0,o)+"\r"+n.t.substr(o+1)),T=-1,E=0):E+=x;h=n.t.length}var w=n.tr/1e3*n.s;for(E=-w,x=0,o=0;h>o;o+=1)if(l=!1," "===n.t.charAt(o)?p="\xa0":13===n.t.charCodeAt(o)?(b.push(E),P=E>P?E:P,E=-2*w,p="",l=!0,v+=1):p=n.t.charAt(o),e.chars?(c=e.getCharData(n.t.charAt(o),S.fStyle,e.getFontByName(n.f).fFamily),x=l?0:c.w*n.s/100):x=e.measureText(p,n.f,n.s),E+=x+w,r.push({l:x,an:x,add:y,n:l,anIndexes:[],val:p,line:v}),2==u){if(y+=x,""==p||"\xa0"==p||o==h-1){for((""==p||"\xa0"==p)&&(y-=x);o>=g;)r[g].an=y,r[g].ind=d,r[g].extra=x,g+=1;d+=1,y=0}}else if(3==u){if(y+=x,""==p||o==h-1){for(""==p&&(y-=x);o>=g;)r[g].an=y,r[g].ind=d,r[g].extra=x,g+=1;y=0,d+=1}}else r[d].ind=d,r[d].extra=0,d+=1;if(n.l=r,P=E>P?E:P,b.push(E),n.sz)n.boxWidth=n.sz[0],n.justifyOffset=0;else switch(n.boxWidth=P,n.j){case 1:n.justifyOffset=-n.boxWidth;break;case 2:n.justifyOffset=-n.boxWidth/2;break;default:n.justifyOffset=0}n.lineWidths=b;var F=t.t.a;f=F.length;var I,_,V=[];for(m=0;f>m;m+=1){for(F[m].a.sc&&(n.strokeColorAnim=!0),F[m].a.sw&&(n.strokeWidthAnim=!0),(F[m].a.fc||F[m].a.fh||F[m].a.fs||F[m].a.fb)&&(n.fillColorAnim=!0),_=0,I=F[m].s.b,o=0;h>o;o+=1)r[o].anIndexes[m]=_,(1==I&&""!=r[o].val||2==I&&""!=r[o].val&&"\xa0"!=r[o].val||3==I&&(r[o].n||"\xa0"==r[o].val||o==h-1)||4==I&&(r[o].n||o==h-1))&&(1===F[m].s.rn&&V.push(_),_+=1);t.t.a[m].s.totalChars=_;var R,N=-1;if(1===F[m].s.rn)for(o=0;h>o;o+=1)N!=r[o].anIndexes[m]&&(N=r[o].anIndexes[m],R=V.splice(Math.floor(Math.random()*V.length),1)[0]),r[o].anIndexes[m]=R}0!==f||"m"in t.t.p||(t.singleShape=!0),n.yOffset=n.lh||1.2*n.s,n.ls=n.ls||0,n.ascent=S.ascent*n.s/100}}var o=function(){function t(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function e(e){var r,s=e.length;for(r=0;s>r;r+=1)5===e[r].ty&&t(e[r])}var r=[4,4,14];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;a>s;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),h=function(){var t=[4,7,99];return function(e){if(e.chars&&!i(t,e.v)){var r,a,n,o,h,l=e.chars.length;for(r=0;l>r;r+=1)if(e.chars[r].data&&e.chars[r].data.shapes)for(h=e.chars[r].data.shapes[0].it,n=h.length,a=0;n>a;a+=1)o=h[a].ks.k,o.__converted||(s(h[a].ks.k),o.__converted=!0)}}}(),l=function(){function t(e){var r,s,i,a=e.length;for(r=0;a>r;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(i=e[r].c.k.length,s=0;i>s;s+=1)e[r].c.k[s].s&&(e[r].c.k[s].s[0]/=255,e[r].c.k[s].s[1]/=255,e[r].c.k[s].s[2]/=255,e[r].c.k[s].s[3]/=255),e[r].c.k[s].e&&(e[r].c.k[s].e[0]/=255,e[r].c.k[s].e[1]/=255,e[r].c.k[s].e[2]/=255,e[r].c.k[s].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function e(e){var r,s=e.length;for(r=0;s>r;r+=1)4===e[r].ty&&t(e[r].shapes)}var r=[4,1,9];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;a>s;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),p=function(){function t(e){var r,s,i,a=e.length,n=!1;for(r=a-1;r>=0;r-=1)if("sh"==e[r].ty){if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(i=e[r].ks.k.length,s=0;i>s;s+=1)e[r].ks.k[s].s&&(e[r].ks.k[s].s[0].c=e[r].closed),e[r].ks.k[s].e&&(e[r].ks.k[s].e[0].c=e[r].closed);n=!0}else"gr"==e[r].ty&&t(e[r].it)}function e(e){var r,s,i,a,n,o,h=e.length;for(s=0;h>s;s+=1){if(r=e[s],r.hasMask){var l=r.masksProperties;for(a=l.length,i=0;a>i;i+=1)if(l[i].pt.k.i)l[i].pt.k.c=l[i].cl;else for(o=l[i].pt.k.length,n=0;o>n;n+=1)l[i].pt.k[n].s&&(l[i].pt.k[n].s[0].c=l[i].cl),l[i].pt.k[n].e&&(l[i].pt.k[n].e[0].c=l[i].cl)}4===r.ty&&t(r.shapes)}}var r=[4,4,18];return function(t){if(i(r,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;a>s;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),m={};return m.completeData=a,m}function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=Array.apply(null,{length:this._maxLength}),this.o=Array.apply(null,{length:this._maxLength}),this.i=Array.apply(null,{length:this._maxLength})}function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function RepeaterModifier(){}function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=Array.apply(null,{length:this._maxLength})}function TextAnimatorProperty(t,e,r){this.mdf=!1,this._firstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._dynamicProperties=[],this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=Array.apply(null,{length:this._textData.a.length}),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1}function LetterProps(t,e,r,s,i,a){this.o=t,this.sw=e,this.sc=r,this.fc=s,this.m=i,this.p=a,this.mdf={o:!0,sw:!!e,sc:!!r,fc:!!s,m:!0,p:!0}}function BaseRenderer(){}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:e&&e.hideOnTransparent===!1?!1:!0,viewBoxOnly:e&&e.viewBoxOnly||!1,className:e&&e.className||""},this.globalData.renderConfig=this.renderConfig,this.elements=[],this.pendingElements=[],this.destroyed=!1}function MaskElement(t,e,r){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties,this.viewData=Array.apply(null,{length:this.masksProperties.length}),this.maskElement=null,this.firstFrame=!0;var s,i,a,n,o,h,l,p,m=this.globalData.defs,f=this.masksProperties.length,c=this.masksProperties,d=0,u=[],y=randomString(10),g="clipPath",v="clip-path";for(s=0;f>s;s++)if(("a"!==c[s].mode&&"n"!==c[s].mode||c[s].inv||100!==c[s].o.k)&&(g="mask",v="mask"),"s"!=c[s].mode&&"i"!=c[s].mode||0!=d?o=null:(o=document.createElementNS(svgNS,"rect"),o.setAttribute("fill","#ffffff"),o.setAttribute("width",this.element.comp.data.w),o.setAttribute("height",this.element.comp.data.h),u.push(o)),i=document.createElementNS(svgNS,"path"),"n"!=c[s].mode){if(d+=1,"s"==c[s].mode?i.setAttribute("fill","#000000"):i.setAttribute("fill","#ffffff"),i.setAttribute("clip-rule","nonzero"),0!==c[s].x.k){g="mask",v="mask",p=PropertyFactory.getProp(this.element,c[s].x,0,null,this.dynamicProperties);var b="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",b),l=document.createElementNS(svgNS,"feMorphology"),l.setAttribute("operator","dilate"),l.setAttribute("in","SourceGraphic"),l.setAttribute("radius","0"),h.appendChild(l),m.appendChild(h),"s"==c[s].mode?i.setAttribute("stroke","#000000"):i.setAttribute("stroke","#ffffff")}else l=null,p=null;if(this.storedData[s]={elem:i,x:p,expan:l,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"==c[s].mode){n=u.length;var E=document.createElementNS(svgNS,"g");for(a=0;n>a;a+=1)E.appendChild(u[a]);var P=document.createElementNS(svgNS,"mask");P.setAttribute("mask-type","alpha"),P.setAttribute("id",y+"_"+d),P.appendChild(i),m.appendChild(P),E.setAttribute("mask","url("+locationHref+"#"+y+"_"+d+")"),u.length=0,u.push(E)}else u.push(i);c[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:i,lastPath:"",op:PropertyFactory.getProp(this.element,c[s].o,0,.01,this.dynamicProperties),prop:ShapePropertyFactory.getShapeProp(this.element,c[s],3,this.dynamicProperties,null)},o&&(this.viewData[s].invRect=o),this.viewData[s].prop.k||this.drawPath(c[s],this.viewData[s].prop.v,this.viewData[s])}else this.viewData[s]={op:PropertyFactory.getProp(this.element,c[s].o,0,.01,this.dynamicProperties),prop:ShapePropertyFactory.getShapeProp(this.element,c[s],3,this.dynamicProperties,null),elem:i},m.appendChild(i);for(this.maskElement=document.createElementNS(svgNS,g),f=u.length,s=0;f>s;s+=1)this.maskElement.appendChild(u[s]);this.maskElement.setAttribute("id",y),d>0&&this.element.maskedElement.setAttribute(v,"url("+locationHref+"#"+y+")"),m.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,r,s,i){this.globalData=r,this.comp=s,this.data=t,this.matteElement=null,this.transformedElement=null,this.isTransparent=!1,this.parentContainer=e,this.layerId=i?i.layerId:"ly_"+randomString(10),this.placeholder=i,this._sizeChanged=!1,this.init()}function IShapeElement(t,e,r,s,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this._parent.constructor.call(this,t,e,r,s,i)}function ITextElement(t,e,r,s){}function SVGTextElement(t,e,r,s,i){this.textSpans=[],this.renderType="svg",this._parent.constructor.call(this,t,e,r,s,i)}function SVGTintFilter(t,e){this.filterManager=e;var r=document.createElementNS(svgNS,"feColorMatrix");if(r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),r.setAttribute("result","f1"),t.appendChild(r),r=document.createElementNS(svgNS,"feColorMatrix"),r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result","f2"),t.appendChild(r),this.matrixFilter=r,100!==e.effectElements[2].p.v||e.effectElements[2].p.k){var s=document.createElementNS(svgNS,"feMerge");t.appendChild(s);var i;i=document.createElementNS(svgNS,"feMergeNode"),i.setAttribute("in","SourceGraphic"),s.appendChild(i),i=document.createElementNS(svgNS,"feMergeNode"),i.setAttribute("in","f2"),s.appendChild(i)}}function SVGFillFilter(t,e){this.filterManager=e;var r=document.createElementNS(svgNS,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function SVGTritoneFilter(t,e){this.filterManager=e;var r=document.createElementNS(svgNS,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),r.setAttribute("result","f1"),t.appendChild(r);var s=document.createElementNS(svgNS,"feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.matrixFilter=s;var i=document.createElementNS(svgNS,"feFuncR");i.setAttribute("type","table"),s.appendChild(i),this.feFuncR=i;var a=document.createElementNS(svgNS,"feFuncG");a.setAttribute("type","table"),s.appendChild(a),this.feFuncG=a;var n=document.createElementNS(svgNS,"feFuncB");n.setAttribute("type","table"),s.appendChild(n),this.feFuncB=n}function SVGProLevelsFilter(t,e){this.filterManager=e;var r=this.filterManager.effectElements,s=document.createElementNS(svgNS,"feComponentTransfer");(r[9].p.k||0!==r[9].p.v||r[10].p.k||1!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||0!==r[12].p.v||r[13].p.k||1!==r[13].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(r[16].p.k||0!==r[16].p.v||r[17].p.k||1!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||0!==r[19].p.v||r[20].p.k||1!==r[20].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(r[23].p.k||0!==r[23].p.v||r[24].p.k||1!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||0!==r[26].p.v||r[27].p.k||1!==r[27].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(r[30].p.k||0!==r[30].p.v||r[31].p.k||1!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||0!==r[33].p.v||r[34].p.k||1!==r[34].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),s=document.createElementNS(svgNS,"feComponentTransfer")),(r[2].p.k||0!==r[2].p.v||r[3].p.k||1!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||0!==r[5].p.v||r[6].p.k||1!==r[6].p.v)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function SVGDropShadowEffect(t,e){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","400%"),t.setAttribute("height","400%"),this.filterManager=e;var r=document.createElementNS(svgNS,"feGaussianBlur");r.setAttribute("in","SourceAlpha"),r.setAttribute("result","drop_shadow_1"),r.setAttribute("stdDeviation","0"),this.feGaussianBlur=r,t.appendChild(r);var s=document.createElementNS(svgNS,"feOffset");s.setAttribute("dx","25"),s.setAttribute("dy","0"),s.setAttribute("in","drop_shadow_1"),s.setAttribute("result","drop_shadow_2"),this.feOffset=s,t.appendChild(s);var i=document.createElementNS(svgNS,"feFlood");i.setAttribute("flood-color","#00ff00"),i.setAttribute("flood-opacity","1"),i.setAttribute("result","drop_shadow_3"),this.feFlood=i,t.appendChild(i);var a=document.createElementNS(svgNS,"feComposite");a.setAttribute("in","drop_shadow_3"),a.setAttribute("in2","drop_shadow_2"),a.setAttribute("operator","in"),a.setAttribute("result","drop_shadow_4"),t.appendChild(a);var n=document.createElementNS(svgNS,"feMerge");t.appendChild(n);var o;o=document.createElementNS(svgNS,"feMergeNode"),n.appendChild(o),o=document.createElementNS(svgNS,"feMergeNode"),o.setAttribute("in","SourceGraphic"),this.feMergeNode=o,this.feMerge=n,this.originalNodeAdded=!1,n.appendChild(o)}function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=document.createElementNS(svgNS,"g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGEffects(t){var e,r=t.data.ef.length,s=randomString(10),i=filtersFactory.createFilter(s),a=0;this.filters=[];var n;for(e=0;r>e;e+=1)20===t.data.ef[e].ty?(a+=1,n=new SVGTintFilter(i,t.effects.effectElements[e]),this.filters.push(n)):21===t.data.ef[e].ty?(a+=1,n=new SVGFillFilter(i,t.effects.effectElements[e]),this.filters.push(n)):22===t.data.ef[e].ty?(n=new SVGStrokeEffect(t,t.effects.effectElements[e]),this.filters.push(n)):23===t.data.ef[e].ty?(a+=1,n=new SVGTritoneFilter(i,t.effects.effectElements[e]),this.filters.push(n)):24===t.data.ef[e].ty?(a+=1,n=new SVGProLevelsFilter(i,t.effects.effectElements[e]),this.filters.push(n)):25===t.data.ef[e].ty?(a+=1,n=new SVGDropShadowEffect(i,t.effects.effectElements[e]),this.filters.push(n)):28===t.data.ef[e].ty&&(n=new SVGMatte3Effect(i,t.effects.effectElements[e],t),this.filters.push(n));a&&(t.globalData.defs.appendChild(i),t.layerElement.setAttribute("filter","url("+locationHref+"#"+s+")"))}function ICompElement(t,e,r,s,i){this._parent.constructor.call(this,t,e,r,s,i),this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?Array.apply(null,{length:this.layers.length}):[],this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,r.frameRate,this.dynamicProperties)),this.data.xt?(this.layerElement=document.createElementNS(svgNS,"g"),this.buildAllItems()):r.progressiveLoad||this.buildAllItems()}function IImageElement(t,e,r,s,i){this.assetData=r.getAssetData(t.refId),this._parent.constructor.call(this,t,e,r,s,i)}function ISolidElement(t,e,r,s,i){this._parent.constructor.call(this,t,e,r,s,i)}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&void 0!==e.clearCanvas?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",className:e&&e.className||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:Array.apply(null,{length:15}),savedOp:Array.apply(null,{length:15}),cArrPos:0,cTr:new Matrix,cO:1};var r,s=15;for(r=0;s>r;r+=1)this.contextData.saved[r]=Array.apply(null,{length:16});this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.renderConfig={className:e&&e.className||""},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0}function CVBaseElement(t,e,r){this.globalData=r,this.data=t,this.comp=e,this.canvasContext=r.canvasContext,this.init()}function CVCompElement(t,e,r){this._parent.constructor.call(this,t,e,r);var s={};for(var i in r)r.hasOwnProperty(i)&&(s[i]=r[i]);s.renderer=this,s.compHeight=this.data.h,s.compWidth=this.data.w,this.renderConfig={clearCanvas:!0},this.contextData={saved:Array.apply(null,{length:15}),savedOp:Array.apply(null,{length:15}),cArrPos:0,cTr:new Matrix,cO:1},this.completeLayers=!1;var a,n=15;for(a=0;n>a;a+=1)this.contextData.saved[a]=Array.apply(null,{length:16});this.transformMat=new Matrix,this.parentGlobalData=this.globalData;var o=document.createElement("canvas");s.canvasContext=o.getContext("2d"),this.canvasContext=s.canvasContext,o.width=this.data.w,o.height=this.data.h,this.canvas=o,this.globalData=s,this.layers=t.layers,this.pendingElements=[],this.elements=Array.apply(null,{length:this.layers.length}),this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,r.frameRate,this.dynamicProperties)),(this.data.xt||!r.progressiveLoad)&&this.buildAllItems()}function CVImageElement(t,e,r){this.assetData=r.getAssetData(t.refId),this._parent.constructor.call(this,t,e,r),this.globalData.addPendingElement()}function CVMaskElement(t,e){this.data=t,this.element=e,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.viewData=Array.apply(null,{length:this.masksProperties.length});var r,s=this.masksProperties.length;for(r=0;s>r;r++)this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3,this.dynamicProperties,null)}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this._parent.constructor.call(this,t,e,r)}function CVSolidElement(t,e,r){this._parent.constructor.call(this,t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this._parent.constructor.call(this,t,e,r)}function HBaseElement(t,e,r,s,i){this.globalData=r,this.comp=s,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=i?i.layerId:"ly_"+randomString(10),this.placeholder=i,this.init()}function HSolidElement(t,e,r,s,i){this._parent.constructor.call(this,t,e,r,s,i)}function HCompElement(t,e,r,s,i){this._parent.constructor.call(this,t,e,r,s,i),this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=Array.apply(null,{length:this.layers.length}),this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,r.frameRate,this.dynamicProperties)),this.data.hasMask&&(this.supports3d=!1),this.data.xt&&(this.layerElement=document.createElement("div")),this.buildAllItems()}function HShapeElement(t,e,r,s,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this._parent.constructor.call(this,t,e,r,s,i),this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r,s,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this._parent.constructor.call(this,t,e,r,s,i)}function HImageElement(t,e,r,s,i){this.assetData=r.getAssetData(t.refId),this._parent.constructor.call(this,t,e,r,s,i)}function HCameraElement(t,e,r,s,i){if(this._parent.constructor.call(this,t,e,r,s,i),this.pe=PropertyFactory.getProp(this,t.pe,0,0,this.dynamicProperties),t.ks.p.s?(this.px=PropertyFactory.getProp(this,t.ks.p.x,1,0,this.dynamicProperties),this.py=PropertyFactory.getProp(this,t.ks.p.y,1,0,this.dynamicProperties),this.pz=PropertyFactory.getProp(this,t.ks.p.z,1,0,this.dynamicProperties)):this.p=PropertyFactory.getProp(this,t.ks.p,1,0,this.dynamicProperties),t.ks.a&&(this.a=PropertyFactory.getProp(this,t.ks.a,1,0,this.dynamicProperties)),t.ks.or.k.length&&t.ks.or.k[0].to){var a,n=t.ks.or.k.length;for(a=0;n>a;a+=1)t.ks.or.k[a].to=null,t.ks.or.k[a].ti=null}this.or=PropertyFactory.getProp(this,t.ks.or,1,degToRads,this.dynamicProperties),this.or.sh=!0,this.rx=PropertyFactory.getProp(this,t.ks.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(this,t.ks.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(this,t.ks.rz,0,degToRads,this.dynamicProperties),this.mat=new Matrix}function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e,r){var s=t.ef;this.effectElements=[];var i,a,n=s.length;for(i=0;n>i;i++)a=new GroupEffect(s[i],e,r),this.effectElements.push(a)}function GroupEffect(t,e,r){this.dynamicProperties=[],this.init(t,e,this.dynamicProperties),this.dynamicProperties.length&&r.push(this)}function setLocationHref(t){locationHref=t}function play(t){animationManager.play(t)}function pause(t){animationManager.pause(t)}function togglePause(t){animationManager.togglePause(t)}function setSpeed(t,e){animationManager.setSpeed(t,e)}function setDirection(t,e){animationManager.setDirection(t,e)}function stop(t){animationManager.stop(t)}function moveFrame(t){animationManager.moveFrame(t)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function registerAnimation(t){return animationManager.registerAnimation(t)}function resize(){animationManager.resize();

}function start(){animationManager.start()}function goToAndStop(t,e,r){animationManager.goToAndStop(t,e,r)}function setSubframeRendering(t){subframeEnabled=t}function loadAnimation(t){return standalone===!0&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function destroy(t){return animationManager.destroy(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&(expressionsPlugin=e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r++){var s=e[r].split("=");if(decodeURIComponent(s[0])==t)return decodeURIComponent(s[1])}}var svgNS="http://www.w3.org/2000/svg",locationHref="",subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,BMMath={};!function(){var t,e=Object.getOwnPropertyNames(Math),r=e.length;for(t=0;r>t;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){var e=typeof t;if("object"===e&&t.length){var r,s=Array.apply(null,{length:t.length}),i=t.length;for(r=0;i>r;r+=1)s[r]=Math.abs(t[r]);return s}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;roundValues(!1);var rgbToHex=function(){var t,e,r=[];for(t=0;256>t;t+=1)e=t.toString(16),r[t]=1==e.length?"0"+e:e;return function(t,e,s){return 0>t&&(t=0),0>e&&(e=0),0>s&&(s=0),"#"+r[t]+r[e]+r[s]}}(),fillColorToString=function(){var t=[];return function(e,r){return void 0!==r&&(e[3]=r),t[e[0]]||(t[e[0]]={}),t[e[0]][e[1]]||(t[e[0]][e[1]]={}),t[e[0]][e[1]][e[2]]||(t[e[0]][e[1]][e[2]]={}),t[e[0]][e[1]][e[2]][e[3]]||(t[e[0]][e[1]][e[2]][e[3]]="rgba("+e.join(",")+")"),t[e[0]][e[1]][e[2]][e[3]]}}(),Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=Math.cos(t),r=Math.sin(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function r(t){if(0===t)return this;var e=Math.cos(t),r=Math.sin(t);return this._t(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1)}function s(t){if(0===t)return this;var e=Math.cos(t),r=Math.sin(t);return this._t(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1)}function i(t){if(0===t)return this;var e=Math.cos(t),r=Math.sin(t);return this._t(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1)}function a(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(Math.tan(t),Math.tan(e))}function o(t,e){var r=Math.cos(e),s=Math.sin(e);return this._t(r,s,0,0,-s,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(r,-s,0,0,s,r,0,0,0,0,1,0,0,0,0,1)}function h(t,e,r){return r=isNaN(r)?1:r,1==t&&1==e&&1==r?this:this._t(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1)}function l(t,e,r,s,i,a,n,o,h,l,p,m,f,c,d,u){return this.props[0]=t,this.props[1]=e,this.props[2]=r,this.props[3]=s,this.props[4]=i,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=l,this.props[10]=p,this.props[11]=m,this.props[12]=f,this.props[13]=c,this.props[14]=d,this.props[15]=u,this}function p(t,e,r){return r=r||0,0!==t||0!==e||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1):this}function m(t,e,r,s,i,a,n,o,h,l,p,m,f,c,d,u){if(1===t&&0===e&&0===r&&0===s&&0===i&&1===a&&0===n&&0===o&&0===h&&0===l&&1===p&&0===m)return(0!==f||0!==c||0!==d)&&(this.props[12]=this.props[12]*t+this.props[13]*i+this.props[14]*h+this.props[15]*f,this.props[13]=this.props[12]*e+this.props[13]*a+this.props[14]*l+this.props[15]*c,this.props[14]=this.props[12]*r+this.props[13]*n+this.props[14]*p+this.props[15]*d,this.props[15]=this.props[12]*s+this.props[13]*o+this.props[14]*m+this.props[15]*u),this._identityCalculated=!1,this;var y=this.props[0],g=this.props[1],v=this.props[2],b=this.props[3],E=this.props[4],P=this.props[5],S=this.props[6],x=this.props[7],C=this.props[8],k=this.props[9],A=this.props[10],M=this.props[11],D=this.props[12],T=this.props[13],w=this.props[14],F=this.props[15];return this.props[0]=y*t+g*i+v*h+b*f,this.props[1]=y*e+g*a+v*l+b*c,this.props[2]=y*r+g*n+v*p+b*d,this.props[3]=y*s+g*o+v*m+b*u,this.props[4]=E*t+P*i+S*h+x*f,this.props[5]=E*e+P*a+S*l+x*c,this.props[6]=E*r+P*n+S*p+x*d,this.props[7]=E*s+P*o+S*m+x*u,this.props[8]=C*t+k*i+A*h+M*f,this.props[9]=C*e+k*a+A*l+M*c,this.props[10]=C*r+k*n+A*p+M*d,this.props[11]=C*s+k*o+A*m+M*u,this.props[12]=D*t+T*i+w*h+F*f,this.props[13]=D*e+T*a+w*l+F*c,this.props[14]=D*r+T*n+w*p+F*d,this.props[15]=D*s+T*o+w*m+F*u,this._identityCalculated=!1,this}function f(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function c(t){var e;for(e=0;16>e;e+=1)t.props[e]=this.props[e]}function d(t){var e;for(e=0;16>e;e+=1)this.props[e]=t[e]}function u(t,e,r){return{x:t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}}function y(t,e,r){return t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12]}function g(t,e,r){return t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13]}function v(t,e,r){return t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]}function b(t){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],r=this.props[5]/e,s=-this.props[1]/e,i=-this.props[4]/e,a=this.props[0]/e,n=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e;return[t[0]*r+t[1]*i+n,t[0]*s+t[1]*a+o,0]}function E(t){var e,r=t.length,s=[];for(e=0;r>e;e+=1)s[e]=b(t[e]);return s}function P(t,e,r,s){if(s&&2===s){var i=point_pool.newPoint();return i[0]=t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],i[1]=t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],i}return[t*this.props[0]+e*this.props[4]+r*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+r*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+r*this.props[10]+this.props[14]]}function S(t,e){return this.isIdentity()?t+","+e:bm_rnd(t*this.props[0]+e*this.props[4]+this.props[12])+","+bm_rnd(t*this.props[1]+e*this.props[5]+this.props[13])}function x(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5],this.props[6],this.props[7],this.props[8],this.props[9],this.props[10],this.props[11],this.props[12],this.props[13],this.props[14],this.props[15]]}function C(){return isSafari?"matrix3d("+roundTo2Decimals(this.props[0])+","+roundTo2Decimals(this.props[1])+","+roundTo2Decimals(this.props[2])+","+roundTo2Decimals(this.props[3])+","+roundTo2Decimals(this.props[4])+","+roundTo2Decimals(this.props[5])+","+roundTo2Decimals(this.props[6])+","+roundTo2Decimals(this.props[7])+","+roundTo2Decimals(this.props[8])+","+roundTo2Decimals(this.props[9])+","+roundTo2Decimals(this.props[10])+","+roundTo2Decimals(this.props[11])+","+roundTo2Decimals(this.props[12])+","+roundTo2Decimals(this.props[13])+","+roundTo2Decimals(this.props[14])+","+roundTo2Decimals(this.props[15])+")":(this.cssParts[1]=this.props.join(","),this.cssParts.join(""))}function k(){return"matrix("+roundTo2Decimals(this.props[0])+","+roundTo2Decimals(this.props[1])+","+roundTo2Decimals(this.props[4])+","+roundTo2Decimals(this.props[5])+","+roundTo2Decimals(this.props[12])+","+roundTo2Decimals(this.props[13])+")"}function A(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.rotateX=r,this.rotateY=s,this.rotateZ=i,this.skew=n,this.skewFromAxis=o,this.shear=a,this.scale=h,this.setTransform=l,this.translate=p,this.transform=m,this.applyToPoint=u,this.applyToX=y,this.applyToY=g,this.applyToZ=v,this.applyToPointArray=P,this.applyToPointStringified=S,this.toArray=x,this.toCSS=C,this.to2dCSS=k,this.toString=A,this.clone=c,this.cloneFromProps=d,this.inversePoints=E,this.inversePoint=b,this._t=this.transform,this.isIdentity=f,this._identity=!0,this._identityCalculated=!1,this.props=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.cssParts=["matrix3d(","",")"]}}();!function(t,e){function r(r,l,p){var c=[];l=1==l?{entropy:!0}:l||{};var v=n(a(l.entropy?[r,h(t)]:null==r?o():r,3),c),b=new s(c),E=function(){for(var t=b.g(f),e=u,r=0;y>t;)t=(t+r)*m,e*=m,r=b.g(1);for(;t>=g;)t/=2,e/=2,r>>>=1;return(t+r)/e};return E.int32=function(){return 0|b.g(4)},E.quick=function(){return b.g(4)/4294967296},E["double"]=E,n(h(b.S),t),(l.pass||p||function(t,r,s,a){return a&&(a.S&&i(a,b),t.state=function(){return i(b,{})}),s?(e[d]=t,r):t})(E,v,"global"in l?l.global:this==e,l.state)}function s(t){var e,r=t.length,s=this,i=0,a=s.i=s.j=0,n=s.S=[];for(r||(t=[r++]);m>i;)n[i]=i++;for(i=0;m>i;i++)n[i]=n[a=v&a+t[i%r]+(e=n[i])],n[a]=e;(s.g=function(t){for(var e,r=0,i=s.i,a=s.j,n=s.S;t--;)e=n[i=v&i+1],r=r*m+n[v&(n[i]=n[a=v&a+e])+(n[a]=e)];return s.i=i,s.j=a,r})(m)}function i(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function a(t,e){var r,s=[],i=typeof t;if(e&&"object"==i)for(r in t)try{s.push(a(t[r],e-1))}catch(n){}return s.length?s:"string"==i?t:t+"\x00"}function n(t,e){for(var r,s=t+"",i=0;i<s.length;)e[v&i]=v&(r^=19*e[v&i])+s.charCodeAt(i++);return h(e)}function o(){try{if(l)return h(l.randomBytes(m));var e=new Uint8Array(m);return(p.crypto||p.msCrypto).getRandomValues(e),h(e)}catch(r){var s=p.navigator,i=s&&s.plugins;return[+new Date,p,i,p.screen,h(t)]}}function h(t){return String.fromCharCode.apply(0,t)}var l,p=this,m=256,f=6,c=52,d="random",u=e.pow(m,f),y=e.pow(2,c),g=2*y,v=m-1;e["seed"+d]=r,n(e.random(),t)}([],BMMath);var BezierFactory=function(){function t(t,e,r,s,i){var a=i||("bez_"+t+"_"+e+"_"+r+"_"+s).replace(/\./g,"p");if(p[a])return p[a];var n=new h([t,e,r,s]);return p[a]=n,n}function e(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function s(t){return 3*t}function i(t,i,a){return((e(i,a)*t+r(i,a))*t+s(i))*t}function a(t,i,a){return 3*e(i,a)*t*t+2*r(i,a)*t+s(i)}function n(t,e,r,s,a){var n,o,h=0;do o=e+(r-e)/2,n=i(o,s,a)-t,n>0?r=o:e=o;while(Math.abs(n)>c&&++h<d);return o}function o(t,e,r,s){for(var n=0;m>n;++n){var o=a(e,r,s);if(0===o)return e;var h=i(e,r,s)-t;e-=h/o}return e}function h(t){this._p=t,this._mSampleValues=g?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var l={};l.getBezierEasing=t;var p={},m=4,f=.001,c=1e-7,d=10,u=11,y=1/(u-1),g="function"==typeof Float32Array;return h.prototype={get:function(t){var e=this._p[0],r=this._p[1],s=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===r&&s===a?t:0===t?0:1===t?1:i(this._getTForX(t),r,a)},_precompute:function(){var t=this._p[0],e=this._p[1],r=this._p[2],s=this._p[3];this._precomputed=!0,(t!==e||r!==s)&&this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;u>r;++r)this._mSampleValues[r]=i(r*y,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],s=this._mSampleValues,i=0,h=1,l=u-1;h!==l&&s[h]<=t;++h)i+=y;--h;var p=(t-s[h])/(s[h+1]-s[h]),m=i+p*y,c=a(m,e,r);return c>=f?o(t,m,e,r):0===c?m:n(t,i,i+y,e,r)}},l}(),MatrixManager=matrixManagerFunction;!function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[e[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[r]+"CancelAnimationFrame"]||window[e[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,r){var s=(new Date).getTime(),i=Math.max(0,16-(s-t)),a=window.setTimeout(function(){e(s+i)},i);return t=s+i,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var r=document.createElement("span");r.style.fontFamily=e;var s=document.createElement("span");s.innerHTML="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(s),document.body.appendChild(r);var i=s.offsetWidth;return s.style.fontFamily=t+", "+e,{node:s,w:i,parent:r}}function e(){var t,r,s,i=this.fonts.length,a=i;for(t=0;i>t;t+=1)if(this.fonts[t].loaded)a-=1;else if("t"===this.fonts[t].fOrigin||2===this.fonts[t].origin){if(window.Typekit&&window.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{window.Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(n){}}2===this.typekitLoaded&&(this.fonts[t].loaded=!0)}else"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(r=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,r.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(r=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,r.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<h?setTimeout(e.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function r(t,e){var r=document.createElementNS(svgNS,"text");r.style.fontSize="100px",r.style.fontFamily=e.fFamily,r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.className=e.fClass):r.style.fontFamily=e.fFamily,t.appendChild(r);var s=document.createElement("canvas").getContext("2d");return s.font="100px "+e.fFamily,s}function s(s,i){if(!s)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=s.list);var a,n=s.list,o=n.length;for(a=0;o>a;a+=1){if(n[a].loaded=!1,n[a].monoCase=t(n[a].fFamily,"monospace"),n[a].sansCase=t(n[a].fFamily,"sans-serif"),n[a].fPath){if("p"===n[a].fOrigin||3===n[a].origin){var h=document.createElement("style");h.type="text/css",h.innerHTML="@font-face {font-family: "+n[a].fFamily+"; font-style: normal; src: url('"+n[a].fPath+"');}",i.appendChild(h)}else if("g"===n[a].fOrigin||1===n[a].origin){var l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=n[a].fPath,i.appendChild(l)}else if("t"===n[a].fOrigin||2===n[a].origin){var p=document.createElement("script");p.setAttribute("src",n[a].fPath),i.appendChild(p)}}else n[a].loaded=!0;n[a].helper=r(i,n[a]),this.fonts.push(n[a])}e.bind(this)()}function i(t){if(t){this.chars||(this.chars=[]);var e,r,s,i=t.length,a=this.chars.length;for(e=0;i>e;e+=1){for(r=0,s=!1;a>r;)this.chars[r].style===t[e].style&&this.chars[r].fFamily===t[e].fFamily&&this.chars[r].ch===t[e].ch&&(s=!0),r+=1;s||(this.chars.push(t[e]),a+=1)}}}function a(t,e,r){for(var s=0,i=this.chars.length;i>s;){if(this.chars[s].ch===t&&this.chars[s].style===e&&this.chars[s].fFamily===r)return this.chars[s];s+=1}}function n(t,e,r){var s=this.getFontByName(e),i=s.helper;return i.measureText(t).width*r/100}function o(t){for(var e=0,r=this.fonts.length;r>e;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var h=5e3,l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return l.prototype.addChars=i,l.prototype.addFonts=s,l.prototype.getCharData=a,l.prototype.getFontByName=o,l.prototype.measureText=n,l}(),PropertyFactory=function(){function t(t,e,r,s){var i;r.constructor===Array&&(i=Array.apply(null,{length:r.length}));for(var a,n,o=e,h=this.keyframes.length-1,l=!0;l;){if(a=this.keyframes[o],n=this.keyframes[o+1],o==h-1&&t>=n.t-this.offsetTime){a.h&&(a=n),e=0;break}if(n.t-this.offsetTime>t){e=o;break}h-1>o?o+=1:(e=0,l=!1)}var p,m,f,c,d,u;if(a.to){a.bezierData||bez.buildBezierData(a);var y=a.bezierData;if(t>=n.t-this.offsetTime||t<a.t-this.offsetTime){var g=t>=n.t-this.offsetTime?y.points.length-1:0;for(m=y.points[g].point.length,p=0;m>p;p+=1)i[p]=y.points[g].point[p];s._lastBezierData=null}else{a.__fnct?u=a.__fnct:(u=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,a.__fnct=u),f=u((t-(a.t-this.offsetTime))/(n.t-this.offsetTime-(a.t-this.offsetTime)));var v,b=y.segmentLength*f,E=s.lastFrame<t&&s._lastBezierData===y?s._lastAddedLength:0;for(d=s.lastFrame<t&&s._lastBezierData===y?s._lastPoint:0,l=!0,c=y.points.length;l;){if(E+=y.points[d].partialLength,0===b||0===f||d==y.points.length-1){for(m=y.points[d].point.length,p=0;m>p;p+=1)i[p]=y.points[d].point[p];break}if(b>=E&&b<E+y.points[d+1].partialLength){for(v=(b-E)/y.points[d+1].partialLength,m=y.points[d].point.length,p=0;m>p;p+=1)i[p]=y.points[d].point[p]+(y.points[d+1].point[p]-y.points[d].point[p])*v;break}c-1>d?d+=1:l=!1}s._lastPoint=d,s._lastAddedLength=E-y.points[d].partialLength,s._lastBezierData=y}}else{var P,S,x,C,k;for(h=a.s.length,o=0;h>o;o+=1){if(1!==a.h&&(t>=n.t-this.offsetTime?f=1:t<a.t-this.offsetTime?f=0:(a.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[o]?u=a.__fnct[o]:(P=a.o.x[o]||a.o.x[0],S=a.o.y[o]||a.o.y[0],x=a.i.x[o]||a.i.x[0],C=a.i.y[o]||a.i.y[0],u=BezierFactory.getBezierEasing(P,S,x,C).get,a.__fnct[o]=u)):a.__fnct?u=a.__fnct:(P=a.o.x,S=a.o.y,x=a.i.x,C=a.i.y,u=BezierFactory.getBezierEasing(P,S,x,C).get,a.__fnct=u),f=u((t-(a.t-this.offsetTime))/(n.t-this.offsetTime-(a.t-this.offsetTime))))),this.sh&&1!==a.h){var A=a.s[o],M=a.e[o];-180>A-M?A+=360:A-M>180&&(A-=360),k=A+(M-A)*f}else k=1===a.h?a.s[o]:a.s[o]+(a.e[o]-a.s[o])*f;1===h?i=k:i[o]=k}}return{value:i,iterationIndex:e}}function e(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==p&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame<e&&e>t))){var s=this._caching.lastFrame<t?this._caching.lastIndex:0,i=this.interpolateValue(t,s,this.pv,this._caching);if(this._caching.lastIndex=i.iterationIndex,this.pv.constructor===Array)for(s=0;s<this.v.length;)this.pv[s]=i.value[s],this.v[s]=this.mult?this.pv[s]*this.mult:this.pv[s],this.lastPValue[s]!==this.pv[s]&&(this.mdf=!0,this.lastPValue[s]=this.pv[s]),s+=1;else this.pv=i.value,this.v=this.mult?this.pv*this.mult:this.pv,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)}this._caching.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function r(){}function s(t,e,s){this.mult=s,this.v=s?e.k*s:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.getValue=r}function i(t,e,s){this.mult=s,this.data=e,this.mdf=!1,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1,this.v=Array.apply(null,{length:e.k.length}),this.pv=Array.apply(null,{length:e.k.length}),this.lastValue=Array.apply(null,{length:e.k.length});var i=Array.apply(null,{length:e.k.length});this.vel=i.map(function(){return 0});var a,n=e.k.length;for(a=0;n>a;a+=1)this.v[a]=s?e.k[a]*s:e.k[a],this.pv[a]=e.k[a];this.getValue=r}function a(r,s,i){this.keyframes=s.k,this.offsetTime=r.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this._caching={lastFrame:p,lastIndex:0},this.k=!0,this.kf=!0,this.data=s,this.mult=i,this.elem=r,this.comp=r.comp,this.v=i?s.k[0].s[0]*i:s.k[0].s[0],this.pv=s.k[0].s[0],this.getValue=e,this.interpolateValue=t}function n(r,s,i){var a,n,o,h,l,m=s.k.length;for(a=0;m-1>a;a+=1)s.k[a].to&&s.k[a].s&&s.k[a].e&&(n=s.k[a].s,o=s.k[a].e,h=s.k[a].to,l=s.k[a].ti,(2===n.length&&(n[0]!==o[0]||n[1]!==o[1])&&bez.pointOnLine2D(n[0],n[1],o[0],o[1],n[0]+h[0],n[1]+h[1])&&bez.pointOnLine2D(n[0],n[1],o[0],o[1],o[0]+l[0],o[1]+l[1])||3===n.length&&(n[0]!==o[0]||n[1]!==o[1]||n[2]!==o[2])&&bez.pointOnLine3D(n[0],n[1],n[2],o[0],o[1],o[2],n[0]+h[0],n[1]+h[1],n[2]+h[2])&&bez.pointOnLine3D(n[0],n[1],n[2],o[0],o[1],o[2],o[0]+l[0],o[1]+l[1],o[2]+l[2]))&&(s.k[a].to=null,s.k[a].ti=null));this.keyframes=s.k,this.offsetTime=r.data.st,this.k=!0,this.kf=!0,this.mult=i,this.elem=r,this.comp=r.comp,this._caching={lastFrame:p,lastIndex:0},this.getValue=e,this.interpolateValue=t,this.frameId=-1,this.v=Array.apply(null,{length:s.k[0].s.length}),this.pv=Array.apply(null,{length:s.k[0].s.length}),this.lastValue=Array.apply(null,{length:s.k[0].s.length}),this.lastPValue=Array.apply(null,{length:s.k[0].s.length})}function o(t,e,r,o,h){var l;if(2===r)l=new m(t,e,h);else if(0===e.a)l=0===r?new s(t,e,o):new i(t,e,o);else if(1===e.a)l=0===r?new a(t,e,o):new n(t,e,o);else if(e.k.length)if("number"==typeof e.k[0])l=new i(t,e,o);else switch(r){case 0:l=new a(t,e,o);break;case 1:l=new n(t,e,o)}else l=new s(t,e,o);return l.k&&h.push(l),l}function h(t,e,r,s){return new c(t,e,r,s)}function l(t,e,r){return new d(t,e,r)}var p=-999999,m=function(){function t(){return this.p?ExpressionValue(this.p):[this.px.v,this.py.v,this.pz?this.pz.v:0]}function e(){return ExpressionValue(this.px)}function r(){return ExpressionValue(this.py)}function s(){return ExpressionValue(this.a)}function i(){return ExpressionValue(this.or)}function a(){return this.r?ExpressionValue(this.r,1/degToRads):ExpressionValue(this.rz,1/degToRads)}function n(){return ExpressionValue(this.s,100)}function o(){return ExpressionValue(this.o,100)}function h(){return ExpressionValue(this.sk)}function l(){return ExpressionValue(this.sa)}function p(t){var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function m(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);if(this.mdf){if(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented&&this.p.keyframes&&this.p.getValueAtTime){var r,s;this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/this.elem.globalData.frameRate,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/this.elem.globalData.frameRate,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/this.elem.globalData.frameRate,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.01)/this.elem.globalData.frameRate,0)):(r=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/this.elem.globalData.frameRate,this.p.offsetTime)),this.v.rotate(-Math.atan2(r[1]-s[1],r[0]-s[0]))}this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function f(){this.inverted=!0,this.iv=new Matrix,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}function c(){}return function(d,u,y){this.elem=d,this.frameId=-1,this.type="transform",this.dynamicProperties=[],this.mdf=!1,this.data=u,this.getValue=m,this.applyToMatrix=p,this.setInverted=f,this.autoOrient=c,this.v=new Matrix,u.p.s?(this.px=PropertyFactory.getProp(d,u.p.x,0,0,this.dynamicProperties),this.py=PropertyFactory.getProp(d,u.p.y,0,0,this.dynamicProperties),u.p.z&&(this.pz=PropertyFactory.getProp(d,u.p.z,0,0,this.dynamicProperties))):this.p=PropertyFactory.getProp(d,u.p,1,0,this.dynamicProperties),u.r?this.r=PropertyFactory.getProp(d,u.r,0,degToRads,this.dynamicProperties):u.rx&&(this.rx=PropertyFactory.getProp(d,u.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(d,u.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(d,u.rz,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(d,u.or,1,degToRads,this.dynamicProperties),this.or.sh=!0),u.sk&&(this.sk=PropertyFactory.getProp(d,u.sk,0,degToRads,this.dynamicProperties),this.sa=PropertyFactory.getProp(d,u.sa,0,degToRads,this.dynamicProperties)),u.a&&(this.a=PropertyFactory.getProp(d,u.a,1,0,this.dynamicProperties)),u.s&&(this.s=PropertyFactory.getProp(d,u.s,1,.01,this.dynamicProperties)),this.o=u.o?PropertyFactory.getProp(d,u.o,0,.01,this.dynamicProperties):{mdf:!1,v:1},this.dynamicProperties.length?y.push(this):(this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?u.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"xPosition",{get:e}),Object.defineProperty(this,"yPosition",{get:r}),Object.defineProperty(this,"orientation",{get:i}),Object.defineProperty(this,"anchorPoint",{get:s}),Object.defineProperty(this,"rotation",{get:a}),Object.defineProperty(this,"scale",{get:n}),Object.defineProperty(this,"opacity",{get:o}),Object.defineProperty(this,"skew",{get:h}),Object.defineProperty(this,"skewAxis",{get:l})}}(),f=function(){function t(t){if(this.prop.getValue(),this.cmdf=!1,this.omdf=!1,this.prop.mdf||t){var e,r,s,i=4*this.data.p;for(e=0;i>e;e+=1)r=e%4===0?100:255,s=Math.round(this.prop.v[e]*r),this.c[e]!==s&&(this.c[e]=s,this.cmdf=!0);if(this.o.length)for(i=this.prop.v.length,e=4*this.data.p;i>e;e+=1)r=e%2===0?100:1,s=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==s&&(this.o[e-4*this.data.p]=s,this.omdf=!0)}}function e(e,r,s){this.prop=o(e,r.k,1,null,[]),this.data=r,this.k=this.prop.k,this.c=Array.apply(null,{length:4*r.p});var i=r.k.k[0].s?r.k.k[0].s.length-4*r.p:r.k.k.length-4*r.p;this.o=Array.apply(null,{length:i}),this.cmdf=!1,this.omdf=!1,this.getValue=t,this.prop.k&&s.push(this),this.getValue(!0)}return function(t,r,s){return new e(t,r,s)}}(),c=function(){function t(t){var e=0,r=this.dataProps.length;if(this.elem.globalData.frameId!==this.frameId||t){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId;r>e;){if(this.dataProps[e].p.mdf){this.mdf=!0;break}e+=1}if(this.mdf||t)for("svg"===this.renderer&&(this.dasharray=""),e=0;r>e;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[e].p.v:this.dasharray[e]=this.dataProps[e].p.v:this.dashoffset=this.dataProps[e].p.v}}return function(e,r,s,i){this.elem=e,this.frameId=-1,this.dataProps=new Array(r.length),this.renderer=s,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(r.length-1),this.dashoffset=0;var a,n,o=r.length;for(a=0;o>a;a+=1)n=PropertyFactory.getProp(e,r[a].v,0,0,i),this.k=n.k?!0:this.k,this.dataProps[a]={n:r[a].n,p:n};this.getValue=t,this.k?i.push(this):this.getValue(!0)}}(),d=function(){function t(t){if(this.mdf=t||!1,this.dynamicProperties.length){var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0)}var s=this.elem.currentTextDocumentData.l.length;t&&2===this.data.r&&(this.e.v=s);var i=2===this.data.r?1:100/s,a=this.o.v/i,n=this.s.v/i+a,o=this.e.v/i+a;if(n>o){var h=n;n=o,o=h}this.finalS=n,this.finalE=o}function e(t){var e=BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,a=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)a=o===n?t>=o?1:0:r(0,s(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(3==h)a=o===n?t>=o?0:1:1-r(0,s(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(4==h)o===n?a=0:(a=r(0,s(.5/(o-n)+(t-n)/(o-n),1)),.5>a?a*=2:a=1-2*(a-.5)),a=e(a);else if(5==h){if(o===n)a=0;else{var l=o-n;t=s(r(0,t+.5-n),o-n);var p=-l/2+t,m=l/2;a=Math.sqrt(1-p*p/(m*m))}a=e(a)}else 6==h?(o===n?a=0:(t=s(r(0,t+.5-n),o-n),a=(1+Math.cos(Math.PI+2*Math.PI*t/(o-n)))/2),a=e(a)):(t>=i(n)&&(a=0>t-n?1-(n-t):r(0,s(o-t,1))),a=e(a));return a*this.a.v}var r=Math.max,s=Math.min,i=Math.floor;return function(r,s,i){this.mdf=!1,this.k=!1,this.data=s,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.elem=r,this.comp=r.comp,this.finalS=0,this.finalE=0,this.s=PropertyFactory.getProp(r,s.s||{k:0},0,0,this.dynamicProperties),this.e="e"in s?PropertyFactory.getProp(r,s.e,0,0,this.dynamicProperties):{v:100},this.o=PropertyFactory.getProp(r,s.o||{k:0},0,0,this.dynamicProperties),this.xe=PropertyFactory.getProp(r,s.xe||{k:0},0,0,this.dynamicProperties),this.ne=PropertyFactory.getProp(r,s.ne||{k:0},0,0,this.dynamicProperties),this.a=PropertyFactory.getProp(r,s.a,0,.01,this.dynamicProperties),this.dynamicProperties.length?i.push(this):this.getValue()}}(),u={getProp:o,getDashProp:h,getTextSelectorProp:l,getGradientProp:f};return u}();ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;e>r;)this.v[r]=point_pool.newPoint(),this.o[r]=point_pool.newPoint(),this.i[r]=point_pool.newPoint(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(Array.apply(null,{length:this._maxLength})),this.i=this.i.concat(Array.apply(null,{length:this._maxLength})),this.o=this.o.concat(Array.apply(null,{length:this._maxLength})),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,s,i){var a;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o}(!a[s]||a[s]&&!i)&&(a[s]=point_pool.newPoint()),a[s][0]=t,a[s][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,s,i,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,s,"o",n,o),this.setXYAt(i,a,"i",n,o)};var ShapePropertyFactory=function(){function t(t,e,r,s){var i,a,n;if(t<this.keyframes[0].t-this.offsetTime)i=this.keyframes[0].s[0],n=!0,e=0;else if(t>=this.keyframes[this.keyframes.length-1].t-this.offsetTime)i=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-1].s[0]:this.keyframes[this.keyframes.length-2].e[0],n=!0;else{for(var o,h,l,p,m,f,c=e,d=this.keyframes.length-1,u=!0;u&&(o=this.keyframes[c],h=this.keyframes[c+1],!(h.t-this.offsetTime>t));)d-1>c?c+=1:u=!1;

n=1===o.h,e=c;var y;if(!n){if(t>=h.t-this.offsetTime)y=1;else if(t<o.t-this.offsetTime)y=0;else{var g;o.__fnct?g=o.__fnct:(g=BezierFactory.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y).get,o.__fnct=g),y=g((t-(o.t-this.offsetTime))/(h.t-this.offsetTime-(o.t-this.offsetTime)))}a=o.e[0]}i=o.s[0]}p=r._length,f=i.i[0].length;var v,b=!1;for(l=0;p>l;l+=1)for(m=0;f>m;m+=1)n?(v=i.i[l][m],r.i[l][m]!==v&&(r.i[l][m]=v,s&&(this.pv.i[l][m]=v),b=!0),v=i.o[l][m],r.o[l][m]!==v&&(r.o[l][m]=v,s&&(this.pv.o[l][m]=v),b=!0),v=i.v[l][m],r.v[l][m]!==v&&(r.v[l][m]=v,s&&(this.pv.v[l][m]=v),b=!0)):(v=i.i[l][m]+(a.i[l][m]-i.i[l][m])*y,r.i[l][m]!==v&&(r.i[l][m]=v,s&&(this.pv.i[l][m]=v),b=!0),v=i.o[l][m]+(a.o[l][m]-i.o[l][m])*y,r.o[l][m]!==v&&(r.o[l][m]=v,s&&(this.pv.o[l][m]=v),b=!0),v=i.v[l][m]+(a.v[l][m]-i.v[l][m])*y,r.v[l][m]!==v&&(r.v[l][m]=v,s&&(this.pv.v[l][m]=v),b=!0));return b&&(r.c=i.c),{iterationIndex:e,hasModified:b}}function e(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(this.lastFrame===l||!(this.lastFrame<e&&e>t||this.lastFrame>r&&t>r)){var s=this.lastFrame<t?this._lastIndex:0,i=this.interpolateShape(t,s,this.v,!0);this._lastIndex=i.iterationIndex,this.mdf=i.hasModified,i.hasModified&&(this.paths=this.localShapeCollection)}this.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function r(){return this.v}function s(){this.paths=this.localShapeCollection,this.k||(this.mdf=!1)}function i(t,e,r){this.__shapeObject=1,this.comp=t.comp,this.k=!1,this.mdf=!1;var i=3===r?e.pt.k:e.ks.k;this.v=shape_pool.clone(i),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=s}function a(t,e,r){this.__shapeObject=1,this.comp=t.comp,this.elem=t,this.offsetTime=t.data.st,this._lastIndex=0,this.keyframes=3===r?e.pt.k:e.ks.k,this.k=!0,this.kf=!0;{var i=this.keyframes[0].s[0].i.length;this.keyframes[0].s[0].i[0].length}this.v=shape_pool.newShape(),this.v.setPathData(this.keyframes[0].s[0].c,i),this.pv=shape_pool.clone(this.v),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=l,this.reset=s}function n(t,e,r,s){var n;if(3===r||4===r){var o=3===r?e.pt:e.ks,h=o.k;n=1===o.a||h.length?new a(t,e,r):new i(t,e,r)}else 5===r?n=new f(t,e):6===r?n=new p(t,e):7===r&&(n=new m(t,e));return n.k&&s.push(n),n}function o(){return i}function h(){return a}var l=-999999;i.prototype.interpolateShape=t,i.prototype.getValue=r,a.prototype.getValue=e,a.prototype.interpolateShape=t;var p=function(){function t(){var t=this.p.v[0],e=this.p.v[1],s=this.s.v[0]/2,i=this.s.v[1]/2;3!==this.d?(this.v.v[0][0]=t,this.v.v[0][1]=e-i,this.v.v[1][0]=t+s,this.v.v[1][1]=e,this.v.v[2][0]=t,this.v.v[2][1]=e+i,this.v.v[3][0]=t-s,this.v.v[3][1]=e,this.v.i[0][0]=t-s*r,this.v.i[0][1]=e-i,this.v.i[1][0]=t+s,this.v.i[1][1]=e-i*r,this.v.i[2][0]=t+s*r,this.v.i[2][1]=e+i,this.v.i[3][0]=t-s,this.v.i[3][1]=e+i*r,this.v.o[0][0]=t+s*r,this.v.o[0][1]=e-i,this.v.o[1][0]=t+s,this.v.o[1][1]=e+i*r,this.v.o[2][0]=t-s*r,this.v.o[2][1]=e+i,this.v.o[3][0]=t-s,this.v.o[3][1]=e-i*r):(this.v.v[0][0]=t,this.v.v[0][1]=e-i,this.v.v[1][0]=t-s,this.v.v[1][1]=e,this.v.v[2][0]=t,this.v.v[2][1]=e+i,this.v.v[3][0]=t+s,this.v.v[3][1]=e,this.v.i[0][0]=t+s*r,this.v.i[0][1]=e-i,this.v.i[1][0]=t-s,this.v.i[1][1]=e-i*r,this.v.i[2][0]=t-s*r,this.v.i[2][1]=e+i,this.v.i[3][0]=t+s,this.v.i[3][1]=e+i*r,this.v.o[0][0]=t-s*r,this.v.o[0][1]=e-i,this.v.o[1][0]=t-s,this.v.o[1][1]=e+i*r,this.v.o[2][0]=t+s*r,this.v.o[2][1]=e+i,this.v.o[3][0]=t+s,this.v.o[3][1]=e-i*r)}function e(t){var e,r=this.dynamicProperties.length;if(this.elem.globalData.frameId!==this.frameId){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId,e=0;r>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}}var r=roundCorner;return function(r,i){this.v=shape_pool.newShape(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=i.d,this.dynamicProperties=[],this.elem=r,this.comp=r.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=s,this.p=PropertyFactory.getProp(r,i.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(r,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),m=function(){function t(){var t,e=Math.floor(this.pt.v),r=2*Math.PI/e,s=this.or.v,i=this.os.v,a=2*Math.PI*s/(4*e),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,this.v._length=0,t=0;e>t;t+=1){var h=s*Math.cos(n),l=s*Math.sin(n),p=0===h&&0===l?0:l/Math.sqrt(h*h+l*l),m=0===h&&0===l?0:-h/Math.sqrt(h*h+l*l);h+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(h,l,h-p*a*i*o,l-m*a*i*o,h+p*a*i*o,l+m*a*i*o,t,!0),n+=r*o}this.paths.length=0,this.paths[0]=this.v}function e(){var t,e,r,s,i=2*Math.floor(this.pt.v),a=2*Math.PI/i,n=!0,o=this.or.v,h=this.ir.v,l=this.os.v,p=this.is.v,m=2*Math.PI*o/(2*i),f=2*Math.PI*h/(2*i),c=-Math.PI/2;c+=this.r.v;var d=3===this.data.d?-1:1;for(this.v._length=0,t=0;i>t;t+=1){e=n?o:h,r=n?l:p,s=n?m:f;var u=e*Math.cos(c),y=e*Math.sin(c),g=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),v=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.setTripleAt(u,y,u-g*s*r*d,y-v*s*r*d,u+g*s*r*d,y+v*s*r*d,t,!0),n=!n,c+=a*d}}function r(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);this.mdf&&this.convertToPath()}}return function(i,a){this.v=shape_pool.newShape(),this.v.setPathData(!0,0),this.elem=i,this.comp=i.comp,this.data=a,this.frameId=-1,this.d=a.d,this.dynamicProperties=[],this.mdf=!1,this.getValue=r,this.reset=s,1===a.sy?(this.ir=PropertyFactory.getProp(i,a.ir,0,0,this.dynamicProperties),this.is=PropertyFactory.getProp(i,a.is,0,.01,this.dynamicProperties),this.convertToPath=e):this.convertToPath=t,this.pt=PropertyFactory.getProp(i,a.pt,0,0,this.dynamicProperties),this.p=PropertyFactory.getProp(i,a.p,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(i,a.r,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(i,a.or,0,0,this.dynamicProperties),this.os=PropertyFactory.getProp(i,a.os,0,.01,this.dynamicProperties),this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:this.convertToPath()}}(),f=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],r=this.s.v[0]/2,s=this.s.v[1]/2,i=bm_min(r,s,this.r.v),a=i*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+r,e-s+i,t+r,e-s+i,t+r,e-s+a,0,!0),this.v.setTripleAt(t+r,e+s-i,t+r,e+s-a,t+r,e+s-i,1,!0),0!==i?(this.v.setTripleAt(t+r-i,e+s,t+r-i,e+s,t+r-a,e+s,2,!0),this.v.setTripleAt(t-r+i,e+s,t-r+a,e+s,t-r+i,e+s,3,!0),this.v.setTripleAt(t-r,e+s-i,t-r,e+s-i,t-r,e+s-a,4,!0),this.v.setTripleAt(t-r,e-s+i,t-r,e-s+a,t-r,e-s+i,5,!0),this.v.setTripleAt(t-r+i,e-s,t-r+i,e-s,t-r+a,e-s,6,!0),this.v.setTripleAt(t+r-i,e-s,t+r-a,e-s,t+r-i,e-s,7,!0)):(this.v.setTripleAt(t-r,e+s,t-r+a,e+s,t-r,e+s,2),this.v.setTripleAt(t-r,e-s,t-r,e-s+a,t-r,e-s,3))):(this.v.setTripleAt(t+r,e-s+i,t+r,e-s+a,t+r,e-s+i,0,!0),0!==i?(this.v.setTripleAt(t+r-i,e-s,t+r-i,e-s,t+r-a,e-s,1,!0),this.v.setTripleAt(t-r+i,e-s,t-r+a,e-s,t-r+i,e-s,2,!0),this.v.setTripleAt(t-r,e-s+i,t-r,e-s+i,t-r,e-s+a,3,!0),this.v.setTripleAt(t-r,e+s-i,t-r,e+s-a,t-r,e+s-i,4,!0),this.v.setTripleAt(t-r+i,e+s,t-r+i,e+s,t-r+a,e+s,5,!0),this.v.setTripleAt(t+r-i,e+s,t+r-a,e+s,t+r-i,e+s,6,!0),this.v.setTripleAt(t+r,e+s-i,t+r,e+s-i,t+r,e+s-a,7,!0)):(this.v.setTripleAt(t-r,e-s,t-r+a,e-s,t-r,e-s,1,!0),this.v.setTripleAt(t-r,e+s,t-r,e+s-a,t-r,e+s,2,!0),this.v.setTripleAt(t+r,e+s,t+r-a,e+s,t+r,e+s,3,!0)))}return function(r,i){this.v=shape_pool.newShape(),this.v.c=!0,this.localShapeCollection=shapeCollection_pool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=r,this.comp=r.comp,this.frameId=-1,this.d=i.d,this.dynamicProperties=[],this.mdf=!1,this.getValue=t,this.convertRectToPath=e,this.reset=s,this.p=PropertyFactory.getProp(r,i.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(r,i.s,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(r,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),c={};return c.getShapeProp=n,c.getConstructorFunction=o,c.getKeyframedConstructorFunction=h,c}(),ShapeModifiers=function(){function t(t,e){s[t]||(s[t]=e)}function e(t,e,r,i){return new s[t](e,r,i)}var r={},s={};return r.registerModifier=t,r.getModifier=e,r}();ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){this.closed||(this.shapes.push({shape:t.sh,data:t,localShapeCollection:shapeCollection_pool.newShapeCollection()}),this.addShapeToModifier(t.sh))},ShapeModifier.prototype.init=function(t,e,r){this.elem=t,this.frameId=-1,this.shapes=[],this.dynamicProperties=[],this.mdf=!1,this.closed=!1,this.k=!1,this.comp=t.comp,this.initModifierProperties(t,e),this.dynamicProperties.length?(this.k=!0,r.push(this)):this.getValue(!0)},extendPrototype(ShapeModifier,TrimModifier),TrimModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var s=this.o.v%360/360;0>s&&(s+=1);var i=this.s.v+s,a=this.e.v+s;if(i>a){var n=i;i=a,a=n}this.sValue=i,this.eValue=a,this.oValue=s}}},TrimModifier.prototype.initModifierProperties=function(t,e){this.sValue=0,this.eValue=0,this.oValue=0,this.getValue=this.processKeys,this.s=PropertyFactory.getProp(t,e.s,0,.01,this.dynamicProperties),this.e=PropertyFactory.getProp(t,e.e,0,.01,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,0,this.dynamicProperties),this.m=e.m,this.dynamicProperties.length||this.getValue(!0)},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,s,i){var a=[];1>=e?a.push({s:t,e:e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;l>n;n+=1)if(o=a[n],o.e*i<s||o.s*i>s+r);else{var p,m;p=o.s*i<=s?0:(o.s*i-s)/r,m=o.e*i>=s+r?1:(o.e*i-s)/r,h.push([p,m])}return h.length||h.push([0,0]),h},TrimModifier.prototype.processShapes=function(t){var e,r,s,i,a,n,o,h=this.shapes.length,l=this.sValue,p=this.eValue,m=0;if(p===l)for(r=0;h>r;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape.mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection;else if(1===p&&0===l||0===p&&1===l){if(this.mdf)for(r=0;h>r;r+=1)this.shapes[r].shape.mdf=!0}else{var f,c,d=[];for(r=0;h>r;r+=1)if(f=this.shapes[r],f.shape.mdf||this.mdf||t||2===this.m){if(e=f.shape.paths,i=e._length,o=0,!f.shape.mdf&&f.pathsData)o=f.totalShapeLength;else{for(a=[],s=0;i>s;s+=1)n=bez.getSegmentsLength(e.shapes[s]),a.push(n),o+=n.totalLength;f.totalShapeLength=o,f.pathsData=a}m+=o,f.shape.mdf=!0}else f.shape.paths=f.localShapeCollection;var s,i,u=l,y=p,g=0;for(r=h-1;r>=0;r-=1)if(f=this.shapes[r],f.shape.mdf){if(c=f.localShapeCollection,c.releaseShapes(),2===this.m&&h>1){var v=this.calculateShapeEdges(l,p,f.totalShapeLength,g,m);g+=f.totalShapeLength}else v=[[u,y]];for(i=v.length,s=0;i>s;s+=1){u=v[s][0],y=v[s][1],d.length=0,1>=y?d.push({s:f.totalShapeLength*u,e:f.totalShapeLength*y}):u>=1?d.push({s:f.totalShapeLength*(u-1),e:f.totalShapeLength*(y-1)}):(d.push({s:f.totalShapeLength*u,e:f.totalShapeLength}),d.push({s:0,e:f.totalShapeLength*(y-1)}));var b=this.addShapes(f,d[0]);if(d[0].s!==d[0].e){if(d.length>1)if(f.shape.v.c){var E=b.pop();this.addPaths(b,c),b=this.addShapes(f,d[1],E)}else this.addPaths(b,c),b=this.addShapes(f,d[1]);this.addPaths(b,c)}}f.shape.paths=c}}this.dynamicProperties.length||(this.mdf=!1)},TrimModifier.prototype.addPaths=function(t,e){var r,s=t.length;for(r=0;s>r;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,s,i,a,n){i.setXYAt(e[0],e[1],"o",a),i.setXYAt(r[0],r[1],"i",a+1),n&&i.setXYAt(t[0],t[1],"v",a),i.setXYAt(s[0],s[1],"v",a+1)},TrimModifier.prototype.addShapes=function(t,e,r){var s,i,a,n,o,h,l,p,m=t.pathsData,f=t.shape.paths.shapes,c=t.shape.paths._length,d=0,u=[],y=!0;for(r?(o=r._length,p=r._length):(r=shape_pool.newShape(),o=0,p=0),u.push(r),s=0;c>s;s+=1){for(h=m[s].lengths,r.c=f[s].c,a=f[s].c?h.length:h.length+1,i=1;a>i;i+=1)if(n=h[i-1],d+n.addedLength<e.s)d+=n.addedLength,r.c=!1;else{if(d>e.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(f[s].v[i-1],f[s].o[i-1],f[s].i[i],f[s].v[i],r,o,y),y=!1):(l=bez.getNewSegment(f[s].v[i-1],f[s].v[i],f[s].o[i-1],f[s].i[i],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[i-1]),this.addSegment(l.pt1,l.pt3,l.pt4,l.pt2,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(f[s].c){if(n=h[i-1],d<=e.e){var g=h[i-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(f[s].v[i-1],f[s].o[i-1],f[s].i[0],f[s].v[0],r,o,y),y=!1):(l=bez.getNewSegment(f[s].v[i-1],f[s].v[0],f[s].o[i-1],f[s].i[0],(e.s-d)/g,(e.e-d)/g,h[i-1]),this.addSegment(l.pt1,l.pt3,l.pt4,l.pt2,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;c-1>s&&(r=shape_pool.newShape(),y=!0,u.push(r),o=0)}return u},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype(ShapeModifier,RoundCornersModifier),RoundCornersModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0)}},RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this.dynamicProperties),this.dynamicProperties.length||this.getValue(!0)},RoundCornersModifier.prototype.processPath=function(t,e){var r=shape_pool.newShape();r.c=t.c;var s,i,a,n,o,h,l,p,m,f,c,d,u,y=t._length,g=0;for(s=0;y>s;s+=1)i=t.v[s],n=t.o[s],a=t.i[s],i[0]===n[0]&&i[1]===n[1]&&i[0]===a[0]&&i[1]===a[1]?0!==s&&s!==y-1||t.c?(o=0===s?t.v[y-1]:t.v[s-1],h=Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=d=i[0]+(o[0]-i[0])*l,m=u=i[1]-(i[1]-o[1])*l,f=p-(p-i[0])*roundCorner,c=m-(m-i[1])*roundCorner,r.setTripleAt(p,m,f,c,d,u,g),g+=1,o=s===y-1?t.v[0]:t.v[s+1],h=Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)),l=h?Math.min(h/2,e)/h:0,p=f=i[0]+(o[0]-i[0])*l,m=c=i[1]+(o[1]-i[1])*l,d=p-(p-i[0])*roundCorner,u=m-(m-i[1])*roundCorner,r.setTripleAt(p,m,f,c,d,u,g),g+=1):(r.setTripleAt(i[0],i[1],n[0],n[1],a[0],a[1],g),g+=1):(r.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],g),g+=1);return r},RoundCornersModifier.prototype.processShapes=function(t){var e,r,s,i,a=this.shapes.length,n=this.rd.v;if(0!==n){var o,h,l;for(r=0;a>r;r+=1){if(o=this.shapes[r],h=o.shape.paths,l=o.localShapeCollection,o.shape.mdf||this.mdf||t)for(l.releaseShapes(),o.shape.mdf=!0,e=o.shape.paths.shapes,i=o.shape.paths._length,s=0;i>s;s+=1)l.addShape(this.processPath(e[s],n));o.shape.paths=o.localShapeCollection}}this.dynamicProperties.length||(this.mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),RepeaterModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1;var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0)}},RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,null,this.dynamicProperties),this.tr=PropertyFactory.getProp(t,e.tr,2,null,this.dynamicProperties),this.data=e,this.dynamicProperties.length||this.getValue(!0),this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,s,i,a){var n=a?-1:1,o=s.s.v[0]+(1-s.s.v[0])*(1-i),h=s.s.v[1]+(1-s.s.v[1])*(1-i);t.translate(s.p.v[0]*n*i,s.p.v[1]*n*i,s.p.v[2]),e.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),e.rotate(-s.r.v*n*i),e.translate(s.a.v[0],s.a.v[1],s.a.v[2]),r.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),r.scale(a?1/o:o,a?1/h:h),r.translate(s.a.v[0],s.a.v[1],s.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,s,i){this.elem=t,this.arr=e,this.pos=r,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.dynamicProperties=[],this.frameId=-1,this.initModifierProperties(t,e[r]);for(var a=0;r>0;)r-=1,this._elements.unshift(e[r]),a+=1;this.dynamicProperties.length?(this.k=!0,i.push(this)):this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;r>e;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=(t.length,JSON.parse(JSON.stringify(t)));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,s=t.length;for(r=0;s>r;r+=1)t[r]._render=e,"gr"===t[r].ty&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){if(this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.dynamicProperties.length||t||(this.mdf=!1),this.mdf)){var e=Math.ceil(this.c.v);if(this._groups.length<e){for(;this._groups.length<e;){var r={it:this.cloneElements(this._elements),ty:"gr"};r.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:0,ix:6,k:0},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,r),this._groups.splice(0,0,r),this._currentCopies+=1}this.elem.reloadShapes()}var s,i,a=0;for(s=0;s<=this._groups.length-1;s+=1)i=e>a,this._groups[s]._render=i,this.changeGroupRender(this._groups[s].it,i),a+=1;this._currentCopies=e,this.elem.firstFrame=!0;var n=this.o.v,o=n%1,h=n>0?Math.floor(n):Math.ceil(n),l=(this.tr.v.props,this.pMatrix.props),p=this.rMatrix.props,m=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var f=0;if(n>0){for(;h>f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),f+=1;o&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,o,!1),f+=o)}else if(0>n){for(;f>h;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),f-=1;o&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-o,!0),f-=o)}s=1===this.data.m?0:this._currentCopies-1;var c=1===this.data.m?1:-1;for(a=this._currentCopies;a;){if(0!==f){(0!==s&&1===c||s!==this._currentCopies-1&&-1===c)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),this.matrix.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15]);var d,u=this.elemsData[s].it,y=u[u.length-1].transform.mProps.v.props,g=y.length;for(d=0;g>d;d+=1)y[d]=this.matrix.props[d];this.matrix.reset()}else{this.matrix.reset();var d,u=this.elemsData[s].it,y=u[u.length-1].transform.mProps.v.props,g=y.length;for(d=0;g>d;d+=1)y[d]=this.matrix.props[d]}f+=1,a-=1,s+=c}}},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(Array.apply(null,{length:this._maxLength})),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shape_pool.release(this.shapes[t]);this._length=0};var ImagePreloader=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages}function e(t){var e="";if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e}function r(e){var r=document.createElement("img");r.addEventListener("load",t.bind(this),!1),r.addEventListener("error",t.bind(this),!1),r.src=e}function s(t){this.totalAssets=t.length;var s;for(s=0;s<this.totalAssets;s+=1)t[s].layers||(r.bind(this)(e.bind(this)(t[s])),this.totalImages+=1)}function i(t){this.path=t||""}function a(t){this.assetsPath=t||""}return function(){this.loadAssets=s,this.setAssetsPath=a,this.setPath=i,this.assetsPath="",this.path="",this.totalAssets=0,this.totalImages=0,this.loadedAssets=0}}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),filtersFactory=function(){function t(t){var e=document.createElementNS(svgNS,"filter");return e.setAttribute("id",t),e.setAttribute("filterUnits","objectBoundingBox"),e.setAttribute("x","0%"),e.setAttribute("y","0%"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e}function e(){var t=document.createElementNS(svgNS,"feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),t}var r={};return r.createFilter=t,r.createAlphaToLuminanceFilter=e,r}();TextAnimatorProperty.prototype.searchProperties=function(t){var e,r,s,i=this._textData.a.length;for(e=0;i>e;e+=1)s=this._textData.a[e],r={a:{},s:{}},"r"in s.a&&(r.a.r=PropertyFactory.getProp(this._elem,s.a.r,0,degToRads,this._dynamicProperties)),"rx"in s.a&&(r.a.rx=PropertyFactory.getProp(this._elem,s.a.rx,0,degToRads,this._dynamicProperties)),"ry"in s.a&&(r.a.ry=PropertyFactory.getProp(this._elem,s.a.ry,0,degToRads,this._dynamicProperties)),"sk"in s.a&&(r.a.sk=PropertyFactory.getProp(this._elem,s.a.sk,0,degToRads,this._dynamicProperties)),"sa"in s.a&&(r.a.sa=PropertyFactory.getProp(this._elem,s.a.sa,0,degToRads,this._dynamicProperties)),"s"in s.a&&(r.a.s=PropertyFactory.getProp(this._elem,s.a.s,1,.01,this._dynamicProperties)),"a"in s.a&&(r.a.a=PropertyFactory.getProp(this._elem,s.a.a,1,0,this._dynamicProperties)),"o"in s.a&&(r.a.o=PropertyFactory.getProp(this._elem,s.a.o,0,.01,this._dynamicProperties)),"p"in s.a&&(r.a.p=PropertyFactory.getProp(this._elem,s.a.p,1,0,this._dynamicProperties)),"sw"in s.a&&(r.a.sw=PropertyFactory.getProp(this._elem,s.a.sw,0,0,this._dynamicProperties)),"sc"in s.a&&(r.a.sc=PropertyFactory.getProp(this._elem,s.a.sc,1,0,this._dynamicProperties)),"fc"in s.a&&(r.a.fc=PropertyFactory.getProp(this._elem,s.a.fc,1,0,this._dynamicProperties)),"fh"in s.a&&(r.a.fh=PropertyFactory.getProp(this._elem,s.a.fh,0,0,this._dynamicProperties)),"fs"in s.a&&(r.a.fs=PropertyFactory.getProp(this._elem,s.a.fs,0,.01,this._dynamicProperties)),"fb"in s.a&&(r.a.fb=PropertyFactory.getProp(this._elem,s.a.fb,0,.01,this._dynamicProperties)),"t"in s.a&&(r.a.t=PropertyFactory.getProp(this._elem,s.a.t,0,0,this._dynamicProperties)),r.s=PropertyFactory.getTextSelectorProp(this._elem,s.s,this._dynamicProperties),r.s.t=s.s.t,this._animatorsData[e]=r;this._textData.p&&"m"in this._textData.p?(this._pathData={f:PropertyFactory.getProp(this._elem,this._textData.p.f,0,0,this._dynamicProperties),l:PropertyFactory.getProp(this._elem,this._textData.p.l,0,0,this._dynamicProperties),r:this._textData.p.r,m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=PropertyFactory.getProp(this._elem,this._textData.m.a,1,0,this._dynamicProperties),this._dynamicProperties.length&&t.push(this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this.mdf||this._firstFrame||e||this._hasMaskedPath&&this._pathData.m.mdf){this._firstFrame=!1;var r,s,i,a,n=this._moreOptions.alignment.v,o=this._animatorsData,h=this._textData,l=this.mHelper,p=this._renderType,m=this.renderedLetters.length,f=(this.data,t.l);if(this._hasMaskedPath){var c=this._pathData.m;if(!this._pathData.n||this._pathData.mdf){var d=c.v;this._pathData.r&&(d=reversePath(d));var u={tLength:0,segments:[]};a=d._length-1;var y,g=0;for(i=0;a>i;i+=1)y={s:d.v[i],e:d.v[i+1],to:[d.o[i][0]-d.v[i][0],d.o[i][1]-d.v[i][1]],ti:[d.i[i+1][0]-d.v[i+1][0],d.i[i+1][1]-d.v[i+1][1]]},bez.buildBezierData(y),u.tLength+=y.bezierData.segmentLength,u.segments.push(y),g+=y.bezierData.segmentLength;i=a,c.v.c&&(y={s:d.v[i],e:d.v[0],to:[d.o[i][0]-d.v[i][0],d.o[i][1]-d.v[i][1]],ti:[d.i[0][0]-d.v[0][0],d.i[0][1]-d.v[0][1]]},bez.buildBezierData(y),u.tLength+=y.bezierData.segmentLength,u.segments.push(y),g+=y.bezierData.segmentLength),this._pathData.pi=u}var v,b,E,u=this._pathData.pi,P=this._pathData.f.v,S=0,x=1,C=0,k=!0,A=u.segments;if(0>P&&c.v.c)for(u.tLength<Math.abs(P)&&(P=-Math.abs(P)%u.tLength),S=A.length-1,E=A[S].bezierData.points,x=E.length-1;0>P;)P+=E[x].partialLength,x-=1,0>x&&(S-=1,E=A[S].bezierData.points,x=E.length-1);E=A[S].bezierData.points,b=E[x-1],v=E[x];var M,D,T=v.partialLength}a=f.length,r=0,s=0;var w,F,I,_,V,R=1.2*t.s*.714,N=!0;if(_=o.length,e)for(I=0;_>I;I+=1)F=o[I].s,F.getValue(!0);var B,L,G,O,j,H,z,W,Y,q,X,J,U,Z=-1,K=P,Q=S,$=x,tt=-1,et=0,rt="",st=this.defaultPropsArray;for(i=0;a>i;i+=1){if(l.reset(),j=1,f[i].n)r=0,s+=t.yOffset,s+=N?1:0,P=K,N=!1,et=0,this._hasMaskedPath&&(S=Q,x=$,E=A[S].bezierData.points,b=E[x-1],v=E[x],T=v.partialLength,C=0),U=q=J=rt="",st=this.defaultPropsArray;else{if(this._hasMaskedPath){if(tt!==f[i].line){switch(t.j){case 1:P+=g-t.lineWidths[f[i].line];break;case 2:P+=(g-t.lineWidths[f[i].line])/2}tt=f[i].line}Z!==f[i].ind&&(f[Z]&&(P+=f[Z].extra),P+=f[i].an/2,Z=f[i].ind),P+=n[0]*f[i].an/200;var it=0;for(I=0;_>I;I+=1)w=o[I].a,"p"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),it+=B.length?w.p.v[0]*B[0]:w.p.v[0]*B),"a"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),it+=B.length?w.a.v[0]*B[0]:w.a.v[0]*B);for(k=!0;k;)C+T>=P+it||!E?(M=(P+it-C)/v.partialLength,G=b.point[0]+(v.point[0]-b.point[0])*M,O=b.point[1]+(v.point[1]-b.point[1])*M,l.translate(-n[0]*f[i].an/200,-(n[1]*R/100)),k=!1):E&&(C+=v.partialLength,x+=1,x>=E.length&&(x=0,S+=1,A[S]?E=A[S].bezierData.points:c.v.c?(x=0,S=0,E=A[S].bezierData.points):(C-=v.partialLength,E=null)),E&&(b=v,v=E[x],T=v.partialLength));L=f[i].an/2-f[i].add,l.translate(-L,0,0)}else L=f[i].an/2-f[i].add,l.translate(-L,0,0),l.translate(-n[0]*f[i].an/200,-n[1]*R/100,0);for(et+=f[i].l/2,I=0;_>I;I+=1)w=o[I].a,"t"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),this._hasMaskedPath?P+=B.length?w.t*B[0]:w.t*B:r+=B.length?w.t.v*B[0]:w.t.v*B);for(et+=f[i].l/2,t.strokeWidthAnim&&(z=t.sw||0),t.strokeColorAnim&&(H=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),I=0;_>I;I+=1)w=o[I].a,"a"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),B.length?l.translate(-w.a.v[0]*B[0],-w.a.v[1]*B[1],w.a.v[2]*B[2]):l.translate(-w.a.v[0]*B,-w.a.v[1]*B,w.a.v[2]*B));for(I=0;_>I;I+=1)w=o[I].a,"s"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),B.length?l.scale(1+(w.s.v[0]-1)*B[0],1+(w.s.v[1]-1)*B[1],1):l.scale(1+(w.s.v[0]-1)*B,1+(w.s.v[1]-1)*B,1));for(I=0;_>I;I+=1){if(w=o[I].a,F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),"sk"in w&&(B.length?l.skewFromAxis(-w.sk.v*B[0],w.sa.v*B[1]):l.skewFromAxis(-w.sk.v*B,w.sa.v*B)),"r"in w&&l.rotateZ(B.length?-w.r.v*B[2]:-w.r.v*B),"ry"in w&&l.rotateY(B.length?w.ry.v*B[1]:w.ry.v*B),"rx"in w&&l.rotateX(B.length?w.rx.v*B[0]:w.rx.v*B),"o"in w&&(j+=B.length?(w.o.v*B[0]-j)*B[0]:(w.o.v*B-j)*B),t.strokeWidthAnim&&"sw"in w&&(z+=B.length?w.sw.v*B[0]:w.sw.v*B),t.strokeColorAnim&&"sc"in w)for(Y=0;3>Y;Y+=1)H[Y]=Math.round(B.length?255*(H[Y]+(w.sc.v[Y]-H[Y])*B[0]):255*(H[Y]+(w.sc.v[Y]-H[Y])*B));if(t.fillColorAnim&&t.fc){if("fc"in w)for(Y=0;3>Y;Y+=1)W[Y]=B.length?W[Y]+(w.fc.v[Y]-W[Y])*B[0]:W[Y]+(w.fc.v[Y]-W[Y])*B;"fh"in w&&(W=B.length?addHueToRGB(W,w.fh.v*B[0]):addHueToRGB(W,w.fh.v*B)),"fs"in w&&(W=B.length?addSaturationToRGB(W,w.fs.v*B[0]):addSaturationToRGB(W,w.fs.v*B)),"fb"in w&&(W=B.length?addBrightnessToRGB(W,w.fb.v*B[0]):addBrightnessToRGB(W,w.fb.v*B))}}for(I=0;_>I;I+=1)w=o[I].a,"p"in w&&(F=o[I].s,B=F.getMult(f[i].anIndexes[I],h.a[I].s.totalChars),this._hasMaskedPath?B.length?l.translate(0,w.p.v[1]*B[0],-w.p.v[2]*B[1]):l.translate(0,w.p.v[1]*B,-w.p.v[2]*B):B.length?l.translate(w.p.v[0]*B[0],w.p.v[1]*B[1],-w.p.v[2]*B[2]):l.translate(w.p.v[0]*B,w.p.v[1]*B,-w.p.v[2]*B));if(t.strokeWidthAnim&&(q=0>z?0:z),t.strokeColorAnim&&(X="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),t.fillColorAnim&&t.fc&&(J="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(l.translate(0,-t.ls),l.translate(0,n[1]*R/100+s,0),h.p.p){D=(v.point[1]-b.point[1])/(v.point[0]-b.point[0]);var at=180*Math.atan(D)/Math.PI;v.point[0]<b.point[0]&&(at+=180),l.rotate(-at*Math.PI/180)}l.translate(G,O,0),P-=n[0]*f[i].an/200,f[i+1]&&Z!==f[i+1].ind&&(P+=f[i].an/2,P+=t.tr/1e3*t.s)}else{switch(l.translate(r,s,0),t.ps&&l.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:l.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[f[i].line]),0,0);break;case 2:l.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[f[i].line])/2,0,0)}l.translate(0,-t.ls),l.translate(L,0,0),l.translate(n[0]*f[i].an/200,n[1]*R/100,0),r+=f[i].l+t.tr/1e3*t.s}"html"===p?rt=l.toCSS():"svg"===p?rt=l.to2dCSS():st=[l.props[0],l.props[1],l.props[2],l.props[3],l.props[4],l.props[5],l.props[6],l.props[7],l.props[8],l.props[9],l.props[10],l.props[11],l.props[12],l.props[13],l.props[14],l.props[15]],U=j}i>=m?(V=new LetterProps(U,q,X,J,rt,st),this.renderedLetters.push(V),m+=1,this.lettersChangedFlag=!0):(V=this.renderedLetters[i],this.lettersChangedFlag=V.update(U,q,X,J,rt,st)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){if(this._elem.globalData.frameId!==this._frameId){this._frameId=this._elem.globalData.frameId;var t,e=this._dynamicProperties.length;for(this.mdf=!1,t=0;e>t;t+=1)this._dynamicProperties[t].getValue(),this.mdf=this._dynamicProperties[t].mdf||this.mdf}},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],LetterProps.prototype.update=function(t,e,r,s,i,a){this.mdf.o=!1,this.mdf.sw=!1,this.mdf.sc=!1,this.mdf.fc=!1,this.mdf.m=!1,this.mdf.p=!1;var n=!1;return this.o!==t&&(this.o=t,this.mdf.o=!0,n=!0),this.sw!==e&&(this.sw=e,this.mdf.sw=!0,n=!0),this.sc!==r&&(this.sc=r,this.mdf.sc=!0,n=!0),this.fc!==s&&(this.fc=s,this.mdf.fc=!0,n=!0),this.m!==i&&(this.m=i,this.mdf.m=!0,n=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this.mdf.p=!0,n=!0),n};var pooling=function(){function t(t){return t.concat(Array.apply(null,{length:t.length}))}return{"double":t}}(),point_pool=function(){
function t(){var t;return s?(s-=1,t=a[s]):t=[.1,.1],t}function e(t){s===i&&(a=pooling["double"](a),i=2*i),a[s]=t,s+=1}var r={newPoint:t,release:e},s=0,i=8,a=Array.apply(null,{length:i});return r}(),shape_pool=function(){function t(){var t;return a?(a-=1,t=o[a]):t=new ShapePath,t}function e(t){a===n&&(o=pooling["double"](o),n=2*n);var e,r=t._length;for(e=0;r>e;e+=1)point_pool.release(t.v[e]),point_pool.release(t.i[e]),point_pool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1,o[a]=t,a+=1}function r(t,r){for(;r--;)e(t[r])}function s(e,r){var s,i=void 0===e._length?e.v.length:e._length,a=t();a.setLength(i),a.c=e.c;var n;for(s=0;i>s;s+=1)r?(n=r.applyToPointArray(e.v[s][0],e.v[s][1],0,2),a.setXYAt(n[0],n[1],"v",s),point_pool.release(n),n=r.applyToPointArray(e.o[s][0],e.o[s][1],0,2),a.setXYAt(n[0],n[1],"o",s),point_pool.release(n),n=r.applyToPointArray(e.i[s][0],e.i[s][1],0,2),a.setXYAt(n[0],n[1],"i",s),point_pool.release(n)):a.setTripleAt(e.v[s][0],e.v[s][1],e.o[s][0],e.o[s][1],e.i[s][0],e.i[s][1],s);return a}var i={clone:s,newShape:t,release:e,releaseArray:r},a=0,n=4,o=Array.apply(null,{length:n});return i}(),shapeCollection_pool=function(){function t(){var t;return i?(i-=1,t=n[i]):t=new ShapeCollection,t}function e(t){var e,r=t._length;for(e=0;r>e;e+=1)shape_pool.release(t.shapes[e]);t._length=0,i===a&&(n=pooling["double"](n),a=2*a),n[i]=t,i+=1}function r(t,r){e(t),i===a&&(n=pooling["double"](n),a=2*a),n[i]=t,i+=1}var s={newShapeCollection:t,release:e,clone:r},i=0,a=4,n=Array.apply(null,{length:a});return s}();BaseRenderer.prototype.checkLayers=function(t){var e,r,s=this.layers.length;for(this.completeLayers=!0,e=s-1;e>=0;e--)this.elements[e]||(r=this.layers[e],r.ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t);case 99:return null}return this.createBase(t)},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;e>t;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,r,s=t.length,i=this.layers.length;for(e=0;s>e;e+=1)for(r=0;i>r;){if(this.layers[r].id==t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){r=r||[];for(var s=this.elements,i=this.layers,a=0,n=i.length;n>a;)i[a].ind==e&&(s[a]&&s[a]!==!0?void 0!==i[a].parent?(r.push(s[a]),s[a]._isParent=!0,this.buildElementParenting(t,i[a].parent,r)):(r.push(s[a]),s[a]._isParent=!0,t.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},extendPrototype(BaseRenderer,SVGRenderer),SVGRenderer.prototype.createBase=function(t){return new SVGBaseElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new IShapeElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new ICompElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.layerElement,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.layerElement=document.createElementNS(svgNS,"svg"),this.layerElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.layerElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.layerElement.setAttribute("width",t.w),this.layerElement.setAttribute("height",t.h),this.layerElement.style.width="100%",this.layerElement.style.height="100%"),this.renderConfig.className&&this.layerElement.setAttribute("class",this.renderConfig.className),this.layerElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.layerElement);var e=document.createElementNS(svgNS,"defs");this.globalData.defs=e,this.layerElement.appendChild(e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.frameId=0,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h},this.data=t,this.globalData.frameRate=t.fr;var r=document.createElementNS(svgNS,"clipPath"),s=document.createElementNS(svgNS,"rect");s.setAttribute("width",t.w),s.setAttribute("height",t.h),s.setAttribute("x",0),s.setAttribute("y",0);var i="animationMask_"+randomString(10);r.setAttribute("id",i),r.appendChild(s);var a=document.createElementNS(svgNS,"g");a.setAttribute("clip-path","url("+locationHref+"#"+i+")"),this.layerElement.appendChild(a),e.appendChild(r),this.layerElement=a,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.elements=Array.apply(null,{length:t.layers.length})},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t++)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){e[t]=!0;var r=this.createItem(this.layers[t]);e[t]=r,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt&&(this.elements[t-1]&&this.elements[t-1]!==!0?r.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(r)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;r>e;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!=t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t;var e,r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);for(e=r-1;e>=0;e--)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var s,i=0;e>i;)this.elements[i]&&this.elements[i]!==!0&&this.elements[i].getBaseElement()&&(s=this.elements[i].getBaseElement()),i+=1;s?this.layerElement.insertBefore(r,s):this.layerElement.appendChild(r)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},SVGRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length,s=document.createElementNS(svgNS,"g");for(e=0;r>e;e+=1)if(t[e].xt){var i=this.createComp(t[e],s,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()},MaskElement.prototype.renderFrame=function(t){var e,r=this.masksProperties.length;for(e=0;r>e;e++)if((this.viewData[e].prop.mdf||this.firstFrame)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op.mdf||this.firstFrame)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp.mdf||this.firstFrame)&&(this.viewData[e].invRect.setAttribute("x",-t.props[12]),this.viewData[e].invRect.setAttribute("y",-t.props[13])),this.storedData[e].x&&(this.storedData[e].x.mdf||this.firstFrame))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}this.firstFrame=!1},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var s,i,a=" M"+e.v[0][0]+","+e.v[0][1];for(i=e._length,s=1;i>s;s+=1)a+=" C"+bm_rnd(e.o[s-1][0])+","+bm_rnd(e.o[s-1][1])+" "+bm_rnd(e.i[s][0])+","+bm_rnd(e.i[s][1])+" "+bm_rnd(e.v[s][0])+","+bm_rnd(e.v[s][1]);e.c&&i>1&&(a+=" C"+bm_rnd(e.o[s-1][0])+","+bm_rnd(e.o[s-1][1])+" "+bm_rnd(e.i[0][0])+","+bm_rnd(e.i[0][1])+" "+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r.lastPath!==a&&(r.elem&&(e.c?t.inv?r.elem.setAttribute("d",this.solidPath+a):r.elem.setAttribute("d",a):r.elem.setAttribute("d","")),r.lastPath=a)},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},BaseElement.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;e>t;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},BaseElement.prototype.checkParenting=function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent)},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.elemMdf=!0,this.globalData.mdf=!0,this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.elemMdf=!0,this.globalData.mdf=!0,this.isVisible=!1);var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)(this.isVisible||this._isParent&&"transform"===this.dynamicProperties[e].type)&&(this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.elemMdf=!0,this.globalData.mdf=!0));return this.data.hasMask&&this.isVisible&&this.maskManager.prepareFrame(t*this.data.sr),this.currentFrameNum=t*this.data.sr,this.isVisible},BaseElement.prototype.globalToLocal=function(t){var e=[];e.push(this.finalTransform);for(var r=!0,s=this.comp;r;)s.finalTransform?(s.data.hasMask&&e.splice(0,0,s.finalTransform),s=s.comp):r=!1;var i,a,n=e.length;for(i=0;n>i;i+=1)a=e[i].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},BaseElement.prototype.initExpressions=function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?this.layerInterface.shapeInterface=ShapeExpressionInterface.createShapeInterface(this.shapesData,this.itemsData,this.layerInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this))},BaseElement.prototype.setBlendMode=function(){var t="";switch(this.data.bm){case 1:t="multiply";break;case 2:t="screen";break;case 3:t="overlay";break;case 4:t="darken";break;case 5:t="lighten";break;case 6:t="color-dodge";break;case 7:t="color-burn";break;case 8:t="hard-light";break;case 9:t="soft-light";break;case 10:t="difference";break;case 11:t="exclusion";break;case 12:t="hue";break;case 13:t="saturation";break;case 14:t="color";break;case 15:t="luminosity"}var e=this.baseElement||this.layerElement;e.style["mix-blend-mode"]=t},BaseElement.prototype.init=function(){this.data.sr||(this.data.sr=1),this.dynamicProperties=this.dynamicProperties||[],this.data.ef&&(this.effects=new EffectsManager(this.data,this,this.dynamicProperties)),this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this._isParent=!1,this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ks&&(this.finalTransform={mProp:PropertyFactory.getProp(this,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.finalTransform.op=this.finalTransform.mProp.o,this.transform=this.finalTransform.mProp,11!==this.data.ty&&this.createElements(),this.data.hasMask&&this.addMasks(this.data)),this.elemMdf=!1},BaseElement.prototype.getType=function(){return this.type},BaseElement.prototype.resetHierarchy=function(){this.hierarchy?this.hierarchy.length=0:this.hierarchy=[]},BaseElement.prototype.getHierarchy=function(){return this.hierarchy||(this.hierarchy=[]),this.hierarchy},BaseElement.prototype.setHierarchy=function(t){this.hierarchy=t},BaseElement.prototype.getLayerSize=function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},BaseElement.prototype.hide=function(){},BaseElement.prototype.sourceRectAtTime=function(){return{top:0,left:0,width:100,height:100}},BaseElement.prototype.mHelper=new Matrix,createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.createElements=function(){this.layerElement=document.createElementNS(svgNS,"g"),this.transformedElement=this.layerElement,this.data.hasMask&&(this.maskedElement=this.layerElement);var t=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var e=document.createElementNS(svgNS,"mask");if(e.setAttribute("id",this.layerId),e.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e),!featureSupport.maskType&&1==this.data.td){e.setAttribute("mask-type","luminance");var r=randomString(10),s=filtersFactory.createFilter(r);this.globalData.defs.appendChild(s),s.appendChild(filtersFactory.createAlphaToLuminanceFilter());var i=document.createElementNS(svgNS,"g");i.appendChild(this.layerElement),t=i,e.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+r+")")}}else if(2==this.data.td){var a=document.createElementNS(svgNS,"mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type","alpha");var n=document.createElementNS(svgNS,"g");a.appendChild(n);var r=randomString(10),s=filtersFactory.createFilter(r),o=document.createElementNS(svgNS,"feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1"),s.appendChild(o),this.globalData.defs.appendChild(s);var h=document.createElementNS(svgNS,"rect");if(h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),n.setAttribute("filter","url("+locationHref+"#"+r+")"),n.appendChild(h),n.appendChild(this.layerElement),t=n,!featureSupport.maskType){a.setAttribute("mask-type","luminance"),s.appendChild(filtersFactory.createAlphaToLuminanceFilter());var i=document.createElementNS(svgNS,"g");n.appendChild(h),i.appendChild(this.layerElement),t=i,n.appendChild(i)}this.globalData.defs.appendChild(a)}}else(this.data.hasMask||this.data.tt)&&this.data.tt?(this.matteElement=document.createElementNS(svgNS,"g"),this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)),0===this.data.ty){var l=document.createElementNS(svgNS,"clipPath"),p=document.createElementNS(svgNS,"path");p.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var m="cp_"+randomString(8);if(l.setAttribute("id",m),l.appendChild(p),this.globalData.defs.appendChild(l),this.checkMasks()){var f=document.createElementNS(svgNS,"g");f.setAttribute("clip-path","url("+locationHref+"#"+m+")"),f.appendChild(this.layerElement),this.transformedElement=f,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+m+")")}0!==this.data.bm&&this.setBlendMode(),this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.ef&&(this.effectsManager=new SVGEffects(this)),this.checkParenting()},SVGBaseElement.prototype.setBlendMode=BaseElement.prototype.setBlendMode,SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty||this.data.hd||!this.isVisible)return!1;this.lastNum=this.currentFrameNum,this.finalTransform.opMdf=this.firstFrame||this.finalTransform.op.mdf,this.finalTransform.matMdf=this.firstFrame||this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,r=this.finalTransform.mat;if(this.hierarchy){var s=0,i=this.hierarchy.length;if(!this.finalTransform.matMdf)for(;i>s;){if(this.hierarchy[s].finalTransform.mProp.mdf){this.finalTransform.matMdf=!0;break}s+=1}if(this.finalTransform.matMdf)for(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e),s=0;i>s;s+=1)e=this.hierarchy[s].finalTransform.mProp.v.props,r.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}else this.isVisible&&(r=this.finalTransform.mProp.v);return this.finalTransform.matMdf&&this.layerElement&&this.transformedElement.setAttribute("transform",r.to2dCSS()),this.finalTransform.opMdf&&this.layerElement&&(this.finalTransform.op.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.hidden&&this.isTransparent&&(this.isTransparent=!1,this.show()),this.transformedElement.setAttribute("opacity",this.finalTransform.op.v)),this.data.hasMask&&this.maskManager.renderFrame(r),this.effectsManager&&this.effectsManager.renderFrame(this.firstFrame),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getBaseElement=function(){return this.baseElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")},SVGBaseElement.prototype.hide=function(){this.hidden||(this.layerElement.style.display="none",this.hidden=!0)},SVGBaseElement.prototype.show=function(){this.isVisible&&!this.isTransparent&&(this.hidden=!1,this.layerElement.style.display="block")},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.identityMatrix=new Matrix,IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"square"},IShapeElement.prototype.ljEnum={1:"miter",2:"round",3:"butt"},IShapeElement.prototype.searchProcessedElement=function(t){for(var e=this.processedElements.length;e;)if(e-=1,this.processedElements[e].elem===t)return this.processedElements[e].pos;return 0},IShapeElement.prototype.addProcessedElement=function(t,e){for(var r=this.processedElements.length;r;)if(r-=1,this.processedElements[r].elem===t){this.processedElements[r].pos=e;break}0===r&&this.processedElements.push({elem:t,pos:e})},IShapeElement.prototype.buildExpressionInterface=function(){},IShapeElement.prototype.createElements=function(){this._parent.createElements.call(this),this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0),(!this.data.hd||this.data.td)&&styleUnselectableDiv(this.layerElement)},IShapeElement.prototype.setGradientData=function(t,e,r){var s,i="gr_"+randomString(10);s=1===e.t?document.createElementNS(svgNS,"linearGradient"):document.createElementNS(svgNS,"radialGradient"),s.setAttribute("id",i),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var a,n,o,h=[];for(o=4*e.g.p,n=0;o>n;n+=4)a=document.createElementNS(svgNS,"stop"),s.appendChild(a),h.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url(#"+i+")"),this.globalData.defs.appendChild(s),r.gf=s,r.cst=h},IShapeElement.prototype.setGradientOpacity=function(t,e,r){if(t.g.k.k[0].s&&t.g.k.k[0].s.length>4*t.g.p||t.g.k.k.length>4*t.g.p){var s,i,a,n,o=document.createElementNS(svgNS,"mask"),h=document.createElementNS(svgNS,"path");o.appendChild(h);var l="op_"+randomString(10),p="mk_"+randomString(10);o.setAttribute("id",p),s=1===t.t?document.createElementNS(svgNS,"linearGradient"):document.createElementNS(svgNS,"radialGradient"),s.setAttribute("id",l),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse"),n=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var m=[];for(a=4*t.g.p;n>a;a+=2)i=document.createElementNS(svgNS,"stop"),i.setAttribute("stop-color","rgb(255,255,255)"),s.appendChild(i),m.push(i);return h.setAttribute("gf"===t.ty?"fill":"stroke","url(#"+l+")"),this.globalData.defs.appendChild(s),this.globalData.defs.appendChild(o),e.of=s,e.ost=m,r.msElem=h,p}},IShapeElement.prototype.createStyleElement=function(t,e,r){var s={},i={data:t,type:t.ty,d:"",ld:"",lvl:e,mdf:!1,closed:!1},a=document.createElementNS(svgNS,"path");if(s.o=PropertyFactory.getProp(this,t.o,0,.01,r),("st"==t.ty||"gs"==t.ty)&&(a.setAttribute("stroke-linecap",this.lcEnum[t.lc]||"round"),a.setAttribute("stroke-linejoin",this.ljEnum[t.lj]||"round"),a.setAttribute("fill-opacity","0"),1==t.lj&&a.setAttribute("stroke-miterlimit",t.ml),s.w=PropertyFactory.getProp(this,t.w,0,null,r),t.d)){var n=PropertyFactory.getDashProp(this,t.d,"svg",r);n.k||(a.setAttribute("stroke-dasharray",n.dasharray),a.setAttribute("stroke-dashoffset",n.dashoffset)),s.d=n}if("fl"==t.ty||"st"==t.ty)s.c=PropertyFactory.getProp(this,t.c,1,255,r);else{s.g=PropertyFactory.getGradientProp(this,t.g,r),2==t.t&&(s.h=PropertyFactory.getProp(this,t.h,0,.01,r),s.a=PropertyFactory.getProp(this,t.a,0,degToRads,r)),s.s=PropertyFactory.getProp(this,t.s,1,null,r),s.e=PropertyFactory.getProp(this,t.e,1,null,r),this.setGradientData(a,t,s,i);var o=this.setGradientOpacity(t,s,i);o&&a.setAttribute("mask","url(#"+o+")")}return s.elem=a,2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),i.pElem=a,this.stylesList.push(i),s.style=i,s},IShapeElement.prototype.createGroupElement=function(t){var e={it:[],prevViewData:[]},r=document.createElementNS(svgNS,"g");return e.gr=r,t.ln&&e.gr.setAttribute("id",t.ln),e},IShapeElement.prototype.createTransformElement=function(t,e){var r={transform:{op:PropertyFactory.getProp(this,t.o,0,.01,e),mProps:PropertyFactory.getProp(this,t,2,null,e)},elements:[]};return r},IShapeElement.prototype.createShapeElement=function(t,e,r,s){var i={elements:[],caches:[],styles:[],transformers:e,lStr:""},a=4;return"rc"==t.ty?a=5:"el"==t.ty?a=6:"sr"==t.ty&&(a=7),i.sh=ShapePropertyFactory.getShapeProp(this,t,a,s),i.lvl=r,this.shapes.push(i.sh),this.addShapeToModifiers(i),i};var cont=0;IShapeElement.prototype.setElementStyles=function(){var t,e=this.stylesList.length,r=[];for(t=0;e>t;t+=1)this.stylesList[t].closed||r.push(this.stylesList[t]);return r},IShapeElement.prototype.reloadShapes=function(){this.firstFrame=!0;var t,e=this.itemsData.length;for(t=0;e>t;t+=1)this.prevViewData[t]=this.itemsData[t];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0);var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},IShapeElement.prototype.searchShapes=function(t,e,r,s,i,a,n,o){var h,l,p,m,f,c,d=[].concat(n),u=t.length-1,y=[],g=[];for(h=u;h>=0;h-=1){if(c=this.searchProcessedElement(t[h]),c?e[h]=r[c-1]:t[h]._render=o,"fl"==t[h].ty||"st"==t[h].ty||"gf"==t[h].ty||"gs"==t[h].ty)c?e[h].style.closed=!1:e[h]=this.createStyleElement(t[h],a,i),t[h]._render&&s.appendChild(e[h].elem),y.push(e[h].style);else if("gr"==t[h].ty){if(c)for(p=e[h].it.length,l=0;p>l;l+=1)e[h].prevViewData[l]=e[h].it[l];else e[h]=this.createGroupElement(t[h]);this.searchShapes(t[h].it,e[h].it,e[h].prevViewData,e[h].gr,i,a+1,d,o),t[h]._render&&s.appendChild(e[h].gr)}else"tr"==t[h].ty?(c||(e[h]=this.createTransformElement(t[h],i)),m=e[h].transform,d.push(m)):"sh"==t[h].ty||"rc"==t[h].ty||"el"==t[h].ty||"sr"==t[h].ty?(c||(e[h]=this.createShapeElement(t[h],d,a,i)),e[h].elements=this.setElementStyles()):"tm"==t[h].ty||"rd"==t[h].ty||"ms"==t[h].ty?(c?(f=e[h],f.closed=!1):(f=ShapeModifiers.getModifier(t[h].ty),f.init(this,t[h],i),e[h]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"==t[h].ty&&(c?(f=e[h],f.closed=!0):(f=ShapeModifiers.getModifier(t[h].ty),e[h]=f,f.init(this,t,h,e,i),this.shapeModifiers.push(f),o=!1),g.push(f));this.addProcessedElement(t[h],h+1)}for(u=y.length,h=0;u>h;h+=1)y[h].closed=!0;for(u=g.length,h=0;u>h;h+=1)g[h].closed=!0},IShapeElement.prototype.addShapeToModifiers=function(t){var e,r=this.shapeModifiers.length;for(e=0;r>e;e+=1)this.shapeModifiers[e].addShape(t)},IShapeElement.prototype.renderModifiers=function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;e>t;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes(this.firstFrame)}},IShapeElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden&&(this.layerElement.style.display="block",this.hidden=!1),this.renderModifiers();var r,s=this.stylesList.length;for(r=0;s>r;r+=1)this.stylesList[r].d="",this.stylesList[r].mdf=!1;for(this.renderShape(this.shapesData,this.itemsData,null),r=0;s>r;r+=1)"0"===this.stylesList[r].ld&&(this.stylesList[r].ld="1",this.stylesList[r].pElem.style.display="block"),(this.stylesList[r].mdf||this.firstFrame)&&(this.stylesList[r].pElem.setAttribute("d",this.stylesList[r].d),this.stylesList[r].msElem&&this.stylesList[r].msElem.setAttribute("d",this.stylesList[r].d));this.firstFrame&&(this.firstFrame=!1)},IShapeElement.prototype.hide=function(){if(!this.hidden){this.layerElement.style.display="none";var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pElem.style.display="none",this.stylesList[t].pElem.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pElem.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,r){var s,i,a=t.length-1;for(s=a;s>=0;s-=1)i=t[s].ty,"tr"==i?((this.firstFrame||e[s].transform.op.mdf&&r)&&r.setAttribute("opacity",e[s].transform.op.v),(this.firstFrame||e[s].transform.mProps.mdf&&r)&&r.setAttribute("transform",e[s].transform.mProps.v.to2dCSS())):"sh"==i||"el"==i||"rc"==i||"sr"==i?this.renderPath(t[s],e[s]):"fl"==i?this.renderFill(t[s],e[s]):"gf"==i?this.renderGradient(t[s],e[s]):"gs"==i?(this.renderGradient(t[s],e[s]),this.renderStroke(t[s],e[s])):"st"==i?this.renderStroke(t[s],e[s]):"gr"==i&&this.renderShape(t[s].it,e[s].it,e[s].gr)},IShapeElement.prototype.buildShapeString=function(t,e,r,s){var i,a="";for(i=1;e>i;i+=1)1===i&&(a+=" M"+s.applyToPointStringified(t.v[0][0],t.v[0][1])),a+=" C"+s.applyToPointStringified(t.o[i-1][0],t.o[i-1][1])+" "+s.applyToPointStringified(t.i[i][0],t.i[i][1])+" "+s.applyToPointStringified(t.v[i][0],t.v[i][1]);return 1===e&&(a+=" M"+s.applyToPointStringified(t.v[0][0],t.v[0][1])),r&&e&&(a+=" C"+s.applyToPointStringified(t.o[i-1][0],t.o[i-1][1])+" "+s.applyToPointStringified(t.i[0][0],t.i[0][1])+" "+s.applyToPointStringified(t.v[0][0],t.v[0][1]),a+="z"),a},IShapeElement.prototype.renderPath=function(t,e){var r,s,i,a,n,o,h=e.elements.length,l=e.lvl;if(t._render)for(o=0;h>o;o+=1)if(e.elements[o].data._render){a=e.sh.mdf||this.firstFrame,i="M0 0";var p=e.sh.paths;if(s=p._length,e.elements[o].lvl<l){for(var m,f=this.mHelper.reset(),c=l-e.elements[o].lvl,d=e.transformers.length-1;c>0;)a=e.transformers[d].mProps.mdf||a,m=e.transformers[d].mProps.v.props,f.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),c--,d--;if(a){for(r=0;s>r;r+=1)n=p.shapes[r],n&&n._length&&(i+=this.buildShapeString(n,n._length,n.c,f));e.caches[o]=i}else i=e.caches[o]}else if(a){for(r=0;s>r;r+=1)n=p.shapes[r],n&&n._length&&(i+=this.buildShapeString(n,n._length,n.c,this.identityMatrix));e.caches[o]=i}else i=e.caches[o];e.elements[o].d+=i,e.elements[o].mdf=a||e.elements[o].mdf}else e.elements[o].mdf=!0},IShapeElement.prototype.renderFill=function(t,e){var r=e.style;(e.c.mdf||this.firstFrame)&&r.pElem.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||this.firstFrame)&&r.pElem.setAttribute("fill-opacity",e.o.v)},IShapeElement.prototype.renderGradient=function(t,e){var r=e.gf,s=e.of,i=e.s.v,a=e.e.v;if(e.o.mdf||this.firstFrame){var n="gf"===t.ty?"fill-opacity":"stroke-opacity";e.elem.setAttribute(n,e.o.v)}if(e.s.mdf||this.firstFrame){var o=1===t.t?"x1":"cx",h="x1"===o?"y1":"cy";r.setAttribute(o,i[0]),r.setAttribute(h,i[1]),s&&(s.setAttribute(o,i[0]),s.setAttribute(h,i[1]))}var l,p,m,f;if(e.g.cmdf||this.firstFrame){l=e.cst;var c=e.g.c;for(m=l.length,p=0;m>p;p+=1)f=l[p],f.setAttribute("offset",c[4*p]+"%"),f.setAttribute("stop-color","rgb("+c[4*p+1]+","+c[4*p+2]+","+c[4*p+3]+")")}if(s&&(e.g.omdf||this.firstFrame)){l=e.ost;var d=e.g.o;for(m=l.length,p=0;m>p;p+=1)f=l[p],f.setAttribute("offset",d[2*p]+"%"),f.setAttribute("stop-opacity",d[2*p+1])}if(1===t.t)(e.e.mdf||this.firstFrame)&&(r.setAttribute("x2",a[0]),r.setAttribute("y2",a[1]),s&&(s.setAttribute("x2",a[0]),s.setAttribute("y2",a[1])));else{var u;if((e.s.mdf||e.e.mdf||this.firstFrame)&&(u=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)),r.setAttribute("r",u),s&&s.setAttribute("r",u)),e.e.mdf||e.h.mdf||e.a.mdf||this.firstFrame){u||(u=Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)));var y=Math.atan2(a[1]-i[1],a[0]-i[0]),g=e.h.v>=1?.99:e.h.v<=-1?-.99:e.h.v,v=u*g,b=Math.cos(y+e.a.v)*v+i[0],E=Math.sin(y+e.a.v)*v+i[1];r.setAttribute("fx",b),r.setAttribute("fy",E),s&&(s.setAttribute("fx",b),s.setAttribute("fy",E))}}},IShapeElement.prototype.renderStroke=function(t,e){var r=e.style,s=e.d;s&&s.k&&(s.mdf||this.firstFrame)&&(r.pElem.setAttribute("stroke-dasharray",s.dasharray),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset)),e.c&&(e.c.mdf||this.firstFrame)&&r.pElem.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||this.firstFrame)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w.mdf||this.firstFrame)&&(r.pElem.setAttribute("stroke-width",e.w.v),
r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))},IShapeElement.prototype.destroy=function(){this._parent.destroy.call(this._parent),this.shapeData=null,this.itemsData=null,this.parentContainer=null,this.placeholder=null},ITextElement.prototype.init=function(){this._frameId=-1,this.lettersChangedFlag=!0,this.currentTextDocumentData=this.data.t.d.k[0].s,this.dynamicProperties=this.dynamicProperties||[],this.textAnimator=new TextAnimatorProperty(this.data.t,this.renderType,this),this._parent.init.call(this),this.textAnimator.searchProperties(this.dynamicProperties),this.buildNewText()},ITextElement.prototype.prepareFrame=function(t){if(this._frameId!==this.globalData.frameId){this._frameId=this.globalData.frameId;for(var e=this.data.t.d.k,r=0,s=e.length;s>r&&(textDocumentData=e[r].s,r+=1,!(r===s||e[r].t>t)););this.lettersChangedFlag=!1,textDocumentData!==this.currentTextDocumentData&&(this.currentTextDocumentData=textDocumentData,this.lettersChangedFlag=!0,this.buildNewText()),this._parent.prepareFrame.call(this,t)}},ITextElement.prototype.createPathShape=function(t,e){var r,s,i=e.length,a="";for(r=0;i>r;r+=1)s=e[r].ks.k,a+=this.buildShapeString(s,s.i.length,!0,t);return a},ITextElement.prototype.buildShapeString=IShapeElement.prototype.buildShapeString,ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.createPathShape=ITextElement.prototype.createPathShape,SVGTextElement.prototype.prepareFrame=ITextElement.prototype.prepareFrame,SVGTextElement.prototype.buildShapeString=ITextElement.prototype.buildShapeString,SVGTextElement.prototype.createElements=function(){this._parent.createElements.call(this),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)},SVGTextElement.prototype.buildNewText=function(){var t,e,r=this.currentTextDocumentData;this.renderedLetters=Array.apply(null,{length:this.currentTextDocumentData.l?this.currentTextDocumentData.l.length:0}),r.fc?this.layerElement.setAttribute("fill","rgb("+Math.round(255*r.fc[0])+","+Math.round(255*r.fc[1])+","+Math.round(255*r.fc[2])+")"):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke","rgb("+Math.round(255*r.sc[0])+","+Math.round(255*r.sc[1])+","+Math.round(255*r.sc[2])+")"),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.s);var s=this.globalData.fontManager.getFontByName(r.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var i=r.fWeight,a=r.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",i)}var n=r.l||[];if(e=n.length){var o,h,l=this.mHelper,p="",m=this.data.singleShape;if(m)var f=0,c=0,d=r.lineWidths,u=r.boxWidth,y=!0,g=r.tr/1e3*r.s;var v=0;for(t=0;e>t;t+=1){if(this.globalData.fontManager.chars?m&&0!==t||(o=this.textSpans[v]?this.textSpans[v]:document.createElementNS(svgNS,"path")):o=this.textSpans[v]?this.textSpans[v]:document.createElementNS(svgNS,"text"),o.style.display="inherit",o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),m&&n[t].n&&(f=-g,c+=r.yOffset,c+=y?1:0,y=!1),l.reset(),this.globalData.fontManager.chars&&l.scale(r.s/100,r.s/100),m){switch(r.ps&&l.translate(r.ps[0],r.ps[1]+r.ascent,0),l.translate(0,-r.ls,0),r.j){case 1:l.translate(r.justifyOffset+(u-d[n[t].line]),0,0);break;case 2:l.translate(r.justifyOffset+(u-d[n[t].line])/2,0,0)}l.translate(f,c,0)}if(this.globalData.fontManager.chars){var b,E=this.globalData.fontManager.getCharData(r.t.charAt(t),s.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);b=E?E.data:null,b&&b.shapes&&(h=b.shapes[0].it,m||(p=""),p+=this.createPathShape(l,h),m||o.setAttribute("d",p)),m||this.layerElement.appendChild(o)}else o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.layerElement.appendChild(o),m&&o.setAttribute("transform",l.to2dCSS());m&&(f+=n[t].l||0,f+=g),this.textSpans[v]=o,v+=1}if(!m)for(;v<this.textSpans.length;)this.textSpans[v].style.display="none",v+=1;m&&this.globalData.fontManager.chars&&(o.setAttribute("d",p),this.layerElement.appendChild(o)),this._sizeChanged=!0}},SVGTextElement.prototype.sourceRectAtTime=function(t){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderLetters(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextElement.prototype.renderLetters=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.currentTextDocumentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,r=this.textAnimator.renderedLetters,s=this.currentTextDocumentData.l;e=s.length;var i;for(t=0;e>t;t+=1)s[t].n||(i=r[t],i.mdf.m&&this.textSpans[t].setAttribute("transform",i.m),i.mdf.o&&this.textSpans[t].setAttribute("opacity",i.o),i.mdf.sw&&this.textSpans[t].setAttribute("stroke-width",i.sw),i.mdf.sc&&this.textSpans[t].setAttribute("stroke",i.sc),i.mdf.fc&&this.textSpans[t].setAttribute("fill",i.fc))}},SVGTextElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&this.show(),this.firstFrame&&(this.firstFrame=!1),void this.renderLetters())},SVGTextElement.prototype.destroy=function(){this._parent.destroy.call(this._parent)},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager.mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+s+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager.mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,s,i=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(s=this.elem.maskManager.masksProperties.length,r=0):(r=this.filterManager.effectElements[0].p.v-1,s=r+1),e=document.createElementNS(svgNS,"g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),r;s>r;r+=1)t=document.createElementNS(svgNS,"path"),e.appendChild(t),this.paths.push({p:t,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=document.createElementNS(svgNS,"mask"),n="stms_"+randomString(10);a.setAttribute("id",n),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var o=document.createElementNS(svgNS,"g");o.setAttribute("mask","url("+locationHref+"#"+n+")"),i[0]&&o.appendChild(i[0]),this.elem.layerElement.appendChild(o),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(var i=this.elem.layerElement.children||this.elem.layerElement.childNodes;i.length;)this.elem.layerElement.removeChild(i[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,r,s,i=this.paths.length;for(e=0;i>e;e+=1)if(r=this.elem.maskManager.viewData[this.paths[e].m],s=this.paths[e].p,(t||this.filterManager.mdf||r.prop.mdf)&&s.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p.mdf||this.filterManager.effectElements[4].p.mdf||this.filterManager.effectElements[7].p.mdf||this.filterManager.effectElements[8].p.mdf||r.prop.mdf){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var n=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,o=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100,h=s.getTotalLength();a="0 0 0 "+h*n+" ";var l,p=h*(o-n),m=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100,f=Math.floor(p/m);for(l=0;f>l;l+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100+" ";a+="0 "+10*h+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v/100;s.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p.mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p.mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p.mdf)){var c=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bm_floor(255*c[0])+","+bm_floor(255*c[1])+","+bm_floor(255*c[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager.mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,i=s[0]+" "+r[0]+" "+e[0],a=s[1]+" "+r[1]+" "+e[1],n=s[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",i),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",n)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=document.createElementNS(svgNS,t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,s,i){for(var a,n,o=0,h=256,l=Math.min(t,e),p=Math.max(t,e),m=Array.call(null,{length:h}),f=0,c=i-s,d=e-t;256>=o;)a=o/256,n=l>=a?0>d?i:s:a>=p?0>d?s:i:s+c*Math.pow((a-t)/d,1/r),m[f++]=n,o+=256/(h-1);return m.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager.mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[2].p.mdf||r[3].p.mdf||r[4].p.mdf||r[5].p.mdf||r[6].p.mdf)&&(e=this.getTableValue(r[2].p.v,r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[9].p.mdf||r[10].p.mdf||r[11].p.mdf||r[12].p.mdf||r[13].p.mdf)&&(e=this.getTableValue(r[9].p.v,r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[16].p.mdf||r[17].p.mdf||r[18].p.mdf||r[19].p.mdf||r[20].p.mdf)&&(e=this.getTableValue(r[16].p.v,r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[23].p.mdf||r[24].p.mdf||r[25].p.mdf||r[26].p.mdf||r[27].p.mdf)&&(e=this.getTableValue(r[23].p.v,r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[30].p.mdf||r[31].p.mdf||r[32].p.mdf||r[33].p.mdf||r[34].p.mdf)&&(e=this.getTableValue(r[30].p.v,r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager.mdf){if((t||this.filterManager.effectElements[4].p.mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p.mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p.mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p.mdf||this.filterManager.effectElements[3].p.mdf){var r=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=r*Math.cos(s),a=r*Math.sin(s);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",a)}}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){var r=document.createElementNS(svgNS,"mask");r.setAttribute("id",e.layerId),r.setAttribute("mask-type","alpha"),r.appendChild(e.layerElement),t.setMatte(e.layerId),e.data.hd=!1;var s=t.globalData.defs;s.appendChild(r)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=0,r=this.elem.comp.elements.length;r>e;)this.elem.comp.elements[e].data.ind===t&&this.setElementAsMask(this.elem,this.elem.comp.elements[e]),e+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;r>e;e+=1)this.filters[e].renderFrame(t)},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.hide=function(){if(!this.hidden){this._parent.hide.call(this);var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t]&&this.elements[t].hide()}},ICompElement.prototype.prepareFrame=function(t){if(this._parent.prepareFrame.call(this,t),this.isVisible!==!1||this.data.xt){if(this.tm){var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}else this.renderedFrame=t/this.data.sr;var r,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=0;s>r;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st)}},ICompElement.prototype.renderFrame=function(t){var e,r=this._parent.renderFrame.call(this,t),s=this.layers.length;if(r===!1)return void this.hide();for(this.hidden&&this.show(),e=0;s>e;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this._parent.destroy.call(this._parent);var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.checkLayers=SVGRenderer.prototype.checkLayers,ICompElement.prototype.buildItem=SVGRenderer.prototype.buildItem,ICompElement.prototype.buildAllItems=SVGRenderer.prototype.buildAllItems,ICompElement.prototype.buildElementParenting=SVGRenderer.prototype.buildElementParenting,ICompElement.prototype.createItem=SVGRenderer.prototype.createItem,ICompElement.prototype.createImage=SVGRenderer.prototype.createImage,ICompElement.prototype.createComp=SVGRenderer.prototype.createComp,ICompElement.prototype.createSolid=SVGRenderer.prototype.createSolid,ICompElement.prototype.createShape=SVGRenderer.prototype.createShape,ICompElement.prototype.createText=SVGRenderer.prototype.createText,ICompElement.prototype.createBase=SVGRenderer.prototype.createBase,ICompElement.prototype.appendElementInPos=SVGRenderer.prototype.appendElementInPos,ICompElement.prototype.checkPendingElements=SVGRenderer.prototype.checkPendingElements,ICompElement.prototype.addPendingElement=SVGRenderer.prototype.addPendingElement,createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this.globalData.getAssetsPath(this.assetData);this._parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio","xMidYMid slice"),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.maskedElement=this.innerElem,this.layerElement.appendChild(this.innerElem),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)},IImageElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&this.show(),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this._parent.destroy.call(this._parent),this.innerElem=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this._parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t),this.innerElem=t,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)},ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy;var animationManager=function(){function t(t){for(var e=0,r=t.target;C>e;)S[e].animation===r&&(S.splice(e,1),e-=1,C-=1,r.isPaused||s()),e+=1}function e(t,e){if(!t)return null;for(var r=0;C>r;){if(S[r].elem==t&&null!==S[r].elem)return S[r].animation;r+=1}var s=new AnimationItem;return i(s,t),s.setData(t,e),s}function r(){A+=1,E()}function s(){A-=1,0===A&&(k=!0)}function i(e,i){e.addEventListener("destroy",t),e.addEventListener("_active",r),e.addEventListener("_idle",s),S.push({elem:i,animation:e}),C+=1}function a(t){var e=new AnimationItem;return i(e,null),e.setParams(t),e}function n(t,e){var r;for(r=0;C>r;r+=1)S[r].animation.setSpeed(t,e)}function o(t,e){var r;for(r=0;C>r;r+=1)S[r].animation.setDirection(t,e)}function h(t){var e;for(e=0;C>e;e+=1)S[e].animation.play(t)}function l(t,e){x=Date.now();var r;for(r=0;C>r;r+=1)S[r].animation.moveFrame(t,e)}function p(t){var e,r=t-x;for(e=0;C>e;e+=1)S[e].animation.advanceTime(r);x=t,k||requestAnimationFrame(p)}function m(t){x=t,requestAnimationFrame(p)}function f(t){var e;for(e=0;C>e;e+=1)S[e].animation.pause(t)}function c(t,e,r){var s;for(s=0;C>s;s+=1)S[s].animation.goToAndStop(t,e,r)}function d(t){var e;for(e=0;C>e;e+=1)S[e].animation.stop(t)}function u(t){var e;for(e=0;C>e;e+=1)S[e].animation.togglePause(t)}function y(t){var e;for(e=C-1;e>=0;e-=1)S[e].animation.destroy(t)}function g(t,r,s){var i,a=document.getElementsByClassName("bodymovin"),n=a.length;for(i=0;n>i;i+=1)s&&a[i].setAttribute("data-bm-type",s),e(a[i],t);if(r&&0===n){s||(s="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),o.appendChild(h),e(h,t)}}function v(){var t;for(t=0;C>t;t+=1)S[t].animation.resize()}function b(){requestAnimationFrame(m)}function E(){k&&(k=!1,requestAnimationFrame(m))}var P={},S=[],x=0,C=0,k=!0,A=0;return setTimeout(b,0),P.registerAnimation=e,P.loadAnimation=a,P.setSpeed=n,P.setDirection=o,P.play=h,P.moveFrame=l,P.pause=f,P.stop=d,P.togglePause=u,P.searchAnimations=g,P.resize=v,P.start=b,P.goToAndStop=c,P.destroy=y,P}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.scaleMode="fit",this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.subframeEnabled=subframeEnabled,this.segments=[],this.pendingSegment=!1,this._idle=!0,this.projectInterface=ProjectInterface()};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var r=t.animType?t.animType:t.renderer?t.renderer:"svg";switch(r){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;case"hybrid":case"html":default:this.renderer=new HybridRenderer(this,t.rendererSettings)}if(this.renderer.setProjectInterface(this.projectInterface),this.animType=r,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,this.autoloadSegments=t.hasOwnProperty("autoloadSegments")?t.autoloadSegments:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var s=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.assetsPath=t.assetsPath,this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),s.open("GET",t.path,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)e.configAnimation(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);e.configAnimation(t)}catch(r){}}}},AnimationItem.prototype.setData=function(t,e){var r={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},s=t.attributes;r.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",r.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:"canvas";var i=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";""===i||(r.loop="false"===i?!1:"true"===i?!0:parseInt(i));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:s.getNamedItem("bm-autoplay")?s.getNamedItem("bm-autoplay").value:!0;r.autoplay="false"!==a,r.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var n=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";"false"===n&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,r,s=this.animationData.layers,i=s.length,a=t.layers,n=a.length;for(r=0;n>r;r+=1)for(e=0;i>e;){if(s[e].id==a[r].id){s[e]=a[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(i=t.assets.length,e=0;i>e;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=new XMLHttpRequest,s=this,i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,r.open("GET",i,!0),r.send(),r.onreadystatechange=function(){if(4==r.readyState)if(200==r.status)s.includeLayers(JSON.parse(r.responseText));else try{var t=JSON.parse(r.responseText);s.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.renderer&&this.renderer.destroyed||(this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.renderer.searchExtraCompositions(t.assets),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.imagePreloader=new ImagePreloader,this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(t.assets),this.loadSegments(),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()))},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.addPendingElement=function(){this.pendingElements+=1},AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.subframeEnabled=t?!0:!1},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.subframeEnabled?this.currentRawFrame:Math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,this.pendingSegment||(this._idle=!0,this.trigger("_idle")))},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.pause(),this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,r){r&&this.name!=r||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.pause())},AnimationItem.prototype.goToAndPlay=function(t,e,r){this.goToAndStop(t,e,r),this.play()},AnimationItem.prototype.advanceTime=function(t){return this.pendingSegment?(this.pendingSegment=!1,this.adjustSegment(this.segments.shift()),void(this.isPaused&&this.play())):void(this.isPaused!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier))},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.01)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(0)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t-.01)),this.firstFrame=t,this.totalFrames=e-t,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var r,s=t.length;for(r=0;s>r;r+=1)this.segments.push(t[r])}else this.segments.push(t);e&&this.adjustSegment(this.segments.shift()),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.checkSegments=function(){this.segments.length&&(this.pendingSegment=!0)},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=this.onLoopComplete=this.onComplete=this.onSegmentStart=this.onDestroy=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){if(this.currentRawFrame=t,this.currentRawFrame>=this.totalFrames){if(this.checkSegments(),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop||this.pendingSegment)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");this.currentRawFrame=this.currentRawFrame%this.totalFrames}else if(this.currentRawFrame<0)return this.checkSegments(),this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1||this.pendingSegment?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=(this.totalFrames+this.currentRawFrame)%this.totalFrames,void this.gotoFrame());this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(this.assetsPath){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;r>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":
this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,extendPrototype(BaseRenderer,CanvasRenderer),CanvasRenderer.prototype.createBase=function(t){return new CVBaseElement(t,this,this.globalData)},CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this,this.globalData)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this,this.globalData)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this,this.globalData)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this,this.globalData)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13]);this.transformMat.cloneFromProps(t),this.transformMat.transform(this.contextData.cTr.props[0],this.contextData.cTr.props[1],this.contextData.cTr.props[2],this.contextData.cTr.props[3],this.contextData.cTr.props[4],this.contextData.cTr.props[5],this.contextData.cTr.props[6],this.contextData.cTr.props[7],this.contextData.cTr.props[8],this.contextData.cTr.props[9],this.contextData.cTr.props[10],this.contextData.cTr.props[11],this.contextData.cTr.props[12],this.contextData.cTr.props[13],this.contextData.cTr.props[14],this.contextData.cTr.props[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[4],e[5],e[12],e[13])}},CanvasRenderer.prototype.ctxOpacity=function(t){if(1!==t){if(!this.renderConfig.clearCanvas)return void(this.canvasContext.globalAlpha*=0>t?0:t);this.contextData.cO*=0>t?0:t,this.canvasContext.globalAlpha=this.contextData.cO}},CanvasRenderer.prototype.reset=function(){return this.renderConfig.clearCanvas?(this.contextData.cArrPos=0,this.contextData.cTr.reset(),void(this.contextData.cO=1)):void this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.save();t&&this.canvasContext.save();var e=this.contextData.cTr.props;(null===this.contextData.saved[this.contextData.cArrPos]||void 0===this.contextData.saved[this.contextData.cArrPos])&&(this.contextData.saved[this.contextData.cArrPos]=new Array(16));var r,s=this.contextData.saved[this.contextData.cArrPos];for(r=0;16>r;r+=1)s[r]=e[r];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1},CanvasRenderer.prototype.restore=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.restore();t&&this.canvasContext.restore(),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],s=this.contextData.cTr.props;for(e=0;16>e;e+=1)s[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.canvasContext.globalAlpha=r},CanvasRenderer.prototype.configAnimation=function(t){this.animationItem.wrapper?(this.animationItem.container=document.createElement("canvas"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className)):this.canvasContext=this.renderConfig.context,this.data=t,this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.totalFrames=Math.floor(t.tf),this.globalData.compWidth=t.w,this.globalData.compHeight=t.h,this.globalData.frameRate=t.fr,this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document.body),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.addPendingElement=this.animationItem.addPendingElement.bind(this.animationItem),this.globalData.transformCanvas=this.transformCanvas,this.elements=Array.apply(null,{length:t.layers.length}),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){var t,e;this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr);var r,s;if(-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var i=this.renderConfig.preserveAspectRatio.split(" "),a=i[1]||"meet",n=i[0]||"xMidYMid",o=n.substr(0,4),h=n.substr(4);r=t/e,s=this.transformCanvas.w/this.transformCanvas.h,s>r&&"meet"===a||r>s&&"slice"===a?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===o&&(r>s&&"meet"===a||s>r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(r>s&&"meet"===a||s>r&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(s>r&&"meet"===a||r>s&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(s>r&&"meet"===a||r>s&&"slice"===a)?(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"==this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1];var l,p=this.elements.length;for(l=0;p>l;l+=1)this.elements[l]&&0===this.elements[l].data.ty&&this.elements[l].resize(this.globalData.transformCanvas)},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t){if(!(this.renderedFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed||null===t)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.save(),this.canvasContext.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip();var e,r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=0;r>e;e++)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);for(e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame();this.renderConfig.clearCanvas!==!0?this.restore():this.canvasContext.restore()}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!=this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions(),0===this.layers[t].ty&&r.resize(this.globalData.transformCanvas)}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},CanvasRenderer.prototype.searchExtraCompositions=function(t){{var e,r=t.length;document.createElementNS(svgNS,"g")}for(e=0;r>e;e+=1)if(t[e].xt){var s=this.createComp(t[e],this.globalData.comp,this.globalData);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype(BaseRenderer,HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var s=this.layers[e];if(s.ddd&&this.supports3d)this.addTo3dContainer(r,e);else{for(var i,a,n=0;e>n;)this.elements[n]&&this.elements[n]!==!0&&this.elements[n].getBaseElement&&(a=this.elements[n],i=this.layers[n].ddd?this.getThreeDContainerByPos(n):a.getBaseElement()),n+=1;i?s.ddd&&this.supports3d||this.layerElement.insertBefore(r,i):s.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRenderer.prototype.createBase=function(t){return new SVGBaseElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.layerElement,this.globalData,this):new IShapeElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.layerElement,this.globalData,this):new SVGTextElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.layerElement,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.layerElement,this.globalData,this):new IImageElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.layerElement,this.globalData,this):new ICompElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.layerElement,this.globalData,this):new ISolidElement(t,this.layerElement,this.globalData,this)},HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;r>e;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}},HybridRenderer.prototype.createThreeDContainer=function(t){var e=document.createElement("div");styleDiv(e),e.style.width=this.globalData.compSize.w+"px",e.style.height=this.globalData.compSize.h+"px",e.style.transformOrigin=e.style.mozTransformOrigin=e.style.webkitTransformOrigin="50% 50%";var r=document.createElement("div");styleDiv(r),r.style.transform=r.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",e.appendChild(r),this.resizerElem.appendChild(e);var s={container:r,perspectiveElem:e,startPos:t,endPos:t};return this.threeDElements.push(s),s},HybridRenderer.prototype.build3dContainers=function(){var t,e,r=this.layers.length;for(t=0;r>t;t+=1)this.layers[t].ddd?(e||(e=this.createThreeDContainer(t)),e.endPos=Math.max(e.endPos,t)):e=null},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var r=0,s=this.threeDElements.length;s>r;){if(e<=this.threeDElements[r].endPos){for(var i,a=this.threeDElements[r].startPos;e>a;)this.elements[a]&&this.elements[a].getBaseElement&&(i=this.elements[a].getBaseElement()),a+=1;i?this.threeDElements[r].container.insertBefore(t,i):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=document.createElement("div"),r=this.animationItem.wrapper;e.style.width=t.w+"px",e.style.height=t.h+"px",this.resizerElem=e,styleDiv(e),e.style.transformStyle=e.style.webkitTransformStyle=e.style.mozTransformStyle="flat",this.renderConfig.className&&r.setAttribute("class",this.renderConfig.className),r.appendChild(e),e.style.overflow="hidden";var s=document.createElementNS(svgNS,"svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var i=document.createElementNS(svgNS,"defs");s.appendChild(i),this.globalData.defs=i,this.data=t,this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,s),this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,r,s,i=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,n=i/a,o=this.globalData.compSize.w/this.globalData.compSize.h;o>n?(t=i/this.globalData.compSize.w,e=i/this.globalData.compSize.w,r=0,s=(a-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(i-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,s=0),this.resizerElem.style.transform=this.resizerElem.style.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+s+",0,1)"},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,s=this.threeDElements.length;for(t=0;s>t;t+=1)this.threeDElements[t].perspectiveElem.style.perspective=this.threeDElements[t].perspectiveElem.style.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px"}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length,s=document.createElement("div");for(e=0;r>e;e+=1)if(t[e].xt){var i=this.createComp(t[e],s,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){this.checkParenting()},CVBaseElement.prototype.checkBlendMode=function(t){if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e="";switch(this.data.bm){case 0:e="normal";break;case 1:e="multiply";break;case 2:e="screen";break;case 3:e="overlay";break;case 4:e="darken";break;case 5:e="lighten";break;case 6:e="color-dodge";break;case 7:e="color-burn";break;case 8:e="hard-light";break;case 9:e="soft-light";break;case 10:e="difference";break;case 11:e="exclusion";break;case 12:e="hue";break;case 13:e="saturation";break;case 14:e="color";break;case 15:e="luminosity"}t.canvasContext.globalCompositeOperation=e}},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.checkBlendMode(0===this.data.ty?this.parentGlobalData:this.globalData),!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,r=this.finalTransform.mat;if(this.hierarchy){var s,i=this.hierarchy.length;for(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e),s=0;i>s;s+=1)this.finalTransform.matMdf=this.hierarchy[s].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[s].finalTransform.mProp.v.props,r.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}else t?(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e)):r.cloneFromProps(this.finalTransform.mProp.v.props);return t&&(e=t.mat.props,r.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(0===this.data.ty?null:r)),this.data.hd&&(this.isVisible=!1),this.isVisible},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.ctxTransform=CanvasRenderer.prototype.ctxTransform,CVCompElement.prototype.ctxOpacity=CanvasRenderer.prototype.ctxOpacity,CVCompElement.prototype.save=CanvasRenderer.prototype.save,CVCompElement.prototype.restore=CanvasRenderer.prototype.restore,CVCompElement.prototype.reset=function(){this.contextData.cArrPos=0,this.contextData.cTr.reset(),this.contextData.cO=1},CVCompElement.prototype.resize=function(t){var e=Math.max(t.sx,t.sy);this.canvas.width=this.data.w*e,this.canvas.height=this.data.h*e,this.transformCanvas={sc:e,w:this.data.w*e,h:this.data.h*e,props:[e,0,0,0,0,e,0,0,0,0,1,0,0,0,0,1]};var r,s=this.elements.length;for(r=0;s>r;r+=1)this.elements[r]&&0===this.elements[r].data.ty&&this.elements[r].resize(t)},CVCompElement.prototype.prepareFrame=function(t){if(this.globalData.frameId=this.parentGlobalData.frameId,this.globalData.mdf=!1,this._parent.prepareFrame.call(this,t),this.isVisible!==!1||this.data.xt){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e/this.data.sr;var r,s=this.elements.length;for(this.completeLayers||this.checkLayers(t),r=0;s>r;r+=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(e/this.data.sr-this.layers[r].st),0===this.elements[r].data.ty&&this.elements[r].globalData.mdf&&(this.globalData.mdf=!0));this.globalData.mdf&&!this.data.xt&&(this.canvasContext.clearRect(0,0,this.data.w,this.data.h),this.ctxTransform(this.transformCanvas.props))}},CVCompElement.prototype.renderFrame=function(t){if(this._parent.renderFrame.call(this,t)!==!1){if(this.globalData.mdf){var e,r=this.layers.length;for(e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1),this.parentGlobalData.renderer.save(),this.parentGlobalData.renderer.ctxTransform(this.finalTransform.mat.props),this.parentGlobalData.renderer.ctxOpacity(this.finalTransform.opacity),this.parentGlobalData.renderer.canvasContext.drawImage(this.canvas,0,0,this.data.w,this.data.h),this.parentGlobalData.renderer.restore(),this.globalData.mdf&&this.reset()}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this._parent.destroy.call(this._parent)},CVCompElement.prototype.checkLayers=CanvasRenderer.prototype.checkLayers,CVCompElement.prototype.buildItem=CanvasRenderer.prototype.buildItem,CVCompElement.prototype.checkPendingElements=CanvasRenderer.prototype.checkPendingElements,CVCompElement.prototype.addPendingElement=CanvasRenderer.prototype.addPendingElement,CVCompElement.prototype.buildAllItems=CanvasRenderer.prototype.buildAllItems,CVCompElement.prototype.createItem=CanvasRenderer.prototype.createItem,CVCompElement.prototype.createImage=CanvasRenderer.prototype.createImage,CVCompElement.prototype.createComp=CanvasRenderer.prototype.createComp,CVCompElement.prototype.createSolid=CanvasRenderer.prototype.createSolid,CVCompElement.prototype.createShape=CanvasRenderer.prototype.createShape,CVCompElement.prototype.createText=CanvasRenderer.prototype.createText,CVCompElement.prototype.createBase=CanvasRenderer.prototype.createBase,CVCompElement.prototype.buildElementParenting=CanvasRenderer.prototype.buildElementParenting,createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=function(){if(this.globalData.elementLoaded(),this.assetData.w!==this.img.width||this.assetData.h!==this.img.height){var t=document.createElement("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,s=t.getContext("2d"),i=this.img.width,a=this.img.height,n=i/a,o=this.assetData.w/this.assetData.h;n>o?(r=a,e=r*o):(e=i,r=e/o),s.drawImage(this.img,(i-e)/2,(a-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}}.bind(this),e=function(){this.failed=!0,this.globalData.elementLoaded()}.bind(this);this.img=new Image,this.img.addEventListener("load",t,!1),this.img.addEventListener("error",e,!1);var r=this.globalData.getAssetsPath(this.assetData);this.img.src=r,this._parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this._parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var r=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(r),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this._parent.destroy.call(this._parent)},CVMaskElement.prototype.prepareFrame=function(t){var e,r=this.dynamicProperties.length;for(e=0;r>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.element.globalData.mdf=!0)},CVMaskElement.prototype.renderFrame=function(t){var e,r,s,i,a,n=this.element.canvasContext,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.element.globalData.compWidth,0),n.lineTo(this.element.globalData.compWidth,this.element.globalData.compHeight),n.lineTo(0,this.element.globalData.compHeight),n.lineTo(0,0)),a=this.viewData[e].v,r=t?t.applyToPointArray(a.v[0][0],a.v[0][1],0):a.v[0],n.moveTo(r[0],r[1]);var l,p=a._length;for(l=1;p>l;l++)r=t?t.applyToPointArray(a.o[l-1][0],a.o[l-1][1],0):a.o[l-1],s=t?t.applyToPointArray(a.i[l][0],a.i[l][1],0):a.i[l],i=t?t.applyToPointArray(a.v[l][0],a.v[l][1],0):a.v[l],n.bezierCurveTo(r[0],r[1],s[0],s[1],i[0],i[1]);r=t?t.applyToPointArray(a.o[l-1][0],a.o[l-1][1],0):a.o[l-1],s=t?t.applyToPointArray(a.i[0][0],a.i[0][1],0):a.i[0],i=t?t.applyToPointArray(a.v[0][0],a.v[0][1],0):a.v[0],n.bezierCurveTo(r[0],r[1],s[0],s[1],i[0],i[1])}h&&n.clip()},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this._parent.createElements.call(this),this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties,!0)},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,elements:[]},s={};if(("fl"==t.ty||"st"==t.ty)&&(s.c=PropertyFactory.getProp(this,t.c,1,255,e),s.c.k||(r.co="rgb("+bm_floor(s.c.v[0])+","+bm_floor(s.c.v[1])+","+bm_floor(s.c.v[2])+")")),s.o=PropertyFactory.getProp(this,t.o,0,.01,e),"st"==t.ty){if(r.lc=this.lcEnum[t.lc]||"round",r.lj=this.ljEnum[t.lj]||"round",1==t.lj&&(r.ml=t.ml),s.w=PropertyFactory.getProp(this,t.w,0,null,e),s.w.k||(r.wi=s.w.v),t.d){var i=PropertyFactory.getDashProp(this,t.d,"canvas",e);s.d=i,s.d.k||(r.da=s.d.dasharray,r["do"]=s.d.dashoffset)}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),s.style=r,s},CVShapeElement.prototype.createGroupElement=function(t){var e={it:[],prevViewData:[]};return e},CVShapeElement.prototype.createTransformElement=function(t,e){var r={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t.o,0,.01,e),mProps:PropertyFactory.getProp(this,t,2,null,e)},elements:[]};return r},CVShapeElement.prototype.createShapeElement=function(t,e){var r={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]},s=4;"rc"==t.ty?s=5:"el"==t.ty?s=6:"sr"==t.ty&&(s=7),r.sh=ShapePropertyFactory.getShapeProp(this,t,s,e),this.shapes.push(r.sh),this.addShapeToModifiers(r),jLen=this.stylesList.length;var i=!1,a=!1;for(j=0;j<jLen;j+=1)this.stylesList[j].closed||(this.stylesList[j].elements.push(r),"st"===this.stylesList[j].type?i=!0:a=!0);return r.st=i,r.fl=a,r},CVShapeElement.prototype.reloadShapes=function(){this.firstFrame=!0;var t,e=this.itemsData.length;for(t=0;e>t;t+=1)this.prevViewData[t]=this.itemsData[t];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.dynamicProperties,!0);var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},CVShapeElement.prototype.searchShapes=function(t,e,r,s,i){var a,n,o,h,l=t.length-1,p=[],m=[];for(a=l;a>=0;a-=1){if(h=this.searchProcessedElement(t[a]),h?e[a]=r[h-1]:t[a]._render=i,"fl"==t[a].ty||"st"==t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],s),p.push(e[a].style);else if("gr"==t[a].ty){if(h)for(o=e[a].it.length,n=0;o>n;n+=1)e[a].prevViewData[n]=e[a].it[n];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,s,i)}else if("tr"==t[a].ty)h||(e[a]=this.createTransformElement(t[a],s));else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty||"sr"==t[a].ty)h||(e[a]=this.createShapeElement(t[a],s));else if("tm"==t[a].ty||"rd"==t[a].ty){if(h)f=e[a],f.closed=!1;else{var f=ShapeModifiers.getModifier(t[a].ty);f.init(this,t[a],s),e[a]=f,this.shapeModifiers.push(f)}m.push(f)}else"rp"==t[a].ty&&(h?(f=e[a],f.closed=!0):(f=ShapeModifiers.getModifier(t[a].ty),e[a]=f,f.init(this,t,a,e,s),this.shapeModifiers.push(f),i=!1),m.push(f));this.addProcessedElement(t[a],a+1)}for(l=p.length,a=0;l>a;a+=1)p[a].closed=!0;for(l=m.length,a=0;l>a;a+=1)m[a].closed=!0},CVShapeElement.prototype.addShapeToModifiers=IShapeElement.prototype.addShapeToModifiers,CVShapeElement.prototype.renderModifiers=IShapeElement.prototype.renderModifiers,CVShapeElement.prototype.lcEnum=IShapeElement.prototype.lcEnum,CVShapeElement.prototype.ljEnum=IShapeElement.prototype.ljEnum,CVShapeElement.prototype.searchProcessedElement=IShapeElement.prototype.searchProcessedElement,CVShapeElement.prototype.addProcessedElement=IShapeElement.prototype.addProcessedElement,CVShapeElement.prototype.renderFrame=function(t){this._parent.renderFrame.call(this,t)!==!1&&(this.transformHelper.mat.reset(),this.transformHelper.opacity=this.finalTransform.opacity,this.transformHelper.matMdf=!1,this.transformHelper.opMdf=this.finalTransform.opMdf,this.renderModifiers(),this.renderShape(this.transformHelper,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,r,s){var i,a;if(!e)for(e=this.shapesData,a=this.stylesList.length,i=0;a>i;i+=1)this.stylesList[i].d="",this.stylesList[i].mdf=!1;r||(r=this.itemsData),a=e.length-1;var n,o;for(n=t,i=a;i>=0;i-=1)if("tr"==e[i].ty){n=r[i].transform;var h=r[i].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.cloneFromProps(h),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=r[i].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])}else n.opacity=n.op.o}else"sh"==e[i].ty||"el"==e[i].ty||"rc"==e[i].ty||"sr"==e[i].ty?this.renderPath(e[i],r[i],n):"fl"==e[i].ty?this.renderFill(e[i],r[i],n):"st"==e[i].ty?this.renderStroke(e[i],r[i],n):"gr"==e[i].ty?this.renderShape(n,e[i].it,r[i].it):"tm"==e[i].ty;if(s){a=this.stylesList.length;var p,m,f,c,d,u,y,g=this.globalData.renderer,v=this.globalData.canvasContext;for(g.save(),g.ctxTransform(this.finalTransform.mat.props),i=0;a>i;i+=1)if(y=this.stylesList[i].type,("st"!==y||0!==this.stylesList[i].wi)&&this.stylesList[i].data._render){for(g.save(),d=this.stylesList[i].elements,"st"===y?(v.strokeStyle=this.stylesList[i].co,v.lineWidth=this.stylesList[i].wi,v.lineCap=this.stylesList[i].lc,v.lineJoin=this.stylesList[i].lj,v.miterLimit=this.stylesList[i].ml||0):v.fillStyle=this.stylesList[i].co,g.ctxOpacity(this.stylesList[i].coOp),"st"!==y&&v.beginPath(),m=d.length,p=0;m>p;p+=1){for("st"===y&&(v.beginPath(),this.stylesList[i].da?(v.setLineDash(this.stylesList[i].da),v.lineDashOffset=this.stylesList[i]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(v.setLineDash(this.dashResetter),this.globalData.isDashed=!1)),u=d[p].trNodes,c=u.length,f=0;c>f;f+=1)"m"==u[f].t?v.moveTo(u[f].p[0],u[f].p[1]):"c"==u[f].t?v.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]):v.closePath();"st"===y&&v.stroke()}"st"!==y&&v.fill(this.stylesList[i].r),g.restore();

}g.restore(),this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,r){var s,i,a,n,o=r.matMdf||e.sh.mdf||this.firstFrame;if(o){var h=e.sh.paths;n=h._length;var l=e.trNodes;for(l.length=0,a=0;n>a;a+=1){var p=h.shapes[a];if(p&&p.v){for(s=p._length,i=1;s>i;i+=1)1==i&&l.push({t:"m",p:r.mat.applyToPointArray(p.v[0][0],p.v[0][1],0)}),l.push({t:"c",p1:r.mat.applyToPointArray(p.o[i-1][0],p.o[i-1][1],0),p2:r.mat.applyToPointArray(p.i[i][0],p.i[i][1],0),p3:r.mat.applyToPointArray(p.v[i][0],p.v[i][1],0)});1==s&&l.push({t:"m",p:r.mat.applyToPointArray(p.v[0][0],p.v[0][1],0)}),p.c&&s&&(l.push({t:"c",p1:r.mat.applyToPointArray(p.o[i-1][0],p.o[i-1][1],0),p2:r.mat.applyToPointArray(p.i[0][0],p.i[0][1],0),p3:r.mat.applyToPointArray(p.v[0][0],p.v[0][1],0)}),l.push({t:"z"})),e.lStr=l}}if(e.st)for(i=0;16>i;i+=1)e.tr[i]=r.mat.props[i];e.trNodes=l}},CVShapeElement.prototype.renderFill=function(t,e,r){var s=e.style;(e.c.mdf||this.firstFrame)&&(s.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||r.opMdf||this.firstFrame)&&(s.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,r){var s=e.style,i=e.d;i&&(i.mdf||this.firstFrame)&&(s.da=i.dasharray,s["do"]=i.dashoffset),(e.c.mdf||this.firstFrame)&&(s.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||r.opMdf||this.firstFrame)&&(s.coOp=e.o.v*r.opacity),(e.w.mdf||this.firstFrame)&&(s.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemData.length=0,this._parent.destroy.call(this._parent)},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this._parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.prepareFrame=ITextElement.prototype.prepareFrame,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this._parent.createElements.call(this)},CVTextElement.prototype.buildNewText=function(){var t=this.currentTextDocumentData;this.renderedLetters=Array.apply(null,{length:this.currentTextDocumentData.l?this.currentTextDocumentData.l.length:0});var e=!1;t.fc?(e=!0,this.values.fill="rgb("+Math.round(255*t.fc[0])+","+Math.round(255*t.fc[1])+","+Math.round(255*t.fc[2])+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke="rgb("+Math.round(255*t.sc[0])+","+Math.round(255*t.sc[1])+","+Math.round(255*t.sc[2])+")",this.values.sWidth=t.sw);var s,i,a=this.globalData.fontManager.getFontByName(t.f),n=t.l,o=this.mHelper;this.stroke=r,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,i=t.t.length,this.tHelper.font=this.values.fValue;var h,l,p,m,f,c,d,u,y,g,v=this.data.singleShape;if(v)var b=0,E=0,P=t.lineWidths,S=t.boxWidth,x=!0;var C=0;for(s=0;i>s;s+=1){h=this.globalData.fontManager.getCharData(t.t.charAt(s),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);var l;if(l=h?h.data:null,o.reset(),v&&n[s].n&&(b=0,E+=t.yOffset,E+=x?1:0,x=!1),l&&l.shapes){if(f=l.shapes[0].it,d=f.length,o.scale(t.s/100,t.s/100),v){switch(t.ps&&o.translate(t.ps[0],t.ps[1]+t.ascent,0),o.translate(0,-t.ls,0),t.j){case 1:o.translate(t.justifyOffset+(S-P[n[s].line]),0,0);break;case 2:o.translate(t.justifyOffset+(S-P[n[s].line])/2,0,0)}o.translate(b,E,0)}for(y=new Array(d),c=0;d>c;c+=1){for(m=f[c].ks.k.i.length,u=f[c].ks.k,g=[],p=1;m>p;p+=1)1==p&&g.push(o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[p][0],u.i[p][1],0),o.applyToY(u.i[p][0],u.i[p][1],0),o.applyToX(u.v[p][0],u.v[p][1],0),o.applyToY(u.v[p][0],u.v[p][1],0));g.push(o.applyToX(u.o[p-1][0],u.o[p-1][1],0),o.applyToY(u.o[p-1][0],u.o[p-1][1],0),o.applyToX(u.i[0][0],u.i[0][1],0),o.applyToY(u.i[0][0],u.i[0][1],0),o.applyToX(u.v[0][0],u.v[0][1],0),o.applyToY(u.v[0][0],u.v[0][1],0)),y[c]=g}}else y=[];v&&(b+=n[s].l),this.textSpans[C]?this.textSpans[C].elem=y:this.textSpans[C]={elem:y},C+=1}},CVTextElement.prototype.renderFrame=function(t){if(this._parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,r=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(r),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.currentTextDocumentData,this.lettersChangedFlag);var s,i,a,n,o,h,l=this.textAnimator.renderedLetters,p=this.currentTextDocumentData.l;i=p.length;var m,f,c,d=null,u=null,y=null;for(s=0;i>s;s+=1)if(!p[s].n){if(m=l[s],m&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.p),this.globalData.renderer.ctxOpacity(m.o)),this.fill){for(m&&m.fc?d!==m.fc&&(d=m.fc,e.fillStyle=m.fc):d!==this.values.fill&&(d=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[s].elem,n=f.length,this.globalData.canvasContext.beginPath(),a=0;n>a;a+=1)for(c=f[a],h=c.length,this.globalData.canvasContext.moveTo(c[0],c[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(c[o],c[o+1],c[o+2],c[o+3],c[o+4],c[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m&&m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m&&m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[s].elem,n=f.length,this.globalData.canvasContext.beginPath(),a=0;n>a;a+=1)for(c=f[a],h=c.length,this.globalData.canvasContext.moveTo(c[0],c[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(c[o],c[o+1],c[o+2],c[o+3],c[o+4],c[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}m&&this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.checkBlendMode=function(){},HBaseElement.prototype.setBlendMode=BaseElement.prototype.setBlendMode,HBaseElement.prototype.getBaseElement=function(){return this.baseElement},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),styleDiv(this.layerElement),this.baseElement=this.layerElement,this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,this.transformedElement=this.layerElement,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.baseElement=this.layerElement),this.layerElement.setAttribute("id",this.data.ln)),this.setBlendMode(),this.layerElement!==this.parentContainer&&(this.placeholder=null),this.checkParenting()},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,r=this.finalTransform.mat;if(this.hierarchy){var s,i=this.hierarchy.length;for(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e),s=0;i>s;s+=1)this.finalTransform.matMdf=this.hierarchy[s].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[s].finalTransform.mProp.v.props,r.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}else this.isVisible&&this.finalTransform.matMdf&&(t?(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e)):r.cloneFromProps(this.finalTransform.mProp.v.props));return this.data.hasMask&&this.maskManager.renderFrame(r),t&&(e=t.mat.props,r.cloneFromProps(e),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.finalTransform.matMdf&&(this.transformedElement.style.transform=this.transformedElement.style.webkitTransform=r.toCSS(),this.finalMat=r),this.finalTransform.opMdf&&(this.transformedElement.style.opacity=this.finalTransform.opacity),this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.transformedElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},HBaseElement.prototype.setMatte=function(){},HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");styleDiv(e),e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.transformedElement=t,this.baseElement=t,this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),0!==this.data.bm&&this.setBlendMode();var r=document.createElementNS(svgNS,"rect");r.setAttribute("width",this.data.sw),r.setAttribute("height",this.data.sh),r.setAttribute("fill",this.data.sc),e.appendChild(r),this.data.hasMask&&(this.maskedElement=r),this.checkParenting()},HSolidElement.prototype.hide=SVGBaseElement.prototype.hide,HSolidElement.prototype.show=SVGBaseElement.prototype.show,HSolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,HSolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(HBaseElement,HCompElement),HCompElement.prototype.createElements=function(){var t=document.createElement("div");if(styleDiv(t),this.data.ln&&t.setAttribute("id",this.data.ln),t.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.data.hasMask){var e=document.createElementNS(svgNS,"svg");styleDiv(e),e.setAttribute("width",this.data.w),e.setAttribute("height",this.data.h);var r=document.createElementNS(svgNS,"g");e.appendChild(r),t.appendChild(e),this.maskedElement=r,this.baseElement=t,this.layerElement=r,this.transformedElement=t}else this.layerElement=t,this.baseElement=this.layerElement,this.transformedElement=t;this.checkParenting()},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,r=this._parent.renderFrame.call(this,t),s=this.layers.length;if(r===!1)return void this.hide();for(this.hidden=!1,e=0;s>e;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},HCompElement.prototype.checkLayers=BaseRenderer.prototype.checkLayers,HCompElement.prototype.buildItem=HybridRenderer.prototype.buildItem,HCompElement.prototype.checkPendingElements=HybridRenderer.prototype.checkPendingElements,HCompElement.prototype.addPendingElement=HybridRenderer.prototype.addPendingElement,HCompElement.prototype.buildAllItems=BaseRenderer.prototype.buildAllItems,HCompElement.prototype.createItem=HybridRenderer.prototype.createItem,HCompElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,HCompElement.prototype.createImage=HybridRenderer.prototype.createImage,HCompElement.prototype.createComp=HybridRenderer.prototype.createComp,HCompElement.prototype.createSolid=HybridRenderer.prototype.createSolid,HCompElement.prototype.createShape=HybridRenderer.prototype.createShape,HCompElement.prototype.createText=HybridRenderer.prototype.createText,HCompElement.prototype.createBase=HybridRenderer.prototype.createBase,HCompElement.prototype.appendElementInPos=HybridRenderer.prototype.appendElementInPos,createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype._parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype._parent=parent,HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderFrame,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");styleDiv(e);var r=this.comp.data?this.comp.data:this.globalData.compSize;if(e.setAttribute("width",r.w),e.setAttribute("height",r.h),this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s,this.shapesContainer=s}else t.appendChild(e),this.layerElement=e,this.shapesContainer=document.createElementNS(svgNS,"g"),this.layerElement.appendChild(this.shapesContainer);this.data.hd||(this.baseElement=t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,this.dynamicProperties,0,[],!0),this.buildExpressionInterface(),this.layerElement=t,this.transformedElement=t,this.shapeCont=e,0!==this.data.bm&&this.setBlendMode(),this.checkParenting()},HShapeElement.prototype.renderFrame=function(t){var e=this.firstFrame;if(this._renderShapeFrame(),this.isVisible&&(this.elemMdf||e)){var r=this.shapeCont.getBBox(),s=!1;this.currentBBox.w!==r.width&&(this.currentBBox.w=r.width,this.shapeCont.setAttribute("width",r.width),s=!0),this.currentBBox.h!==r.height&&(this.currentBBox.h=r.height,this.shapeCont.setAttribute("height",r.height),s=!0),(s||this.currentBBox.x!==r.x||this.currentBBox.y!==r.y)&&(this.currentBBox.w=r.width,this.currentBBox.h=r.height,this.currentBBox.x=r.x,this.currentBBox.y=r.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.shapeCont.style.transform=this.shapeCont.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.createPathShape=ITextElement.prototype.createPathShape,HTextElement.prototype.prepareFrame=ITextElement.prototype.prepareFrame,HTextElement.prototype.buildShapeString=ITextElement.prototype.buildShapeString,HTextElement.prototype.createElements=function(){this.isMasked=this.checkMasks();var t=document.createElement("div");if(styleDiv(t),this.layerElement=t,this.transformedElement=t,this.isMasked){this.renderType="svg";var e=document.createElementNS(svgNS,"svg");styleDiv(e),this.cont=e,this.compW=this.comp.data.w,this.compH=this.comp.data.h,e.setAttribute("width",this.compW),e.setAttribute("height",this.compH);var r=document.createElementNS(svgNS,"g");e.appendChild(r),t.appendChild(e),this.maskedElement=r,this.innerElem=r}else this.renderType="html",this.innerElem=t;this.baseElement=t,this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.currentTextDocumentData;this.renderedLetters=Array.apply(null,{length:this.currentTextDocumentData.l?this.currentTextDocumentData.l.length:0}),this.innerElem.style.color=this.innerElem.style.fill=t.fc?"rgb("+Math.round(255*t.fc[0])+","+Math.round(255*t.fc[1])+","+Math.round(255*t.fc[2])+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+Math.round(255*t.sc[0])+","+Math.round(255*t.sc[1])+","+Math.round(255*t.sc[2])+")",this.innerElem.style.strokeWidth=t.sw+"px");var e=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(this.innerElem.style.fontSize=t.s+"px",this.innerElem.style.lineHeight=t.s+"px",e.fClass)this.innerElem.className=e.fClass;else{this.innerElem.style.fontFamily=e.fFamily;var r=t.fWeight,s=t.fStyle;this.innerElem.style.fontStyle=s,this.innerElem.style.fontWeight=r}var i,a,n=t.l;a=n.length;var o,h,l,p,m=this.mHelper,f="",c=0;for(i=0;a>i;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[c]?o=this.textPaths[c]:(o=document.createElementNS(svgNS,"path"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[c]?(h=this.textSpans[c],l=h.children[0]):(h=document.createElement("div"),l=document.createElementNS(svgNS,"svg"),l.appendChild(o),styleDiv(h)))):this.isMasked?o=this.textPaths[c]?this.textPaths[c]:document.createElementNS(svgNS,"text"):this.textSpans[c]?(h=this.textSpans[c],o=this.textPaths[c]):(h=document.createElement("span"),styleDiv(h),o=document.createElement("span"),styleDiv(o),h.appendChild(o)),this.globalData.fontManager.chars){var d,u=this.globalData.fontManager.getCharData(t.t.charAt(i),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(d=u?u.data:null,m.reset(),d&&d.shapes&&(p=d.shapes[0].it,m.scale(t.s/100,t.s/100),f=this.createPathShape(m,p),o.setAttribute("d",f)),this.isMasked)this.innerElem.appendChild(o);else if(this.innerElem.appendChild(h),d&&d.shapes){document.body.appendChild(l);var y=l.getBBox();l.setAttribute("width",y.width+2),l.setAttribute("height",y.height+2),l.setAttribute("viewBox",y.x-1+" "+(y.y-1)+" "+(y.width+2)+" "+(y.height+2)),l.style.transform=l.style.webkitTransform="translate("+(y.x-1)+"px,"+(y.y-1)+"px)",n[i].yOffset=y.y-1,h.appendChild(l)}else l.setAttribute("width",1),l.setAttribute("height",1)}else o.textContent=n[i].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked?this.innerElem.appendChild(o):(this.innerElem.appendChild(h),o.style.transform=o.style.webkitTransform="translate3d(0,"+-t.s/1.2+"px,0)");this.textSpans[c]=this.isMasked?o:h,this.textSpans[c].style.display="block",this.textPaths[c]=o,c+=1}for(;c<this.textSpans.length;)this.textSpans[c].style.display="none",c+=1},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block",this.layerElement.style.display="block"),this.data.singleShape){if(!this.firstFrame&&!this.lettersChangedFlag)return;this.isMasked&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform=this.cont.style.webkitTransform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)")}if(this.textAnimator.getMeasures(this.currentTextDocumentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,s,i=0,a=this.textAnimator.renderedLetters,n=this.currentTextDocumentData.l;s=n.length;var o;for(r=0;s>r;r+=1)n[r].n||(o=a[i],i+=1,this.isMasked?this.textSpans[r].setAttribute("transform",o.m):this.textSpans[r].style.transform=this.textSpans[r].style.webkitTransform=o.m,this.textSpans[r].style.opacity=o.o,o.sw&&this.textPaths[r].setAttribute("stroke-width",o.sw),o.sc&&this.textPaths[r].setAttribute("stroke",o.sc),o.fc&&(this.textPaths[r].setAttribute("fill",o.fc),this.textPaths[r].style.color=o.fc));if(this.isVisible&&(this.elemMdf||this.firstFrame)&&this.innerElem.getBBox){var h=this.innerElem.getBBox();this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.cont.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.cont.setAttribute("height",h.height));var l=1;(this.currentBBox.w!==h.width+2*l||this.currentBBox.h!==h.height+2*l||this.currentBBox.x!==h.x-l||this.currentBBox.y!==h.y-l)&&(this.currentBBox.w=h.width+2*l,this.currentBBox.h=h.height+2*l,this.currentBBox.x=h.x-l,this.currentBBox.y=h.y-l,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform=this.cont.style.webkitTransform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy,createElement(HBaseElement,HImageElement),HImageElement.prototype.createElements=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;if(this.data.hasMask){var r=document.createElement("div");styleDiv(r);var s=document.createElementNS(svgNS,"svg");styleDiv(s),s.setAttribute("width",this.assetData.w),s.setAttribute("height",this.assetData.h),r.appendChild(s),this.imageElem=document.createElementNS(svgNS,"image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),s.appendChild(this.imageElem),this.layerElement=r,this.transformedElement=r,this.baseElement=r,this.innerElem=r,this.maskedElement=this.imageElem}else styleDiv(e),this.layerElement=e,this.baseElement=e,this.innerElem=e,this.transformedElement=e;e.src=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.checkParenting()},HImageElement.prototype.show=HSolidElement.prototype.show,HImageElement.prototype.hide=HSolidElement.prototype.hide,HImageElement.prototype.renderFrame=HSolidElement.prototype.renderFrame,HImageElement.prototype.destroy=HSolidElement.prototype.destroy,createElement(HBaseElement,HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r=this.comp.threeDElements.length;for(t=0;r>t;t+=1)e=this.comp.threeDElements[t],e.perspectiveElem.style.perspective=e.perspectiveElem.style.webkitPerspective=this.pe.v+"px",e.container.style.transformOrigin=e.container.style.mozTransformOrigin=e.container.style.webkitTransformOrigin="0px 0px 0px",e.perspectiveElem.style.transform=e.perspectiveElem.style.webkitTransform="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this.firstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;e>t;t+=1)r=this.hierarchy[t].finalTransform.mProp.mdf?!0:r;if(r||this.p&&this.p.mdf||this.px&&(this.px.mdf||this.py.mdf||this.pz.mdf)||this.rx.mdf||this.ry.mdf||this.rz.mdf||this.or.mdf||this.a&&this.a.mdf){if(this.mat.reset(),this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]],i=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),a=[s[0]/i,s[1]/i,s[2]/i],n=Math.sqrt(a[2]*a[2]+a[0]*a[0]),o=Math.atan2(a[1],n),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-o)}if(this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v),this.hierarchy){var l;for(e=this.hierarchy.length,t=0;e>t;t+=1)l=this.hierarchy[t].finalTransform.mProp.iv.props,this.mat.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],-l[12],-l[13],l[14],l[15])}e=this.comp.threeDElements.length;var p;for(t=0;e>t;t+=1)p=this.comp.threeDElements[t],p.container.style.transform=p.container.style.webkitTransform=this.mat.toCSS()}this.firstFrame=!1},HCameraElement.prototype.destroy=function(){};var Expressions=function(){function t(t){t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer)}var e={};return e.initExpressions=t,e}();expressionsPlugin=Expressions,function(){function t(){return this.pv}function e(t){if(this._cachingAtTime||(this._cachingAtTime={lastValue:-99999,lastIndex:0}),t!==this._cachingAtTime.lastFrame){this._cachingAtTime.lastValue=t,t*=this.elem.globalData.frameRate;var e=this.interpolateValue(t,this._cachingAtTime.lastIndex,this.pv,this._cachingAtTime);this._cachingAtTime.lastIndex=e.iterationIndex,this._cachingAtTime.value=e.value}return this._cachingAtTime.value}function r(t){if(void 0!==this.vel)return this.vel;var e,r=-.01,s=this.getValueAtTime(t,0),i=this.getValueAtTime(t+r,0);if(s.length){e=Array.apply(null,{length:s.length});var a;for(a=0;a<s.length;a+=1)e[a]=(i[a]-s[a])/r}else e=(i-s)/r;return e}function s(t){this.propertyGroup=t}function i(t,e,r){e.x&&(r.k=!0,r.x=!0,r.getValue&&(r.getPreValue=r.getValue),r.getValue=ExpressionManager.initiateExpression.bind(r)(t,e,r))}function a(t){console.log("time:",t)}function n(t){}function o(t){if(this._shapeValueAtTime||(this._lastIndexAtTime=0,this._lastTimeAtTime=-999999,this._shapeValueAtTime=shape_pool.clone(this.pv)),t!==this._lastTimeAtTime){this._lastTimeAtTime=t,t*=this.elem.globalData.frameRate;var e=this.interpolateShape(t,this._lastIndexAtTime,this._shapeValueAtTime,!1);this._lastIndexAtTime=e.iterationIndex}return this._shapeValueAtTime}var h=function(){function a(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(n,o){this.pv=1,this.comp=n.comp,this.elem=n,this.mult=.01,this.type="textSelector",this.textTotal=o.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],i.bind(this)(n,o,this),this.getMult=a,this.getVelocityAtTime=r,this.getValueAtTime=this.kf?e.bind(this):t.bind(this),this.setGroupProperty=s}}(),l=PropertyFactory.getProp;PropertyFactory.getProp=function(o,h,p,m,f){var c=l(o,h,p,m,f);c.getVelocityAtTime=r,c.getValueAtTime=2===p?c.dynamicProperties.length?a.bind(c):n.bind(c):c.kf?e.bind(c):t.bind(c),c.setGroupProperty=s;var d=c.k;return void 0!==h.ix&&Object.defineProperty(c,"propertyIndex",{get:function(){return h.ix}}),i(o,h,c),!d&&c.x&&f.push(c),c};var p=ShapePropertyFactory.getConstructorFunction(),m=ShapePropertyFactory.getKeyframedConstructorFunction();p.prototype.vertices=function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0));var s,i=r._length,a=r[t],n=r.v,o=Array.apply(null,{length:i});for(s=0;i>s;s+=1)o[s]="i"===t||"o"===t?[a[s][0]-n[s][0],a[s][1]-n[s][1]]:[a[s][0],a[s][1]];return o},p.prototype.points=function(t){return this.vertices("v",t)},p.prototype.inTangents=function(t){return this.vertices("i",t)},p.prototype.outTangents=function(t){return this.vertices("o",t)},p.prototype.isClosed=function(){return this.v.c},p.prototype.pointOnPath=function(t,e){var r=this.v;void 0!==e&&(r=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var s,i=this._segmentsLength,a=i.lengths,n=i.totalLength*t,o=0,h=a.length,l=0;h>o;){if(l+a[o].addedLength>n){s=a[o].segments;var p=o,m=r.c&&o===h-1?0:o+1,f=(n-l)/a[o].addedLength,c=bez.getPointInSegment(r.v[p],r.v[m],r.o[p],r.i[m],f,a[o]);break}l+=a[o].addedLength,o+=1}return c||(c=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),c},p.prototype.setGroupProperty=s,p.prototype.getValueAtTime=t,m.prototype.vertices=p.prototype.vertices,m.prototype.points=p.prototype.points,m.prototype.inTangents=p.prototype.inTangents,m.prototype.outTangents=p.prototype.outTangents,m.prototype.isClosed=p.prototype.isClosed,m.prototype.pointOnPath=p.prototype.pointOnPath,m.prototype.setGroupProperty=p.prototype.setGroupProperty,m.prototype.getValueAtTime=o;var f=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,r,s,a){var n=f(t,e,r,s,a),o=n.k;return void 0!==e.ix&&Object.defineProperty(n,"propertyIndex",{get:function(){return e.ix}}),3===r?i(t,e.pt,n):4===r&&i(t,e.ks,n),!o&&n.x&&s.push(n),n};var c=PropertyFactory.getTextSelectorProp;PropertyFactory.getTextSelectorProp=function(t,e,r){return 1===e.t?new h(t,e,r):c(t,e,r)}}();var ExpressionManager=function(){function duplicatePropertyValue(t,e){if(e=e||1,"number"==typeof t||t instanceof Number)return t*e;if(t.i)return JSON.parse(JSON.stringify(t));var r,s=Array.apply(null,{length:t.length}),i=t.length;for(r=0;i>r;r+=1)s[r]=t[r]*e;return s}function shapesEqual(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var r,s=t._length;for(r=0;s>r;r+=1)if(t.v[r][0]!==e.v[r][0]||t.v[r][1]!==e.v[r][1]||t.o[r][0]!==e.o[r][0]||t.o[r][1]!==e.o[r][1]||t.i[r][0]!==e.i[r][0]||t.i[r][1]!==e.i[r][1])return!1;return!0}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if(t.constructor===Array){var r,s=t.length,i=[];for(r=0;s>r;r+=1)i[r]=-t[r];return i}}function sum(t,e){var r=typeof t,s=typeof e;if("string"===r||"string"===s)return t+e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t+e;if(t.constructor===Array&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t[0]=t[0]+e,t;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&e.constructor===Array)return e[0]=t+e[0],e;if(t.constructor===Array&&e.constructor===Array){for(var i=0,a=t.length,n=e.length,o=[];a>i||n>i;)o[i]=("number"==typeof t[i]||t[i]instanceof Number)&&("number"==typeof e[i]||e[i]instanceof Number)?t[i]+e[i]:void 0==e[i]?t[i]:t[i]||e[i],i+=1;return o}return 0}function sub(t,e){var r=typeof t,s=typeof e;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return"string"===r&&(t=parseInt(t)),"string"===s&&(e=parseInt(e)),t-e;if(t.constructor===Array&&("number"===s||"boolean"===s||"string"===s||e instanceof Number))return t[0]=t[0]-e,t;if(("number"===r||"boolean"===r||"string"===r||t instanceof Number)&&e.constructor===Array)return e[0]=t-e[0],e;if(t.constructor===Array&&e.constructor===Array){for(var i=0,a=t.length,n=e.length,o=[];a>i||n>i;)o[i]="number"==typeof t[i]||t[i]instanceof Number?t[i]-e[i]:void 0==e[i]?t[i]:t[i]||e[i],i+=1;return o}return 0}function mul(t,e){var r,s=typeof t,i=typeof e;if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number))return t*e;var a,n;if(t.constructor===Array&&("number"===i||"boolean"===i||"string"===i||e instanceof Number)){for(n=t.length,r=Array.apply(null,{length:n}),a=0;n>a;a+=1)r[a]=t[a]*e;return r}if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&e.constructor===Array){for(n=e.length,r=Array.apply(null,{length:n}),a=0;n>a;a+=1)r[a]=t*e[a];return r}return 0}function div(t,e){var r,s=typeof t,i=typeof e;if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&("number"===i||"boolean"===i||"string"===i||e instanceof Number))return t/e;var a,n;if(t.constructor===Array&&("number"===i||"boolean"===i||"string"===i||e instanceof Number)){for(n=t.length,r=Array.apply(null,{length:n}),a=0;n>a;a+=1)r[a]=t[a]/e;return r}if(("number"===s||"boolean"===s||"string"===s||t instanceof Number)&&e.constructor===Array){for(n=e.length,r=Array.apply(null,{length:n}),a=0;n>a;a+=1)r[a]=t/e[a];return r}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t)),"string"==typeof e&&(e=parseInt(e)),t%e}function clamp(t,e,r){if(e>r){var s=r;r=e,e=s}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}function degreesToRadians(t){
return t*degToRads}function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,s=Math.min(t.length,e.length),i=0;for(r=0;s>r;r+=1)i+=Math.pow(e[r]-t[r],2);return Math.sqrt(i)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,s=t[0],i=t[1],a=t[2],n=Math.max(s,i,a),o=Math.min(s,i,a),h=(n+o)/2;if(n==o)e=r=0;else{var l=n-o;switch(r=h>.5?l/(2-n-o):l/(n+o),n){case s:e=(i-a)/l+(a>i?6:0);break;case i:e=(a-s)/l+2;break;case a:e=(s-i)/l+4}e/=6}return[e,r,h,t[3]]}function hslToRgb(t){function e(t,e,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?t+6*(e-t)*r:.5>r?e:2/3>r?t+(e-t)*(2/3-r)*6:t}var r,s,i,a=t[0],n=t[1],o=t[2];if(0==n)r=s=i=o;else{var h=.5>o?o*(1+n):o+n-o*n,l=2*o-h;r=e(l,h,a+1/3),s=e(l,h,a),i=e(l,h,a-1/3)}return[r,s,i,t[3]]}function linear(t,e,r,s,i){if(void 0===s||void 0===i)return linear(t,0,1,e,r);if(e>=t)return s;if(t>=r)return i;var a=r===e?0:(t-e)/(r-e);if(!s.length)return s+(i-s)*a;var n,o=s.length,h=Array.apply(null,{length:o});for(n=0;o>n;n+=1)h[n]=s[n]+(i[n]-s[n])*a;return h}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var r,s=e.length;t||(t=Array.apply(null,{length:s}));var i=Array.apply(null,{length:s}),a=BMMath.random();for(r=0;s>r;r+=1)i[r]=t[r]+a*(e[r]-t[r]);return i}void 0===t&&(t=0);var n=BMMath.random();return t+n*(e-t)}function createPath(t,e,r,s){e=e||t,r=r||t;var a=shape_pool.newShape(),n=t.length;for(a.setPathData(s,n),i=0;i<n;i+=1)a.setTripleAt(t[i][0],t[i][1],r[i][0]+t[i][0],r[i][1]+t[i][1],e[i][0]+t[i][0],e[i][1]+t[i][1],i,!0);return a}function initiateExpression(elem,data,property){function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],s=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,i=-Math.atan2(r[1],r[2])/degToRads;return[i,s,0]}function easeOut(t,e,r){return-(r-e)*t*(t-2)+e}function nearestKey(t){var e,r,s,i=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,t*=elem.comp.globalData.frameRate,t<data.k[0].t)r=1,s=data.k[0].t;else{for(e=0;i-1>e;e+=1){if(t===data.k[e].t){r=e+1,s=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,s=data.k[e+1].t):(r=e+1,s=data.k[e].t);break}}-1===r&&(r=e+1,s=data.k[e].t)}else r=0,s=0;var a={};return a.index=r,a.time=s/elem.comp.globalData.frameRate,a}function key(t){var e,r,s;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate};var i;for(i=t!==data.k.length-1||data.k[t].h?data.k[t].s:data.k[t-1].e,s=i.length,r=0;s>r;r+=1)e[r]=i[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function execute(){if(_needsRandom&&seedRandom(randSeed),this.frameExpressionId!==elem.globalData.frameId||"textSelector"===this.type){if(this.lock)return this.v=duplicatePropertyValue(this.pv,this.mult),!0;"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),anchorPoint=transform.anchorPoint),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!(!elem.hierarchy||!elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),this.lock=!0,this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,needsVelocity&&(velocity=velocityAtTime(time)),bindedFn(),this.frameExpressionId=elem.globalData.frameId;var t,e;if(this.mult)if("number"==typeof this.v||this.v instanceof Number||"string"==typeof this.v)this.v*=this.mult;else if(1===this.v.length)this.v=this.v[0]*this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if(1===this.v.length&&(this.v=this.v[0]),"number"==typeof this.v||this.v instanceof Number||"string"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else if(this.v._length)shapesEqual(this.v,this.localShapeCollection.shapes[0])||(this.mdf=!0,this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(shape_pool.clone(this.v)));else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0);this.lock=!1}}var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,content,effect,thisComp=elem.comp,thisProperty=property;elem.comp.frameDuration=1/elem.comp.globalData.frameRate;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,toWorld,fromWorld,fromComp,fromCompToSurface,anchorPoint,thisLayer,thisComp,mask,fn=new Function,fn=eval("[function(){"+val+";if($bm_rt.__shapeObject){this.v=shape_pool.clone($bm_rt.v);}else{this.v=$bm_rt;}}]")[0],bindedFn=fn.bind(this),numKeys=property.kf?data.k.length:0,wiggle=function(t,e){var r,s,i=this.pv.length?this.pv.length:1,a=Array.apply(null,{len:i});for(s=0;i>s;s+=1)a[s]=0;t=5;var n=Math.floor(time*t);for(r=0,s=0;n>r;){for(s=0;i>s;s+=1)a[s]+=-e+2*e*BMMath.random();r+=1}var o=time*t,h=o-Math.floor(o),l=Array.apply({length:i});if(i>1){for(s=0;i>s;s+=1)l[s]=this.pv[s]+a[s]+(-e+2*e*BMMath.random())*h;return l}return this.pv+a[0]+(-e+2*e*BMMath.random())*h}.bind(this),loopIn=function(t,e,r){if(!this.k)return this.pv;var s=time*elem.comp.globalData.frameRate,i=this.keyframes,a=i[0].t,n=this.offsetTime||0;if(s>=a)return this.pv;var o,h;r?(o=e?Math.abs(elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-a),h=a+o):((!e||e>i.length-1)&&(e=i.length-1),h=i[e].t,o=h-a);var l,p,m;if("pingpong"===t){var f=Math.floor((a-s)/o);if(f%2===0)return this.getValueAtTime(((a-s)%o+a-n)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(a/this.comp.globalData.frameRate,0),d=this.getValueAtTime(h/this.comp.globalData.frameRate,0),u=this.getValueAtTime((o-(a-s)%o+a)/this.comp.globalData.frameRate,0),y=Math.floor((a-s)/o)+1;if(this.pv.length){for(m=new Array(c.length),p=m.length,l=0;p>l;l+=1)m[l]=u[l]-(d[l]-c[l])*y;return m}return u-(d-c)*y}if("continue"===t){var g=this.getValueAtTime(a/this.comp.globalData.frameRate,0),v=this.getValueAtTime((a+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(m=new Array(g.length),p=m.length,l=0;p>l;l+=1)m[l]=g[l]+(g[l]-v[l])*(a-s)/.001;return m}return g+(g-v)*(a-s)/.001}}return this.getValueAtTime((o-(a-s)%o+a-n)/this.comp.globalData.frameRate,0)}.bind(this),loopInDuration=function(t,e){return loopIn(t,e,!0)}.bind(this),loopOut=function(t,e,r){if(!this.k||!this.keyframes)return this.pv;var s=time*elem.comp.globalData.frameRate,i=this.keyframes,a=i[i.length-1].t;if(a>=s)return this.pv;var n,o;r?(n=e?Math.abs(a-elem.comp.globalData.frameRate*e):Math.max(0,a-this.elem.data.ip),o=a-n):((!e||e>i.length-1)&&(e=i.length-1),o=i[i.length-1-e].t,n=a-o);var h,l,p,m=this.offsetTime||0;if("pingpong"===t.toLowerCase()){var f=Math.floor((s-o)/n);if(f%2!==0)return this.getValueAtTime((n-(s-o)%n+o-m)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(o/this.comp.globalData.frameRate,0),d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),u=this.getValueAtTime(((s-o)%n+o)/this.comp.globalData.frameRate,0),y=Math.floor((s-o)/n);if(this.pv.length){for(p=new Array(c.length),l=p.length,h=0;l>h;h+=1)p[h]=(d[h]-c[h])*y+u[h];return p}return(d-c)*y+u}if("continue"===t){var g=this.getValueAtTime(a/this.comp.globalData.frameRate,0),v=this.getValueAtTime((a-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(p=new Array(g.length),l=p.length,h=0;l>h;h+=1)p[h]=g[h]+(g[h]-v[h])*((s-a)/this.comp.globalData.frameRate)/5e-4;return p}return g+(g-v)*((s-a)/.001)}}return this.getValueAtTime(((s-o)%n+o-m)/this.comp.globalData.frameRate,0)}.bind(this),loop_out=loopOut,loopOutDuration=function(t,e){return loopOut(t,e,!0)}.bind(this),valueAtTime=function(t){return this.getValueAtTime(t,0)}.bind(this),velocityAtTime;this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random());return execute}var ob={},Math=BMMath,window=null,document=null,add=sum,radians_to_degrees=radiansToDegrees,degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];return ob.initiateExpression=initiateExpression,ob}(),ShapeExpressionInterface=function(){function t(t,e,r){return d(t,e,r)}function e(t,e,r){return y(t,e,r)}function r(t,e,r){return g(t,e,r)}function s(t,e,r){return v(t,e,r)}function i(t,e,r){return b(t,e,r)}function a(t,e,r){return E(t,e,r)}function n(t,e,r){return P(t,e,r)}function o(t,e,r){return S(t,e,r)}function h(t,e,r){return x(t,e,r)}function l(t,e,r){return C(t,e,r)}function p(t,e,r){return k(t,e,r)}function m(t,e,r){return A(t,e,r)}function f(t,e,r){var s,i=[],a=t?t.length:0;for(s=0;a>s;s+=1)"gr"==t[s].ty?i.push(ShapeExpressionInterface.createGroupInterface(t[s],e[s],r)):"fl"==t[s].ty?i.push(ShapeExpressionInterface.createFillInterface(t[s],e[s],r)):"st"==t[s].ty?i.push(ShapeExpressionInterface.createStrokeInterface(t[s],e[s],r)):"tm"==t[s].ty?i.push(ShapeExpressionInterface.createTrimInterface(t[s],e[s],r)):"tr"==t[s].ty||("el"==t[s].ty?i.push(ShapeExpressionInterface.createEllipseInterface(t[s],e[s],r)):"sr"==t[s].ty?i.push(ShapeExpressionInterface.createStarInterface(t[s],e[s],r)):"sh"==t[s].ty?i.push(ShapeExpressionInterface.createPathInterface(t[s],e[s],r)):"rc"==t[s].ty?i.push(ShapeExpressionInterface.createRectInterface(t[s],e[s],r)):"rd"==t[s].ty?i.push(ShapeExpressionInterface.createRoundedInterface(t[s],e[s],r)):"rp"==t[s].ty&&i.push(ShapeExpressionInterface.createRepatearInterface(t[s],e[s],r)));return i}var c={createShapeInterface:t,createGroupInterface:e,createTrimInterface:i,createStrokeInterface:s,createTransformInterface:a,createEllipseInterface:n,createStarInterface:o,createRectInterface:h,createRoundedInterface:l,createRepatearInterface:p,createPathInterface:m,createFillInterface:r},d=function(){return function(t,e,r){function s(t){if("number"==typeof t)return i[t-1];for(var e=0,r=i.length;r>e;){if(i[e]._name===t)return i[e];e+=1}}var i;return s.propertyGroup=r,i=f(t,e,s),s}}(),u=function(){return function(t,e,r){var s,i=function(t){for(var e=0,r=s.length;r>e;){if(s[e]._name===t||s[e].mn===t||s[e].propertyIndex===t||s[e].ix===t||s[e].ind===t)return s[e];e+=1}return"number"==typeof t?s[t-1]:void 0};return i.propertyGroup=function(t){return 1===t?i:r(t-1)},s=f(t.it,e.it,i.propertyGroup),i.numProperties=s.length,i.propertyIndex=t.cix,i}}(),y=function(){return function(t,e,r){var s=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return s.content;case"ADBE Vector Transform Group":case 3:default:return s.transform}};s.propertyGroup=function(t){return 1===t?s:r(t-1)};var i=u(t,e,s.propertyGroup),a=ShapeExpressionInterface.createTransformInterface(t.it[t.it.length-1],e.it[e.it.length-1],s.propertyGroup);return s.content=i,s.transform=a,Object.defineProperty(s,"_name",{get:function(){return t.nm}}),s.numProperties=t.np,s.propertyIndex=t.ix,s.nm=t.nm,s.mn=t.mn,s}}(),g=function(){return function(t,e,r){function s(t){return"Color"===t||"color"===t?s.color:"Opacity"===t||"opacity"===t?s.opacity:void 0}return Object.defineProperty(s,"color",{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}}),Object.defineProperty(s,"opacity",{get:function(){return ExpressionValue(e.o,100)}}),Object.defineProperty(s,"_name",{value:t.nm}),Object.defineProperty(s,"mn",{value:t.mn}),e.c.setGroupProperty(r),e.o.setGroupProperty(r),s}}(),v=function(){return function(t,e,r){function s(t){return 1===t?c:r(t-1)}function i(t){return 1===t?l:s(t-1)}function a(r){Object.defineProperty(l,t.d[r].nm,{get:function(){return ExpressionValue(e.d.dataProps[r].p)}})}function n(t){return"Color"===t||"color"===t?n.color:"Opacity"===t||"opacity"===t?n.opacity:"Stroke Width"===t||"stroke width"===t?n.strokeWidth:void 0}var o,h=t.d?t.d.length:0,l={};for(o=0;h>o;o+=1)a(o),e.d.dataProps[o].p.setGroupProperty(i);return Object.defineProperty(n,"color",{get:function(){return ExpressionValue(e.c,1/e.c.mult,"color")}}),Object.defineProperty(n,"opacity",{get:function(){return ExpressionValue(e.o,100)}}),Object.defineProperty(n,"strokeWidth",{get:function(){return ExpressionValue(e.w)}}),Object.defineProperty(n,"dash",{get:function(){return l}}),Object.defineProperty(n,"_name",{value:t.nm}),Object.defineProperty(n,"mn",{value:t.mn}),e.c.setGroupProperty(s),e.o.setGroupProperty(s),e.w.setGroupProperty(s),n}}(),b=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:void 0}return i.propertyIndex=t.ix,e.s.setGroupProperty(s),e.e.setGroupProperty(s),e.o.setGroupProperty(s),i.propertyIndex=t.ix,Object.defineProperty(i,"start",{get:function(){return ExpressionValue(e.s,1/e.s.mult)}}),Object.defineProperty(i,"end",{get:function(){return ExpressionValue(e.e,1/e.e.mult)}}),Object.defineProperty(i,"offset",{get:function(){return ExpressionValue(e.o)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),E=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.a.ix===e?i.anchorPoint:t.o.ix===e?i.opacity:t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.s.ix===e?i.scale:t.sk&&t.sk.ix===e?i.skew:t.sa&&t.sa.ix===e?i.skewAxis:"Opacity"===e?i.opacity:"Position"===e?i.position:"Anchor Point"===e?i.anchorPoint:"Scale"===e?i.scale:"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:"Skew"===e?i.skew:"Skew Axis"===e?i.skewAxis:void 0}e.transform.mProps.o.setGroupProperty(s),e.transform.mProps.p.setGroupProperty(s),e.transform.mProps.a.setGroupProperty(s),e.transform.mProps.s.setGroupProperty(s),e.transform.mProps.r.setGroupProperty(s),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(s),e.transform.mProps.sa.setGroupProperty(s)),e.transform.op.setGroupProperty(s),Object.defineProperty(i,"opacity",{get:function(){return ExpressionValue(e.transform.mProps.o,1/e.transform.mProps.o.mult)}}),Object.defineProperty(i,"position",{get:function(){return ExpressionValue(e.transform.mProps.p)}}),Object.defineProperty(i,"anchorPoint",{get:function(){return ExpressionValue(e.transform.mProps.a)}});return Object.defineProperty(i,"scale",{get:function(){return ExpressionValue(e.transform.mProps.s,1/e.transform.mProps.s.mult)}}),Object.defineProperty(i,"rotation",{get:function(){return ExpressionValue(e.transform.mProps.r,1/e.transform.mProps.r.mult)}}),Object.defineProperty(i,"skew",{get:function(){return ExpressionValue(e.transform.mProps.sk)}}),Object.defineProperty(i,"skewAxis",{get:function(){return ExpressionValue(e.transform.mProps.sa)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.ty="tr",i.mn=t.mn,i}}(),P=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:void 0}i.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(s),a.p.setGroupProperty(s),Object.defineProperty(i,"size",{get:function(){return ExpressionValue(a.s)}}),Object.defineProperty(i,"position",{get:function(){return ExpressionValue(a.p)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),S=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:void 0:i.innerRadius}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.or.setGroupProperty(s),a.os.setGroupProperty(s),a.pt.setGroupProperty(s),a.p.setGroupProperty(s),a.r.setGroupProperty(s),t.ir&&(a.ir.setGroupProperty(s),a.is.setGroupProperty(s)),Object.defineProperty(i,"position",{get:function(){return ExpressionValue(a.p)}}),Object.defineProperty(i,"rotation",{get:function(){return ExpressionValue(a.r,1/a.r.mult)}}),Object.defineProperty(i,"points",{get:function(){return ExpressionValue(a.pt)}}),Object.defineProperty(i,"outerRadius",{get:function(){return ExpressionValue(a.or)}}),Object.defineProperty(i,"outerRoundness",{get:function(){return ExpressionValue(a.os)}}),Object.defineProperty(i,"innerRadius",{get:function(){return a.ir?ExpressionValue(a.ir):0}}),Object.defineProperty(i,"innerRoundness",{get:function(){return a.is?ExpressionValue(a.is,1/a.is.mult):0}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),x=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e?i.size:void 0}var a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.p.setGroupProperty(s),a.s.setGroupProperty(s),a.r.setGroupProperty(s),Object.defineProperty(i,"position",{get:function(){return ExpressionValue(a.p)}}),Object.defineProperty(i,"roundness",{get:function(){return ExpressionValue(a.r)}}),Object.defineProperty(i,"size",{get:function(){return ExpressionValue(a.s)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),C=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:void 0}var a=e;return i.propertyIndex=t.ix,a.rd.setGroupProperty(s),Object.defineProperty(i,"radius",{get:function(){return ExpressionValue(a.rd)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),k=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:void 0}var a=e;return i.propertyIndex=t.ix,a.c.setGroupProperty(s),a.o.setGroupProperty(s),Object.defineProperty(i,"copies",{get:function(){return ExpressionValue(a.c)}}),Object.defineProperty(i,"offset",{get:function(){return ExpressionValue(a.o)}}),Object.defineProperty(i,"_name",{get:function(){return t.nm}}),i.mn=t.mn,i}}(),A=function(){return function(t,e,r){function s(t){return 1==t?i:r(--t)}function i(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||2===t?i.path:void 0}var a=e.sh;return a.setGroupProperty(s),Object.defineProperty(i,"path",{get:function(){return a.k&&a.getValue(),a}}),Object.defineProperty(i,"shape",{get:function(){return a.k&&a.getValue(),a}}),Object.defineProperty(i,"_name",{value:t.nm}),Object.defineProperty(i,"ix",{value:t.ix}),Object.defineProperty(i,"mn",{value:t.mn}),i}}();return c}(),TextExpressionInterface=function(){return function(t){function e(){}return Object.defineProperty(e,"sourceText",{get:function(){return t.currentTextDocumentData.t?t.currentTextDocumentData.t:""}}),e}}(),LayerExpressionInterface=function(){function t(t,e){var r=new Matrix;r.reset();var s;if(s=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,s.applyToMatrix(r),this._elem.hierarchy&&this._elem.hierarchy.length){var i,a=this._elem.hierarchy.length;for(i=0;a>i;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(r);return r.applyToPointArray(t[0],t[1],t[2]||0)}return r.applyToPointArray(t[0],t[1],t[2]||0)}function e(t,e){var r=new Matrix;r.reset();var s;if(s=e?this._elem.finalTransform.mProp:this._elem.finalTransform.mProp,s.applyToMatrix(r),this._elem.hierarchy&&this._elem.hierarchy.length){var i,a=this._elem.hierarchy.length;for(i=0;a>i;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(r);return r.inversePoint(t)}return r.inversePoint(t)}function r(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var r,s=this._elem.hierarchy.length;for(r=0;s>r;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}return function(s){function i(t){n.mask=new MaskManagerInterface(t,s)}function a(t){n.effect=t}function n(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return n.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return o;case 4:case"ADBE Effect Parade":return n.effect}}var o=TransformExpressionInterface(s.transform);return n.toWorld=t,n.fromWorld=e,n.toComp=t,n.fromComp=r,n.sourceRectAtTime=s.sourceRectAtTime.bind(s),n._elem=s,Object.defineProperty(n,"hasParent",{get:function(){return!!s.hierarchy}}),Object.defineProperty(n,"parent",{get:function(){return s.hierarchy[0].layerInterface}}),Object.defineProperty(n,"rotation",{get:function(){return o.rotation}}),Object.defineProperty(n,"scale",{get:function(){return o.scale}}),Object.defineProperty(n,"position",{get:function(){return o.position}}),Object.defineProperty(n,"anchorPoint",{get:function(){return o.anchorPoint}}),Object.defineProperty(n,"transform",{get:function(){return o}}),Object.defineProperty(n,"width",{get:function(){return 0===s.data.ty?s.data.w:100}}),Object.defineProperty(n,"height",{get:function(){return 0===s.data.ty?s.data.h:100}}),Object.defineProperty(n,"source",{get:function(){return s.data.refId}}),Object.defineProperty(n,"index",{get:function(){return s.data.ind}}),Object.defineProperty(n,"_name",{value:s.data.nm}),Object.defineProperty(n,"content",{get:function(){return n.shapeInterface}}),Object.defineProperty(n,"active",{get:function(){return s.isVisible}}),Object.defineProperty(n,"text",{get:function(){return n.textInterface}}),n.registerMaskInterface=i,n.registerEffectsInterface=a,n}}(),CompExpressionInterface=function(){return function(t){function e(e){for(var r=0,s=t.layers.length;s>r;){if(t.layers[r].nm===e||t.layers[r].ind===e)return t.elements[r].layerInterface;r+=1}return{active:!1}}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.globalData.compSize.h,e.width=t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e}}(),TransformExpressionInterface=function(){return function(t){function e(r){switch(r){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity}}return Object.defineProperty(e,"rotation",{get:function(){return t.rotation}}),Object.defineProperty(e,"scale",{get:function(){return t.scale}}),Object.defineProperty(e,"position",{get:function(){return t.position}}),Object.defineProperty(e,"xPosition",{get:function(){return t.xPosition}}),Object.defineProperty(e,"yPosition",{get:function(){return t.yPosition}}),Object.defineProperty(e,"anchorPoint",{get:function(){return t.anchorPoint}}),Object.defineProperty(e,"opacity",{get:function(){return t.opacity}}),Object.defineProperty(e,"skew",{get:function(){return t.skew}}),Object.defineProperty(e,"skewAxis",{get:function(){return t.skewAxis}}),e}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,r=this.compositions.length;r>e;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),EffectsExpressionInterface=function(){function t(t,r){if(t.effects){var s,i=[],a=t.data.ef,n=t.effects.effectElements.length;for(s=0;n>s;s+=1)i.push(e(a[s],t.effects.effectElements[s],r,t));return function(e){for(var r=t.data.ef,s=0,a=r.length;a>s;){if(e===r[s].nm||e===r[s].mn||e===r[s].ix)return i[s];s+=1}}}}function e(t,s,i,a){var n,o=[],h=t.ef.length;for(n=0;h>n;n+=1)o.push(5===t.ef[n].ty?e(t.ef[n],s.effectElements[n],i,a):r(s.effectElements[n],t.ef[n].ty,a));var l=function(e){for(var r=t.ef,s=0,i=r.length;i>s;){if(e===r[s].nm||e===r[s].mn||e===r[s].ix)return 5===r[s].ty?o[s]:o[s]();s+=1}return o[0]()};return"ADBE Color Control"===t.mn&&Object.defineProperty(l,"color",{get:function(){return o[0]()}}),Object.defineProperty(l,"numProperties",{get:function(){return t.np}}),l.active=0!==t.en,l}function r(t,e,r){return function(){return 10===e?r.comp.compInterface(t.p.v):ExpressionValue(t.p)}}var s={createEffectsInterface:t};return s}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}});var e=function(e,r){var s,i=Array.apply(null,{length:e.viewData.length}),a=e.viewData.length;for(s=0;a>s;s+=1)i[s]=new t(e.viewData[s],e.masksProperties[s]);var n=function(t){for(s=0;a>s;){if(e.masksProperties[s].nm===t)return i[s];s+=1}};return n};return e}(),ExpressionValue=function(){return function(t,e,r){var s;t.k&&t.getValue();var i,a,n;if(r){if("color"===r){for(a=4,s=Array.apply(null,{length:a}),n=Array.apply(null,{length:a}),i=0;a>i;i+=1)s[i]=n[i]=e&&3>i?t.v[i]*e:1;s.value=n}}else if("number"==typeof t.v||t.v instanceof Number)s=new Number(e?t.v*e:t.v),s.value=e?t.v*e:t.v;else{for(a=t.v.length,s=Array.apply(null,{length:a}),n=Array.apply(null,{length:a}),i=0;a>i;i+=1)s[i]=n[i]=e?t.v[i]*e:t.v[i];s.value=n}return s.numKeys=t.keyframes?t.keyframes.length:0,s.key=function(e){return s.numKeys?t.keyframes[e-1].t:0},s.valueAtTime=t.getValueAtTime,s.propertyGroup=t.propertyGroup,s}}();GroupEffect.prototype.getValue=function(){this.mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.mdf=this.dynamicProperties[t].mdf?!0:this.mdf},GroupEffect.prototype.init=function(t,e,r){this.data=t,this.mdf=!1,this.effectElements=[];var s,i,a=this.data.ef.length,n=this.data.ef;for(s=0;a>s;s+=1)switch(n[s].ty){case 0:i=new SliderEffect(n[s],e,r),this.effectElements.push(i);break;case 1:i=new AngleEffect(n[s],e,r),this.effectElements.push(i);break;case 2:i=new ColorEffect(n[s],e,r),this.effectElements.push(i);break;case 3:i=new PointEffect(n[s],e,r),this.effectElements.push(i);break;case 4:case 7:i=new CheckboxEffect(n[s],e,r),this.effectElements.push(i);break;case 10:i=new LayerIndexEffect(n[s],e,r),this.effectElements.push(i);break;case 11:i=new MaskIndexEffect(n[s],e,r),this.effectElements.push(i);break;case 5:i=new EffectsManager(n[s],e,r),this.effectElements.push(i);break;case 6:i=new NoValueEffect(n[s],e,r),this.effectElements.push(i)}};var bodymovinjs={};bodymovinjs.play=play,bodymovinjs.pause=pause,bodymovinjs.setLocationHref=setLocationHref,bodymovinjs.togglePause=togglePause,bodymovinjs.setSpeed=setSpeed,bodymovinjs.setDirection=setDirection,bodymovinjs.stop=stop,bodymovinjs.moveFrame=moveFrame,bodymovinjs.searchAnimations=searchAnimations,bodymovinjs.registerAnimation=registerAnimation,bodymovinjs.loadAnimation=loadAnimation,bodymovinjs.setSubframeRendering=setSubframeRendering,bodymovinjs.resize=resize,bodymovinjs.start=start,bodymovinjs.goToAndStop=goToAndStop,bodymovinjs.destroy=destroy,bodymovinjs.setQuality=setQuality,bodymovinjs.inBrowser=inBrowser,bodymovinjs.installPlugin=installPlugin,bodymovinjs.__getFactory=getFactory,bodymovinjs.version="4.12.0";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""},queryString=myScript.src.replace(/^[^\?]+\??/,"");renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);return bodymovinjs});;
// Set Current Date in QR Modal Animation
var mcDate = new Date();
var mcDatestring = ("0" + (mcDate.getMonth() + 1).toString()).substr(-2) + "/" + ("0" + mcDate.getDate().toString()).substr(-2) + "/" + (mcDate.getFullYear().toString()).substr(2);

var mcNumber = mcDatestring;
$(".member-date").html(mcNumber);


/////////////////////
// QR Code Animation Header
/////////////////////

// JSON Animation
var animationDataQRHeader = { "v": "4.12.0", "fr": 60, "ip": 0, "op": 341, "w": 50, "h": 70, "nm": "ExportComp", "ddd": 0, "assets": [], "layers": [{ "ddd": 0, "ind": 1, "ty": 4, "nm": "movie-ticket", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [29.464, 31.815, 0], "ix": 2, "x": "var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}" }, "a": { "a": 0, "k": [92.948, 156.254, 0], "ix": 1 }, "s": { "a": 0, "k": [15.098, 15.098, 100], "ix": 6 } }, "ao": 0, "ef": [{ "ty": 5, "nm": "Position - Overshoot", "np": 3, "mn": "ADBE Slider Control", "ix": 1, "en": 1, "ef": [{ "ty": 0, "nm": "Slider", "mn": "ADBE Slider Control-0001", "ix": 1, "v": { "a": 0, "k": 20, "ix": 1, "x": "var $bm_rt;\n$bm_rt = Math.min(Math.max(0,val),100);" } }] }, { "ty": 5, "nm": "Position - Bounce", "np": 3, "mn": "ADBE Slider Control", "ix": 2, "en": 1, "ef": [{ "ty": 0, "nm": "Slider", "mn": "ADBE Slider Control-0001", "ix": 1, "v": { "a": 0, "k": 35, "ix": 1, "x": "var $bm_rt;\n$bm_rt = Math.min(Math.max(0,val),100);" } }] }, { "ty": 5, "nm": "Position - Friction", "np": 3, "mn": "ADBE Slider Control", "ix": 3, "en": 1, "ef": [{ "ty": 0, "nm": "Slider", "mn": "ADBE Slider Control-0001", "ix": 1, "v": { "a": 0, "k": 44, "ix": 1, "x": "var $bm_rt;\n$bm_rt = Math.min(Math.max(0,val),100);" } }] }], "shapes": [{ "ty": "gr", "it": [{ "ind": 0, "ty": "sh", "ix": 1, "ks": { "a": 1, "k": [{ "i": { "x": 0.2, "y": 1 }, "o": { "x": 1, "y": 0 }, "n": "0p2_1_1_0", "t": -2, "s": [{ "i": [[-0.05, -0.33], [0, 0], [0, 0], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [0, 0], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87], [-0.05, -0.33], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87]], "o": [[0, 0], [0, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 0], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34]], "v": [[10.07, 97], [0, 97], [0, 0], [10, 0], [17, 7], [24, 0], [33, 0], [40, 7], [47, 0], [57, 0], [57, 97], [46.93, 97], [47, 96], [40, 89], [33, 96], [33.07, 97], [23.93, 97], [24, 96], [17, 89], [10, 96]], "c": true }], "e": [{ "i": [[-0.05, -0.33], [0, 0], [0, 0], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [0, 0], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87], [-0.05, -0.33], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87]], "o": [[0, 0], [0, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 0], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34]], "v": [[10.07, 97], [0, 97], [0, 0], [10, 0], [17, 7], [24, 0], [33, 0], [40, 7], [47, 0], [57, 0], [57, 97], [46.93, 97], [47, 96], [40, 89], [33, 96], [33.07, 97], [23.93, 97], [24, 96], [17, 89], [10, 96]], "c": true }] }, { "i": { "x": 0.2, "y": 1 }, "o": { "x": 1, "y": 0 }, "n": "0p2_1_1_0", "t": 68, "s": [{ "i": [[-0.05, -0.33], [0, 0], [0, 0], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [0, 0], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87], [-0.05, -0.33], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87]], "o": [[0, 0], [0, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 0], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34]], "v": [[10.07, 97], [0, 97], [0, 0], [10, 0], [17, 7], [24, 0], [33, 0], [40, 7], [47, 0], [57, 0], [57, 97], [46.93, 97], [47, 96], [40, 89], [33, 96], [33.07, 97], [23.93, 97], [24, 96], [17, 89], [10, 96]], "c": true }], "e": [{ "i": [[0, 0], [0, 0], [0, 0], [-0.085, 0.1], [-0.14, 0.01], [-5.559, 0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [-0.093, -0.094], [0, -0.145], [0, 0]], "o": [[0, 0], [0, 0], [-0.01, -0.14], [0.085, -0.1], [0.005, -0.005], [5.559, -0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0.14, 0], [0.093, 0.094], [0, 0.01], [0, 0]], "v": [[11.475, 94.747], [8.365, 53.792], [5.255, 12.837], [5.377, 12.464], [5.725, 12.287], [16.849, 12.278], [27.965, 12.277], [27.965, 5.957], [27.965, -0.363], [32.71, -1.808], [37.455, -3.253], [32.71, -1.808], [27.965, -0.363], [27.965, 5.957], [27.965, 12.277], [38.355, 12.277], [48.745, 12.277], [49.105, 12.428], [49.255, 12.797], [43.755, 94.747]], "c": true }] }, { "i": { "x": 0.2, "y": 1 }, "o": { "x": 0.79, "y": 0 }, "n": "0p2_1_0p79_0", "t": 110, "s": [{ "i": [[0, 0], [0, 0], [0, 0], [-0.085, 0.1], [-0.14, 0.01], [-5.559, 0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [-0.093, -0.094], [0, -0.145], [0, 0]], "o": [[0, 0], [0, 0], [-0.01, -0.14], [0.085, -0.1], [0.005, -0.005], [5.559, -0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0.14, 0], [0.093, 0.094], [0, 0.01], [0, 0]], "v": [[11.475, 94.747], [8.365, 53.792], [5.255, 12.837], [5.377, 12.464], [5.725, 12.287], [16.849, 12.278], [27.965, 12.277], [27.965, 5.957], [27.965, -0.363], [32.71, -1.808], [37.455, -3.253], [32.71, -1.808], [27.965, -0.363], [27.965, 5.957], [27.965, 12.277], [38.355, 12.277], [48.745, 12.277], [49.105, 12.428], [49.255, 12.797], [43.755, 94.747]], "c": true }], "e": [{ "i": [[0, 0], [0, 0], [0, 0], [-0.085, 0.1], [-0.14, 0.01], [-5.559, 0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [-0.093, -0.094], [0, -0.145], [0, 0]], "o": [[0, 0], [0, 0], [-0.01, -0.14], [0.085, -0.1], [0.005, -0.005], [5.559, -0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0.14, 0], [0.093, 0.094], [0, 0.01], [0, 0]], "v": [[11.475, 94.747], [8.365, 53.792], [5.255, 12.837], [5.377, 12.464], [5.725, 12.287], [16.849, 12.278], [27.965, 12.277], [27.965, 5.957], [27.965, -0.363], [32.71, -1.808], [37.455, -3.253], [32.71, -1.808], [27.965, -0.363], [27.965, 5.957], [27.965, 12.277], [38.355, 12.277], [48.745, 12.277], [49.105, 12.428], [49.255, 12.797], [43.755, 94.747]], "c": true }] }, { "i": { "x": 0.2, "y": 1 }, "o": { "x": 0.8, "y": 0 }, "n": "0p2_1_0p8_0", "t": 180, "s": [{ "i": [[0, 0], [0, 0], [0, 0], [-0.085, 0.1], [-0.14, 0.01], [-5.559, 0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [-0.093, -0.094], [0, -0.145], [0, 0]], "o": [[0, 0], [0, 0], [-0.01, -0.14], [0.085, -0.1], [0.005, -0.005], [5.559, -0.001], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0.14, 0], [0.093, 0.094], [0, 0.01], [0, 0]], "v": [[11.475, 94.747], [8.365, 53.792], [5.255, 12.837], [5.377, 12.464], [5.725, 12.287], [16.849, 12.278], [27.965, 12.277], [27.965, 5.957], [27.965, -0.363], [32.71, -1.808], [37.455, -3.253], [32.71, -1.808], [27.965, -0.363], [27.965, 5.957], [27.965, 12.277], [38.355, 12.277], [48.745, 12.277], [49.105, 12.428], [49.255, 12.797], [43.755, 94.747]], "c": true }], "e": [{ "i": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "v": [[-14.822, 36.361], [0.498, 34.981], [15.818, 33.601], [21.868, 19.451], [27.918, 5.301], [34.128, 19.451], [40.338, 33.601], [55.258, 34.981], [70.178, 36.361], [59.243, 46.321], [48.308, 56.281], [50.958, 70.791], [53.608, 85.301], [40.763, 78.176], [27.918, 71.051], [15.098, 78.176], [2.278, 85.301], [4.998, 70.791], [7.718, 56.281], [-3.552, 46.321]], "c": true }] }, { "i": { "x": 0.2, "y": 1 }, "o": { "x": 0.8, "y": 0 }, "n": "0p2_1_0p8_0", "t": 224, "s": [{ "i": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "v": [[-14.822, 36.361], [0.498, 34.981], [15.818, 33.601], [21.868, 19.451], [27.918, 5.301], [34.128, 19.451], [40.338, 33.601], [55.258, 34.981], [70.178, 36.361], [59.243, 46.321], [48.308, 56.281], [50.958, 70.791], [53.608, 85.301], [40.763, 78.176], [27.918, 71.051], [15.098, 78.176], [2.278, 85.301], [4.998, 70.791], [7.718, 56.281], [-3.552, 46.321]], "c": true }], "e": [{ "i": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "v": [[-14.822, 36.361], [0.498, 34.981], [15.818, 33.601], [21.868, 19.451], [27.918, 5.301], [34.128, 19.451], [40.338, 33.601], [55.258, 34.981], [70.178, 36.361], [59.243, 46.321], [48.308, 56.281], [50.958, 70.791], [53.608, 85.301], [40.763, 78.176], [27.918, 71.051], [15.098, 78.176], [2.278, 85.301], [4.998, 70.791], [7.718, 56.281], [-3.552, 46.321]], "c": true }] }, { "i": { "x": 0.2, "y": 1 }, "o": { "x": 0.8, "y": 0 }, "n": "0p2_1_0p8_0", "t": 295, "s": [{ "i": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], "v": [[-14.822, 36.361], [0.498, 34.981], [15.818, 33.601], [21.868, 19.451], [27.918, 5.301], [34.128, 19.451], [40.338, 33.601], [55.258, 34.981], [70.178, 36.361], [59.243, 46.321], [48.308, 56.281], [50.958, 70.791], [53.608, 85.301], [40.763, 78.176], [27.918, 71.051], [15.098, 78.176], [2.278, 85.301], [4.998, 70.791], [7.718, 56.281], [-3.552, 46.321]], "c": true }], "e": [{ "i": [[-0.05, -0.33], [0, 0], [0, 0], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [-3.87, 0], [0, 3.87], [0, 0], [0, 0], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87], [-0.05, -0.33], [0, 0], [0, 0.34], [3.87, 0], [0, -3.87]], "o": [[0, 0], [0, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 3.87], [3.87, 0], [0, 0], [0, 0], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34], [0, 0], [0.05, -0.33], [0, -3.87], [-3.87, 0], [0, 0.34]], "v": [[10.07, 97], [0, 97], [0, 0], [10, 0], [17, 7], [24, 0], [33, 0], [40, 7], [47, 0], [57, 0], [57, 97], [46.93, 97], [47, 96], [40, 89], [33, 96], [33.07, 97], [23.93, 97], [24, 96], [17, 89], [10, 96]], "c": true }] }, { "t": 338 }], "ix": 2 }, "nm": "Path 1", "mn": "ADBE Vector Shape - Group", "hd": false }, { "ty": "st", "c": { "a": 0, "k": [0.066666670144, 0.066666670144, 0.066666670144, 1], "ix": 3 }, "o": { "a": 0, "k": 100, "ix": 4 }, "w": { "a": 0, "k": 3, "ix": 5 }, "lc": 1, "lj": 1, "ml": 4, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [0.8666666666666667, 0, 0, 1], "ix": 4 }, "o": { "a": 0, "k": 100, "ix": 5 }, "r": 1, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [-36.216, 15.653], "ix": 2 }, "a": { "a": 0, "k": [0, 0], "ix": 1 }, "s": { "a": 0, "k": [332.797, 332.797], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "Transform" }], "nm": "Group 1", "np": 3, "cix": 2, "ix": 1, "mn": "ADBE Vector Group", "hd": false }], "ip": 0, "op": 1800, "st": 0, "bm": 0 }] };

// Unique Params for member-animate-modal
var paramsQRHeader = {
	container: document.getElementById('member-animate-modal-header'),
	renderer: 'svg',
	loop: true,
	autoplay: true,
	animationData: animationDataQRHeader
};

// Set Animation Name
var animQRHeader;

// Load Animation into BodyMovin. Will look for ID container. Move this into partial unless ID is global
if ($(".member-animate-modal").length)
    animQRHeader = bodymovin.loadAnimation(paramsQRHeader);
;
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
var Cinemark;
(function (Cinemark) {
    class GeoLocation {
        constructor() {
            this.isSuccessful = false;
            this.wasPermissionDenied = false;
            this.findGeoPosition();
        }
        findGeoPosition() {
            try {
                if (navigator.geolocation) {
                    const options = {
                        enableHighAccuracy: true,
                        maximumAge: 30000,
                        timeout: 27000,
                    };
                    navigator.geolocation.getCurrentPosition((position) => {
                        this.successCallback(position);
                    }, (error) => {
                        this.errorCallback(error);
                    }, options);
                }
            }
            catch (exception) {
                this.isSuccessful = false;
            }
        }
        successCallback(position) {
            this.latitude = position.coords.latitude.toString();
            this.longitude = position.coords.longitude.toString();
            this.errorMessage = '';
            this.isSuccessful = true;
            const geolocation = `${this.latitude},${this.longitude}`;
            setCookie('LastGeoPosition', geolocation);
            jQuery(document).trigger('GeoCallbackComplete', [this.isSuccessful, this.latitude, this.longitude, this.wasPermissionDenied]);
        }
        errorCallback(error) {
            this.errorMessage = this.generateErrorMessage(error);
            this.isSuccessful = false;
            if (typeof promptLocationServices !== 'undefined' && this.wasPermissionDenied) {
                const locationBlockedModal = $('#locationBlockedModal');
                if (locationBlockedModal) {
                    locationBlockedModal.modal('show');
                }
            }
            jQuery(document).trigger('GeoCallbackComplete', [this.isSuccessful, '0', '0', this.wasPermissionDenied]);
        }
        generateErrorMessage(positionError) {
            switch (positionError.code) {
                case positionError.PERMISSION_DENIED:
                    this.wasPermissionDenied = true;
                    return 'User denied the request for Geolocation.';
                case positionError.POSITION_UNAVAILABLE:
                    return 'Location information is unavailable.';
                case positionError.TIMEOUT:
                    return 'The request to get user location timed out.';
                default:
                    return 'An unknown error occurred.';
            }
        }
    }
    Cinemark.GeoLocation = GeoLocation;
})(Cinemark || (Cinemark = {}));
//# sourceMappingURL=geolocation.js.map;
/* eslint-disable spaced-comment */
/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="../typings/jqueryui/jqueryui.d.ts" />
/* eslint-enable spaced-comment */
var Cinemark;
(function (Cinemark) {
    var PolicyModals;
    (function (PolicyModals_1) {
        class Elements {
            constructor() {
                this.faqLink = $('.faqLink');
                this.faqModalTitle = $('#faqModalTitle');
                this.faqModalContent = $('.faqModalContent');
                this.faqModal = $('#faqModal');
                this.termsAndConditionsLink = $('.termsAndConditionsLink');
                this.termsAndConditionContentDiv = $('.termsAndConditionContent');
                this.termsAndConditionsModal = $('#termsAndConditionsModal');
                this.privacyPolicyLink = $('.privacyPolicyLink');
                this.privacyPolicyContentDiv = $('.privacyPolicyContent');
                this.privacyPolicyModal = $('#privacyPolicyModal');
            }
        }
        PolicyModals_1.Elements = Elements;
        class PolicyModals {
            constructor() {
                this.elements = new Elements();
            }
            initialize() {
                if (this.elements.termsAndConditionsModal) {
                    this.elements.termsAndConditionsModal.modal({
                        keyboard: false,
                        show: false,
                    });
                    this.elements.termsAndConditionsLink.on('click', (e) => {
                        e.preventDefault();
                        $.ajax({
                            url: `${Cinemark.getBaseUmbracoApiUrl()}ContentPage/TermsAndConditions`,
                            dataType: 'html',
                            cache: false,
                        }).done((result) => {
                            this.elements.termsAndConditionContentDiv.html(result);
                            this.elements.termsAndConditionsModal.modal('show');
                        });
                    });
                }
                if (this.elements.privacyPolicyModal) {
                    this.elements.privacyPolicyModal.modal({
                        keyboard: false,
                        show: false,
                    });
                    this.elements.privacyPolicyLink.on('click', (e) => {
                        e.preventDefault();
                        $.ajax({
                            url: `${Cinemark.getBaseUmbracoApiUrl()}ContentPage/PrivacyPolicy`,
                            dataType: 'html',
                            cache: false,
                        }).done((result) => {
                            this.elements.privacyPolicyContentDiv.html(result);
                            this.elements.privacyPolicyModal.modal('show');
                        });
                    });
                }
                if (this.elements.faqModal) {
                    this.elements.faqModal.modal({
                        keyboard: false,
                        show: false,
                    });
                    this.elements.faqLink.on('click', (e) => {
                        e.preventDefault();
                        const faqPageName = this.elements.faqLink.attr('data-page-name');
                        $.ajax({
                            url: `${Cinemark.getBaseUmbracoApiUrl()}ContentPage/GetByName`,
                            data: { pageName: faqPageName },
                            dataType: 'html',
                            cache: false,
                        }).done((result) => {
                            this.elements.faqModalTitle.html(faqPageName);
                            this.elements.faqModalContent.html(result);
                            this.elements.faqModal.modal('show');
                        });
                    });
                }
            }
        }
        PolicyModals_1.PolicyModals = PolicyModals;
    })(PolicyModals = Cinemark.PolicyModals || (Cinemark.PolicyModals = {}));
})(Cinemark || (Cinemark = {}));
$(document)
    .ready(() => {
    new Cinemark.PolicyModals.PolicyModals().initialize();
});
//# sourceMappingURL=policyModals.js.map;
/* eslint-disable spaced-comment */
/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="../typings/jqueryui/jqueryui.d.ts" />
/* eslint-enable spaced-comment */
var Cinemark;
(function (Cinemark) {
    let SimpleEmailSubscribe;
    (function (SimpleEmailSubscribe) {
        class Elements {
            constructor() {
                this.emailSubscribeFormDiv = $('#emailSubscribeFormDiv');
                this.emailSubscribeInitialDiv = $('#emailSubscribeInitialDiv');
                this.emailSubscribeLink = $('#emailSubscribeLink');
            }
        }
        SimpleEmailSubscribe.Elements = Elements;
        class SimpleEmailSubscribeForm {
            constructor() {
                this.elements = new Elements();
            }
            initialize() {
                if (this.elements.emailSubscribeLink) {
                    this.elements.emailSubscribeLink.on('click', () => {
                        this.elements.emailSubscribeInitialDiv.toggle(false);
                        this.elements.emailSubscribeFormDiv.toggle(true);
                    });
                }
            }
        }
        SimpleEmailSubscribe.SimpleEmailSubscribeForm = SimpleEmailSubscribeForm;
    })(SimpleEmailSubscribe = Cinemark.SimpleEmailSubscribe || (Cinemark.SimpleEmailSubscribe = {}));
})(Cinemark || (Cinemark = {}));
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
function emailSubscribeCallback() {
    let tealiumData;
    if (typeof utag_data !== 'undefined') {
        tealiumData = {
            /* eslint-disable @typescript-eslint/naming-convention */
            customer_email: $('#emailSubscribeSuccessDiv').data('email'),
            customer_id: utag_data.customer_id,
            customer_type: utag_data.customer_type,
            /* eslint-enable @typescript-eslint/naming-convention */
        };
    }
    new Cinemark.Tracking.Tealium().TrackEvent('email_signup', tealiumData);
    dataLayer.push({
        event: 'emailFooterSubmission',
        emailFooterHash: $('#FormFields_EmailAddrHash').val(),
    });
}
$(document).ready(() => {
    new Cinemark.SimpleEmailSubscribe.SimpleEmailSubscribeForm().initialize();
});
//# sourceMappingURL=simpleEmailSubscribe.js.map;
var Cinemark;
(function (Cinemark) {
    let Carousel;
    (function (Carousel) {
        class Elements {
        }
        Carousel.Elements = Elements;
        class View {
            constructor(elements, controller) {
                this.elements = elements;
                this.controller = controller;
                this.init();
            }
            init() {
                // Return if IntersectionObserver is unsupported (IE11)
                if (!('IntersectionObserver' in window) ||
                    !('IntersectionObserverEntry' in window) ||
                    !('intersectionRatio' in window.IntersectionObserverEntry.prototype) ||
                    !('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
                    return;
                }
                if (this.elements.items.length) {
                    if (this.elements.buttons) {
                        this.elements.buttons.forEach((button) => {
                            button.addEventListener('click', () => {
                                this.controller.navigateToSlide(button);
                            });
                        });
                    }
                    this.elements.itemActiveIndex = this.controller.getActiveItemIndex(this.elements.items);
                    // Make sure the active item is visible to the user
                    if (this.elements.carousel.classList.contains('carousel--showdates')) {
                        // Centers active date for showdates carousel on init
                        let activeItem = this.elements.items[this.elements.itemActiveIndex];
                        let carouselClientWidth = this.elements.carousel.clientWidth;
                        this.elements.carousel.scrollLeft = activeItem.offsetLeft - (carouselClientWidth - activeItem.clientWidth) * .5;
                    }
                    else {
                        this.elements.carousel.scrollLeft = this.elements.items[this.elements.itemActiveIndex].offsetLeft;
                    }
                    // Set the threshold for specific carousels. Default is 0.51 or 51% of carousel item is visible
                    let thresholdLimit;
                    if (this.elements.carousel.classList.contains('carousel--concession-combo') || this.elements.carousel.classList.contains('carousel--concession-feature')) {
                        thresholdLimit = 0.99;
                    }
                    else {
                        thresholdLimit = 0.51;
                    }
                    // IntersectionObserver Options
                    const options = {
                        threshold: thresholdLimit,
                        root: this.elements.carousel, // Set the carousel container as the viewport to determine if a slide is currently inside it
                    };
                    // .bind(this) passes through the Elements as this context, so we can access the elements we need
                    const observer = new IntersectionObserver(this.controller.handleIntersect.bind(this), options);
                    setTimeout(() => {
                        this.elements.items.forEach((item) => {
                            observer.observe(item);
                        });
                    }, 300);
                    this.elements.carousel.classList.remove('hidden');
                    this.elements.buttons.forEach((button) => {
                        button.classList.remove('hidden');
                    });
                }
                else {
                    this.elements.carousel.classList.add('hidden');
                    this.elements.buttons.forEach((button) => {
                        button.classList.add('hidden');
                    });
                }
            }
        }
        Carousel.View = View;
        class Controller {
            constructor(elements) {
                this.elements = elements;
            }
            navigateToSlide(button) {
                const items = this.elements.items;
                const visibleItems = [];
                let nextIndex;
                // Add all visible items in carousel to an array
                items.forEach((element) => {
                    if (element.classList.contains('item-visible')) {
                        visibleItems.push(element);
                    }
                });
                // Set the index of the first visible item
                const visibleIndex = items.indexOf(visibleItems[0]);
                // Dynamically set the next index to scroll into view based on how many items are visible
                if (button.classList.contains('showdates-prev') || button.classList.contains('showdates-next')) {
                    nextIndex = button.classList.contains('carousel-next') ? visibleIndex + visibleItems.length - 2 : visibleIndex - visibleItems.length + 2;
                }
                else {
                    nextIndex = button.classList.contains('carousel-next') ? visibleIndex + visibleItems.length : visibleIndex - visibleItems.length;
                }
                // Prevent the next index from being negative
                nextIndex = nextIndex > 0 ? nextIndex : 0;
                if (items[nextIndex]) {
                    items[nextIndex].scrollIntoView({
                        behavior: 'smooth',
                        block: 'nearest',
                        inline: 'start',
                    });
                }
            }
            // TODO: Refactor this to return after it finds the first matching element
            getActiveItemIndex(items) {
                let itemActiveIndex;
                items.forEach((element) => {
                    if (element.classList.contains('item-selected')) {
                        itemActiveIndex = items.indexOf(element);
                    }
                });
                return itemActiveIndex || 0;
            }
            // Callback that executes when an element is observed entering the viewport
            handleIntersect(entries) {
                const items = this.elements.items;
                const buttons = this.elements.buttons;
                const visibleItems = [];
                entries.forEach((entry) => {
                    // Check if the entry is intersecting with origin
                    // This determines the active slide
                    if (entry.isIntersecting) {
                        entry.target.classList.add('item-visible');
                        visibleItems.push(entry.target);
                        // Determine if the first or last visibleItems index should be used to determine nav button display
                        let itemIndex;
                        if (items.indexOf(visibleItems[0]) === 0) {
                            itemIndex = items.indexOf(visibleItems[0]);
                        }
                        else {
                            itemIndex = items.indexOf(visibleItems[visibleItems.length - 1]);
                        }
                        // Show/Hide carousel navigation buttons if user is at start or end of carousel
                        if (buttons) {
                            if (visibleItems.length - 1 >= items.length - 1) { // Handle if visible items are more than the entire item list
                                buttons.forEach((button) => {
                                    button.classList.add('disabled');
                                });
                            }
                            else if (itemIndex === 0) {
                                buttons[0].classList.add('disabled'); // Prev button
                                buttons[1].classList.remove('disabled'); // Next button
                            }
                            else if (itemIndex === items.length - 1) {
                                buttons[0].classList.remove('disabled'); // Prev button
                                buttons[1].classList.add('disabled'); // Next button
                            }
                            else {
                                buttons.forEach((button) => {
                                    button.classList.remove('disabled');
                                });
                            }
                        }
                    }
                    else {
                        entry.target.classList.remove('item-visible');
                    }
                });
            }
        }
        Carousel.Controller = Controller;
    })(Carousel = Cinemark.Carousel || (Cinemark.Carousel = {}));
})(Cinemark || (Cinemark = {}));
$(document)
    .on('InitCarousels', () => {
    const carousels = Array.prototype.slice.call(document.querySelectorAll('.carousel'));
    const bannerCarousel = Array.prototype.slice.call(document.querySelectorAll('#bannerHeroCarousel'));
    if (carousels.length) {
        carousels.forEach((carousel) => {
            const elements = new Cinemark.Carousel.Elements();
            elements.carousel = carousel;
            elements.items = Array.prototype.slice.call(carousel.querySelectorAll('.carousel__item'));
            elements.buttons = Array.prototype.slice.call(carousel.nextElementSibling.querySelectorAll('.carousel-navigation'));
            const controller = new Cinemark.Carousel.Controller(elements);
            new Cinemark.Carousel.View(elements, controller);
        });
    }
    // check for hero banner carousel
    if (bannerCarousel.length) {
        const bannerCarouselSlides = bannerCarousel[0].querySelectorAll('.carousel__item');
        const slideHeights = [];
        // get height of all slides, put in an array
        bannerCarouselSlides.forEach((slide) => {
            slideHeights.push(slide.clientHeight);
        });
        // get the value for the tallest slide
        const tallestSlideHeight = Math.max(...slideHeights);
        // set height as inline style on each slide
        bannerCarouselSlides.forEach((slide) => {
            slide.setAttribute('style', `height: ${tallestSlideHeight}px; display: flex;`);
        });
    }
});
document.addEventListener('DOMContentLoaded', () => {
    jQuery(document).trigger('InitCarousels');
});
//# sourceMappingURL=carousel.js.map;
// FIXME: until we type the window we cannot fix dot notation linting. Example on how to type:
// https://cinemarkus.visualstudio.com/AppDev/_wiki/wikis/AppDev.wiki/733/TODOs
/* eslint-disable-next-line spaced-comment */
/// <reference path="../../typings/google.analytics/ga.d.ts" />
var Cinemark;
(function (Cinemark) {
    let WebAnalyticsFramework;
    (function (WebAnalyticsFramework) {
        let SupportingEnumerations;
        (function (SupportingEnumerations) {
            let WebAnalyticsAttributeTypeEnum;
            (function (WebAnalyticsAttributeTypeEnum) {
                WebAnalyticsAttributeTypeEnum["GAEventLevel"] = "ga-event";
                WebAnalyticsAttributeTypeEnum["GAEventCategory"] = "ga-category";
                WebAnalyticsAttributeTypeEnum["GAEventClickAction"] = "ga-click-action";
                WebAnalyticsAttributeTypeEnum["GAEventLabel"] = "ga-label";
            })(WebAnalyticsAttributeTypeEnum = SupportingEnumerations.WebAnalyticsAttributeTypeEnum || (SupportingEnumerations.WebAnalyticsAttributeTypeEnum = {}));
        })(SupportingEnumerations = WebAnalyticsFramework.SupportingEnumerations || (WebAnalyticsFramework.SupportingEnumerations = {}));
        // FIXME: I'm sure this can be changed to "Log" but I was afraid because of the use from window['cwa'].LOG = Cinemark.WebAnalyticsFramework.LOG
        /* eslint-disable-next-line @typescript-eslint/naming-convention */
        function LOG(msg) {
            const convertedMessage = typeof msg === 'string' ? msg : JSON.stringify(msg);
            if (Toolbox.AnalyticsSettings.isDebugMode()) {
                /* eslint-disable-next-line no-console */
                console.log(convertedMessage);
            }
        }
        WebAnalyticsFramework.LOG = LOG;
        let Toolbox;
        (function (Toolbox) {
            // used for debug only - Will identify tag registrations in the UI
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class AnalyticsSettings {
                static isDebugMode() {
                    return window.sessionStorage.UseDebug === 'true';
                }
            }
            Toolbox.AnalyticsSettings = AnalyticsSettings;
            class DebugHelper {
                constructor() {
                    this.dataLayerPropertyName = 'gtm-universal';
                }
                static revealAllRegistrations(t = AnalyticsSettings.isDebugMode()) {
                    DebugHelper.RevealClickRegistrations = t;
                    DebugHelper.RevealCategoryRegistrations = t;
                    DebugHelper.RevealEventLevelRegistrations = t;
                    DebugHelper.RevealLabelRegistrations = t;
                }
                static turnOnDebug() {
                    window.sessionStorage.UseDebug = true;
                    DebugHelper.revealAllRegistrations();
                    return 'Debug On';
                }
                static turnOffDebug() {
                    window.sessionStorage.UseDebug = false;
                    DebugHelper.revealAllRegistrations();
                    return 'Debug Off';
                }
                /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable accessor-pairs */
                static set RevealClickRegistrations(on) {
                    DebugHelper.revealClickRegistrations = on;
                    DebugHelper.showOrHideClickActionTags(on);
                }
                static set RevealCategoryRegistrations(on) {
                    DebugHelper.revealCategoryRegistrations = on;
                    DebugHelper.showOrHideCategoryTags(on);
                }
                static set RevealEventLevelRegistrations(on) {
                    DebugHelper.revealEventLevelRegistrations = on;
                    DebugHelper.showOrHideEventLevelTags(on);
                }
                static set RevealLabelRegistrations(on) {
                    DebugHelper.revealLabelRegistrations = on;
                    DebugHelper.showOrHideEventLabelTags(on);
                }
                /* eslint-enable @typescript-eslint/naming-convention */ /* eslint-enable accessor-pairs */
                static showOrHideClickActionTags(on) {
                    document.querySelectorAll(`[${SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventClickAction}]`)
                        .forEach((element) => {
                        const elementAsHTMLElement = element;
                        elementAsHTMLElement.style.border = on ? '3px red dashed' : null;
                        elementAsHTMLElement.title = on
                            ? `ACT::Tag: ${elementAsHTMLElement.tagName}\tId: ${elementAsHTMLElement.id || 'not provided'}\tClasses:
                ${JSON.stringify(elementAsHTMLElement.classList)}`
                            : elementAsHTMLElement.title;
                    });
                }
                static showOrHideEventLevelTags(on) {
                    document.querySelectorAll(`[${SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLevel}]`)
                        .forEach((element) => {
                        const elementAsHTMLElement = element;
                        elementAsHTMLElement.style.border = on ? '3px blue dotted' : null;
                        elementAsHTMLElement.title = on
                            ? `EVTLVL::Tag: ${elementAsHTMLElement.tagName}\tId: ${elementAsHTMLElement.id || 'not provided'}\tClasses:
                ${JSON.stringify(elementAsHTMLElement.classList)}`
                            : elementAsHTMLElement.title;
                    });
                }
                static showOrHideEventLabelTags(on) {
                    document.querySelectorAll(`[${SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLabel}]`)
                        .forEach((element) => {
                        const elementAsHTMLElement = element;
                        elementAsHTMLElement.style.border = on ? '3px lime dotted' : null;
                        elementAsHTMLElement.title = on
                            ? `EVTLAB::Tag: ${elementAsHTMLElement.tagName}\tId: ${elementAsHTMLElement.id || 'not provided'}\tClasses:
                ${JSON.stringify(elementAsHTMLElement.classList)}`
                            : elementAsHTMLElement.title;
                    });
                }
                static showOrHideCategoryTags(on) {
                    document.querySelectorAll(`[${SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventCategory}]`)
                        .forEach((element) => {
                        const elementAsHTMLElement = element;
                        elementAsHTMLElement.style.border = on ? '3px purple dotted' : null;
                        elementAsHTMLElement.title = on
                            ? `CAT::Tag: ${elementAsHTMLElement.tagName}\tId: ${elementAsHTMLElement.id || 'not provided'}\tClasses:
                ${JSON.stringify(elementAsHTMLElement.classList)}`
                            : elementAsHTMLElement.title;
                    });
                }
            }
            DebugHelper.revealClickRegistrations = false;
            DebugHelper.revealCategoryRegistrations = false;
            DebugHelper.revealEventLevelRegistrations = false;
            DebugHelper.revealLabelRegistrations = false;
            Toolbox.DebugHelper = DebugHelper;
            // convert to session storage
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class SessionVariableManager {
                static setStorageKey(name = SessionVariableManager.webAnalyticsDataReferenceName, val = null) {
                    if (!val)
                        throw new Cinemark.Error('can\'t save a null value!');
                    const value = JSON.stringify(val);
                    window.sessionStorage.setItem(name, value);
                    WebAnalyticsFramework.LOG(`Wrote key ${name} from Session Storage`);
                }
                static getStorageKey(name = SessionVariableManager.webAnalyticsDataReferenceName) {
                    const value = window.sessionStorage.getItem(name);
                    WebAnalyticsFramework.LOG(`Retrieved key ${name} from Session Storage`);
                    if (value) {
                        return JSON.parse(value);
                    }
                    return new Models.GaDataClass();
                }
                static deleteStorageKey(name = SessionVariableManager.webAnalyticsDataReferenceName) {
                    window.sessionStorage.removeItem(name);
                    WebAnalyticsFramework.LOG(`Removed key ${name} from Session Storage`);
                }
            }
            SessionVariableManager.webAnalyticsDataReferenceName = 'gtm-universal';
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class DataManagement {
                static get dataModel() {
                    WebAnalyticsFramework.LOG('DataManagement::getDataModel() called.');
                    const data = SessionVariableManager.getStorageKey();
                    if (!data) {
                        WebAnalyticsFramework.LOG('DataManagement::getDataModel\tno entry in session storage, making a new one.');
                        SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, new Models.GaDataClass());
                    }
                    const obj = data;
                    return obj;
                }
                /* eslint-disable-next-line @typescript-eslint/naming-convention */
                static AddOrUpdateAccountData(email, userId) {
                    const data = DataManagement.dataModel;
                    data.core.email = email;
                    data.core.userid = userId;
                    SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, data);
                }
                static createHash(str) {
                    let hash = 0;
                    let index;
                    let length;
                    let char;
                    if (str.length === 0)
                        return hash;
                    for (index = 0, length = str.length; index < length; index++) {
                        char = str.charCodeAt(index);
                        hash = ((hash << 5) - hash) + char;
                        hash |= 0; // Convert to 32bit integer
                    }
                    return hash;
                }
                static recordMouseAndScrollPosition() {
                    const sp = UIManager.captureScrollPosition();
                    const mp = UIManager.captureMousePosition();
                    const dm = DataManagement.dataModel;
                    dm.core.mouseLocation = mp;
                    dm.core.scrollData = sp;
                    WebAnalyticsFramework.LOG(dm);
                    // save it back for later retrieval
                    SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, dm);
                }
                static setEventLevelEntry(eventLevelData) {
                    DataManagement.recordMouseAndScrollPosition();
                    const dm = DataManagement.dataModel;
                    dm.triggerData.eventName = eventLevelData;
                    // save it back for later retrieval
                    SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, dm);
                }
                static setCategoryEntry(categoryData) {
                    DataManagement.recordMouseAndScrollPosition();
                    const dm = DataManagement.dataModel;
                    dm.triggerData.eventCategory = categoryData;
                    // save it back for later retrieval
                    SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, dm);
                }
                static setActionEntry(actionData, labelData) {
                    DataManagement.recordMouseAndScrollPosition();
                    const dm = DataManagement.dataModel;
                    dm.triggerData.eventAction = actionData;
                    dm.triggerData.eventLabel = labelData || '';
                    // save it back for later retrieval
                    SessionVariableManager.setStorageKey(SessionVariableManager.webAnalyticsDataReferenceName, dm);
                    // write the data into the datalayer for GTM mining
                    const ourKey = DataManagement.GTM_KeyName;
                    DataManagement.writeDataLayerEntryForGoogleAnalytics(ourKey, dm);
                }
                static writeDataLayerEntryForGoogleAnalytics(key, value) {
                    let entry = null;
                    try {
                        const valAsJson = typeof value === 'string' ? JSON.parse(value) : value;
                        entry = JSON.parse(`{"event":"${key}","${key}":""}`);
                        LOG(`ENTRY:\t${JSON.stringify(entry)}`);
                        entry[key] = valAsJson;
                        LOG(`ENTRY:\t${JSON.stringify(entry)}`);
                        window.dataLayer.push(entry);
                    }
                    catch (e) {
                        window.console.error(`----GA ERROR--- [${new Date().toLocaleTimeString()}]\n\t${JSON.stringify(e)}\n\tdata:${entry}`);
                    }
                }
            }
            /* eslint-disable-next-line @typescript-eslint/naming-convention */
            DataManagement.GTM_KeyName = SessionVariableManager.webAnalyticsDataReferenceName;
            Toolbox.DataManagement = DataManagement;
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class UIManager {
                static startCaptureOfMouse() {
                    UIManager.mouseIsCaptured = UIManager.mouseIsCaptured || true;
                    document.addEventListener('mousemove', UIManager.recordPosition);
                }
                static stopCaptureOfMouse() {
                    document.removeEventListener('mousemove', UIManager.recordPosition);
                }
                static captureScrollPosition() {
                    return new Models.Point(window.scrollX, window.scrollY);
                }
                static captureMousePosition() {
                    return new Models.Point(UIManager.x, UIManager.y);
                }
                static recordPosition(mouseMoveEvent) {
                    UIManager.x = mouseMoveEvent.clientX;
                    UIManager.y = mouseMoveEvent.clientY;
                }
                static initializeMonitoring() {
                    /* eslint-disable-next-line dot-notation */ /* eslint-disable-next-line @typescript-eslint/dot-notation */
                    const haveTimerAlready = !!window['HTMLChangeProcessMonitor'];
                    if (haveTimerAlready)
                        return;
                    /* eslint-disable-next-line dot-notation */ /* eslint-disable-next-line @typescript-eslint/dot-notation */
                    window['HTMLChangeProcessMonitor'] = setInterval(UIManager.checkForNewContent, UIManager.HTML_HASH_TEST_TIMER_VALUE);
                    // Configure any special settings here
                    UIManager.startCaptureOfMouse();
                    WebAnalyticsFramework.LOG('HTML Change Monitoring Process Started!');
                }
                static checkForNewContent() {
                    const hash = DataManagement.createHash(document.body.textContent);
                    /* eslint-disable-next-line dot-notation */ /* eslint-disable-next-line @typescript-eslint/dot-notation */
                    if (window['bodyHash'] !== hash) {
                        /* eslint-disable-next-line dot-notation */ /* eslint-disable-next-line @typescript-eslint/dot-notation */
                        window['bodyHash'] = hash;
                        UIManager.pageIsDoneBuilding = false;
                        WebAnalyticsFramework.LOG('Page is still building....');
                    }
                    else {
                        if (UIManager.pageIsDoneBuilding) {
                            WebAnalyticsFramework.LOG(`Page is Checked Every ${UIManager.HTML_HASH_TEST_TIMER_VALUE}ms - no changes detected....`);
                            return;
                        }
                        // Reprocess the Tags here
                        UIManager.pageIsDoneBuilding = true;
                        WebAnalyticsFramework.LOG('HTML CHANGE DETECTED - Rescanning for new  Web Analytics Attributes');
                        // Register the Analytics Framework here
                        Reflection.registerAnalyticsTags();
                        DebugHelper.revealAllRegistrations();
                    }
                }
            }
            /* eslint-disable-next-line @typescript-eslint/naming-convention */
            UIManager.HTML_HASH_TEST_TIMER_VALUE = 500;
            UIManager.mouseIsCaptured = false;
            UIManager.x = -1;
            UIManager.y = -1;
            /*
            * This method is used to determine if new content has been loaded through SPA
            * page views.  If so, we reprocess the page tags
            */
            UIManager.pageIsDoneBuilding = false;
            Toolbox.UIManager = UIManager;
            class Reflection {
                /* If no attribute value is provided, then use the text for the element.
                  If an attribute value is provided, and it begins with a ~ character, then find the attribute value that
                  matches the name following the ~
                */
                static getAttributeValue(htmlTag, attrName) {
                    return new Reflection().supportGetAttributeValue(htmlTag, attrName);
                }
                supportGetAttributeValue(htmlTag, attrName) {
                    let attributeVal = htmlTag.getAttribute(attrName);
                    if (!attributeVal) {
                        return htmlTag.textContent.trim();
                    }
                    // search the current Session for a matching property and use that value
                    if (attributeVal[0] === '$') {
                        WebAnalyticsFramework.LOG(`Found a Session indicator for attribute [${attrName}]`);
                        const sessionPropertyName = attributeVal.substr(1);
                        const sessionValue = window.sessionStorage[sessionPropertyName];
                        WebAnalyticsFramework.LOG(`Found Session value [${sessionValue}`);
                        // this allows for multiple levels of redirect
                        attributeVal = sessionValue;
                    }
                    // search the Global Variable for a matching property and use that value
                    if (attributeVal[0] === '*') {
                        WebAnalyticsFramework.LOG(`Found a Global indicator for attribute [${attrName}]`);
                        const globalPropertyName = attributeVal.substr(1);
                        const globalValue = window[globalPropertyName];
                        WebAnalyticsFramework.LOG(`Found Global value [${globalValue}`);
                        // this allows for multiple levels of redirect
                        attributeVal = globalValue;
                    }
                    // search the QueryString for a matching value
                    if (attributeVal[0] === '#') {
                        WebAnalyticsFramework.LOG(`Found a QueryString indicator for attribute [${attrName}]`);
                        const queryStringName = attributeVal.substr(1);
                        const queryValue = BrowserManager.getQueryStringParamValue(queryStringName);
                        WebAnalyticsFramework.LOG(`Found QueryString value [${queryValue}`);
                        // this allows for multiple levels of redirect
                        attributeVal = queryValue;
                    }
                    // search up the tree for the next attribute declaration and check it's value
                    if (attributeVal[0] === '^') {
                        WebAnalyticsFramework.LOG(`Found a redirect tag for attribute [${attrName}]`);
                        const found = RecursiveSearch.Instance.findElementWIthAttribute(htmlTag.parentElement, attrName);
                        WebAnalyticsFramework.LOG(`Redirect search located tag with id [${found.id}\ttext: [${found.textContent}]`);
                        // this allows for multiple levels of redirect
                        attributeVal = this.supportGetAttributeValue(found, attrName);
                    }
                    // Find the value for the declared property and use that for our value
                    if (attributeVal[0] === '~') {
                        attributeVal = attributeVal.substr(1);
                        attributeVal = htmlTag.getAttribute(attributeVal);
                    }
                    return attributeVal;
                }
                static registerAnalyticsTags() {
                    // Find Tags that have an Action registered for it
                    Reflection.registerEventLevelTags();
                    Reflection.registerCategoryTags();
                    Reflection.registerClickActionTags();
                }
                static registerClickActionTags() {
                    WebAnalyticsFramework.LOG('registering all Action Tags');
                    const tagType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventClickAction;
                    const matches = document.querySelectorAll(`[${tagType}]`);
                    matches.forEach((element) => {
                        EventManagement.registerClickHandlerForGaProperty(element, tagType);
                    });
                }
                static registerCategoryTags() {
                    WebAnalyticsFramework.LOG('registering all Category Tags');
                    const tagType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventCategory;
                    const matches = document.querySelectorAll(`[${tagType}]`);
                    matches.forEach((element) => {
                        EventManagement.registerClickHandlerForGaProperty(element, tagType);
                    });
                }
                static registerEventLevelTags() {
                    const tagType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLevel;
                    WebAnalyticsFramework.LOG('registering all Event Level Tags');
                    const matches = document.querySelectorAll(`[${tagType}]`);
                    matches.forEach((element) => {
                        EventManagement.registerClickHandlerForGaProperty(element, tagType);
                    });
                }
            }
            Toolbox.Reflection = Reflection;
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class BrowserManager {
            }
            BrowserManager.getQueryStringParamValue = (paramName) => {
                const match = RegExp(`[?&]${paramName}=([^&]*)`).exec(window.location.search);
                return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
            };
            Toolbox.BrowserManager = BrowserManager;
            class RecursiveSearch {
                /* eslint-disable-next-line @typescript-eslint/naming-convention */
                static get Instance() {
                    return new RecursiveSearch();
                }
                findElementWIthAttribute(seedTag, attributeToFind) {
                    const tag = this.supportFindElementWithAttributeRecursively(seedTag, attributeToFind);
                    if (tag == null)
                        throw new DOMException(`no such attribute '${attributeToFind}' could be found`, attributeToFind);
                    return tag;
                }
                supportFindElementWithAttributeRecursively(seedTag, attributeToFind) {
                    // first validate we have an element
                    if (!seedTag)
                        return null;
                    // first look to see if we have the attributes on this element
                    const attributeName = attributeToFind;
                    const attribute = seedTag.getAttribute(attributeName);
                    if (attribute)
                        return seedTag;
                    // not found, so look at parent
                    return this.supportFindElementWithAttributeRecursively(seedTag.parentElement, attributeToFind);
                }
            }
            Toolbox.RecursiveSearch = RecursiveSearch;
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class EventManagement {
                // we track the registration of click events to a single Tag.
                static registerClickHandlerForGaProperty(m, gaType) {
                    const val = m.id || `${m.tagName} >>${m.innerText}`;
                    if (EventManagement.isDuplicate(m, gaType)) {
                        WebAnalyticsFramework.LOG(`Duplicate Detected registering ${val} as ${gaType}`);
                        return;
                    }
                    // register an event
                    if (gaType === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLevel) {
                        m.addEventListener('click', EventManagement.createAnalyticsEntryForEvent);
                        EventManagement.gaEventRegistrations.push(m);
                        return;
                    }
                    // register an Category
                    if (gaType === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventCategory) {
                        m.addEventListener('click', EventManagement.createAnalyticsEntryForCategory);
                        EventManagement.gaCategoryRegistrations.push(m);
                        return;
                    }
                    // register an Action
                    if (gaType === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventClickAction) {
                        m.addEventListener('click', EventManagement.createAnalyticsEntryForAction);
                        EventManagement.gaActionRegistrations.push(m);
                    }
                }
            }
            EventManagement.gaEventRegistrations = [];
            EventManagement.gaCategoryRegistrations = [];
            EventManagement.gaActionRegistrations = [];
            // When registering event handlers, only do it once for each event and element
            EventManagement.isDuplicate = (m, type) => {
                if (type === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLevel) {
                    for (let eventIndex = 0; eventIndex < EventManagement.gaEventRegistrations.length; eventIndex++) {
                        if (EventManagement.gaEventRegistrations[eventIndex] === m)
                            return true;
                    }
                }
                if (type === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventCategory) {
                    for (let categoryIndex = 0; categoryIndex < EventManagement.gaCategoryRegistrations.length; categoryIndex++) {
                        if (EventManagement.gaCategoryRegistrations[categoryIndex] === m)
                            return true;
                    }
                }
                if (type === SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventClickAction) {
                    for (let actionIndex = 0; actionIndex < EventManagement.gaActionRegistrations.length; actionIndex++) {
                        if (EventManagement.gaActionRegistrations[actionIndex] === m)
                            return true;
                    }
                }
                return false;
            };
            EventManagement.createAnalyticsEntryForEvent = (e) => {
                DataManagement.recordMouseAndScrollPosition();
                const htmlTag = e.currentTarget;
                const attrType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLevel;
                DataManagement.setEventLevelEntry(Reflection.getAttributeValue(htmlTag, attrType));
            };
            EventManagement.createAnalyticsEntryForCategory = (e) => {
                DataManagement.recordMouseAndScrollPosition();
                const htmlTag = e.currentTarget;
                const attrType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventCategory;
                DataManagement.setCategoryEntry(Reflection.getAttributeValue(htmlTag, attrType));
            };
            EventManagement.createAnalyticsEntryForAction = (e) => {
                DataManagement.recordMouseAndScrollPosition();
                const htmlTag = e.currentTarget;
                const attrType = SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventClickAction;
                let label = htmlTag.getAttribute(SupportingEnumerations.WebAnalyticsAttributeTypeEnum.GAEventLabel);
                if (!label)
                    label = e.type;
                DataManagement.setActionEntry(Reflection.getAttributeValue(htmlTag, attrType), label);
                return true;
            };
            Toolbox.EventManagement = EventManagement;
        })(Toolbox = WebAnalyticsFramework.Toolbox || (WebAnalyticsFramework.Toolbox = {}));
        let Models;
        (function (Models) {
            class Point {
                constructor(left = -1, top = -1) {
                    this.x = -1;
                    this.y = -1;
                    this.x = left;
                    this.y = top;
                }
            }
            Models.Point = Point;
            class Core {
                constructor() {
                    this.scrollData = new Point();
                    this.mouseLocation = new Point();
                }
            }
            Models.Core = Core;
            class TriggerData {
            }
            Models.TriggerData = TriggerData;
            /* eslint-disable-next-line @typescript-eslint/no-extraneous-class */
            class SupportInfo {
            }
            Models.SupportInfo = SupportInfo;
            class GaDataClass {
                constructor() {
                    this.core = new Core();
                    this.triggerData = new TriggerData();
                    this.supportInfo = new SupportInfo();
                    this.toString = () => JSON.stringify(this);
                }
            }
            Models.GaDataClass = GaDataClass;
        })(Models || (Models = {}));
    })(WebAnalyticsFramework = Cinemark.WebAnalyticsFramework || (Cinemark.WebAnalyticsFramework = {}));
})(Cinemark || (Cinemark = {}));
(function () {
    Cinemark.WebAnalyticsFramework.Toolbox.UIManager.initializeMonitoring();
    /* eslint-disable dot-notation */ /* eslint-disable @typescript-eslint/dot-notation */
    window['cwa'] = Cinemark;
    window['cwa'].LOG = Cinemark.WebAnalyticsFramework.LOG;
    window['cwa'].TurnOnDebugging = Cinemark.WebAnalyticsFramework.Toolbox.DebugHelper.turnOnDebug;
    window['cwa'].TurnOffDebugging = Cinemark.WebAnalyticsFramework.Toolbox.DebugHelper.turnOffDebug;
    /* eslint-enable dot-notation */ /* eslint-enable @typescript-eslint/dot-notation */
})();
// Including MDN polyfill for .forEach
if (window.NodeList && !NodeList.prototype.forEach) {
    NodeList.prototype.forEach = function (callback, thisArg) {
        const updatedArg = thisArg || window;
        for (let i = 0; i < this.length; i++) {
            callback.call(updatedArg, this[i], i, this);
        }
    };
}
//# sourceMappingURL=analyticsFramework.js.map;
