PageSourceSearch

https://student.cakap.com/scripts.ac22a6b9a0982e89eda9.js

js cakap.com collected 2026-09-24 10:22:27 UTC 2,038,582 bytes, 1 lines download raw bytes

vendor: 5,774 bytes, line 1
1if(function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],i=e.document,r=Object.getPrototypeOf,o=n.slice,s=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,d=c.hasOwnProperty,h=d.toString,p=h.call(Object),f={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function(e){return null!=e&&e===e.window},v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,o,s=(n=n||i).createElement("script");if(s.text=e,t)for(r in v)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&s.setAttribute(r,o);n.head.appendChild(s).parentNode.removeChild(s)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[u.call(e)]||"object":typeof e}var _="3.4.1",S=function(e,t){return new S.fn.init(e,t)},w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function E(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!g(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:_,constructor:S,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},S.extend=S.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(S.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||S.isPlainObject(n)?n:{},r=!1,s[t]=S.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},S.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=r(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||h.call(n)!==p))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){y(e,{nonce:t&&t.nonce})},each:function(e,t){var n,i=0;if(E(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(w,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?S.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,o=0,a=[];if(E(e))for(i=e.length;o<i;o++)null!=(r=t(e[o],o,n))&&a.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&a.push(r);return s.apply([],a)},guid:1,support:f}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=n[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});var T=function(e){var t,n,i,r,o,s,a,l,c,u,d,h,p,f,g,m,v,y,b,_="sizzle"+1*new Date,S=e.document,w=0,E=0,T=le(),C=le(),I=le(),R=le(),D=function(e,t){return e===t&&(d=!0),0},A={}.hasOwnProperty,k=[],O=k.pop,x=k.push,N=k.push,P=k.slice,M=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",U="\\["+j+"*("+F+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+j+"*\\]",H=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+U+")*)|.*)\\)|)",B=new RegExp(j+"+","g"),V=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),W=new RegExp("^"+j+"*,"+j+"*"),z=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),q=new RegExp(j+"|>"),G=new RegExp(H),Y=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),ne=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},se=_e(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{N.apply(k=P.call(S.childNodes),S.childNodes)}
vendor: 5,427 bytes, line 1
1catch(t){N={apply:k.length?function(e,t){x.apply(e,P.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,r){var o,a,c,u,d,f,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return i;if(!r&&((t?t.ownerDocument||t:S)!==p&&h(t),t=t||p,g)){if(11!==w&&(d=Z.exec(e)))if(o=d[1]){if(9===w){if(!(c=t.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return i.push(c),i}else{if(d[2])return N.apply(i,t.getElementsByTagName(e)),i;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!R[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&q.test(e)){for((u=t.getAttribute("id"))?u=u.replace(ie,re):t.setAttribute("id",u=_),a=(f=s(e)).length;a--;)f[a]="#"+u+" "+be(f[a]);v=f.join(","),y=ee.test(e)&&ve(t.parentNode)||t}try{return N.apply(i,y.querySelectorAll(v)),i}catch(t){R(e,!0)}finally{u===_&&t.removeAttribute("id")}}}return l(e.replace(V,"$1"),t,i,r)}function le(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ce(e){return e[_]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function he(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce(function(t){return t=+t,ce(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!K.test(e.namespaceURI||t&&t.nodeName||"HTML")},h=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:S;return s!==p&&9===s.nodeType&&s.documentElement&&(f=(p=s).documentElement,g=!o(p),S!==p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=ue(function(e){return f.appendChild(e).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Q.test(p.querySelectorAll))&&(ue(function(e){f.appendChild(e).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+j+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Q.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.j
vendor: 5,332 bytes, line 1
1oin("|")),t=Q.test(f.compareDocumentPosition),b=t||Q.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===p||e.ownerDocument===S&&b(S,e)?-1:t===p||t.ownerDocument===S&&b(S,t)?1:u?M(u,e)-M(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===p?-1:t===p?1:r?-1:o?1:u?M(u,e)-M(u,t):0;if(r===o)return he(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?he(s[i],a[i]):s[i]===S?-1:a[i]===S?1:0}),p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),n.matchesSelector&&g&&!R[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){R(t,!0)}return 0<ae(t,p,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ie,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,i=[],r=0,o=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(D),d){for(;t=e[o++];)t===e[o]&&(r=i.push(o));for(;r--;)e.splice(i[r],1)}return u=null,e},r=ae.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=r(t);return n},(i=ae.selectors={cacheLength:50,createPseudo:ce,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=ae.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&-1<r.indexOf(n):"$="===t?n&&r.slice(-n.length)===n:"~="===t?-1<(" "+r.replace(B," ")+" ").indexOf(n):"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(b=(p=(c=(u=(d=(h=m)[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===w&&c[1])&&c[2],h=p&&m.childNodes[p];h=++p&&h&&h[g]||(b=p=0)||f.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[w,p,b];break}}else if(y&&(b=p=(c=(u=(d=(h=t)[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===w&&c[1]),!1===b)for(;(h=++p&&h&&h[g]||(b=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((u=(d=h[_]||(h[_]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[w,b]),h!==t)););return(b-=r)===i||b%i==0&&0<=b/i}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[_]?r(t):1<r.length?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ce(function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=M(e,o[s])]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ce(function(e){var t=[],n=[],i=a(e.replace(V,"$1"));return i[_]?ce(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:ce(function(e){return function(t){return 0<ae(e,t).length}}
vendor: 4,842 bytes, line 1
1),contains:ce(function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||r(t)).indexOf(e)}}),lang:ce(function(e){return Y.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:me(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:me(function(e,t,n){for(var i=n<0?n+t:t<n?t:n;0<=--i;)e.push(i);return e}),gt:me(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=fe(t);function ye(){}function be(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function _e(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=E++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,l){var c,u,d,h=[w,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=(d=t[_]||(t[_]={}))[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[o])&&c[0]===w&&c[1]===a)return h[2]=c[2];if((u[o]=h)[2]=e(t,n,l))return!0}return!1}}function Se(e){return 1<e.length?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function we(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),c&&t.push(a)));return s}function Ee(e,t,n,i,r,o){return i&&!i[_]&&(i=Ee(i)),r&&!r[_]&&(r=Ee(r,o)),ce(function(o,s,a,l){var c,u,d,h=[],p=[],f=s.length,g=o||function(e,t,n){for(var i=0,r=t.length;i<r;i++)ae(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:we(g,h,e,a,l),v=n?r||(o?e:f||i)?[]:s:m;if(n&&n(m,v,a,l),i)for(c=we(v,p),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[p[u]]=!(m[p[u]]=d));if(o){if(r||e){if(r){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(m[u]=d);r(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&-1<(c=r?M(o,d):h[u])&&(o[c]=!(s[c]=d))}}else v=we(v===s?v.splice(f,v.length):v),r?r(null,s,v,l):N.apply(s,v)})}function Te(e){for(var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,u=_e(function(e){return e===t},a,!0),d=_e(function(e){return-1<M(t,e)},a,!0),h=[function(e,n,i){var r=!s&&(i||n!==c)||((t=n).nodeType?u(e,n,i):d(e,n,i));return t=null,r}];l<o;l++)if(n=i.relative[e[l].type])h=[_e(Se(h),n)];else{if((n=i.filter[e[l].type].apply(null,e[l].matches))[_]){for(r=++l;r<o&&!i.relative[e[r].type];r++);return Ee(1<l&&Se(h),1<l&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(V,"$1"),n,l<r&&Te(e.slice(l,r)),r<o&&Te(e=e.slice(r)),r<o&&be(e))}h.push(n)}return Se(h)}return ye.prototype=i.filters=i.pseudos,i.setFilters=new ye,s=ae.tokenize=function(e,t){var n,r,o,s,a,l,c,u=C[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=i.preFilter;a;){for(s in n&&!(r=W.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(V," ")}),a=a.slice(n.length)),i.filter)!(r=$[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):C(e,l).slice(0)},a=ae.compile=function(e,t){var n,r,o,a,l,u,d=[],f=[],m=I[e+" "];if(!m){for(t||(t=s(e)),n=t.length;n--;)(m=Te(t[n]))[_]?d.push(m):f.push(m);(m=I(e,(r=f,a=0<(o=d).length,l=0<r.length,u=function(e,t,n,s,u){var d,f,m,v=0,y="0",b=e&&[],_=[],S=c,E=e||l&&i.find.TAG("*",u),T=w+=null==S?1:Math.random()||.1,C=E.length;for(u&&(c=t===p||t||u);y!==C&&null!=(d=E[y]);y++){if(l&&d){for(f=0,t||d.ownerDocument===p||(h(d),n=!g);m=r[f++];)if(m(d,t||p,n)){s.push(d);break}u&&(w=T)}
vendor: 7,281 bytes, line 1
1a&&((d=!m&&d)&&v--,e&&b.push(d))}if(v+=y,a&&y!==v){for(f=0;m=o[f++];)m(b,_,t,n);if(e){if(0<v)for(;y--;)b[y]||_[y]||(_[y]=O.call(s));_=we(_)}N.apply(s,_),u&&!e&&0<_.length&&1<v+o.length&&ae.uniqueSort(s)}return u&&(w=T,c=S),b},a?ce(u):u))).selector=e}return m},l=ae.select=function(e,t,n,r){var o,l,c,u,d,h="function"==typeof e&&e,p=!r&&s(e=h.selector||e);if(n=n||[],1===p.length){if(2<(l=p[0]=p[0].slice(0)).length&&"ID"===(c=l[0]).type&&9===t.nodeType&&g&&i.relative[l[1].type]){if(!(t=(i.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=$.needsContext.test(e)?0:l.length;o--&&!i.relative[u=(c=l[o]).type];)if((d=i.find[u])&&(r=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),!(e=r.length&&be(l)))return N.apply(n,r),n;break}}return(h||a(e,p))(r,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(D).join("")===_,n.detectDuplicates=!!d,h(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||de(L,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),ae}(e);S.find=T,S.expr=T.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=T.uniqueSort,S.text=T.getText,S.isXMLDoc=T.isXML,S.contains=T.contains,S.escapeSelector=T.escape;var C=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&S(e).is(n))break;i.push(e)}return i},I=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=S.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function k(e,t,n){return g(t)?S.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return-1<l.call(t,e)!==n}):S.filter(t,e,n)}S.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?S.find.matchesSelector(i,e)?[i]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<i;t++)if(S.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)S.find(e,r[t],n);return 1<i?S.uniqueSort(n):n},filter:function(e){return this.pushStack(k(this,e||[],!1))},not:function(e){return this.pushStack(k(this,e||[],!0))},is:function(e){return!!k(this,"string"==typeof e&&R.test(e)?S(e):e||[],!1).length}});var O,x=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||O,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:x.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(S.merge(this,S.parseHTML(r[1],(t=t instanceof S?t[0]:t)&&t.nodeType?t.ownerDocument||t:i,!0)),A.test(r[1])&&S.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=i.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,O=S(i);var N=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function M(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&S(e);if(!R.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(S(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return M(e,"nextSibling")},prev:function(e){return M(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return I((e.parentNode||{}).firstChild,e)},children:function(e){return I(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(D(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,i){var r=S.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=S.filter(i,r)),1<this.length&&(P[e]||S.uniqueSort(r),N.test(e)&&r.reverse()),this.pushStack(r)}});var L=/[^\x20\t\r\n\f]+/g;function j(e){return e}function F(e){throw e}function U(e,t,n,i){var r;try{e&&g(r=e.promise)?r.call(e).done(t).fail(n):e&&g(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){var t;e="string"==typeof e?(t={},S.each(e.match(L)||[],function(e,n){t[n]=!0}),t):S.extend({},e);var n,i,r,o,s=[],a=[],l=-1,c=function(){for(o=o||e.once,r=n=!0;a.length;l=-1)for(i=a.shift();++l<s.length;)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1);e.memory||(i=!1),n=!1,o&&(s=i?[]:"")},u={add:function(){return s&&(i&&!n&&(l=s.length-1,a.push(i)),function t(n){S.each(n,function(n,i){g(i)?e.unique&&u.has(i)||s.push(i):i&&i.length&&"string"!==b(i)&&t(i)})}(arguments),i&&!n&&c()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;-1<(n=S.inArray(t,s,n));)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=a=[],i||n||(s=i=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],a.push(t),n||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},S.extend({Deferred:function(t){var n=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
1nding",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(t){S.each(n,function(n,i){var r=g(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){var o=0;function s(t,n,i,r){return function(){var a=this,l=arguments,c=function(){var e,c;if(!(t<o)){if((e=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");g(c=e&&("object"==typeof e||"function"==typeof e)&&e.then)?r?c.call(e,s(o,n,j,r),s(o,n,F,r)):c.call(e,s(++o,n,j,r),s(o,n,F,r),s(o,n,j,n.notifyWith)):(i!==j&&(a=void 0,l=[e]),(r||n.resolveWith)(a,l))}},u=r?c:function(){try{c()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,u.stackTrace),o<=t+1&&(i!==F&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(S.Deferred.getStackHook&&(u.stackTrace=S.Deferred.getStackHook()),e.setTimeout(u))}}return S.Deferred(function(e){n[0][3].add(s(0,e,g(r)?r:j,e.notifyWith)),n[1][3].add(s(0,e,g(t)?t:j)),n[2][3].add(s(0,e,g(i)?i:F))}).promise()},promise:function(e){return null!=e?S.extend(e,r):r}},o={};return S.each(n,function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add(function(){i=a},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=o.call(arguments),s=S.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=1<arguments.length?o.call(arguments):n,--t||s.resolveWith(i,r)}};if(t<=1&&(U(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||g(r[n]&&r[n].then)))return s.then();for(;n--;)U(r[n],a(n),s.reject);return s.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&H.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},S.readyException=function(t){e.setTimeout(function(){throw t})};var B=S.Deferred();function V(){i.removeEventListener("DOMContentLoaded",V),e.removeEventListener("load",V),S.ready()}S.fn.ready=function(e){return B.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||B.resolveWith(i,[S])}}),S.ready.then=B.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?e.setTimeout(S.ready):(i.addEventListener("DOMContentLoaded",V),e.addEventListener("load",V));var W=function(e,t,n,i,r,o,s){var a=0,l=e.length,c=null==n;if("object"===b(n))for(a in r=!0,n)W(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,g(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(S(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:c?t.call(e):l?t(e[0],n):o},z=/^-ms-/,q=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function Y(e){return e.replace(z,"ms-").replace(q,G)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=S.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[Y(t)]=n;else for(i in t)r[Y(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in i?[t]:t.match(L)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||S.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var J=new K,X=new K,Q=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var i,r;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===(r=n)||"false"!==r&&("null"===r?null:r===+r+""?+r:Q.test(r)?JSON.parse(r):r)}catch(e){}X.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return X.hasData(e)||J.hasData(e)},data:function(e,t,n){return X.access(e,t,n)},removeData:function(e,t){X.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=X.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=s.length;n--;
vendor: 4,994 bytes, line 1
1)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=Y(i.slice(5)),ee(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){X.set(this,e)}):W(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=X.get(o,e))?n:void 0!==(n=ee(o,e))?n:void 0;this.each(function(){X.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),S.extend({queue:function(e,t,n){var i;if(e)return i=J.get(e,t=(t||"fx")+"queue"),n&&(!i||Array.isArray(n)?i=J.access(e,t,S.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){var n=S.queue(e,t=t||"fx"),i=n.length,r=n.shift(),o=S._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){S.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:S.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=S.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=J.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],re=i.documentElement,oe=function(e){return S.contains(e.ownerDocument,e)},se={composed:!0};re.getRootNode&&(oe=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===S.css(e,"display")},le=function(e,t,n,i){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in r=n.apply(e,i||[]),t)e.style[o]=s[o];return r};function ce(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return S.css(e,t,"")},l=a(),c=n&&n[3]||(S.cssNumber[t]?"":"px"),u=e.nodeType&&(S.cssNumber[t]||"px"!==c&&+l)&&ne.exec(S.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)S.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;S.style(e,t,(u*=2)+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}var ue={};function de(e,t){for(var n,i,r,o,s,a,l,c=[],u=0,d=e.length;u<d;u++)(i=e[u]).style&&(n=i.style.display,t?("none"===n&&(c[u]=J.get(i,"display")||null,c[u]||(i.style.display="")),""===i.style.display&&ae(i)&&(c[u]=(l=s=o=void 0,s=(r=i).ownerDocument,(l=ue[a=r.nodeName])||(o=s.body.appendChild(s.createElement(a)),l=S.css(o,"display"),o.parentNode.removeChild(o),"none"===l&&(l="block"),ue[a]=l)))):"none"!==n&&(c[u]="none",J.set(i,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}S.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var he=/^(?:checkbox|radio)$/i,pe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n<i;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var ye,be,_e=/<|&#?\w+;/;function Se(e,t,n,i,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===b(o))S.merge(h,o.nodeType?[o]:o);else if(_e.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(pe.exec(o)||["",""])[1].toLowerCase(),s.innerHTML=(l=ge[a]||ge._default)[1]+S.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;S.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",p=0;o=h[p++];)if(i&&-1<S.inArray(o,i))r&&r.push(o);else if(c=oe(o),s=me(d.appendChild(o),"script"),c&&ve(s),n)for(u=0;o=s[u++];)fe.test(o.type||"")&&n.push(o);return d}ye=i.createDocumentFragment().appendChild(i.createElement("div")),(be=i.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),ye.appendChild(be),f.checkClone
vendor: 4,516 bytes, line 1
1=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var we=/^key/,Ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ie(){return!1}function Re(e,t){return e===function(){try{return i.activeElement}catch(e){}}()==("focus"===t)}function De(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)De(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ie;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return S().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=S.guid++)),e.each(function(){S.event.add(this,t,r,i,n)})}function Ae(e,t,n){n?(J.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var i,r,s=J.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=o.call(arguments),J.set(this,t,s),i=n(this,t),this[t](),s!==(r=J.get(this,t))||i?J.set(this,t,!1):r={},s!==r)return e.stopImmediatePropagation(),e.preventDefault(),r.value}else s.length&&(J.set(this,t,{value:S.event.trigger(S.extend(s[0],S.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&S.event.add(e,t,Ce)}S.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,p,f,g,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&S.find.matchesSelector(re,r),n.guid||(n.guid=S.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(L)||[""]).length;c--;)p=g=(a=Te.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=S.event.special[p]||{},d=S.event.special[p=(r?d.delegateType:d.bindType)||p]||{},u=S.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:f.join(".")},o),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),S.event.global[p]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,p,f,g,m=J.hasData(e)&&J.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(L)||[""]).length;c--;)if(p=g=(a=Te.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=S.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,m.handle)||S.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)S.event.remove(e,p+t[c],n,i,!0);S.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=S.event.fix(e),l=new Array(arguments.length),c=(J.get(this,"events")||{})[a.type]||[],u=S.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=S.event.handlers.call(this,a,c),t=0;(r=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(i=((S.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?-1<S(r,this).index(c):S.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]}
vendor: 2,430 bytes, line 1
1,set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return he.test(t.type)&&t.click&&D(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&D(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&D(t,"input")&&J.get(t,"click")||D(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ie,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ie,isPropagationStopped:Ie,isImmediatePropagationStopped:Ie,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ee.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Re),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}
vendor: 5,907 bytes, line 1
1),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||S.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,i){return De(this,e,t,n,i)},one:function(e,t,n,i){return De(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,S(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ie),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Oe=/<script|<style|<link/i,xe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Pe(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,i,r,o,s,a,l,c;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),s=J.set(t,o),c=o.events))for(r in delete s.handle,s.events={},c)for(n=0,i=c[r].length;n<i;n++)S.event.add(t,r,c[r][n]);X.hasData(e)&&(a=X.access(e),l=S.extend({},a),X.set(t,l))}}function Fe(e,t,n,i){t=s.apply([],t);var r,o,a,l,c,u,d=0,h=e.length,p=h-1,m=t[0],v=g(m);if(v||1<h&&"string"==typeof m&&!f.checkClone&&xe.test(m))return e.each(function(r){var o=e.eq(r);v&&(t[0]=m.call(this,r,o.html())),Fe(o,t,n,i)});if(h&&(o=(r=Se(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(l=(a=S.map(me(r,"script"),Me)).length;d<h;d++)c=r,d!==p&&(c=S.clone(c,!0,!0),l&&S.merge(a,me(c,"script"))),n.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,S.map(a,Le),d=0;d<l;d++)fe.test((c=a[d]).type||"")&&!J.access(c,"globalEval")&&S.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?S._evalUrl&&!c.noModule&&S._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")}):y(c.textContent.replace(Ne,""),c,u))}return e}function Ue(e,t,n){for(var i,r=t?S.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||S.cleanData(me(i)),i.parentNode&&(n&&oe(i)&&ve(me(i,"script")),i.parentNode.removeChild(i));return e}S.extend({htmlPrefilter:function(e){return e.replace(ke,"<$1></$2>")},clone:function(e,t,n){var i,r,o,s,a,l,c,u=e.cloneNode(!0),d=oe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(s=me(u),i=0,r=(o=me(e)).length;i<r;i++)a=o[i],"input"===(c=(l=s[i]).nodeName.toLowerCase())&&he.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(t)if(n)for(o=o||me(e),s=s||me(u),i=0,r=o.length;i<r;i++)je(o[i],s[i]);else je(e,u);return 0<(s=me(u,"script")).length&&ve(s,!d&&me(e,"script")),u},cleanData:function(e){for(var t,n,i,r=S.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[J.expando]){if(t.events)for(i in t.events)r[i]?S.event.remove(n,i):S.removeEvent(n,i,t.handle);n[J.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return W(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Fe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)})},prepend:function(){return Fe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return W(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ge[(pe.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Fe(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(me(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){S.fn[e]=function(e){for(var n,i=[],r=S(e),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),S(r[s])[t](n),a.apply(i,n.get());return this.pushStack(i)}});var He=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Be=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ve=new RegExp(ie.join("|"),"i");function We(e,t,n){var i,r,o,s,a=e.style;return(n=n||Be(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||oe(e)||(s=S.style(e,t)),!f.pixelBoxStyles()&&He.test(s)&&Ve.test(t)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;
1left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);r="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),o=36===n(t.width),u.style.position="absolute",s=12===n(u.offsetWidth/3),re.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var r,o,s,a,l,c=i.createElement("div"),u=i.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,S.extend(f,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),s}}))}();var qe=["Webkit","Moz","ms"],Ge=i.createElement("div").style,Ye={};function $e(e){return S.cssProps[e]||Ye[e]||(e in Ge?e:Ye[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=qe.length;n--;)if((e=qe[n]+t)in Ge)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,Je=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var i=ne.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function et(e,t,n,i,r,o){var s="width"===t?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=S.css(e,n+ie[s],!0,r)),i?("content"===n&&(l-=S.css(e,"padding"+ie[s],!0,r)),"margin"!==n&&(l-=S.css(e,"border"+ie[s]+"Width",!0,r))):(l+=S.css(e,"padding"+ie[s],!0,r),"padding"!==n?l+=S.css(e,"border"+ie[s]+"Width",!0,r):a+=S.css(e,"border"+ie[s]+"Width",!0,r));return!i&&0<=o&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function tt(e,t,n){var i=Be(e),r=(!f.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,i),o=r,s=We(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(s)){if(!n)return s;s="auto"}return(!f.boxSizingReliable()&&r||"auto"===s||!parseFloat(s)&&"inline"===S.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===S.css(e,"boxSizing",!1,i),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+et(e,t,n||(r?"border":"content"),o,i,s)+"px"}function nt(e,t,n,i,r){return new nt.prototype.init(e,t,n,i,r)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=Y(t),l=Je.test(t),c=e.style;
vendor: 4,389 bytes, line 1
1if(l||(t=$e(a)),s=S.cssHooks[t]||S.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:c[t];"string"==(o=typeof n)&&(r=ne.exec(n))&&r[1]&&(n=ce(e,t,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(S.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,o,s,a=Y(t);return Je.test(t)||(t=$e(a)),(s=S.cssHooks[t]||S.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=We(e,t,i)),"normal"===r&&t in Qe&&(r=Qe[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),S.each(["height","width"],function(e,t){S.cssHooks[t]={get:function(e,n,i){if(n)return!Ke.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,i):le(e,Xe,function(){return tt(e,t,i)})},set:function(e,n,i){var r,o=Be(e),s=!f.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===S.css(e,"boxSizing",!1,o),l=i?et(e,t,i,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-et(e,t,"border",!1,o)-.5)),l&&(r=ne.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),Ze(0,n,l)}}}),S.cssHooks.marginLeft=ze(f.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-le(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+ie[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(S.cssHooks[e+t].set=Ze)}),S.fn.extend({css:function(e,t){return W(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=Be(e),r=t.length;s<r;s++)o[t[s]]=S.css(e,t[s],!1,i);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=nt).prototype={constructor:nt,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.pos=t=this.options.duration?S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[$e(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=nt.prototype.init,S.fx.step={};var it,rt,ot,st,at=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){rt&&(!1===i.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ct):e.setTimeout(ct,S.fx.interval),S.fx.tick())}function ut(){return e.setTimeout(function(){it=void 0}),it=Date.now()}function dt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=ie[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function ht(e,t,n){for(var i,r=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function pt(e,t,n){var i,r,o=0,s=pt.prefilters.length,a=S.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=it||ut(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:it||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var i=S.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||
vendor: 4,712 bytes, line 1
1c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=Y(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=S.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(u,c.opts.specialEasing);o<s;o++)if(i=pt.prefilters[o].call(c,e,u,c.opts))return g(i.stop)&&(S._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return S.map(u,ht,c),g(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),S.fx.timer(S.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}S.Animation=S.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(L);for(var n,i=0,r=e.length;i<r;i++)(pt.tweeners[n=e[i]]=pt.tweeners[n]||[]).unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,l,c,u,d="width"in t||"height"in t,h=this,p={},f=e.style,g=e.nodeType&&ae(e),m=J.get(e,"fxshow");for(i in n.queue||(null==(s=S._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always(function(){h.always(function(){s.unqueued--,S.queue(e,"fx").length||s.empty.fire()})})),t)if(at.test(r=t[i])){if(delete t[i],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;g=!0}p[i]=m&&m[i]||S.style(e,i)}if((l=!S.isEmptyObject(t))||!S.isEmptyObject(p))for(i in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=J.get(e,"display")),"none"===(u=S.css(e,"display"))&&(c?u=c:(de([e],!0),c=e.style.display||c,u=S.css(e,"display"),de([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===S.css(e,"float")&&(l||(h.done(function(){f.display=c}),null==c&&(c="none"===(u=f.display)?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=J.access(e,"fxshow",{display:c}),o&&(m.hidden=!g),g&&de([e],!0),h.done(function(){for(i in g||de([e]),J.remove(e,"fxshow"),p)S.style(e,i,p[i])})),l=ht(g?m[i]:0,i,h),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),S.speed=function(e,t,n){var i=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return S.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration=i.duration in S.fx.speeds?S.fx.speeds[i.duration]:S.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&S.dequeue(this,i.queue)},i},S.fn.extend({fadeTo:function(e,t,n,i){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=S.isEmptyObject(e),o=S.speed(t,n,i),s=function(){var t=pt(this,S.extend({},e),o);(r||J.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=S.timers,s=J.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&lt.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||S.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=S.timers,s=i?i.length:0;for(n.finish=!0,S.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),S.each(["toggle","show","hide"],function(e,t){var n=S.fn[t];S.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(dt(t,!0),e,i,r)}}),S.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){S.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(it=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),it=void 0}
vendor: 5,180 bytes, line 1
1,S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){rt||(rt=!0,ct())},S.fx.stop=function(){rt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(t,n){return t=S.fx&&S.fx.speeds[t]||t,this.queue(n=n||"fx",function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}})},ot=i.createElement("input"),st=i.createElement("select").appendChild(i.createElement("option")),ot.type="checkbox",f.checkOn=""!==ot.value,f.optSelected=st.selected,(ot=i.createElement("input")).value="t",ot.type="radio",f.radioValue="t"===ot.value;var ft,gt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return W(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(r=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=S.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(L);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=gt[t]||S.find.attr;gt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=gt[s],gt[s]=r,r=null!=n(e,t,i)?s:null,gt[s]=o),r}});var mt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function yt(e){return(e.match(L)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function _t(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(L)||[]}S.fn.extend({prop:function(e,t){return W(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(r=S.propHooks[t=S.propFix[t]||t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(S.propHooks.selected={get:function(e){return null},set:function(e){}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(g(e))return this.each(function(t){S(this).addClass(e.call(this,t,bt(this)))});if((t=_t(e)).length)for(;n=this[l++];)if(r=bt(n),i=1===n.nodeType&&" "+yt(r)+" "){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=yt(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(g(e))return this.each(function(t){S(this).removeClass(e.call(this,t,bt(this)))});if(!arguments.length)return this.attr("class","");if((t=_t(e)).length)for(;n=this[l++];)if(r=bt(n),i=1===n.nodeType&&" "+yt(r)+" "){for(s=0;o=t[s++];)for(;-1<i.indexOf(" "+o+" ");)i=i.replace(" "+o+" "," ");r!==(a=yt(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,bt(this),t),t)}):this.each(function(){var t,r,o,s;if(i)for(r=0,o=S(this),s=_t(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+yt(bt(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;S.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=g(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,S(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=S.map(r,function(e){return null==e?"":e+""})),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=S.valHooks[r.type]||S.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(St,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:yt(S.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=S(n).val(),s)return t;a.push(t)}return a}
vendor: 4,288 bytes, line 1
1,set:function(e,t){for(var n,i,r=e.options,o=S.makeArray(t),s=r.length;s--;)((i=r[s]).selected=-1<S.inArray(S.valHooks.option.get(i),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},f.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),f.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Et=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(t,n,r,o){var s,a,l,c,u,h,p,f,v=[r||i],y=d.call(t,"type")?t.type:t,b=d.call(t,"namespace")?t.namespace.split("."):[];if(a=f=l=r=r||i,3!==r.nodeType&&8!==r.nodeType&&!wt.test(y+S.event.triggered)&&(-1<y.indexOf(".")&&(y=(b=y.split(".")).shift(),b.sort()),u=y.indexOf(":")<0&&"on"+y,(t=t[S.expando]?t:new S.Event(y,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:S.makeArray(n,[t]),p=S.event.special[y]||{},o||!p.trigger||!1!==p.trigger.apply(r,n))){if(!o&&!p.noBubble&&!m(r)){for(wt.test((c=p.delegateType||y)+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(r.ownerDocument||i)&&v.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=v[s++])&&!t.isPropagationStopped();)f=a,t.type=1<s?c:p.bindType||y,(h=(J.get(a,"events")||{})[t.type]&&J.get(a,"handle"))&&h.apply(a,n),(h=u&&a[u])&&h.apply&&$(a)&&(t.result=h.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!$(r)||u&&g(r[y])&&!m(r)&&((l=r[u])&&(r[u]=null),S.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,Et),r[y](),t.isPropagationStopped()&&f.removeEventListener(y,Et),S.event.triggered=void 0,l&&(r[u]=l)),t.result}},simulate:function(e,t,n){var i=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(i,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),f.focusin||S.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=J.access(i,t);r||i.addEventListener(e,n,!0),J.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=J.access(i,t)-1;r?J.access(i,t,r):(i.removeEventListener(e,n,!0),J.remove(i,t))}}});var Tt=e.location,Ct=Date.now(),It=/\?/;S.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+t),n};var Rt=/\[\]$/,Dt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,i){var r;if(Array.isArray(t))S.each(t,function(t,r){n||Rt.test(e)?i(e,r):Ot(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==b(t))i(e,t);else for(r in t)Ot(e+"["+r+"]",t[r],n,i)}S.param=function(e,t){var n,i=[],r=function(e,t){var n=g(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){r(this.name,this.value)});else for(n in e)Ot(n,e[n],t,r);return i.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!At.test(e)&&(this.checked||!he.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var xt=/%20/g,Nt=/#.*$/,Pt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,jt=/^\/\//,Ft={},Ut={},Ht="*/".concat("*"),Bt=i.createElement("a");function Vt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(L)||[];
vendor: 6,014 bytes, line 1
1if(g(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Wt(e,t,n,i){var r={},o=e===Ut;function s(a){var l;return r[a]=!0,S.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function zt(e,t){var n,i,r=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&S.extend(!0,e,i),e}Bt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,S.ajaxSettings),t):zt(S.ajaxSettings,e)},ajaxPrefilter:Vt(Ft),ajaxTransport:Vt(Ut),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0);var r,o,s,a,l,c,u,d,h,p,f=S.ajaxSetup({},n=n||{}),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?S(g):S.event,v=S.Deferred(),y=S.Callbacks("once memory"),b=f.statusCode||{},_={},w={},E="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Mt.exec(s);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)T.always(e[T.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||E;return r&&r.abort(t),C(0,t),this}};if(v.promise(T),f.url=((t||f.url||Tt.href)+"").replace(jt,Tt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=i.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Bt.protocol+"//"+Bt.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=S.param(f.data,f.traditional)),Wt(Ft,f,n,T),u)return T;for(h in(d=S.event&&f.global)&&0==S.active++&&S.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Lt.test(f.type),o=f.url.replace(Nt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(xt,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(It.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Pt,"$1"),p=(It.test(o)?"&":"?")+"_="+Ct+++p),f.url=o+p),f.ifModified&&(S.lastModified[o]&&T.setRequestHeader("If-Modified-Since",S.lastModified[o]),S.etag[o]&&T.setRequestHeader("If-None-Match",S.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ht+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(g,T,f)||u))return T.abort();if(E="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),r=Wt(Ut,f,n,T)){if(T.readyState=1,d&&m.trigger("ajaxSend",[T,f]),u)return T;f.async&&0<f.timeout&&(l=e.setTimeout(function(){T.abort("timeout")},f.timeout));try{u=!1,r.send(_,C)}catch(t){if(u)throw t;C(-1,t)}}else C(-1,"No Transport");function C(t,n,i,a){var c,h,p,_,w,E=n;u||(u=!0,l&&e.clearTimeout(l),r=void 0,s=a||"",T.readyState=0<t?4:0,c=200<=t&&t<300||304===t,i&&(_=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,T,i)),_=function(e,t,n,i){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,_,T,c),c?(f.ifModified&&((w=T.getResponseHeader("Last-Modified"))&&(S.lastModified[o]=w),(w=T.getResponseHeader("etag"))&&(S.etag[o]=w)),204===t||"HEAD"===f.type?E="nocontent":304===t?E="notmodified":(E=_.state,h=_.data,c=!(p=_.error))):(p=E,!t&&E||(E="error",t<0&&(t=0))),T.status=t,T.statusText=(n||E)+"",c?v.resolveWith(g,[h,E,T]):v.rejectWith(g,[T,E,p]),T.statusCode(b),b=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[T,f,c?h:p]),y.fireWith(g,[T,E]),d&&(m.trigger("ajaxComplete",[T,f]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,t){S[t]=function(e,n,i,r){return g(n)&&(r=r||i,i=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:r,data:n,success:i},S.isPlainObject(e)&&e))}}),S._evalUrl=function(e,t){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}}
vendor: 4,979 bytes, line 1
1,dataFilter:function(e){S.globalEval(e,t)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var qt={0:200,1223:204},Gt=S.ajaxSettings.xhr();f.cors=!!Gt&&"withCredentials"in Gt,f.ajax=Gt=!!Gt,S.ajaxTransport(function(t){var n,i;if(f.cors||Gt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(qt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(r){if(n)throw r}},abort:function(){n&&n()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),i.head.appendChild(t[0])},abort:function(){n&&n()}}});var Yt,$t=[],Kt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||S.expando+"_"+Ct++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,s,a=!1!==t.jsonp&&(Kt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Kt,"$1"+r):!1!==t.jsonp&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||S.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always(function(){void 0===o?S(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,$t.push(r)),s&&g(o)&&o(s[0]),s=o=void 0}),"script"}),f.createHTMLDocument=((Yt=i.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Yt.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=i.implementation.createHTMLDocument("")).createElement("base")).href=i.location.href,t.head.appendChild(r)):t=i),s=!n&&[],(o=A.exec(e))?[t.createElement(o[1])]:(o=Se([e],t,s),s&&s.length&&S(s).remove(),S.merge([],o.childNodes)));var r,o,s},S.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return-1<a&&(i=yt(e.slice(a)),e=e.slice(0,a)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),0<s.length&&S.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(i?S("<div>").append(S.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=S.css(e,"position"),u=S(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=S.css(e,"to
1p"),l=S.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(s=(i=u.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),g(t)&&(t=t.call(e,n,S.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):u.css(d)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?{top:(t=i.getBoundingClientRect()).top+(n=i.ownerDocument.defaultView).pageYOffset,left:t.left+n.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===S.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),r.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-S.css(i,"marginTop",!0),left:t.left-r.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;S.fn[e]=function(i){return W(this,function(e,i,r){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r},e,i,arguments.length)}}),S.each(["top","left"],function(e,t){S.cssHooks[t]=ze(f.pixelPosition,function(e,n){if(n)return n=We(e,t),He.test(n)?S(e).position()[t]+"px":n})}),S.each({Height:"height",Width:"width"},function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){S.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return W(this,function(t,n,r){var o;return m(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?S.css(t,n,a):S.style(t,n,r,a)},t,s?r:void 0,s)}})}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){S.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}),S.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),S.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return i=o.call(arguments,2),(r=function(){return e.apply(t||this,i.concat(o.call(arguments)))}).guid=e.guid=e.guid||S.guid++,r},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=D,S.isFunction=g,S.isWindow=m,S.camelCase=Y,S.type=b,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Jt=e.jQuery,Xt=e.$;return S.noConflict=function(t){return e.$===S&&(e.$=Xt),t&&e.jQuery===S&&(e.jQuery=Jt),S},t||(e.jQuery=e.$=S),S}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t,n=0,i=Array.prototype.slice;e.cleanData=(t=e.cleanData,function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{(i=e._data(r,"events"))&&i.remove&&e(r).triggerHandler("remove")}catch(e){}t(n)}),e.widget=function(t,n,i){var r,o,s,a={},l=t.split(".")[0],c=l+"-"+(t=t.split(".")[1]);return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},r=e[l][t],o=e[l][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(i,function(t,i){a[t]=e.isFunction(i)?function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}():i}),o.prototype=e.widget.extend(s,{widgetEventPrefix:r&&s.widgetEventPrefix||t},a,{constructor:o,namespace:l,widgetName:t,widgetFullName:c}),r?(e.each(r._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o}
vendor: 13,547 bytes, line 1
1,e.widget.extend=function(t){for(var n,r,o=i.call(arguments,1),s=0,a=o.length;s<a;s++)for(n in o[s])r=o[s][n],o[s].hasOwnProperty(n)&&void 0!==r&&(t[n]=e.isPlainObject(r)?e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):r);return t},e.widget.bridge=function(t,n){var r=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=i.call(arguments,1),l=this;return s?this.length||"instance"!==o?this.each(function(){var n,i=e.data(this,r);return"instance"===o?(l=i,!1):i?e.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,a))!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):l=void 0:(a.length&&(o=e.widget.extend.apply(null,[o].concat(a))),this.each(function(){var t=e.data(this,r);t?(t.option(o||{}),t._init&&t._init()):e.data(this,r,new n(o,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,r;for(n in t)r=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&r&&r.length&&(i=e(r.get()),this._removeClass(r,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var n=[],i=this;function r(r,o){var s,a;for(a=0;a<r.length;a++)s=i.classesElementLookup[r[a]]||e(),s=e(t.add?e.unique(s.get().concat(t.element.get())):s.not(t.element).get()),i.classesElementLookup[r[a]]=s,n.push(r[a]),o&&t.classes[r[a]]&&n.push(t.classes[r[a]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&r(t.keys.match(/\S+/g)||[],!0),t.extra&&r(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,function(i,r){-1!==e.inArray(t.target,r)&&(n.classesElementLookup[i]=e(r.not(t.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof e||null===e,o={extra:r?t:n,keys:r?e:t,element:r?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,function(i,s){function a(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?r.on(c,u,a):n.on(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var r,o,s=this.options[t];if(i=i||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(s)&&!1===s.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){var s;"string"==typeof r&&(r={effect:r});var a=r?!0===r||"number"==typeof r?n:r.effect||n:t;"number"==typeof(r=r||{})&&(r={duration:r}),s=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&e.effects&&e.effects.effect[a]?i[t](r):a!==t&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}}),function(){var t,n=Math.max,i=Math.abs,r=/left|center|right/,o=/top|center|bottom/,s=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,l=/%$/,c=e.fn.position;function u(e,t,n){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?n/100:1)]}function d(t,n){return parseInt(e.css(t,n),10)||0}e.position={scrollbarWidth:function(){if(void 0!==t)return t;var n,i,r=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=r.children()[0];return e("body").append(r),n=o.offsetWidth,r.css("overflow","scroll"),n===(i=o.offsetWidth)&&(i=r[0].clientWidth),r.remove(),t=n-i},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:r?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:r,offset:i||r?{left:0,top:0}:e(t).offset(),scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var l,h,p,f,g,m,v,y,b=e(t.of),_=e.position.getWithinInfo(t.within),S=e.position.getScrollInfo(_),w=(t.collision||"flip").split(" "),E={};return m=9===(y=(v=b)[0]).nodeType?{width:v.width(),height:v.height(),offset:{top:0,left:0}}:e.isWindow(y)?{width:v.width(),height:v.height(),offset:{top:v.scrollTop(),left:v.scrollLeft()}}:y.preventDefault?{width:0,height:0,offset:{top:y.pageY,left:y.pageX}}:{width:v.outerWidth(),height:v.outerHeight(),offset:v.offset()},b[0].preventDefault&&(t.at="left top"),h=m.width,p=m.height,g=e.extend({},f=m.offset),e.each(["my","at"],function(){var e,n,i=(t[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):o.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=o.test(i[1])?i[1]:"center",e=s.exec(i[0]),n=s.exec(i[1]),E[this]=[e?e[0]:0,n?n[0]:0],t[this]=[a.exec(i[0])[0],a.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===t.at[0]?g.left+=h:"center"===t.at[0]&&(g.left+=h/2),"bottom"===t.at[1]?g.top+=p:"center"===t.at[1]&&(g.top+=p/2),l=u(E.at,h,p),g.left+=l[0],g.top+=l[1],this.each(function(){var r,o,s=e(this),a=s.outerWidth(),c=s.outerHeight(),m=d(this,"marginLeft"),v=d(this,"marginTop"),y=a+m+d(this,"marginRight")+S.width,T=c+v+d(this,"marginBottom")+S.height,C=e.extend({},g),I=u(E.my,s.outerWidth(),s.outerHeight());"right"===t.my[0]?C.left-=a:"center"===t.my[0]&&(C.left-=a/2),"bottom"===t.my[1]?C.top-=c:"center"===t.my[1]&&(C.top-=c/2),C.left+=I[0],C.top+=I[1],r={marginLeft:m,marginTop:v},e.each(["left","top"],function(n,i){e.ui.position[w[n]]&&e.ui.position[w[n]][i](C,{targetWidth:h,targetHeight:p,elemWidth:a,elemHeight:c,collisionPosition:r,collisionWidth:y,collisionHeight:T,offset:[l[0]+I[0],l[1]+I[1]],my:t.my,at:t.at,within:_,elem:s})}),t.using&&(o=function(e){var r=f.left-C.left,o=r+h-a,l=f.top-C.top,u=l+p-c,d={target:{element:b,left:f.left,top:f.top,width:h,height:p},element:{element:s,left:C.left,top:C.top,width:a,height:c},horizontal:o<0?"left":r>0?"right":"center",vertical:u<0?"top":l>0?"bottom":"middle"};h<a&&i(r+o)<h&&(d.horizontal="center"),p<c&&i(l+u)<p&&(d.vertical="middle"),d.important=n(i(r),i(o))>n(i(l),i(u))?"horizontal":"vertical",t.using.call(this,e,d)}),s.offset(e.extend(C,{using:o}))})},e.ui.position={fit:{left:function(e,t){var i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=e.left-t.collisionPosition.marginLeft,a=r-s,l=s+t.collisionWidth-o-r;t.collisionWidth>o?a>0&&l<=0?e.left+=a-(e.left+a+t.collisionWidth-o-r):e.left=l>0&&a<=0?r:a>l?r+o-t.collisionWidth:r:a>0?e.left+=a:l>0?e.left-=l:e.left=n(e.left-s,e.left)},top:function(e,t){var i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,s=e.top-t.collisionPosition.marginTop,a=r-s,l=s+t.collisionHeight-o-r;t.collisionHeight>o?a>0&&l<=0?e.top+=a-(e.top+a+t.collisionHeight-o-r):e.top=l>0&&a<=0?r:a>l?r+o-t.collisionHeight:r:a>0?e.top+=a:l>0?e.top-=l:e.top=n(e.top-s,e.top)}},flip:{left:function(e,t){var n,r,o=t.within,s=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,l=e.left-t.collisionPosition.marginLeft,c=l-a,u=l+t.collisionWidth-s-a,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?((n=e.left+d+h+p+t.collisionWidth-s-(o.offset.left+o.scrollLeft))<0||n<i(c))&&(e.left+=d+h+p):u>0&&((r=e.left-t.collisionPosition.marginLeft+d+h+p-a)>0||i(r)<u)&&(e.left+=d+h+p)},top:function(e,t){var n,r,o=t.within,s=o.height,a=o.isWindow?o.scrollTop:o.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-a,u=l+t.collisionHeight-s-a,d="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,p=-2*t.offset[1];c<0?((r=e.top+d+h+p+t.collisionHeight-s-(o.offset.top+o.scrollTop))<0||r<i(c))&&(e.top+=d+h+p):u>0&&((n=e.top-t.collisionPosition.marginTop+d+h+p-a)>0||i(n)<u)&&(e.top+=d+h+p)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}}),e.fn.extend({disableSelection:(r="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(r+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var r,o,s,a,l="ui-effects-animated",c=e;e.effects={effect:{}},function(e,t){var n,i=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],o=e.Color=function(t,n,i,r){return new e.Color.fn.parse(t,n,i,r)},s={rgba:{props:{red:{idx:0,type:"byte"}
1,green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},l=o.support={},c=e("<p>")[0],u=e.each;function d(e,t,n){var i=a[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:0>e?0:i.max<e?i.max:e)}function h(t){var i=o(),a=i._rgba=[];return t=t.toLowerCase(),u(r,function(e,n){var r,o=n.re.exec(t),l=o&&n.parse(o),c=n.space||"rgba";if(l)return r=i[c](l),i[s[c].cache]=r[s[c].cache],a=i._rgba=r._rgba,!1}),a.length?("0,0,0,0"===a.join()&&e.extend(a,n.transparent),i):n[t]}function p(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}c.style.cssText="background-color:rgba(1,1,1,.5)",l.rgba=c.style.backgroundColor.indexOf("rgba")>-1,u(s,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=e.extend(o.prototype,{parse:function(t,i,r,a){if(void 0===t)return this._rgba=[null,null,null,null],this;(t.jquery||t.nodeType)&&(t=e(t).css(i),i=void 0);var l=this,c=e.type(t),p=this._rgba=[];return void 0!==i&&(t=[t,i,r,a],c="array"),"string"===c?this.parse(h(t)||n._default):"array"===c?(u(s.rgba.props,function(e,n){p[n.idx]=d(t[n.idx],n)}),this):"object"===c?(u(s,t instanceof o?function(e,n){t[n.cache]&&(l[n.cache]=t[n.cache].slice())}:function(n,i){var r=i.cache;u(i.props,function(e,n){if(!l[r]&&i.to){if("alpha"===e||null==t[e])return;l[r]=i.to(l._rgba)}l[r][n.idx]=d(t[e],n,!0)}),l[r]&&e.inArray(null,l[r].slice(0,3))<0&&(l[r][3]=1,i.from&&(l._rgba=i.from(l[r])))}),this):void 0},is:function(e){var t=o(e),n=!0,i=this;return u(s,function(e,r){var o,s=t[r.cache];return s&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],u(r.props,function(e,t){if(null!=s[t.idx])return n=s[t.idx]===o[t.idx]})),n}),n},_space:function(){var e=[],t=this;return u(s,function(n,i){t[i.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),i=n._space(),r=s[i],l=0===this.alpha()?o("transparent"):this,c=l[r.cache]||r.to(l._rgba),h=c.slice();return n=n[r.cache],u(r.props,function(e,i){var r=i.idx,o=c[r],s=n[r],l=a[i.type]||{};null!==s&&(null===o?h[r]=s:(l.mod&&(s-o>l.mod/2?o+=l.mod:o-s>l.mod/2&&(o-=l.mod)),h[r]=d((s-o)*t+o,i)))}),this[i](h)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=o(t)._rgba;return o(e.map(n,function(e,t){return(1-i)*r[t]+i*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,s.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n=e[0]/255,i=e[1]/255,r=e[2]/255,o=e[3],s=Math.max(n,i,r),a=Math.min(n,i,r),l=s-a,c=s+a,u=.5*c;return t=0===l?0:u<=.5?l/c:l/(2-c),[Math.round(a===s?0:n===s?60*(i-r)/l+360:i===s?60*(r-n)/l+120:60*(n-i)/l+240)%360,t,u,null==o?1:o]},s.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],r=e[3],o=i<=.5?i*(1+n):i+n-i*n,s=2*i-o;return[Math.round(255*p(s,o,t+1/3)),Math.round(255*p(s,o,t)),Math.round(255*p(s,o,t-1/3)),r]},u(s,function(t,n){var r=n.props,s=n.cache,a=n.to,l=n.from;o.fn[t]=function(t){if(a&&!this[s]&&(this[s]=a(this._rgba)),void 0===t)return this[s].slice();var n,i=e.type(t),c="array"===i||"object"===i?t:arguments,h=this[s].slice();return u(r,function(e,t){var n=c["object"===i?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=d(n,t)}),l?((n=o(l(h)))[s]=h,n):o(h)},u(r,function(n,r){o.fn[n]||(o.fn[n]=function(o){var s,a=e.type(o),l="alpha"===n?this._hsla?"hsla":"rgba":t,c=this[l](),u=c[r.idx];return"undefined"===a?u:("function"===a&&(o=o.call(this,u),a=e.type(o)),null==o&&r.empty?this:("string"===a&&(s=i.exec(o))&&(o=u+parseFloat(s[2])*("+"===s[1]?1:-1)),c[r.idx]=o,this[l](c)))})})}),o.hook=function(t){var n=t.split(" ");u(n,function(t,n){e.cssHooks[n]={set:function(t,i){var r,s,a="";if("transparent"!==i&&("string"!==e.type(i)||(r=h(i)))){if(i=o(r||i),!l.rgba&&1!==i._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===a||"transparent"===a)&&s&&s.style;)try{a=e.css(s,"backgroundColor"),s=s.parentNode}catch(e){}i=i.blend(a&&"transparent"!==a?a:"_default")}i=i.toRgbaString()}try{t.style[n]=i}catch(e){}}}
1,e.fx.step[n]=function(t){t.colorInit||(t.start=o(t.elem,n),t.end=o(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),e.cssHooks.borderColor={expand:function(e){var t={};return u(["Top","Right","Bottom","Left"],function(n,i){t["border"+i+"Color"]=e}),t}},n=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){var t,n=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function r(t){var n,i,r=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[n=r[i]]&&(o[e.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(c.style(e.elem,n,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,o,s,a){var l=e.speed(o,s,a);return this.queue(function(){var o,s=e(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map(function(){return{el:e(this),start:r(this)}}),(o=function(){e.each(n,function(e,n){t[n]&&s[n+"Class"](t[n])})})(),c=c.map(function(){return this.end=r(this.el[0]),this.diff=function(t,n){var r,o,s={};for(r in n)t[r]!==(o=n[r])&&(i[r]||!e.fx.step[r]&&isNaN(parseFloat(o))||(s[r]=o));return s}(this.start,this.end),this}),s.attr("class",a),c=c.map(function(){var t=this,n=e.Deferred(),i=e.extend({},l,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()}),e.when.apply(e,c.get()).done(function(){o(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(s[0])})})},e.fn.extend({addClass:(t=e.fn.addClass,function(n,i,r,o){return i?e.effects.animateClass.call(this,{add:n},i,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(n,i,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,r,o,s){return"boolean"==typeof i||void 0===i?r?e.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,s):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,r,o)}}(e.fn.toggleClass),switchClass:function(t,n,i,r,o){return e.effects.animateClass.call(this,{add:n,remove:t},i,r,o)}})}(),function(){var t;function n(t,n,i,r){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(r=i,i=n,n={}),e.isFunction(i)&&(r=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=r||n.complete,t}function i(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||"string"==typeof t&&!e.effects.effect[t]||!!e.isFunction(t)||"object"==typeof t&&!t.effect}function r(e,t){var n=t.outerWidth(),i=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,n,i,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?n:parseFloat(r[2]),bottom:"auto"===r[3]?i:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.filters&&e.expr.filters.animated&&(e.expr.filters.animated=(t=e.expr.filters.animated,function(n){return!!e(n).data(l)||t(n)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var n=0,i=t.length;n<i;n++)null!==t[n]&&e.data("ui-effects-"+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n,i=0,r=t.length;i<r;i++)null!==t[i]&&(n=e.data("ui-effects-"+t[i]),e.css(t[i],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;return t.wrap(i),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).trigger("focus")),t}}),e.extend(e.effects,{version:"1.12.1",define:function(t,n,i){return i||
vendor: 6,418 bytes, line 1
1(i=n,n="effect"),e.effects.effect[t]=i,e.effects.effect[t].mode=n,i},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(t||100)/100:1,r="vertical"!==n?(t||100)/100:1;return{height:e.height()*r,width:e.width()*i,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*i}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var i=e.queue();t>1&&i.splice.apply(i,[1,0].concat(i.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createPlaceholder:function(t){var n,i=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",n=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",n)),t.css({position:i,left:r.left,top:r.top}),n},removePlaceholder:function(e){var t="ui-effects-placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,n,i,r){return r=r||{},e.each(n,function(e,n){var o=t.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),e.fn.extend({effect:function(){var t=n.apply(this,arguments),i=e.effects.effect[t.effect],r=i.mode,o=t.queue,s=o||"fx",a=t.complete,c=t.mode,u=[],d=function(t){var n=e(this),i=e.effects.mode(n,c)||r;n.data(l,!0),u.push(i),r&&("show"===i||i===r&&"hide"===i)&&n.show(),r&&"none"===i||e.effects.saveStyle(n),e.isFunction(t)&&t()};if(e.fx.off||!i)return c?this[c](t.duration,a):this.each(function(){a&&a.call(this)});function h(n){var o=e(this);function s(){e.isFunction(a)&&a.call(o[0]),e.isFunction(n)&&n()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[c](),s()):i.call(o[0],t,function(){o.removeData(l),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),s()}):(o.is(":hidden")?"hide"===c:"show"===c)?(o[c](),s()):i.call(o[0],t,s)}return!1===o?this.each(d).each(h):this.queue(s,d).queue(s,h)},show:function(e){return function(t){if(i(t))return e.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(i(t))return e.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(i(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])}),i},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,n){var i=e(this),r=e(t.to),o="fixed"===r.css("position"),s=e("body"),a=o?s.scrollTop():0,l=o?s.scrollLeft():0,c=r.offset(),u={top:c.top-a,left:c.left-l,height:r.innerHeight(),width:r.innerWidth()},d=i.offset(),h=e("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:d.top-a,left:d.left-l,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){h.remove(),e.isFunction(n)&&n()})}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),o={},e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){o[t]=function(t){return Math.pow(t,e+2)}}),e.extend(o,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(o,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(2*e)/2:1-n(-2*e+2)/2}}),e.effects.define("blind","hide",function(t,n){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=e(this),o=t.direction||"up",s=r.cssClip(),a={clip:e.extend({},s)},l=e.effects.createPlaceholder(r);a.clip[i[o][0]]=a.clip[i[o][1]],"show"===t.mode&&(r.cssClip(a.clip),l&&l.css(e.effects.clipToBox(a)),a.clip=s),l&&l.animate(e.effects.clipToBox(a),t.duration,t.easing),r.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("bounce",function(t,n){var i,r,o,s=e(this),a=t.mode,l="hide"===a,c="show"===a,u=t.direction||"up",d=t.distance,h=t.times||5,p=2*h+(c||l?1:0),f=t.duration/p,g=t.easing,m="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,y=0,b=s.queue().length;for(e.effects.createPlaceholder(s),o=s.css(m),d||(d=s["top"===m?"outerHeight":"outerWidth"]()/3),c&&((r={opacity:1})[m]=o,s.css("opacity",0).css(m,v?2*-d:2*d).animate(r,f,g)),l&&(d/=Math.pow(2,h-1)),(r={})[m]=o;y<h;y++)(i={})[m]=(v?"-=":"+=")+d,s.animate(i,f,g).animate(r,f,g),d=l?2*d:d/2;l&&((i={opacity:0}
vendor: 4,552 bytes, line 1
1)[m]=(v?"-=":"+=")+d,s.animate(i,f,g)),s.queue(n),e.effects.unshift(s,b,p+1)}),e.effects.define("clip","hide",function(t,n){var i,r={},o=e(this),s=t.direction||"vertical",a="both"===s,l=a||"horizontal"===s,c=a||"vertical"===s;i=o.cssClip(),r.clip={top:c?(i.bottom-i.top)/2:i.top,right:l?(i.right-i.left)/2:i.right,bottom:c?(i.bottom-i.top)/2:i.bottom,left:l?(i.right-i.left)/2:i.left},e.effects.createPlaceholder(o),"show"===t.mode&&(o.cssClip(r.clip),r.clip=i),o.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("drop","hide",function(t,n){var i,r=e(this),o="show"===t.mode,s=t.direction||"left",a="up"===s||"down"===s?"top":"left",l="up"===s||"left"===s?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};e.effects.createPlaceholder(r),i=t.distance||r["top"===a?"outerHeight":"outerWidth"](!0)/2,u[a]=l+i,o&&(r.css(u),u[a]=c+i,u.opacity=1),r.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("explode","hide",function(t,n){var i,r,o,s,a,l,c=t.pieces?Math.round(Math.sqrt(t.pieces)):3,u=c,d=e(this),h="show"===t.mode,p=d.show().css("visibility","hidden").offset(),f=Math.ceil(d.outerWidth()/u),g=Math.ceil(d.outerHeight()/c),m=[];function v(){m.push(this),m.length===c*u&&(d.css({visibility:"visible"}),e(m).remove(),n())}for(i=0;i<c;i++)for(s=p.top+i*g,l=i-(c-1)/2,r=0;r<u;r++)o=p.left+r*f,a=r-(u-1)/2,d.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*f,top:-i*g}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:g,left:o+(h?a*f:0),top:s+(h?l*g:0),opacity:h?0:1}).animate({left:o+(h?0:a*f),top:s+(h?0:l*g),opacity:h?1:0},t.duration||500,t.easing,v)}),e.effects.define("fade","toggle",function(t,n){var i="show"===t.mode;e(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("fold","hide",function(t,n){var i=e(this),r=t.mode,o="show"===r,s="hide"===r,a=t.size||15,l=/([0-9]+)%/.exec(a),c=t.horizFirst?["right","bottom"]:["bottom","right"],u=t.duration/2,d=e.effects.createPlaceholder(i),h=i.cssClip(),p={clip:e.extend({},h)},f={clip:e.extend({},h)},g=[h[c[0]],h[c[1]]],m=i.queue().length;l&&(a=parseInt(l[1],10)/100*g[s?0:1]),p.clip[c[0]]=a,f.clip[c[0]]=a,f.clip[c[1]]=0,o&&(i.cssClip(f.clip),d&&d.css(e.effects.clipToBox(f)),f.clip=h),i.queue(function(n){d&&d.animate(e.effects.clipToBox(p),u,t.easing).animate(e.effects.clipToBox(f),u,t.easing),n()}).animate(p,u,t.easing).animate(f,u,t.easing).queue(n),e.effects.unshift(i,m,4)}),e.effects.define("highlight","show",function(t,n){var i=e(this),r={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(r.opacity=0),e.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),e.effects.define("size",function(t,n){var i,r,o,s=e(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=t.mode,d="effect"!==u,h=t.scale||"both",p=t.origin||["middle","center"],f=s.css("position"),g=s.position(),m=e.effects.scaledDimensions(s),v=t.from||m,y=t.to||e.effects.scaledDimensions(s,0);e.effects.createPlaceholder(s),"show"===u&&(o=v,v=y,y=o),r={from:{y:v.height/m.height,x:v.width/m.width},to:{y:y.height/m.height,x:y.width/m.width}},"box"!==h&&"both"!==h||(r.from.y!==r.to.y&&(v=e.effects.setTransition(s,l,r.from.y,v),y=e.effects.setTransition(s,l,r.to.y,y)),r.from.x!==r.to.x&&(v=e.effects.setTransition(s,c,r.from.x,v),y=e.effects.setTransition(s,c,r.to.x,y))),"content"!==h&&"both"!==h||r.from.y!==r.to.y&&(v=e.effects.setTransition(s,a,r.from.y,v),y=e.effects.setTransition(s,a,r.to.y,y)),p&&(i=e.effects.getBaseline(p,m),v.top=(m.outerHeight-v.outerHeight)*i.y+g.top,v.left=(m.outerWidth-v.outerWidth)*i.x+g.left,y.top=(m.outerHeight-y.outerHeight)*i.y+g.top,y.left=(m.outerWidth-y.outerWidth)*i.x+g.left),s.css(v),"content"!==h&&"both"!==h||(l=l.concat(["marginTop","marginBottom"]).concat(a),c=c.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var n=e(this),i=e.effects.scaledDimensions(n),o={height:i.height*r.from.y,width:i.width*r.from.x,outerHeight:i.outerHeight*r.from.y,outerWidth:i.outerWidth*r.from.x},s={height:i.height*r.to.y,width:i.width*r.to.x,outerHeight:i.height*r.to.y,outerWidth:i.width*r.to.x};r.from.y!==r.to.y&&(o=e.effects.setTransition(n,l,r.from.y,o),s=e.effects.setTransition(n,l,r.to.y,s)
1),r.from.x!==r.to.x&&(o=e.effects.setTransition(n,c,r.from.x,o),s=e.effects.setTransition(n,c,r.to.x,s)),d&&e.effects.saveStyle(n),n.css(o),n.animate(s,t.duration,t.easing,function(){d&&e.effects.restoreStyle(n)})})),s.animate(y,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){var t=s.offset();0===y.opacity&&s.css("opacity",v.opacity),d||(s.css("position","static"===f?"relative":f).offset(t),e.effects.saveStyle(s)),n()}})}),e.effects.define("scale",function(t,n){var i=e(this),r=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==r?0:100),s=e.extend(!0,{from:e.effects.scaledDimensions(i),to:e.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),e.effects.effect.size.call(this,s,n)}),e.effects.define("puff","hide",function(t,n){var i=e.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});e.effects.effect.scale.call(this,i,n)}),e.effects.define("pulsate","show",function(t,n){var i=e(this),r=t.mode,o="show"===r,s=2*(t.times||5)+(o||"hide"===r?1:0),a=t.duration/s,l=0,c=1,u=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),l=1);c<s;c++)i.animate({opacity:l},a,t.easing),l=1-l;i.animate({opacity:l},a,t.easing),i.queue(n),e.effects.unshift(i,u,s+1)}),e.effects.define("shake",function(t,n){var i=1,r=e(this),o=t.direction||"left",s=t.distance||20,a=t.times||3,l=2*a+1,c=Math.round(t.duration/l),u="up"===o||"down"===o?"top":"left",d="up"===o||"left"===o,h={},p={},f={},g=r.queue().length;for(e.effects.createPlaceholder(r),h[u]=(d?"-=":"+=")+s,p[u]=(d?"+=":"-=")+2*s,f[u]=(d?"-=":"+=")+2*s,r.animate(h,c,t.easing);i<a;i++)r.animate(p,c,t.easing).animate(f,c,t.easing);r.animate(p,c,t.easing).animate(h,c/2,t.easing).queue(n),e.effects.unshift(r,g,l+1)}),e.effects.define("slide","show",function(t,n){var i,r,o=e(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,d=t.distance||o["top"===c?"outerHeight":"outerWidth"](!0),h={};e.effects.createPlaceholder(o),i=o.cssClip(),r=o.position()[c],h[c]=(u?-1:1)*d+r,h.clip=o.cssClip(),h.clip[s[l][1]]=h.clip[s[l][0]],"show"===a&&(o.cssClip(h.clip),o.css(c,h[c]),h.clip=i,h[c]=r),o.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:n})}),!1!==e.uiBackCompat&&e.effects.define("transfer",function(t,n){e(this).transfer(t,n)}),e.ui.focusable=function(t,n){var i,r,o,s,a,l=t.nodeName.toLowerCase();return"area"===l?(r=(i=t.parentNode).name,!(!t.href||!r||"map"!==i.nodeName.toLowerCase())&&(o=e("img[usemap='#"+r+"']")).length>0&&o.is(":visible")):(/^(input|select|textarea|button|object)$/.test(l)?(s=!t.disabled)&&(a=e(t).closest("fieldset")[0])&&(s=!a.disabled):s="a"===l&&t.href||n,s&&e(t).is(":visible")&&function(e){for(var t=e.css("visibility");"inherit"===t;)t=(e=e.parent()).css("visibility");return"hidden"!==t}(e(t)))},e.extend(e.expr[":"],{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}}),e.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):e(this[0].form)},e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout(function(){var n=t.data("ui-form-reset-instances");e.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===e.fn.jquery.substring(0,3)&&(e.each(["Width","Height"],function(t,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function s(t,n,r,o){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}e.fn["inner"+n]=function(t){return void 0===t?o["inner"+n].call(this):this.each(function(){e(this).css(r,s(this,t)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?o["outer"+n].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.ui.escapeSelector=(s=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(e){return e.replace(s,"\\$1")}),e.fn.labels=function(){var t,n,i,r,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),(i=this.attr("id"))&&(o=(t=this.eq(0).parents().last(
vendor: 8,683 bytes, line 1
1)).add(t.length?t.siblings():this.siblings()),n="label[for='"+e.ui.escapeSelector(i)+"']",r=r.add(o.find(n).addBack(n))),this.pushStack(r))},e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},e.extend(e.expr[":"],{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}}),e.fn.extend({uniqueId:(a=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,n,i=this.options.icons;i&&(t=e("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var n=e.ui.keyCode,i=this.headers.length,r=this.headers.index(t.target),o=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:o=this.headers[(r+1)%i];break;case n.LEFT:case n.UP:o=this.headers[(r-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:o=this.headers[0];break;case n.END:o=this.headers[i-1]}o&&(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),e(o).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,n=this.options,i=n.heightStyle,r=this.element.parent();this.active=this._findActive(n.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=e(this),n=t.uniqueId().attr("id"),i=t.next(),r=i.uniqueId().attr("id");t.attr("aria-controls",r),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(t=r.height(),this.element.siblings(":visible").each(function(){var n=e(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(t-=n.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===i&&(t=0,this.headers.next().each(function(){var n=e(this).is(":visible");n||e(this).show(),t=Math.max(t,e(this).css("height","").height()),n||e(this).hide()}).height(t))},_activate:function(t){var n=this._findActive(t)[0];n!==this.active[0]&&this._eventHandler({target:n=n||this.active[0],currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var n,i,r=this.options,o=this.active,s=e(t.currentTarget),a=s[0]===o[0],l=a&&r.collapsible,c=l?e():s.next(),u={oldHeader:o,oldPanel:o.next(),newHeader:l?e():s,newPanel:c};t.preventDefault(),a&&!r.collapsible||!1===this._trigger("beforeActivate",t,u)||(r.active=!l&&this.headers.index(s),this.active=a?e():s,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=o.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.activeHeader)._addClass(n,null,r.icons.header)),a||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),r.icons&&(i=s.children(".ui-accordion-header-icon"),this._removeClass(i,null,r.icons.header)._addClass(i,null,r.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var n=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,t):(i.hide(),n.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,n){var i,r,o,s=this,a=0,l=e.css("box-sizing"),c=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=c&&u.down||u,h=function(){s._toggleComplete(n)};return"number"==typeof d&&(o=d),"string"==typeof d&&(r=d),r=r||d.easing||u.easing,o=o||d.duration||u.duration,t.length?e.length?(i=e.show().outerHeight(),t.animate(this.hideProps,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:o,easing:r,complete:h,step:function(e,n){
vendor: 7,641 bytes, line 1
1n.now=Math.round(e),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==s.options.heightStyle&&(n.now=Math.round(i-t.outerHeight()-a),a=0)}})):t.animate(this.hideProps,o,r,h):e.animate(this.showProps,o,r,h)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(n){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t},e.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var n=e(t.target),i=e(e.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var n=e(t.target).closest(".ui-menu-item"),i=e(t.currentTarget);n[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){!e.contains(this.element[0],e.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var n,i,r,o,s=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:s=!1,i=this.previousFilter||"",o=!1,r=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),r===i?o=!0:r=i+r,n=this._filterMenuItems(r),(n=o&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n).length||(r=String.fromCharCode(t.keyCode),n=this._filterMenuItems(r)),n.length?(this.focus(t,n),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n,i,r,o=this,s=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev(),i=e("<span>").data("ui-menu-submenu-caret",!0);o._addClass(i,"ui-menu-icon","ui-icon "+s),n.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",n.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=e(this);o._isDivider(t)&&o._addClass(t,"ui-menu-divider","ui-widget-content")}),r=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(r,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,i,r;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,i,r,o,s,a;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,r=t.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=t.outerHeight(),r<0?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(t),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
1se")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var i;this.active&&(i="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[t]()),this.focus(n,i)},nextPage:function(t){var n,i,r;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i-r<0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var n,i,r;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-i+r>0}),this.focus(t,n)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)},_filterMenuItems:function(t){var n=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(e.trim(e(this).children(".ui-menu-item-wrapper").text()))})}}),e.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,n,i,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=o||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return t=!0,i=!0,void(n=!0);t=!1,i=!1,n=!1;var o=e.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",r);break;case o.UP:t=!0,this._keyEvent("previous",r);break;case o.DOWN:t=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(t=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:n=!0,this._searchTimeout(r)}},keypress:function(i){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var r=e.ui.keyCode;switch(i.keyCode){case r.PAGE_UP:this._move("previousPage",i);break;case r.PAGE_DOWN:this._move("nextPage",i);break;case r.UP:this._keyEvent("previous",i);break;case r.DOWN:this._keyEvent("next",i)}}},input:function(e){if(i)return i=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=e("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==e.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,n){var i,r;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});r=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:r}
vendor: 6,561 bytes, line 1
1)&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value),(i=n.item.attr("aria-label")||r.value)&&e.trim(i).length&&(this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(t,n){var i=n.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==e.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=e("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var n=this.menu.element[0];return t.target===this.element[0]||t.target===n||e.contains(n,t.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,n,i=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,r){i.xhr&&i.xhr.abort(),i.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){r(e)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),n=this.menu.element.is(":visible");t&&(!t||n||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)||(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var n=this.menu.element.empty();this._renderMenu(n,t),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var i=this;e.each(n,function(e,n){i._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<div>").text(n.label)).appendTo(t)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var i=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return i.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))}});var u,d=/ui-corner-([a-z]){2,6}/g;function h(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=p(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function p(t){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",n,function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",n,f)}function f(){e.datepicker._isDisabledDatepicker(u.inline?u.dpDiv.parent()[0]:u.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function g(t,n){for(var i in e.extend(t,n),n)null==n[i]&&(t[i]=n[i]);return t}e.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var t=this,n=[];e.each(this.options.items,function(i,r){var o,s={};if(r)return"controlgroupLabel"===i?((o=t.element.find(r)).each(function(){var t=e(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),t._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(n=n.concat(o.get()))):void(e.fn[i]&&(s=t["_"+i+"Options"]?t["_"+i+"Options"]("middle"):{classes:{}},t.element.find(r).each(function(){var r=e(this),o=r[i]("instance"),a=e.widget.extend({},s);if("button"!==i||!r.parent(".ui-spinner").length){o||(o=r[i]()[i]("instance")),o&&(a.classes=t._resolveClassesValues(a.classes,o)),r[i](a);var l=r[i]("widget");e.data(l[0],"ui-controlgroup-data",o||r[i]("instance")),n.push(l[0])}})))}),this.childWidgets=e(e.unique(n)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var n=e(this).data("ui-controlgroup-data");n&&n[t]&&n[t]()})},_updateCornerClass:function(e,t){var n=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(e,null,n)},_buildSimpleOptions:function(e,t){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[t]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[e],i},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(t,n){var i={};return e.each(t,function(r){var o=n.options.classes[r]||"";o=e.trim(o.replace(d,"")),i[r]=(o+" "+t[r]).replace(/\s+/g," ")}),i},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"!==e?this.refresh():this._callChildMethod(t?"disable":"enable")},refresh:function(){var t,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),t=this.childWidgets,this.options.onlyVisible&&(t=t.filter(":visible")),t.length&&(e.each(["first","last"],function(e,i){var r=t[i]().data("ui-controlgroup-data");if(r&&n["_"+r.widgetName+"Options"]){var o=n["_"+r.widgetName+"Options"](1===t.length?"only":i);o.classes=n._resolveClassesValues(o.classes,r),r.element[r.widgetName](o)}else n._updateCornerClass(t[i](),i)}),this._callChildMethod("refresh"))}}),e.widget("ui.checkboxradio",[e.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,n,i=this,r=this._super()||{};return this._readType(),n=this.element.labels(),this.label=e(n[n.length-1]),this.label.length||e.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){i.originalLabel+=3===this.nodeType?e(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(r.disabled=t),r},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();
vendor: 1,428 bytes, line 1
1this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||e.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,n="input[name='"+e.ui.escapeSelector(t)+"']";return t?(this.form.length?e(this.form[0].elements).filter(n):e(n).filter(function(){return 0===e(this).form().length})).not(this.element):e([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=e(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t){if(this._super(e,t),"disabled"===e)return this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t);this.refresh()}},_updateIcon:function(t){var n="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=e("<span>"),this.iconSpace=e("<span> </span>
1"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(n+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):n+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",n),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),this.iconSpace&&(e=e.not(this.iconSpace[0])),e.remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]),e.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),null!=(e=this.element[0].disabled)&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,n){var i="iconPosition"!==t,r=i?this.options.iconPosition:n,o="top"===r||"bottom"===r;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,n),this._attachIcon(r),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 6,471 bytes, line 1
1pace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){(void 0===e.showLabel?this.options.showLabel:e.showLabel)||(void 0===e.icon?this.options.icon:e.icon)||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),this.element[0].disabled=t,t&&this.element.blur())},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),!1!==e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){"text"!==e?("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",t)}}),e.fn.button=function(t){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?t.apply(this,arguments):(e.ui.checkboxradio||e.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(e.fn.button),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.extend(e.ui,{datepicker:{version:"1.12.1"}}),e.extend(h.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return g(this._defaults,e||{}),this},_attachDatepicker:function(t,n){var i,r,o;r="div"===(i=t.nodeName.toLowerCase())||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(o=this._newInst(e(t),r)).settings=e.extend({},n||{}),"input"===i?this._connectDatepicker(t,o):r&&this._inlineDatepicker(t,o)},_newInst:function(t,n){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?p(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,n){var i=e(t);n.append=e([]),n.trigger=e([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(n),e.data(t,"datepicker",n),n.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,n){var i,r,o,s=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),s&&(n.append=e("<span class='"+this._appendClass+"'>"+s+"</span>"),t[a?"before":"after"](n.append)),t.off("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),"focus"!==(i=this._get(n,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=e(this._get(n,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:r,title:r}):r)),t[a?"before":"after"](n.trigger),n.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,i,r,o=new Date(2009,11,20),s=this._get(e,"dateFormat");s.match(/[DM]/)&&(o.setMonth((t=function(e){for(n=0,i=0,r=0;r<e.length;r++)e[r].length>n&&(n=e[r].length,i=r);return i})(this._get(e,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,n){var i=e(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),e.data(t,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(t),n.dpDiv.css("display","block"))},_dialogDatepicker:function(t,n,i,r,o){var s,a,l,c,u=this._dialogInst;return u||(this.uuid+=1,this._dialogInput=e("<input type='text' id='dp"+this.uuid+"' style='position: absolute; top: -100px; width: 0px;'/>
1"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},e.data(this._dialogInput[0],"datepicker",u)),g(u.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(u,n):n,this._dialogInput.val(n),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(s=document.documentElement.clientWidth,a=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+l,a/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(t){var n,i=e(t),r=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(n=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==n&&"span"!==n||i.removeClass(this.markerClassName).empty(),u===r&&(u=null))},_enableDatepicker:function(t){var n,i,r=e(t),o=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(n=t.nodeName.toLowerCase())?(t.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==n&&"span"!==n||((i=r.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var n,i,r=e(t),o=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(n=t.nodeName.toLowerCase())?(t.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==n&&"span"!==n||((i=r.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,n,i){var r,o,s,a,l=this._getInst(t);if(2===arguments.length&&"string"==typeof n)return"defaults"===n?e.extend({},e.datepicker._defaults):l?"all"===n?e.extend({},l.settings):this._get(l,n):null;r=n||{},"string"==typeof n&&((r={})[n]=i),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(t,!0),s=this._getMinMaxDate(l,"min"),a=this._getMinMaxDate(l,"max"),g(l.settings,r),null!==s&&void 0!==r.dateFormat&&void 0===r.minDate&&(l.settings.minDate=this._formatDate(l,s)),null!==a&&void 0!==r.dateFormat&&void 0===r.maxDate&&(l.settings.maxDate=this._formatDate(l,a)),"disabled"in r&&(r.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(t){var n,i,r,o=e.datepicker._getInst(t.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),s=!1;break;case 13:return(r=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv))[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,r[0]),(n=e.datepicker._get(o,"onSelect"))?(i=e.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[
vendor: 38,728 bytes, line 1
1i,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var n,i,r=e.datepicker._getInst(t.target);if(e.datepicker._get(r,"constrainInput"))return n=e.datepicker._possibleChars(e.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!n||n.indexOf(i)>-1},_doKeyUp:function(t){var n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n))&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(e){}return!0},_showDatepicker:function(t){var n,i,r,o,s,a,l;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),e.datepicker._isDisabledDatepicker(t)||e.datepicker._lastInput===t||(n=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==n&&(e.datepicker._curInst.dpDiv.stop(!0,!0),n&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),!1!==(r=(i=e.datepicker._get(n,"beforeShow"))?i.apply(t,[t,n]):{})&&(g(n.settings,r),n.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(n),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return!(o|="fixed"===e(this).css("position"))}),s={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(n),s=e.datepicker._checkOffset(n,s,o),n.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(a=e.datepicker._get(n,"showAnim"),l=e.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(e){for(var t,n;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[a]?n.dpDiv.show(a,e.datepicker._get(n,"showOptions"),l):n.dpDiv[a||"show"](a?l:null),e.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),e.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,u=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var n,i=this._getNumberOfMonths(t),r=i[1],o=t.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&f.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&t.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(n=t.yearshtml,setTimeout(function(){n===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),n=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,n,i){var r=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:e(document).scrollTop());return n.left-=this._get(t,"isRTL")?r-s:0,n.left-=i&&n.left===t.input.offset().left?e(document).scrollLeft():0,n.top-=i&&n.top===t.input.offset().top+a?e(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>c&&c>o?Math.abs(o+a):0),n},_findPos:function(t){for(var n,i=this._getInst(t),r=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[r?"previousSibling":"nextSibling"];return[(n=e(t).offset()).left,n.top]},_hideDatepicker:function(t){var n,i,r,o,s=this._curInst;!s||t&&s!==e.data(t,"datepicker")||this._datepickerShowing&&(n=this._get(s,"showAnim"),i=this._get(s,"duration"),r=function(){e.datepicker._tidyDialog(s)},e.effects&&(e.effects.effect[n]||e.effects[n])?s.dpDiv.hide(n,e.datepicker._get(s,"showOptions"),i,r):s.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,(o=this._get(s,"onClose"))&&o.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var n=e(t.target),i=e.datepicker._getInst(n[0]);(n[0].id===e.datepicker._mainDivId||0!==n.parents("#"+e.datepicker._mainDivId).length||n.hasClass(e.datepicker.markerClassName)||n.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!n.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===i)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,n,i){var r=e(t),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(t){var n,i=e(t),r=this._getInst(i[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(t,n,i){var r=e(t),o=this._getInst(r[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(t,n,i,r){var o,s=e(t);e(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((o=this._getInst(s[0])).selectedDay=o.currentDay=e("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var n=e(t);this._selectDate(n,"")},_selectDate:function(t,n){var i,r=e(t),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),(i=this._get(o,"onSelect"))?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var n,i,r,o=this._get(t,"altField");o&&(n=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),r=this.formatDate(n,i,this._getFormatConfig(t)),e(o).val(r))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(t,n,i){if(null==t||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;var r,o,s,a,l=0,c=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,h=(i?i.dayNames:null)||this._defaults.dayNames,p=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,f=(i?i.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,_=function(e){var n=r+1<t.length&&t.charAt(r+1)===e;return n&&r++,n},S=function(e){var t=_(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,r=new RegExp("^\\d{"+("y"===e?i:1)+","+i+"}"),o=n.substring(l).match(r);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},w=function(t,i,r){var o=-1,s=e.map(_(t)?r:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(s,function(e,t){var i=t[1];if(n.substr(l,i.length).toLowerCase()===i.toLowerCase())return o=t[0],l+=i.length,!1}),-1!==o)return o+1;throw"Unknown name at position "+l},E=function(){if(n.charAt(l)!==t.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<t.length;r++)if(b)"'"!==t.charAt(r)||_("'")?E():b=!1;else switch(t.charAt(r)){case"d":v=S("d");break;case"D":w("D",d,h);break;case"o":y=S("o");break;case"m":m=S("m");break;case"M":m=w("M",p,f);break;case"y":g=S("y");break;case"@":g=(a=new Date(S("@"))).getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":g=(a=new Date((S("!")-this._ticksTo1970)/1e4)).getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?E():b=!0;break;default:E()}if(l<n.length&&(s=n.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=u?0:-100)),y>-1)for(m=1,v=y;!(v<=(o=this._getDaysInMonth(g,m-1)));)m++,v-=o;if((a=this._daylightSavingAdjust(new Date(g,m-1,v))).getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,n){if(!t)return"";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(t){var n=i+1<e.length&&e.charAt(i+1)===t;return n&&i++,n},c=function(e,t,n){var i=""+t;if(l(e))for(;i.length<n;)i="0"+i;return i},u=function(e,t,n,i){return l(e)?i[t]:n[t]},d="",h=!1;if(t)for(i=0;i<e.length;i++)if(h)"'"!==e.charAt(i)||l("'")?d+=e.charAt(i):h=!1;else switch(e.charAt(i)){case"d":d+=c("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),r,o);break;case"o":d+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=c("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),s,a);break;case"y":d+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=e.charAt(i)}return d},_possibleChars:function(e){var t,n="",i=!1,r=function(n){var i=t+1<e.length&&e.charAt(t+1)===n;return i&&t++,i};for(t=0;t<e.length;t++)if(i)"'"!==e.charAt(t)||r("'")?n+=e.charAt(t):i=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=e.charAt(t)}return n},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,r=this._getDefaultDate(e),o=r,s=this._getFormatConfig(e);try{o=this.parseDate(n,i,s)||r}catch(e){i=t?"":i}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=i?o.getDate():0,e.currentMonth=i?o.getMonth():0,e.currentYear=i?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,n,i){var r=null==n||""===n?i:"string"==typeof n?function(n){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),n,e.datepicker._getFormatConfig(t))}catch(e){}for(var i=(n.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=i.getFullYear(),o=i.getMonth(),s=i.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(n);l;){switch(l[2]||"d"){case"d":case"D":s+=parseInt(l[1],10);break;case"w":case"W":s+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),s=Math.min(s,e.datepicker._getDaysInMonth(r,o));break;case"y":case"Y":r+=parseInt(l[1],10),s=Math.min(s,e.datepicker._getDaysInMonth(r,o))}l=a.exec(n)}return new Date(r,o,s)}(n):"number"==typeof n?isNaN(n)?i:function(e){var t=new Date;return t.setDate(t.getDate()+e),t}(n):new Date(n.getTime());return(r=r&&"Invalid Date"===r.toString()?i:r)&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var i=!t,r=e.selectedMonth,o=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),r===e.selectedMonth&&o===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var n=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(i,-n,"M")},next:function(){e.datepicker._adjustDate(i,+n,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(i)},selectDay:function(){return e.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(i,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,i,r,o,s,a,l,c,u,d,h,p,f,g,m,v,y,b,_,S,w,E,T,C,I,R,D,A,k,O,x,N,P,M,L,j,F,U,H=new Date,B=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),V=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),z=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),G=this._getNumberOfMonths(e),Y=this._get(e,"showCurrentAtPos"),$=this._get(e,"stepMonths"),K=1!==G[0]||1!==G[1],J=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),Z=e.drawMonth-Y,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-G[0]*G[1]+1,Q.getDate())),t=X&&t<X?X:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)--Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,n=this._get(e,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,Z-$,1)),this._getFormatConfig(e)):n,i=this._canAdjustMonth(e,-1,ee,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+n+"</span></a>":z?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+n+"</span></a>",r=this._get(e,"nextText"),r=q?this.formatDate(r,this._daylightSavingAdjust(new Date(ee,Z+$,1)),this._getFormatConfig(e)):r,o=this._canAdjustMonth(e,1,ee,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+r+"</span></a>":z?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+r+"</span></a>",s=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?J:B,s=q?this.formatDate(s,a,this._getFormatConfig(e)):s,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(V?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),g=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;w<G[0];w++){for(E="",this.maxRows=4,T=0;T<G[1];T++){if(C=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),I=" ui-corner-all",R="",K){if(R+="<div class='ui-datepicker-group",G[1]>1)switch(T){case 0:R+=" ui-datepicker-group-first",I=" ui-corner-"+(V?"right":"left");break;case G[1]-1:R+=" ui-datepicker-group-last",I=" ui-corner-"+(V?"left":"right");break;default:R+=" ui-datepicker-group-middle",I=""}R+="'>"}for(R+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===w?V?o:i:"")+(/all|right/.test(I)&&0===w?V?i:o:"")+this._generateMonthYearHeader(e,Z,ee,X,Q,w>0||T>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",D=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",S=0;S<7;S++)A=(S+u)%7,D+="<th scope='col'"+((S+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[A]+"'>"+p[A]+"</span></th>";for(R+=D+"</tr></thead><tbody>",k=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,k)),O=(this._getFirstDayOfMonth(ee,Z)-u+7)%7,x=Math.ceil((O+k)/7),this.maxRows=N=K&&this.maxRows>x?this.maxRows:x,P=this._daylightSavingAdjust(new Date(ee,Z,1-O)),M=0;M<N;M++){for(R+="<tr>",L=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(P)+"</td>":"",S=0;S<7;S++)j=m?m.apply(e.input?e.input[0]:null,[P]):[!0,""],U=(F=P.getMonth()!==Z)&&!y||!j[0]||X&&P<X||Q&&P>Q,L+="<td class='"+((S+u+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(P.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===P.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(U?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+j[1]+(P.getTime()===J.getTime()?" "+this._currentClass:"")+(P.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(U?"":" data-handler='selectDay' data-event='click' data-month='"+P.getMonth()+"' data-year='"+P.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":U?"<span class='ui-state-default'>"+P.getDate()+"</span>":"<a class='ui-state-default"+(P.getTime()===B.getTime()?" ui-state-highlight":"")+(P.getTime()===J.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+P.getDate()+"</a>")+"</td>",P.setDate(P.getDate()+1),P=this._daylightSavingAdjust(P);R+=L+"</tr>"}++Z>11&&(Z=0,ee++),E+=R+="</tbody></table>"+(K?"</div>"+(G[0]>0&&T===G[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}_+=E}return _+=c,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,n,i,r,o,s,a){var l,c,u,d,h,p,f,g,m=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(o||!m)_+="<span class='ui-datepicker-month'>"+s[t]+"</span>";else{for(l=i&&i.getFullYear()===n,c=r&&r.getFullYear()===n,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=i.getMonth())&&(!c||u<=r.getMonth())&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+a[u]+"</option>");_+="</select>"}if(y||(b+=_+(!o&&m&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),f=(p=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t})(d[0]),g=Math.max(f,p(d[1]||"")),f=i?Math.max(f,i.getFullYear()):f,g=r?Math.min(g,r.getFullYear()):g,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=g;f++)e.yearshtml+="<option value='"+f+"'"+(f===n?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+_),b+"</div>"},_adjustInstDate:function(e,t,n){var i=e.selectedYear+("Y"===n?t:0),r=e.selectedMonth+("M"===n?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(i,r))+("D"===n?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,r,o)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),r=n&&t<n?n:t;return i&&r>i?i:r},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,i){var r=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(n,i+(t<0?t:r[0]*r[1]),1));return t<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var n,i,r=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),s=null,a=null,l=this._get(e,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),s=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(s+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!r||t.getTime()>=r.getTime())&&(!o||t.getTime()<=o.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(n)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(n))},e.datepicker=new h,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.12.1",e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var m=!1;e(document).on("mouseup",function(){m=!1}),e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!m){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,i=1===t.which,r=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!r&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),m=!0,0)))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,m=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.ui.plugin={add:function(t,n,i){var r,o=e.ui[t].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)e.options[o[r][0]]&&o[r][1].apply(e.element,n)}},e.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")},e.widget("ui.draggable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(t),!this.handle||(this._blurActiveElement(t),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),0)))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=e.ui.safeActiveElement(this.document[0]);e(t.target).closest(n).length||e.ui.safeBlur(n)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==n._trigger("stop",t)&&n._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper),r=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options,o=this.document[0];this.relativeContainer=null,r.containment?"window"!==r.containment?"document"!==r.containment?r.containment.constructor!==Array?("parent"===r.containment&&(r.containment=this.helper[0].parentNode),(i=(n=e(r.containment))[0])&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=r.containment:this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>
vendor: 6,091 bytes, line 1
1n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var r=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,r))})},stop:function(t,n,i){var r=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,function(){this.isOver?(this.isOver=0,i.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(t),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",t,r))})},drag:function(t,n,i){e.each(i.sortables,function(){var r=!1,o=this;o.positionAbs=i.positionAbs,o.helperProportions=i.helperProportions,o.offset.click=i.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,e.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&e.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,i._parent=n.helper.parent(),o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!0,!0),o.offset.click.top=i.offset.click.top,o.offset.click.left=i.offset.click.left,o.offset.parent.left-=i.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=i.offset.parent.top-o.offset.parent.top,i._trigger("toSortable",t),i.dropped=o.element,e.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(t),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",t,o._uiHash(o)),o._mouseStop(t,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var r=e("body"),o=i.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(t,n,i){var r=i.options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var r=e(n.helper),o=i.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(t,n,i){var r=i.options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var r=i.options,o=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+s.offsetHeight-t.pageY<r.scrollSensitivity?s.scrollTop=o=s.scrollTop+r.scrollSpeed:t.pageY-i.overflowOffset.top<r.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+s.offsetWidth-t.pageX<r.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+r.scrollSpeed:t.pageX-i.overflowOffset.left<r.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(t.pageY-e(a).scrollTop()<r.scrollSensitivity?o=e(a).scrollTop(e(a).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(a).scrollTop())<r.scrollSensitivity&&(o=e(a).scrollTop(e(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(t.pageX-e(a).scrollLeft()<r.scrollSensitivity?o=e(a).scrollLeft(e(a).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(a).scrollLeft())<r.scrollSensitivity&&(o=e(a).scrollLeft(e(a).scrollLeft()+r.scrollSpeed)))),!1!==o&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n,i){var r=i.options;i.snapElements=[],e(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var t=e(this),n=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left
vendor: 6,346 bytes, line 1
1:n.left})})},drag:function(t,n,i){var r,o,s,a,l,c,u,d,h,p,f=i.options,g=f.snapTolerance,m=n.offset.left,v=m+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(h=i.snapElements.length-1;h>=0;h--)c=(l=i.snapElements[h].left-i.margins.left)+i.snapElements[h].width,d=(u=i.snapElements[h].top-i.margins.top)+i.snapElements[h].height,v<l-g||m>c+g||b<u-g||y>d+g||!e.contains(i.snapElements[h].item.ownerDocument,i.snapElements[h].item)?(i.snapElements[h].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(u-b)<=g,o=Math.abs(d-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(c-m)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:d,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),p=r||o||s||a,"outer"!==f.snapMode&&(r=Math.abs(u-y)<=g,o=Math.abs(d-b)<=g,s=Math.abs(l-m)<=g,a=Math.abs(c-v)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[h].snapping&&(r||o||s||a||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[h].item})),i.snapElements[h].snapping=r||o||s||a||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var r,o=e.makeArray(e(i.options.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});o.length&&(r=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",r+t)}),this.css("zIndex",r+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var r=e(n.helper),o=i.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(t,n,i){var r=i.options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}}),e.widget("ui.resizable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var i,r=n&&"left"===n?"scrollLeft":"scrollTop";return t[r]>0||(t[r]=1,i=t[r]>0,t[r]=0,i)},_create:function(){var t,n=this.options,i=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),n.autoHide&&e(this.element).on("mouseenter",function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),this.originalElement.css({position:(t=this.element).css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,n,i,r,o,s=this.options,a=this;if(this.handles=s.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)r="ui-resizable-"+(t=e.trim(i[n])),o=e("<div>"),this._addClass(o,"ui-resizable-handle "+r),o.css({zIndex:s.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var n,i,r,o;for(n in t=t||this.element,this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=e(this.handles[n]),this._on(this.handles[n],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),r=["padding",/ne|nw|n
vendor: 11,090 bytes, line 1
1/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(r,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=o&&o[1]?o[1]:"se")}),s.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var n,i,r=!1;for(n in this.handles)((i=e(this.handles[n])[0])===t.target||e.contains(i,t.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(t){var n,i,r,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=e(o.containment).scrollLeft()||0,i+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,r=this.originalMousePosition,o=t.pageX-r.left||0,s=t.pageY-r.top||0,a=this._change[this.axis];return this._updatePrevProperties(),!!a&&(n=a.apply(this,[t,o,s]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var n,i,r,o,s,a,l,c=this.options;return this._helper&&(r=(i=(n=this._proportionallyResizeElements).length&&/textarea/i.test(n[0].nodeName))&&this._hasScroll(n[0],"left")?0:this.sizeDiff.height,o=i?0:this.sizeDiff.width,s={width:this.helper.width()-o,height:this.helper.height()-r},a=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,l=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,c.animate||this.element.css(e.extend(s,{top:l,left:a})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,i,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||e)&&(i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,(t=o.minHeight*this.aspectRatio)>o.minWidth&&(o.minWidth=t),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,i=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===i&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===i&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,i=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,r=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,s=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),s&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),r&&(e.height=t.maxHeight),o&&c&&(e.left=a-t.minWidth),i&&c&&(e.left=a-t.maxWidth),s&&u&&(e.top=l-t.minHeight),r&&u&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],r=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(i[t])||0,n[t]+=parseFloat(r[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.options;this.elementOffset=this.element.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){return{left:this.originalPosition.left+t,width:this.originalSize.width-t}},n:function(e,t,n){return{top:this.originalPosition.top+n,height:this.originalSize.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),i=n.options,r=n._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a={width:n.size.width-(o?0:n.sizeDiff.width),height:n.size.height-s},l=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,c=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(a,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&e(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,r,o,s,a,l=e(this).resizable("instance"),c=l.element,u=l.options.containment,d=u instanceof e?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=e(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(d),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){n[e]=l._num(t.css("padding"+i))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},i=l.containerOffset,r=l.containerSize.height,o=l.containerSize.width,s=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:r,l.parentData={element:d,left:i.left,top:i.top,width:s,height:a}))},resize:function(t){var n,i,r,o,s=e(this).resizable("instance"),a=s.options,l=s.containerOffset,c=s.position,u=s._aspectRatio||t.shiftKey,d={top:0,left:0},h=s.containerElement,p=!0;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),c.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-d.left),u&&(s.size.height=s.size.width/s.aspectRatio,p=!1),s.position.left=a.helper?l.left:0),c.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),u&&(s.size.width=s.size.height*s.aspectRatio,p=!1),s.position.top=s._helper?l.top:0),r=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),r&&o?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),n=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-d.left:s.offset.left-l.left)),i=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-d.top:s.offset.top-l.top)),n+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-n,u&&(s.size.height=s.size.width/s.aspectRatio,p=!1)),i+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-i,u&&(s.size.width=s.size.height*s.aspectRatio,p=!1)),p||(s.position.left
vendor: 1,077 bytes, line 1
1=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,r=t.containerPosition,o=t.containerElement,s=e(t.helper),a=s.offset(),l=s.outerWidth()-t.sizeDiff.width,c=s.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:c}),t._helper&&!n.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance");e(t.options.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,n){var i=e(this).resizable("instance"),r=i.originalSize,o=i.originalPosition,s={height:i.size.height-r.height||0,width:i.size.width-r.width||0,top:i.position.top-o.top||0,left
vendor: 20,376 bytes, line 1
1:i.position.left-o.left||0};e(i.options.alsoResize).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),r={},o=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(s[t]||0);n&&n>=0&&(r[t]=n||null)}),t.css(r)})},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==e.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),i=n.options,r=n.size,o=n.originalSize,s=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,c=l[0]||1,u=l[1]||1,d=Math.round((r.width-o.width)/c)*c,h=Math.round((r.height-o.height)/u)*u,p=o.width+d,f=o.height+h,g=i.maxWidth&&i.maxWidth<p,m=i.maxHeight&&i.maxHeight<f,v=i.minWidth&&i.minWidth>p,y=i.minHeight&&i.minHeight>f;i.grid=l,v&&(p+=c),y&&(f+=u),g&&(p-=c),m&&(f-=u),/^(se|s|e)$/.test(a)?(n.size.width=p,n.size.height=f):/^(ne)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.top=s.top-h):/^(sw)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.left=s.left-d):((f-u<=0||p-c<=0)&&(t=n._getPaddingPlusBorderDimensions(this)),f-u>0?(n.size.height=f,n.position.top=s.top-h):(n.size.height=f=u-t.height,n.position.top=s.top+o.height-f),p-c>0?(n.size.width=p,n.position.left=s.left-d):(n.size.width=p=c-t.width,n.position.left=s.left+o.width-p))}}),e.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var n=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||e.ui.safeBlur(e.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,n){var i=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),o=Math.max.apply(null,r);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),i=!0),i&&!n&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=e(e.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_keepFocus:function(t){function n(){var t=e.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||e.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=e("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.filter(":first"),r=n.filter(":last");t.target!==r[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){r.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:e("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(n)||e.isArray(n)&&!n.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(e.each(n,function(n,i){var r,o;i=e.isFunction(i)?{click:i,text:n}:i,i=e.extend({type:"button"},i),r=i.click,o={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel,icons:i.icons,text:i.text},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,delete i.icons,"boolean"==typeof i.text&&delete i.text,e("<button></button>",i).button(o).appendTo(t.uiButtonSet).on("click",function(){r.apply(t.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var t=this,n=this.options;function i(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,r){t._addClass(e(this),"ui-dialog-dragging"),t._blockFrames(),t._trigger("dragStart",n,i(r))},drag:function(e,n){t._trigger("drag",e,i(n))},stop:function(r,o){var s=o.offset.left-t.document.scrollLeft(),a=o.offset.top-t.document.scrollTop();n.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:t.window},t._removeClass(e(this),"ui-dialog-dragging"),t._unblockFrames(),t._trigger("dragStop",r,i(o))}})},_makeResizable:function(){var t=this,n=this.options,i=n.resizable,r=this.uiDialog.css("position"),o="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function s(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:o,start:function(n,i){t._addClass(e(this),"ui-dialog-resizing"),t._blockFrames(),t._trigger("resizeStart",n,s(i))},resize:function(e,n){t._trigger("resize",e,s(n))},stop:function(i,r){var o=t.uiDialog.offset(),a=o.left-t.document.scrollLeft(),l=o.top-t.document.scrollTop();n.height=t.uiDialog.height(),n.width=t.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:t.window},t._removeClass(e(this),"ui-dialog-resizing"),t._unblockFrames(),t._trigger("resizeStop",i,s(r))}}).css("position",r)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),n=e.inArray(this,t);-1!==n&&t.splice(n,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||this.document.data("ui-dialog-instances",e=[]),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,r={};e.each(t,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(r[e]=t)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,n){var i,r,o=this.uiDialog;"disabled"!==t&&(this._super(t,n),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:e("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=o.is(":data(ui-draggable)"))&&!n&&o.draggable("destroy"),!i&&n&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((r=o.is(":data(ui-resizable)"))&&!n&&o.resizable("destroy"),r&&"string"==typeof n&&o.resizable("option","handles",n),r||!1===n||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==e.uiBackCompat&&e.widget("ui.dialog",e.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),e.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(n.scope),n.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){this._splice(e.ui.ddmanager.droppables[this.options.scope])},_setOption:function(t,n){"accept"===t?this.accept=e.isFunction(n)?n:function(e){return e.is(n)}:"scope"===t&&(this._splice(e.ui.ddmanager.droppables[this.options.scope]),this._addToManager(n)),this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var i=n||e.ui.ddmanager.current,r=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var n=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&y(i,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t))return r=!0,!1}),!r&&!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(i)),this.element))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v,y=e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,i,r){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=s+t.helperProportions.height,c=n.offset.left,u=n.offset.top,d=c+n.proportions().width,h=u+n.proportions().height;switch(i){case"fit":return c<=o&&a<=d&&u<=s&&l<=h;case"intersect":return c<o+t.helperProportions.width/2&&a-t.helperProportions.width/2<d&&u<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<h;case"pointer":return e(r.pageY,u,n.proportions().height)&&e(r.pageX,c,n.proportions().width);case"touch":return(s>=u&&s<=h||l>=u&&l<=h||s<u&&l>h)&&(o>=c&&o<=d||a>=c&&a<=d||o<c&&a>d);default:return!1}}}();function b(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var i,r,o=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(r=0;r<a.length;r++)if(a[r]===o[i].element[0]){o[i].proportions().height=0;continue e}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===s&&o[i]._activate.call(o[i],n),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,n){var i=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&y(t,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,r,o,s=y(t,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===r})).length&&((i=e(o[0]).droppable("instance")).greedyChild="isover"===a)),i&&"isover"===a&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),i&&"isout"===a&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1}
vendor: 7,163 bytes, line 1
1,_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=e("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(n.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var n=e(this),i=n.offset(),r={left:i.left-t.elementPos.left,top:i.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:n,left:r.left,top:r.top,right:r.left+n.outerWidth(),bottom:r.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=e("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var n=this,i=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(i.filter,this.element[0]),this._trigger("start",t),e(i.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=e.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),e(t.target).parents().addBack().each(function(){var i,r=e.data(this,"selectable-item");if(r)return i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected"),n._removeClass(r.$element,i?"ui-unselecting":"ui-selected")._addClass(r.$element,i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,i=this,r=this.options,o=this.opos[0],s=this.opos[1],a=t.pageX,l=t.pageY;return o>a&&(n=a,a=o,o=n),s>l&&(n=l,l=s,s=n),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var n=e.data(this,"selectable-item"),c=!1,u={};n&&n.element!==i.element[0]&&(u.left=n.left+i.elementPos.left,u.right=n.right+i.elementPos.left,u.top=n.top+i.elementPos.top,u.bottom=n.bottom+i.elementPos.top,"touch"===r.tolerance?c=!(u.left>a||u.right<o||u.top>l||u.bottom<s):"fit"===r.tolerance&&(c=u.left>o&&u.right<a&&u.top>s&&u.bottom<l),c?(n.selected&&(i._removeClass(n.$element,"ui-selected"),n.selected=!1),n.unselecting&&(i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1),n.selecting||(i._addClass(n.$element,"ui-selecting"),n.selecting=!0,i._trigger("selecting",t,{selecting:n.element}))):(n.selecting&&((t.metaKey||t.ctrlKey)&&n.startselected?(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,i._addClass(n.$element,"ui-selected"),n.selected=!0):(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,n.startselected&&(i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",t,{unselecting:n.element}))),n.selected&&(t.metaKey||t.ctrlKey||n.startselected||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",t,{unselected:i.element})}),e(".ui-selecting",this.element[0]).each(function(){var i=e.data(this,"selectable-item");n._removeClass(i.$element,"ui-selecting")._addClass(i.$element,"ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",t,{selected:i.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",[e.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"}
vendor: 4,710 bytes, line 1
1,width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=e()},_drawButton:function(){var t,n=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=e("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){n._rendered||n._refreshMenu()})},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,n){e.preventDefault(),t._setSelection(),t._select(n.item.data("ui-selectmenu-item"),e)},focus:function(e,n){var i=n.item.data("ui-selectmenu-item");null!=t.focusIndex&&i.index!==t.focusIndex&&(t._trigger("focus",e,{item:i}),t.isOpen||t._select(i,e)),t.focusIndex=i.index,t.button.attr("aria-activedescendant",t.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var n=e("<span>");return this._setText(n,t.label),this._addClass(n,"ui-selectmenu-text"),n},_renderMenu:function(t,n){var i=this,r="";e.each(n,function(n,o){var s;o.optgroup!==r&&(s=e("<li>",{text:o.optgroup}),i._addClass(s,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),s.appendTo(t),r=o.optgroup),i._renderItemData(t,o)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,n){var i=e("<li>"),r=e("<div>",{title:n.element.attr("title")});return n.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(r,n.label),i.append(r).appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),r+=":not(.ui-state-disabled)"),(i="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](r).eq(-1):n[e+"All"](r).eq(0)).length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")}
vendor: 20,903 bytes, line 1
1,_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+e.ui.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var n=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),n=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),n=!1}n&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1!==e?(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(t){var n=this,i=[];t.each(function(t,r){i.push(n._parseOption(e(r),t))}),this.items=i},_parseOption:function(e,t){var n=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),e.widget("ui.slider",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,i=this.options,r=this.element.find(".ui-slider-handle"),o=[];for(r.length>(n=i.values&&i.values.length||1)&&(r.slice(n).remove(),r=r.slice(0,n)),t=r.length;t<n;t++)o.push("<span tabindex='0'></span>");this.handles=r.add(e(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var n,i,r,o,s,a,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n=this._normValueFromMouse({x:t.pageX,y:t.pageY}),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var s=Math.abs(n-l.values(t));(i>s||i===s&&(t===l._lastChangedValue||l.values(t)===c.min))&&(i=s,r=e(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(r,null,"ui-state-active"),r.trigger("focus"),s=r.offset(),a=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-s.left-r.width()/2,top:t.pageY-s.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t=this._normValueFromMouse({x:e.pageX,y:e.pageY});return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,r,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(i=n/t)>1&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_uiHash:function(e,t,n){var i={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==t?t:this.values(e),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var i,r=this.value(),o=this.values();this._hasMultipleValues()&&(i=this.values(t?0:1),r=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(i,n):Math.max(i,n)),o[t]=n),n!==r&&!1!==this._trigger("slide",e,this._uiHash(t,n,o))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,n){var i,r,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,n){var i,r=0;switch("range"===t&&!0===this.options.range&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(r=this.options.values.length),this._super(t,n),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),this.handles.css("horizontal"===n?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=r-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(e){var t,n;if(arguments.length)return this._trimAlignValue(this.options.values[e]);if(this._hasMultipleValues()){for(t=this.options.values.slice(),n=0;n<t.length;n+=1)t[n]=this._trimAlignValue(t[n]);return t}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,i,r,o,s=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,u={};this._hasMultipleValues()?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:a.animate})):(0===i&&l.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},a.animate),1===i&&l.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:a.animate}))),t=n}):(i=this.value(),r=this._valueMin(),o=this._valueMax(),n=o!==r?(i-r)/(o-r)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},a.animate))},_handleEvents:{keydown:function(t){var n,i,r,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,o)))return}switch(r=this.options.step,n=i=this._hasMultipleValues()?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:i=this._valueMin();break;case e.ui.keyCode.END:i=this._valueMax();break;case e.ui.keyCode.PAGE_UP:i=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;i=this._trimAlignValue(n+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;i=this._trimAlignValue(n-r)}this._slide(t,o,i)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),this._removeClass(e(t.target),null,"ui-state-active"))}}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,r=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o)return i=e(this),!1}),e.data(t.target,o.widgetName+"-item")===o&&(i=e(t.target)),!i||this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(r=!0)}),!r)||(this.currentItem=i,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,n,i){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),t.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),!1!==a&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(r=(i=this.items[n]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===r||e.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],r))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};
vendor: 4,161 bytes, line 1
1o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=this.positionAbs.top,i=e.left,r=i+e.width,o=e.top,s=o+e.height,a=this.offset.click.top,l=this.offset.click.left;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?("x"===this.options.axis||n+a>o&&n+a<s)&&("y"===this.options.axis||t+l>i&&t+l<r):i<t+this.helperProportions.width/2&&t+this.helperProportions.width-this.helperProportions.width/2<r&&o<n+this.helperProportions.height/2&&n+this.helperProportions.height-this.helperProportions.height/2<s},_intersectsWithPointer:function(e){var t,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!i||!r)&&(t=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n,i,r,o,s=[],a=[],l=this._connectWith();if(l&&t)for(n=l.length-1;n>=0;n--)for(i=(r=e(l[n],this.document[0])).length-1;i>=0;i--)(o=e.data(r[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&a.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function c(){s.push(this)}
vendor: 8,448 bytes, line 1
1for(a.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=a.length-1;n>=0;n--)a[n][0].each(c);return e(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,c,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(n=h.length-1;n>=0;n--)for(i=(r=e(h[n],this.document[0])).length-1;i>=0;i--)(o=e.data(r[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(d.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=d.length-1;n>=0;n--)for(s=d[n][1],i=0,c=(a=d[n][0]).length;i<c;i++)(l=e(a[i])).data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var n,i,r,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),n=this.items.length-1;n>=0;n--)(i=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,i=(t=t||this).options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=t.currentItem[0].nodeName.toLowerCase(),r=e("<"+i+">",t.document[0]);return t._addClass(r,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(r,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(r)):"tr"===i?t._createTrPlaceholder(t.currentItem,r):"img"===i&&r.attr("src",t.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(e,r){n&&!i.forcePlaceholderSize||(r.height()||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e("<td>&#160;</td>",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,r,o,s,a,l,c,u,d,h=null,p=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],p=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(r=1e4,o=null,s=(u=h.floating||this._isFloating(this.currentItem))?"left":"top",a=u?"width":"height",d=u?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,t[d]-l>this.items[i][a]/2&&(c=!0),Math.abs(t[d]-l)<r&&(r=Math.abs(t[d]-l),o=this.items[i],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var n=this.options,i=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),"document"!==r.containment&&"window"!==r.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(t=e(r.containment)[0],n=e(r.containment).offset(),i="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),
vendor: 4,292 bytes, line 1
110)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var i="absolute"===t?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(t){var n,i,r=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function r(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}for(this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push((function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}).call(this,this.currentContainer)),i.push((function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}).call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;
vendor: 2,018 bytes, line 1
1n--)t||i.push(r("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(r("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<i.length;n++)i[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}}),e.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t=this._super(),n=this.element;return e.each(["min","max","step"],function(e,i){var r=n.attr(i);null!=r&&r.length&&(t[i]=r)}),t}
vendor: 5,412 bytes, line 1
1,_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){var n;function i(){this.element[0]===e.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n}))}n=this.element[0]===e.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var n=this.options,i=e.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,n.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e)||(this.counter||(this.counter=1),this.spinning=!0,0))},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:n})||(this._value(n),this.counter++)},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,i=this.options;return n=e-(t=null!==i.min?i.min:0),e=t+(n=Math.round(n/i.step)*i.step),e=parseFloat(e.toFixed(this._precision())),null!==i.max&&e>i.max?i.max:null!==i.min&&e<i.min?i.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var n,i,r;if("culture"===e||"numberFormat"===e)return n=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(n));"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,t.up),r=this.buttons.last().find(".ui-icon"),this._removeClass(r,null,this.options.icons.down),this._addClass(r,null,t.down)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:b(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&null!==(n=this._parse(e))&&(t||(n=this._adjustValue(n)),e=this._format(n)),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(e){this._stepUp(e)}
vendor: 20,409 bytes, line 1
1),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:b(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:b(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:b(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());b(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),!1!==e.uiBackCompat&&e.widget("ui.spinner",e.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),e.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(v=/#.*$/,function(e){var t,n;t=e.href.replace(v,""),n=location.href.replace(v,"");try{t=decodeURIComponent(t)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return e.hash.length>1&&t===n}),_create:function(){var t=this,n=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,n.collapsible),this._processTabs(),n.active=this._initialActive(),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(n.active):e(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var t=this.options.active,n=this.options.collapsible,i=location.hash.substring(1);return null===t&&(i&&this.tabs.each(function(n,r){if(e(r).attr("aria-controls")===i)return t=n,!1}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&-1!==t||(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!n&&0),!n&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(e.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(n),r=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:i++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:r=!1,i--;break;case e.ui.keyCode.END:i=this.anchors.length-1;break;case e.ui.keyCode.HOME:i=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,r),t.ctrlKey||t.metaKey||(n.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,n){for(var i=this.tabs.length-1;-1!==e.inArray((t>i&&(t=0),t<0&&(t=i),t),this.options.disabled);)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){"active"!==e?(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._activate(t)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,n=this.tabs,i=this.anchors,r=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=e(),this.anchors.each(function(n,i){var r,o,s,a=e(i).uniqueId().attr("id"),l=e(i).closest("li"),c=l.attr("aria-controls");t._isLocal(i)?(s=(r=i.hash).substring(1),o=t.element.find(t._sanitizeSelector(r))):(s=l.attr("aria-controls")||e({}).uniqueId()[0].id,(o=t.element.find(r="#"+s)).length||(o=t._createPanel(s)).insertAfter(t.panels[n-1]||t.tablist),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":s,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),n&&(this._off(n.not(this.tabs)),this._off(i.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var n,i,r;for(e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),r=0;i=this.tabs[r];r++)n=e(i),!0===t||-1!==e.inArray(r,t)?(n.attr("aria-disabled","true"),this._addClass(n,null,"ui-state-disabled")):(n.removeAttr("aria-disabled"),this._removeClass(n,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var n={};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,i=this.element.parent();"fill"===t?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),i=t.css("position");"absolute"!==i&&"fixed"!==i&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,i=this.active,r=e(t.currentTarget).closest("li"),o=r[0]===i[0],s=o&&n.collapsible,a=s?e():this._getPanelForTab(r),l=i.length?this._getPanelForTab(i):e(),c={oldTab:i,oldPanel:l,newTab:s?e():r,newPanel:a};t.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||!1===this._trigger("beforeActivate",t,c)||(n.active=!s&&this.tabs.index(r),this.active=o?e():r,this.xhr&&this.xhr.abort(),l.length||a.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(r),t),this._toggle(t,c))},_toggle:function(t,n){var i=this,r=n.newPanel,o=n.oldPanel;function s(){i.running=!1,i._trigger("activate",t,n)}function a(){i._addClass(n.newTab.closest("li"),"ui-tabs-active","ui-state-active"),r.length&&i.options.show?i._show(r,i.options.show,s):(r.show(),s())}this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){i._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o.hide(),a()),o.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&o.length?n.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var n,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop}))},_findActive:function(t){return!1===t?e():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+e.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var n=this.options.disabled;!1!==n&&(void 0===t?n=!1:(t=this._getIndex(t),n=e.isArray(n)?e.map(n,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,n){return n!==t?n:null})),this._setOptionDisabled(n))},disable:function(t){var n=this.options.disabled;if(!0!==n){if(void 0===t)n=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,n))return;n=e.isArray(n)?e.merge([t],n).sort():[t]}this._setOptionDisabled(n)}},load:function(t,n){t=this._getIndex(t);var i=this,r=this.tabs.eq(t),o=r.find(".ui-tabs-anchor"),s=this._getPanelForTab(r),a={tab:r,panel:s},l=function(e,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(r,"ui-tabs-loading"),s.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(o[0])||(this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(r,"ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(e,t,r){setTimeout(function(){s.html(e),i._trigger("load",n,a),l(r,t)},1)}).fail(function(e,t){setTimeout(function(){l(e,t)},1)})))},_ajaxSettings:function(t,n,i){var r=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,o){return r._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:o},i))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),!1!==e.uiBackCompat&&e.widget("ui.tabs",e.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),e.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,n){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(i.join(" ")))},_removeDescribedBy:function(t){var n=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=e.inArray(n,i);-1!==r&&i.splice(r,1),t.removeData("ui-tooltip-id"),(i=e.trim(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=e([])},_setOption:function(t,n){var i=this;this._super(t,n),"content"===t&&e.each(this.tooltips,function(e,t){i._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var t=this;e.each(this.tooltips,function(n,i){var r=e.Event("blur");r.target=r.currentTarget=i.element[0],t.close(r,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=e(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=e([])},open:function(t){var n=this,i=e(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=e(this);i.data("ui-tooltip-open")&&((t=e.Event("blur")).target=t.currentTarget=this,n.close(t,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(e,t){var n,i=this.options.content,r=this,o=t?t.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(t,e,i);(n=i.call(e[0],function(n){r._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=o),this._open(t,e,n))})}))&&this._open(t,e,n)},_open:function(t,n,i){var r,o,s,a,l=e.extend({},this.options.position);function c(e){l.of=e,o.is(":hidden")||o.position(l)}i&&((r=this._find(n))?r.tooltip.find(".ui-tooltip-content").html(i):(n.is("[title]")&&(t&&"mouseover"===t.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),this._addDescribedBy(n,(o=r.tooltip).attr("id")),o.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(a=e("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),a.removeAttr("id").find("[id]").removeAttr("id"),a.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:c}),c(t)):o.position(e.extend({of:n},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){o.is(":visible")&&(c(l.of),clearInterval(s))},e.fx.interval)),this._trigger("open",t,{tooltip:o})))},_registerCloseHandlers:function(t,n){var i={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,n,i)},close:function(t){var n,i=this,r=e(t?t.currentTarget:this.element),o=this._find(r);o?(n=o.tooltip,o.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),o.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(e(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,n){e(n.element).attr("title",n.title),delete i.parents[t]}),o.closing=!0,this._trigger("close",t,{tooltip:n}),o.hiding||(o.closing=!1))):r.removeData("ui-tooltip-open")},_tooltip:function(t){var n=e("<div>").attr("role","tooltip"),i=e("<div>").appendTo(n),r=n.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(n,"ui-tooltip","ui-widget ui-widget-content"),n.appendTo(this._appendTo(t)),this.tooltips[r]={element:t,tooltip:n}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;e.each(this.tooltips,function(n,i){var r=e.Event("blur"),o=i.element;r.target=r.currentTarget=o[0],t.close(r,!0),e("#"+n).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==e.uiBackCompat&&e.widget("ui.tooltip",e.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}})}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;return e(this).one("bsTransitionEnd",function(){n=!0}),setTimeout(function(){n||e(i).trigger(e.support.transition.end)},t),this},e(function(){e.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(t){function i(){s.detach().trigger("closed.bs.alert").remove()}var r=e(this),o=r.attr("data-target");o||(o=(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var s=e("#"===o?[]:o);t&&t.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var i=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var i=e(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof t&&r[t].call(i)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.button");r||i.data("bs.button",r=new n(this,"object"==typeof t&&t)),"toggle"==t?r.toggle(
vendor: 9,603 bytes, line 1
1):t&&r.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(e.proxy(function(){i[r](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target).closest(".btn");t.call(i,"toggle"),e(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),s="string"==typeof t?t:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof t?r.to(t):s?r[s]():o.interval&&r.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);return("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap?t:this.$items.eq((n+("prev"==e?-1:1))%this.$items.length)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(t,r),s=this.interval,a="next"==t?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([t,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(n){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=e.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),t.call(o,s),a&&o.data("bs.carousel").to(a),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(i)}function n(t){return this.each(function(){var n=e(this),r=n.data("bs.collapse"),o=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof t&&r[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[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()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(t=r.data("bs.collapse"),t&&t.transitioning))){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),t||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var l=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]()),this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var r=e(i);this.addAriaAndCollapsedClass(t(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=e(this);r.attr("data-target")||i.preventDefault();var o=t(r),s=o.data("bs.collapse")?"toggle":r.data();n.call(o,s)})}(jQuery),function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}function n(n){n&&3===n.which||(e(i).remove(),e(r).each(function(){var i=e(this),r=t(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(r[0],n.target)||(r.trigger(n=e.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","fal
1se"),r.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))}))}var i=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(t){e(t).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.7",o.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=t(r),s=o.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var a={relatedTarget:this};if(o.trigger(i=e.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},o.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=t(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),i.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new o(this)),"string"==typeof t&&i[t].call(n)})},e.fn.dropdown.Constructor=o,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.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(e){"use strict";function t(t,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),s=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t);o||r.data("bs.modal",o=new n(this,s)),"string"==typeof t?o[t](i):s.show&&o.show(i)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.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"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=e.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),i.$element.addClass("in"),i.enforceFocus();var o=e.Event("shown.bs.modal",{relatedTarget:t});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(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"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("key
1down.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=e.support.transition&&r;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),t&&t()};
vendor: 4,145 bytes, line 1
1e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var i=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=i,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=e(this),r=i.attr("href"),o=e(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(e){e.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),t.call(o,s,this)})}(jQuery),function(e){"use strict";var t=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};t.VERSION="3.3.7",t.TRANSITION_DURATION=150,t.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}},t.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(e.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 r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseleave":"focusout";this.$element.on(("hover"==s?"mouseenter":"focusin")+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return(t=e.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focu
1s":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},t.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var n=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(n);var i=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(n.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(c){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>f.bottom?"top":"top"==a&&u.top-h<f.top?"bottom":"right"==a&&u.right+d>f.width?"left":"left"==a&&u.left-d<f.left?"right":a,o.removeClass(p).addClass(a)}var g=this.getCalculatedOffset(a,u,d,h);this.applyPlacement(g,a);var m=function(){var e=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==e&&r.leave(r)};e.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(t.TRANSITION_DURATION):m()}},t.prototype.applyPlacement=function(t,n){var i=this.tip(),r=i[0].offsetWidth,o=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,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=o&&(t.top=t.top+o-c);var u=this.getViewportAdjustedDelta(n,t,l,c);u.left?t.left+=u.left:t.top+=u.top;var d=/top|bottom/.test(n),h=d?2*u.left-r+l:2*u.top-o+c,p=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(h,i[0][p],d)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(n){function i(){"in"!=r.hoverState&&o.detach(),r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),n&&n()}var r=this,o=e(this.$tip),s=e.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(t.TRANSITION_DURATION):i(),this.hoverState=null,this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(t){var n=(t=t||this.$element)[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=e.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:o?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},l=i?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},r,a,l,s)},t.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,left:t.left+t.width}},t.prototype.getViewportAdjustedDelta=function(e,t,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-o-s.scroll,l=t.top+o-s.scroll+i;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var c=t.left-o,u=t.left+o+n;c<s.left?r.left=s.left-c:u>s.right&&(r.left=s.left+s.width-u)}return r},t.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},t.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},t.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.t
vendor: 6,737 bytes, line 1
1ype+" `template` option must consist of exactly 1 top-level element!");return this.$tip},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),o="object"==typeof n&&n;!r&&/destroy|hide/.test(n)||(r||i.data("bs.tooltip",r=new t(this,o)),"string"==typeof n&&r[n]())})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7",t.DEFAULTS=e.extend({},e.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>'}),(t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype)).constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof n&&n;!r&&/destroy|hide/.test(n)||(r||i.data("bs.popover",r=new t(this,o)),"string"==typeof n&&r[n]())})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy");r||i.data("bs.scrollspy",r=new t(this,"object"==typeof n&&n)),"string"==typeof n&&r[n]()})}t.VERSION="3.3.7",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),r=t.data("target")||t.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return s!=(e=o[o.length-1])&&this.activate(e);if(s&&t<r[0])return this.activeTarget=null,this.clear();for(e=r.length;e--;)s!=o[e]&&t>=r[e]&&(void 0===r[e+1]||t<r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=e(this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]').parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=i,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof t&&r[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=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 r=n.find(".active:last a"),o=e.Event("hide.bs.tab",{relatedTarget:t[0]}),s=e.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),t.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=e(i);this.activate(t.closest("li"),n),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(t,i,r){function o(){s.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),a?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),r&&r()}var s=i.find("> .active"),a=r&&e.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),s.removeClass("in")};var i=e.fn.tab;
1e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var r=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),r=i.data("bs.affix");r||i.data("bs.affix",r=new n(this,"object"==typeof t&&t)),"string"==typeof t&&r[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=e-i)&&"bottom";var a=null==this.affixed;return null!=n&&r<=n?"top":null!=i&&(a?r:o.top)+(a?s:t)>=e-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,t,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-t-o})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e,t){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return n(e.getFullYear(),e.getMonth(),e.getDate())}function r(e,t){return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}function o(n,i){return function(){return i!==t&&e.fn.datepicker.deprecated(i),this[n].apply(this,arguments)}}function s(t){var n={};if(f[t]||(t=t.split("-")[0],f[t])){var i=f[t];return e.each(p,function(e,t){t in i&&(n[t]=i[t])}),n}}var a=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){for(var t=e&&e.valueOf(),n=0,i=this.length;n<i;n++)if(0<=this[n].valueOf()-t&&this[n].valueOf()-t<864e5)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){t&&(e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var e=new a;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),l=function(t,n){e.data(t,"datepicker",this),this._process_options(n),this.dates=new a,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=e(t),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=e(g.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(e,t){return Number(t)+1}
vendor: 27,442 bytes, line 1
1),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};l.prototype={constructor:l,_resolveViewName:function(t){return e.each(g.viewModes,function(n,i){if(t===n||-1!==e.inArray(t,i.names))return t=n,!1}),t},_resolveDaysOfWeek:function(t){return e.isArray(t)||(t=t.split(/[,\s]*/)),e.map(t,Number)},_check_template:function(n){try{return n!==t&&""!==n&&((n.match(/[<>]/g)||[]).length<=0||e(n).length>0)}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var r=this.o=e.extend({},this._o),o=r.language;f[o]||(o=o.split("-")[0],f[o]||(o=h.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=g.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate=r.startDate?r.startDate instanceof Date?this._local_to_utc(this._zero_time(r.startDate)):g.parseDate(r.startDate,s,r.language,r.assumeNearbyYear):-1/0),r.endDate!==1/0&&(r.endDate=r.endDate?r.endDate instanceof Date?this._local_to_utc(this._zero_time(r.endDate)):g.parseDate(r.endDate,s,r.language,r.assumeNearbyYear):1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],e.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=e.map(r.datesDisabled,function(e){return g.parseDate(e,s,r.language,r.assumeNearbyYear)});var a=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(a=e.grep(a,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===a.length)switch(a[0]){case"top":case"bottom":r.orientation.y=a[0];break;case"left":case"right":r.orientation.x=a[0]}else l=e.grep(a,function(e){return/^left|right$/.test(e)}),r.orientation.x=l[0]||"auto",l=e.grep(a,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=l[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=g.parseDate(r.defaultViewDate,s,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var c=r.defaultViewDate.year||(new Date).getFullYear();r.defaultViewDate=n(c,r.defaultViewDate.month||0,r.defaultViewDate.day||1)}else r.defaultViewDate=i()},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var n,i,r=0;r<e.length;r++)2===e[r].length?(n=t,i=e[r][1]):3===e[r].length&&(n=e[r][1],i=e[r][2]),e[r][0].on(i,n)},_unapplyEvents:function(e){for(var n,i,r=0;r<e.length;r++)2===e[r].length?(i=t,n=e[r][1]):3===e[r].length&&(i=e[r][1],n=e[r][2]),e[r][0].off(n,i)},_buildEvents:function(){var t={keyup:e.proxy(function(t){-1===e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:e.proxy(this.keydown,this),paste:e.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=e.proxy(this.show,this)),this._events=this.isInput?[[this.element,t]]:this.component&&this.inputField.length?[[this.inputField,t],[this.component,{click:e.proxy(this.show,this)}]]:[[this.element,{click:e.proxy(this.show,this),keydown:e.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":e.proxy(function(e){this.update(e.date)},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[this.picker,".prev, .next",{click:e.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:e.proxy(this.dayCellClick,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var i=n||this.dates.get(-1),r=this._utc_to_local(i);this.element.trigger({type:t,date:r,viewMode:this.viewMode,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){0===arguments.length?(e=this.dates.length-1,t=this.o.format):"string"==typeof e&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return g.formatDate(n,t,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&e(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var n;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==e.inArray("text/plain",t.originalEvent.clipboardData.types))n=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;n=window.clipboardData.getData("Text")}this.setDate(n),this.update(),t.preventDefault()},_utc_to_local:function(e){if(!e)return e;var t=new Date(e.getTime()+6e4*e.getTimezoneOffset());return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(t=new Date(e.getTime()+6e4*t.getTimezoneOffset())),t},_local_to_utc:function(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset())},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&n(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var e=this.dates.get(-1);return e!==t?new Date(e):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,e.map(t,this._utc_to_local)),this},setDate:o("setDates"),setUTCDate:o("setUTCDates"),remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var e=this.getFormattedDate();return this.inputField.val(e),this},getFormattedDate:function(n){n===t&&(n=this.o.format);var i=this.o.language;return e.map(this.dates,function(e){return g.formatDate(e,n,i)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(e){return this._process_options({startDate:e}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(e){return this._process_options({endDate:e}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(e){return this._process_options({daysOfWeekDisabled:e}),this.update(),this},setDaysOfWeekHighlighted:function(e){return this._process_options({daysOfWeekHighlighted:e}),this.update(),this},setDatesDisabled:function(e){return this._process_options({datesDisabled:e}),this.update(),this},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),n=this.picker.outerHeight(),i=e(this.o.container),r=i.width(),o="body"===this.o.container?e(document).scrollTop():i.scrollTop(),s=i.offset(),a=[0];this.element.parents().each(function(){var t=e(this).css("z-index");"auto"!==t&&0!==Number(t)&&a.push(Number(t))});var l=Math.max.apply(Math,a)+this.o.zIndexOffset,c=this.component?this.component.parent().offset():this.element.offset(),u=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=c.left-s.left,p=c.top-s.top;"body"!==this.o.container&&(p+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(h-=t-d)):c.left<0?(this.picker.addClass("datepicker-orient-left"),h-=c.left-10):h+t>r?(this.picker.addClass("datepicker-orient-right"),h+=d-t):this.picker.addClass(this.o.rtl?"datepicker-orient-right":"datepicker-orient-left");var f=this.o.orientation.y;return"auto"===f&&(f=-o+p-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+f),"top"===f?p-=n+parseInt(this.picker.css("padding-top")):p+=u,this.picker.css(this.o.rtl?{top:p,right:r-(h+d),zIndex:l}:{top:p,left:h,zIndex:l}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),n=[],i=!1;return arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return g.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),n=e.grep(n,e.proxy(function(e){return!this.dateWithinRange(e)||!e},this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,n="<tr>";for(this.o.calendarWeeks&&(n+='<th class="cw">&#160;</th>');t<this.o.weekStart+7;)n+='<th class="dow',-1!==e.inArray(t,this.o.daysOfWeekDisabled)&&(n+=" disabled"),n+='">'+f[this.o.language].daysMin[t++%7]+"</th>";n+="</tr>",this.picker.find(".datepicker-days thead").append(n)}},fillMonths:function(){for(var e=this._utc_to_local(this.viewDate),t="",n=0;n<12;n++)t+='<span class="month'+(e&&e.getMonth()===n?" focused":"")+'">'+f[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=e.map(t,function(e){return e.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var n=[],o=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),a=i();return t.getUTCFullYear()<o||t.getUTCFullYear()===o&&t.getUTCMonth()<s?n.push("old"):(t.getUTCFullYear()>o||t.getUTCFullYear()===o&&t.getUTCMonth()>s)&&n.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&r(t,a)&&n.push("today"),-1!==this.dates.contains(t)&&n.push("active"),this.dateWithinRange(t)||n.push("disabled"),this.dateIsDisabled(t)&&n.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("range"),-1!==e.inArray(t.valueOf(),this.range)&&n.push("selected"),t.valueOf()===this.range[0]&&n.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&n.push("range-end")),n},_fill_yearsView:function(n,i,r,o,s,a,l){for(var c,u,d,h="",p=r/10,f=this.picker.find(n),g=Math.floor(o/r)*r,m=g+9*p,v=Math.floor(this.viewDate.getFullYear()/p)*p,y=e.map(this.dates,function(e){return Math.floor(e.getUTCFullYear()/p)*p}),b=g-p;b<=m+p;b+=p)c=[i],u=null,b===g-p?c.push("old"):b===m+p&&c.push("new"),-1!==e.inArray(b,y)&&c.push("active"),(b<s||b>a)&&c.push("disabled"),b===v&&c.push("focused"),l!==e.noop&&((d=l(new Date(b,0,1)))===t?d={}:"boolean"==typeof d?d={enabled:d}:"string"==typeof d&&(d={classes:d}),!1===d.enabled&&c.push("disabled"),d.classes&&(c=c.concat(d.classes.split(/\s+/))),d.tooltip&&(u=d.tooltip)),h+='<span class="'+c.join(" ")+'"'+(u?' title="'+u+'"':"")+">"+b+"</span>";f.find(".datepicker-switch").text(g+"-"+m),f.find("td").html(h)},fill:function(){var i,r,o=new Date(this.viewDate),s=o.getUTCFullYear(),a=o.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,h=f[this.o.language].today||f.en.today||"",p=f[this.o.language].clear||f.en.clear||"",m=f[this.o.language].titleFormat||f.en.titleFormat;if(!isNaN(s)&&!isNaN(a)){this.picker.find(".datepicker-days .datepicker-switch").text(g.formatDate(o,m,this.o.language)),this.picker.find("tfoot .today").text(h).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var v=n(s,a,0),y=v.getUTCDate();v.setUTCDate(y-(v.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(v);v.getUTCFullYear()<100&&b.setUTCFullYear(v.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var _,S,w=[];v.valueOf()<b;){if((_=v.getUTCDay())===this.o.weekStart&&(w.push("<tr>"),this.o.calendarWeeks)){var E=new Date(+v+(this.o.weekStart-_-7)%7*864e5),T=new Date(Number(E)+(11-E.getUTCDay())%7*864e5),C=new Date(Number(C=n(T.getUTCFullYear(),0,1))+(11-C.getUTCDay())%7*864e5);w.push('<td class="cw">'+((T-C)/864e5/7+1)+"</td>")}(S=this.getClassNames(v)).push("day");var I=v.getUTCDate();this.o.beforeShowDay!==e.noop&&((r=this.o.beforeShowDay(this._utc_to_local(v)))===t?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1===r.enabled&&S.push("disabled"),r.classes&&(S=S.concat(r.classes.split(/\s+/))),r.tooltip&&(i=r.tooltip),r.content&&(I=r.content)),S=e.isFunction(e.uniqueSort)?e.uniqueSort(S):e.unique(S),w.push('<td class="'+S.join(" ")+'"'+(i?' title="'+i+'"':"")+' data-date="'+v.getTime().toString()+'">'+I+"</td>"),i=null,_===this.o.weekEnd&&w.push("</tr>"),v.setUTCDate(v.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var R=f[this.o.language].monthsTitle||f.en.monthsTitle||"Months",D=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?R:s).end().find("tbody span").removeClass("active");if(e.each(this.dates,function(e,t){t.getUTCFullYear()===s&&D.eq(t.getUTCMonth()).addClass("active")}),(s<l||s>u)&&D.addClass("disabled"),s===l&&D.slice(0,c).addClass("disabled"),s===u&&D.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var A=this;e.each(D,function(n,i){var r=new Date(s,n,1),o=A.o.beforeShowMonth(r);o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||e(i).hasClass("disabled")||e(i).addClass("disabled"),o.classes&&e(i).addClass(o.classes),o.tooltip&&e(i).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,s,l,u,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,l,u,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,l,u,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=1;switch(this.viewMode){case 4:c*=10;case 3:c*=10;case 2:c*=10;case 1:e=Math.floor(i/c)*c<o,t=Math.floor(i/c)*c+c>a;break;case 0:e=i<=o&&r<s,t=i>=a&&r>l}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){var r,o,s,a;t.preventDefault(),t.stopPropagation(),(r=e(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(a=r.parent().find("span").index(r),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,s=Number(r.text()),this.viewDate.setUTCFullYear(s)),this._trigger(g.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(s,a,o)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var n=e(t.currentTarget).data("date"),i=new Date(n);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(i)},navArrowsClick:function(t){var n=e(t.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*g.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(g.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var n=new Date(e);return n.setUTCDate(e.getUTCDate()+t),n},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!function(e){return e&&!isNaN(e.getTime())}(e))return this.o.defaultViewDate;if(!t)return e;var n,i,r=new Date(e.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),a=Math.abs(t);if(t=t>0?1:-1,1===a)i=-1===t?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==n},r.setUTCMonth(n=s+t),n=(n+12)%12;else{for(var l=0;l<a;l++)r=this.moveMonth(r,t);n=r.getUTCMonth(),r.setUTCDate(o),i=function(){return n!==r.getUTCMonth()}}for(;i();)r.setUTCDate(--o),r.setUTCMonth(n);return r},moveYear:function(e,t){return this.moveMonth(e,12*t)},moveAvailableDate:function(e,t,n){do{if(e=this[n](e,t),!this.dateWithinRange(e))return!1;n="moveDay"}while(this.dateIsDisabled(e));return e},weekOfDateIsDisabled:function(t){return-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||e.grep(this.o.datesDisabled,function(e){return r(t,e)}).length>0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":visible")){var t,n,i=!1,r=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(n=this.moveAvailableDate(r,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(n=this.moveAvailableDate(r,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?n=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this._trigger(this.dates.length?"changeDate":"clearDate"),this.inputField.trigger("change"))}else 40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation())},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+g.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(t,n){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,d.call(e(this.inputs),n).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e.data(t,"datepicker")}),this.updateDates()};c.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},clearDates:function(){e.each(this.pickers,function(e,t){t.clearDates()})},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=e.data(n.target,"datepicker");if(i!==t){var r=i.getUTCDate(),o=this.keepEmptyValues,s=e.inArray(n.target,this.inputs),a=s-1,l=s+1,c=this.inputs.length;if(-1!==s){if(e.each(this.pickers,function(e,t){t.getUTCDate()||t!==i&&o||t.setUTCDate(r)}),r<this.dates[a])for(;a>=0&&r<this.dates[a];)this.pickers[a--].setUTCDate(r);else if(r>this.dates[l])for(;l<c&&r>this.dates[l];)this.pickers[l++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,function(e){e.destroy()}),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var u=e.fn.datepicker,d=function(n){var i,r=Array.apply(null,arguments);if(r.shift(),this.each(function(){var t=e(this),o=t.data("datepicker"),a="object"==typeof n&&n;if(!o){var u=function(t,n){function i(e,t){return t.toLowerCase()}var r=e(t).data(),o={},s=new RegExp("^"+n.toLowerCase()+"([A-Z])");for(var a in n=new RegExp("^"+n.toLowerCase()),r)n.test(a)&&(o[a.replace(s,i)]=r[a]);return o}(this,"date"),d=s(e.extend({},h,u,a).language),p=e.extend({},h,d,u,a);t.hasClass("input-daterange")||p.inputs?(e.extend(p,{inputs:p.inputs||t.find("input").toArray()}),o=new c(this,p)):o=new l(this,p),t.data("datepicker",o)}"string"==typeof n&&"function"==typeof o[n]&&(i=o[n].apply(o,r))}),i===t||i instanceof l||i instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};e.fn.datepicker=d;var h=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=l;var f=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},g={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(n,r,o,s){function a(){var e=this.slice(0,c[h].length),t=c[h].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(!n)return t;if(n instanceof Date)return n;if("string"==typeof r&&(r=g.parseFormat(r)),r.toValue)return r.toValue(n,r,o);var c,u,d,h,p,m={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},v={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};
1if(n in v&&(n=v[n]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(n)){for(c=n.match(/([\-+]\d+)([dmwy])/gi),n=new Date,h=0;h<c.length;h++)u=c[h].match(/([\-+]\d+)([dmwy])/i),d=Number(u[1]),p=m[u[2].toLowerCase()],n=l.prototype[p](n,d);return l.prototype._zero_utc_time(n)}c=n&&n.match(this.nonpunctuation)||[];var y,b,_={},S=["yyyy","yy","M","MM","m","mm","d","dd"],w={yyyy:function(e,t){return e.setUTCFullYear(s?function(e,t){return!0===t&&(t=10),e<100&&(e+=2e3)>(new Date).getFullYear()+t&&(e-=100),e}(t,s):t)},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(e.setUTCMonth(t%=12);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};w.yy=w.yyyy,w.M=w.MM=w.mm=w.m,w.dd=w.d,n=i();var E=r.parts.slice();if(c.length!==E.length&&(E=e(E).filter(function(t,n){return-1!==e.inArray(n,S)}).toArray()),c.length===E.length){var T,C,I;for(h=0,T=E.length;h<T;h++){if(y=parseInt(c[h],10),u=E[h],isNaN(y))switch(u){case"MM":b=e(f[o].months).filter(a),y=e.inArray(b[0],f[o].months)+1;break;case"M":b=e(f[o].monthsShort).filter(a),y=e.inArray(b[0],f[o].monthsShort)+1}_[u]=y}for(h=0;h<S.length;h++)(I=S[h])in _&&!isNaN(_[I])&&(C=new Date(n),w[I](C,_[I]),isNaN(C)||(n=C))}return n},formatDate:function(t,n,i){if(!t)return"";if("string"==typeof n&&(n=g.parseFormat(n)),n.toDisplay)return n.toDisplay(t,n,i);var r={d:t.getUTCDate(),D:f[i].daysShort[t.getUTCDay()],DD:f[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:f[i].monthsShort[t.getUTCMonth()],MM:f[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};r.dd=(r.d<10?"0":"")+r.d,r.mm=(r.m<10?"0":"")+r.m,t=[];for(var o=e.extend([],n.separators),s=0,a=n.parts.length;s<=a;s++)o.length&&t.push(o.shift()),t.push(r[n.parts[s]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+h.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+h.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};g.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+g.headTemplate+"<tbody></tbody>"+g.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+"</table></div></div>",e.fn.datepicker.DPGlobal=g,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=u,this},e.fn.datepicker.version="1.8.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);n.data("datepicker")||(t.preventDefault(),d.call(n,"show"))}),e(function(){d.call(e('[data-provide="datepicker-inline"]'))})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n;return function(){var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){function r(e,t){return b.call(e,t)}function o(e,t){var n,i,r,o,s,a,l,c,u,d,h,p=t&&t.split("/"),f=v.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,v.nodeIdCompat&&S.test(e[s])&&(e[s]=e[s].replace(S,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),u=0;u<e.length;u++)if("."===(h=e[u]))e.splice(u,1),u-=1;else if(".."===h){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((p||g)&&f){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((r=f[p.slice(0,d).join("/")])&&(r=r[i])){o=r,a=u;break}if(o)break;!l&&g&&g[i]&&(l=g[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function s(e,n){return function(){var i=_.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(t,i.concat([e,n]))}}function a(e){return function(t){g[e]=t}}function l(e){if(r(m,e)){var n=m[e];delete m[e],y[e]=!0,d.apply(t,n)}if(!r(g,e)&&!r(y,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function u(e){return e?c(e):[]}var d,h,p,f,g={},m={},v={},y={},b=Object.prototype.hasOwnProperty,_=[].slice,S=/\.js$/;p=function(e,t){var n,i=c(e),r=i[0],s=t[1];return e=i[1],r&&(n=l(r=o(r,s))),r?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return o(t,e)}}
1(s)):o(e,s):(e=(i=c(e=o(e,s)))[1],(r=i[0])&&(n=l(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return s(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:function(e){return function(){return v&&v.config&&v.config[e]||{}}}(e)}}},d=function(e,n,i,o){var c,d,h,v,b,_,S,w=[],E=typeof i;if(_=u(o=o||e),"undefined"===E||"function"===E){for(n=!n.length&&i.length?["require","exports","module"]:n,b=0;b<n.length;b+=1)if("require"===(d=(v=p(n[b],_)).f))w[b]=f.require(e);else if("exports"===d)w[b]=f.exports(e),S=!0;else if("module"===d)c=w[b]=f.module(e);else if(r(g,d)||r(m,d)||r(y,d))w[b]=l(d);else{if(!v.p)throw new Error(e+" missing "+d);v.p.load(v.n,s(o,!0),a(d),{}),w[b]=g[d]}h=i?i.apply(g[e],w):void 0,e&&(c&&c.exports!==t&&c.exports!==g[e]?g[e]=c.exports:h===t&&S||(g[e]=h))}else e&&(g[e]=i)},e=n=h=function(e,n,i,r,o){if("string"==typeof e)return f[e]?f[e](n):l(p(e,u(n)).f);if(!e.splice){if((v=e).deps&&h(v.deps,v.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=r,r=o),r?d(t,e,n,i):setTimeout(function(){d(t,e,n,i)},4),h},h.config=function(e){return h(e)},e._defined=g,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),r(g,e)||r(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i)}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}var n={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(e,n){function i(){var t=Array.prototype.unshift,i=e.prototype.constructor;n.prototype.constructor.length>0&&(t.call(arguments,e.prototype.constructor),i=n.prototype.constructor),i.apply(this,arguments)}var r=t(n),o=t(e);n.displayName=e.displayName,i.prototype=new function(){this.constructor=i};for(var s=0;s<o.length;s++){var a=o[s];i.prototype[a]=e.prototype[a]}for(var l=function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var r=n.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),r.apply(this,arguments)}},c=0;c<r.length;c++){var u=r[c];i.prototype[u]=l(u)}return i}},i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,o=n.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},n.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n.__cache={};var r=0;return n.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?e.setAttribute("data-select2-id",t=e.id):(e.setAttribute("data-select2-id",++r),t=r.toString())),t},n.StoreData=function(e,t,i){var r=n.GetUniqueElementId(e);
1n.__cache[r]||(n.__cache[r]={}),n.__cache[r][t]=i},n.GetData=function(t,i){var r=n.GetUniqueElementId(t);return i?n.__cache[r]&&null!=n.__cache[r][i]?n.__cache[r][i]:e(t).data(i):n.__cache[r]},n.RemoveData=function(e){var t=n.GetUniqueElementId(e);null!=n.__cache[t]&&delete n.__cache[t]},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=this.option(e.results[n]);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(i){var r=e.map(i,function(e){return e.id.toString()});n.$results.find(".select2-results__option[aria-selected]").each(function(){var n=e(this),i=t.GetData(this,"data");null!=i.element&&i.element.selected||null==i.element&&e.inArray(""+i.id,r)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};for(var o in n.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==n.id&&delete r["aria-selected"],null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(r.role="group",r["aria-label"]=n.text,delete r["aria-selected"]),r)i.setAttribute(o,r[o]);if(n.children){var s=e(i),a=document.createElement("strong");a.className="select2-results__group",e(a),this.template(n,a);for(var l=[],c=0;c<n.children.length;c++){var u=this.option(n.children[c]);l.push(u)}var d=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});d.append(l),s.append(a),s.append(d)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this;this.$results.attr("id",n.id+"-results"),n.on("results:all",function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),n.on("results:append",function(e){r.append(e.data),n.isOpen()&&r.setClasses()}),n.on("query",function(e){r.hideMessages(),r.showLoading(e)}),n.on("select",function(){n.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),n.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}
vendor: 4,442 bytes, line 1
1),n.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:n})}}),n.on("results:previous",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}}),n.on("results:next",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===n?r.$results.scrollTop(0):s>o&&r.$results.scrollTop(a)}}),n.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(e){r.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var i=e(this),o=t.GetData(this,"data");"true"!==i.attr("aria-selected")?r.trigger("select",{originalEvent:n,data:o}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:o}):r.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:i,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):e(n).append(o)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),this.$selection=n,n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","fal
1se"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),window.setTimeout(function(){i.$selection.focus()},0),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var i=e(n.target).closest(".select2");e(".select2.select2-container--open").each(function(){e(this),this!=i[0]&&t.GetData(this,"element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.attr("title",t.title||t.text)}else this.clear()},r}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,r){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var i=e(this).parent(),r=n.GetData(i[0],"data");o.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var r=e[i],o=this.selectionContainer(),s=this.display(r,o);o.append(s),o.attr("title",r.title||r.text),n.StoreData(o[0],"data",r),t.push(o)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){if(t.length>1||1==t.length&&t[0].id!=this.placeholder.id)return e.call(this,t);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},t}
1),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},i.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var r=n.GetData(i[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var s={data:r};if(this.trigger("clear",s),s.prevented)return void this.$element.val(o);for(var a=0;a<r.length;a++)if(this.trigger("unselect",s={data:r[a]}),s.prevented)return void this.$element.val(o);this.$element.trigger("change"),this.trigger("toggle",{})}}},i.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},i.prototype.update=function(t,i){if(t.call(this,i),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var r=e('<span class="select2-selection__clear">&times;</span>');n.StoreData(r[0],"data",i),this.$selection.find(".select2-selection__rendered").prepend(r)}},i}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,r){var o=this;e.call(this,i,r),i.on("open",function(){o.$search.trigger("focus")}),i.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),i.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),i.on("disable",function(){o.$search.prop("disabled",!0)}),i.on("focus",function(e){o.$search.trigger("focus")}),i.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".select2-selection__choice");if(i.length>0){var r=t.GetData(i[0],"data");o.searchRemoveChoice(r),e.preventDefault()}}});var s=document.documentMode,a=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o.$selection.off(a?"input.search input.searchcheck":"keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(a&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&(this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus())},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){var e;this.$search.css("width","25px"),e=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,o)){var i=e.Event("select2:"+t,{params:n=n||{}});r.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={}
1,n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"
1c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f"
vendor: 14,550 bytes, line 1
1:"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return(i+=e.generateChars(4))+(null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4))},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),r=i.item(e);t.push(r)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");this.$element.prop("multiple")?this.current(function(i){var r=[];(e=[e]).push.apply(e,i);for(var o=0;o<e.length;o++){var s=e[o].id;-1===n.inArray(s,r)&&r.push(s)}t.$element.val(r),t.$element.trigger("change")}):(this.$element.val(e.id),this.$element.trigger("change"))},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var r=[],o=0;o<i.length;o++){var s=i[o].id;s!==e.id&&-1===n.inArray(s,r)&&r.push(s)}t.$element.val(r),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var o=r.item(t),s=r.matches(e,o);null!==s&&i.push(s)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var i;e.children?(i=document.createElement("optgroup")).label=e.text:void 0!==(i=document.createElement("option")).textContent?i.textContent=e.text:i.innerText=e.text,void 0!==e.id&&(i.value=e.id),e.disabled&&(i.disabled=!0),e.selected&&(i.selected=!0),e.title&&(i.title=e.title);var r=n(i),o=this._normalizeItem(e);return o.element=i,t.StoreData(i,"data",o),r},i.prototype.item=function(e){var i={};if(null!=(i=t.GetData(e[0],"data")))return i;if(e.is("option"))i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){i={text:e.prop("label"),children:[],title:e.prop("title")};for(var r=e.children("option"),o=[],s=0;s<r.length;s++){var a=n(r[s]),l=this.item(a);o.push(l)}i.children=o}return(i=this._normalizeItem(i)).element=e[0],t.StoreData(e[0],"data",i),i},i.prototype._normalizeItem=function(e){return e!==Object(e)&&(e={id:e,text:e}),null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){function i(e){return function(){return n(this).val()==e.id}}for(var r=this,o=this.$element.find("option"),s=o.map(function(){return r.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=o.filter(i(c)),d=this.item(u),h=n.extend(!0,{},c,d),p=this.option(h);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);t.appendMany(f,g)}a.push(f)}}return a},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){return n.extend({},{data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}},e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=o.transport(o,function(i){var o=r.processResults(i,e);r.options.get("debug")&&window.console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(o)},function(){"status"in i&&(0===i.status||"0"===i.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=i}var r=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof o.url&&(o.url=o.url.call(this.$element,e)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var r=i.get("tags"),o=i.get("createTag");void 0!==o&&(this.createTag=o);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(r))for(var a=0;a<r.length;a++){var l=this._normalizeItem(r[a]),c=this.option(l);this.$element.append(c)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),e.call(this,t,null!=t.term&&null==t.page?function e(r,o){for(var s=r.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!o&&(r.data=s,void n(r))}if(o)return!0;var u=i.createTag(t);if(null!=u){var d=i.option(u);d.attr("data-select2-tag",!0),i.addOptions([d]),i.insertTag(s,u)}r.results=s,n(r)}:n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var r=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,function(t){var n=r._normalizeItem(t);if(!r.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}r.trigger("select",{data:n})});o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.focus()),n.term=o.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var o=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;)if(-1!==e.inArray(s[a],o)){var c=s.substr(0,a),u=l(e.extend({},n,{term:c}));null!=u?(r(u),s=s.substr(a+1)||"",a=0):a++}else a++;return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(r){i.maximumSelectionLength>0&&(null!=r?r.length:0)>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),n.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),n.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val(""),r.$search.blur()}),n.on("focus",function(){n.isOpen()||r.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--)this.placeholder.id===t[i].id&&n.splice(i,1);return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),n.on("query",function(e){r.lastParams=e,r.loading=!0}),n.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&t&&r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore()})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.
1select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(o,function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)}),e(window).on(o+" "+s+" "+a,function(e){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<o.top-a,d=c>o.bottom+a,h={left:o.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();h.top-=f.top,h.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(h.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),t.define("select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}return t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var i=n.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var o=e.GetData(r[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,r,o,s,a,l,c,u,d,h,p,f,g,m,v,y,b,_,S,w,E,T,C,I,R,D){function A(){this.reset()}return A.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter){if(d.dataAdapter=null!=d.ajax?f:null!=d.data?p:h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var D=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,D)}if(null!=d.initSelection){var A=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,A)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,E)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,w)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,I))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;
1else{var k=c.Decorate(_,S);d.dropdownAdapter=k}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,R)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var O=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)}if(null==d.selectionAdapter){if(d.selectionAdapter=d.multiple?r:i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var x=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,x)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var N=d.language.split("-");d.language=[d.language,N[0]]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var M=d.language,L=0;L<M.length;L++){var j=M[L],F={};try{F=u.loadPath(j)}catch(e){try{F=u.loadPath(j=this.defaults.amdLanguageBase+j)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+j+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(F)}d.translations=P}else{var U=u.loadPath(this.defaults.amdLanguageBase+"en"),H=new u(d.language);H.extend(U),d.translations=H}return d},A.prototype.reset=function(){function t(e){return e.replace(/[^\u
10000-\u007E]/g,function(e){return d[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:D,matcher:function n(i,r){if(""===e.trim(i.term))return r;if(r.children&&r.children.length>0){for(var o=e.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==n(i,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:n(i,o)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},A.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(!0,this.defaults,r)},new A}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function r(t,r){if(this.options=t,null!=r&&this.fromElement(r),this.options=n.apply(this.options),r&&r.is("input")){var o=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,o)}}return r.prototype.fromElement=function(e){var n,r=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=e.prop("dir")?e.prop("dir"):e.closest("[dir]").prop("dir")?e.closest("[dir]").prop("dir"):"ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),i.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),i.StoreData(e[0],"data",i.GetData(e[0],"select2Tags")),i.StoreData(e[0],"tags",!0)),i.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",i.GetData(e[0],"ajaxUrl")),i.StoreData(e[0],"ajax-Url",i.GetData(e[0],"ajaxUrl"))),n=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,i.GetData(e[0])):i.GetData(e[0]);var o=t.extend(!0,{},n);for(var s in o=i._convertData(o))t.inArray(s,r)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],o[s]):this.options[s]=o[s]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var r=function(e,i){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),this.options=new t(i=i||{},e),r.__super__.constructor.call(this);var o=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",o),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){d.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,r){-1===e.inArray(i,n)&&t.trigger(i,r)})},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}
vendor: 4,363 bytes, line 1
1),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var r=0;r<t.addedNodes.length;r++)t.addedNodes[r].selected&&(n=!0);else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var o={prevented:!1,name:e,args:t};if(n.call(this,i[e],o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]),this.$element.prop("disabled",!e[0])},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},r.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r}),t.define("select2/compat/utils",["jquery"],function(e){return{syncCssClasse
1s:function(t,n,i){var r,o,s=[];(r=e.trim(t.attr("class")))&&e((r=""+r).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&s.push(this)}),(r=e.trim(n.attr("class")))&&e((r=""+r).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(o=i(this))&&s.push(o)}),t.attr("class",s.join(" "))}}}),t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("containerCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i}),t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("dropdownCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}
1var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i}),t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("select2/compat/inputData",["jquery","../utils"],function(e,t){function n(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return n.prototype.current=function(t,n){function i(t,n){var r=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,r.push(t)):t.selected=!1,t.children&&r.push.apply(r,i(t.children,n)),r}for(var r=[],o=0;o<this._currentData.length;o++)r.push.apply(r,i(this._currentData[o],this.$element.val().split(this._valueSeparator)));n(r)},n.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();this.$element.val(i+=this._valueSeparator+n.id),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},n.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],r=0;r<e.length;r++){var o=e[r];t.id!=o.id&&i.push(o.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},n.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var o=this.matches(t,this._currentData[r]);null!==o&&i.push(o)}n({results:i})},n.prototype.addOptions=function(n,i){var r=e.map(i,function(e){return t.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,r)},n}),t.define("select2/compat/matcher",["jquery"],function(e){return function(t){return function(n,i){var r=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return r;if(i.children){for(var o=i.children.length-1;o>=0;o--){var s=i.children[o];t(n.term,s.text,s)||r.children.splice(o,1)}if(r.children.length>0)return r}return t(n.term,i.text,i)?r:null}}}),t.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),t.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),t.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),n=function(e){function t(t){var s=t||window.event,a=l.call(arguments,1
1),c=0,d=0,h=0,p=0,f=0,g=0;if((t=e.event.fix(s)).type="mousewheel","detail"in s&&(h=-1*s.detail),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*h,h=0),c=0===h?d:h,"deltaY"in s&&(c=h=-1*s.deltaY),"deltaX"in s&&(d=s.deltaX,0===h&&(c=-1*d)),0!==h||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,h*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!o||p<o)&&(o=p,i(s,p)&&(o/=40)),i(s,p)&&(c/=40,d/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/o),d=Math[d>=1?"floor":"ceil"](d/o),h=Math[h>=1?"floor":"ceil"](h/o),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=o,t.offsetX=f,t.offsetY=g,t.deltaMode=0,a.unshift(t,c,d,h),r&&clearTimeout(r),r=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){o=null}function i(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(e),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,i,r){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,s)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n}),function(e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n||(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,i){function r(t){var n,i,o={};e.each(t,function(e){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(i=e.replace(n[0],n[2].toLowerCase()),o[i]=e,"o"===n[1]&&r(t[e]))}),t._hungarianMap=o}function o(t,n,s){var a;t._hungarianMap||r(t),e.each(n,function(r){(a=t._hungarianMap[r])===i||!s&&n[a]!==i||("o"===a.charAt(0)?(n[a]||(n[a]={}),e.extend(!0,n[a],n[r]),o(t[a],n[a],s)):n[a]=n[r])})}function s(e){var t=Ge.defaults.oLanguage,n=t.sDecimal;if(n&&He(n),e){var i=e.sZeroRecords;!e.sEmptyTable&&i&&"No data available in table"===t.sEmptyTable&&Oe(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&i&&"Loading..."===t.sLoadingRecords&&Oe(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands),(e=e.sDecimal)&&n!==e&&He(e)}}function a(e){if(ct(e,"ordering","bSort"),ct(e,"orderMulti","bSortMulti"),ct(e,"orderClasses","bSortClasses"),ct(e,"orderCellsTop","bSortCellsTop"),ct(e,"order","aaSorting"),ct(e,"orderFixed","aaSortingFixed"),ct(e,"paging","bPaginate"),ct(e,"pagingType","sPaginationType"),ct(e,"pageLength","iDisplayLength"),
1ct(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":""),e=e.aoSearchCols)for(var t=0,n=e.length;t<n;t++)e[t]&&o(Ge.models.oSearch,e[t])}function l(t){ct(t,"orderable","bSortable"),ct(t,"orderData","aDataSort"),ct(t,"orderSequence","asSorting"),ct(t,"orderDataType","sortDataType");var n=t.aDataSort;"number"==typeof n&&!e.isArray(n)&&(t.aDataSort=[n])}function c(n){if(!Ge.__browser){var i={};Ge.__browser=i;var r=e("<div/>").css({position:"fixed",top:0,left:-1*e(t).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("<div/>").css({width:"100%",height:10}))).appendTo("body"),o=r.children(),s=o.children();i.barWidth=o[0].offsetWidth-o[0].clientWidth,i.bScrollOversize=100===s[0].offsetWidth&&100!==o[0].clientWidth,i.bScrollbarLeft=1!==Math.round(s.offset().left),i.bBounding=!!r[0].getBoundingClientRect().width,r.remove()}e.extend(n.oBrowser,Ge.__browser),n.oScroll.iBarWidth=Ge.__browser.barWidth}function u(e,t,n,r,o,s){var a,l=!1;for(n!==i&&(a=n,l=!0);r!==o;)e.hasOwnProperty(r)&&(a=l?t(a,e[r],r,e):e[r],l=!0,r+=s);return a}function d(t,i){var r=t.aoColumns.length,o=e.extend({},Ge.models.oColumn,o=Ge.defaults.column,{nTh:i||n.createElement("th"),sTitle:o.sTitle?o.sTitle:i?i.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[r],mData:o.mData?o.mData:r,idx:r});t.aoColumns.push(o),(o=t.aoPreSearchCols)[r]=e.extend({},Ge.models.oSearch,o[r]),h(t,r,e(i).data())}function h(t,n,r){var s=t.oClasses,a=e((n=t.aoColumns[n]).nTh);if(!n.sWidthOrig){n.sWidthOrig=a.attr("width")||null;var c=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(n.sWidthOrig=c[1])}r!==i&&null!==r&&(l(r),o(Ge.defaults.column,r),r.mDataProp!==i&&!r.mData&&(r.mData=r.mDataProp),r.sType&&(n._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),r.sClass&&a.addClass(r.sClass),e.extend(n,r),Oe(n,r,"sWidth","sWidthOrig"),r.iDataSort!==i&&(n.aDataSort=[r.iDataSort]),Oe(n,r,"aDataSort"));var u=n.mData,d=C(u),h=n.mRender?C(n.mRender):null;r=function(e){return"string"==typeof e&&-1!==e.indexOf("@")},n._bAttrSrc=e.isPlainObject(u)&&(r(u.sort)||r(u.type)||r(u.filter)),n._setter=null,n.fnGetData=function(e,t,n){var r=d(e,t,i,n);return h&&t?h(r,t,e,n):r},n.fnSetData=function(e,t,n){return I(u)(e,t,n)},"number"!=typeof u&&(t._rowReadObject=!0),t.oFeatures.bSort||(n.bSortable=!1,a.addClass(s.sSortableNone)),t=-1!==e.inArray("asc",n.asSorting),r=-1!==e.inArray("desc",n.asSorting),n.bSortable&&(t||r)?t&&!r?(n.sSortingClass=s.sSortableAsc,n.sSortingClassJUI=s.sSortJUIAscAllowed):!t&&r?(n.sSortingClass=s.sSortableDesc,n.sSortingClassJUI=s.sSortJUIDescAllowed):(n.sSortingClass=s.sSortable,n.sSortingClassJUI=s.sSortJUI):(n.sSortingClass=s.sSortableNone,n.sSortingClassJUI="")}function p(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;ge(e);for(var n=0,i=t.length;n<i;n++)t[n].nTh.style.width=t[n].sWidth}(""!==(t=e.oScroll).sY||""!==t.sX)&&pe(e),Me(e,null,"column-sizing",[e])}function f(e,t){var n=v(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function g(t,n){var i=v(t,"bVisible");return-1!==(i=e.inArray(n,i))?i:null}function m(t){var n=0;return e.each(t.aoColumns,function(t,i){i.bVisible&&"none"!==e(i.nTh).css("display")&&n++}),n}function v(t,n){var i=[];return e.map(t.aoColumns,function(e,t){e[n]&&i.push(t)}),i}function y(e){var t,n,r,o,s,a,l,c,u,d=e.aoColumns,h=e.aoData,p=Ge.ext.type.detect;for(t=0,n=d.length;t<n;t++)if(u=[],!(l=d[t]).sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(r=0,o=p.length;r<o;r++){for(s=0,a=h.length;s<a&&(u[s]===i&&(u[s]=w(e,s,t,"type")),(c=p[r](u[s],e))||r===p.length-1)&&"html"!==c;s++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function b(t,n,r,o){var s,a,l,c,u,h,p=t.aoColumns;if(n)for(s=n.length-1;0<=s;s--){var f=(h=n[s]).targets!==i?h.targets:h.aTargets;for(e.isArray(f)||(f=[f]),a=0,l=f.length;a<l;a++)if("number"==typeof f[a]&&0<=f[a]){for(;p.length<=f[a];)d(t);o(f[a],h)}else if("number"==typeof f[a]&&0>f[a])o(p.length+f[a],h);else if("string"==typeof f[a])for(c=0,u=p.length;c<u;c++)("_all"==f[a]||e(p[c].nTh).hasClass(f[a]))&&o(c,h)}if(r)for(s=0,t=r.length;s<t;s++)o(s,r[s])}function _(t,n,r,o){var s=t.aoData.length,a=e.extend(!0,{},Ge.models.oRow,{src:r?"dom":"data",idx:s});a._aData=n,t.aoData.push(a);for(var l=t.aoColumns,c=0,u=l.length;c<u;c++)l[c].sType=null;return t.aiDisplayMaster.push(s),(n=t.rowIdFn(n))!==i&&(t.aIds[n]=a),(r||!t.oFeatures.bDeferRender)&&x(t,s,r,o),s}function S(t,n){var i;return n instanceof e||(n=e(n)),n.map(function(e,n){return i=O(t,n),_(t,i.data,n,i.cells)})}function w(e,t,n,r){var o=e.iDraw,s=e.aoColumns[n],a=e.aoData[t]._aData,l=s.sDefaultContent,c=s.fnGetData(a,r,{settings:e,row:t,col:n});if(c===i)return e.iDrawError!=o&&null===l&&(ke(e,0,"Requested unknown parameter "+("function"==typeof s.mData?"{function}":"'"+s.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=o),l;if(c!==a&&null!==c||null===l||r===i){if("function"==typeof c)return c.call(a)}else c=l;return null===c&&"display"==r?"":c}function E(e,t,n,i){e.aoColumns[n].fnSetData(e.aoData[t]._aData,i,{settings:e,row:t,col:n})}function T(t){return e.map(t.match(/(\\.|[^\.])+/g)||[""],function(e){return e.replace(/\\\./g,".")})}function C(t){if(e.isPlainObject(t)){var n={};return e.each(t,function(e,t){t&&(n[e]=C(t))}),function(e,t,r,o){var s=n[t]||n._;return s!==i?s(e,t,r,o):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,i,r){return t(e,n,i,r)};if("string"==typeof t&&(-1!==t.indexOf(".")||-1!==t.indexOf("[")||-1!==t.indexOf("("))){var r=function(t,n,o){var s,a;if(""!==o)for(var l=0,c=(a=T(o)).length;l<c;l++){if(o=a[l].match(ut),s=a[l].match(dt),o){if(a[l]=a[l].replace(ut,""),""!==a[l]&&(t=t[a[l]]),s=[],a.splice(0,l+1),a=a.join("."),e.isArray(t))for(l=0,c=t.length;l<c;l++)s.push(r(t[l],n,a));t=""===(t=o[0].substring(1,o[0].length-1))?s:s.join(t);break}if(s)a[l]=a[l].replace(dt,""),t=t[a[l]]();else{if(null===t||t[a[l]]===i)return i;t=t[a[l]]}}return t};return function(e,n){return r(e,n,t)}}return function(e){return e[t]}}function I(t){if(e.isPlainObject(t))return I(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,i){t(e,"set",n,i)};if("string"==typeof t&&(-1!==t.indexOf(".")||-1!==t.indexOf("[")||-1!==t.indexOf("("))){var n=function(t,r,o){var s;s=(o=T(o))[o.length-1];for(var a,l,c=0,u=o.length-1;c<u;c++){if(a=o[c].match(ut),l=o[c].match(dt),a){if(o[c]=o[c].replace(ut,""),t[o[c]]=[],(s=o.slice()).splice(0,c+1),a=s.join("."),e.isArray(r))for(l=0,u=r.length;l<u;l++)n(s={},r[l],a),t[o[c]].push(s);else t[o[c]]=r;return}l&&(o[c]=o[c].replace(dt,""),t=t[o[c]](r)),null!==t[o[c]]&&t[o[c]]!==i||(t[o[c]]={}),t=t[o[c]]}s.match(dt)?t[s.replace(dt,"")](r):t[s.replace(ut,"")]=r};return function(e,i){return n(e,i,t)}}return function(e,n){e[t]=n}}function R(e){return rt(e.aoData,"_aData")}function D(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function A(e,t,n){for(var r=-1,o=0,s=e.length;o<s;o++)e[o]==t?r=o:e[o]>t&&e[o]--;-1!=r&&n===i&&e.splice(r,1)}function k(e,t,n,r){var o,s=e.aoData[t],a=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=w(e,t,i,"display")};
1if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var l=s.anCells;if(l)if(r!==i)a(l[r],r);else for(n=0,o=l.length;n<o;n++)a(l[n],n)}else s._aData=O(e,s,r,r===i?i:s._aData).data;if(s._aSortData=null,s._aFilterData=null,a=e.aoColumns,r!==i)a[r].sType=null;else{for(n=0,o=a.length;n<o;n++)a[n].sType=null;N(e,s)}}function O(t,n,r,o){var s,a,l,c=[],u=n.firstChild,d=0,h=t.aoColumns,p=t._rowReadObject,f=(o=o!==i?o:p?{}:[],function(e,t){if("string"==typeof e){var n=e.indexOf("@");-1!==n&&(n=e.substring(n+1),I(e)(o,t.getAttribute(n)))}}),g=function(t){r!==i&&r!==d||(a=h[d],l=e.trim(t.innerHTML),a&&a._bAttrSrc?(I(a.mData._)(o,l),f(a.mData.sort,t),f(a.mData.type,t),f(a.mData.filter,t)):p?(a._setter||(a._setter=I(a.mData)),a._setter(o,l)):o[d]=l),d++};if(u)for(;u;)"TD"!=(s=u.nodeName.toUpperCase())&&"TH"!=s||(g(u),c.push(u)),u=u.nextSibling;else for(u=0,s=(c=n.anCells).length;u<s;u++)g(c[u]);return(n=n.firstChild?n:n.nTr)&&(n=n.getAttribute("id"))&&I(t.rowId)(o,n),{data:o,cells:c}}function x(t,i,r,o){var s,a,l,c,u,d=t.aoData[i],h=d._aData,p=[];if(null===d.nTr){for(s=r||n.createElement("tr"),d.nTr=s,d.anCells=p,s._DT_RowIndex=i,N(t,d),c=0,u=t.aoColumns.length;c<u;c++)l=t.aoColumns[c],(a=r?o[c]:n.createElement(l.sCellType))._DT_CellIndex={row:i,column:c},p.push(a),r&&!l.mRender&&l.mData===c||e.isPlainObject(l.mData)&&l.mData._===c+".display"||(a.innerHTML=w(t,i,c,"display")),l.sClass&&(a.className+=" "+l.sClass),l.bVisible&&!r?s.appendChild(a):!l.bVisible&&r&&a.parentNode.removeChild(a),l.fnCreatedCell&&l.fnCreatedCell.call(t.oInstance,a,w(t,i,c),h,i,c);Me(t,"aoRowCreatedCallback",null,[s,h,i,p])}d.nTr.setAttribute("role","row")}function N(t,n){var i=n.nTr,r=n._aData;if(i){var o=t.rowIdFn(r);o&&(i.id=o),r.DT_RowClass&&(o=r.DT_RowClass.split(" "),n.__rowc=n.__rowc?lt(n.__rowc.concat(o)):o,e(i).removeClass(n.__rowc.join(" ")).addClass(r.DT_RowClass)),r.DT_RowAttr&&e(i).attr(r.DT_RowAttr),r.DT_RowData&&e(i).data(r.DT_RowData)}}function P(t){var n,i,r,o,s,a=t.nTHead,l=t.nTFoot,c=0===e("th, td",a).length,u=t.oClasses,d=t.aoColumns;for(c&&(o=e("<tr/>").appendTo(a)),n=0,i=d.length;n<i;n++)r=e((s=d[n]).nTh).addClass(s.sClass),c&&r.appendTo(o),t.oFeatures.bSort&&(r.addClass(s.sSortingClass),!1!==s.bSortable&&(r.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),Te(t,s.nTh,n))),s.sTitle!=r[0].innerHTML&&r.html(s.sTitle),je(t,"header")(t,r,s,u);if(c&&U(t.aoHeader,a),e(a).find(">tr").attr("role","row"),e(a).find(">tr>th, >tr>td").addClass(u.sHeaderTH),e(l).find(">tr>th, >tr>td").addClass(u.sFooterTH),null!==l)for(n=0,i=(t=t.aoFooter[0]).length;n<i;n++)(s=d[n]).nTf=t[n].cell,s.sClass&&e(s.nTf).addClass(s.sClass)}function M(t,n,r){var o,s,a,l,c=[],u=[],d=t.aoColumns.length;if(n){for(r===i&&(r=!1),o=0,s=n.length;o<s;o++){for(c[o]=n[o].slice(),c[o].nTr=n[o].nTr,a=d-1;0<=a;a--)!t.aoColumns[a].bVisible&&!r&&c[o].splice(a,1);u.push([])}for(o=0,s=c.length;o<s;o++){if(t=c[o].nTr)for(;a=t.firstChild;)t.removeChild(a);for(a=0,n=c[o].length;a<n;a++)if(l=d=1,u[o][a]===i){for(t.appendChild(c[o][a].cell),u[o][a]=1;c[o+d]!==i&&c[o][a].cell==c[o+d][a].cell;)u[o+d][a]=1,d++;for(;c[o][a+l]!==i&&c[o][a].cell==c[o][a+l].cell;){for(r=0;r<d;r++)u[o+r][a+l]=1;l++}e(c[o][a].cell).attr("rowspan",d).attr("colspan",l)}}}}function L(t){var n=Me(t,"aoPreDrawCallback","preDraw",[t]);if(-1!==e.inArray(!1,n))de(t,!1);else{n=[];var r=0,o=t.asStripeClasses,s=o.length,a=t.oLanguage,l=t.iInitDisplayStart,c="ssp"==Fe(t),u=t.aiDisplay;t.bDrawing=!0,l!==i&&-1!==l&&(t._iDisplayStart=c?l:l>=t.fnRecordsDisplay()?0:l,t.iInitDisplayStart=-1),l=t._iDisplayStart;var d=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,de(t,!1);else if(c){if(!t.bDestroying&&!V(t))return}else t.iDraw++;if(0!==u.length)for(a=c?t.aoData.length:d,c=c?0:l;c<a;c++){var h=u[c],p=t.aoData[h];null===p.nTr&&x(t,h);var f=p.nTr;if(0!==s){var g=o[r%s];p._sRowStripe!=g&&(e(f).removeClass(p._sRowStripe).addClass(g),p._sRowStripe=g)}Me(t,"aoRowCallback",null,[f,p._aData,r,c,h]),n.push(f),r++}else r=a.sZeroRecords,1==t.iDraw&&"ajax"==Fe(t)?r=a.sLoadingRecords:a.sEmptyTable&&0===t.fnRecordsTotal()&&(r=a.sEmptyTable),n[0]=e("<tr/>",{class:s?o[0]:""}).append(e("<td />
1",{valign:"top",colSpan:m(t),class:t.oClasses.sRowEmpty}).html(r))[0];Me(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],R(t),l,d,u]),Me(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],R(t),l,d,u]),(o=e(t.nTBody)).children().detach(),o.append(e(n)),Me(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}}function j(e,t){var n=e.oFeatures,i=n.bFilter;n.bSort&&Se(e),i?Y(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,L(e),e._drawHold=!1}function F(t){var n=t.oClasses,i=e(t.nTable),r=(i=e("<div/>").insertBefore(i),t.oFeatures),o=e("<div/>",{id:t.sTableId+"_wrapper",class:n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=i[0],t.nTableWrapper=o[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var s,a,l,c,u,d,h=t.sDom.split(""),p=0;p<h.length;p++){if(s=null,"<"==(a=h[p])){if(l=e("<div/>")[0],"'"==(c=h[p+1])||'"'==c){for(u="",d=2;h[p+d]!=c;)u+=h[p+d],d++;"H"==u?u=n.sJUIHeader:"F"==u&&(u=n.sJUIFooter),-1!=u.indexOf(".")?(c=u.split("."),l.id=c[0].substr(1,c[0].length-1),l.className=c[1]):"#"==u.charAt(0)?l.id=u.substr(1,u.length-1):l.className=u,p+=d}o.append(l),o=e(l)}else if(">"==a)o=o.parent();else if("l"==a&&r.bPaginate&&r.bLengthChange)s=ae(t);else if("f"==a&&r.bFilter)s=G(t);else if("r"==a&&r.bProcessing)s=ue(t);else if("t"==a)s=he(t);else if("i"==a&&r.bInfo)s=te(t);else if("p"==a&&r.bPaginate)s=le(t);else if(0!==Ge.ext.feature.length)for(d=0,c=(l=Ge.ext.feature).length;d<c;d++)if(a==l[d].cFeature){s=l[d].fnInit(t);break}s&&((l=t.aanFeatures)[a]||(l[a]=[]),l[a].push(s),o.append(s))}i.replaceWith(o),t.nHolding=null}function U(t,n){var i,r,o,s,a,l,c,u,d,h,p=e(n).children("tr");for(t.splice(0,t.length),o=0,l=p.length;o<l;o++)t.push([]);for(o=0,l=p.length;o<l;o++)for(r=(i=p[o]).firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase()){for(u=1*r.getAttribute("colspan"),d=1*r.getAttribute("rowspan"),u=u&&0!==u&&1!==u?u:1,d=d&&0!==d&&1!==d?d:1,s=0,a=t[o];a[s];)s++;for(c=s,h=1===u,a=0;a<u;a++)for(s=0;s<d;s++)t[o+s][c+a]={cell:r,unique:h},t[o+s].nTr=i}r=r.nextSibling}}function H(e,t,n){var i=[];n||(n=e.aoHeader,t&&U(n=[],t)),t=0;for(var r=n.length;t<r;t++)for(var o=0,s=n[t].length;o<s;o++)!n[t][o].unique||i[o]&&e.bSortCellsTop||(i[o]=n[t][o].cell);return i}function B(t,n,i){if(Me(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var r={},o=/(.*?)\[\]$/;e.each(n,function(e,t){var n=t.name.match(o);n?(r[n=n[0]]||(r[n]=[]),r[n].push(t.value)):r[t.name]=t.value}),n=r}var s,a=t.ajax,l=t.oInstance,c=function(e){Me(t,null,"xhr",[t,e,t.jqXHR]),i(e)};if(e.isPlainObject(a)&&a.data){var u="function"==typeof(s=a.data)?s(n,t):s;n="function"==typeof s&&u?u:e.extend(!0,n,u),delete a.data}u={data:n,success:function(e){var n=e.error||e.sError;n&&ke(t,0,n),t.json=e,c(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(n,i){var r=Me(t,null,"xhr",[t,null,t.jqXHR]);-1===e.inArray(!0,r)&&("parsererror"==i?ke(t,0,"Invalid JSON response",1):4===n.readyState&&ke(t,0,"Ajax error",7)),de(t,!1)}},t.oAjaxData=n,Me(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(l,t.sAjaxSource,e.map(n,function(e,t){return{name:t,value:e}}),c,t):t.sAjaxSource||"string"==typeof a?t.jqXHR=e.ajax(e.extend(u,{url:a||t.sAjaxSource})):"function"==typeof a?t.jqXHR=a.call(l,n,c,t):(t.jqXHR=e.ajax(e.extend(u,a)),a.data=s)}function V(e){return!e.bAjaxDataGet||(e.iDraw++,de(e,!0),B(e,W(e),function(t){z(e,t)}),!1)}function W(t){var n,i,r,o,s=t.aoColumns,a=s.length,l=t.oFeatures,c=t.oPreviousSearch,u=t.aoPreSearchCols,d=[],h=_e(t);n=t._iDisplayStart,i=!1!==l.bPaginate?t._iDisplayLength:-1;var p=function(e,t){d.push({name:e,value:t})};p("sEcho",t.iDraw),p("iColumns",a),p("sColumns",rt(s,"sName").join(",")),p("iDisplayStart",n),p("iDisplayLength",i);var f={draw:t.iDraw,columns:[],order:[],start:n,length:i,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<a;n++)o=u[n],f.columns.push({data:i="function"==typeof(r=s[n]).mData?"function":r.mData,name:r.sName,searchable:r.bSearchable,orderable:r.bSortable,search:{value:o.sSearch,regex:o.bRegex}}),p("mDataProp_"+n,i),l.bFilter&&(p("sSearch_"+n,o.sSearch),p("bRegex_"+n,o.bRegex),p("bSearchable_"+n,r.bSearchable)),l.bSort&&p("bSortable_"+n,r.bS
1ortable);return l.bFilter&&(p("sSearch",c.sSearch),p("bRegex",c.bRegex)),l.bSort&&(e.each(h,function(e,t){f.order.push({column:t.col,dir:t.dir}),p("iSortCol_"+e,t.col),p("sSortDir_"+e,t.dir)}),p("iSortingCols",h.length)),null===(s=Ge.ext.legacy.ajax)?t.sAjaxSource?d:f:s?d:f}function z(e,t){var n=q(e,t),r=t.sEcho!==i?t.sEcho:t.draw,o=t.iTotalRecords!==i?t.iTotalRecords:t.recordsTotal,s=t.iTotalDisplayRecords!==i?t.iTotalDisplayRecords:t.recordsFiltered;if(r){if(1*r<e.iDraw)return;e.iDraw=1*r}for(D(e),e._iRecordsTotal=parseInt(o,10),e._iRecordsDisplay=parseInt(s,10),r=0,o=n.length;r<o;r++)_(e,n[r]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,L(e),e._bInitComplete||oe(e,t),e.bAjaxDataGet=!0,de(e,!1)}function q(t,n){var r=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==i?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?C(r)(n):n}function G(t){var i=t.sTableId,r=t.oLanguage,o=t.oPreviousSearch,s=t.aanFeatures,a='<input type="search" class="'+(c=t.oClasses).sFilterInput+'"/>',l=(l=r.sSearch).match(/_INPUT_/)?l.replace("_INPUT_",a):l+a,c=e("<div/>",{id:s.f?null:i+"_filter",class:c.sFilter}).append(e("<label/>").append(l)),u=(s=function(){var e=this.value?this.value:"";e!=o.sSearch&&(Y(t,{sSearch:e,bRegex:o.bRegex,bSmart:o.bSmart,bCaseInsensitive:o.bCaseInsensitive}),t._iDisplayStart=0,L(t))},a=null!==t.searchDelay?t.searchDelay:"ssp"===Fe(t)?400:0,e("input",c).val(o.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",a?mt(s,a):s).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",i));return e(t.nTable).on("search.dt.DT",function(e,i){if(t===i)try{u[0]!==n.activeElement&&u.val(o.sSearch)}catch(e){}}),c[0]}function Y(e,t,n){var r=e.oPreviousSearch,o=e.aoPreSearchCols,s=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive};if(y(e),"ssp"!=Fe(e)){for(J(e,t.sSearch,n,t.bEscapeRegex!==i?!t.bEscapeRegex:t.bRegex,t.bSmart,t.bCaseInsensitive),s(t),t=0;t<o.length;t++)K(e,o[t].sSearch,t,o[t].bEscapeRegex!==i?!o[t].bEscapeRegex:o[t].bRegex,o[t].bSmart,o[t].bCaseInsensitive);$(e)}else s(t);e.bFiltered=!0,Me(e,null,"search",[e])}function $(t){for(var n,i,r=Ge.ext.search,o=t.aiDisplay,s=0,a=r.length;s<a;s++){for(var l=[],c=0,u=o.length;c<u;c++)r[s](t,(n=t.aoData[i=o[c]])._aFilterData,i,n._aData,c)&&l.push(i);o.length=0,e.merge(o,l)}}function K(e,t,n,i,r,o){if(""!==t){var s=[],a=e.aiDisplay;for(i=X(t,i,r,o),r=0;r<a.length;r++)i.test(t=e.aoData[a[r]]._aFilterData[n])&&s.push(a[r]);e.aiDisplay=s}}function J(e,t,n,i,r,o){i=X(t,i,r,o),o=e.oPreviousSearch.sSearch;var s,a=e.aiDisplayMaster;if(r=[],0!==Ge.ext.search.length&&(n=!0),s=Q(e),0>=t.length)e.aiDisplay=a.slice();else{for((s||n||o.length>t.length||0!==t.indexOf(o)||e.bSorted)&&(e.aiDisplay=a.slice()),t=e.aiDisplay,n=0;n<t.length;n++)i.test(e.aoData[t[n]]._sFilterRow)&&r.push(t[n]);e.aiDisplay=r}}function X(t,n,i,r){return t=n?t:ht(t),i&&(t="^(?=.*?"+e.map(t.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$"),RegExp(t,r?"i":"")}function Q(e){var t,n,i,r,o,s,a,l,c=e.aoColumns,u=Ge.ext.type.search;for(t=!1,n=0,r=e.aoData.length;n<r;n++)if(!(l=e.aoData[n])._aFilterData){for(s=[],i=0,o=c.length;i<o;i++)(t=c[i]).bSearchable?(a=w(e,n,i,"filter"),u[t.sType]&&(a=u[t.sType](a)),null===a&&(a=""),"string"!=typeof a&&a.toString&&(a=a.toString())):a="",a.indexOf&&-1!==a.indexOf("&")&&(pt.innerHTML=a,a=ft?pt.textContent:pt.innerText),a.replace&&(a=a.replace(/[\r\n]/g,"")),s.push(a);l._aFilterData=s,l._sFilterRow=s.join("  "),t=!0}return t}function Z(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function ee(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function te(t){var n=t.sTableId,i=t.aanFeatures.i,r=e("<div/>",{class:t.oClasses.sInfo,id:i?null:n+"_info"});return i||(t.aoDrawCallback.push({fn:ne,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),r[0]}function ne(t){var n=t.aanFeatures.i;if(0!==n.length){var i=t.oLanguage,r=t._iDisplayStart+1,o=t.fnDisplayEnd(),s=t.fnRecordsTotal(),a=t.fnRecordsDisplay(),l=a?i.sInfo:i.sInfoEmpty;a!==s&&(l+=" "+i.sInfoFiltered),l=ie(t,l+=i.sInfoPostFix),null!==(i=i.fnInfoCallback)&&(l=i.call(t.oInstance,t,r,o,s,a,l)),e(n).html(l)}}function ie(e,t){var n=e.fnFormatNumber,i=e._iDisplayStart+1,r=e._iDisplayLength,o=e.fnRecordsDisplay(),s=-1===r;return t.replace(/_START_/g,n.call(e,i)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,s?1:Math.ceil(i/r))).replace(/_PAGES_/g,n.call(e,s?1:Math.ceil(o/r)))}function re(e){var t,n,i,r=e.iInitDisplayStart,o=e.aoColumns;n=e.oFeatures;var s=e.bDeferLoading;if(e.bInitialised){for(F(e),P(e),M(e,e.aoHeader),M(e,e.aoFooter),de(e,!0),n.bAutoWidth&&ge(e),t=0,n=o.length;t<n;t++)(i=o[t]).sWidth&&(i.nTh.style.width=be(i.sWidth));Me(e,null,"preInit",[e]),j(e),("ssp"!=(o=Fe(e))||s)&&("ajax"==o?B(e,[],function(n){var i=q(e,n);for(t=0;t<i.length;t++)_(e,i[t]);e.iInitDisplayStart=r,j(e),de(e,!1),oe(e,n)}):(de(e,!1),oe(e)))}else setTimeout(function(){re(e)},200)}function oe(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&p(e),Me(e,null,"plugin-init",[e,t]),Me(e,"aoInitComplete","
1init",[e,t])}function se(e,t){var n=parseInt(t,10);e._iDisplayLength=n,Le(e),Me(e,null,"length",[e,n])}function ae(t){for(var n=t.oClasses,i=t.sTableId,r=(s=e.isArray((o=t.aLengthMenu)[0]))?o[0]:o,o=s?o[1]:o,s=e("<select/>",{name:i+"_length","aria-controls":i,class:n.sLengthSelect}),a=0,l=r.length;a<l;a++)s[0][a]=new Option("number"==typeof o[a]?t.fnFormatNumber(o[a]):o[a],r[a]);var c=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(c[0].id=i+"_length"),c.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",s[0].outerHTML)),e("select",c).val(t._iDisplayLength).on("change.DT",function(){se(t,e(this).val()),L(t)}),e(t.nTable).on("length.dt.DT",function(n,i,r){t===i&&e("select",c).val(r)}),c[0]}function le(t){var n=Ge.ext.pager[o=t.sPaginationType],i="function"==typeof n,r=function(e){L(e)},o=e("<div/>").addClass(t.oClasses.sPaging+o)[0],s=t.aanFeatures;return i||n.fnInit(t,o,r),s.p||(o.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(i){var t,o=e._iDisplayStart,a=e._iDisplayLength,l=e.fnRecordsDisplay(),c=(o=(c=-1===a)?0:Math.ceil(o/a),a=c?1:Math.ceil(l/a),l=n(o,a),0);for(t=s.p.length;c<t;c++)je(e,"pageButton")(e,s.p[c],c,l,o,a)}else n.fnUpdate(e,r)},sName:"pagination"})),o}function ce(e,t,n){var i=e._iDisplayStart,r=e._iDisplayLength,o=e.fnRecordsDisplay();return 0===o||-1===r?i=0:"number"==typeof t?(i=t*r)>o&&(i=0):"first"==t?i=0:"previous"==t?0>(i=0<=r?i-r:0)&&(i=0):"next"==t?i+r<o&&(i+=r):"last"==t?i=Math.floor((o-1)/r)*r:ke(e,0,"Unknown paging action: "+t,5),t=e._iDisplayStart!==i,e._iDisplayStart=i,t&&(Me(e,null,"page",[e]),n&&L(e)),t}function ue(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function de(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),Me(t,null,"processing",[t,n])}function he(t){(d=e(t.nTable)).attr("role","grid");var n=t.oScroll;if(""===n.sX&&""===n.sY)return t.nTable;var i=n.sX,r=n.sY,o=t.oClasses,s=d.children("caption"),a=s.length?s[0]._captionSide:null,l=e(d[0].cloneNode(!1)),c=e(d[0].cloneNode(!1)),u=d.children("tfoot");u.length||(u=null),l=e("<div/>",{class:o.sScrollWrapper}).append(e("<div/>",{class:o.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?i?be(i):null:"100%"}).append(e("<div/>",{class:o.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===a?s:null).append(d.children("thead"))))).append(e("<div/>",{class:o.sScrollBody}).css({position:"relative",overflow:"auto",width:i?be(i):null}).append(d)),u&&l.append(e("<div/>",{class:o.sScrollFoot}).css({overflow:"hidden",border:0,width:i?i?be(i):null:"100%"}).append(e("<div/>",{class:o.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append("bottom"===a?s:null).append(d.children("tfoot")))));var d,h=(d=l.children())[0],p=(o=d[1],u?d[2]:null);return i&&e(o).on("scroll.DT",function(){var e=this.scrollLeft;h.scrollLeft=e,u&&(p.scrollLeft=e)}),e(o).css(r&&n.bCollapse?"max-height":"height",r),t.nScrollHead=h,t.nScrollBody=o,t.nScrollFoot=p,t.aoDrawCallback.push({fn:pe,sName:"scrolling"}),l[0]}function pe(t){var n,r,o,s,a,l,c=(h=t.oScroll).sX,u=h.sXInner,d=h.sY,h=h.iBarWidth,g=e(t.nScrollHead),m=g[0].style,v=(n=g.children("div"))[0].style,y=n.children("table"),b=e(n=t.nScrollBody),_=n.style,S=e(t.nScrollFoot).children("div"),w=S.children("table"),E=e(t.nTHead),T=e(t.nTable),C=T[0],I=C.style,R=t.nTFoot?e(t.nTFoot):null,D=t.oBrowser,A=D.bScrollOversize,k=rt(t.aoColumns,"nTh"),O=[],x=[],N=[],P=[],M=function(e){(e=e.style).paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0};t.scrollBarVis!==(o=n.scrollHeight>n.clientHeight)&&t.scrollBarVis!==i?(t.scrollBarVis=o,p(t)):(t.scrollBarVis=o,T.children("thead, tfoot").remove(),R&&(s=R.clone().prependTo(T),r=R.find("tr"),s=s.find("tr")),a=E.clone().prependTo(T),E=E.find("tr"),o=a.find("tr"),a.find("th, td").removeAttr("tabindex"),c||(_.width="100%",g[0].style.width="100%"),e.each(H(t,a),function(e,n){l=f(t,e),n.style.width=t.aoColumns[l].sWidth}),R&&fe(function(e){e.style.width=""}
1,s),g=T.outerWidth(),""===c?(I.width="100%",A&&(T.find("tbody").height()>n.offsetHeight||"scroll"==b.css("overflow-y"))&&(I.width=be(T.outerWidth()-h)),g=T.outerWidth()):""!==u&&(I.width=be(u),g=T.outerWidth()),fe(M,o),fe(function(t){N.push(t.innerHTML),O.push(be(e(t).css("width")))},o),fe(function(t,n){-1!==e.inArray(t,k)&&(t.style.width=O[n])},E),e(o).height(0),R&&(fe(M,s),fe(function(t){P.push(t.innerHTML),x.push(be(e(t).css("width")))},s),fe(function(e,t){e.style.width=x[t]},r),e(s).height(0)),fe(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+N[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=O[t]},o),R&&fe(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+P[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=x[t]},s),T.outerWidth()<g?(r=n.scrollHeight>n.offsetHeight||"scroll"==b.css("overflow-y")?g+h:g,A&&(n.scrollHeight>n.offsetHeight||"scroll"==b.css("overflow-y"))&&(I.width=be(r-h)),(""===c||""!==u)&&ke(t,1,"Possible column misalignment",6)):r="100%",_.width=be(r),m.width=be(r),R&&(t.nScrollFoot.style.width=be(r)),!d&&A&&(_.height=be(C.offsetHeight+h)),c=T.outerWidth(),y[0].style.width=be(c),v.width=be(c),u=T.height()>n.clientHeight||"scroll"==b.css("overflow-y"),v[d="padding"+(D.bScrollbarLeft?"Left":"Right")]=u?h+"px":"0px",R&&(w[0].style.width=be(c),S[0].style.width=be(c),S[0].style[d]=u?h+"px":"0px"),T.children("colgroup").insertBefore(T.children("thead")),b.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(n.scrollTop=0))}function fe(e,t,n){for(var i,r,o=0,s=0,a=t.length;s<a;){for(i=t[s].firstChild,r=n?n[s].firstChild:null;i;)1===i.nodeType&&(n?e(i,r,o):e(i,o),o++),i=i.nextSibling,r=n?r.nextSibling:null;s++}}function ge(n){var i,r,o=n.nTable,s=n.aoColumns,a=(S=n.oScroll).sY,l=S.sX,c=S.sXInner,u=s.length,d=v(n,"bVisible"),h=e("th",n.nTHead),g=o.getAttribute("width"),y=o.parentNode,b=!1,_=n.oBrowser,S=_.bScrollOversize;for((i=o.style.width)&&-1!==i.indexOf("%")&&(g=i),i=0;i<d.length;i++)null!==(r=s[d[i]]).sWidth&&(r.sWidth=me(r.sWidthOrig,y),b=!0);if(S||!b&&!l&&!a&&u==m(n)&&u==h.length)for(i=0;i<u;i++)null!==(d=f(n,i))&&(s[d].sWidth=be(h.eq(i).width()));else{(u=e(o).clone().css("visibility","hidden").removeAttr("id")).find("tbody tr").remove();var w=e("<tr/>").appendTo(u.find("tbody"));for(u.find("thead, tfoot").remove(),u.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone()),u.find("tfoot th, tfoot td").css("width",""),h=H(n,u.find("thead")[0]),i=0;i<d.length;i++)h[i].style.width=null!==(r=s[d[i]]).sWidthOrig&&""!==r.sWidthOrig?be(r.sWidthOrig):"",r.sWidthOrig&&l&&e(h[i]).append(e("<div/>").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(i=0;i<d.length;i++)r=s[b=d[i]],e(ve(n,b)).clone(!1).append(r.sContentPadding).appendTo(w);for(e("[name]",u).removeAttr("name"),r=e("<div/>").css(l||a?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(u).appendTo(y),l&&c?u.width(c):l?(u.css("width","auto"),u.removeAttr("width"),u.width()<y.clientWidth&&g&&u.width(y.clientWidth)):a?u.width(y.clientWidth):g&&u.width(g),i=a=0;i<d.length;i++)c=(y=e(h[i])).outerWidth()-y.width(),a+=y=_.bBounding?Math.ceil(h[i].getBoundingClientRect().width):y.outerWidth(),s[d[i]].sWidth=be(y-c);o.style.width=be(a),r.remove()}g&&(o.style.width=be(g)),!g&&!l||n._reszEvt||(o=function(){e(t).on("resize.DT-"+n.sInstance,mt(function(){p(n)}))},S?setTimeout(o,1e3):o(),n._reszEvt=!0)}function me(t,i){if(!t)return 0;var r=e("<div/>").css("width",be(t)).appendTo(i||n.body),o=r[0].offsetWidth;return r.remove(),o}function ve(t,n){var i=ye(t,n);if(0>i)return null;var r=t.aoData[i];return r.nTr?r.anCells[n]:e("<td/>").html(w(t,i,n,"display"))[0]}function ye(e,t){for(var n,i=-1,r=-1,o=0,s=e.aoData.length;o<s;o++)(n=(n=(n=w(e,o,t,"display")+"").replace(gt,"")).replace(/&nbsp;/g," ")).length>i&&(i=n.length,r=o);return r}function be(e){return null===e?"0px":"number"==typeof e?0>e?"0px":e+"px":e.match(/\d$/)?e+"px":e}function _e(t){var n,r,o,s,a,l,c=[],u=t.aoColumns;r=e.isPlainObject(n=t.aaSortingFixed);var d=[];for(o=function(t){t.length&&!e.isArray(t[0])?d.push(t):e.merge(d,t)}
1,e.isArray(n)&&o(n),r&&n.pre&&o(n.pre),o(t.aaSorting),r&&n.post&&o(n.post),t=0;t<d.length;t++)for(n=0,r=(o=u[l=d[t][0]].aDataSort).length;n<r;n++)a=u[s=o[n]].sType||"string",d[t]._idx===i&&(d[t]._idx=e.inArray(d[t][1],u[s].asSorting)),c.push({src:l,col:s,dir:d[t][1],index:d[t]._idx,type:a,formatter:Ge.ext.type.order[a+"-pre"]});return c}function Se(e){var t,n,i,r,o=[],s=Ge.ext.type.order,a=e.aoData,l=0,c=e.aiDisplayMaster;for(y(e),t=0,n=(r=_e(e)).length;t<n;t++)(i=r[t]).formatter&&l++,Ie(e,i.col);if("ssp"!=Fe(e)&&0!==r.length){for(t=0,n=c.length;t<n;t++)o[c[t]]=t;c.sort(l===r.length?function(e,t){var n,i,s,l,c=r.length,u=a[e]._aSortData,d=a[t]._aSortData;for(s=0;s<c;s++)if(0!=(n=(n=u[(l=r[s]).col])<(i=d[l.col])?-1:n>i?1:0))return"asc"===l.dir?n:-n;return(n=o[e])<(i=o[t])?-1:n>i?1:0}:function(e,t){var n,i,l,c,u=r.length,d=a[e]._aSortData,h=a[t]._aSortData;for(l=0;l<u;l++)if(n=d[(c=r[l]).col],i=h[c.col],0!==(n=(c=s[c.type+"-"+c.dir]||s["string-"+c.dir])(n,i)))return n;return(n=o[e])<(i=o[t])?-1:n>i?1:0})}e.bSorted=!0}function we(e){for(var t,n,i=e.aoColumns,r=_e(e),o=(e=e.oLanguage.oAria,0),s=i.length;o<s;o++){var a=(n=i[o]).asSorting;t=n.sTitle.replace(/<.*?>/g,"");var l=n.nTh;l.removeAttribute("aria-sort"),n.bSortable&&(0<r.length&&r[0].col==o?(l.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),n=a[r[0].index+1]||a[0]):n=a[0],t+="asc"===n?e.sSortAscending:e.sSortDescending),l.setAttribute("aria-label",t)}}function Ee(t,n,r,o){var s=t.aaSorting,a=t.aoColumns[n].asSorting,l=function(t,n){var r=t._idx;return r===i&&(r=e.inArray(t[1],a)),r+1<a.length?r+1:n?null:0};"number"==typeof s[0]&&(s=t.aaSorting=[s]),r&&t.oFeatures.bSortMulti?-1!==(r=e.inArray(n,rt(s,"0")))?(null===(n=l(s[r],!0))&&1===s.length&&(n=0),null===n?s.splice(r,1):(s[r][1]=a[n],s[r]._idx=n)):(s.push([n,a[0],0]),s[s.length-1]._idx=0):s.length&&s[0][0]==n?(n=l(s[0]),s.length=1,s[0][1]=a[n],s[0]._idx=n):(s.length=0,s.push([n,a[0]]),s[0]._idx=0),j(t),"function"==typeof o&&o(t)}function Te(e,t,n,i){var r=e.aoColumns[n];Ne(t,{},function(t){!1!==r.bSortable&&(e.oFeatures.bProcessing?(de(e,!0),setTimeout(function(){Ee(e,n,t.shiftKey,i),"ssp"!==Fe(e)&&de(e,!1)},0)):Ee(e,n,t.shiftKey,i))})}function Ce(t){var n,i=t.aLastSort,r=t.oClasses.sSortColumn,o=_e(t),s=t.oFeatures;if(s.bSort&&s.bSortClasses){for(s=0,n=i.length;s<n;s++)e(rt(t.aoData,"anCells",i[s].src)).removeClass(r+(2>s?s+1:3));for(s=0,n=o.length;s<n;s++)e(rt(t.aoData,"anCells",o[s].src)).addClass(r+(2>s?s+1:3))}t.aLastSort=o}function Ie(e,t){var n,i=e.aoColumns[t],r=Ge.ext.order[i.sSortDataType];r&&(n=r.call(e.oInstance,e,t,g(e,t)));for(var o,s=Ge.ext.type.order[i.sType+"-pre"],a=0,l=e.aoData.length;a<l;a++)(i=e.aoData[a])._aSortData||(i._aSortData=[]),(!i._aSortData[t]||r)&&(o=r?n[a]:w(e,a,t,"sort"),i._aSortData[t]=s?s(o):o)}function Re(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Z(t.oPreviousSearch),columns:e.map(t.aoColumns,function(e,n){return{visible:e.bVisible,search:Z(t.aoPreSearchCols[n])}})};Me(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function De(t,n,r){var o,s,a=t.aoColumns;if(n=function(n){if(n&&n.time){var l=Me(t,"aoStateLoadParams","stateLoadParams",[t,n]);if(-1===e.inArray(!1,l)&&!(0<(l=t.iStateDuration)&&n.time<+new Date-1e3*l||n.columns&&a.length!==n.columns.length)){if(t.oLoadedState=e.extend(!0,{},n),n.start!==i&&(t._iDisplayStart=n.start,t.iInitDisplayStart=n.start),n.length!==i&&(t._iDisplayLength=n.length),n.order!==i&&(t.aaSorting=[],e.each(n.order,function(e,n){t.aaSorting.push(n[0]>=a.length?[0,n[1]]:n)})),n.search!==i&&e.extend(t.oPreviousSearch,ee(n.search)),n.columns)for(o=0,s=n.columns.length;o<s;o++)(l=n.columns[o]).visible!==i&&(a[o].bVisible=l.visible),l.search!==i&&e.extend(t.aoPreSearchCols[o],ee(l.search));Me(t,"aoStateLoaded","stateLoaded",[t,n])}}r()},t.oFeatures.bStateSave){var l=t.fnStateLoadCallback.call(t.oInstance,t,n);l!==i&&n(l)}else r()}function Ae(t){var n=Ge.settings;return-1!==(t=e.inArray(t,rt(n,"nTable")))?n[t]:null}function ke(e,n,i,r){if(i="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+i,r&&(i+=". For more information about this error, please see http://datatables.net/tn/"+r),n)t.console&&console.log&&console.log(i);else if(n=(n=Ge.ext).sErrMode||n.errMode,e&&Me(e,null,"error",[e,r,i]),"alert"==n)alert(i);else{if("throw"==n)throw Error(i);"function"==typeof n&&n(e,r,i)}}function Oe(t,n,r,o){e.isArray(r)?e.each(r,function(i,r){e.isArray(r)?Oe(t,n,r[0],r[1]):Oe(t,n,r)}):(o===i&&(o=r),n[r]!==i&&(t[o]=n[r]))}function xe(t,n,i){var r,o;for(o in n)n.hasOwnProperty(o)&&(e.isPlainObject(r=n[o])?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],r)):t[o]=i&&"data"!==o&&"aaData"!==o&&e.isArray(r)?r.slice():r);return t}function Ne(t,n,i){e(t).on("click.DT",n,function(n){e(t).blur(),i(n)}).on("keypress.DT",n,function(e){13===e.which&&(e.preventDefault(),i(e))}).on("selectstart.DT",function(){return!1})}function Pe(e,t,n,i){n&&e[t].push({fn:n,sName:i})}function Me(t,n,i,r){var o=[];return n&&(o=e.map(t[n].slice().reverse(),function(e){return e.fn.apply(t.oInstance,r)})),null!==i&&(n=e.Event(i+".dt"),e(t.nTable).trigger(n,r),o.push(n.result)),o}function Le(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),i=e._iDisplayLength;t>=n&&(t=n-i),t-=t%i,(-1===i||0>t)&&(t=0),e._iDisplayStart=t}function je(t,n){var i=t.renderer,r=Ge.ext.renderer[n];return e.isPlainObject(i)&&i[n]?r[i[n]]||r._:"string"==typeof i&&r[i]||r._}function Fe(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function Ue(e,t){var n=[],i=(n=Dt.numbers_length,Math.floor(n/2));return t<=n?n=st(0,t):e<=i?((n=st(0,n-2)).push("ellipsis"),n.push(t-1)):(e>
1=t-1-i?n=st(t-(n-2),t):((n=st(e-i+2,e+i-1)).push("ellipsis"),n.push(t-1)),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function He(t){e.each({num:function(e){return At(e,t)},"num-fmt":function(e){return At(e,t,Qe)},"html-num":function(e){return At(e,t,Ke)},"html-num-fmt":function(e){return At(e,t,Ke,Qe)}},function(e,n){Ve.type.order[e+t+"-pre"]=n,e.match(/^html\-/)&&(Ve.type.search[e+t]=Ve.type.search.html)})}function Be(e){return function(){var t=[Ae(this[Ge.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Ge.ext.internal[e].apply(this,t)}}var Ve,We,ze,qe,Ge=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new We(e?Ae(this[Ve.iApiIndex]):this)},this.fnAddData=function(t,n){var r=this.api(!0),o=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);return(n===i||n)&&r.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===i||e?t.draw(!1):(""!==r.sX||""!==r.sY)&&pe(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===i||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),o=(e=r.rows(e)).settings()[0],s=o.aoData[e[0][0]];return e.remove(),t&&t.call(this,o,s),(n===i||n)&&r.draw(),s},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,r,o,s){o=this.api(!0),null===t||t===i?o.search(e,n,r,s):o.column(t).search(e,n,r,s),o.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==i){var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==i||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==i?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();return"TR"==n?t.row(e).index():"TD"==n||"TH"==n?[(e=t.cell(e).index()).row,e.columnVisible,e.column]:null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===i||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){e=this.api(!0).column(e).visible(t),(n===i||n)&&e.columns.adjust().draw()},this.fnSettings=function(){return Ae(this[Ve.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,o){var s=this.api(!0);return n===i||null===n?s.row(t).data(e):s.cell(t,n).data(e),(o===i||o)&&s.columns.adjust(),(r===i||r)&&s.draw(),0},this.fnVersionCheck=Ve.fnVersionCheck;var n=this,r=t===i,u=this.length;for(var p in r&&(t={}),this.oApi=this.internal=Ve.internal,Ge.ext.internal)p&&(this[p]=Be(p));return this.each(function(){var p,f={},g=1<u?xe(f,t,!0):t,m=0,v=(f=this.getAttribute("id"),!1),y=Ge.defaults,w=e(this);if("table"!=this.nodeName.toLowerCase())ke(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{a(y),l(y.column),o(y,y,!0),o(y.column,y.column,!0),o(y,e.extend(g,w.data()));var E=Ge.settings;for(m=0,p=E.length;m<p;m++){var T=E[m];if(T.nTable==this||T.nTHead&&T.nTHead.parentNode==this||T.nTFoot&&T.nTFoot.parentNode==this){if(r||(g.bRetrieve!==i?g.bRetrieve:y.bRetrieve))return T.oInstance;if(g.bDestroy!==i?g.bDestroy:y.bDestroy){T.oInstance.fnDestroy();break}return void ke(T,0,"Cannot reinitialise DataTable",3)}if(T.sTableId==this.id){E.splice(m,1);break}}null!==f&&""!==f||(this.id=f="DataTables_Table_"+Ge.ext._unique++);var I=e.extend(!0,{},Ge.models.oSettings,{sDestroyWidth:w[0].style.width,sInstance:f,sTableId:f});I.nTable=this,I.oApi=n.internal,I.oInit=g,E.push(I),I.oInstance=1===n.length?n:w.dataTable(),a(g),s(g.oLanguage),g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=e.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]),g=xe(e.extend(!0,{},y),g),Oe(I.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" ")),Oe
1(I,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),Oe(I.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),Oe(I.oLanguage,g,"fnInfoCallback"),Pe(I,"aoDrawCallback",g.fnDrawCallback,"user"),Pe(I,"aoServerParams",g.fnServerParams,"user"),Pe(I,"aoStateSaveParams",g.fnStateSaveParams,"user"),Pe(I,"aoStateLoadParams",g.fnStateLoadParams,"user"),Pe(I,"aoStateLoaded",g.fnStateLoaded,"user"),Pe(I,"aoRowCallback",g.fnRowCallback,"user"),Pe(I,"aoRowCreatedCallback",g.fnCreatedRow,"user"),Pe(I,"aoHeaderCallback",g.fnHeaderCallback,"user"),Pe(I,"aoFooterCallback",g.fnFooterCallback,"user"),Pe(I,"aoInitComplete",g.fnInitComplete,"user"),Pe(I,"aoPreDrawCallback",g.fnPreDrawCallback,"user"),I.rowIdFn=C(g.rowId),c(I);var R=I.oClasses;e.extend(R,Ge.ext.classes,g.oClasses),w.addClass(R.sTable),I.iInitDisplayStart===i&&(I.iInitDisplayStart=g.iDisplayStart,I._iDisplayStart=g.iDisplayStart),null!==g.iDeferLoading&&(I.bDeferLoading=!0,f=e.isArray(g.iDeferLoading),I._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,I._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var D=I.oLanguage;e.extend(!0,D,g.oLanguage),D.sUrl&&(e.ajax({dataType:"json",url:D.sUrl,success:function(t){s(t),o(y.oLanguage,t),e.extend(!0,D,t),re(I)},error:function(){re(I)}}),v=!0),null===g.asStripeClasses&&(I.asStripeClasses=[R.sStripeOdd,R.sStripeEven]),f=I.asStripeClasses;var A=w.children("tbody").find("tr").eq(0);if(-1!==e.inArray(!0,e.map(f,function(e){return A.hasClass(e)}))&&(e("tbody tr",this).removeClass(f.join(" ")),I.asDestroyStripes=f.slice()),f=[],0!==(E=this.getElementsByTagName("thead")).length&&(U(I.aoHeader,E[0]),f=H(I)),null===g.aoColumns)for(E=[],m=0,p=f.length;m<p;m++)E.push(null);else E=g.aoColumns;for(m=0,p=E.length;m<p;m++)d(I,f?f[m]:null);if(b(I,g.aoColumnDefs,E,function(e,t){h(I,e,t)}),A.length){var k=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};e(A[0]).children("th, td").each(function(e,t){var n=I.aoColumns[e];if(n.mData===e){var r=k(t,"sort")||k(t,"order"),o=k(t,"filter")||k(t,"search");null===r&&null===o||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:i,type:null!==r?e+".@data-"+r:i,filter:null!==o?e+".@data-"+o:i},h(I,e))}})}var O=I.oFeatures;f=function(){if(g.aaSorting===i)for(m=0,p=(t=I.aaSorting).length;m<p;m++)t[m][1]=I.aoColumns[m].asSorting[0];Ce(I),O.bSort&&Pe(I,"aoDrawCallback",function(){if(I.bSorted){var t=_e(I),n={};e.each(t,function(e,t){n[t.src]=t.dir}),Me(I,null,"order",[I,t,n]),we(I)}}),Pe(I,"aoDrawCallback",function(){(I.bSorted||"ssp"===Fe(I)||O.bDeferRender)&&Ce(I)},"sc");var t=w.children("caption").each(function(){this._captionSide=e(this).css("caption-side")}),n=w.children("thead");if(0===n.length&&(n=e("<thead/>").appendTo(w)),I.nTHead=n[0],0===(n=w.children("tbody")).length&&(n=e("<tbody/>").appendTo(w)),I.nTBody=n[0],0===(n=w.children("tfoot")).length&&t.length>0&&(""!==I.oScroll.sX||""!==I.oScroll.sY)&&(n=e("<tfoot/>").appendTo(w)),0===n.length||0===n.children().length?w.addClass(R.sNoFooter):n.length>0&&(I.nTFoot=n[0],U(I.aoFooter,I.nTFoot)),g.aaData)for(m=0;m<g.aaData.length;m++)_(I,g.aaData[m]);else(I.bDeferLoading||"dom"==Fe(I))&&S(I,e(I.nTBody).children("tr"));I.aiDisplay=I.aiDisplayMaster.slice(),I.bInitialised=!0,!1===v&&re(I)},g.bStateSave?(O.bStateSave=!0,Pe(I,"aoDrawCallback",Re,"state_save"),De(I,g,f)):f()}}),n=null,this},Ye={},$e=/[\r\n]/g,Ke=/<.*?>/g,Je=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Xe=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Qe=/[',$\xa3\u20ac\xa5%\u2009\u202F\u20BD\u20a9\u20BArfk\u0243\u039e]/gi,Ze=function(e){return!e||!0===e||"-"===e},et=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},tt=function(e,t){return Ye[t]||(Ye[t]=RegExp(ht(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(Ye[t],"."):e},nt=function(e,t,n){var i="string"==typeof e;return!!Ze(e)||(t&&i&&(e=tt(e,t)),n&&i&&(e=e.replace(Qe,"")),!isNaN(parseFloat(e))&&isFinite(e))},it=function(e,t,n){return!!Ze(e)||(Ze(e)||"string"==typeof e)&&!!nt(e.replace(Ke,""),t,n)||null},rt=function(e,t,n){var r=[],o=0,s=e.length;if(n!==i)for(;o<s;o++)e[o]&&e[o][t]&&r.push(e[o][t][n]);else for(;o<s;o++)e[o]&&r.push(e[o][t]);return r},ot=function(e,t,n,r){var o=[],s=0,a=t.length;if(r!==i)for(;s<a;s++)e[t[s]][n]&&o.push(e[t[s]][n][r]);else for(;s<a;s++)o.push(e[t[s]][n]);return o},st=function(e,t){var n,r=[];t===i?(t=0,n=e):(n=t,t=e);for(var o=t;o<n;o++)r.push(o);return r},at=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&t.push(e[n]);return t},lt=function(e){var t;e:{if(!(2>e.length))for(var n=(t=e.slice().sort())[0],i=1,r=t.length;i<r;i++){if(t[i]===n){t=!1;break e}n=t[i]}t=!0}if(t)return e.slice();t=[],r=e.length;var o,s=0;i=0;e:for(;i<r;i++){for(n=e[i],o=0;o<s;o++)if(t[o]===n)continue e;t.push(n),s++}return t};Ge.util={throttle:function(e,t){var n,r,o=t!==i?t:200;return function(){var t=this,s=+new Date,a=arguments;n&&s<n+o?(clearTimeout(r),r=setTimeout(function(){n=i,e.apply(t,a)},o)):(n=s,e.apply(t,a))}},escapeRegex:function(e){return e.replace(Xe,"\\$1")}};var ct=function(e,t,n){e[t]!==i&&(e[n]=e[t])}
1,ut=/\[.*?\]$/,dt=/\(\)$/,ht=Ge.util.escapeRegex,pt=e("<div>")[0],ft=pt.textContent!==i,gt=/<.*?>/g,mt=Ge.util.throttle,vt=[],yt=Array.prototype;Ge.Api=We=function(t,n){if(!(this instanceof We))return new We(t,n);var i=[],r=function(t){(t=function(t){var n,i,r=Ge.settings,o=e.map(r,function(e){return e.nTable});return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=e.inArray(t,o))?[r[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?i=e(t):t instanceof e&&(i=t),i?i.map(function(){return-1!==(n=e.inArray(this,o))?r[n]:null}).toArray():void 0):[]}(t))&&(i=i.concat(t))};if(e.isArray(t))for(var o=0,s=t.length;o<s;o++)r(t[o]);else r(t);this.context=lt(i),n&&e.merge(this,n),this.selector={rows:null,cols:null,opts:null},We.extend(this,this,vt)},e.extend(We.prototype,{any:function(){return 0!==this.count()},concat:yt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new We(t[e],this[e]):null},filter:function(e){var t=[];if(yt.filter)t=yt.filter.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new We(this.context,t)},flatten:function(){var e=[];return new We(this.context,e.concat.apply(e,this.toArray()))},join:yt.join,indexOf:yt.indexOf||function(e,t){for(var n=t||0,i=this.length;n<i;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,r){var o,s,a,l,c,u,d,h=[],p=this.context,f=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),s=0,a=p.length;s<a;s++){var g=new We(p[s]);if("table"===t)(o=n.call(g,p[s],s))!==i&&h.push(o);else if("columns"===t||"rows"===t)(o=n.call(g,p[s],this[s],s))!==i&&h.push(o);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(d=this[s],"column-rows"===t&&(u=Et(p[s],f.opts)),l=0,c=d.length;l<c;l++)o=d[l],(o="cell"===t?n.call(g,p[s],o.row,o.column,s,l):n.call(g,p[s],o,s,l,u))!==i&&h.push(o)}return h.length||r?((t=(e=new We(p,e?h.concat.apply([],h):h)).selector).rows=f.rows,t.cols=f.cols,t.opts=f.opts,e):this},lastIndexOf:yt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(yt.map)t=yt.map.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)t.push(e.call(this,this[n],n));return new We(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:yt.pop,push:yt.push,reduce:yt.reduce||function(e,t){return u(this,e,t,0,this.length,1)},reduceRight:yt.reduceRight||function(e,t){return u(this,e,t,this.length-1,-1,-1)},reverse:yt.reverse,selector:null,shift:yt.shift,slice:function(){return new We(this.context,this)},sort:yt.sort,splice:yt.splice,toArray:function(){return yt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new We(this.context,lt(this))},unshift:yt.unshift}),We.extend=function(t,n,i){if(i.length&&n&&(n instanceof We||n.__dt_wrapper)){var r,o,s,a=function(e,t,n){return function(){var i=t.apply(e,arguments);return We.extend(i,i,n.methodExt),i}};for(r=0,o=i.length;r<o;r++)n[(s=i[r]).name]="function"==typeof s.val?a(t,s.val,s):e.isPlainObject(s.val)?{}:s.val,n[s.name].__dt_wrapper=!0,We.extend(t,n[s.name],s.propExt)}},We.register=ze=function(t,n){if(e.isArray(t))for(var i=0,r=t.length;i<r;i++)We.register(t[i],n);else{var o,s,a=t.split("."),l=vt;for(i=0,r=a.length;i<r;i++){var c;o=(s=-1!==a[i].indexOf("()"))?a[i].replace("()",""):a[i];e:{c=0;for(var u=l.length;c<u;c++)if(l[c].name===o){c=l[c];break e}c=null}c||l.push(c={name:o,val:{},methodExt:[],propExt:[]}),i===r-1?c.val=n:l=s?c.methodExt:c.propExt}}},We.registerPlural=qe=function(t,n,r){We.register(t,r),We.register(n,function(){var t=r.apply(this,arguments);return t===this?this:t instanceof We?t.length?e.isArray(t[0])?new We(t.context,t[0]):t[0]:i:t})},ze("tables()",function(t){var n;if(t){n=We;var i=this.context;if("number"==typeof t)t=[i[t]];else{var r=e.map(i,function(e){return e.nTable});t=e(r).filter(t).map(function(){var t=e.inArray(this,r);return i[t]}).toArray()}n=new n(t)}else n=this;return n}),ze("table()",function(e){var t=(e=this.tables(e)).context;return t.length?new We(t[0]):e}),qe("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),qe("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),qe("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),qe("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),qe("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),ze("draw()",function(e){return this.iterator("table",function(t){"page"===e?L(t):("string"==typeof e&&(e="full-hold"!==e),j(t,!1===e))})}),ze("page()",function(e){return e===i?this.page.info().page:this.iterator("table",function(t){ce(t,e)})}),ze("page.info()",function(){if(0===this.context.length)return i;var e=this.context[0],t=e._iDisplayStart,n=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),o=-1===n;return{page:o?0:Math.floor(t/n),pages:o?1:Math.ceil(r/n),start:t,end:e.fnDisplayEnd(),length:n,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===Fe(e)}}),ze("page.len()",function(e){return e===i?0!==this.context.length?this.context[0]._iDisplayLength:i:this.iterator("table",function(t){se(t,e)})});var bt=function(e,t,n){if(n){var i=new We(e);i.one("draw",function(){n(i.ajax.json())})}if("ssp"==Fe(e))j(e,t);else{de(e,!0);var r=e.jqXHR;r&&4!==r.readyState&&r.abort(),B(e,[],function(n){D(e);for(var i=0,r=(n=q(e,n)).length;i<r;i++)_(e,n[i]);j(e,t),de(e,!1)})}};ze("ajax.json()",function(){var e=this.context;if(0<e.length)return e[0].json}),ze("ajax.params()",function(){var e=this.context;if(0<e.length)return e[0].oAjaxData}),ze("ajax.reload()",function(e,t){return this.iterator("table",function(n){bt(n,!1===t,e)})}),ze("ajax.url()",function(t){var n=this.context;return t===i?0===n.length?i:(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.aja
1x:n.sAjaxSource:this.iterator("table",function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t})}),ze("ajax.url().load()",function(e,t){return this.iterator("table",function(n){bt(n,!1===t,e)})});var _t=function(t,n,r,o,s){var a,l,c,u,d,h,p=[];for(c=typeof n,n&&"string"!==c&&"function"!==c&&n.length!==i||(n=[n]),c=0,u=n.length;c<u;c++)for(d=0,h=(l=n[c]&&n[c].split&&!n[c].match(/[\[\(:]/)?n[c].split(","):[n[c]]).length;d<h;d++)(a=r("string"==typeof l[d]?e.trim(l[d]):l[d]))&&a.length&&(p=p.concat(a));if((t=Ve.selector[t]).length)for(c=0,u=t.length;c<u;c++)p=t[c](o,s,p);return lt(p)},St=function(t){return t||(t={}),t.filter&&t.search===i&&(t.search=t.filter),e.extend({search:"none",order:"current",page:"all"},t)},wt=function(e){for(var t=0,n=e.length;t<n;t++)if(0<e[t].length)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Et=function(t,n){var i,r,o,s=[],a=t.aiDisplay;o=t.aiDisplayMaster;var l=n.search;if(i=n.order,r=n.page,"ssp"==Fe(t))return"removed"===l?[]:st(0,o.length);if("current"==r)for(i=t._iDisplayStart,r=t.fnDisplayEnd();i<r;i++)s.push(a[i]);else if("current"==i||"applied"==i){if("none"==l)s=o.slice();else if("applied"==l)s=a.slice();else if("removed"==l){var c={};for(i=0,r=a.length;i<r;i++)c[a[i]]=null;s=e.map(o,function(e){return c.hasOwnProperty(e)?null:e})}}else if("index"==i||"original"==i)for(i=0,r=t.aoData.length;i<r;i++)"none"==l?s.push(i):(-1===(o=e.inArray(i,a))&&"removed"==l||0<=o&&"applied"==l)&&s.push(i);return s};ze("rows()",function(t,n){t===i?t="":e.isPlainObject(t)&&(n=t,t=""),n=St(n);var r=this.iterator("table",function(r){var o,s=n;return _t("row",t,function(t){var n=et(t),a=r.aoData;if(null!==n&&!s)return[n];if(o||(o=Et(r,s)),null!==n&&-1!==e.inArray(n,o))return[n];if(null===t||t===i||""===t)return o;if("function"==typeof t)return e.map(o,function(e){var n=a[e];return t(e,n._aData,n.nTr)?e:null});if(t.nodeName){var l=t._DT_CellIndex;return(n=t._DT_RowIndex)!==i?a[n]&&a[n].nTr===t?[n]:[]:l?a[l.row]&&a[l.row].nTr===t?[l.row]:[]:(n=e(t).closest("*[data-dt-row]")).length?[n.data("dt-row")]:[]}return"string"==typeof t&&"#"===t.charAt(0)&&(n=r.aIds[t.replace(/^#/,"")])!==i?[n.idx]:(n=at(ot(r.aoData,o,"nTr")),e(n).filter(t).map(function(){return this._DT_RowIndex}).toArray())},r,s)},1);return r.selector.rows=t,r.selector.opts=n,r}),ze("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||i},1)}),ze("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return ot(e.aoData,t,"_aData")},1)}),qe("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var i=t.aoData[n];return"search"===e?i._aFilterData:i._aSortData},1)}),qe("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){k(t,n,e)})}),qe("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),qe("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,i=0,r=n.length;i<r;i++)for(var o=0,s=this[i].length;o<s;o++){var a=n[i].rowIdFn(n[i].aoData[this[i][o]]._aData);t.push((!0===e?"#":"")+a)}return new We(n,t)}),qe("rows().remove()","row().remove()",function(){var e=this;return this.iterator("row",function(t,n,r){var o,s,a,l,c,u=t.aoData,d=u[n];for(u.splice(n,1),o=0,s=u.length;o<s;o++)if(c=(a=u[o]).anCells,null!==a.nTr&&(a.nTr._DT_RowIndex=o),null!==c)for(a=0,l=c.length;a<l;a++)c[a]._DT_CellIndex.row=o;A(t.aiDisplayMaster,n),A(t.aiDisplay,n),A(e[r],n,!1),0<t._iRecordsDisplay&&t._iRecordsDisplay--,Le(t),(n=t.rowIdFn(d._aData))!==i&&delete t.aIds[n]}),this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t}),this}),ze("rows.add()",function(t){var n=this.iterator("table",function(e){var n,i,r,o=[];for(i=0,r=t.length;i<r;i++)(n=t[i]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(S(e,n)[0]):o.push(_(e,n));return o},1),i=this.rows(-1);return i.pop(),e.merge(i,n),i}),ze("row()",function(e,t){return wt(this.rows(e,t))}),ze("row().data()",function(t){var n=this.context;if(t===i)return n.length&&this.length?n[0].aoData[this[0]]._aData:i;var r=n[0].aoData[this[0]];return r._aData=t,e.isArray(t)&&r.nTr.id&&I(n[0].rowId)(t,r.nTr.id),k(n[0],this[0],"data"),this}),ze("row().node()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null}),ze("row.add()",function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?S(e,t)[0]:_(e,t)});return this.row(n[0])});var Tt=function(e,t){var n=e.context;n.length&&(n=n[0].aoData[t!==i?t:e[0]])&&n._details&&(n._details.remove(),n._detailsShow=i,n._details=i)},Ct=function(e,t){var n=e.context;if(n.length&&e.length){var i=n[0].aoData[e[0]];if(i._details){(i._detailsShow=t)?i._details.insertAfter(i.nTr):i._details.detach();var r=n[0],o=new We(r),s=r.aoData;o.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),0<rt(s,"_details").length&&(o.on("draw.dt.DT_details",function(e,t){r===t&&o.rows({page:"current"}).eq(0).each(function(e){(e=s[e])._detailsShow&&e._details.insertAfter(e.nTr)})}),o.on("column-visibility.dt.DT_details",function(e,t){if(r===t)for(var n,i=m(t),o=0,a=s.length;o<a;o++)(n=s[o])._details&&n._details.children("td[colspan]").attr("colspan",i)}),o.on("destroy.dt.DT_details",function(e,t){if(r===t)for(var n=0,i=s.length;n<i;n++)s[n]._details&&Tt(o,n)}))}}};ze("row().child()",function(t,n){var r=this.context;if(t===i)return r.length&&this.length?r[0].aoData[this[0]]._details:i;if(!0===t)this.child.show();else if(!1===t)Tt(this);else if(r.length&&this.length){var o=r[0],s=(r=r[0].aoData[this[0]],[]),a=function(t,n){if(e.isArray(t)||t instanceof e)for(var i=0,r=t.length;i<r;i++)a(t[i],n);else t.nodeName&&"tr"===t.nodeName.toLowerCase()?s.push(t):(i=e("<tr><td/></tr>").addClass(n),e("td",i).addClass(n).html(t)[0].colSpan=m(o),s.push(i[0]))};a(t,n),r._details&&r._details.detach(),r._details=e(s),r._detailsShow&&r._details.insertAfter(r.nTr)}return this}),ze(["row().child.show()","row().child().show()"],function(){return Ct(this,!0),this}),ze(["row().child.hide()","row().child().hide()"],function(){return Ct(this,!1),this}),ze(["row().child.remove()","row().child().remove()"],function(){return Tt(this),this}),ze("row().child.isShown()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1});var It=/^([^:]+):(name|visIdx|visible)$/,Rt=function(e,t,n,i,r){n=[],i=0;for(var o=r.length;i<o;i++)n.push(w(e,r[i],t));return n};ze("columns()",function(t,n){t===i?t="":e.isPlainObject(t)&&(n=t,t=""),n=St(n);var r=this.iterator("table",function(i){var r=t,o=n,s=i.aoColumns,a=rt(s,"sName"),l=rt(s,"nTh");return _t("column",r,function(t){var n=et(t);if(""===t)return st(s.length);if(null!==n)return[n>
1=0?n:s.length+n];if("function"==typeof t){var r=Et(i,o);return e.map(s,function(e,n){return t(n,Rt(i,n,0,0,r),l[n])?n:null})}var c="string"==typeof t?t.match(It):"";if(c)switch(c[2]){case"visIdx":case"visible":if((n=parseInt(c[1],10))<0){var u=e.map(s,function(e,t){return e.bVisible?t:null});return[u[u.length+n]]}return[f(i,n)];case"name":return e.map(a,function(e,t){return e===c[1]?t:null});default:return[]}return t.nodeName&&t._DT_CellIndex?[t._DT_CellIndex.column]:(n=e(l).filter(t).map(function(){return e.inArray(this,l)}).toArray()).length||!t.nodeName?n:(n=e(t).closest("*[data-dt-column]")).length?[n.data("dt-column")]:[]},i,o)},1);return r.selector.cols=t,r.selector.opts=n,r}),qe("columns().header()","column().header()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),qe("columns().footer()","column().footer()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),qe("columns().data()","column().data()",function(){return this.iterator("column-rows",Rt,1)}),qe("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),qe("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,n,i,r,o){return ot(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)},1)}),qe("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,i,r){return ot(e.aoData,r,"anCells",t)},1)}),qe("columns().visible()","column().visible()",function(t,n){var r=this.iterator("column",function(n,r){if(t===i)return n.aoColumns[r].bVisible;var o,s,a,l=n.aoColumns,c=l[r],u=n.aoData;if(t!==i&&c.bVisible!==t){if(t){var d=e.inArray(!0,rt(l,"bVisible"),r+1);for(o=0,s=u.length;o<s;o++)l=u[o].anCells,(a=u[o].nTr)&&a.insertBefore(l[r],l[d]||null)}else e(rt(n.aoData,"anCells",r)).detach();c.bVisible=t,M(n,n.aoHeader),M(n,n.aoFooter),n.aiDisplay.length||e(n.nTBody).find("td[colspan]").attr("colspan",m(n)),Re(n)}});return t!==i&&(this.iterator("column",function(e,i){Me(e,null,"column-visibility",[e,i,t,n])}),(n===i||n)&&this.columns.adjust()),r}),qe("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,n){return"visible"===e?g(t,n):n},1)}),ze("columns.adjust()",function(){return this.iterator("table",function(e){p(e)},1)}),ze("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return f(n,t);if("fromData"===e||"toVisible"===e)return g(n,t)}}),ze("column()",function(e,t){return wt(this.columns(e,t))}),ze("cells()",function(t,n,r){if(e.isPlainObject(t)&&(t.row===i?(r=t,t=null):(r=n,n=null)),e.isPlainObject(n)&&(r=n,n=null),null===n||n===i)return this.iterator("table",function(n){var o,s,a,l,c,u,d,h=t,p=St(r),f=n.aoData,g=Et(n,p),m=at(ot(f,g,"anCells")),v=e([].concat.apply([],m)),y=n.aoColumns.length;return _t("cell",h,function(t){var r="function"==typeof t;if(null===t||t===i||r){for(s=[],a=0,l=g.length;a<l;a++)for(o=g[a],c=0;c<y;c++)u={row:o,column:c},r?(d=f[o],t(u,w(n,o,c),d.anCells?d.anCells[c]:null)&&s.push(u)):s.push(u);return s}return e.isPlainObject(t)?t.column!==i&&t.row!==i&&-1!==e.inArray(t.row,g)?[t]:[]:(r=v.filter(t).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray()).length||!t.nodeName?r:(d=e(t).closest("*[data-dt-row]")).length?[{row:d.data("dt-row"),column:d.data("dt-column")}]:[]},n,p)});var o,s,a,l,c,u=this.columns(n),d=this.rows(t);this.iterator("table",function(e,t){for(o=[],s=0,a=d[t].length;s<a;s++)for(l=0,c=u[t].length;l<c;l++)o.push({row:d[t][s],column:u[t][l]})},1);var h=this.cells(o,r);return e.extend(h.selector,{cols:n,rows:t,opts:r}),h}),qe("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){return(e=e.aoData[t])&&e.anCells?e.anCells[n]:i},1)}),ze("cells().data()",function(){return this.iterator("cell",function(e,t,n){return w(e,t,n)},1)}),qe("cells().cache()","cell().cache()",function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",function(t,n,i){return t.aoData[n][e][i]},1)}),qe("cells().render()","cell().render()",function(e){return this.iterator("cell",function(t,n,i){return w(t,n,i,e)},1)}),qe("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:g(e,n)}},1)}),qe("cells().invalidate()","cell().invalidate()",function(e){return this.iterator("cell",function(t,n,i){k(t,n,e,i)})}
1),ze("cell()",function(e,t,n){return wt(this.cells(e,t,n))}),ze("cell().data()",function(e){var t=this.context,n=this[0];return e===i?t.length&&n.length?w(t[0],n[0].row,n[0].column):i:(E(t[0],n[0].row,n[0].column,e),k(t[0],n[0].row,"data",n[0].column),this)}),ze("order()",function(t,n){var r=this.context;return t===i?0!==r.length?r[0].aaSorting:i:("number"==typeof t?t=[[t,n]]:t.length&&!e.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),ze("order.listener()",function(e,t,n){return this.iterator("table",function(i){Te(i,e,t,n)})}),ze("order.fixed()",function(t){var n;return t?this.iterator("table",function(n){n.aaSortingFixed=e.extend(!0,{},t)}):e.isArray(n=(n=this.context).length?n[0].aaSortingFixed:i)?{pre:n}:n}),ze(["columns().order()","column().order()"],function(t){var n=this;return this.iterator("table",function(i,r){var o=[];e.each(n[r],function(e,n){o.push([n,t])}),i.aaSorting=o})}),ze("search()",function(t,n,r,o){var s=this.context;return t===i?0!==s.length?s[0].oPreviousSearch.sSearch:i:this.iterator("table",function(i){i.oFeatures.bFilter&&Y(i,e.extend({},i.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),1)})}),qe("columns().search()","column().search()",function(t,n,r,o){return this.iterator("column",function(s,a){var l=s.aoPreSearchCols;if(t===i)return l[a].sSearch;s.oFeatures.bFilter&&(e.extend(l[a],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),Y(s,s.oPreviousSearch,1))})}),ze("state()",function(){return this.context.length?this.context[0].oSavedState:null}),ze("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),ze("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),ze("state.save()",function(){return this.iterator("table",function(e){Re(e)})}),Ge.versionCheck=Ge.fnVersionCheck=function(e){for(var t,n,i=Ge.version.split("."),r=0,o=(e=e.split(".")).length;r<o;r++)if((t=parseInt(i[r],10)||0)!==(n=parseInt(e[r],10)||0))return t>n;return!0},Ge.isDataTable=Ge.fnIsDataTable=function(t){var n=e(t).get(0),i=!1;return t instanceof Ge.Api||(e.each(Ge.settings,function(t,r){var o=r.nScrollHead?e("table",r.nScrollHead)[0]:null,s=r.nScrollFoot?e("table",r.nScrollFoot)[0]:null;r.nTable!==n&&o!==n&&s!==n||(i=!0)}),i)},Ge.tables=Ge.fnTables=function(t){var n=!1;e.isPlainObject(t)&&(n=t.api,t=t.visible);var i=e.map(Ge.settings,function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable});return n?new We(i):i},Ge.camelToHungarian=o,ze("$()",function(t,n){var i=this.rows(n).nodes();return i=e(i),e([].concat(i.filter(t).toArray(),i.find(t).toArray()))}),e.each(["on","one","off"],function(t,n){ze(n+"()",function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var i=e(this.tables().nodes());return i[n].apply(i,t),this})}),ze("clear()",function(){return this.iterator("table",function(e){D(e)})}),ze("settings()",function(){return new We(this.context,this.context)}),ze("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),ze("data()",function(){return this.iterator("table",function(e){return rt(e.aoData,"_aData")}).flatten()}),ze("destroy()",function(n){return n=n||!1,this.iterator("table",function(i){var r,o=i.nTableWrapper.parentNode,s=i.oClasses,a=i.nTable,l=i.nTBody,c=i.nTHead,u=i.nTFoot,d=e(a),h=(l=e(l),e(i.nTableWrapper)),p=e.map(i.aoData,function(e){return e.nTr});i.bDestroying=!0,Me(i,"aoDestroyCallback","destroy",[i]),n||new We(i).columns().visible(!0),h.off(".DT").find(":not(tbody *)").off(".DT"),e(t).off(".DT-"+i.sInstance),a!=c.parentNode&&(d.children("thead").detach(),d.append(c)),u&&a!=u.parentNode&&(d.children("tfoot").detach(),d.append(u)),i.aaSorting=[],i.aaSortingFixed=[],Ce(i),e(p).removeClass(i.asStripeClasses.join(" ")),e("th, td",c).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone),l.children().detach(),l.append(p),d[c=n?"remove":"detach"](),h[c](),!n&&o&&(o.insertBefore(a,i.nTableRe
vendor: 8,915 bytes, line 1
1insertBefore),d.css("width",i.sDestroyWidth).removeClass(s.sTable),(r=i.asDestroyStripes.length)&&l.children().each(function(t){e(this).addClass(i.asDestroyStripes[t%r])})),-1!==(o=e.inArray(i,Ge.settings))&&Ge.settings.splice(o,1)})}),e.each(["column","row","cell"],function(e,t){ze(t+"s().every()",function(e){var n=this.selector.opts,r=this;return this.iterator(t,function(o,s,a,l,c){e.call(r[t](s,"cell"===t?a:n,"cell"===t?n:i),s,a,l,c)})})}),ze("i18n()",function(t,n,r){var o=this.context[0];return(t=C(t)(o.oLanguage))===i&&(t=n),r!==i&&e.isPlainObject(t)&&(t=t[r]!==i?t[r]:t._),t.replace("%d",r)}),Ge.version="1.10.18",Ge.settings=[],Ge.models={},Ge.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Ge.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Ge.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Ge.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},Ge.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},r(Ge.defaults),Ge.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},r(Ge.defaults.column),Ge.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Fe(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Fe(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,i=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?!1===o||-1===e?t+i:Math.min(t+e,this._iRecordsDisplay):!o||n>i||-1===e?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Ge.ext=Ve={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Ge.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Ge.version},e.extend(Ve,{afnFiltering:Ve.search,aTypes:Ve.type.detect,ofnSearch:Ve.type.search,oSort:Ve.type.order,afnSortData:Ve.order,aoFeatures:Ve.feature,oApi:Ve.internal,oStdClasses:Ve.classes,oPagination:Ve.pager}),e.extend(Ge.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Dt=Ge.ext.pager;e.extend(Dt,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(e,t){return[Ue(e,t)]},simple_numbers:function(e,t){return["previous",Ue(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Ue(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Ue(e,t),"last"]},_numbers:Ue,numbers_length:7}),e.extend(!0,Ge.ext.renderer,{pageButton:{_:function(t,r,o,s,a,l){var c,u,d,h=t.oClasses,p=t.oLanguage.oPaginate,f=t.oLanguage.oAria.paginate||{},g=0,m=function(n,i){var r,s,d,v,y=function(e){ce(t,e.data.action,!0)};for(r=0,s=i.length;r<s;r++)if(e.isArray(v=i[r]))d=e("<"+(v.DT_el||"div")+"/>").appendTo(n),m(d,v);else{switch(c=null,u="",v){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</span>');break;case"first":c=p.sFirst,u=v+(a>0?"":" "+h.sPageButtonDisabled);break;case"previous":c=p.sPrevious,u=v+(a>0?"":" "+h.sPageButtonDisabled);break;case"next":c=p.sNext,u=v+(a<l-1?"":" "+h.sPageButtonDisabled);break;case"last":c=p.sLast,u=v+(a<l-1?"":" "+h.sPageButtonDisabled);break;default:c=v+1,u=a===v?h.sPageButtonActive:""}null!==c&&(Ne(d=e("<a>",{class:h.sPageButton+" "+u,"aria-controls":t.sTableId,"aria-label":f[v],"data-dt-idx":g,tabindex:t.iTabIndex,id:0===o&&"string"==typeof v?t.sTableId+"_"+v:null}).html(c).appendTo(n),{action:v},y),g++)}};try{d=e(r).find(n.activeElement).data("dt-idx")}catch(e){}m(e(r).empty(),s),d!==i&&e(r).find("[data-dt-idx="+d+"]").focus()}}}),e.extend(Ge.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return nt(e,n)?"num"+n:null},function(e){if(e&&!(e instanceof Date)&&!Je.test(e))return null;
1var t=Date.parse(e);return null!==t&&!isNaN(t)||Ze(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return nt(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return it(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return it(e,n,!0)?"html-num-fmt"+n:null},function(e){return Ze(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(Ge.ext.type.search,{html:function(e){return Ze(e)?e:"string"==typeof e?e.replace($e," ").replace(Ke,""):""},string:function(e){return Ze(e)?e:"string"==typeof e?e.replace($e," "):e}});var At=function(e,t,n,i){return 0===e||e&&"-"!==e?(t&&(e=tt(e,t)),e.replace&&(n&&(e=e.replace(n,"")),i&&(e=e.replace(i,""))),1*e):-1/0};e.extend(Ve.type.order,{"date-pre":function(e){return e=Date.parse(e),isNaN(e)?-1/0:e},"html-pre":function(e){return Ze(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return Ze(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),He(""),e.extend(!0,Ge.ext.renderer,{header:{_:function(t,n,i,r){e(t.nTable).on("order.dt.DT",function(e,o,s,a){t===o&&(e=i.idx,n.removeClass(i.sSortingClass+" "+r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[e]?r.sSortAsc:"desc"==a[e]?r.sSortDesc:i.sSortingClass))})},jqueryui:function(t,n,i,r){e("<div/>").addClass(r.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(r.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",function(e,o,s,a){t===o&&(e=i.idx,n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[e]?r.sSortAsc:"desc"==a[e]?r.sSortDesc:i.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==a[e]?r.sSortJUIAsc:"desc"==a[e]?r.sSortJUIDesc:i.sSortingClassJUI))})}}});var kt=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};return Ge.render={number:function(e,t,n,i,r){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var s=0>o?"-":"",a=parseFloat(o);return isNaN(a)?kt(o):(a=a.toFixed(n),o=Math.abs(a),a=parseInt(o,10),o=n?t+(o-a).toFixed(n).substring(2):"",s+(i||"")+a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+o+(r||""))}}},text:function(){return{display:kt}}},e.extend(Ge.ext.internal,{_fnExternApiFunc:Be,_fnBuildAjax:B,_fnAjaxUpdate:V,_fnAjaxParameters:W,_fnAjaxUpdateDraw:z,_fnAjaxDataSrc:q,_fnAddColumn:d,_fnColumnOptions:h,_fnAdjustColumnSizing:p,_fnVisibleToColumnIndex:f,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:y,_fnApplyColumnDefs:b,_fnHungarianMap:r,_fnCamelToHungarian:o,_fnLanguageCompat:s,_fnBrowserDetect:c,_fnAddData:_,_fnAddTr:S,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==i?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,i){return e.inArray(i,t.aoData[n].anCells)},_fnGetCellData:w,_fnSetCellData:E,_fnSplitObjNotation:T,_fnGetObjectDataFn:C,_fnSetObjectDataFn:I,_fnGetDataMaster:R,_fnClearTable:D,_fnDeleteIndex:A,_fnInvalidate:k,_fnGetRowElements:O,_fnCreateTr:x,_fnBuildHead:P,_fnDrawHead:M,_fnDraw:L,_fnReDraw:j,_fnAddOptionsHtml:F,_fnDetectHeader:U,_fnGetUniqueThs:H,_fnFeatureHtmlFilter:G,_fnFilterComplete:Y,_fnFilterCustom:$,_fnFilterColumn:K,_fnFilter:J,_fnFilterCreateSearch:X,_fnEscapeRegex:ht,_fnFilterData:Q,_fnFeatureHtmlInfo:te,_fnUpdateInfo:ne,_fnInfoMacros:ie,_fnInitialise:re,_fnInitComplete:oe,_fnLengthChange:se,_fnFeatureHtmlLength:ae,_fnFeatureHtmlPaginate:le,_fnPageChange:ce,_fnFeatureHtmlProcessing:ue,_fnProcessingDisplay:de,_fnFeatureHtmlTable:he,_fnScrollDraw:pe,_fnApplyToChildren:fe,_fnCalculateColumnWidths:ge,_fnThrottle:mt,_fnConvertToWidth:me,_fnGetWidestNode:ve,_fnGetMaxLenString:ye,_fnStringToCss:be,_fnSortFlatten:_e,_fnSort:Se,_fnSortAria:we,_fnSortListener:Ee,_fnSortAttachListener:Te,_fnSortingClasses:Ce,_fnSortData:Ie,_fnSaveState:Re,_fnLoadState:De,_fnSettingsFromNode:Ae,_fnLog:ke,_fnMap:Oe,_fnBindAction:Ne,_fnCallbackReg:Pe,_fnCallbackFire:Me,_fnLengthOverflow:Le,_fnRenderer:je,_fnDataSource:Fe,_fnRowAttributes:N,_fnExtend:xe,_fnCalculateEnd:function(){}}),e.fn.dataTable=Ge,Ge.$=e,e.fn.dataTableSettings=Ge.settings,e.fn.dataTableExt=Ge.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(Ge,function(t,n){e.fn.DataTable[t]=n}),e.fn.dataTable}),function(e,t){var n=function(e,n){e.extend(!0,n.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"}),e.extend(n.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"}),n.ext.renderer.pageButton.bootstrap=function(i,r,o,s,a,l){var c,u,d,h=new n.Api(i),p=i.oClasses,f=i.oLanguage.oPaginate,g=0,m=function(t,n){var r,s,d,v,y=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||h.page(t.data.action).draw("page")};for(r=0,s=n.length;r<s;r++)if(e.isArray(v=n[r]))m(t,v);else{switch(u=c="",v){case"ellipsis":c="&hellip;",u="disabled";break;case"first":c=f.sFirst,u=v+(0<a?"":" disabled");break;case"previous":c=f.sPrevious,u=v+(0<a?"":" disabled");break;case"next":c=f.sNext,u=v+(a<l-1?"":" disabled");break;case"last":c=f.sLast,u=v+(a<l-1?"":" disabled");break;default:c=v+1,u=a===v?"active":""}c&&(d=e("<li>",{class:p.sPageButton+" "+u,id:0===o&&"string"==typeof v?i.sTableId+"_"+v:null}).append(e("<a>",{href:"#","aria-controls":i.sTableId,"data-dt-idx":g,tabindex:i.iTabIndex}).html(c)).appendTo(t),i.oApi._fnBindAction(d,{action:v},y),g++)}};try{d=e(r).find(t.activeElement).data("dt-idx")}catch(e){}m(e(r).empty().html('<ul class="pagination"/>').children("ul"),s),d&&e(r).find("[data-dt-idx="+d+"]").focus()},n.TableTools&&(e.extend(!0,n.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}
1),e.extend(!0,n.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"==typeof define&&define.amd?define(["jquery","datatables"],n):"object"==typeof exports?n(require("jquery"),require("datatables")):jQuery&&n(jQuery,jQuery.fn.dataTable)}(window,document),function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n&&n.fn.dataTable||(n=require("datatables.net")(t,n).$),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,i){"use strict";var r=e.fn.dataTable,o=function(t,n){if(!r.versionCheck||!r.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new r.Api(t),columns:[],current:[]},this.s.dt.settings()[0].responsive||(n&&"string"==typeof n.details&&(n.details={type:n.details}),this.c=e.extend(!0,{},o.defaults,r.defaults.responsive,n),t.responsive=this,this._constructor())};e.extend(o.prototype,{_constructor:function(){var n=this,i=this.s.dt,o=i.settings()[0],s=e(t).width();i.settings()[0]._responsive=this,e(t).on("resize.dtr orientationchange.dtr",r.util.throttle(function(){var i=e(t).width();i!==s&&(n._resize(),s=i)})),o.oApi._fnCallbackReg(o,"aoRowCreatedCallback",function(t,r,o){-1!==e.inArray(!1,n.s.current)&&e("td, th",t).each(function(t){var r=i.column.index("toData",t);!1===n.s.current[r]&&e(this).css("display","none")})}),i.on("destroy.dtr",function(){i.off(".dtr"),e(i.table().body()).off(".dtr"),e(t).off("resize.dtr orientationchange.dtr"),e.each(n.s.current,function(e,t){!1===t&&n._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this._resizeAuto();var a=this.c.details;!1!==a.type&&(n._detailsInit(),i.on("column-visibility.dtr",function(e,t,i,r){n._classLogic(),n._resizeAuto(),n._resize()}),i.on("draw.dtr",function(){n._redrawChildren()}),e(i.table().node()).addClass("dtr-"+a.type)),i.on("column-reorder.dtr",function(e,t,i){i.drop&&(n._classLogic(),n._resizeAuto(),n._resize())}),i.on("init.dtr",function(e,t,i){n._resizeAuto(),n._resize()}),this._resize()},_columnsVisiblity:function(t){var n,i,r=this.s.dt,o=this.s.columns,s=o.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),a=e.map(o,function(n){return(!n.auto||null!==n.minWidth)&&(!0===n.auto?"-":-1!==e.inArray(t,n.includeIn))}),l=0;for(n=0,i=a.length;n<i;n++)!0===a[n]&&(l+=o[n].minWidth);var c=r.settings()[0].oScroll,u=c.sY||c.sX?c.iBarWidth:0,d=r.table().container().offsetWidth-u-l;for(n=0,i=a.length;n<i;n++)o[n].control&&(d-=o[n].minWidth);var h=!1;for(n=0,i=s.length;n<i;n++){var p=s[n].columnIdx;"-"===a[p]&&!o[p].control&&o[p].minWidth&&(h||d-o[p].minWidth<0?(h=!0,a[p]=!1):a[p]=!0,d-=o[p].minWidth)}var f=!1;for(n=0,i=o.length;n<i;n++)if(!o[n].control&&!o[n].never&&!a[n]){f=!0;break}for(n=0,i=o.length;n<i;n++)o[n].control&&(a[n]=f);return-1===e.inArray(!0,a)&&(a[0]=!0),a},_classLogic:function(){var t=this,n=this.c.breakpoints,r=this.s.dt,o=r.columns().eq(0).map(function(t){var n=this.column(t),o=n.header().className,s=r.settings()[0].aoColumns[t].responsivePriority;if(s===i){var a=e(n.header()).data("priority");s=a!==i?1*a:1e4}return{className:o,includeIn:[],auto:!1,control:!1,never:!!o.match(/\bnever\b/),priority:s}}),s=function(t,n){var i=o[t].includeIn;-1===e.inArray(n,i)&&i.push(n)},a=function(e,i,r,a){var l,c,u;if(r){if("max-"===r)for(l=t._find(i).width,c=0,u=n.length;c<u;c++)n[c].width<=l&&s(e,n[c].name);else if("min-"===r)for(l=t._find(i).width,c=0,u=n.length;c<u;c++)n[c].width>=l&&s(e,n[c].name);else if("not-"===r)for(c=0,u=n.length;c<u;c++)-1===n[c].name.indexOf(a)&&s(e,n[c].name)}else o[e].includeIn.push(i)};o.each(function(t,i){for(var r=t.className.split(" "),o=!1,s=0,l=r.length;s<l;s++){var c=e.trim(r[s]);if("all"===c)return o=!0,void(t.includeIn=e.map(n,function(e){return e.name}));if("none"===c||t.never)return void(o=!0);
1if("control"===c)return o=!0,void(t.control=!0);e.each(n,function(e,t){var n=t.name.split("-"),r=new RegExp("(min\\-|max\\-|not\\-)?("+n[0]+")(\\-[_a-zA-Z0-9])?"),s=c.match(r);s&&(o=!0,s[2]===n[0]&&s[3]==="-"+n[1]?a(i,t.name,s[1],s[2]+s[3]):s[2]!==n[0]||s[3]||a(i,t.name,s[1],s[2]))})}o||(t.auto=!0)}),this.s.columns=o},_detailsDisplay:function(t,n){var i=this,r=this.s.dt,o=this.c.details;if(o&&o.type){var s=o.display(t,n,function(){return o.renderer(r,t[0],i._detailsObj(t[0]))});!0!==s&&!1!==s||e(r.table().node()).triggerHandler("responsive-display.dt",[r,t,s,n])}},_detailsInit:function(){var t=this,n=this.s.dt,i=this.c.details;"inline"===i.type&&(i.target="td:first-child"),n.on("draw.dtr",function(){t._tabIndexes()}),t._tabIndexes(),e(n.table().body()).on("keyup.dtr","td",function(t){13===t.keyCode&&e(this).data("dtr-keyboard")&&e(this).click()});var r=i.target,o="string"==typeof r?r:"td";e(n.table().body()).on("click.dtr mousedown.dtr",o,function(i){if(e(n.table().node()).hasClass("collapsed")&&n.row(e(this).closest("tr")).length){if("number"==typeof r){var o=r<0?n.columns().eq(0).length+r:r;if(n.cell(this).index().column!==o)return}var s=n.row(e(this).closest("tr"));"click"===i.type?t._detailsDisplay(s,!1):"mousedown"===i.type&&i.preventDefault()}})},_detailsObj:function(t){var n=this,i=this.s.dt;return e.map(this.s.columns,function(e,r){if(!e.never)return{title:i.settings()[0].aoColumns[r].sTitle,data:i.cell(t,r).render(n.c.orthogonal),hidden:i.column(r).visible()&&!n.s.current[r],columnIndex:r}})},_find:function(e){for(var t=this.c.breakpoints,n=0,i=t.length;n<i;n++)if(t[n].name===e)return t[n]},_redrawChildren:function(){var e=this,t=this.s.dt;t.rows({page:"current"}).iterator("row",function(n,i){t.row(i),e._detailsDisplay(t.row(i),!0)})},_resize:function(){var n,i,r=this,o=this.s.dt,s=e(t).width(),a=this.c.breakpoints,l=a[0].name,c=this.s.columns,u=this.s.current.slice();for(n=a.length-1;n>=0;n--)if(s<=a[n].width){l=a[n].name;break}var d=this._columnsVisiblity(l);this.s.current=d;var h=!1;for(n=0,i=c.length;n<i;n++)if(!1===d[n]&&!c[n].never&&!c[n].control){h=!0;break}e(o.table().node()).toggleClass("collapsed",h);var p=!1;o.columns().eq(0).each(function(e,t){d[t]!==u[t]&&(p=!0,r._setColumnVis(e,d[t]))}),p&&(this._redrawChildren(),e(o.table().node()).trigger("responsive-resize.dt",[o,this.s.current]))},_resizeAuto:function(){var t=this.s.dt,n=this.s.columns;if(this.c.auto&&-1!==e.inArray(!0,e.map(n,function(e){return e.auto}))){t.table().node();var i=t.table().node().cloneNode(!1),r=e(t.table().header().cloneNode(!1)).appendTo(i),o=e(t.table().body().cloneNode(!1)).appendTo(i),s=t.columns().header().filter(function(e){return t.column(e).visible()}).to$().clone(!1).css("display","table-cell");e(o).append(e(t.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");var a=t.table().footer();if(a){var l=e(a.cloneNode(!1)).appendTo(i),c=t.columns().header().filter(function(e){return t.column(e).visible()}).to$().clone(!1).css("display","table-cell");e("<tr/>").append(c).appendTo(l)}e("<tr/>").append(s).appendTo(r),"inline"===this.c.details.type&&e(i).addClass("dtr-inline collapsed");var u=e("<div/>").css({width:1,height:1,overflow:"hidden"}).append(i);u.insertBefore(t.table().node()),s.each(function(e){var i=t.column.index("fromVisible",e);n[i].minWidth=this.offsetWidth||0}),u.remove()}},_setColumnVis:function(t,n){var i=this.s.dt,r=n?"":"none";e(i.column(t).header()).css("display",r),e(i.column(t).footer()).css("display",r),i.column(t).nodes().to$().css("display",r)},_tabIndexes:function(){var t=this.s.dt,n=t.cells({page:"current"}).nodes().to$(),i=t.settings()[0],r=this.c.details.target;n.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),e("number"==typeof r?":eq("+r+")":r,t.rows({page:"current"}).nodes()).attr("tabIndex",i.iTabIndex).data("dtr-keyboard",1)}}),o.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],o.display={childRow:function(t,n,i){return n?e(t.node()).hasClass("parent")?(t.child(i(),"child").show(),!0):void 0:t.child.isShown()?(t.child(!1),e(t.node()).removeClass("parent"),!1):(t.child(i(),"child").show(),e(t.node()).addClass("parent"),!0)},childRowImmediate:function(t,n,i){return!n&&t.child.isShown()||!t.responsive.hasHidden()?(t.child(!1),e(t.node()).removeClass("parent"),!1):(t.child(i(),"child").show(),e(t.node()).addClass("parent"),!0)},modal:function(t){return function(i,r,o){if(r)e("div.dtr-modal-content").empty().append(o());else{var s=function(){a.remove(),e(n).off("keypress.dtr")},a=e('<div class="dtr-modal"/>').append(e('<div class="dtr-modal-display"/>').append(e('<div class="dtr-modal-content"/>').append(o())).append(e('<div class="dtr-modal-close">&times;</div>').click(function(){s()}))).append(e('<div class="dtr-modal-background"/>').click(function(){s()})).appendTo("body");t&&t.header&&a.find("div.dtr-modal-content").prepend("<h2>"+t.header(i)+"</h2>
1"),e(n).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),s())})}}}},o.defaults={breakpoints:o.breakpoints,auto:!0,details:{display:o.display.childRow,renderer:function(t,n,i){var r=e.map(i,function(e,t){return e.hidden?'<li data-dtr-index="'+e.columnIndex+'"><span class="dtr-title">'+e.title+'</span> <span class="dtr-data">'+e.data+"</span></li>":""}).join("");return!!r&&e('<ul data-dtr-index="'+n+'"/>').append(r)},target:0,type:"inline"},orthogonal:"display"};var s=e.fn.dataTable.Api;return s.register("responsive()",function(){return this}),s.register("responsive.index()",function(t){return{column:(t=e(t)).data("dtr-index"),row:t.parent().data("dtr-index")}}),s.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),s.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),s.register("responsive.hasHidden()",function(){var t=this.context[0];return!!t._responsive&&-1!==e.inArray(!1,t._responsive.s.current)}),o.version="2.0.1-dev",e.fn.dataTable.Responsive=o,e.fn.DataTable.Responsive=o,e(n).on("preInit.dt.dtr",function(t,n,i){if("dt"===t.namespace&&(e(n.nTable).hasClass("responsive")||e(n.nTable).hasClass("dt-responsive")||n.oInit.responsive||r.defaults.responsive)){var s=n.oInit.responsive;!1!==s&&new o(n,e.isPlainObject(s)?s:{})}}),o}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=function(){function t(e,t,n,i){this.markup=e,this.children=t,this.options=n,this.callback=i}return t.prototype.render=function(t){var n=e(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&e.each(this.options.data,function(e,t){n.attr("data-"+e,t)}),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var i=n.find(".note-children-container");this.children.forEach(function(e){e.render(i.length?i:n)})}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),t&&t.append(n),n},t}(),n=function(n,i){return function(){var r="object"==typeof arguments[1]?arguments[1]:arguments[0],o=e.isArray(arguments[0])?arguments[0]:[];return r&&r.children&&(o=r.children),new t(n,o,r,i)}},i=n('<div class="note-editor note-frame panel"/>'),r=n('<div class="note-toolbar-wrapper panel-default"><div class="note-toolbar panel-heading" role="toolbar"></div></div>'),o=n('<div class="note-editing-area"/>'),s=n('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),a=n('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'),l=n(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">','  <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>',"  </div>","</div>"].join("")),c=n('<div class="note-editor"/>'),u=n(['  <output class="note-status-output" aria-live="polite"/>','<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'].join("")),d=n('<div class="note-btn-group btn-group">'),h=n('<ul class="dropdown-menu" role="list">',function(t,n){var i=e.isArray(n.items)?n.items.map(function(e){var t="string"==typeof e?e:e.value||"",i=n.template?n.template(e):e,r="object"==typeof e?e.option:void 0;return'<li role="listitem" aria-label="'+e+'"><a href="#" data-value="'+t+'"'+(void 0!==r?' data-option="'+r+'"':"")+">"+i+"</a></li>"}).join(""):n.items;t.html(i).attr({"aria-label":n.title})}),p=n('<ul class="dropdown-menu note-check" role="list">',function(t,n){var i=e.isArray(n.items)?n.items.map(function(e){var t="string"==typeof e?e:e.value||"",i=n.template?n.template(e):e;return'<li role="listitem" aria-label="'+e+'"><a href="#" data-value="'+t+'">'+g(n.checkClassName)+" "+i+"</a></li>"}).join(""):n.items;t.html(i).attr({"aria-label":n.title})}),f=n('<div class="note-color-palette"/>',function(e,t){for(var n=[],i=0,r=t.colors.length;i<r;i++){for(var o=t.eventName,s=t.colors[i],a=t.colorsName[i],l=[],c=0,u=s.length;c<u;c++){var d=s[c],h=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',d,'" ','data-event="',o,'" ','data-value="',d,'" ','title="',h,'" ','aria-label="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}n.push('<div class="note-color-row">'+l.join("")+"</div>")}e.html(n.join("")),t.tooltip&&e.find(".note-color-btn").tooltip({container:t.container,trigger:"hover",placement:"bottom"})}),g=function(e,t){return"<"+(t=t||"i")+' class="'+e+'"/>'},m={editor:i,toolbar:r,editingArea:o,codable:s,editable:a,statusbar:l,airEditor:c,airEditable:u,buttonGroup:d,dropdown:h,dropdownButtonContents:function(e,t){return e+" "+g(t.icons.caret,"span")},dropdownCheck:p,palette:f,dialog:n('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="modal-dialog">','  <div class="modal-content">',t.title?'    <div class="modal-header">      <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;</button>      <h4 class="modal-title">'+t.title+"</h4>    </div>":"",'    <div class="modal-body">'+t.body+"</div>",t.footer?'    <div class="modal-footer">'+t.footer+"</div>":"","  </div>","</div>"].join(""))}),popover:n(['<div class="note-popover popover in">','  <div class="arrow"/>','  <div class="popover-content note-children-container"/>',"</div>"].join(""),function(e,t){e.addClass(void 0!==t.direction?t.direction:"bottom"),t.hideArrow&&e.find(".arrow").hide()}),checkbox:n('<div class="checkbox"></div>
1',function(e,t){e.html([" <label"+(t.id?' for="'+t.id+'"':"")+">",' <input role="checkbox" type="checkbox"'+(t.id?' id="'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))}),icon:g,options:{},button:function(e,t){return n('<button type="button" class="note-btn btn btn-default btn-sm" role="button" tabindex="-1">',function(e,t){t&&t.tooltip&&e.attr({title:t.tooltip,"aria-label":t.tooltip}).tooltip({container:t.container,trigger:"hover",placement:"bottom"})})(e,t)},toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(e,t){var n=(t.airMode?m.airEditor([m.editingArea([m.airEditable()])]):m.editor([m.toolbar(),m.editingArea([m.codable(),m.editable()]),m.statusbar()])).render();return n.insertAfter(e),{note:e,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}},v=0,y={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},uniqueId:function(e){var t=++v+"";return e?e+t:t},rect2bnd:function(e){var t=$(document);return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).join("")},debounce:function(e,t,n){var i,r=this;return function(){var o=r,s=arguments,a=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||e.apply(o,s)},t),a&&e.apply(o,s)}}};function b(e){return e[0]}function _(e){return e[e.length-1]}function S(e){return e.slice(1)}function w(t,n){return e.inArray(n,t)}function E(e,t){return-1!==w(e,t)}var T,C={head:b,last:_,initial:function(e){return e.slice(0,e.length-1)},tail:S,prev:function(e,t){var n=w(e,t);return-1===n?null:e[n-1]},next:function(e,t){var n=w(e,t);return-1===n?null:e[n+1]},find:function(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];if(t(r))return r}},contains:E,all:function(e,t){for(var n=0,i=e.length;n<i;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||y.self,e.reduce(function(e,n){return e+t(n)},0)},from:function(e){for(var t=[],n=e.length,i=-1;++i<n;)t[i]=e[i];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?S(e).reduce(function(e,n){var i=_(e);return t(_(i),n)?i[i.length]=n:e[e.length]=[n],e},[[b(e)]]):[]},compact:function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,i=e.length;n<i;n++)E(t,e[n])||t.push(e[n]);return t}},I="function"==typeof define&&define.amd,R=navigator.userAgent,D=/MSIE|Trident/i.test(R);if(D){var A=/MSIE (\d+[.]\d+)/.exec(R);A&&(T=parseFloat(A[1])),(A=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(R))&&(T=parseFloat(A[1]))}var k=/Edge\/\d+/.test(R),O=!!window.CodeMirror;if(!O&&I)if("function"==typeof __webpack_require__)try{require.resolve("codemirror"),O=!0}catch(e){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),O=!0}catch(e){}else void 0!==require.specified&&(O=require.specified("codemirror"));var x="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,N=D||k?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",P
1={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:D,isEdge:k,isFF:!k&&/firefox/i.test(R),isPhantom:/PhantomJS/i.test(R),isWebkit:!k&&/webkit/i.test(R),isChrome:!k&&/chrome/i.test(R),isSafari:!k&&/safari/i.test(R),browserVersion:T,jqueryVersion:parseFloat(e.fn.jquery),isSupportAmd:I,isSupportTouch:x,hasCodeMirror:O,isFontInstalled:function(t){var n="Comic Sans MS"===t?"Courier New":"Comic Sans MS",i=e("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),r=i.css("fontFamily",n).width(),o=i.css("fontFamily",t+","+n).width();return i.remove(),r!==o},isW3CRangeSupport:!!document.createRange,inputEventName:N},M=String.fromCharCode(160);function L(t){return t&&e(t).hasClass("note-editable")}function j(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function F(e){return e&&3===e.nodeType}function U(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(e.nodeName.toUpperCase())}function H(e){return!L(e)&&e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())}var B=j("PRE"),V=j("LI"),W=j("TABLE"),z=j("DATA");function q(e){return!(X(e)||G(e)||Y(e)||H(e)||W(e)||J(e)||z(e))}function G(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var Y=j("HR");function K(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var J=j("BLOCKQUOTE");function X(e){return K(e)||J(e)||L(e)}var Q=j("A"),Z=j("BODY"),ee=P.isMSIE&&P.browserVersion<11?"&nbsp;":"<br>";function te(e){return F(e)?e.nodeValue.length:e?e.childNodes.length:0}function ne(e){var t=te(e);return 0===t||!F(e)&&1===t&&e.innerHTML===ee||!(!C.all(e.childNodes,F)||""!==e.innerHTML)}function ie(e){U(e)||te(e)||(e.innerHTML=ee)}function re(e,t){for(;e;){if(t(e))return e;if(L(e))break;e=e.parentNode}return null}function oe(e,t){t=t||y.fail;var n=[];return re(e,function(e){return L(e)||n.push(e),t(e)}),n}function se(e,t){t=t||y.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function ae(e,t){var n=t.nextSibling,i=t.parentNode;return n?i.insertBefore(e,n):i.appendChild(e),e}function le(t,n){return e.each(n,function(e,n){t.appendChild(n)}),t}function ce(e){return 0===e.offset}function ue(e){return e.offset===te(e.node)}function de(e){return ce(e)||ue(e)}function he(e,t){for(;e&&e!==t;){if(0!==fe(e))return!1;e=e.parentNode}return!0}function pe(e,t){if(!t)return!1;for(;e&&e!==t;){if(fe(e)!==te(e.parentNode)-1)return!1;e=e.parentNode}return!0}function fe(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function ge(e){return!!(e&&e.childNodes&&e.childNodes.length)}function me(e,t){var n,i;if(0===e.offset){if(L(e.node))return null;n=e.node.parentNode,i=fe(e.node)}else ge(e.node)?i=te(n=e.node.childNodes[e.offset-1]):(n=e.node,i=t?0:e.offset-1);return{node:n,offset:i}}function ve(e,t){var n,i;if(te(e.node)===e.offset){if(L(e.node))return null;n=e.node.parentNode,i=fe(e.node)+1}else ge(e.node)?(n=e.node.childNodes[e.offset],i=0):(n=e.node,i=t?te(e.node):e.offset+1);return{node:n,offset:i}}function ye(e,t){return e.node===t.node&&e.offset===t.offset}function be(e,t){var n=t&&t.isSkipPaddingBlankHTML,i=t&&t.isNotSplitEdgePoint;if(de(e)&&(F(e.node)||i)){if(ce(e))return e.node;if(ue(e))return e.node.nextSibling}if(F(e.node))return e.node.splitText(e.offset);var r=e.node.childNodes[e.offset],o=ae(e.node.cloneNode(!1),e.node);return le(o,se(r)),n||(ie(e.node),ie(o)),o}function _e(e,t,n){var i=oe(t.node,y.eq(e));return i.length?1===i.length?be(t,n):i.reduce(function(e,i){return e===t.node&&(e=be(t,n)),be({node:i,offset:e?fe(e):te(i)},n)}):null}function Se(e){return document.createElement(e)}function we(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var i=[],r=0,o=e.childNodes.length;r<o;r++)i.push(e.childNodes[r]);for(r=0,o=i.length;r<o;r++)n.insertBefore(i[r],e)}n.removeChild(e)}}var Ee=j("TEXTAREA");function Te(e,t){var n=Ee(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}var Ce={NBSP_CHAR:M,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:ee,emptyPara:"<p>"+ee+"</p>",makePredByNodeName:j,isEditable:L,isControlSizing:function(t){return t&&e(t).hasClass("note-control-sizing")},isText:F,isElement:function(e){return e&&1===e.nodeType},isVoid:U,isPara:H,isPurePara:function(e){return H(e)&&!V(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:q,isBlock:y.not(q),isBodyInline:function(e){return q(e)&&!re(e,H)},isBody:Z,isParaInline:function(e){return q(e)&&!!re(e,H)},isPre:B,isList:G,isTable:W,isData:z,isCell:K,isBlockquote:J,isBodyContainer:X,isAnchor:Q,isDiv:j("DIV"),isLi:V,isBR:j("BR"),isSpan:j("SPAN"),isB:j("B"),isU:j("U"),isS:j("S"),isI:j("I"),isImg:j("IMG"),isTextarea:Ee,isEmpty:ne,isEmptyAnchor:y.and(Q,ne),isClose
1stSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||y.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:te,isLeftEdgePoint:ce,isRightEdgePoint:ue,isEdgePoint:de,isLeftEdgeOf:he,isRightEdgeOf:pe,isLeftEdgePointOf:function(e,t){return ce(e)&&he(e.node,t)},isRightEdgePointOf:function(e,t){return ue(e)&&pe(e.node,t)},prevPoint:me,nextPoint:ve,isSamePoint:ye,isVisiblePoint:function(e){if(F(e.node)||!ge(e.node)||ne(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!(t&&!U(t)||n&&!U(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=me(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ve(e)}return null},isCharPoint:function(e){if(!F(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==M},walkPoint:function(e,t,n,i){for(var r=e;r&&(n(r),!ye(r,t));)r=ve(r,i&&e.node!==r.node&&t.node!==r.node)},ancestor:re,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===te(e);){if(t(e))return e;if(L(e))break;e=e.parentNode}return null},listAncestor:oe,lastAncestor:function(e,t){var n=oe(e);return C.last(n.filter(t))},listNext:se,listPrev:function(e,t){t=t||y.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||y.ok,function i(r){e!==r&&t(r)&&n.push(r);for(var o=0,s=r.childNodes.length;o<s;o++)i(r.childNodes[o])}(e),n},commonAncestor:function(t,n){for(var i=oe(t),r=n;r;r=r.parentNode)if(e.inArray(r,i)>-1)return r;return null},wrap:function(t,n){var i=t.parentNode,r=e("<"+n+">")[0];return i.insertBefore(r,t),r.appendChild(t),r},insertAfter:ae,appendChildNodes:le,position:fe,hasChildren:ge,makeOffsetPath:function(e,t){return oe(t,y.eq(e)).map(fe).reverse()},fromOffsetPath:function(e,t){for(var n=e,i=0,r=t.length;i<r;i++)n=n.childNodes.length<=t[i]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[i]];return n},splitTree:_e,splitPoint:function(e,t){var n,i,r=t?H:X,o=oe(e.node,r),s=C.last(o)||e.node;r(s)?(n=o[o.length-2],i=s):i=(n=s).parentNode;var a=n&&_e(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return a||i!==e.node||(a=e.node.childNodes[e.offset]),{rightNode:a,container:i}},create:Se,createText:function(e){return document.createTextNode(e)},remove:we,removeWhile:function(e,t){for(;e&&!L(e)&&t(e);){var n=e.parentNode;we(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=Se(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),le(n,C.from(e.childNodes)),ae(n,e),we(e),n},html:function(t,n){var i=Te(t);return n&&(i=i.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(e,t,n){n=n.toUpperCase();var i=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,r=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(i||r?"\n":"")}),i=e.trim(i)),i},value:Te,posFromPlaceholder:function(t){var n=e(t),i=n.offset(),r=n.outerHeight(!0);return{left:i.left,top:i.top+r}},attachEvents:function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})},detachEvents:function(e,t){Object.keys(t).forEach(function(n){e.off(n,t[n])})},isCustomStyleTag:function(e){return e&&!F(e)&&C.contains(e.classList,"note-styletag")}};e.summernote=e.summernote||{lang:{}},e.extend(e.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"}
1,color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var Ie={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},Re={isEdit:function(e){return C.contains([Ie.BACKSPACE,Ie.TAB,Ie.ENTER,Ie.SPACE,Ie.DELETE],e)},isMove:function(e){return C.contains([Ie.LEFT,Ie.UP,Ie.RIGHT,Ie.DOWN],e)},nameFromCode:y.invertObject(Ie),code:Ie};function De(e,t){var n,i,r=e.parentElement(),o=document.body.createTextRange(),s=C.from(r.childNodes);for(n=0;n<s.length;n++)if(!Ce.isText(s[n])){if(o.moveToElementText(s[n]),o.compareEndPoints("StartToStart",e)>=0)break;i=s[n]}if(0!==n&&Ce.isText(s[n-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(i||r),a.collapse(!i),l=i?i.nextSibling:r.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",a);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;t&&l.nextSibling&&Ce.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),r=l,n=u}return{cont:r,offset:n}}function Ae(e){var t=function(e,n){var i,r;if(Ce.isText(e)){var o=Ce.listPrev(e,y.not(Ce.isText)),s=C.last(o).previousSibling;i=s||e.parentNode,n+=C.sum(C.tail(o),Ce.nodeLength),r=!s}else{if(Ce.isText(i=e.childNodes[n]||e))return t(i,0);n=0,r=!1}return{node:i,collapseToStart:r,offset:n}},n=document.body.createTextRange(),i=t(e.node,e.offset);return n.moveToElementText(i.node),n.collapse(i.collapseToStart),n.moveStart("character",i.offset),n}var ke=function(){function t(e,t,n,i){this.sc=e,this.so=t,this.ec=n,this.eo=i,this.isOnEditable=this.makeIsOn(Ce.isEditable),this.isOnList=this.makeIsOn(Ce.isList),this.isOnAnchor=this.makeIsOn(Ce.isAnchor),this.isOnCell=this.makeIsOn(Ce.isCell),this.isOnData=this.makeIsOn(Ce.isData)}return t.prototype.nativeRange=function(){if(P.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=Ae({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",Ae({node:this.ec,offset:this.eo})),t},t.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},t.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},t.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},t.prototype.select=function(){var e=this.nativeRange();if(P.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this},t.prototype.scrollIntoView=function(t){var n=e(t).height();return t.scrollTop+n<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+n-this.sc.offsetTop)),this},t.prototype.normalize=function(){var e=function(e,t){if(Ce.isVisiblePoint(e)&&!Ce.isEdgePoint(e)||Ce.isVisiblePoint(e)&&Ce.isRightEdgePoint(e)&&!t||Ce.isVisiblePoint(e)&&Ce.isLeftEdgePoint(e)&&t||Ce.isVisiblePoint(e)&&Ce.isBlock(e.node)&&Ce.isEmpty(e.node))return e;var n=Ce.ancestor(e.node,Ce.isBlock);if((Ce.isLeftEdgePointOf(e,n)||Ce.isVoid(Ce.prevPoint(e).node))&&!t||(Ce.isRightEdgePointOf(e,n)||Ce.isVoid(Ce.nextPoint(e).node))&&t){if(Ce.isVisiblePoint(e))return e;t=!t}return(t?Ce.nextPointUntil(Ce.nextPoint(e),Ce.isVisiblePoint):Ce.prevPointUntil(Ce.prevPoint(e),Ce.isVisiblePoint))||e},n=e(this.getEndPoint(),!1),i=this.isCollapsed()?n:e(this.getStartPoint(),!0);return new t(i.node,i.offset,n.node,n.offset)},t.prototype.nodes=function(e,t){e=e||y.ok;var n=t&&t.includeAncestor,i=t&&t.fullyContains,r=this.getStartPoint(),o=this.getEndPoint(),s=[],a=[];return Ce.walkPoint(r,o,function(t){var r;Ce.isEditable(t.node)||(i?(Ce.isLeftEdgePoint(t)&&a.push(t.node),Ce.isRightEdgePoint(t)&&C.contains(a,t.node)&&(r=t.node)):r=n?Ce.ancestor(t.node,e):t.node,r&&e(r)&&s.push(r))},!0),C.unique(s)},t.prototype.commonAncestor=function(){return Ce.commonAncestor(this.sc,this.ec)},t.prototype.expand=function(e){var n=Ce.ancestor(this.sc,e),i=Ce.ancestor(this.ec,e);
1if(!n&&!i)return new t(this.sc,this.so,this.ec,this.eo);var r=this.getPoints();return n&&(r.sc=n,r.so=0),i&&(r.ec=i,r.eo=Ce.nodeLength(i)),new t(r.sc,r.so,r.ec,r.eo)},t.prototype.collapse=function(e){return e?new t(this.sc,this.so,this.sc,this.so):new t(this.ec,this.eo,this.ec,this.eo)},t.prototype.splitText=function(){var e=this.sc===this.ec,n=this.getPoints();return Ce.isText(this.ec)&&!Ce.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),Ce.isText(this.sc)&&!Ce.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,e&&(n.ec=n.sc,n.eo=this.eo-this.so)),new t(n.sc,n.so,n.ec,n.eo)},t.prototype.deleteContents=function(){if(this.isCollapsed())return this;var n=this.splitText(),i=n.nodes(null,{fullyContains:!0}),r=Ce.prevPointUntil(n.getStartPoint(),function(e){return!C.contains(i,e.node)}),o=[];return e.each(i,function(e,t){var n=t.parentNode;r.node!==n&&1===Ce.nodeLength(n)&&o.push(n),Ce.remove(t,!1)}),e.each(o,function(e,t){Ce.remove(t,!1)}),new t(r.node,r.offset,r.node,r.offset).normalize()},t.prototype.makeIsOn=function(e){return function(){var t=Ce.ancestor(this.sc,e);return!!t&&t===Ce.ancestor(this.ec,e)}},t.prototype.isLeftEdgeOf=function(e){if(!Ce.isLeftEdgePoint(this.getStartPoint()))return!1;var t=Ce.ancestor(this.sc,e);return t&&Ce.isLeftEdgeOf(this.sc,t)},t.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},t.prototype.wrapBodyInlineWithPara=function(){if(Ce.isBodyContainer(this.sc)&&Ce.isEmpty(this.sc))return this.sc.innerHTML=Ce.emptyPara,new t(this.sc.firstChild,0,this.sc.firstChild,0);var e,n=this.normalize();if(Ce.isParaInline(this.sc)||Ce.isPara(this.sc))return n;if(Ce.isInline(n.sc)){var i=Ce.listAncestor(n.sc,y.not(Ce.isInline));e=C.last(i),Ce.isInline(e)||(e=i[i.length-2]||n.sc.childNodes[n.so])}else e=n.sc.childNodes[n.so>0?n.so-1:0];var r=Ce.listPrev(e,Ce.isParaInline).reverse();if((r=r.concat(Ce.listNext(e.nextSibling,Ce.isParaInline))).length){var o=Ce.wrap(C.head(r),"p");Ce.appendChildNodes(o,C.tail(r))}return this.normalize()},t.prototype.insertNode=function(e){var t=this.wrapBodyInlineWithPara().deleteContents(),n=Ce.splitPoint(t.getStartPoint(),Ce.isInline(e));return n.rightNode?n.rightNode.parentNode.insertBefore(e,n.rightNode):n.container.appendChild(e),e},t.prototype.pasteHTML=function(t){var n=e("<div></div>").html(t)[0],i=C.from(n.childNodes),r=this.wrapBodyInlineWithPara().deleteContents();return i.reverse().map(function(e){return r.insertNode(e)}).reverse()},t.prototype.toString=function(){var e=this.nativeRange();return P.isW3CRangeSupport?e.toString():e.text},t.prototype.getWordRange=function(e){var n=this.getEndPoint();if(!Ce.isCharPoint(n))return this;var i=Ce.prevPointUntil(n,function(e){return!Ce.isCharPoint(e)});return e&&(n=Ce.nextPointUntil(n,function(e){return!Ce.isCharPoint(e)})),new t(i.node,i.offset,n.node,n.offset)},t.prototype.bookmark=function(e){return{s:{path:Ce.makeOffsetPath(e,this.sc),offset:this.so},e:{path:Ce.makeOffsetPath(e,this.ec),offset:this.eo}}},t.prototype.paraBookmark=function(e){return{s:{path:C.tail(Ce.makeOffsetPath(C.head(e),this.sc)),offset:this.so},e:{path:C.tail(Ce.makeOffsetPath(C.last(e),this.ec)),offset:this.eo}}},t.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},t}(),Oe={create:function(e,t,n,i){if(4===arguments.length)return new ke(e,t,n,i);if(2===arguments.length)return new ke(e,t,n=e,i=t);var r=this.createFromSelection();return r||1!==arguments.length?r:(r=this.createFromNode(arguments[0])).collapse(Ce.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var e,t,n,i;if(P.isW3CRangeSupport){var r=document.getSelection();if(!r||0===r.rangeCount)return null;if(Ce.isBody(r.anchorNode))return null;var o=r.getRangeAt(0);e=o.startContainer,t=o.startOffset,n=o.endContainer,i=o.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=De(l,!0),u=De(a,!1);Ce.isText(c.node)&&Ce.isLeftEdgePoint(c)&&Ce.isTextNode(u.node)&&Ce.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,i=u.offset}return new ke(e,t,n,i)},createFromNode:function(e){var t=e,n=0,i=e,r=Ce.nodeLength(i);return Ce.isVoid(t)&&(n=Ce.listPrev(t).length-1,t=t.parentNode),Ce.isBR(i)?(r=Ce.listPrev(i).length-1,i=i.parentNode):Ce.isVoid(i)&&(r=Ce.listPrev(i).length,i=i.parentNode),this.create(t,n,i,r)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=Ce.fromOffsetPath(e,t.s.path),i=t.s.offset,r=Ce.fromOffsetPath(e,t.e.path);return new ke(n,i,r,t.e.offset)},createFromParaBookmark:function(e,t){var n=e.s.offset,i=e.e.offset,r=Ce.fromOffsetPath(C.head(t),e.s.path),o=Ce.fromOffsetPath(C.last(t),e.e.path);return new ke(r,n,o,i)}},xe=function(){function e(e){this.stack=[],this.stackOffset=-1,this.$editable=e,this.editable=e[0]}return e.prototype.makeSnapshot=function(){var e=Oe.create(this.editable);return{contents:this.$editable.html(),bookmark:e?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}
1,e.prototype.applySnapshot=function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&Oe.createFromBookmark(this.editable,e.bookmark).select()},e.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])},e.prototype.reset=function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()},e.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},e.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},e.prototype.recordUndo=function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot())},e}(),Ne=function(){function t(){}return t.prototype.jQueryCSS=function(t,n){if(P.jqueryVersion<1.9){var i={};return e.each(n,function(e,n){i[n]=t.css(n)}),i}return t.css(n)},t.prototype.fromNode=function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{};
1return t["font-size"]=parseInt(t["font-size"],10),t},t.prototype.stylePara=function(t,n){e.each(t.nodes(Ce.isPara,{includeAncestor:!0}),function(t,i){e(i).css(n)})},t.prototype.styleNodes=function(t,n){t=t.splitText();var i=n&&n.nodeName||"SPAN",r=!(!n||!n.expandClosestSibling),o=!(!n||!n.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(Ce.create(i))];var s=Ce.makePredByNodeName(i),a=t.nodes(Ce.isText,{fullyContains:!0}).map(function(e){return Ce.singleChildAncestor(e,s)||Ce.wrap(e,i)});if(r){if(o){var l=t.nodes();s=y.and(s,function(e){return C.contains(l,e)})}return a.map(function(t){var n=Ce.withClosestSiblings(t,s),i=C.head(n),r=C.tail(n);return e.each(r,function(e,t){Ce.appendChildNodes(i,t.childNodes),Ce.remove(t)}),C.head(n)})}return a},t.prototype.current=function(t){var n=e(Ce.isElement(t.sc)?t.sc:t.sc.parentNode),i=this.fromNode(n);try{i=e.extend(i,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||i["font-family"]})}catch(e){}if(t.isOnList()){var r=e.inArray(i["list-style-type"],["circle","disc","disc-leading-zero","square"])>-1;i["list-style"]=r?"unordered":"ordered"}else i["list-style"]="none";var o=Ce.ancestor(t.sc,Ce.isPara);if(o&&o.style["line-height"])i["line-height"]=o.style.lineHeight;else{var s=parseInt(i["line-height"],10)/parseInt(i["font-size"],
110);i["line-height"]=s.toFixed(1)}return i.anchor=t.isOnAnchor()&&Ce.ancestor(t.sc,Ce.isAnchor),i.ancestors=Ce.listAncestor(t.sc,Ce.isEditable),i.range=t,i},t}(),Pe=function(){function t(){}return t.prototype.insertOrderedList=function(e){this.toggleList("OL",e)},t.prototype.insertUnorderedList=function(e){this.toggleList("UL",e)},t.prototype.indent=function(t){var n=this,i=Oe.create(t).wrapBodyInlineWithPara(),r=i.nodes(Ce.isPara,{includeAncestor:!0}),o=C.clusterBy(r,y.peq2("parentNode"));e.each(o,function(t,i){var r=C.head(i);Ce.isLi(r)?n.wrapList(i,r.parentNode.nodeName):e.each(i,function(t,n){e(n).css("marginLeft",function(e,t){return(parseInt(t,10)||0)+25})})}),i.select()},t.prototype.outdent=function(t){var n=this,i=Oe.create(t).wrapBodyInlineWithPara(),r=i.nodes(Ce.isPara,{includeAncestor:!0}),o=C.clusterBy(r,y.peq2("parentNode"));e.each(o,function(t,i){var r=C.head(i);Ce.isLi(r)?n.releaseList([i]):e.each(i,function(t,n){e(n).css("marginLeft",function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""})})}),i.select()},t.prototype.toggleList=function(t,n){var i=this,r=Oe.create(n).wrapBodyInlineWithPara(),o=r.nodes(Ce.isPara,{includeAncestor:!0}),s=r.paraBookmark(o),a=C.clusterBy(o,y.peq2("parentNode"));if(C.find(o,Ce.isPurePara)){var l=[];e.each(a,function(e,n){l=l.concat(i.wrapList(n,t))}),o=l}else{var c=r.nodes(Ce.isList,{includeAncestor:!0}).filter(function(n){return!e.nodeName(n,t)});c.length?e.each(c,function(e,n){Ce.replace(n,t)}):o=this.releaseList(a,!0)}Oe.createFromParaBookmark(s,o).select()},t.prototype.wrapList=function(e,t){var n=C.head(e),i=C.last(e),r=Ce.isList(n.previousSibling)&&n.previousSibling,o=Ce.isList(i.nextSibling)&&i.nextSibling,s=r||Ce.insertAfter(Ce.create(t||"UL"),i);return e=e.map(function(e){return Ce.isPurePara(e)?Ce.replace(e,"LI"):e}),Ce.appendChildNodes(s,e),o&&(Ce.appendChildNodes(s,C.from(o.childNodes)),Ce.remove(o)),e},t.prototype.releaseList=function(t,n){var i=[];return e.each(t,function(t,r){var o=C.head(r),s=C.last(r),a=n?Ce.lastAncestor(o,Ce.isList):o.parentNode,l=a.childNodes.length>1?Ce.splitTree(a,{node:s.parentNode,offset:Ce.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,c=Ce.splitTree(a,{node:o.parentNode,offset:Ce.position(o)},{isSkipPaddingBlankHTML:!0});r=n?Ce.listDescendant(c,Ce.isLi):C.from(c.childNodes).filter(Ce.isLi),!n&&Ce.isList(a.parentNode)||(r=r.map(function(e){return Ce.replace(e,"P")})),e.each(C.from(r).reverse(),function(e,t){Ce.insertAfter(t,a)});var u=C.compact([a,c,l]);e.each(u,function(t,n){var i=[n].concat(Ce.listDescendant(n,Ce.isList));e.each(i.reverse(),function(e,t){Ce.nodeLength(t)||Ce.remove(t,!0)})}),i=i.concat(r)}),i},t}(),Me=function(){function t(){this.bullet=new Pe}return t.prototype.insertTab=function(e,t){var n=Ce.createText(new Array(t+1).join(Ce.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=Oe.create(n,t)).select()},t.prototype.insertParagraph=function(t){var n=Oe.create(t);n=(n=n.deleteContents()).wrapBodyInlineWithPara();var i,r=Ce.ancestor(n.sc,Ce.isPara);if(r){if(Ce.isEmpty(r)&&Ce.isLi(r))return void this.bullet.toggleList(r.parentNode.nodeName);if(Ce.isEmpty(r)&&Ce.isPara(r)&&Ce.isBlockquote(r.parentNode))Ce.insertAfter(r,r.parentNode),i=r;else{i=Ce.splitTree(r,n.getStartPoint());var o=Ce.listDescendant(r,Ce.isEmptyAnchor);o=o.concat(Ce.listDescendant(i,Ce.isEmptyAnchor)),e.each(o,function(e,t){Ce.remove(t)}),(Ce.isHeading(i)||Ce.isPre(i)||Ce.isCustomStyleTag(i))&&Ce.isEmpty(i)&&(i=Ce.replace(i,"p"))}}else{var s=n.sc.childNodes[n.so];i=e(Ce.emptyPara)[0],s?n.sc.insertBefore(i,s):n.sc.appendChild(i)}Oe.create(i,0).normalize().select().scrollIntoView(t)},t}(),Le=function(e,t,n,i){var r={colPos:0,rowPos:0},o=[],s=[];function a(e,t,n,i,r,s,a){var l={baseRow:n,baseCell:i,isRowSpan:r,isColSpan:s,isVirtual:a};o[e]||(o[e]=[]),o[e][t]=l}function l(e,t){if(!o[e])return t;if(!o[e][t])return t;for(var n=t;o[e][n];)if(!o[e][++n])return n}function c(e,t){var n=l(e.rowIndex,t.cellIndex),i=t.colSpan>1,o=t.rowSpan>1,s=e.rowIndex===r.rowPos&&t.cellIndex===r.colPos;a(e.rowIndex,n,e,t,o,i,!1);var c=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(c>1)for(var d=1;d<c;d++){var h=e.rowIndex+d;u(h,n,t,s),a(h,n,e,t,!0,i,!0)}var p=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var g=l(e.rowIndex,n+f);u(e.rowIndex,g,t,s),a(e.rowIndex,g,e,t,o,!0,!0)}}function u(e,t,n,i){e===r.rowPos&&r.colPos>=n.cellIndex&&n.cellIndex<=t&&!i&&r.colPos++}function d(e){switch(t){case Le.where.Column:if(e.isColSpan)return Le.resultAction.SubtractSpanCount;break;case Le.where.Row:if(!e.isVirtual&&e.isRowSpan)return Le.resultAction.AddCell;if(e.isRowSpan)return Le.resultAction.SubtractSpanCount}return Le.resultAction.RemoveCell}function h(e){switch(t){case Le.where.Column:if(e.isColSpan)return Le.resultAction.SumSpanCount;if(e.isRowSpan&&e.isVirtual)return Le.resultAction.Ignore;break;case Le.where.Row:if(e.isRowSpan)return Le.resultAction.SumSpanCount;if(e.isColSpan&&e.isVirtual)return Le.resultAction.Ignore}return Le.resultAction.AddCell}this.getActionList=function(){for(var e=t===Le.where.Row?r.rowPos:-1,i=t===Le.where.Column?r.colPos:-1,a=0,l=!0;l;){var c=e>=0?e:a,u=i>=0?i:a,p=o[c];if(!p)return l=!1,s;var f=p[u];if(!f)return l=!1,s;var g=Le.resultAction.Ignore;switch(n){case Le.requestAction.Add:g=h(f);break;case Le.requestAction.Delete:g=d(f)}s.push({baseCell:f.baseCell,action:g,virtualTable:{rowIndex:c,cellIndex:u}}),a++}return s},e&&e.tagName&&("td"===e.tagName.toLowerCase()||"th"===e.tagName.toLowerCase())?(r.colPos=e.cellIndex,e.parentElement&&e.parentElement.tagName&&"tr"===e.parentElement.tagName.toLowerCase()?r.rowPos=e.parentElement.rowIndex:console.error("Impossible to identify start Row point.",e)):console.error("Impossible to identify start Cell point.",e),function(){for(var e=i.rows,t=0;t<e.length;t++)for(var n=e[t].cells,r=0;r<n.length;r++)c(e[t],n[r])}()};Le.where={Row:0,Column:1},Le.requestAction={Add:0,Delete:1},Le.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var je,Fe=function(){function t(){}return t.prototype.tab=function(e,t){var n=Ce.ancestor(e.commonAncestor(),
1Ce.isCell),i=Ce.ancestor(n,Ce.isTable),r=Ce.listDescendant(i,Ce.isCell),o=C[t?"prev":"next"](r,n);o&&Oe.create(o,0).select()},t.prototype.addRow=function(t,n){for(var i=Ce.ancestor(t.commonAncestor(),Ce.isCell),r=e(i).closest("tr"),o=this.recoverAttributes(r),s=e("<tr"+o+"></tr>"),a=new Le(i,Le.where.Row,Le.requestAction.Add,e(r).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case Le.resultAction.AddCell:s.append("<td"+u+">"+Ce.blank+"</td>");break;case Le.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=r[0].rowIndex){var d=e("<div></div>").append(e("<td"+u+">"+Ce.blank+"</td>").removeAttr("rowspan")).html();s.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);c.baseCell.setAttribute("rowSpan",++h)}}if("top"===n)r.before(s);else{if(i.rowSpan>1){var p=r[0].rowIndex+(i.rowSpan-2);return void e(e(r).parent().find("tr")[p]).after(e(s))}r.after(s)}},t.prototype.addCol=function(t,n){var i=Ce.ancestor(t.commonAncestor(),Ce.isCell),r=e(i).closest("tr");e(r).siblings().push(r);for(var o=new Le(i,Le.where.Column,Le.requestAction.Add,e(r).closest("table")[0]).getActionList(),s=0;s<o.length;s++){var a=o[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case Le.resultAction.AddCell:"right"===n?e(a.baseCell).after("<td"+l+">"+Ce.blank+"</td>"):e(a.baseCell).before("<td"+l+">"+Ce.blank+"</td>");break;case Le.resultAction.SumSpanCount:if("right"===n){var c=parseInt(a.baseCell.colSpan,10);a.baseCell.setAttribute("colSpan",++c)}else e(a.baseCell).before("<td"+l+">"+Ce.blank+"</td>")}}},t.prototype.recoverAttributes=function(e){var t="";if(!e)return t;for(var n=e.attributes||[],i=0;i<n.length;i++)"id"!==n[i].name.toLowerCase()&&n[i].specified&&(t+=" "+n[i].name+"='"+n[i].value+"'");return t},t.prototype.deleteRow=function(t){for(var n=Ce.ancestor(t.commonAncestor(),Ce.isCell),i=e(n).closest("tr"),r=i.children("td, th").index(e(n)),o=i[0].rowIndex,s=new Le(n,Le.where.Row,Le.requestAction.Delete,e(i).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(s[a].action){case Le.resultAction.Ignore:continue;case Le.resultAction.AddCell:var h=i.next("tr")[0];if(!h)continue;var p=i[0].cells[r];u&&(d>2?(d--,h.insertBefore(p,h.cells[r]),h.cells[r].setAttribute("rowSpan",d),h.cells[r].innerHTML=""):2===d&&(h.insertBefore(p,h.cells[r]),h.cells[r].removeAttribute("rowSpan"),h.cells[r].innerHTML=""));continue;case Le.resultAction.SubtractSpanCount:u&&(d>2?(l.setAttribute("rowSpan",--d),c.rowIndex!==o&&l.cellIndex===r&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==o&&l.cellIndex===r&&(l.innerHTML="")));continue;case Le.resultAction.RemoveCell:continue}}i.remove()},t.prototype.deleteCol=function(t){for(var n=Ce.ancestor(t.commonAncestor(),Ce.isCell),i=e(n).closest("tr"),r=i.children("td, th").index(e(n)),o=new Le(n,Le.where.Column,Le.requestAction.Delete,e(i).closest("table")[0]).getActionList(),s=0;s<o.length;s++)if(o[s])switch(o[s].action){case Le.resultAction.Ignore:continue;case Le.resultAction.SubtractSpanCount:var a=o[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(a.setAttribute("colSpan",--l),a.cellIndex===r&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===r&&(a.innerHTML=""))}continue;case Le.resultAction.RemoveCell:Ce.remove(o[s].baseCell,!0);continue}},t.prototype.createTable=function(t,n,i){for(var r,o=[],s=0;s<t;s++)o.push("<td>"+Ce.blank+"</td>");r=o.join("");for(var a,l=[],c=0;c<n;c++)l.push("<tr>"+r+"</tr>");a=l.join("");var u=e("<table>"+a+"</table>");return i&&i.tableClassName&&u.addClass(i.tableClassName),u[0]},t.prototype.deleteTable=function(t){var n=Ce.ancestor(t.commonAncestor(),Ce.isCell);e(n).closest("table").remove()},t}(),Ue=function(){function t(t){var n=this;this.context=t,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.style=new Ne,this.table=new Fe,this.typing=new Me,this.bullet=new Pe,this.history=new xe(this.$editable),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],r=0,o=i.length;r<o;r++)this[i[r]]=function(e){return function(t){n.beforeCommand(),document.execCommand(e,!1,t),n.afterCommand(!0)}}(i[r]),this.context.memo("help."+i[r],this.lang.help[i[r]]);for(this.fontName=this.wrapCommand(function(e){return n.fontStyling("font-family","'"+e+"'")}),this.fontSize=this.wrapCommand(function(e){return n.fontStyling("font-size",e+"px")}),r=1;r<=6;
1r++)this["formatH"+r]=function(e){return function(){n.formatBlock("H"+e)}}(r),this.context.memo("help.formatH"+r,this.lang.help["formatH"+r]);this.insertParagraph=this.wrapCommand(function(){n.typing.insertParagraph(n.editable)}),this.insertOrderedList=this.wrapCommand(function(){n.bullet.insertOrderedList(n.editable)}),this.insertUnorderedList=this.wrapCommand(function(){n.bullet.insertUnorderedList(n.editable)}),this.indent=this.wrapCommand(function(){n.bullet.indent(n.editable)}),this.outdent=this.wrapCommand(function(){n.bullet.outdent(n.editable)}),this.insertNode=this.wrapCommand(function(t){n.isLimited(e(t).text().length)||(n.createRange().insertNode(t),Oe.createFromNodeAfter(t).select())}),this.insertText=this.wrapCommand(function(e){if(!n.isLimited(e.length)){var t=n.createRange().insertNode(Ce.createText(e));Oe.create(t,Ce.nodeLength(t)).select()}}),this.pasteHTML=this.wrapCommand(function(e){if(!n.isLimited(e.length)){var t=n.createRange().pasteHTML(e);Oe.createFromNodeAfter(C.last(t)).select()}}),this.formatBlock=this.wrapCommand(function(e,t){var i=n.options.callbacks.onApplyCustomStyle;i?i.call(n,t,n.context,n.onFormatBlock):n.onFormatBlock(e,t)}),this.insertHorizontalRule=this.wrapCommand(function(){var e=n.createRange().insertNode(Ce.create("HR"));e.nextSibling&&Oe.create(e.nextSibling,0).normalize().select()}),this.lineHeight=this.wrapCommand(function(e){n.style.stylePara(n.createRange(),{lineHeight:e})}),this.createLink=this.wrapCommand(function(t){var i=t.url,r=t.text,o=t.isNewWindow,s=t.range||n.createRange(),a=s.toString()!==r;"string"==typeof i&&(i=i.trim()),i=n.options.onCreateLink?n.options.onCreateLink(i):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(i)?i:"http://"+i;var l=[];if(a){var c=(s=s.deleteContents()).insertNode(e("<A>"+r+"</A>")[0]);l.push(c)}else l=n.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});e.each(l,function(t,n){e(n).attr("href",i),o?e(n).attr("target","_blank"):e(n).removeAttr("target")});var u=Oe.createFromNodeBefore(C.head(l)).getStartPoint(),d=Oe.createFromNodeAfter(C.last(l)).getEndPoint();Oe.create(u.node,u.offset,d.node,d.offset).select()}),this.color=this.wrapCommand(function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)}),this.foreColor=this.wrapCommand(function(e){document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,e)}),this.insertTable=this.wrapCommand(function(e){var t=e.split("x");n.createRange().deleteContents().insertNode(n.table.createTable(t[0],t[1],n.options))}),this.removeMedia=this.wrapCommand(function(){var t=e(n.restoreTarget()).parent();t.parent("figure").length?t.parent("figure").remove():t=e(n.restoreTarget()).detach(),n.context.triggerEvent("media.delete",t,n.$editable)}),this.floatMe=this.wrapCommand(function(t){var i=e(n.restoreTarget());i.toggleClass("note-float-left","left"===t),i.toggleClass("note-float-right","right"===t),i.css("float",t)}),this.resize=this.wrapCommand(function(t){e(n.restoreTarget()).css({width:100*t+"%",height:""})})}return t.prototype.initialize=function(){var e=this;this.$editable.on("keydown",function(t){if(t.keyCode===Re.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),t.isDefaultPrevented()||(e.options.shortcuts?e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t))return!1}).on("keyup",function(t){e.context.triggerEvent("keyup",t)}).on("focus",function(t){e.context.triggerEvent("focus",t)}).on("blur",function(t){e.context.triggerEvent("blur",t)}).on("mousedown",function(t){e.context.triggerEvent("mousedown",t)}).on("mouseup",function(t){e.context.triggerEvent("mouseup",t)}).on("scroll",function(t){e.context.triggerEvent("scroll",t)}).on("paste",function(t){e.context.triggerEvent("paste",t)}),this.$editable.html(Ce.html(this.$note)||Ce.emptyPara),this.$editable.on(P.inputEventName,y.debounce(function(){e.context.triggerEvent("change",e.$editable.html())},100)),this.$editor.on("focusin",function(t){e.context.triggerEvent("focusin",t)}).on("focusout",function(t){e.context.triggerEvent("focusout",t)}),this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo()},t.prototype.destroy=function(){this.$editable.off()},t.prototype.handleKeyMap=function(e){var t=this.options.keyMap[P.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");
1var i=Re.nameFromCode[e.keyCode];i&&n.push(i);var r=t[n.join("+")];r?!1!==this.context.invoke(r)&&e.preventDefault():Re.isEdit(e.keyCode)&&this.afterCommand()},t.prototype.preventDefaultEditableShortCuts=function(e){(e.ctrlKey||e.metaKey)&&C.contains([66,73,85],e.keyCode)&&e.preventDefault()},t.prototype.isLimited=function(e,t){return e=e||0,(void 0===t||!(Re.isMove(t.keyCode)||t.ctrlKey||t.metaKey||C.contains([Re.code.BACKSPACE,Re.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>=this.options.maxTextLength},t.prototype.createRange=function(){return this.focus(),Oe.create(this.editable)},t.prototype.saveRange=function(e){this.lastRange=this.createRange(),e&&this.lastRange.collapse().select()},t.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},t.prototype.saveTarget=function(e){this.$editable.data("target",e)},t.prototype.clearTarget=function(){this.$editable.removeData("target")},t.prototype.restoreTarget=function(){return this.$editable.data("target")},t.prototype.currentStyle=function(){var e=Oe.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)},t.prototype.styleFromNode=function(e){return this.style.fromNode(e)},t.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html())},t.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html())},t.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.focus()},t.prototype.afterCommand=function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html())},t.prototype.tab=function(){var e=this.createRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}},t.prototype.untab=function(){var e=this.createRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1},t.prototype.wrapCommand=function(e){var t=this;return function(){t.beforeCommand(),e.apply(t,arguments),t.afterCommand()}},t.prototype.insertImage=function(t,n){var i,r=this;return(i=t,e.Deferred(function(t){var n=e("<img>");n.one("load",function(){n.off("error abort"),t.resolve(n)}).one("error abort",function(){n.off("load").detach(),t.reject(n)}).css({display:"none"}).appendTo(document.body).attr("src",i)}).promise()).then(function(e){r.beforeCommand(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(r.$editable.width(),e.width()))),e.show(),Oe.create(r.editable).insertNode(e[0]),Oe.createFromNodeAfter(e[0]).select(),r.afterCommand()}).fail(function(e){r.context.triggerEvent("image.upload.error",e)})},t.prototype.insertImages=function(t){var n=this;e.each(t,function(t,i){var r,o=i.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<i.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):(r=i,e.Deferred(function(t){e.extend(new FileReader,{onload:function(e){t.resolve(e.target.result)},onerror:function(e){t.reject(e)}}).readAsDataURL(r)}).promise()).then(function(e){return n.insertImage(e,o)}).fail(function(){n.context.triggerEvent("image.upload.error")})})},t.prototype.insertImagesOrCallback=function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImages(e)},t.prototype.getSelectedText=function(){var e=this.createRange();return e.isOnAnchor()&&(e=Oe.createFromNode(Ce.ancestor(e.sc,Ce.isAnchor))),e.toString()},t.prototype.onFormatBlock=function(t,n){if(t=P.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t),n&&n.length){var i=n[0].className||"";if(i){var r=this.createRange();e([r.sc,r.ec]).closest(t).addClass(i)}}},t.prototype.formatPara=function(){this.formatBlock("P")},t.prototype.fontStyling=function(t,n){var i=this.createRange();if(i){var r=this.style.styleNodes(i);if(e(r).css(t,n),i.isCollapsed()){var o=C.head(r);
1o&&!Ce.nodeLength(o)&&(o.innerHTML=Ce.ZERO_WIDTH_NBSP_CHAR,Oe.createFromNodeAfter(o.firstChild).select(),this.$editable.data("bogus",o))}}},t.prototype.unlink=function(){var e=this.createRange();if(e.isOnAnchor()){var t=Ce.ancestor(e.sc,Ce.isAnchor);(e=Oe.createFromNode(t)).select(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}},t.prototype.getLinkInfo=function(){var t=this.createRange().expand(Ce.isAnchor),n=e(C.head(t.nodes(Ce.isAnchor))),i={range:t,text:t.toString(),url:n.length?n.attr("href"):""};return n.length&&(i.isNewWindow="_blank"===n.attr("target")),i},t.prototype.addRow=function(e){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())},t.prototype.addCol=function(e){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())},t.prototype.deleteRow=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())},t.prototype.deleteCol=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())},t.prototype.deleteTable=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())},t.prototype.resizeTo=function(e,t,n){var i;if(n){var r=e.y/e.x,o=t.data("ratio");i={width:o>r?e.x:e.y/o,height:o>r?e.x*o:e.y}}else i={width:e.x,height:e.y};t.css(i)},t.prototype.hasFocus=function(){return this.$editable.is(":focus")},t.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},t.prototype.isEmpty=function(){return Ce.isEmpty(this.$editable[0])||Ce.emptyPara===this.$editable.html()},t.prototype.empty=function(){this.context.invoke("code",Ce.emptyPara)},t.prototype.normalizeContent=function(){this.$editable[0].normalize()},t}(),He=function(){function e(e){this.context=e,this.$editable=e.layoutInfo.editable}return e.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},e.prototype.pasteByEvent=function(e){var t=e.originalEvent.clipboardData;if(t&&t.items&&t.items.length){var n=C.head(t.items);"file"===n.kind&&-1!==n.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[n.getAsFile()]),this.context.invoke("editor.afterCommand")}},e}(),Be=function(){function t(t){this.context=t,this.$eventListener=e(document),this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=e(['<div class="note-dropzone">','  <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}return t.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},t.prototype.attachDragAndDropEvent=function(){var t=this,n=e(),i=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var r=t.context.invoke("codeview.isActivated"),o=t.$editor.width()>0&&t.$editor.height()>0;r||n.length||!o||(t.$editor.addClass("dragover"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),i.text(t.lang.image.dragImageHere)),n=n.add(e.target)},this.documentEventHandlers.onDragleave=function(e){(n=n.not(e.target)).length||t.$editor.removeClass("dragover")},this.documentEventHandlers.onDrop=function(){n=e(),t.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){t.$dropzone.addClass("hover"),i.text(t.lang.image.dropImage)}).on("dragleave",function(){t.$dropzone.removeClass("hover"),i.text(t.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(n){var i=n.originalEvent.dataTransfer;n.preventDefault(),i&&i.files&&i.files.length?(t.$editable.focus(),t.context.
1invoke("editor.insertImagesOrCallback",i.files)):e.each(i.types,function(n,r){var o=i.getData(r);r.toLowerCase().indexOf("text")>-1?t.context.invoke("editor.pasteHTML",o):e(o).each(function(e,n){t.context.invoke("editor.insertNode",n)})})}).on("dragover",!1)},t.prototype.destroy=function(){var e=this;Object.keys(this.documentEventHandlers).forEach(function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])}),this.documentEventHandlers={}},t}();P.hasCodeMirror&&(P.isSupportAmd?require(["codemirror"],function(e){je=e}):je=window.CodeMirror);var Ve=function(){function e(e){this.context=e,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.options=e.options}return e.prototype.sync=function(){this.isActivated()&&P.hasCodeMirror&&this.$codable.data("cmEditor").save()},e.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},e.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")},e.prototype.activate=function(){var e=this;if(this.$codable.val(Ce.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),P.hasCodeMirror){var t=je.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var n=new je.TernServer(this.options.codemirror.tern);t.ternServer=n,t.on("cursorActivity",function(e){n.updateArgHints(e)})}t.on("blur",function(n){e.context.triggerEvent("blur.codeview",t.getValue(),n)}),t.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",t)}else this.$codable.on("blur",function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})},e.prototype.deactivate=function(){if(P.hasCodeMirror){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=Ce.value(this.$codable,this.options.prettifyHtml)||Ce.emptyPara,n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)},e.prototype.destroy=function(){this.isActivated()&&this.deactivate()},e}(),We=function(){function t(t){this.$document=e(document),this.$statusbar=t.layoutInfo.statusbar,this.$editable=t.layoutInfo.editable,this.options=t.options}return t.prototype.initialize=function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),i=function(t){var i=t.clientY-(n+24);i=e.options.minheight>0?Math.max(i,e.options.minheight):i,i=e.options.maxHeight>0?Math.min(i,e.options.maxHeight):i,e.$editable.height(i)};e.$document.on("mousemove",i).one("mouseup",function(){e.$document.off("mousemove",i)})})},t.prototype.destroy=function(){this.$statusbar.off(),this.$statusbar.addClass("locked")},t}(),ze=function(){function t(t){var n=this;this.context=t,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.$window=e(window),this.$scrollbar=e("html, body"),this.onResize=function(){n.resizeTo({h:n.$window.height()-n.$toolbar.outerHeight()})}}return t.prototype.resizeTo=function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)},t.prototype.toggle=function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}
1),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},t.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},t}(),qe=function(){function t(t){var n=this;this.context=t,this.$document=e(document),this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){n.update(t.target)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){n.update()},"summernote.disable":function(){n.hide()},"summernote.codeview.toggled":function(){n.update()}}}return t.prototype.initialize=function(){var t=this;this.$handle=e(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"n
1ote-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(e){if(Ce.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var n=t.$handle.find(".note-control-selection").data("target"),i=n.offset(),r=t.$document.scrollTop(),o=function(e){t.context.invoke("editor.resizeTo",{x:e.clientX-i.left,y:e.clientY-(i.top-r)},n,!e.shiftKey),t.update(n[0])};t.$document.on("mousemove",o).one("mouseup",function(e){e.preventDefault(),t.$document.off("mousemove",o),t.context.invoke("editor.afterCommand")}),n.data("ratio")||n.data("ratio",n.height()/n.width())}}),this.$handle.on("wheel",function(e){e.preventDefault(),t.update()})},t.prototype.destroy=function(){this.$handle.remove()},t.prototype.update=function(t){if(this.context.isDisabled())return!1;var n=Ce.isImg(t),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t),n){var r=e(t),o=r.position(),s={left:o.left+parseInt(r.css("marginLeft"),10),top:o.top+parseInt(r.css("marginTop"),10)},a={w:r.outerWidth(!1),h:r.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",r);var l=new Image;l.src=r.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";i.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",t)}else this.hide();return n},t.prototype.hide=function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()},t}(),Ge=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Ye=function(){function t(e){var t=this;
1this.context=e,this.events={"summernote.keyup":function(e,n){n.isDefaultPrevented()||t.handleKeyup(n)},"summernote.keydown":function(e,n){t.handleKeydown(n)}}}return t.prototype.initialize=function(){this.lastWordRange=null},t.prototype.destroy=function(){this.lastWordRange=null},t.prototype.replace=function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),n=t.match(Ge);if(n&&(n[1]||n[2])){var i=n[1]?t:"http://"+t,r=e("<a />").html(t).attr("href",i)[0];this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}},t.prototype.handleKeydown=function(e){if(C.contains([Re.code.ENTER,Re.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}},t.prototype.handleKeyup=function(e){C.contains([Re.code.ENTER,Re.code.SPACE],e.keyCode)&&this.replace()},t}(),$e=function(){function e(e){var t=this;this.$note=e.layoutInfo.note,this.events={"summernote.change":function(){t.$note.val(e.invoke("code"))}}}return e.prototype.shouldInitialize=function(){return Ce.isTextarea(this.$note[0])},e}(),Ke=function(){function t(e){var t=this;this.context=e,this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,this.events={"summernote.init summernote.change":function(){t.update()},"summernote.codeview.toggled":function(){t.update()}}}return t.prototype.shouldInitialize=function(){return!!this.options.placeholder},t.prototype.initialize=function(){var t=this;this.$placeholder=e('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.context.invoke("focus")}).text(this.options.placeholder).prependTo(this.$editingArea),this.update()},t.prototype.destroy=function(){this.$placeholder.remove()},t.prototype.update=function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)},t}(),Je=function(){function t(t){this.ui=e.summernote.ui,this.context=t,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.lang=this.options.langInfo,this.invertedKeyMap=y.invertObject(this.options.keyMap[P.isMac?"mac":"pc"])}return t.prototype.representShortcut=function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(P.isMac&&(t=t.replace("CMD","\u2318").replace("SHIFT","\u21e7"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},t.prototype.button=function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)},t.prototype.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},t.prototype.destroy=function(){delete this.fontInstalledMap},t.prototype.isFontInstalled=function(e){return this.fontInstalledMap.hasOwnProperty(e)||(this.fontInstalledMap[e]=P.isFontInstalled(e)||C.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]},t.prototype.isFontDeservedToAdd=function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===e.inArray(t,["sans-serif","serif","monospace","cursive","fantasy"])},t.prototype.addToolbarButtons=function(){var t=this;this.context.memo("button.style",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),tooltip:t.lang.style.style,data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,title:t.lang.style.style,template:function(e){"string"==typeof e&&(e={tag:e,title:t.lang.style.hasOwnProperty(e)?t.lang.style[e]:e});var n=e.tag;return"<"+n+(e.style?' style="'+e.style+'" ':"")+(e.className?' class="'+e.className+'"':"")+">"+e.title+"</"+n+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var n=function(e,n){var r=i.options.styleTags[e];i.context.memo("button.style."+r,function(){return t.button({className:"note-btn-style-"+r,contents:'<div data-value="'+r+'">'+r.toUpperCase()+"</div>",tooltip:t.lang.style[r],click:t.context.createInvokeHandler("editor.formatBlock")}).render()})},i=this,r=0,o=this.options.styleTags.length;r<o;r++)n(r);this.context.memo("button.bold",function(){return t.button({className:"note-btn-bold",contents:t.ui.icon(t.options.icons.bold),tooltip:t.lang.font.bold+t.representShortcut("bold"),click:t.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return t.button({className:"note-btn-italic",contents:t.ui.icon(t.options.icons.italic),tooltip:t.lang.font.italic+t.representShortcut("italic"),click:t.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return t.button({className:"note-btn-underline",contents:t.ui.icon(t.options.icons.underline),tooltip:t.lang.font.underline+t.representShortcut("underline"),click:t.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return t.button({contents:t.ui.icon(t.options.icons.eraser),tooltip:t.lang.font.clear+t.representShortcut("removeFormat"),click:t.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return t.button({className:"note-btn-strikethrough",contents:t.ui.icon(t.options.icons.strikethrough),tooltip:t.lang.font.strikethrough+t.representShortcut("strikethrough"),click:t.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return t.button({className:"note-btn-superscript",contents:t.ui.icon(t.options.icons.superscript),tooltip:t.lang.font.superscript,click:t.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return t.button({className:"note-btn-subscript",contents:t.ui.icon(t.options.icons.subscript),tooltip:t.lang.font.subscript,click:t.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var n=t.context.
1invoke("editor.currentStyle");return e.each(n["font-family"].split(","),function(n,i){i=i.trim().replace(/['"]+/g,""),t.isFontDeservedToAdd(i)&&-1===e.inArray(i,t.options.fontNames)&&t.options.fontNames.push(i)}),t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontname"/>',t.options),tooltip:t.lang.font.name,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(e){return"<span style=\"font-family: '"+e+"'\">"+e+"</span>"},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',t.options),tooltip:t.lang.font.size,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.color",function(){return t.ui.buttonGroup({className:"note-color",children:[t.button({className:"note-current-color-button",contents:t.ui.icon(t.options.icons.font+" note-recent-color"),tooltip:t.lang.color.recent,click:function(n){var i=e(n.currentTarget);t.context.invoke("editor.color",{backColor:i.attr("data-backColor"),foreColor:i.attr("data-foreColor")})},callback:function(e){e.find(".note-recent-color").css("background-color","#FFFF00"),e.attr("data-backColor","#FFFF00")}}),t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents("",t.options),tooltip:t.lang.color.more,data:{toggle:"dropdown"}}),t.ui.dropdown({items:['<div class="note-palette">','  <div class="note-palette-title">'+t.lang.color.background+"</div>","  <div>",'    <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',t.lang.color.transparent,"    </button>","  </div>",'  <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="note-palette">','  <div class="note-palette-title">'+t.lang.color.foreground+"</div>","  <div>",'    <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',t.lang.color.resetToDefault,"    </button>","  </div>",'  <div class="note-holder" data-event="foreColor"/>',"</div>"].join(""),callback:function(n){n.find(".note-holder").each(function(n,i){var r=e(i);r.append(t.ui.palette({colors:t.options.colors,colorsName:t.options.colorsName,eventName:r.data("event"),container:t.options.container,tooltip:t.options.tooltip}).render())})},click:function(n){var i=e(n.target),r=i.data("event"),o=i.data("value");if(r&&o){var s="backColor"===r?"background-color":"color",a=i.closest(".note-color").find(".note-recent-color"),l=i.closest(".note-color").find(".note-current-color-button");a.css(s,o),l.attr("data-"+r,o),t.context.invoke("editor."+r,o)}}})]}).render()}),this.context.memo("button.ul",function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.context.createInvokeHandler("editor.insertOrderedList")}).render()});var s=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),l=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),c=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),u=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),d=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",y.invoke(s,"render")),this.context.memo("button.justifyCenter",y.invoke(a,"render")),this.context.memo("button.justifyRight",y.invoke(l,"render")),this.context.memo("button.justifyFull",y.invoke(c,"render")),this.context.memo("button.outdent",y.invoke(u,"render")),this.context.memo("button.indent",y.invoke(d,"render")),this.context.memo("button.paragraph",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),tooltip:t.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[s,a,l,c]}),t.ui.buttonGroup({className:"note-list",children:[u,d]})])]).render()}),this.context.memo("button.height",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),tooltip:t.lang.font.height,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",title:t.lang.font.height,click:t.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),tooltip:t.lang.table.table,data:{toggle:"dropdown"}}),t.ui.dropdown({title:t.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','  <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>','  <div class="note-dimension-picker-highlighted"/>','  <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(e){e.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()}),this.context.memo("button.link",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.
1image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return t.button({className:"btn-fullscreen",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return t.button({className:"btn-codeview",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()})},t.prototype.addImagePopoverButtons=function(){var e=this;this.context.memo("button.imageSize100",function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}
1).render()}),this.context.memo("button.imageSize50",function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.imageSize25",function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.floatLeft",function(){return e.button({contents:e.ui.icon(e.options.icons.alignLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return e.button({contents:e.ui.icon(e.options.icons.alignRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return e.button({contents:e.ui.icon(e.options.icons.alignJustify),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()})},t.prototype.addLinkPopoverButtons=function(){var e=this;this.context.memo("button.linkDialogShow",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()})},t.prototype.addTablePopoverButtons=function(){var e=this;this.context.memo("button.addRowUp",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()})},t.prototype.build=function(t,n){for(var i=0,r=n.length;i<r;i++){for(var o=n[i],s=e.isArray(o)?o[0]:o,a=e.isArray(o)?1===o.length?[o[0]]:o[1]:[o],l=this.ui.buttonGroup({className:"note-"+s}).render(),c=0,u=a.length;c<u;c++){var d=this.context.memo("button."+a[c]);d&&l.append("function"==typeof d?d(this.context):d)}l.appendTo(t)}},t.prototype.updateCurrentStyle=function(t){var n=this,i=t||this.$toolbar,r=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(i,{".note-btn-bold":function(){return"bold"===r["font-bold"]},".note-btn-italic":function(){return"italic"===r["font-italic"]},".note-btn-underline":function(){return"underline"===r["font-underline"]},".note-btn-subscript":function(){return"subscript"===r["font-subscript"]},".note-btn-superscript":function(){return"superscript"===r["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===r["font-strikethrough"]}}),r["font-family"]){var o=r["font-family"].split(",").map(function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),s=C.find(o,this.isFontInstalled.bind(this));i.find(".dropdown-fontname a").each(function(t,n){var i=e(n),r=i.data("value")+""==s+"";i.toggleClass("checked",r)}),i.find(".note-current-fontname").text(s).css("font-family",s)}if(r["font-size"]){var a=r["font-size"];i.find(".dropdown-fontsize a").each(function(t,n){var i=e(n),r=i.data("value")+""==a+"";i.toggleClass("checked",r)}),i.find(".note-current-fontsize").text(a)}if(r["line-height"]){var l=r["line-height"];i.find(".dropdown-line-height li a").each(function(t,i){var r=e(i).data("value")+""==l+"";n.className=r?"checked":""})}},t.prototype.updateBtnStates=function(t,n){var i=this;e.each(n,function(e,n){i.ui.toggleBtnActive(t.find(e),n())})},t.prototype.tableMoveHandler=function(t){var n,i=e(t.target.parentNode),r=i.next(),o=i.find(".note-dimension-picker-mousecatcher"),s=i.find(".note-dimension-picker-highlighted"),a=i.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var l=e(t.target).offset();n={x:t.pageX-l.left,y:t.pageY-l.top}}else n={x:t.offsetX,y:t.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;
1s.css({width:c+"em",height:u+"em"}),o.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&a.css({height:u+1+"em"}),r.html(c+" x "+u)},t}(),Xe=function(){function t(t){this.context=t,this.$window=e(window),this.$document=e(document),this.ui=e.summernote.ui,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.followScroll=this.followScroll.bind(this)}return t.prototype.shouldInitialize=function(){return!this.options.airMode},t.prototype.initialize=function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){e.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},t.prototype.destroy=function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},t.prototype.followScroll=function(){if(this.$editor.hasClass("fullscreen"))return!1;var t=this.$toolbar.parent(".note-toolbar-wrapper"),n=this.$editor.outerHeight(),i=this.$editor.width(),r=this.$toolbar.height();t.css({height:r});var o=0;this.options.otherStaticBar&&(o=e(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top;this.$toolbar.css(s>a-o&&s<a+n-o-r?{position:"fixed",top:o,width:i}:{position:"relative",top:0,width:"100%"})},t.prototype.changeContainer=function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer)},t.prototype.updateFullscreen=function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)},t.prototype.updateCodeview=function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()},t.prototype.activate=function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview")),this.ui.toggleBtn(t,!0)},t.prototype.deactivate=function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview")),this.ui.toggleBtn(t,!1)},t}(),Qe=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo,t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,n=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"</label>",'<input class="note-link-text form-control note-form-control  note-input" type="text" />',"</div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"</label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"</div>",this.options.disableLinkTarget?"":e("<div/>").append(this.ui.checkbox({id:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join("");this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:'<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" disabled>'+this.lang.link.insert+"</button>"}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Re.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.toggleLinkBtn=function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())},t.prototype.showLinkDialog=function(t){var n=this;return e.Deferred(function(e){var i=n.$dialog.find(".note-link-text"),r=n.$dialog.find(".note-link-url"),o=n.$dialog.find(".note-link-btn"),s=n.$dialog.find("input[type=checkbox]");n.ui.onDialogShown(n.$dialog,function(){n.context.triggerEvent("dialog.shown"),t.url||(t.url=t.text),i.val(t.text);var a=function(){n.toggleLinkBtn(o,i,r),t.text=i.val()};i.on("input",a).on("paste",function(){setTimeout(a,0)});var l=function(){n.toggleLinkBtn(o,i,r),t.text||i.val(r.val())};r.on("input",l).on("paste",function(){setTimeout(l,0)}).val(t.url),P.isSupportTouch||r.trigger("focus"),n.toggleLinkBtn(o,i,r),n.bindEnterKey(r,o),n.bindEnterKey(i,o),s.prop("checked",void 0!==t.isNewWindow?t.isNewWindow:n.context.options.linkTargetBlank),o.one("click",function(o){o.preventDefault(),e.resolve({range:t.range,url:r.val(),text:i.val(),isNewWindow:s.is(":checked")}),n.ui.hideDialog(n.$dialog)})}),n.ui.onDialogHidden(n.$dialog,function(){i.off("input paste keypress"),r.off("input paste keypress"),o.off("
1click"),"pending"===e.state()&&e.reject()}),n.ui.showDialog(n.$dialog)}).promise()},t.prototype.show=function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then(function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t}(),Ze=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){n.update()},"summernote.disable summernote.dialog.shown":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!C.isEmpty(this.options.popover.link)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.createRange");if(t.isCollapsed()&&t.isOnAnchor()){var n=Ce.ancestor(t.sc,Ce.isAnchor),i=e(n).attr("href");this.$popover.find("a").attr("href",i).html(i);var r=Ce.posFromPlaceholder(n);this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),et=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t="";if(this.options.maximumImageFileSize){var n=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),i=1*(this.options.maximumImageFileSize/Math.pow(1024,n)).toFixed(2)+" "+" KMGTP"[n]+"B";t="<small>"+this.lang.image.maximumFileSize+" : "+i+"</small>"}var r=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input class="note-image-input note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',t,"</div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"</label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"</div>"].join("");this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:r,footer:'<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" disabled>'+this.lang.image.insert+"</button>"}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Re.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.show=function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),e.context.invoke("string"==typeof t?"editor.insertImage":"editor.insertImagesOrCallback",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t.prototype.showImageDialog=function(){var t=this;return e.Deferred(function(e){var n=t.$dialog.find(".note-image-input"),i=t.$dialog.find(".note-image-url"),r=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",function(t){e.resolve(t.target.files||t.target.value)}).val("")),r.click(function(t){t.preventDefault(),e.resolve(i.val())}),i.on("keyup paste",function(){var e=i.val();t.ui.toggleBtn(r,e)}).val(""),P.isSupportTouch||i.trigger("focus"),t.bindEnterKey(i,r)}),t.ui.onDialogHidden(t.$dialog,function(){n.off("change"),i.off("keyup paste keypress"),r.off("click"),"pending"===e.state()&&e.reject()}),t.ui.showDialog(t.$dialog)})},t}(),tt=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.editable=t.layoutInfo.editable[0],this.options=t.options,this.events={"summernote.disable":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!C.isEmpty(this.options.popover.image)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");
1this.context.invoke("buttons.build",e,this.options.popover.image)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(e){if(Ce.isImg(e)){var t=Ce.posFromPlaceholder(e),n=Ce.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?event.pageX-20:t.left,top:this.options.popatmouse?event.pageY:Math.min(t.top,n.top)})}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),nt=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.mousedown":function(e,t){n.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){n.update()},"summernote.disable":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!C.isEmpty(this.options.popover.table)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),P.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(e){if(this.context.isDisabled())return!1;var t=Ce.isCell(e);if(t){var n=Ce.posFromPlaceholder(e);this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide();return t},t.prototype.hide=function(){this.$popover.hide()},t}(),it=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"</small></label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"</div>"].join("");this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:'<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" disabled>'+this.lang.video.insert+"</button>"}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Re.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.createVideoNode=function(t){var n,i=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/),r=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),o=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),a=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),l=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),c=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),u=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),d=t.match(/^.+.(mp4|m4v)$/),h=t.match(/^.+.(ogg|ogv)$/),p=t.match(/^.+.(webm)$/);if(i&&11===i[1].length){var f=i[1];n=e("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+f).attr("width","640").attr("height","360")}else if(r&&r[0].length)n=e("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+r[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(o&&o[0].length)n=e("<iframe>").attr("frameborder",0).attr("src",o[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(a&&a[2].length)n=e("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+a[2]).attr("width","640").attr("height","360");else if(l&&l[1].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+l[1]);else if(c&&c[1].length||u&&u[2].length){var g=c&&c[1].length?c[1]:u[2];n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+g+"&amp;auto=0")}else{if(!(d||h||p))return!1;n=e("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return n.addClass("note-video-clip"),n[0]}
1,t.prototype.show=function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)}).fail(function(){e.context.invoke("editor.restoreRange")})},t.prototype.showVideoDialog=function(t){var n=this;return e.Deferred(function(e){var i=n.$dialog.find(".note-video-url"),r=n.$dialog.find(".note-video-btn");n.ui.onDialogShown(n.$dialog,function(){n.context.triggerEvent("dialog.shown"),i.val(t).on("input",function(){n.ui.toggleBtn(r,i.val())}),P.isSupportTouch||i.trigger("focus"),r.click(function(t){t.preventDefault(),e.resolve(i.val())}),n.bindEnterKey(i,r)}),n.ui.onDialogHidden(n.$dialog,function(){i.off("input"),r.off("click"),"pending"===e.state()&&e.reject()}),n.ui.showDialog(n.$dialog)})},t}(),rt=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.10</a> \xb7 ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> \xb7 ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.createShortcutList=function(){var t=this,n=this.options.keyMap[P.isMac?"mac":"pc"];return Object.keys(n).map(function(i){var r=n[i],o=e('<div><div class="help-list-item"/></div>');return o.append(e("<label><kbd>"+i+"</kdb></label>").css({width:180,"margin-right":10})).append(e("<span/>").html(t.context.memo("help."+r)||r)),o.html()}).join("")},t.prototype.showHelpDialog=function(){var t=this;return e.Deferred(function(e){t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),e.resolve()}),t.ui.showDialog(t.$dialog)}).promise()},t.prototype.show=function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){e.context.invoke("editor.restoreRange")})},t}(),ot=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){n.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){n.hide()},"summernote.focusout":function(e,t){P.isFF||t.relatedTarget&&Ce.ancestor(t.relatedTarget,y.eq(n.$popover[0]))||n.hide()}}}return t.prototype.shouldInitialize=function(){return this.options.airMode&&!C.isEmpty(this.options.popover.air)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content");this.context.invoke("buttons.build",e,this.options.popover.air)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){var e=this.context.invoke("editor.currentStyle");if(e.range&&!e.range.isCollapsed()){var t=C.last(e.range.getClientRects());if(t){var n=y.rect2bnd(t);this.$popover.css({display:"block",left:Math.max(n.left+n.width/2,0)-20,top:n.top+n.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),st=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.$editable=t.layoutInfo.editable,this.options=t.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=e.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)},"summernote.disable summernote.dialog.shown":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return this.hints.length>0},t.prototype.initialize=function(){var t=this;this.lastWordRange=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(){t.$content.find(".active").removeClass("active"),e(t).addClass("active"),t.replace()})},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.selectItem=function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHe
1ight()/2},t.prototype.moveDown=function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}},t.prototype.moveUp=function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}},t.prototype.replace=function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var t=this.nodeFromItem(e);this.lastWordRange.insertNode(t),Oe.createFromNode(t).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus")}},t.prototype.nodeFromItem=function(e){var t=this.hints[e.data("index")],n=e.data("item"),i=t.content?t.content(n):n;return"string"==typeof i&&(i=Ce.createText(i)),i},t.prototype.createItemTemplates=function(t,n){var i=this.hints[t];return n.map(function(n,r){var o=e('<div class="note-hint-item"/>');return o.append(i.template?i.template(n):n+""),o.data({index:t,item:n}),o})},t.prototype.handleKeydown=function(e){this.$popover.is(":visible")&&(e.keyCode===Re.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===Re.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===Re.code.DOWN&&(e.preventDefault(),this.moveDown()))},t.prototype.searchKeyword=function(e,t,n){var i=this.hints[e];if(i&&i.match.test(t)&&i.search){var r=i.match.exec(t);i.search(r[1],n)}else n()},t.prototype.createGroup=function(t,n){var i=this,r=e('<div class="note-hint-group note-hint-group-'+t+'"/>');return this.searchKeyword(t,n,function(e){(e=e||[]).length&&(r.html(i.createItemTemplates(t,e)),i.show())}),r},t.prototype.handleKeyup=function(e){var t=this;if(!C.contains([Re.code.ENTER,Re.code.UP,Re.code.DOWN],e.keyCode)){var n=this.context.invoke("editor.createRange").getWordRange(),i=n.toString();if(this.hints.length&&i){this.$content.empty();var r=y.rect2bnd(C.last(n.getClientRects()));r&&(this.$popover.hide(),this.lastWordRange=n,this.hints.forEach(function(e,n){e.match.test(i)&&t.createGroup(n,i).appendTo(t.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),this.$popover.css("top"===this.direction?{left:r.left,top:r.top-this.$popover.outerHeight()-5}:{left:r.left,top:r.top+r.height+5}))}else this.hide()}},t.prototype.show=function(){this.$popover.show()},t.prototype.hide=function(){this.$popover.hide()},t}(),at=function(){function t(t,n){this.ui=e.summernote.ui,this.$note=t,this.memos={},this.modules={},this.layoutInfo={},this.options=n,this.initialize()}return t.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},t.prototype.destroy=function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)},t.prototype.reset=function(){var e=this.isDisabled();this.code(Ce.emptyPara),this._destroy(),this._initialize(),e&&this.disable()},t.prototype._initialize=function(){var t=this,n=e.extend({},this.options.buttons);Object.keys(n).forEach(function(e){t.memo("button."+e,n[e])});var i=e.extend({},this.options.modules,e.summernote.plugins||{});
1Object.keys(i).forEach(function(e){t.module(e,i[e],!0)}),Object.keys(this.modules).forEach(function(e){t.initializeModule(e)})},t.prototype._destroy=function(){var e=this;Object.keys(this.modules).reverse().forEach(function(t){e.removeModule(t)}),Object.keys(this.memos).forEach(function(t){e.removeMemo(t)}),this.triggerEvent("destroy",this)},t.prototype.code=function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e)},t.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},t.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},t.prototype.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},t.prototype.triggerEvent=function(){var e=C.head(arguments),t=C.tail(C.from(arguments)),n=this.options.callbacks[y.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)},t.prototype.initializeModule=function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||y.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&Ce.attachEvents(this.$note,t.events))},t.prototype.module=function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)},t.prototype.removeModule=function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&Ce.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]},t.prototype.memo=function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t},t.prototype.removeMemo=function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]},t.prototype.createInvokeHandlerAndUpdateState=function(e,t){var n=this;return function(i){n.createInvokeHandler(e,t)(i),n.invoke("buttons.updateCurrentStyle")}},t.prototype.createInvokeHandler=function(t,n){var i=this;return function(r){r.preventDefault();var o=e(r.target);i.invoke(t,n||o.closest("[data-value]").data("value"),o)}},t.prototype.invoke=function(){var e=C.head(arguments),t=C.tail(C.from(arguments)),n=e.split("."),i=n.length>1,r=i&&C.head(n),o=i?C.last(n):C.head(n),s=this.modules[r||"editor"];return!r&&this[o]?this[o].apply(this,t):s&&s[o]&&s.shouldInitialize()?s[o].apply(s,t):void 0},t}();e.fn.extend({summernote:function(){var t=e.type(C.head(arguments)),n="string"===t,i=e.extend({},e.summernote.options,"object"===t?C.head(arguments):{});i.langInfo=e.extend(!0,{},e.summernote.lang["en-US"],e.summernote.lang[i.lang]),i.icons=e.extend(!0,{},e.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!P.isSupportTouch:i.tooltip,this.each(function(t,n){var r=e(n);if(!r.data("summernote")){var o=new at(r,i);r.data("summernote",o),r.data("summernote").triggerEvent("init",o.layoutInfo)}});var r=this.first();if(r.length){var o=r.data("summernote");if(n)return o.invoke.apply(o,C.from(arguments));i.focus&&o.invoke("editor.focus")}return this}}),e.summernote=e.extend(e.summernote,{version:"0.8.10",ui:m,dom:Ce,plugins:{},options:{modules:{editor:Ue,clipboard:He,dropzone:Be,codeview:Ve,statusbar:We,fullscreen:ze,handle:qe,hintPopover:st,autoLink:Ye,autoSync:$e,placeholder:Ke,buttons:Je,toolbar:Xe,linkDialog:Qe,linkPopover:Ze,imageDialog:et,imagePopover:tt,tablePopover:nt,videoDialog:it,helpDialog:rt,airPopover:ot},buttons:{},lang:"en-US",followingToolbar:!0,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10}
1,dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onBlurCodeview:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("AgoraRTC",[],t):"object"==typeof exports?exports.AgoraRTC=t():e.AgoraRTC=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,(function(t){return e[t]}).bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=96)}([function(e,t,n){"use strict";n.r(t);var i,r=n(11),o=n.n(r),s=n(14),a=n(2),l=n(1),c=n(48),u=n.n(c),d=n(49),h=n.n(d),p=new Array(32).fill(void 0);function f(e){return p[e]}p.push(void 0,null,!0,!1);var g=p.length;function m(e){var t=f(e);return function(e){e<36||(p[e]=g,g=e)}(e),t}var v=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});v.decode();var y=null;function b(){return null!==y&&y.buffer===i.memory.buffer||(y=new Uint8Array(i.memory.buffer)),y}function _(e,t){return v.decode(b().subarray(e,e+t))}function S(e){g===p.length&&p.push(p.length+1);var t=g;return g=p[t],p[t]=e,t}var w=0,E=new TextEncoder("utf-8"),T="function"==typeof E.encodeInto?function(e,t){return E.encodeInto(e,t)}:function(e,t){var n=E.encode(e);return t.set(n),{read:e.length,written:n.length}},C=null;function I(){return null!==C&&C.buffer===i.memory.buffer||(C=new Int32Array(i.memory.buffer)),C}var R,D=function(){function e(){u()(this,e)}return h()(e,[{key:"free",value:function(){var e=this.ptr;this.ptr=0,i.__wbg_signmanager_free(e)}},{key:"get_digest",value:function(e){return m(i.signmanager_get_digest(this.ptr,S(e)))}}],[{key:"__wrap",value:function(t){var n=Object.create(e.prototype);return n.ptr=t,n}},{key:"new",value:function(){var t=i.signmanager_new();return e.__wrap(t)}}]),e}(),A=!1,k=null,O=0,x="free",N=[],P=[],M=0;(k?Promise.resolve(k):new Promise(function(e){A||i||function e(){var t={wbg:{}};t.wbg.__wbindgen_object_drop_ref=function(e){m(e)},t.wbg.__wbindgen_string_new=function(e,t){return S(_(e,t))},t.wbg.__wbindgen_string_get=function(e,t){var n=f(t),r="string"==typeof n?n:void 0,o=null==r?0:function(e,t,n){if(void 0===n){var i=E.encode(e),r=t(i.length);return b().subarray(r,r+i.length).set(i),w=i.length,r}for(var o=e.length,s=(r=t(o),b()),a=0;a<o;a++){var l=e.charCodeAt(a);if(l>127)break;s[r+a]=l}if(a!==o){0!==a&&(e=e.slice(a)),r=n(r,o,o=a+3*e.length);var c=b().subarray(r+a,r+o);a+=T(e,c).written}return w=a,r}(r,i.__wbindgen_malloc,i.__wbindgen_realloc),s=w;I()[e/4+1]=s,I()[e/4+0]=o},t.wbg.__wbindgen_throw=function(e,t){throw new Error(_(e,t))};for(var n=Uint8Array.from(atob("55ZBgM/2Bzm2JGhNn//ljJsSorhWUYE66a1Hf8O7pfQGR2zfol8qRP6CDhsi3iG7nFZu9stSyPq/qu2Rr2w8QkTGP6Gm2cg3J5qsQgq5bcHA9mDpGv/b24uEwsixZVl1eGkdV4SB/6ayw2v48hLmNA+w5UlnTCiWwerzESQPidpSUMbamXL3pU815EQm12GhhZ9aWzo568gdZvXevBc/WHfFKQSuTgWva4e4eSmW7UxpH8sY4HlDsCTMu0WwEB8B95XsZwOp3GLgfOQmJBw036DgIKU+XGn4KpIEq77WE/h6R7sZKsFUp+u+2cDnW7IPNe7xfd9areFo0EUh0/9K9CqxUkLqMB5hlgS1fwQHRzKPhQ7gALyc6HwMCPooS0M1NrzjdfH3vUn0PeQ1GBlnrnXgiu8TunfHg5TcbBfPEbxbyiiow1Np+VEBlHNh00PiAWyu024NHaPbDGfMtzu4WF02fgkh8Pxb7bCSpCZndjTytQgAzfZxk2bbe6NoHHFnsviqYzHVpxoPEk7icHRWcZC28d2muthq673KCMQay1fJcPqSTuYhWUZS5eylIguT33lP+TBbOWQI8KtCzBN5FzqILfKzRkzrJ3L192BUF8SILdwmriv10HU9ZlQAyQA1VdegnzOl/dYk2GGsB3724y7w/7aJLHJzEfwrfIzFd5CoAft7ct+zQW2G4Wm2kpoz6uJfgrNyykQgwCO6pkPy1ADrBUuJon9ySjhgcFru6AKa99wTlIhzBw3FKFt9Aa1/1KWWy7W1wAIGzRTs/7rLXRkKFjNqGVXBdoVNTpHFtfEFsuX0X98ISr0Bennlx0h2Yl/CGNb5Kc7i3bio1XJHX24avcMsEAwfdfskCki4/dkStn7QC97YJC3z+7gD84IiEEeGcnn7gHJyeALr0ssbqDUcKqxEyheyFs9FToJziLB+eYw6nMQLmYTrQyrg3b+3YBdgx7pzNEDSyz3tmaPaikwcLSyB/Igo6U/oP/fS2TZLtmN03m4iS76YrDJAgI+2W1GboabuixVcLdxm6SQ4CzUnHSPl1knhcGhW/+OcKa53tB5j5C4wEpiENv6T9PUu4K0YwtEAqFbd/eN2wVAYCKn/nlVA8uiESxCfgs0411mRFk4i1pixJLPP5AFPG9QFZnj6X19TqmhmIhl8D6Q1rOvPCqPZV/z04HjayX4qPzPzP/5NVilN/sHhQe7ulriGmU/3rj5QEuiOymsL7EdCQMc/4mXDPdVrDBfbt6dnv11oLYGmqOP1oSBj02FtsmYrMn9pRg7HJoCh86jAnzuOYn4tGnQ4gw/89sb64NAXcoIbTIjyiHBAQCCK2Yn4I/fNF10rkQlvSvkpqLG2eYpJmpWrcouNDEUtJFR607oNraLdmUKyLc1g7SNpS+ofp1FL6rua/HFSrb5kTF2Vcy2gl+6MACbFRChKoP/un7IbYJuOima/JWFZcs/MXokIx+ijuqjMtVKaYRTzNI5ncPa2y/EXTNdUUFpMhbE7sa39Uoh6Hci/viXy2KFTNbiw+BkWOPnyOr04LjIYKlJ8ud/KvjuvNUGQOHJvj6tpZJxj97tr0OrgZCAxSHGU5JQfqEd/U0QfzGM8Wh3zdsnd9LhoIIRJAtyA2PmjwJk4zTxeYlgwPqAVTU3+9bA1QD+jLZZ3Ffk3MRq+Ar2RT8YN6ASR4bItt3omBj0LJe0zeGY3OzfhljL6LA1m4+
1IUp+CzeWo0aEjnvRk3iCJeajgdC+NUGB5qh8PWKtBeC58woavnRjvRNphXS4b9M7Aymcfq26B2YY2lS+wLf763OnGJlVdV/srgyAUJJZjarxom4zrYy23kLFB8zFzWuwSMue5Xm1YWape91JGDuRLIctrJWU47/XfLm6Zgei4xOwq1RcjikGuaZtDwcFg9aKtO+JOGJsCjy9AiPnmt+rmdX83GsT3KtTETnLv6ZQcnGtmt4H8AjFgGYePdQc40cj8VAOV8NCLspyW5w63b3g37GXJrzjm9Fym3fh27psjo5RuTs7XCSrNENxKm9jCcXPqWxyuXJSn6dhdWnw5SAnUjixXviWS4HsnYjw4Xt4cSwkqCB9naLstVXt5D2HgG4fzHFNHvnETft0mrhU81IBDTSyNFdDvFEX8cifoc6FcNq7pzXlotl2ZS1FIzNXddZrdXpBNYZPV52gtCok6ePpUR/Y8jyJpE9P3q8dmFVivVGgmKTcBKMDDbzeOfl4MpOGBtBX/Lab/kzqG42sTyOyGUyOoFXYGMUWJ33GPI2KNa/mW8zVl+imshfbj7PiK1qRUn74KjAkH4wjKnu50AONYUaiveSdwnEc1zCjZSJ3dmBKSxhWAcO2PdHBg5m9+JCiPGCVfK9dzoM8Bm7xx9noJiqt4hNiVa5di1Fd1JRN4rnd1DbKglKpAVSoqvJPxmuyH56TFE4BQjhfKbDMZezQJqx+KXDiW1JWGeDYaPVBWPYeZX6STIzC/DjS7UFlqoKgGGAGP17x8wmMRE6O/axG5jDzloCGxCmrymT0ZGCh4g54O1iDYUtmJr7Bo1d+H9RQj2Y10BxcMkLFTIZVjm9e3vtIbeRx0OdXE1Ou37J/WeJZyPXn1fszvp/KonCqVnt862LrxfoB/0sF5gk4Y/f6LVneU5hun9/V1OVre9XrnDBhcVaQa9Ye6gs8sHW9HCNchaFbkUpxSiyxVEFZIlbejbjSPFlkYOLhtQHduwZWRHWA9akqykJNG3PKvOZAaJG5nWQq8+e4K0JF/AXTKIIr4J7zDt8ZR4xb9T2gxjl1nfqzidMRIY5B4rkw0oetta+j8rqkFpTEGA+hU/tw7bDtpkPYvCguwncnCjwULNFT9I9jXx3H4Ws3WWMCit29F7kGq2Ka+rU/MjnuP0lsXkoB1rr8LawHH5gaf8rajq/BhKrGTIfjDiZG5qz+L7SZBZsMSZZ9pM1QhKju+GTD9iC+9HlhfXMtj94gz8U4h7eGXziEO7lo7LwLL6/DVMrGbkv68JYUYhGz2yBm/8cbQEh5vhakbhmpv1K6XYM9rzdsd9bwYcYt3cfKE3m+/NrUa42+RpJBdFg7cAmxsZ7/0TMyVw6Aqu2gzldb2ag4iLrPNEyW1ywaJ2DXMgPi/sjnDzhuo+vIUrc86j4ZLhT4GAN6uqwbnXq5UDzX7TfuB48oMvvE1sK5q6owkdWfklgnC6pSBpK7wl+e3kuvaYnGRGJJMBQuVgWL1awHrVtfOTsSE1vc0ZdG+a/Jbza6pHbyfi5L7FXJAGdQTk0EP3VT54+F7RZ/MJ9fj56aMxzhJRwQJ6df3cM26qSc5bW/zP3PFXypTOBwzCvVtwGQzkGvDW7XGwgLbTNHDpQXOd2BQ5Zd9bjQqGg+S+kIqWZVZCqVLfyFPF9bEOHfPepL6nRDJUD2l5uRnXqeTvidaSIoqS1Fbc6mLPtYnbp6uuts6Qo8TbMzFuI7NuaPuKnQIyVu7vUGJ8jg1uVOjlMNKdVtLPr9/ZEKVZVj7lsFA+nm3zRjjr1DRKhr/wY1CI1iXKVTeQZ0i2PSnN99j4iVTSwNAYQLWWD+KyZ/xRLVxmZQPuSkLeKBRAkavxjWnIFQb1dn72wMSUdcB9cNCNJNdyTkrl44MRR+pUuiVrTAnTlzL33X32eEYwT+vn564yxFJLUDyIMNjJ0nx+GreKSOglI2et0kAwRHKYFclH9GVTiVlB0TWeUJGD+7JYogF7BizjTGyPOUEWQCguIEmtC4fHD5461T80Z3Mp7rhNTI+Cswuknr9hrIZmpRyFSrSrP8R4S1Cf34Tu4RNrDxpofVK9nGTklZPsYM6eiP29Lx264fsX9oLdYhq7vCwcrRMJ1a5d0QHXUYRV5IqTFBoUSpxkQ6IHHL8ckM4NCzwk8K0CA3pj5Jp2a9wZjfKq7R/eukzQFuhMxV2qgHf2E3t7/SA8N7sMvsmF0p3J96QRE3rA85ekH1q8nrBVujlIqahmL0Qto3+JxdqAfnKMCblQGSKVWZgWLMm82MG/9pjhdkMzG7C2GRLGMty2y8NhX1pZWHNbLOmvaC424LNz/Nl5tkPv7fVbCT2ItB+/dx3ZhVhmgSLd1zL+2PsNFmj7VGBruTttezlo1mDKErjY27nTswjf2fY/Uq8lPcVAgRpJM+m7jS/8dk8cdl7fkY7Tuj4TfiSe0tiNSoJgZwom4+9haoBQ65AifaB7pUiTc0MAXCvG+nDydkRIbKx5fL6gAlyMAnBbQf+Qh1naLfzzwLVTP0EEyoenW2W1zKqfMql5rwGlyCB9mSa2s25yHf4SDSBlgEVMJtplpRgegZvDakpWDKgx3UR4W7yKW+RD7bd7rEa/GQmA/q0RYAOIaXfO/2CgEUPtNhPS2uqy29lBYFPPv5SHQ0t/jRxQLBpe09ateAWKypt9TWS7Z5gynOePS5M2NC16AhF0Xz6s7DUjtI0xNho9Y6GK16J5V8HqHypV/OAz7+VBzTaiR57XGH4r62GoAiJqfWOM7okzKCeeSBnOIKPHtwgM0SQbvCvv7rmS6ZAacu4BbXZ5R9gOhdR9H3bi7lWLBNnqqLPIy0k6m4XBhtl40B6z/5AcJxjtKfwvIExl7VsQRqbW8gpPMsmJZfSp3uC35g1AkP+BJlju3RVoFZNo3JR18A5uc60NGD4zvzIdGTAOth4ZAZx0ZGQItHuNcLz/0CiavJdkjD65h4avf1vf7LFZ1uogJz6vLK3uDisXIBIGkXOlIpxTdjjjTQt6Khy50bYbXsG9JBrSUGhsBWpeRUnq2cZWOifhfueY95gFIDAu37oKR3FQ1YxGMg3UMq+L2VN2rtqodelSHof8SyYZVQWs7L0bjtgolId1tAAjHI7J1/+JIRXeUBjjaGGQAU+az9XFfiqn+VRAGG8JDdP/WmEqjhYpcy00LIBIBzCF9I9mbXCv8IX9fhPlI5NqWGO/v0ikpfn+hb5U16FcPYsx+xLb4la6nSbvrTDP5MthPyeLIIY7ZE/rNU4ajgPmI0/3RvD7WtEbo8UGPjnev55N2ELuFpEPzkNu9MzXqq8K0cWxk4lT2DQPi3rDO8x8i5jX7wWQi8e0neCMb0SUO67zRfaekZONGfaFl47LByciUuy5dhqxMPokhTE2WbzxqCyt/s2TqG66R0ocYHmzv9f7tJ+TES8NFyzL3fhNoZoW5IxWNE+stYWutd3LPwa7HKhhRAbl5uCEbEGjrUzTXwbzG0qvpmNtpnYnmKjzTaSAFNCxfw9edcjaxCiRKKIDd6GS/eDsGBgTvJexDfwGmVWm9jadZhee9jRFiZFtL6m7sY1oQa8F9ycxSuPANXCqWkApcaEfQLkt1yyfeRs5yC5O/6XGJ4TEtJmCTPJFRr95au20STIPgkoEF1mzZ+5ZRtWKUYuWJVZDwcA/lTy6oYp0/d0LGPRUXnXRm0qtIXQVdnoVhKZPeWACt9rujRL57MEDi2kHtfV/ucu+k03bN0fQlbalUJ0faY99GC6L8MO8MXTSmqDAxNSpqpIFPhgHgAg0YK/GZhlQjbQXE4tMDEDO9obNfp4W6m8fdznMesSSRINBG5FDf//DkT9pSRQsIdSg4VK7W7j2d2jsQUIyjJmbd/2zCTaqh0Yq0cH6mS/5g/cq3eGOiJbaCNo6oVwGURzXVAeVaGIfJFhd2A59sVp+rVfe1f8B6bVbCLIKgGUgpUokO0vTg6ouAxXGQKtveMhhBT83ukPIRZ02+qF1kvM+nNCVy8uzrB0+W9QIKbMio2m/7zW78xd5Tf9itocpLbRuNC5cuS/GyRGXw6fzFzjM1UITlQ5dlvoyYxuvb7ol4S1MyhkfMNZbif6/xic0wB3uSScez3oFTRbCHBd0cbJL3cLwfQjCBpGBrRVC7174qW4XWnw0eYGSSzTVSEDOlMaTUIGJO+s7/z8JxaZprcEsoB4+vt9/+uwtM/iyqLVPidu8ZTh+F1rsEWKwZhDAg/giVc6VzRq+DJCrhn81b/LYlLJOdgoAjID2VnwgU+mQhCL6KhgIqqiVraD25UIYEqxMcZ1aRcZvHa8x5gh5onPtsVcl53Xek9BOYqkyj64acX921zwqoY0lmNA81NE7BzVts3cwWDZ4Dk6uuzwtfJuJc7vVS+fdVDEg3ATwC9oG5/Vb1swTyzTsl2V4m+93bSQo5STFG5AruTDWTym6Lxtt4OrAeIVgdoyTJL+keHiHTNiL0/nO5oYwftSQK1aYBuA0e12t/FVN+LsCk0L/hfCCcke89LuP4d46qnFo3NLpHb+NFrvekXVT4GiZgMW2H0orIY0TpS15wlxVUaGCUo7YSN0yWDRU5+p41dCOs5/vXq1do7K+Byjj35/mPlQ+VEDqqF7OIBQrXfHgCXYPy8ye3Ih3io+tYA6nK0/2clIERrpA0AMHKLTGEO7q/IzIcOCwYN9W/ISH4v4uk9MhzNu7Fg2IPCq5CQF1GLuzQu+wNv2h94NIA2UJydawv5X2bHkZjv+kB/WQCYjxUNEU8ssUdxDZstpv2qNAHmI6BMD84olxMiwFdK
15J80zc9x7de/cz3ZNIkkGIpMCZJqKKkaLVo1MLnR/h/hQeUvfqJmvkPeIre3EjnliNkKJKL0KNaupHzY7Eoztaj0cNOhJ5dxIRB2is3kLcSK1FZswRJR0B5OXX+Q4UlFIrhR10lIge3Fg5DnaGoZoOyFaaHztrdF251JubDsCZRDSWA0y6ysykO+h4jhXtuWF7D5Wp7B4Hx3EQvKsmPPZYcLevowjlWghHbRBEhwPI3bzjhNWXlqtym5ObYAeYxuHyvyYue2X4651f7Om3+m8KT7Y/JqLWXwgayCdzxHuJidti1ITuf/oXzeCfTRbG5ytXlDk/epX061W6BO074jI7nV518OkYtRJDnPqdDFAf0uWcATfk0h17+gP7GHjy0Rc0Ive9XmvA6gCkoMjNjMEA7GQ3xy7e12DzfNpIfND7GKKojMifTrvkDXrfa3o4wNYktY6/VlBdHtrcH9F7uMWICej/BjZXVX83WFGcVHx3nOXxSL59kE9bSmHc3Xp8iDbPuSG5GIRp3fTFHnmTzzGedl6al2gUbGFKtkC0jFNtKTk2rr8LEObiGgfCoSpTWknvAYDQBoj93s0KiRNPOqgY++Xka2cQiDwqUsLl8/i57YC/V6sy5/NvhViRRZgCzcyjNHGzZsYA5YMtUntyfC1gNFP7cL3AwVA+326NJI7MQJoxTqcHL/YhntsnYTR5R6GVVvFYIlW8Nv9qn3daoGXMz0MoAsXpCzbiHZ0XWkfw2qlJkmZjgQtMAEhHXNgokGRPfOprmtlvNZaNlGB1EjQTVX1Y4tCyJFZhdhID4CowB23uQF16NifyxH+DGnQrnxeklnG7UQV2BRVdr6ZEKZYv7Gj+PbpojzAskvbdtaFsataqPrLDoejjc6ZfPA5zA0iYcCvcNjzuy9SuT0uG8NWMTLv2OsImL++PQV1sifUENAwi4O3yBvzTy4J77B7mMBpjCYGXAyjFGFZL4eAazSmvZ8thJ0FFW+keLHL+ft1dQBKmXY6JatelGebcIC/PyLBHdfX9bRcauGg4xEO7mMl8AjlcPMczkPniNQpiQFqcDJYrFGoxMV2hskxMn0bRQT8Ajc6w6sQYkGl0CQUImPrGfie9dsk4mrCLMIFOqcm0WT8O8AiREEGmooBTO7WI0qk506NsV7ffvc0rVJERJKcyRyCmFZdTSn/SrBfjV7SXT3pQlgluoY4FBUCDDkzwBgjkrE1oFUA3ls+xVP10w5jjBIMwKBSQqRVAEDXw+Dyj+jH3ila8czULWsCKhWd4qGsMFN7++OGBAz9eXHjAO9m++mTXF6qiyG35Q+61yjYQKsBrjR4NNexrwVGqBwAZA6cr5mp8AhoyzPomJ6TLfWEJjEeRI3QsX5oQkNuyF7u650QFka+VjFeNRY6ALklleTW9I0v4ABKDCXTGkjv80vqVNk+FTL0bJK7ndSjjMJD7OBFIEywBPJFrxTdyzocmxEgG0zu1VDgsQuXITYCx1RRty89A/F+CdSAlbMlIkptCC0GrF/jFS8PAU+6TNV1eBqJrCr9BgH1mth8FtdfE7druR+xyZKn5idfUKzGW6ACGF4M61IRoSs9o6xmaj3dnAVQvFWUsMcR6MI3xTKJNyMxkhXhhvT0IxialnG7i/BBzXfMXYh5jl4BXzCSNlxU4+aboEgIDr48/+pfj8J3WcNccFfzV6eiX05qkNktmafoBcxrEsrM8WQV0VVSRybQyXPOqJ1yndwBI6BOGO9oGxGDAd+HcKaZlptCMJsR1Cp3m7F9HpBFSu/NYVj+WSDY7jWSFBlTBSCFyyPEUn8S9NmBVa+mwGVsz0Q+fxe23w1w6wVO7sVnZqRpmXJeXg72QFkl7Qda1lBzn/FW+rRwLvFxCsuad67Wmzab1RJdzPGsuq8AzW6tL+JiwW/VPUSBbBmV1+EjqQ28x1u9W5Eoy7zhsU8NT87CtNbZ0lPEpsoWMewxC80kPanfWPrQXmixWDXXz7uf1kBTr1J/iYuls7fUsyAChXjKcKOaCF4ySqkhMTGmjNqYiG5joBUi/SZpWvgxk28pyIPhf28YULINiqmbWPBKuTCLFruV7JfRgGM87XfNEFc7tgnYx503k/0UXJfpmjx6wKbKcvV5fqrctx+OrIn++TxRxSKlTScEIwd2vG5mg/p5wsQDpiD+X91XbkReKLB25Jvp/IJaJh715RXqBzwCwlY3URonyy+oZoTD8Ym8XMMv/dMllh0LCFZkZFn2gYcLG9iO+I5S/GyxwjajQLQtwH7o+n50vimC+ES8ePOpPDwlu4oG8KhS7NL/OTdIWPIHbSa6/9DfjOq9W66EpaK57R78PpEzVNLkTP2L6lllqDT6SDhIDIvQS3SQbxG96khXgvW/rME+tiXFXi+BC0udi9keyGlc3sLBN3CP3QXzswhBGTxvz2LmRMkU3rLuSkYR1Gzr7vj1VxTN1y1iciA0DswsPZ38eB6X10Uzk6HZqjzBK+EJ5osJJJ/s3b0MFRIWYlM15TPm1uzeOk1zQ96quClQLEZbpxmV/eAduIotXUYQZjWAkTulBJt7kw9uEnLo7OpZrf8k+0ZQP0agcOTLbfrekHji86Mxr7rTwve82mePKoAkkEthE45VI+f1VqpyWNW1kbBbVVfuatKt6MEKqyTUyxSFGHk81kY7CxkgMNexiikN0+IeiUNsfuktjfOAiMfDhbTe4rtxSEPvO4CCUGaktA58TGnSO8rHdCicmGkNrwWsnXgUWjhp8bllNcnQN10TbwxYPAwQKW/JJiYQadr4THXO+vWudiq3I47vqmEM/Ab3Dlq11Q7RmRWntYOEyESbTI8PZYwbtsmjcSwBtTAIHQ5h3I633h3FpOkT2c0PlMjzj0Q/OuqaTVt639fowVppqvSlNcK5KupBnrxfKHQK+SoKSuaO8PNMkYkbcEAc9F0I4uzPfRVP/q5QkvJVsVoJ8BEWW/q1+kivHEMQfb+J2NfJjSTG+WhjHjL8eqi7FgfVewxwmqG9IOnTkwDjAHUaJMIyhVkadW/+GQjLyNP4zyHcLAdWcB5zQ2kc/blAx2RKfG+ON3RfC+iQ5Th7V2i5abkoy0pjfyOwTjIvaq9slSCtoNGBZggBDOiWwau0CX4NAIThFyqu9VWCLr8TsqhQZvQP+xrywovGs6A079U7YBjhEXyQw4Q3rbQY1EQnxTPXNlHfn9vQnuhsJnzx6PZrCqry8fidPz2U1scmAMVPHxa/injIf+hDziEU02xWm9ou67OgebktON9V6wwVotoNOzVNJhiDBlHbktBwOjX1BlJHybLox5y/7NhR7uc8f85O6xdxueabhwtJjYcBzac56v6RbuI9IRvPzOnNbltj8Hh0ftwwhWyHAyiEat0oDSEVZ925jmxJKAqTo4/uHnkozgMDsnkzXPXBDJ1sDTawXy23mXuTJOYV6ZVWrervMaGGGQpgQjAnfP7KPZro+OKt/MpnoM0NeGQgIFAiH7dU7Nl1QbcMiwO6/5nIosJtrFB8w1kpqb6OjI9BgZHG1nzTMGA++HNrl4WQNcq3SajD4C9utQYAu/fETPFMMJeCDwHRCnPuRAlqJ5t0E5h3Wlh1Nw57LQ36kDjC3lS9w0a89eI8ym6BzEA25Cdz3LQAyz94Fvjqp7MyHrpm3PzmsV/tbSLF9NJBjFmzWPQ8Tfgvj3fi8dg78tXvEatqtUhLxsNp2VCU6IzSqafxWw93+Wk47skJv5qxM+tv7CrpYKvWLEylJNEXlh7GHm9UenNf2/szZOl+54P4ZWksh1r6+rphL68QYhmqW7DqKVrc2rjzPYcvFDmKtCGL/F62i3riMV9z+LoLnuVaMn4dtpNNFmQEQ4uEhDfLYU4x8G2OHCz7gnxLCa4zE4CFo9m/+ECmdzziVumHM/P00/BESH2rxUYMBL8/9NRG5fiskFJr4AO0qNUKUCgTRgEiFsTbGXtP4DTTzc8ZAmfNJuJQE5Kp7W7U7QZnBXKepfSHkYTEqgOhqo95Jw9i56kYGt4BWwX50mC27CCW92SVMl4tbUEhBDSB36zgztz5Zts0563Kjc34B+6ZUnMIk+BiQNvqSkZHnk3rHNSaYthO72IWLIxij0hcv7n228yc82FsQLK9jmptjY6estDfH3OSMaAj+poCLKwRFXvXWb6jwM9mG4nu1yug0Cc4L89w4EYek6dnV17VBfIxB2dmFFQdp0kqx3BM9gdMAr0KS7WLOSf3cn5eDItDLP2UW7MWaIR+GJ0EGcEL3ejBdu0to6vDh04JcRMNU55usmSn3jp74myzWE3azMIT96wr39F62c3G/ldGskbqTIMTk3gMg61vNBQ0cJSIxVdcgNb3xFDowwVyIqYz54F8Rqg0uQE4FIiUGZxJhND/AWhkukqIqLLZEpxj07kPBN6Zb2pWht/X5JrC8yJzPlvFhfJndQ4jcgjFyhvymr/a17uxTKHpKNWDEoL4nNa9/Prf7TYRw6Gyo6vcwYcUHk17SMb9aEdVnx24msNCDEKbj0OVzRaA3gFJeXZPObqJKvWqFlavGpxXnP+4ZYTl0Dmcri6vMdwX687ApG+ygiGHZDwNzU68F4JMPQ9JB45vLkCsE2w50QNP1kJZlI56dVGzfK1MyRqP4J6VshesfOT4hzR6MYq373IoONlLvENdYXN6pTxo5eRzQkwk2tZ1zmZqczCytqTEhpweKcBCCZ/FhizgLm8/x5ScBlO0wEXHZm90mpmL1gR/J2CUnz3wDU99YFFKqm01AZ8q2S5Fnh81CbD687c7K2OjWlZgdvEJA9M0JT3eKdIRd9GCx6g1TO5PWTE8OOphUDKdazyYnmMqFhFxfJ//cWJTsgYbol2a7Ob/Q69Fy3kb9K7aZLzH+Kl/uCzWnqTOrQonVL7LTFPr7wbTaepfAl5zSgMInjrGXY+Gspw+fCNgEU1zyC0Suum6VFyHBjdKWft7strrOXqOSQwxsYXp4F013mN9gZyu4Hc84A4dzIHN5UNXmxNn+vPjS82JM6klySWB9pLCzLBUgXiMDllaG6fT2PSBv/b+yaruyWBVcpsOKuEaQ37W3A3t9YFRcgB5rFMDjwOn3c0lfsg+5V+dBX2EmWLTSelNZkeq67CFnxaKtnlsAJRPBqYvoWVZcJKn0zSelrO2TwnailO7zgAHaMRmQYbXo9beBs16JWf7V8LjYGS/DYUKTTE1zKECC/pK1EKf6mxIgmV+mJ+Mc8h04qep+okIIEXaN351J3N0VUk7cEEaOLE1rFF3W4vqRcodPfbLqINF6QtTsfny1+O46J5ahlamZEyxglZtpjEkKd9yKDsgwnzqoAPN5o76IsI+FRaBc8u1qLBWxpKU615chTVegNFR5V4o1T2JGwVkueD6CjAhOplPnRyv8sauMnMy2wEMARR6AmCQ8S5ebL0nCEqjSztMoUyA
1EjQ6FDYqkGweu48DkBR5HjwlBloKVawYcDezxKBH8WWnMpJKZj1Ol+OHMmg5iq9xDswLx0iTNkujgatOkeRU0c/GmSSH+7GTTMLQJdj51l3EkojjEwWOjw8XBOm88GqC4bWPEE+U/5XYtZNJG/X4FYjgIvVd69RYVbMEMfPSKJ825e3XQ6RBesp/G+lkMk4VIxRakyUBPLO1u0UYnNG9ExAnPdOO0OfFvcPOL9rBJO8bR+q9Lp9/i+fH32KkaNR2WgoxQY3FY+rS2NUvtCOgZAaF9vny16WG/3zeUtRP9V28PcGivAHAwwCcRk0D0iohjAfgL/EKXJkr8gIFqbNq7lXUFRKqMbpBa182ol77SqJq1M5setGUJuSBKqYBYKdDZv3XdT/u6J5aKKkLvA5ez6PuWX0RT7kELSKDKfg9w9nwSmMmJHjbnr0blM2WvpiirR/nLid6SRN9+5KoLUb+pLw3QzD8JlS3X2q0m4BNRxfltr5KWqryOuuGDt6IOHSE8/zqGXMiTqgrUOfDH58NoWe0te4mFc1GxswvhZXWJZmaWaMJo2SBnuXa7+jIfFbnhNH74Z6jygwcqXsldYfI/Zh8BZbqTh2I7Hu44dilfbX8Uh18NVB3phRnTwpUonKquUs/iZXRnDFjtEmKg2YRQm2CP1FWRb/B92HqJlHT7Hs/Tpl3RrlxvkoskpNlW53/6Ujse0fkHLNeUm97TlDsaRXpfZkR1uWMTwhPv4oYM2Bv941R+c7nQ0yBdFNVQpZRkpejmIfjFrdQUA7DPwR69aq6Pzmk3IXarIMKG6R4MBdkB3j3HWxohnZLWpaNy/BMxS+84e4vPPfO/7+nLWVZsdpUY/nGDkQts0NGnRpZK/lW60tmncMoTepY5fMbow1GyKhqSXLbOZkz59l8DG9v9ZHPwA1roKz3MW/j2tN/U+lPQVYXTa6h1ePQkSWR2bp9OHmCCvT6s8v9PVG2ufK7dkbpY500gNx7fdArzH3yCjY33Fa5TbOuybLNdW8juJyJtikDn+5jMnMzIWP/+v12XkaXj195xk6eOKuvA5zeKk1i1PrSnmWA46Ca2ldgNqJ0rvLqM9X2EPn/QuMjLnLg0iVJ4H4r5S2PgpGdSdfVoiX/rBAq6yVDc30v8DOUae4oquSM0YDCIafLQ+hvEmB5b/f+QsTFtAR0zIVWeLyYbmrx3g9gHhVRfelCz9/exh19AGsyXcwuSaBiCzQIoctYvyhhkdCsC/cdZDce/1Fav35JQt+RJFAjiMRQhCdE4eS3SmfsREHe9LZa0ElOLhxxvs5uS/SnMYssyK9FxiucRjjOqfaIp2N8CmuNJqg3WvtMk+MlbAYeji9K94rx6U7nj9L1TGhVcAyz+Gb4sib21AW94HRzWbTrRKEkx5+KLE69Vc+8Cj1Vu2GkZ1AA2E4kaJ2aTjsEL2C0srAINXRAjnxwI3p5ED0NRYn9sT1iY9GPBJwhhd6WXEJ/Z44D0rufaDOA8dUj1SIqywRs2b7SjYcCYS8eefkwdWlpN0DvnecdwHVc3TqyCcUy7K2PMS2l2KZHzZfLCTCPaPq/NVc/Nlc5hVJoFvnNUpKWZcTsxVeHfH1mnELREECq9YES9v6FcvONCxXLQmf0k3S2dyNmsxbvlXM0u7lSqkx81md0rad3E33PPuPpDGM9UiBhSeJn3Sejmx+LdLCiZYcVxow59nCqrUmXGAbsR4O7wVQzyHdL6DX5s8k5BjHXlONz0PaIqS89xMhkYetMw6w7JZ5c/oJBH2jdZPbS6KbR0RpEe16BATLzU4QiHybxArrjBM8MKKP8Zz6MVbg/d8yb76U8nQzCK4Eqa5ombBm7/6xo2dR9O/ByfcU6qDu+efdLFAP4LiCr6C3aihDPjigUYuy0voLuX3Flevl7xXRtRZ4Vc48j2tgA7tK0wqv4OjLwCzZJn9lYIQuScQBEFMBjA6Vj8FTp4h3OphB6g0uA13nTnVLmKQ+zfELl+6znWX5nCWvbwak0t3q4qwWK3MAPKE2vqDEeCsFKvmJ2Ws+VOqnrA+ekCk9jaszBsZd71InADWijT4SHnyVmc55dv5ivXl1fED4vwNrxbiZHWeGinS3ImcoDAT1vGiLpP/D3NaiIPq9A2h5DT5SgaCVCh0JKu7DKsHjW9ZAACRxHgTSo5jrVWUJfGKweg2auQuittVidB+JaCdwYd0x9oJ4jyI5UygrB9Nzi2gbLVcCnpu+1ytsiWCbJb1Xxas8FhG/EX86taG6flZZauhaGnpRyfBB5ojGdsdPBVHEtb8R951oaNTvKXK7CddSeWaeOi2FIDPEhWhAk19RzuR9wSKEwvvi8nQFz649+fUlBMuDL7VmUBSsC1ExWwqY+uSdNKowEkpsBb+/KpWl6oGxymyR/e4uKjipBJrVPXg0nE2j6HL2JbCHNh01lV+/+6FUglhV8GTypzdvdfhYc7t0ZYtkyH/17wDakU7r1GAdUIXXmtxamhK2FdelBa4BPryblCC9gJG9htJue9LMrNS7mM6gbRA1xSFnWNsziDuGZeS3Dcu4bjsWaIebrgNnxpl/pLGxV5EtkFwDeh8fPyfPU8CZAM/Ljk3+Vi7jUtNZmZM8+f7d4wlUIkTHiAULRUKu0ODFIeyk20BiqLB7vvAT342SIDP+z5FPaa6Tjyqh/AsX2jFhbeIXKxDMb8fid0jHAWk6JKhswbtvtP6bDz+lYjvXIPwV1Y+nyft2uM8c1aUxmDHAUmZnJBvZXT43mxjXDHP05R1/dKfoExcgcYzv3wO5mazi7ugS01z6oUmByKtfQ6fA2+MQynPCoDHcp1eDtag/E3HQpHMWAgGkNh9wWR5Y48YG0W4CgvOrngI111j/x+MIuH5xFlVkxqptSjW+hnVbt9qxtXndEH5RtnxWfd9eP+kli/x3LU1WGsZVAkVElXD274LBGK0bMveEUbj/6EpnocEnvRSlglpE4GiAO5S4JdYb4uYd6oeK8vuZvTQaWMS3dEIJ2ssCxWz8DqYmc/b38ynz0DWCCeF1gCyipaLG2Kq9wqfHz3S6m7CS+H42nmDYAz2dYcx77M8purGOS5tQ4aykJXIDQBwHjIGSU+52M+1OV53rp4B3JbIXecQWEjfk9gkVoz8T6HJbIhFgm3quNMk+cIyRHlj/BdURXY8o7H7dBQfsdpLJhAsxS/1JtMkY8JoP4YdyOxzJY5x/+A9scOTXvPVoQAMqgmP899s6GvRtzNFGXLX7VHSnUj7VPO8K1qxaS/a/6v/YhRlUtNgnqnth3Jo/DKbdhdPn6HgB9YjU5GuN1uPyUXZJDZYfFwMfdqNPVoI8d1csoHMK5tquGoK060mIwBHMk3pFGqBosajr9g/5kBPrrtuIIEPFZnaAKSCQqLdeQq2B6Bs8WxD8+DfzGJ2nu0Xeb58spPoiHZAVV+I5lRUseUE0IA4E844UzFYADNYcLBW3zsP7aWzLnUZoQPuIDR3FX3bkM5mCunvXaPSi4PRkKnItEv8/OYiq8RSKQcaTwxX9YgdNbgPuXLwb5ARofv0Zj3WpHhNnlTq2Qu/lwvM3PUaqv8L7kpFqQR9aRaXfFanbLgbyxJ2kAx9oA1kRMyH3JXI06oQhRiZQ1LtWz+QKKxme0zAgI2q6/dmYApsA7WGeBae5+Y3eqkqDjXyS7Q+LzYgrM3EiqGHsibaKZKgFecxpGiMLXY5+kkuDKBdMkj2Bd8uTKI+aTWpu97gNp78fm891zYuT68sIEzE5JggpWjlWFSpzYayxvnOxJ3JYK/q8WbCy14KhtCFhdLOxCEAvyqXN3K+oP52ZzdxHiCAac5LX2TO5CTmkxp6zCT5JZDIBgnnmQU8GBowEvogfPni17fE1sljd55P2C4mWCNDr8l3hMH+4zpyZqp3iFbJx20nGtU+9LJozl0OxNrk/c0C9chEe+k4vUECnUaXbS8JqdnymqbZ1SCI+4+1BYMW4nzYKDLaqL3Nm08C/Ug7zNg2BuwhWepXrkqaRX58LCWLPDQyUzn369E1drtekeuNcI4SgdmyQZ/7xhXZ6sOKg9G/HEiJQsriRQThvHz4BhaFaXic4nlrz4LhUthGBLbnnB6tufJizYx4c6b2rY1E63pLDA8QdZsTOD7euNMku1a0T2nNQ9rOPBYPDyksaP+EmKTvqcgRycKMtzhHh37mAqVERuzIIMs/zXE9jGBpJBBWb8KCPZne6Sxw0+UFlY6/VeXJUHunHXY1csfc40Tw95XrkpLzxqX/LrsaYM7Y0UQ/Qe6PTjMQUXDseSMhYwHTXCohySQ+1fIjz/yjZWRFI1/a4d9eQzWLoGjz8O8ldPhzhpWFwwlaR0T1gpMP3VeHvDOx4RJocHJOSRQ+H4/nHJsiuXWDKowYZZW8Jk9vUiw2jExedn7glAsC/bgN1NrgIp1y+y3tmLd2V9x7yKVC+QK6MOFq19dlQflj350qUavBULMCTn0BvCRQY4q6VjniU6XHISUsaApCVoQeevAOuCUFcnwWfK+44XDo1qSpPF1wcnbH7N9aO+AzD212PgFlGkXlaQ3Gbfz9XIUMjulgGUREelr6IX+tR2K9H/yep959z5WLXlZ81Z8HCIV8CyU0JKYzkIeFqf6o2ywb2O73oRi7i8F6Vcn2zU1VWZpLfSXgTNkRtqM7r5s13UimLWtAVZs97rLcMRlwXzYp98ZnKvQLj/dpKn8nfNnU9V2Bp90frlQedeKt6zd4mPR53FKQ1J4r95n1G8ph0XG37DC9b185sWbnoyC4Q1iUvyy5IOxBrIqbqn/JSUWzdrlOiZGDJrU5IGuzUl5TaupUTIgFeLfT6uh0gIEJ5nZQ/8XjB0mmEZxTvocrU/BFoOaUvV/N48W3W/aQu5nR3KwsSByfSDAEq6qBqTVTkZtkaAd/1Rie2jkdRlZvxFMu0MGnLc0SHPII8eOz/bjfIhSQhAb38dSRcFmfRb+fpDrDHeazED6EHNayy0kESoRG+XFbJa6xWB6OlbwHVDwdO9Ka7bIOqLRHpZjwXmv/2DR9nu+2xwxE39cBHq/7Vv99HcvH8ZJeGmgHr8mBKQmOCTkvLkxf5k4FrqZuNpaRNhCB3puFuF5d2nnQbhgAaANLMCYAiGsJhX2bFM/r3BGhR/dkGPXeBQUJ4tTARQnVqA07mW/42Dv2k7Wa7hWU/wv7FTIWLwWyHX0Vqdg4BHrlJ7zh+b+T6fH+W3d53LS5rkXK5GIctMIttK+osfGYIvOD0BkkXBJR0EYUmteToIxpoaMVKZmCRC2BbmBLdUTIZiI1kVYKYnq9Q5xMGODu+6vCT2ofvYE0pmGbQ9Ln6wnBDYZUD/BL9rmiPn3n28Zs33OsHUQcLp2vjUEV5sOBLO2ScyescGu0N58y1q1NSNJuXCzI4fu4RWJtSIn3P3+9eAsMo/2NupFeaf70/usLGd2Z0F27EjLoIj+nmJ4/Q5edPFhVNpPURQrUzPALNNzEvx3e82rDtPpbZjugv7Abm2q2vMGwz5W+hGH0hkCzXdZhPFbLk0sR5vVhScLgAPdZIVZIjTuzwIKVuWmvpMr7Gwxgiglpy8ecfOAZcCpXRzG6lNuRB64D4G9AWD9vQi/crWV4Xq5VjJnRjQc3g4bJe+MmksjEctghn27n5i5PHZvW/gM0BsXzo8Pou6yOLnp49dGXpK/oLAbOdOel9h+kDqEtZunvsXa9EFomdl0QbDvk+H58SjszCVqVOXSgDpOdZjXWfZpFL6S/fd1Lq8FQS3LklgiNhdvE5GzgSO8uq3gt
1j8I2o+JzucnrUSrtoxa6IejmVQLGzF3rSCy3fdhBPhZnDdgctC89dRJ+PTfW4ga5WWAyaWspzFg5251FoByB8LUbD3AxhvV6M1ARNXRJ4NhPe2j9WOlu5I2KmCMGvGP5CbHAyZk3YhiuIdtDgOvre9Cz0yOWvHH5FpZQzqzyHE5XkTTFMU2JhG1nvne9SCi9zNvPnGj9h/bQXgpue78rpogXJl8oDSfMwz9fp4ocyOxEV1JCEslSsRvodEzPbUsMUYWDERNzR6f45Ku6EmW3qdD48dcFQtc9rr2wF3o85edZ/2SY0BSkOdQX1ahwPVBP554Q1Z4lbd0d/vrRCO5k3QBWOb3iML0vI4MRkiKwqt735Q2fkq0Xl1pI3nk4ll51cSEHOrFTctkxwLOiQl6HJh2q3iqHFmtOCSo0A4YLl+mllolm7FLpe/79gMoe7A5cbFPCbX9Z3GhI43FgBbWoq8pwaIoDlklRimVauOx355pv7v26P0MLrgiqWTOxJaIGO/UhHf7GSOm0r1O5m1sPYYn1bathmEkYfrQLiEWQ2/3IjunsIxgAmi6t4JsxalYxE4YyvD59EpzvswOjZUvSgkHwPZonVtaiMTLXnV3p0dKpCSSz38Kv8QbNFzqLbwbBBRUHw/nHSxNipNm5vtjfkuf06jWRwkctgu8wZqKwS/7IcGnFtmwnbJFPhpGcyV9GVFzCCG+TOeNgAWxOUPgmtLdD8JawVVDV+e3iR8kHuaZXIknncI/3uFnblTd2P/OdWvxl+9CXbqJb1CS8osg2fg/qaA9KvM3FQoZQ79JRZC/Upm90ABPCGzksTWJ7Xy9VHpnPZCgGzAVbJhmurq8tm24BjBvnm1GOKfotvCqXyIXFE1bYTRS1WtzgZrGWgR/oOUDnNgDPXqUfTmyFPfNCD9MX22hvuBans/Kl1DustiTunl9Kravj0NG1Ds5nkTqlQSYOfhgvRIowimmWAYWma55eqvaQL9GvHmuH/hIVB/tiN6s7yOW2iahReL8dNddIbMJ6BLVguJ4n1dnquV3ZNqi6V0H/Vn00j0cE80ERsZTgsHPJ0eUjxYik+eDtaEHnyAsYeR2AjRcGw=="),function(e){return e.charCodeAt(0)}),r=new Uint8Array([177,156,215,89,13,111,230,1]),o=new Uint8Array(n.length),s=new Uint8Array(256),a=0;a<256;a++)s[a]=a;var l=0;for(a=0;a<256;a++){var c=[s[l=(l+s[a]+r[a%r.length])%256],s[a]];s[a]=c[0],s[l]=c[1]}a=0,l=0;for(var u=0;u<0+n.length;u++){var d=[s[l=(l+s[a=(a+1)%256])%256],s[a]];s[a]=d[0],s[l]=d[1],u>=0&&(o[u-0]=n[u-0]^s[(s[a]+s[l])%256])}return A=!0,new Promise(function(n){(function(e,t){return WebAssembly.instantiate(o.buffer,t)})(0,t).then(function(t){A=!1,i=t.instance.exports,e.__wbindgen_wasm_module=t.module,n()})})}().then(function(){k=D.new(),e(k)})})).then(function(e){R=e});var L=!0;setInterval(function(){Object(a.getParameter)("UPLOAD_LOG")&&j.info("console log upload")},9e5);var j=function(){var e,t,n,i,r,c,u=null,d=["DEBUG","INFO","WARNING","ERROR","NONE"],h=0;t=function(){for(var t=[0],n=0;n<arguments.length;n++)t.push(arguments[n]);e.apply(this,t)},n=function(){for(var t=[1],n=0;n<arguments.length;n++)t.push(arguments[n]);e.apply(this,t)},i=function(){for(var t=[2],n=0;n<arguments.length;n++)t.push(arguments[n]);e.apply(this,t)},r=function(){for(var t=[3],n=0;n<arguments.length;n++)t.push(arguments[n]);e.apply(this,t)};var p={};return c=function(e){p[e]||(i.apply(void 0,arguments),p[e]=!0)},{DEBUG:0,INFO:1,WARNING:2,ERROR:3,NONE:4,stopWaitJoin:function(){L=!1},enableLogUpload:function(){Object(a.setParameter)("UPLOAD_LOG",!0)},disableLogUpload:function(){Object(a.setParameter)("UPLOAD_LOG",!1)},setProxyServer:function(e){u=e?"https://".concat(e,"/ls/?h=").concat(Object(a.getParameter)("LOG_UPLOAD_SERVER"),"&p=443&d=upload/v2"):"https://".concat(Object(a.getParameter)("LOG_UPLOAD_SERVER"),"/upload/v2")},setLogLevel:function(e){e>4?e=4:e<0&&(e=0),h=e},log:e=function(){var e=arguments[0],t=arguments;if(t[0]=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()}()+" Agora-SDK ["+(d[e]||"DEFAULT")+"]:",function(e,t){if(Object(a.getParameter)("UPLOAD_LOG"))try{t=Array.prototype.slice.call(t);var n="";if(t.forEach(function(e){"object"===o()(e)&&(e=JSON.stringify(e)),n=n+e+" "}),N.push({payload:n,log_level:e}),L)return;"free"===x&&function e(t){x="uploading",setTimeout(function(){!function(e,t,n){var i={};Array.isArray(e)||(e=[e]),e=e.map(function(e){return{log_item_id:O++,log_level:e.log_level,payload_str:e.payload}}),i={timestamp:Date.now(),sdk_version:a.VERSION,process_id:Object(l.getProcessId)(),payload:JSON.stringify(e)},R?i.hash=R.get_digest("".concat(i.payload).concat(i.process_id).concat(i.timestamp)):n&&n();try{var r=u,o=u||"https://".concat(Object(a.getParameter)("LOG_UPLOAD_SERVER"),"/upload/v2");Object(s.post)(o,i,function(e){"OK"===e?t&&t():n&&n()},function(e){n&&n()},r?{withCredentials:!0}:{withCredentials:!0,"Cache-Control":"no-cache, no-store",Pragma:"no-cache",Expires:"0"})}catch(e){n&&n()}}(t,function(){M=0,0!==N.length?(P=N.splice(0,N.length<10?N.length:10),e(P)):x="free"},function(){setTimeout(function(){e(P)},M++<2?200:1e4)})},3e3)}(P=N.splice(0,N.length<10?N.length:10))}catch(e){}}(e,t),!(e<h))switch(e){case 0:case 1:console.log.apply(console,t);break;case 2:console.warn.apply(console,t);break;case 3:console.log.apply(console,t);break;default:return void console.log.apply(console,t)}},debug:t,info:n,warning:i,deprecate:c,error:r}}();t.default=j},function(e,t,n){"use strict";n.r(t),n.d(t,"report",function(){return I}),n.d(t,"SESSION_INIT",function(){return v}),n.d(t,"JOIN_CHOOSE_SERVER",function(){return y}),n.d(t,"JOIN_GATEWAY",function(){return b}),n.d(t,"PUBLISH",function(){return _}),n.d(t,"SUBSCRIBE",function(){return S}),n.d(t,"getProcessId",function(){return C});var i=n(46),r=n.n(i),o=n(7),s=n.n(o),a=n(2),l=n(0),c=n(14),u=n(28),d=n.n(u),h=n(47);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?p(Object(n),!0).forEach(function(t){r()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var g,m,v="session_init",y="join_choose_server",b="join_gateway",_="publish",S="subscribe",w=new(n.n(h).a),E={eventType:null,sid:null,lts:null,success:null,cname:null,uid:null,peer:null,cid:null,elapse:null,extend:null,vid:0},T=null,C=function(){return T||(T="process-"+d()(),l.default.info("processId: "+T)),T},I=(m=0,(g={list:{},setProxyServer:function(e){w.setProxy(e),g.proxyServerURL=e},getUrl:function(){return g.proxyServerURL?"https://".concat(g.proxyServerURL,"/rs/?h=").concat(Object(a.getParameter)("EVENT_REPORT_DOMAIN"),"&p=6443&d=events/message"):"https://".concat(Object(a.getParameter)("EVENT_REPORT_DOMAIN"),":6443/events/message")},getBackUrl:function(){return g.proxyServerURL?"https://".concat(g.proxyServerURL,"/rs/?h=").concat(Object(a.getParameter)("EVENT_REPORT_BACKUP_DOMAIN"),"&p=6443&d=events/message"):"https://".concat(Object(a.getParameter)("EVENT_REPORT_BACKUP_DOMAIN"),":6443/events/message")},getSessionStartTime:function(e){return g.list[e]?g.list[e].startTime:(l.default.DEBUG("[getSessionStartTime]: session ".concat(e," no exit")),0)},sessionInit:function(e,t){var n=s()({},E);n.startTime=+new Date,n.sid=e,n.cname=t.cname,g.list[e]=n;var i=s()({},{willUploadConsoleLog:Object(a.getParameter)("UPLOAD_LOG"),areaVersion:"global"},t.extend),r=s()({},n);r.eventType=v,r.appid=t.appid,r.browser=navigator.userAgent,r.build=a.BUILD,r.lts=+new Date,r.elapse=r.lts-r.startTime,r.extend=JSON.stringify(i),r.mode=t.mode,r.process=C(),r.success=t.succ,r.version=a.VERSION,delete r.startTime,g.send({type:"Session",data:r}),g._flushInvokeReport(e)},joinChooseServer2:function(e,t,n){if(g.list[e]){g.list[e].uid||(t.uid&&(g.list[e].uid=parseInt(t.uid)),t.cid&&(g.list[e].cid=parseInt(t.cid)),t.vid&&(g.list[e].vid=parseInt(t.vid)));var i=s()({},g.list[e]);i.eventType=y;var r=t.lts;i.lts=Date.now(),i.eventElapse=i.lts-r,i.chooseServerAddr=t.csAddr,i.errorCode=t.ec,i.elapse=i.lts-i.startTime,i.success=t.succ,i.chooseServerIp=t.chooseServerIp||"",i.chooseServerAddrList=JSON.stringify(t.serverList),delete i.startTime,g.send({type:"JoinChooseServer",data:i})}},joinChooseServer:function(e,t,n){if(g.list[e]){n&&(t.uid&&(g.list[e].uid=parseInt(t.uid)),t.cid&&(g.list[e].cid=parseInt(t.cid)),t.vid&&(g.list[e].vid=parseInt(t.vid)));var i=s()({},g.list[e]);i.eventType=y;var r=t.lts;i.lts=Date.now(),i.eventElapse=i.lts-r,i.chooseServerAddr=t.csAddr,i.errorCode=t.ec,i.elapse=i.lts-i.startTime,i.success=t.succ,i.chooseServerIp=t.chooseServerIp||"",i.chooseServerAddrList=JSON.stringify(t.serverList),delete i.startTime,g.send({type:"JoinChooseServer",data:i})}},reqUserAccount:function(e,t){t.vid&&(g.list[e].vid=parseInt(t.vid));var n=s()({},g.list[e]),i=t.lts;n.eventType="req_user_account",n.lts=Date.now(),n.success=t.success,n.serverAddress=t.serverAddress,n.stringUid=t.stringUid,n.uid=t.uid,n.errorCode=t.errorCode,n.elapse=n.lts-n.startTime,n.eventElapse=n.lts-i,n.extend="string"==typeof t.extend?t.extend:JSON.stringify(t.extend),delete n.startTime,g.send({type:"ReqUserAccount",data:n})},joinGateway:function(e,t){t.vid&&(g.list[e].vid=parseInt(t.vid)),t.uid&&(g.list[e].uid=parseInt(t.uid));var n=s()({},g.list[e]),i=t.lts;n.eventType=b,n.firstSuccess=t.firstSuccess,n.lts=Date.now(),n.gatewayAddr=t.addr,n.success=t.succ,n.errorCode=t.ec,n.elapse=n.lts-n.startTime,n.eventElapse=n.lts-i,delete n.startTime,g.send({type:"JoinGateway",data:n})},publish:function(e,t){var n=s()({},g.list[e]);n.eventType=_;var i=t.lts;n.lts=Date.now(),n.eventElapse=n.lts-i,n.elapse=n.lts-n.startTime,n.success=t.succ,n.errorCode=t.ec,n.audio=t.audio,n.video=t.video,n.screenshare=t.screenshare,n.publishRequestid=t.publishRequestid,n.p2pid=t.p2pid,t.videoName&&(n.videoName=t.videoName),t.audioName&&(n.audioName=t.audioName),t.screenName&&(n.screenName=t.screenName),delete n.startTime,g.send({type:"Publish",data:n}),g._flushInvokeReport(e)},subscribe:function(e,t){var n=s()({},g.list[e]);n.eventType=S;var i=t.lts;n.lts=Date.now(),n.eventElapse=n.lts-i,n.elapse=n.lts-n.startTime,n.errorCode=t.ec,n.success=t.succ,n.subscribeRequestid=t.subscribeRequestid,n.p2pid=t.p2pid,isFinite(t.peerid)?n.peer=t.peerid:n.peerSuid=""+t.peerid,"boolean"==typeof t.video&&(n.video=t.video),"boolean"==typeof t.audio&&(n.audio=t.audio),delete n.startTime,g.send({type:"Subscribe",data:n}),g._flushInvokeReport(e)},firstRemoteFrame:function(e,t){var n=s()({},g.list[e]);n.eventType="first_remote_frame";var i=t.lts;n.lts=Date.now(),n.eventElapse=n.lts-i,n.elapse=n.lts-n.startTime,n.width=t.width,n.height=t.height,n.success=t.succ,n.errorCode=t.ec,isFinite(t.peerid)?n.peer=t.peerid:n.peerSuid=""+t.peerid,delete n.startTime,g.send({type:"FirstFrame",data:n})},firstVideoReceived:function(e,t){var n=s()({},g.list[e]);n.eventType="first_video_received",n.lts=Date.now(),n.peer=t.peerid,n.uid=t.uid,n.elapse=t.elapse,n.subscribeElapse=t.subscribeElapse,n.subscribeRequestid=t.subscribeRequestid,n.p2pid=t.p2pid,g.send({type:"FirstVideoReceived",data:n})},firstAudioReceived:function(e,t){var n=s()({},g.list[e]);n.eventType="first_audio_received",n.lts=Date.now(),n.peer=t.peerid,n.uid=t.uid,n.elapse=t.elapse,n.subscribeElapse=t.subscribeElapse,n.subscribeRequestid=t.subscribeRequestid,n.p2pid=t.p2pid,g.send({type:"FirstAudioReceived",data:n})},firstVideoDecode:function(e,t){var n=s()({},g.list[e]);n.eventType="first_video_decode",n.lts=Date.now(),n.peer=t.peerid,n.uid=t.uid,n.elapse=t.elapse,n.videowidth=t.width,n.videoheight=t.height,n.subscribeElapse=t.subscribeElapse,n.subscribeRequestid=t.subscribeRequestid,n.p2pid=t.p2pid,g.send({type:"FirstVideoDecode",data:n})},firstAudioDecode:function(e,t){var n=s()({},g.list[e]);n.eventType="first_audio_decode",n.lts=Date.now(),n.uid=t.uid,n.peer=t.peerid,n.elapse=t.elapse,n.subscribeElapse=t.subscribeElapse,n.subscribeRequestid=t.subscribeRequestid,n.p2pid=t.p2pid,g.send({type:"FirstAudioDecode",data:n})},onAddAudioStream:function(e,t){var n=s()({},g.list[e]);n.eventType="on_add_audio_stream",n.lts=Date.now(),n.uid=t.uid,n.peer=t.peerid,g.send({type:"OnAddAudioStream",data:n})},onAddVideoStream:function(e,t){var n=s()({},g.list[e]);n.eventType="on_add_video_stream",n.lts=Date.now(),n.uid=t.uid,n.peer=t.peerid,g.send({type:"OnAddVideoStream",data:n})},onUpdateStream:function(e,t){var n=s()({},g.list[e]);n.eventType="on_update_stream",n.lts=Date.now(),n.uid=t.uid,n.peer=t.peerid,n.audio=t.audio,n.video=t.video,g.send({type:"OnUpdateStream",data:n})},onRemoveStream:function(e,t){var n=s()({},g.list[e]);n.eventType="on_remove_stream",n.lts=Date.now(),n.uid=t.uid,n.peer=t.peerid,g.send({type:"OnRemoveStream",data:n})},streamSwitch:function(e,t){var n=s()({},g.list[e]);n.eventType="stream_switch",n.lts=Date.now(),n.isDual=t.isdual,n.elapse=n.lts-n.startTime,n.success=n.succ,delete n.startTime,g.send({type:"StreamSwitch",data:n})}
1,audioSendingStopped:function(e,t){var n=s()({},g.list[e]);n.eventType="audio_sending_stopped",n.lts=Date.now(),n.elapse=n.lts-n.startTime,n.reason=t.reason,n.success=t.succ,delete n.startTime,g.send({type:"AudioSendingStopped",data:n})},videoSendingStopped:function(e,t){var n=s()({},g.list[e]);n.eventType="video_sending_stopped",n.lts=Date.now(),n.elapse=n.lts-n.startTime,n.reson=t.reason,n.success=t.succ,delete n.startTime,g.send({type:"VideoSendingStopped",data:n})},requestProxyAppCenter:function(e,t){var n=s()({},g.list[e]),i=t.lts;n.eventType="request_proxy_appcenter",n.lts=Date.now(),n.eventElapse=n.lts-i,n.elapse=n.lts-n.startTime,n.extend=t.extend+"",n.APAddr=t.APAddr,n.workerManagerList=t.workerManagerList,n.response=t.response,n.errorCode=t.ec,n.success=t.succ,delete n.startTime,g.send({type:"RequestProxyAppCenter",data:n})},requestProxyWorkerManager:function(e,t){var n=s()({},g.list[e]),i=t.lts;n.eventType="request_proxy_worker_manager",n.lts=Date.now(),n.eventElapse=n.lts-i,n.elapse=n.lts-n.startTime,n.extend=t.extend,n.workerManagerAddr=t.workerManagerAddr,n.response=t.response,n.errorCode=t.ec,n.success=t.succ,delete n.startTime,g.send({type:"RequestProxyWorkerManager",data:n})},requestWorkerEvent:function(e,t){var n=s()({},g.list[e]),i=n.startTime,r=Date.now();delete(n=f({},n,{},t,{elapse:r-i,lts:r,productType:"WebRTC"})).startTime,g.send({type:"WorkerEvent",data:n})},requestApWorkerEvent:function(e,t){var n=s()({},g.list[e]),i=n.startTime,r=Date.now();n=f({},n,{},t,{elapse:r-i,lts:r}),g.send({type:"APWorkerEvent",data:n})},sendCustomReportMessage:function(e,t,n){var i={type:"UserAnalytics",data:f({sid:e},t)},r=g.getUrl(),o=!!g.proxyServerURL;Object(c.post)(r,i,function(e){n&&n()},function(e){var t=g.getBackUrl();Object(c.post)(t,i,function(e){n&&n()},function(e){n&&n("Failed")},o?{timeout:Object(a.getParameter)("CUSTOMER_REPORT_TIMEOUT")}:{timeout:Object(a.getParameter)("CUSTOMER_REPORT_TIMEOUT"),"Cache-Control":"no-cache, no-store",Pragma:"no-cache",Expires:"0"})},o?{timeout:Object(a.getParameter)("CUSTOMER_REPORT_TIMEOUT")}:{timeout:Object(a.getParameter)("CUSTOMER_REPORT_TIMEOUT"),"Cache-Control":"no-cache, no-store",Pragma:"no-cache",Expires:"0"})},joinChannelTimeOut:function(e){g.send({type:"JoinChannelTimeout",data:f({},e)})},peerPublishStatus:function(e){g.send({type:"PeerPublishStatus",data:f({},e)})},joinWebProxyAP:function(e){g.send({type:"JoinWebProxyAP",data:f({},e)})},webSocketQuit:function(e){g.send({type:"WebSocketQuit",data:f({},e)})}}).reportApiInvoke=function(e,t){var n=t.tag,i=t.name,r=t.getStates,o=t.options,s=t.timeout,c=void 0===s?6e4:s,u=t.callback,d=t.reportResult,h=void 0===d||d,p=Date.now(),g=0,v=m++,y=function(){return f({tag:n,invokeId:v,sid:e,name:i,apiInvokeTime:p,options:o},r&&{states:(t=r(),Object.keys(t).reduce(function(e,n){var i=e;return null!=t[n]&&(i[n]=t[n]),i},{}))});var t},b=!!Object(a.getParameter)("SHOW_REPORT_INVOKER_LOG");b&&l.default.info("".concat(i," start"));var _=setTimeout(function(){I._sendApiInvoke(f({},y(),{error:"API_INVOKE_TIMEOUT",success:!1}))},c);return function(e,t){if(clearTimeout(_),++g>1&&(e="EXECUTOR_INVOKE_".concat(g)),e)return I._sendApiInvoke(f({},y(),{success:!1,error:e},r&&{states:r()})),b&&l.default.info("".concat(i," onFailure"),e),u&&u(e);I._sendApiInvoke(f({},y(),{success:!0},h&&{result:t},{},r&&{states:r()})),b&&l.default.info("".concat(i," onSuccess")),u&&u(null,t)}},g._cachedItems=[],g._cacheInvokeReport=function(e){e.lts||(e.lts=Date.now()),g._cachedItems.push(e),g._cachedItems.length>50&&g._cachedItems.shift()},g._flushInvokeReport=function(e){if(g._cachedItems.length){var t=g._cachedItems;g._cachedItems=[],l.default.debug("Flush cached event reporting:",t.length),t.forEach(function(t,n){t.sid=e,setTimeout(function(){g._sendApiInvoke(t)},5e3+500*n)})}},g._sendApiInvoke=function(e){var t=e.tag,n=e.invokeId,i=e.sid,r=e.name,o=e.result,s=e.states,l=e.options,c=e.error,u=e.success,d=e.apiInvokeTime,h=e.lts,p=Object(a.getParameter)("NOT_REPORT_EVENT");if(!(t&&p instanceof Array&&-1!==p.indexOf(t)))if(g.list[i]){var m=g.list[i],v=m.startTime,y=m.cname,b=m.uid,_=m.cid,S=(h=h||Date.now())-v,w=h-d,E="";if(l)try{E=JSON.stringify(l)}catch(e){E=l.toString()}var T=f({invokeId:n,sid:i,cname:y,cid:_,lts:h,uid:b,success:u,elapse:S,apiName:r,execElapse:w},void 0!==l&&{options:E},{},void 0!==s&&{execStates:JSON.stringify(s)},{},void 0!==c&&{errorCode:JSON.stringify(c)},{},void 0!==o&&{execResult:JSON.stringify(o)});g.send({type:"ApiInvoke",data:T})}else g._cacheInvokeReport(arguments[0])},g.sendCache=[],g.sendTimer=null,g.send=function(e){if(e.data){var t=e.data;g._lastLts&&g._lastLts>=t.lts&&(t.lts=g._lastLts+1),g._lastLts=t.lts}if(g.sendCache.push(e),null===g.sendTimer)return function e(){g.sendTimer=setTimeout(function(){if(0!==g.sendCache.length){var t=g.sendCache.splice(0,g.sendCache.length<10?g.sendCache.length:10);return w.sendReportList(t,g.list[t[0].data.sid].vid),e()}g.sendTimer=null},Object(a.getParameter)("EVENT_REPORT_SEND_INTERVAL"))}()},g)},function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BUILD="v3.6.9-0-g3107120",t.VERSION="3.6.9";var i=0*Date.now()+11499+86604+5615+6547+846;t.SUPPORT_RESOLUTION_LIST={"90p_1":[160,90,null,null,null,null],"120p_1":[160,120,15,15,30,65],"120p_3":[120,120,15,15,30,50],"120p_4":[212,120,null,null,null,null],"180p_1":[320,180,15,15,30,140],"180p_3":[180,180,15,15,30,100],"180p_4":[240,180,15,15,30,120],"240p_1":[320,240,15,15,40,200],"240p_3":[240,240,15,15,40,140],"240p_4":[424,240,15,15,40,220],"360p_1":[640,360,15,15,80,400],"360p_3":[360,360,15,15,80,260],"360p_4":[640,360,30,30,80,600],"360p_6":[360,360,30,30,80,400],"360p_7":[480,360,15,15,80,320],"360p_8":[480,360,30,30,80,490],"360p_9":[640,360,15,15,80,800],"360p_10":[640,360,24,24,80,800],"360p_11":[640,360,24,24,80,1e3],"480p_1":[640,480,15,15,100,500,1,5],"480p_2":[640,480,30,30,100,1e3,25,30],"480p_3":[480,480,15,15,100,400],"480p_4":[640,480,30,30,100,750],"480p_6":[480,480,30,30,100,600],"480p_8":[848,480,15,15,100,610],"480p_9":[848,480,30,30,100,930],"480p_10":[640,480,10,10,100,400],"720p_1":[1280,720,15,15,120,1130,1,5],"720p_2":[1280,720,30,30,120,2e3,25,30],"720p_3":[1280,720,30,30,120,1710],"720p_5":[960,720,15,15,120,910],"720p_6":[960,720,30,30,120,1380],"1080p_1":[1920,1080,15,15,120,2080,1,5],"1080p_2":[1920,1080,30,30,120,3e3,25,30],"1080p_3":[1920,1080,30,30,120,3150],"1080p_5":[1920,1080,60,60,120,4780],"1440p_1":[2560,1440,30,30,120,4850],"1440p_2":[2560,1440,60,60,120,7350],"4k_1":[3840,2160,30,30,120,8910],"4k_3":[3840,2160,60,60,120,13500]},t.AUDIO_PROFILE_SETTINGS={speech_low_quality:[!1,!1,!0,!0],speech_standard:[!1,!1,!0,!1],music_standard:[!1,!1,!1,!1],standard_stereo:[!1,!0,!1,!1],high_quality:[!0,!1,!1,!1],high_quality_stereo:[!0,!0,!1,!1],default:[!1,!1,!1,!1]};var r={AREA_SETTING:["NORTH_AMERICA","OVERSEA"],WEBCS_DOMAIN:["ap-web-1-oversea.agora.io","ap-web-1-north-america.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-oversea.agora.io","ap-web-2-north-america.agora.io"],PROXY_CS:["proxy-ap-web-oversea.agora.io","proxy-ap-web-america.agora.io"],CDS_AP:["cds-ap-web-oversea.agora.io","cds-ap-web-america.agora.io","cds-ap-web-america2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-oversea.agora.io","sua-ap-web-america.agora.io","sua-ap-web-america2.agora.io"],UAP_AP:["uap-ap-web-oversea.agora.io","uap-ap-web-america.agora.io","uap-ap-web-america2.agora.io"],LOG_UPLOAD_SERVER:"logservice-oversea.agora.io",EVENT_REPORT_DOMAIN:"statscollector-1-oversea.agora.io",EVENT_REPORT_BACKUP_DOMAIN:"statscollector-2-oversea.agora.io",ENABLE_LIVE_SERVER_LIST:!1,LIVE_SERVER_LIST:[],ACCOUNT_REGISTER_RETRY_TIMEOUT:1,ACCOUNT_REGISTER_RETRY_RATIO:2,ACCOUNT_REGISTER_RETRY_TIMEOUT_MAX:6e4,ACCOUNT_REGISTER_RETRY_COUNT_MAX:1e5,AUDIO_CONTEXT:null,GATEWAY_DOMAINS:["edge.agora.io"],WEBCS_BACKUP_CONNECT_TIMEOUT:6e3,LIVESTREAMING_ALIGN:!0,HTTP_CONNECT_TIMEOUT:5e3,PLAYER_STATE_DEFER:2e3,SIGNAL_REQUEST_TIMEOUT:1e7,SIGNAL_REQUEST_WATCH_INTERVAL:1e3,REPORT_STATS:!0,REPORT_STATS_TIMEOUT:3e3,UPLOAD_LOG:!1,NOT_REPORT_EVENT:[],FILEPATH_LENMAX:255,SUBSCRIBE_TCC:!1,PING_PONG_TIME_OUT:10,DUALSTREAM_OPERATION_CHECK:!0,WEBSOCKET_TIMEOUT_MIN:1e4,EVENT_REPORT_SEND_INTERVAL:1e3,MEDIA_ELEMENT_EXISTS_DEPTH:3,CANDIDATE_TIMEOUT:2e3,SHIM_CANDIDATE:!1,LEAVE_MSG_TIMEOUT:2e3,TICKET_RENEW_TIMEOUT:828e5,LIVE_STREAMING_TIMEOUT:12e4,SHOW_REPORT_INVOKER_LOG:!1,STATS_FILTER:{transportId:!0,googTrackId:!0},FORCE_TURN:!1,TURN_ENABLE_TCP:!0,TURN_ENABLE_UDP:!0,FORCE_CHANGED_GATEWAY_FLAG:!1,JOIN_EXTEND:"",PUB_EXTEND:"",SUB_EXTEND:"",CHROME_NEW_STATS:!1,AP_BACKOFF_MAX_TIME:8,SET_DEFAULT_TURNSERVER:!0,TURN_SERVER_PASSWORD:i.toString(),PROXY_SERVER_TYPE2:"webnginx-proxy.agora.io",NGINX:"webrtc-cloud-proxy.agora.io",PROXY_SERVER_TYPE3:["webrtc-cloud-proxy.sd-rtn.com","webrtc-cloud-proxy.agora.io"],CR:!0,CRL:10,CRI:6,CUSTOMER_REPORT_TIMEOUT:5e3,LIVE_STREAMING_ADDRESS:"",CHOOSE_SERVER_FRAGEMENT_LENGTH:4,PLAN:"plan-b"};r.AREA_SETTING=["CHINA","GLOBAL"],r.WEBCS_DOMAIN=["webrtc2-ap-web-1.agora.io","webrtc2-2.ap.sd-rtn.com"],r.WEBCS_DOMAIN_BACKUP_LIST=["webrtc2-ap-web-3.agora.io","webrtc2-4.ap.sd-rtn.com"],r.PROXY_CS=["ap-proxy-1.agora.io","ap-proxy-2.agora.io"],r.CDS_AP=["cds-ap-web-1.agora.io","cds-web-2.ap.sd-rtn.com","cds-ap-web-3.agora.io","cds-web-4.ap.sd-rtn.com"],r.ACCOUNT_REGISTER=["sua-ap-web-1.agora.io","sua-web-2.ap.sd-rtn.com","sua-ap-web-3.agora.io","sua-web-4.ap.sd-rtn.com"],r.UAP_AP=["uap-ap-web-1.agora.io","uap-web-2.ap.sd-rtn.com","uap-ap-web-3.agora.io","uap-web-4.ap.sd-rtn.com"],r.LOG_UPLOAD_SERVER="logservice.agora.io",r.EVENT_REPORT_DOMAIN="web-2.statscollector.sd-rtn.com",r.EVENT_REPORT_BACKUP_DOMAIN="web-3.statscollector.sd-rtn.com",r.GATEWAY_DOMAINS=["edge.agora.io","edge.sd-rtn.com"],r.NGINX="webrtc-cloud-proxy.sd-rtn.com",r.PROXY_SERVER_TYPE3=["webrtc-cloud-proxy.sd-rtn.com","webrtc-cloud-proxy.agora.io"],t.setParameter=function(e,t){return void 0!==r[e]&&(r[e]=t,!0)},t.getParameter=function(e){return void 0!==r[e]?r[e]:null}},function(e,t,n){"use strict";n.r(t),n.d(t,"checkValidObject",function(){return l}),n.d(t,"checkValidString",function(){return c}),n.d(t,"checkValidNumber",function(){return u}),n.d(t,"checkValidArray",function(){return d}),n.d(t,"checkValidFloatNumber",function(){return h}),n.d(t,"checkValidBoolean",function(){return p}),n.d(t,"checkValidEnum",function(){return a}),n.d(t,"checkValidUID",function(){return f}),n.d(t,"isValidString",function(){return g}),n.d(t,"isValidNumber",function(){return m}),n.d(t,"isValidBoolean",function(){return y}),n.d(t,"isASCII",function(){return S}),n.d(t,"isInteger",function(){return w}),n.d(t,"isNumber",function(){return E}),n.d(t,"isString",function(){return T}),n.d(t,"isArray",function(){return C}),n.d(t,"isEmpty",function(){return I}),n.d(t,"isValidToken",function(){return b}),n.d(t,"isValidChannelName",function(){return _});var i=n(11),r=n.n(i),o=n(10),s=n(0),a=function(e,t,n){for(var i=0;i<n.length;i++)if(e===n[i])return!0;throw new Error("".concat(t," can only be set as ").concat(JSON.stringify(n)))},l=function(e,t){if(!e)throw new Error("Invalid param: ".concat(t||"param"," cannot be empty"));if("object"!==r()(e))throw new Error("".concat(t||"This paramter"," is of the object type"));return!0},c=function(e,t,n,i,r){if(I(n)&&(n=1),i=i||255,I(r)&&(r=!0),I(e))throw new Error("".concat(t||"param"," cannot be empty"));if(!g(e,n,i,r))throw new Error("Invalid ".concat(t||"string param",": Length of the string: [").concat(n,",").concat(i,"].").concat(r?" ASCII characters only.":""))},u=function(e,t,n,i){if(I(n)&&(n=1),i=i||1e4,I(e))throw new Error("".concat(t||"param"," cannot be empty"));
1if(!m(e,n,i))throw new Error("Invalid ".concat(t||"number param",": The value range is [").concat(n,",").concat(i,"]. integer only"))},d=function(e,t){if(!Array.isArray(e))throw new Error("".concat(t," should be an array"))},h=function(e,t,n,i){if(null==e)throw new Error("".concat(t||"param"," cannot be null"));if(I(n)&&(n=0),i=i||1e4,I(e))throw new Error("".concat(t||"param"," cannot be empty"));if(!v(e,n,i))throw new Error("Invalid ".concat(t||"number param",": The value range is [").concat(n,",").concat(i,"]."))},p=function(e,t){if(I(e))throw new Error("".concat(t||"param"," cannot be empty"));if(!y(e))throw new Error("Invalid ".concat(t||"boolean param",": The value is of the boolean type."))},f=function(e){if(!Object(o.is32Uint)(e)&&!g(e,1,255))throw s.default.error("Invalid UID ".concat(e," ").concat(r()(e))),new Error("[String uid] Length of the string: [1,255]. ASCII characters only. [Number uid] The value range is [0,10000]")},g=function(e,t,n,i){return t||(t=0),n||(n=Number.MAX_SAFE_INTEGER),I(i)&&(i=!0),T(e)&&(!i||S(e))&&e.length>=t&&e.length<=n},m=function(e,t,n){return w(e)&&e>=t&&e<=n},v=function(e,t,n){return E(e)&&e>=t&&e<=n},y=function(e){return"boolean"==typeof e},b=function(e){return g(e,1,2047)},_=function(e){return T(e)&&/^[a-zA-Z0-9 \!\#\$\%\&\(\)\+\-\:\;\<\=\.\>\?\@\[\]\^\_\{\}\|\~\,]{1,64}$/.test(e)},S=function(e){if("string"==typeof e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<0||n>255)return!1}return!0}},w=function(e){return"number"==typeof e&&e%1==0},E=function(e){return"number"==typeof e},T=function(e){return"string"==typeof e},C=function(e){return e instanceof Array},I=function(e){return null==e}},function(e,t,n){"use strict";n.r(t),n.d(t,"APErrorCode",function(){return i}),n.d(t,"GatewayErrorCode",function(){return r}),n.d(t,"StringUidErrorCode",function(){return o}),n.d(t,"JOIN_GS_TRYNEXT_LIST",function(){return s}),n.d(t,"JOIN_CS_RETRY_LIST",function(){return a}),n.d(t,"JOIN_PROXY_RETRY_LIST",function(){return l}),n.d(t,"INJECT_STREAM_STATUS",function(){return c}),n.d(t,"WEBSOCKET_CLOSE_REASON",function(){return u});var i={1010100:"NO_FLAG_SET",1010101:"FLAG_SET_BUT_EMPTY",1010102:"INVALID_FALG_SET",2010005:"INVALID_VENDOR_KEY",2010007:"INVALID_CHANNEL_NAME",2010008:"INTERNAL_ERROR",2010009:"NO_AUTHORIZED",2010010:"DYNAMIC_KEY_TIMEOUT",2010011:"NO_ACTIVE_STATUS",2010013:"DYNAMIC_KEY_EXPIRED",2010014:"STATIC_USE_DYANMIC_KEY",2010015:"DYNAMIC_USE_STATIC_KEY",2010016:"USER_OVERLOAD",2010018:"FORBIDDEN_REGION",2010019:"CANNOT_MEET_AREA_DEMAND"},r={2000:"ERR_NO_VOCS_AVAILABLE",2001:"ERR_NO_VOS_AVAILABLE",2002:"ERR_JOIN_CHANNEL_TIMEOUT",2003:"WARN_REPEAT_JOIN",2004:"ERR_JOIN_BY_MULTI_IP",2011:"ERR_NOT_JOINED",2012:"WARN_REPEAT_JOIN",2013:"ERR_INVALID_VENDOR_KEY",2014:"ERR_INVALID_CHANNEL_NAME",2015:"ERR_INVALID_STRINGUID",2016:"ERR_TOO_MANY_USERS",2017:"ERR_SET_CLIENT_ROLE_TIMEOUT",2018:"ERR_SET_CLIENT_ROLE_NO_PERMISSION",2019:"ERR_SET_CLIENT_ROLE_ALREADY_IN_USE",2020:"ERR_PUBLISH_REQUEST_INVALID",2021:"ERR_SUBSCRIBE_REQUEST_INVALID",2022:"ERR_NOT_SUPPORTED_MESSAGE",2023:"ERR_ILLEAGAL_PLUGIN",2028:"ILLEGAL_AES_PASSWORD",101:"ERR_INVALID_VENDOR_KEY",102:"ERR_INVALID_CHANNEL_NAME",103:"WARN_NO_AVAILABLE_CHANNEL",104:"WARN_LOOKUP_CHANNEL_TIMEOUT",105:"WARN_LOOKUP_CHANNEL_REJECTED",106:"WARN_OPEN_CHANNEL_TIMEOUT",107:"WARN_OPEN_CHANNEL_REJECTED",108:"WARN_REQUEST_DEFERRED",109:"ERR_DYNAMIC_KEY_TIMEOUT",110:"ERR_NO_AUTHORIZED",111:"ERR_VOM_SERVICE_UNAVAILABLE",112:"ERR_NO_CHANNEL_AVAILABLE_CODE",113:"ERR_TOO_MANY_USERS",114:"ERR_MASTER_VOCS_UNAVAILABLE",115:"ERR_INTERNAL_ERROR",116:"ERR_NO_ACTIVE_STATUS",117:"ERR_INVALID_UID",118:"ERR_DYNAMIC_KEY_EXPIRED",119:"ERR_STATIC_USE_DYANMIC_KE",120:"ERR_DYNAMIC_USE_STATIC_KE",2:"K_TIMESTAMP_EXPIRED",3:"K_CHANNEL_PERMISSION_INVALID",4:"K_CERTIFICATE_INVALID",5:"K_CHANNEL_NAME_EMPTY",6:"K_CHANNEL_NOT_FOUND",7:"K_TICKET_INVALID",8:"K_CHANNEL_CONFLICTED",9:"K_SERVICE_NOT_READY",10:"K_SERVICE_TOO_HEAVY",14:"K_UID_BANNED",15:"K_IP_BANNED",16:"K_CHANNEL_BANNED"},o={1:"ERROR_ILLEAGAL_APPID",2:"ERROR_ILLEAGAL_UID",3:"INTERNAL_SERVER_ERROR"},s=["ERR_NO_VOCS_AVAILABLE","ERR_NO_VOS_AVAILABLE","ERR_JOIN_CHANNEL_TIMEOUT","WARN_LOOKUP_CHANNEL_TIMEOUT","WARN_OPEN_CHANNEL_TIMEOUT","ERR_VOM_SERVICE_UNAVAILABLE","ERR_TOO_MANY_USERS","ERR_MASTER_VOCS_UNAVAILABLE","ERR_INTERNAL_ERROR"],a=["NO_SERVICE_AVAILABLE"],l=["NO_SERVICE_AVAILABLE","REQUEST_PROXY_SERVER_FAILED","REQUEST_PROXY_SERVER_TIME_OUT"],c={INJECT_STREAM_STATUS_START_SUCCESS:0,INJECT_STREAM_STATUS_START_ALREADY_EXISTS:1,INJECT_STREAM_STATUS_START_UNAUTHORIZED:2,INJECT_STREAM_STATUS_START_TIMEDOUT:3,INJECT_STREAM_STATUS_START_FAILED:4,INJECT_STREAM_STATUS_STOP_SUCCESS:5,INJECT_STREAM_STATUS_STOP_NOT_FOUND:6,INJECT_STREAM_STATUS_STOP_UNAUTHORIZED:7,INJECT_STREAM_STATUS_STOP_TIMEDOUT:8,INJECT_STREAM_STATUS_STOP_FAILED:9,INJECT_STREAM_STATUS_BROKEN:10}
1,u={WS_DISCONNECT:"WS_DISCONNECT"};t.default={FAILED:"FAILED",INVALID_KEY:"INVALID_KEY",INVALID_CLIENT_MODE:"INVALID_CLIENT_MODE",INVALID_CLIENT_CODEC:"INVALID_CLIENT_CODEC",CLIENT_MODE_CODEC_MISMATCH:"CLIENT_MODE_CODEC_MISMATCH",WEB_API_NOT_SUPPORTED:"WEB_API_NOT_SUPPORTED",INVALID_PARAMETER:"INVALID_PARAMETER",NO_TRACK_IN_STREAM:"NO_TRACK_IN_STREAM",INVALID_OPERATION:"INVALID_OPERATION",INVALID_LOCAL_STREAM:"INVALID_LOCAL_STREAM",INVALID_REMOTE_STREAM:"INVALID_REMOTE_STREAM",INVALID_DYNAMIC_KEY:"INVALID_DYNAMIC_KEY",DYNAMIC_KEY_TIMEOUT:"DYNAMIC_KEY_TIMEOUT",NO_VOCS_AVAILABLE:"NO_VOCS_AVAILABLE",NO_VOS_AVAILABLE:"ERR_NO_VOS_AVAILABLE",JOIN_CHANNEL_TIMEOUT:"ERR_JOIN_CHANNEL_TIMEOUT",NO_AVAILABLE_CHANNEL:"NO_AVAILABLE_CHANNEL",LOOKUP_CHANNEL_TIMEOUT:"LOOKUP_CHANNEL_TIMEOUT",LOOKUP_CHANNEL_REJECTED:"LOOKUP_CHANNEL_REJECTED",OPEN_CHANNEL_TIMEOUT:"OPEN_CHANNEL_TIMEOUT",OPEN_CHANNEL_REJECTED:"OPEN_CHANNEL_REJECTED",REQUEST_DEFERRED:"REQUEST_DEFERRED",STREAM_ALREADY_PUBLISHED:"STREAM_ALREADY_PUBLISHED",STREAM_NOT_YET_PUBLISHED:"STREAM_NOT_YET_PUBLISHED",JOIN_TOO_FREQUENT:"JOIN_TOO_FREQUENT",SOCKET_ERROR:"SOCKET_ERROR",SOCKET_DISCONNECTED:"SOCKET_DISCONNECTED",PEERCONNECTION_FAILED:"PEERCONNECTION_FAILED",CONNECT_GATEWAY_ERROR:"CONNECT_GATEWAY_ERROR",SERVICE_NOT_AVAILABLE:"SERVICE_NOT_AVAILABLE",JOIN_CHANNEL_FAILED:"JOIN_CHANNEL_FAILED",PUBLISH_STREAM_FAILED:"PUBLISH_STREAM_FAILED",UNPUBLISH_STREAM_FAILED:"UNPUBLISH_STREAM_FAILED",SUBSCRIBE_STREAM_FAILED:"SUBSCRIBE_STREAM_FAILED",UNSUBSCRIBE_STREAM_FAILED:"UNSUBSCRIBE_STREAM_FAILED",NO_SUCH_REMOTE_STREAM:"NO_SUCH_REMOTE_STREAM",ERR_FAILED:"1",ERR_INVALID_VENDOR_KEY:"101",ERR_INVALID_CHANNEL_NAME:"102",WARN_NO_AVAILABLE_CHANNEL:"103",WARN_LOOKUP_CHANNEL_TIMEOUT:"104",WARN_LOOKUP_CHANNEL_REJECTED:"105",WARN_OPEN_CHANNEL_TIMEOUT:"106",WARN_OPEN_CHANNEL_REJECTED:"107",WARN_REQUEST_DEFERRED:"108",ERR_DYNAMIC_KEY_TIMEOUT:"109",ERR_INVALID_DYNAMIC_KEY:"110",ERR_NO_VOCS_AVAILABLE:"2000",ERR_NO_VOS_AVAILABLE:"2001",ERR_JOIN_CHANNEL_TIMEOUT:"2002",IOS_NOT_SUPPORT:"IOS_NOT_SUPPORT",WECHAT_NOT_SUPPORT:"WECHAT_NOT_SUPPORT",SHARING_SCREEN_NOT_SUPPORT:"SHARING_SCREEN_NOT_SUPPORT",STILL_ON_PUBLISHING:"STILL_ON_PUBLISHING",LOW_STREAM_ALREADY_PUBLISHED:"LOW_STREAM_ALREADY_PUBLISHED",LOW_STREAM_NOT_YET_PUBLISHED:"LOW_STREAM_ALREADY_PUBLISHED",HIGH_STREAM_NOT_VIDEO_TRACE:"HIGH_STREAM_NOT_VIDEO_TRACE",NOT_FIND_DEVICE_BY_LABEL:"NOT_FIND_DEVICE_BY_LABEL",ENABLE_DUALSTREAM_FAILED:"ENABLE_DUALSTREAM_FAILED",DISABLE_DUALSTREAM_FAILED:"DISABLE_DUALSTREAM_FAILED",PLAYER_NOT_FOUND:"PLAYER_NOT_FOUND",ELECTRON_NOT_SUPPORT_SHARING_SCREEN:"ELECTRON_NOT_SUPPORT_SHARING_SCREEN",BAD_ENVIRONMENT:"BAD_ENVIRONMENT",LOAD_AUDIO_FAILED:"LOAD_AUDIO_FAILED"}},function(e,t,n){"use strict";n.r(t),n.d(t,"getBrowserInfo",function(){return y}),n.d(t,"getBrowserVersion",function(){return h}),n.d(t,"getBrowserOS",function(){return p}),n.d(t,"isChrome",function(){return i}),n.d(t,"isSafari",function(){return r}),n.d(t,"isFireFox",function(){return s}),n.d(t,"isOpera",function(){return a}),n.d(t,"isEdge",function(){return o}),n.d(t,"isQQBrowser",function(){return l}),n.d(t,"isWeChatBrowser",function(){return c}),n.d(t,"isLegacyChrome",function(){return g}),n.d(t,"isSupportedPC",function(){return u}),n.d(t,"isSupportedMobile",function(){return d}),n.d(t,"getChromeKernelVersion",function(){return v}),n.d(t,"isChromeKernel",function(){return f});var i=function(){var e=y();return e.name&&"Chrome"===e.name},r=function(){var e=y();return e.name&&"Safari"===e.name},o=function(){var e=y();return e.name&&"Edge"===e.name},s=function(){var e=y();return e.name&&"Firefox"===e.name},a=function(){var e=y();return e.name&&"OPR"===e.name},l=function(){var e=y();return e.name&&"QQBrowser"===e.name},c=function(){var e=y();return e.name&&"MicroMessenger"===e.name},u=function(){var e=p();return"Linux"===e||"Mac OS X"===e||"Mac OS"===e||-1!==e.indexOf("Windows")},d=function(){var e=p();return"Android"===e||"iOS"===e},h=function(){return y().version},p=function(){return y().os},f=function(){return!!navigator.userAgent.match(/chrome\/[\d]+/i)};function g(){return window.navigator.appVersion&&null!==window.navigator.appVersion.match(/Chrome\/([\w\W]*?)\./)&&window.navigator.appVersion.match(/Chrome\/([\w\W]*?)\./)[1]<=35}var m,v=function(){var e=navigator.userAgent.match(/chrome\/[\d]+/i);return e&&e[0]&&e[0].split("/")[1]},y=(m=function(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];"Chrome"===n[1]&&null!=(e=t.match(/(OPR(?=\/))\/?(\d+)/i))&&(n=e),"Safari"===n[1]&&null!=(e=t.match(/version\/(\d+)/i))&&(n[2]=e[1]),~t.toLowerCase().indexOf("qqbrowser")&&null!=(e=t.match(/(qqbrowser(?=\/))\/?(\d+)/i))&&(n=e),~t.toLowerCase().indexOf("micromessenger")&&null!=(e=t.match(/(micromessenger(?=\/))\/?(\d+)/i))&&(n=e),~t.toLowerCase().indexOf("edge")&&null!=(e=t.match(/(edge(?=\/))\/?(\d+)/i))&&(n=e),~t.toLowerCase().indexOf("trident")&&null!=(e=/\brv[ :]+(\d+)/g.exec(t)||[])&&(n=[null,"IE",e[1]]);
1var i=void 0,r=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var o in r){var s=r[o];if(s.r.test(navigator.userAgent)){i=s.s;break}}return{name:n[1],version:n[2],os:i}}(),function(){return m})},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return r}),n.d(t,"c",function(){return o}),n(0);var i=function(e,t,n){if(["End2EndDelay","TransportDelay","PacketLossRate","RecvLevel","RecvBitrate","CodecType","MuteState","TotalFreezeTime","TotalPlayDuration","RecordingLevel","SendLevel","SamplingRate","SendBitrate","CodecType","MuteState","End2EndDelay","TransportDelay","PacketLossRate","RecvBitrate","RecvResolutionWidth","RecvResolutionHeight","RenderResolutionHeight","RenderResolutionWidth","RenderFrameRate","TotalFreezeTime","TotalPlayDuration","TargetSendBitrate","SendFrameRate","SendFrameRate","SendBitrate","SendResolutionWidth","SendResolutionHeight","CaptureResolutionHeight","CaptureResolutionWidth","EncodeDelay","MuteState","TotalFreezeTime","TotalDuration","CaptureFrameRate","RTT","OutgoingAvailableBandwidth","Duration","UserCount","SendBytes","RecvBytes","SendBitrate","RecvBitrate","accessDelay","audioSendBytes","audioSendPackets","videoSendBytes","videoSendPackets","videoSendPacketsLost","videoSendFrameRate","audioSendPacketsLost","videoSendResolutionWidth","videoSendResolutionHeight","accessDelay","audioReceiveBytes","audioReceivePackets","audioReceivePacketsLost","videoReceiveBytes","videoReceivePackets","videoReceivePacketsLost","videoReceiveFrameRate","videoReceiveDecodeFrameRate","videoReceiveResolutionWidth","videoReceiveResolutionHeight","endToEndDelay","videoReceiveDelay","audioReceiveDelay","FirstFrameTime","VideoFreezeRate","AudioFreezeRate","RenderResolutionWidth","RenderResolutionHeight","VideoPublishDuration","AudioPublishDuration"].indexOf(t)>-1&&("string"==typeof n||isFinite(n)))return e[t]=""+n},r=function(e){var t={};return e.forEach(function(e){e.id&&e.type&&(-1===e.id.indexOf("send")&&-1===e.type.toLowerCase().indexOf("outbound")&&-1===e.id.indexOf("outbound_rtp")&&-1===e.id.indexOf("OutboundRTP")||("audio"===e.mediaType?(i(t,"audioSendBytes",e.bytesSent),i(t,"audioSendPackets",e.packetsSent),i(t,"audioSendPacketsLost",e.packetsLost)):(i(t,"videoSendBytes",e.bytesSent),i(t,"videoSendPackets",e.packetsSent),i(t,"videoSendPacketsLost",e.packetsLost),i(t,"videoSendFrameRate",e.googFrameRateSent),i(t,"videoSendResolutionWidth",e.googFrameWidthSent),i(t,"videoSendResolutionHeight",e.googFrameHeightSent))))}),t},o=function(e){var t={};return e.forEach(function(e){e.id&&e.type&&(-1===e.id.indexOf("recv")&&-1===e.type.toLowerCase().indexOf("inbound")&&-1===e.id.indexOf("inbound_rtp")&&-1===e.id.indexOf("inbound-rtp")&&-1===e.id.indexOf("InboundRTP")||("audio"===e.mediaType?(i(t,"audioReceiveBytes",e.bytesReceived),i(t,"audioReceivePackets",e.packetsReceived),i(t,"audioReceivePacketsLost",e.packetsLost)):(i(t,"videoReceiveBytes",e.bytesReceived),i(t,"videoReceivePacketsLost",e.packetsLost),i(t,"videoReceivePackets",e.packetsReceived),i(t,"videoReceiveFrameRate",e.googFrameRateReceived),i(t,"videoReceiveDecodeFrameRate",e.googFrameRateDecoded),i(t,"videoReceiveResolutionWidth",e.googFrameWidthReceived),i(t,"videoReceiveResolutionHeight",e.googFrameHeightReceived))))}),t}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}
1e.exports=n},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"e",function(){return s}),n.d(t,"a",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"c",function(){return c});var i=n(0),r=function(){var e={dispatcher:{}};return e.dispatcher.eventListeners={},e.addEventListener=function(t,n){void 0===e.dispatcher.eventListeners[t]&&(e.dispatcher.eventListeners[t]=[]),e.dispatcher.eventListeners[t].push(n)},e.hasListeners=function(t){return!(!e.dispatcher.eventListeners[t]||!e.dispatcher.eventListeners[t].length)},e.on=e.addEventListener,e.removeEventListener=function(t,n){var i;e.dispatcher.eventListeners[t]&&-1!==(i=e.dispatcher.eventListeners[t].indexOf(n))&&e.dispatcher.eventListeners[t].splice(i,1)},e.dispatchEvent=function(t){var n;for(n in e.dispatcher.eventListeners[t.type])if(e.dispatcher.eventListeners[t.type]&&e.dispatcher.eventListeners[t.type].hasOwnProperty(n)&&"function"==typeof e.dispatcher.eventListeners[t.type][n])try{e.dispatcher.eventListeners[t.type][n](t)}catch(n){i.default.debug("[".concat(e.clientId,"] Error in ").concat(t.type," event"),n)}},e.dispatchSocketEvent=function(t){var n;for(n in e.dispatcher.eventListeners[t.type])e.dispatcher.eventListeners[t.type]&&e.dispatcher.eventListeners[t.type].hasOwnProperty(n)&&"function"==typeof e.dispatcher.eventListeners[t.type][n]&&e.dispatcher.eventListeners[t.type][n](t.msg)},e},o=function(e){var t={};return t.type=e.type,t},s=function(e){var t=o(e);return t.stream=e.stream,t.reason=e.reason,t.msg=e.msg,t},a=function(e){var t=o(e);return t.uid=e.uid,t.attr=e.attr,t.stream=e.stream,t},l=function(e){var t=o(e);return t.msg=e.msg,t},c=function(e){var t=o(e);return t.url=e.url,t.uid=e.uid,t.status=e.status,t.reason=e.reason,t}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(69)),c=n(2),u=a(n(0)),d=n(3),h=n(14),p=n(10),f=function(e){function t(t,n){var i=e.call(this)||this;return i._state=b.RELAY_STATE_IDLE,i._onStatus=function(e){u.default.debug("["+i.clientId+"] ChannelMediaStatus: "+JSON.stringify(e)),e&&e.command&&("onAudioPacketReceived"===e.command&&i.emit("event",y.PACKET_RECEIVED_AUDIO_FROM_SRC),"onVideoPacketReceived"===e.command&&i.emit("event",y.PACKET_RECEIVED_VIDEO_FROM_SRC),"onSrcTokenPrivilegeDidExpire"===e.command&&(i._state=b.RELAY_STATE_FAILURE,i.emit("state",b.RELAY_STATE_FAILURE,_.SRC_TOKEN_EXPIRED)),"onDestTokenPrivilegeDidExpire"===e.command&&(i._state=b.RELAY_STATE_FAILURE,i.emit("state",b.RELAY_STATE_FAILURE,_.DEST_TOKEN_EXPIRED,e.channelName?{came:e.channelName}:null)))},i._onClose=function(){return o(i,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(u.default.debug("["+this.clientId+"] ChannelMediaSocket onClose"),this.emit
1("event",y.NETWORK_DISCONNECTED),this.state=b.RELAY_STATE_IDLE,!this._prevChannelMediaConfig)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.startChannelMediaRelay(this._prevChannelMediaConfig)];case 2:return t.sent(),[3,4];case 3:return(e=t.sent())instanceof w&&(e.message===m.WS_ABORT||e.message===m.AP_REQUEST_ABORT)?[2]:(this.emit("state",b.RELAY_STATE_FAILURE,_.SERVER_CONNECTION_LOST),[3,4]);case 4:return[2]}})})},i.token=t.appId,i.appId=t.appId,i.cname=t.cname,i.uid=t.uid,i.sid=t.sid,i.clientId=n,i}return r(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){var t=this._state;this._state=e,t!==e&&this.emit("state",e)},enumerable:!0,configurable:!0}),t.prototype.startChannelMediaRelay=function(e){return o(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:if(this.state!==b.RELAY_STATE_IDLE)throw new w(m.BAD_STATE);return this.state=b.RELAY_STATE_CONNECTING,[4,this._connect()];case 1:return t.sent(),u.default.debug("["+this.clientId+"] startChannelMediaRelay: connect success"),[4,this._sendStartRelayMessage(e)];case 2:return t.sent(),this._prevChannelMediaConfig=e,[2]}})})},t.prototype.updateChannelMediaRelay=function(e){return o(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:if(this.state!==b.RELAY_STATE_RUNNING)throw new w(m.BAD_STATE);return[4,this._sendUpdateMessage(e)];case 1:return t.sent(),this._prevChannelMediaConfig=e,[2]}})})},t.prototype.stopChannelMediaRelay=function(){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,this._sendStopRelayMessage()];case 1:return e.sent(),u.default.debug("["+this.clientId+"] stopChannelMediaRelay: send stop message success"),this.state=b.RELAY_STATE_IDLE,this.dispose(),[2]}})})},t.prototype.dispose=function(){u.default.debug("["+this.clientId+"] disposeChannelMediaRelay"),this.state=b.RELAY_STATE_IDLE,this.emit("dispose"),this._signal&&this._signal.dispose(),this._prevChannelMediaConfig=null,this.removeEvent()},t.prototype._requestOneAP=function(e){var t=this;return new Promise(function(n,i){var r={command:"convergeAllocateEdge",sid:t.sid,appId:t.appId,token:"",ts:+new Date,version:c.VERSION,cname:t.cname,uid:t.uid+"",seq:1,requestId:1},o={service_name:"tele_channel",json_body:JSON.stringify(r)};h.post("https://"+e,o,function(e){var t=null,r=null;try{t=JSON.parse(e)}catch(e){i(new w(m.AP_JSON_PARSE_ERROR,e))}0!==t.code&&i(new w(m.AP_REQUEST_ERROR,t));try{r=JSON.parse(t.json_body)}catch(e){i(new w(m.AP_JSON_PARSE_ERROR,e))}200!==r.code&&i(new w(m.AP_REQUEST_ERROR,r)),r.servers?n(r.servers):i(new w(m.AP_JSON_PARSE_ERROR,r))},function(e){return i(e)},{"X-Packet-Service-Type":0,"X-Packet-URI":61})})},t.prototype._requestAP=function(){var e=this,t=c.getParameter("UAP_AP");return new Promise(function(n,i){setTimeout(function(){i(new w(m.AP_REQUEST_TIMEOUT))},5e3),e.on("dispose",function(){i(new w(m.AP_REQUEST_ABORT))}),t.forEach(function(t){e._requestOneAP(t+="/api/v1").then(function(i){u.default.debug("["+e.clientId+"] startChannelMediaRelay request AP "+t+" success: "+JSON.stringify(i));var r=i[0],o="wss://"+r.address.replace(/\./g,"-")+".edge.agora.io:"+r.wss;n(o)}).catch(function(n){u.default.debug("["+e.clientId+"] startChannelMediaRelay request AP "+t+" failed: "+JSON.stringify(n))})})})},t.prototype._connectWebsocket=function(e){return this._signal=new S(this.appId,this.cname,this.uid,this.sid),this._signal.connect(e)},t.prototype._connect=function(){return o(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,this._requestAP()];case 1:return e=t.sent(),[4,this._connectWebsocket(e)];case 2:return t.sent(),this._signal.on("close",this._onClose.bind(this)),this._signal.on("status",this._onStatus.bind(this)),this.emit("event",y.NETWORK_CONNECTED),[2]}})})},t.prototype._sendStartRelayMessage=function(e){return o(this,void 0,void 0,function(){var t,n,i,r,o,a;return s(this,function(s){switch(s.label){case 0:return this._checkSignal(),t=this._genMessage(v.StopPacketTransfer),[4,this._signal.request(t)];case 1:return s.sent(),[4,this._signal.waitStatus("Normal Quit")];case 2:return s.sent(),u.default.debug("["+this.clientId+"] startChannelMediaRelay: StopPacketTransfer success"),n=this._genMessage(v.SetSdkProfile,e),[4,this._signal.request(n)];case 3:return s.sent(),u.default.debug("["+this.clientId+"] startChannelMediaRelay: SetSdkProfile success"),i=this._genMessage(v.SetSourceChannel,e),[4,this._signal.request(i)];case 4:return s.sent(),[4,this._signal.waitStatus("SetSourceChannelStatus")];
1case 5:return s.sent(),this.emit("event",y.PACKET_JOINED_SRC_CHANNEL),u.default.debug("["+this.clientId+"] startChannelMediaRelay: SetSourceChannel success"),r=this._genMessage(v.SetSourceUserId,e),[4,this._signal.request(r)];case 6:return s.sent(),u.default.debug("["+this.clientId+"] startChannelMediaRelay: SetSourceUserId success"),o=this._genMessage(v.SetDestChannel,e),[4,this._signal.request(o)];case 7:return s.sent(),[4,this._signal.waitStatus("SetDestChannelStatus")];case 8:return s.sent(),this.emit("event",y.PACKET_JOINED_DEST_CHANNEL),u.default.debug("["+this.clientId+"] startChannelMediaRelay: SetDestChannel success"),a=this._genMessage(v.StartPacketTransfer,e),[4,this._signal.request(a)];case 9:return s.sent(),this.emit("event",y.PACKET_SENT_TO_DEST_CHANNEL),this.state=b.RELAY_STATE_RUNNING,u.default.debug("["+this.clientId+"] startChannelMediaRelay: StartPacketTransfer success"),[2]}})})},t.prototype._sendReconnectMessage=function(e){return o(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return this._checkSignal(),t=this._genMessage(v.Reconnect,e),[4,this._signal.request(t)];case 1:return n.sent(),[2]}})})},t.prototype._sendUpdateMessage=function(e){return o(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return this._checkSignal(),t=this._genMessage(v.UpdateDestChannel,e),[4,this._signal.request(t)];case 1:return n.sent(),this.emit("event",y.PACKET_UPDATE_DEST_CHANNEL),u.default.debug("["+this.clientId+"] sendUpdateMessage: UpdateDestChannel success"),[2]}})})},t.prototype._sendStopRelayMessage=function(){return o(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return this._checkSignal(),e=this._genMessage(v.StopPacketTransfer),[4,this._signal.request(e)];case 1:return t.sent(),u.default.debug("["+this.clientId+"] sendStopRelayMessage: StopPacketTransfer success"),[2]}})})},t.prototype._genMessage=function(e,t){var n=this,i=[],r=[],o=[],s={appId:this.appId,cname:this.cname,uid:this.uid+"",sdkVersion:c.VERSION,sid:this.sid,ts:+new Date,requestId:0,seq:0,allocate:!0,clientRequest:{}},a=null;switch(e){case v.SetSdkProfile:return s.clientRequest={command:"SetSdkProfile",type:"multi_channel"},s;case v.SetSourceChannel:return a=t.getSrcChannelMediaInfo(),s.clientRequest={command:"SetSourceChannel",uid:a.uid+"",channelName:a.channelName,token:a.token||this.appId},s;case v.SetSourceUserId:return a=t.getSrcChannelMediaInfo(),s.clientRequest={command:"SetSourceUserId",uid:this.uid+""},s;case v.SetDestChannel:return t.getDestChannelMediaInfos().forEach(function(e){i.push(e.channelName),r.push(e.uid+""),o.push(e.token||n.appId)}),s.clientRequest={command:"SetDestChannel",channelName:i,uid:r,token:o},s;case v.StartPacketTransfer:return s.clientRequest={command:"StartPacketTransfer"},s;case v.Reconnect:return s.clientRequest={command:"Reconnect"},s;case v.StopPacketTransfer:return s.clientRequest={command:"StopPacketTransfer"},s;case v.UpdateDestChannel:return t.getDestChannelMediaInfos().forEach(function(e){i.push(e.channelName),r.push(e.uid+""),o.push(e.token||n.appId)}),s.clientRequest={command:"UpdateDestChannel",channelName:i,uid:r,token:o},s}},t.prototype._checkSignal=function(){if(!this._signal||!this._signal.isConnect())throw new w(m.WS_DISCONNECTED)},t}(l.default);t.default=f;var g=function(){function e(){this.destChannelMediaInfos=new Map}return e.prototype.setSrcChannelInfo=function(e){d.checkValidObject(e,"srcInfo");var t=e.uid,n=e.channelName,i=e.token;if(i&&!d.isValidToken(i))throw new Error("Invalid token in SrcChannelInfo");if(!d.isValidChannelName(n))throw new Error("Invalid channelName in SrcChannelInfo");if(!p.is32Uint(t))throw new Error("Invalid uid in SrcChannelInfo");this.srcChannelMediaInfo=e},e.prototype.setDestChannelInfo=function(e,t){if(!d.isValidChannelName(e))throw new Error("Invalid channelName in DestChannelInfo");d.checkValidObject(t,"destInfo");var n=t.uid,i=t.token,r=t.channelName;if(i&&!d.isValidToken(i))throw new Error("Invalid token in DestChannelInfo");if(!d.isValidChannelName(r))throw new Error("Invalid channelName in DestChannelInfo");if(!p.is32Uint(n))throw new Error("Invalid uid in DestChannelInfo");this.destChannelMediaInfos.set(e,t)},e.prototype.removeDestChannelInfo=function(e){if(!d.isValidChannelName(e))throw new Error("Invalid channelName when invoke removeDestChannelInfo");this.destChannelMediaInfos.delete(e)},e.prototype.getSrcChannelMediaInfo=function(){return this.srcChannelMediaInfo},e.prototype.getDestChannelMediaInfos=function(){return this.destChannelMediaInfos},e}();t.ChannelMediaRelayConfiguration=g;var m,v,y,b,_,S=function(e){function t(t,n,i,r){var o=e.call(this)||this;
1return o._onOpen=function(){o.emit("open")},o._onClose=function(e){o.emit("close"),o.dispose()},o._onMessage=function(e){var t=JSON.parse(e.data);if(!t||"serverResponse"!==t.command||!t.requestId)return t&&"serverStatus"===t.command&&t.serverStatus&&t.serverStatus.command?(o.emit("status",t.serverStatus),void o.emit(t.serverStatus.command,t.serverStatus)):void 0;o.emit("req_"+t.requestId,t)},o._requestId=1,o.appId=t,o.cname=n,o.uid=i,o.sid=r,o}return r(t,e),t.prototype.isConnect=function(){return this._ws&&this._ws.readyState===WebSocket.OPEN},t.prototype.sendMessage=function(e){if(!this._ws||this._ws.readyState!==WebSocket.OPEN)throw new w(m.WS_DISCONNECTED);var t=this._requestId++;return e.requestId=t,e.seq=t,this._ws.send(JSON.stringify(e)),t},t.prototype.waitStatus=function(e){var t=this;return new Promise(function(n,i){var r=window.setTimeout(function(){i(new w(m.WAIT_STATUS_TIMEOUT,e))},5e3);t.once(e,function(t){clearTimeout(r),t.state&&0!==t.state?i(new w(m.WAIT_STATUS_ERROR,e)):n()}),t.once("dispose",function(){clearTimeout(r),i(new w(m.WS_ABORT))})})},t.prototype.request=function(e){var t=this;return new Promise(function(n,i){var r=t.sendMessage(e),o=window.setTimeout(function(){t.removeAllListeners("req_"+r),i(new w(m.REQUEST_TIMEOUT))},3e3);t.once("req_"+r,function(e){clearTimeout(o),e&&200===e.code?n(e):i(new w(m.REQUEST_FAILED,e))}),t.once("dispose",function(){clearTimeout(o),i(new w(m.WS_ABORT))})})},t.prototype.connect=function(e){var t=this;return new Promise(function(n,i){t._ws=new WebSocket(e),t._ws.onopen=function(){t._onOpen(),t._prvUrl=e,t._ws.onmessage=t._onMessage,t._ws.onclose=t._onClose,t._startHeartBeatCheck(),n()},t._ws.onclose=function(e){t._ws=null,i(new w(m.CONNECT_FAILED,"websocket error code: "+e.code))},setTimeout(function(){t._ws&&t._ws.readyState!==WebSocket.OPEN&&(t._ws.onopen=null,t._ws.onclose=null,t._ws.close(),t._ws=null,i(new w(m.CONNECT_TIMEOUT)))},5e3),t.once("dispose",function(){i(new w(m.WS_ABORT))})})},t.prototype.dispose=function(){this._clearHeartBeatCheck(),this.emit("dispose"),this.removeEvent(),this._ws&&(this._ws.onopen=null,this._ws.onclose=null,this._ws.onmessage=null,this._ws.close()),this._ws=null},t.prototype._sendPing=function(e){if(!this._ws||this._ws.readyState!==WebSocket.OPEN)throw new w(m.WS_DISCONNECTED);var t=this._requestId++;return e.requestId=t,this._ws.send(JSON.stringify(e)),t},t.prototype._startHeartBeatCheck=function(){var e=this;this._heartBeatTimer=window.setInterval(function(){e._sendPing({command:"ping",appId:e.appId,cname:e.cname,uid:e.uid+"",sid:e.sid,ts:+new Date,requestId:0})},3e3)},t.prototype._clearHeartBeatCheck=function(){window.clearInterval(this._heartBeatTimer)},t}(l.default),w=function(e,t,n){void 0===e&&(e=""),this.code=n,this.data=t,this.message=e};t.ChannelMediaError=w,function(e){e.CONNECT_FAILED="connect failed",e.CONNECT_TIMEOUT="connect timeout",e.WS_DISCONNECTED="websocket disconnected",e.REQUEST_TIMEOUT="request timeout",e.REQUEST_FAILED="request failed",e.WAIT_STATUS_TIMEOUT="wait status timeout",e.WAIT_STATUS_ERROR="wait status error",e.BAD_STATE="bad state",e.WS_ABORT="ws abort",e.AP_REQUEST_TIMEOUT="AP request timeout",e.AP_JSON_PARSE_ERROR="AP json parse error",e.AP_REQUEST_ERROR="AP request error",e.AP_REQUEST_ABORT="AP request abort"}(m=t.CHANNEL_MEDIA_ERROR||(t.CHANNEL_MEDIA_ERROR={})),function(e){e[e.SetSdkProfile=0]="SetSdkProfile",e[e.SetSourceChannel=1]="SetSourceChannel",e[e.SetSourceUserId=2]="SetSourceUserId",e[e.SetDestChannel=3]="SetDestChannel",e[e.StartPacketTransfer=4]="StartPacketTransfer",e[e.StopPacketTransfer=5]="StopPacketTransfer",e[e.UpdateDestChannel=6]="UpdateDestChannel",e[e.Reconnect=7]="Reconnect",e[e.SetVideoProfile=8]="SetVideoProfile"}(v||(v={})),function(e){e[e.NETWORK_DISCONNECTED=0]="NETWORK_DISCONNECTED",e[e.NETWORK_CONNECTED=1]="NETWORK_CONNECTED",e[e.PACKET_JOINED_SRC_CHANNEL=2]="PACKET_JOINED_SRC_CHANNEL",e[e.PACKET_JOINED_DEST_CHANNEL=3]="PACKET_JOINED_DEST_CHANNEL",e[e.PACKET_SENT_TO_DEST_CHANNEL=4]="PACKET_SENT_TO_DEST_CHANNEL",e[e.PACKET_RECEIVED_VIDEO_FROM_SRC=5]="PACKET_RECEIVED_VIDEO_FROM_SRC",e[e.PACKET_RECEIVED_AUDIO_FROM_SRC=6]="PACKET_RECEIVED_AUDIO_FROM_SRC",e[e.PACKET_UPDATE_DEST_CHANNEL=7]="PACKET_UPDATE_DEST_CHANNEL",e[e.PACKET_UPDATE_DEST_CHANNEL_REFUSED=8]="PACKET_UPDATE_DEST_CHANNEL_REFUSED",e[e.PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE=9]="PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE"}(y=t.CHANNEL_MEDIA_RELAY_EVENT||(t.CHANNEL_MEDIA_RELAY_EVENT={})),function(e){e[e.RELAY_STATE_IDLE=0]="RELAY_STATE_IDLE",e[e.RELAY_STATE_CONNECTING=1]="RELAY_STATE_CONNECTING",e[e.RELAY_STATE_RUNNING=2]="RELAY_STATE_RUNNING",e[e.RELAY_STATE_FAILURE=3]="RELAY_STATE_FAILURE"}(b=t.CHANNEL_MEDIA_RELAY_STATE||(t.CHANNEL_MEDIA_RELAY_STATE={})),function(e){e[e.RELAY_OK=0]="RELAY_OK",e[e.SERVER_ERROR_RESPONSE=1]="SERVER_ERROR_RESPONSE",e[e.SERVER_NO_RESPONSE=2]="SERVER_NO_RESPONSE",e[e.NO_RESOURCE_AVAILABLE=3]="NO_RESOURCE_AVAILABLE",e[e.FAILED_JOIN_SRC=4]="FAILED_JOIN_SRC",e[e.FAILED_JOIN_DEST=5]="FAILED_JOIN_DEST",e[e.FAILED_PACKET_RECEIVED_FROM_SRC=6]="FAILED_PACKET_RECEIVED_FROM_SRC",e[e.FAILED_PACKET_SENT_TO_DEST=7]="FAILED_PACKET_SENT_TO_DEST",e[e.SERVER_CONNECTION_LOST=8]="SERVER_CONNECTION_LOST",e[e.INTERNAL_ERROR=9]="INTERNAL_ERROR",e[e.SRC_TOKEN_EXPIRED=10]="SRC_TOKEN_EXPIRED",e[e.DEST_TOKEN_EXPIRED=11]="DEST_TOKEN_EXPIRED",e[e.RELAY_ALREADY_START=12]="RELAY_ALREADY_START",e[e.RELAY_NOT_START=13]="RELAY_NOT_START",e[e.OPERATION_ABORT=14]="OPERATION_ABORT"}(_=t.CHANNEL_MEDIA_RELAY_ERROR||(t.CHANNEL_MEDIA_RELAY_ERROR={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"isLiveTranscodingValid",function(){return _}),n.d(t,"generateSessionId",function(){return v}),n.d(t,"audioLevelHelper",function(){return f}),n.d(t,"vsResHack",function(){return y}),n.d(t,"is32Uint",function(){return b}),n.d(t,"safeCall",function(){return d}),n.d(t,"random",function(){return w}),n.d(t,"popBanTip",function(){return C}),n.d(t,"lengthInUtf8Bytes",function(){return E}),n.d(t,"audioTimerLoop",function(){return T}),n.d(t,"generateId",function(){return m}),n.d(t,"uint8ArrayToBase64",function(){return h}),n.d(t,"base64ToUint8Array",function(){return p});var i=n(11),r=n.n(i),o=n(5),s=n(0),a=n(28),l=n.n(a),c=n(25),u=n(15),d=function(){var e=arguments[0];if("function"==typeof e){var t=Array.prototype.slice.call(arguments,1
1);e.apply(null,t)}},h=function(e){for(var t="",n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return window.btoa(t)},p=function(e){for(var t=window.atob(e),n=new Uint8Array(new ArrayBuffer(t.length)),i=0;i<t.length;i+=1)n[i]=t.charCodeAt(i);return n},f=function(e){return this.audioContext=Object(c.a)(),this.sourceNode=e.otWebkitAudioSource||this.audioContext.createMediaStreamSource(e),this.analyser=this.audioContext.createAnalyser(),this.timeDomainData=new Uint8Array(this.analyser.frequencyBinCount),this.sourceNode.connect(this.analyser),this.getAudioLevel=function(){if(this.analyser){this.analyser.getByteTimeDomainData(this.timeDomainData);for(var e=0,t=0;t<this.timeDomainData.length;t++)e=Math.max(e,Math.abs(this.timeDomainData[t]-128));return e/128}return s.default.warning("can't find analyser in audioLevelHelper"),0},this},g=1e4;function m(){return++g}function v(){return l()().replace(/-/g,"").toUpperCase()}var y=function(e,t,n){try{s.default.debug("start vsResHack",e);var i=document.createElement("video");i.setAttribute("autoplay",""),i.setAttribute("muted",""),i.muted=!0,i.setAttribute("playsinline",""),i.setAttribute("style","position: absolute; top: 0; left: 0; width:1px; high:1px;"),document.body.appendChild(i);var r=!1;i.addEventListener("playing",function(n){o.isFireFox()?i.videoWidth&&(r=!0,s.default.debug("[vsResHack] get stream resolution: ","".concat(i.videoWidth," x ").concat(i.videoHeight),e),t(i.videoWidth,i.videoHeight),i.srcObject=null,i.remove()):(r=!0,s.default.debug("[vsResHack] get stream resolution: ","".concat(i.videoWidth," x ").concat(i.videoHeight),e),t(i.videoWidth,i.videoHeight),i.srcObject=null,i.remove())}),Object(u.setSrcObject)(i,e),i.play().catch(function(){}),setTimeout(function(){!r&&i&&(t(i.videoWidth,i.videoHeight),i.srcObject=null,i.remove())},4e3)}catch(e){n(e)}},b=function(e){return"number"==typeof e&&0<=e&&e<=4294967295},_=function(e){var t=["lowLatency","userConfigExtraInfo","transcodingUsers"];for(var n in e)if("lowLatency"===n&&"boolean"!=typeof e[n]||"userConfigExtraInfo"===n&&"object"!==r()(e[n])||"transcodingUsers"===n&&!S(e[n])||!~t.indexOf(n)&&"number"!=typeof e[n])throw new Error("Param ["+n+"] is inValid");return!0},S=function(e){for(var t=0;t<e.length;t++)for(var n in e[t])if("number"!=typeof e[t][n])throw new Error("Param user["+t+"] - ["+n+"] is inValid");return!0},w=function(e){isNaN(e)&&(e=1e3);var t=+new Date,n=(t=(9301*t+49297)%233280)/233280;return Math.ceil(n*e)},E=function(e){var t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)},T=function(e,t){var n=1/t,i=Object(c.a)(),r=i.createGain();r.gain.value=0,r.connect(i.destination);var o=!1;return function t(){var s=i.createOscillator();s.onended=t,s.connect(r),s.start(0),s.stop(i.currentTime+n),e(i.currentTime),o&&(s.onended=function(){})}(),function(){o=!0}},C=function(){if(!document.getElementById("agora-ban-tip")){var e=document.createElement("div");e.id="agora-ban-tip",e.style="position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; color: #fff;",document.querySelector("body").prepend(e);var t=document.createElement("div");t.style="background: #000; width: 346px; height: 116px; z-index: 100000; opacity: 0.6; border-radius: 10px; box-shadow: 0 2px 4px #000;",e.append(t);var n=document.createElement("div");n.style="height: 76px; display: flex; justify-content: center; align-items: center;";var i=document.createElement("span");i.style="height: 28px; width: 28px; color: #000; text-align: center; line-height: 30px; background: #fff; border-radius: 50%; font-weight: 600; font-size: 20px;margin-right: 5px;",i.innerText="!";var r=document.createElement("span");r.innerText="This browser does not support webRTC",n.append(i),n.append(r);var o=document.createElement("div");o.style="height: 38px; display: flex; border-top: #fff 1px solid; justify-content: center; align-items: center;",o.innerText="OK",t.append(n),t.append(o),o.onclick=function(){var e=document.getElementById("agora-ban-tip");e.parentNode.removeChild(e)}}}},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){e.exports=n(64)},function(t,n,i){"use strict";var r=i(12),o=i.n(r),s=i(17),a=i.n(s),l=i(11),c=i.n(l),u=i(32),d=i.n(u),h=i(7),p=i.n(h),f=i(22),g=i(8),m=function(e){e&&e.apply(this,[].slice.call(arguments,1
1))},v=i(0),y=i(1),b=i(10),_=i(14),S=i(2),w=function(e,t){var n={connect:function(){t.host=e,n.signal=function(e){var t=Object(g.b)(e);t.needReconnect=!0,t.isTimeout=!1,t.isInit=!0,t.sendbytes=0,t.recvbytes=0,t.startTime=Date.now(),t.lastMsgTime=null,t.clientId=e.clientId,t.hostIndex=0,t.requestID=0,t.host=e.host instanceof Array?e.host:[e.host],t.getSendBytes=function(){return t.sendbytes},t.getRecvBytes=function(){return t.recvbytes},t.getDuration=function(){return Math.ceil((Date.now()-t.startTime)/1e3)},t.getURL=function(){return t.connection.url},t.reconnect=function(){t.isInit=!0,t.creatConnection()},t.connectNext=function(){t.isInit=!0,++t.hostIndex,v.default.debug("["+t.clientId+"] Gateway length:"+t.host.length+" current index:"+t.hostIndex),t.hostIndex>=t.host.length?t.dispatchEvent(Object(g.d)({type:"recover"})):t.creatConnection()},t.replaceHost=function(e){t.host=e||t.host,t.hostIndex=0,t.creatConnection()},t.creatConnection=function(){t.needReconnect=!0,t.lts=(new Date).getTime(),t.connection=new WebSocket("wss://"+t.host[t.hostIndex]),t.connection.binaryType="arraybuffer",t.turnConfig={};var n=e.proxyServerType;if(t.connection.url&&3!==n&&4!==n&&5!==n){var i=t.connection.url.match(/wss\:\/\/([^:]+):(\d+)/),r=t.host[t.hostIndex].split(":"),o=t.connection.url.match(/h=([^:]+)&p=(\d+)/);i?(t.turnConfig.url=i[1],Object(S.getParameter)("TURN_ENABLE_TCP")&&(t.turnConfig.tcpport=parseInt(i[2])+30),Object(S.getParameter)("TURN_ENABLE_UDP")&&(t.turnConfig.udpport=parseInt(i[2])+30)):o?(t.turnConfig.url=o[1],Object(S.getParameter)("TURN_ENABLE_TCP")&&(t.turnConfig.tcpport=parseInt(o[2])+30),Object(S.getParameter)("TURN_ENABLE_UDP")&&(t.turnConfig.udpport=parseInt(o[2])+30)):r&&(t.turnConfig.url=r[0],Object(S.getParameter)("TURN_ENABLE_TCP")&&(t.turnConfig.tcpport=parseInt(r[1])+30),Object(S.getParameter)("TURN_ENABLE_UDP")&&(t.turnConfig.udpport=parseInt(r[1])+30))}t.connection.onopen=function(e){t.needReconnect=!0,t.isTimeout=!1,t.isInit=!1,t.sendbytes=0,t.recvbytes=0,t.startTime=Date.now(),Object(_.resetHTTPByetsCount)(),clearTimeout(t.timeoutCheck),t.dispatchEvent(Object(g.d)({type:"onopen",event:e,socket:t}))},t.connection.onmessage=function(e){if(e.data instanceof ArrayBuffer)t.dispatchEvent({type:"onBinaryData",data:e.data});else{t.recvbytes+=Object(b.lengthInUtf8Bytes)(e.data);var n=JSON.parse(e.data);t.lastMsgTime=Date.now(),n.hasOwnProperty("_id")?t.dispatchEvent(Object(g.d)({type:n._id,msg:n})):n.hasOwnProperty("_type")&&t.dispatchSocketEvent(Object(g.d)({type:n._type,msg:n._message}))}},t.connection.onclose=function(n){t.needReconnect?t.isTimeout||t.isInit?(v.default.debug("["+t.clientId+"] websockect connect timeout"),y.report.joinGateway(e.sid,{lts:t.lts,succ:!1,ec:"timeout",addr:t.connection.url}),t.connectNext()):(t.dispatchEvent(Object(g.d)({type:"disconnect",event:n})),t.requests&&t.requests instanceof Array&&(t.requests.map(function(e){e.callback("REQUEST_ABORT")}),t.requests=[])):(v.default.debug("["+t.clientId+"] websockect closeed"),m(e.onFailure,n),clearTimeout(t.timeoutCheck),t.dispatchEvent(Object(g.d)({type:"close",event:n})),t.connection.onopen=void 0,t.connection.onclose=void 0,t.connection.onerror=void 0,t.connection.onmessage=void 0,t.connection=void 0)},t.connection.onerror=function(e){},setTimeout(function(){t.connection&&t.connection.readyState!=WebSocket.OPEN&&(t.isTimeout=!0,t.connection.close())},5e3)},t.creatConnection(),t.sendMessage=function(e,n){if(t.connection&&t.connection.readyState==WebSocket.OPEN){var i=JSON.stringify(e);t.sendbytes+=Object(b.lengthInUtf8Bytes)(i),t.connection.send(i)}else n({error:"Gateway not connected"})},t.disconnect=function(){t.needReconnect=!0,t.connection.close()},t.close=function(){t.needReconnect=!1,t.connection.onclose=void 0,t.connection.close(),clearInterval(t.requestTimer),t.requests&&t.requests instanceof Array&&(t.requests.map(function(e){e.callback("REQUEST_ABORT")}),t.requests=[])},t.sendSignalCommand=function(e,n){e._id="_request_"+t.requestID,t.requestID+=1,"publish_stats"!==e._type&&"subscribe_stats"!==e._type&&"publish_stats_low"!==e._type&&t.on(e._id,function(i){i.msg&&n&&n(i.msg._result,i.msg.message),delete t.dis
1patcher.eventListeners[e._id]}),t.sendMessage(e,function(e){e.reason="NOT_CONNECTED",n&&n(e.reason,e)})},t.requests=[];var n=function(e){var n=t.requests.findIndex(function(t){return t.id===e.type});if(n>=0)var i=t.requests.splice(n,1)[0];i&&t.dispatcher.eventListeners[e.type]?(delete t.dispatcher.eventListeners[e.type],e.msg&&i.callback&&i.callback(e.msg._result,e.msg._message)):v.default.warning("Detached Response",e.type,e.msg)};return t.sendRequest=function(e,i){e=p()({_id:"_request_"+t.requestID},e),t.requestID+=1;var r={id:e._id,timeoutCounter:0,stalledAt:Date.now(),message:e,callback:i};t.requests.push(r),t.addEventListener(e._id,n),t.sendMessage(e,(function(e){var n=this,i=t.requests.findIndex(function(e){return e.id===n.id});i>=0&&(n=t.requests.splice(i,1)[0]),n&&t.dispatcher.eventListeners[e.type]?(delete t.dispatcher.eventListeners[e.type],e.reason="NOT_CONNECTED",n.callback&&n.callback(e.reason,e)):v.default.warning("handleSendError",n)}).bind(r))},t.checkRequestTimeout=function(){for(var e=Math.ceil(Object(S.getParameter)("SIGNAL_REQUEST_TIMEOUT")/Object(S.getParameter)("SIGNAL_REQUEST_WATCH_INTERVAL")),n=t.requests.length-1;n>=0;n--){var i=t.requests[n];i.timeoutCounter>=e?(t.requests.splice(n,1),v.default.error("Request Timeout",i.timeoutCounter,i.message),i.callback&&i.callback("TIMEOUT")):i.timeoutCounter++}},clearInterval(t.requestTimer),t.requestTimer=setInterval(t.checkRequestTimeout,Object(S.getParameter)("SIGNAL_REQUEST_WATCH_INTERVAL")),t.sendReport=function(e){t.sendMessage(e,function(){})},t}(t),n.on=n.signal.on,n.dispatchEvent=n.signal.dispatchEvent,n.signal.on("onopen",function(e){n.signal.onEvent=function(e){n.dispatchEvent(Object(g.d)({type:e.event,msg:e}))},n.dispatchEvent(Object(g.d)({type:"connect",msg:e}))}),n.signal.on("onError",function(e){onError(e.msg.code,"error")})},getLastMsgTime:function(){return n.signal&&n.signal.lastMsgTime},getSendBytes:function(){return n.signal.getSendBytes()},getRecvBytes:function(){return n.signal.getRecvBytes()},getDuration:function(){return n.signal.getDuration()},disconnect:function(){n.signal.disconnect()},close:function(){n.signal.close()},getURL:function(){return n.signal.getURL()},reconnect:function(){n.signal.reconnect()},connectNext:function(){n.signal.connectNext()},replaceHost:function(e){n.signal.replaceHost(e)},emitSimpleMessage:function(e,t){n.signal.sendSignalCommand(e,t)},emitRequest:function(e,t){n.signal.sendRequest(e,t)},emitReport:function(e){n.signal.sendReport(e)}};return n.connect(),n},E=i(23),T=i(4),C=i(20),I=i(5),R={ERR_NO_VOCS_AVAILABLE:"tryNext",ERR_NO_VOS_AVAILABLE:"tryNext",ERR_JOIN_CHANNEL_TIMEOUT:"tryNext",WARN_REPEAT_JOIN:"quit",ERR_JOIN_BY_MULTI_IP:"recover",WARN_LOOKUP_CHANNEL_TIMEOUT:"tryNext",WARN_OPEN_CHANNEL_TIMEOUT:"tryNext",ERR_VOM_SERVICE_UNAVAILABLE:"tryNext",ERR_TOO_MANY_USERS:"tryNext",ERR_MASTER_VOCS_UNAVAILABLE:"tryNext",ERR_INTERNAL_ERROR:"tryNext",K_SERVICE_NOT_READY:"tryNext",K_SERVICE_TOO_HEAVY:"tryNext",notification_test_recover:"recover",notification_test_tryNext:"tryNext",notification_test_retry:"retry"},D={googActualEncBitrate:"A_aeb",googAvailableSendBandwidth:"A_asb",googRetransmitBitrate:"A_rb",googAvailableReceiveBandwidth:"A_arb",googTargetEncBitrate:"A_teb",googBucketDelay:"A_bd",googTransmitBitrate:"A_tb",googCodecName:"A_cn",bytesSent:"bytesSent",packetsLost:"packetsLost",packetsSent:"packetsSent",googAdaptationChanges:"A_ac",googAvgEncodeMs:"A_aem",googEncodeUsagePercent:"A_eup",googFirsReceived:"A_fr",googFrameHeightInput:"A_fhi",googFrameHeightSent:"A_fhs",googFrameRateInput:"A_fri",googFrameRateSent:"A_frs",googFrameWidthInput:"A_fwi",googFrameWidthSent:"A_fws",googNacksReceived:"A_nr",googPlisReceived:"A_pr",googRtt:"A_rtt",aecDivergentFilterFraction:"A_adff",audioInputLevel:"A_ail",googEchoCancellationReturnLoss:"A_ecrl",googEchoCancellationReturnLossEnhancement:"A_ecrle",googResidualEchoLikelihood:"A_rel",googResidualEchoLikelihoodRecentMax:"A_relrm",googTargetDelayMs:"A_tdm",bytesReceived:"bytesReceived",packetsReceived:"packetsReceived",googDecodeMs:"A_dm",googMaxDecodeMs:"A_mdm",googRenderDelayMs:"A_rdm",googFrameWidthReceived:"A_fwr",googFrameHeightReceived:"A_fhr",googFrameRateReceived:"A_frr",googFrameRateDecoded:"A_frd",googFrameRateOutput:"A_fro",googJitterBufferMs:"A_jbm",googCurrentDelayMs:"A_cdm",googMinPlayoutDelayMs:"A_mpdm",googNacksSent:"A_ns",googPlisSent:"A_ps",googFirsSent:"A_fs",audioOutputLevel:"A_aol",googAccelerateRate:"A_ar",googDecodingCNG:"A_dcng",googDecodingCTN:"A_dctn",googDecodingCTSG:"A_dctsg",googDecodingNormal:"A_dn",googDecodingPLC:"A_dplc",googDecodingPLCCNG:"A_dplccng",googExpandRate:"A_er",googJitterReceived:"A_jr",googPreemptiveExpandRate:"A_per",googPreferredJitterBufferMs:"A_pjbm",googSecondary
1DecodedRate:"A_sdr",googSpeechExpandRate:"A_ser",uplink_fraction_lost:"B_ufl",uplink_cumulative_lost:"B_ucl",uplink_available_bandwidth:"B_uab",period_fir:"B_fir",access_delay:"B_acd",uplink_network_quality:"B_unq",downlink_network_quality:"B_dnq",pub_audio_lost_ratio_400ms:"B_palr4",pub_video_lost_ratio_400ms:"B_pvlr4",e2e_delay:"B_ed",audio_delay:"B_ad",video_delay:"B_vd",stream_type:"B_st",e2e_audio_lost_ratio_400ms:"B_ealr4",e2e_video_lost_ratio_400ms:"B_evlr4",downlink_estimate_bandwidth:"B_deb",peer_publish_audio_duration:"B_ppad",peer_publish_video_duration:"B_ppvd"},A={};for(var k in D){var O=D[k];A[O]&&v.default.error("Key Conflict: ".concat(O,": ").concat(D[O],"| ").concat(k)),A[O]=k}var x=function(e){return D[e]||e},N=function(e){return A[e]||e},P=i(9),M=i.n(P),L=i(54),j=function t(n){var i=!1,r=function(e){return{_type:"control",_message:e}},s=function(e,t){var n={};return Object.keys(t).forEach(function(e){Object(S.getParameter)("STATS_FILTER")[e]||(n[x(e)]=t[e])}),{_type:"subscribe_related_stats",_message:{stream_type:"high",stream_id:e,stats:n}}},l=function(e){return{_type:"publish",_message:e}},u=function(e,t){var n={};return Object.keys(t).forEach(function(e){Object(S.getParameter)("STATS_FILTER")[e]||(n[x(e)]=t[e])}),{_type:"subscribe_stats",_message:{stream_id:e,stats:n}}},h=t.DISCONNECTED,_=t.CONNECTING,D=t.CONNECTED,A=t.DISCONNECTING,k=h,O=Object(g.b)(n);Object.defineProperty(O,"state",{set:function(e){var n=k;k=e,Object(C._setClientConnectionStateRecord)(O.clientId,e),e!==t.CONNECTED&&e!==t.DISCONNECTING&&(O.hasJoined=!1),n!==e&&O.dispatchEvent({type:"connection-state-change",prevState:t.connetionStateMap[n],curState:t.connetionStateMap[e]})},get:function(){return k}}),O.socket=void 0,O.state=h,O.mode=n.mode,O.role=n.role,O.codec=n.codec,O.config={},O.timers={},O.timer_counter={},O.localStreams={},O.remoteStreams={},O.remoteMuteState={},O.attemps=1,O.p2p_attemps=1,O.audioLevel={},O.activeSpeaker=void 0,O.reconnectMode="tryNext",O.rejoinAttempt=0,O.hasChangeBGPAddress=!1,O.traffic_stats={},O.clientId=n.clientId,O.pingpongCounter=0,O.hasInvokeLeave=!1,O.p2ps=new Map,O.liveStreams=new Map,O.injectLiveStreams=new Map,O.remoteStreamsInChannel=new Set,O.subscribeRequestId=new Map,O.publishRequestId=0,O.hasJoined=!1,O.isFirstSuccess=!0,O.peerPublishDurationMap=new Map,function(e){var t=m;e.makeRequest=function(n,i,r){if(void 0===e.socket)return v.default.debug("[".concat(e.clientId,"] No socket available")),void t(r,T.default.INVALID_OPERATION);try{e.socket.emitRequest(n,function(e,t){var n;"success"===e?"function"==typeof i&&i(t):"function"==typeof r&&(n=t&&t.error_code&&T.GatewayErrorCode[t.error_code]?T.GatewayErrorCode[t.error_code]:t&&t.error_str?t.error_str:t&&t.error_code?"UNKNOW_ERROR_".concat(t.error_code):e,r(n,t))})}catch(i){v.default.debug("[".concat(e.clientId,"] Socket emit message failed ").concat(JSON.stringify(n))),v.default.debug("[".concat(e.clientId,"] "),i),t(r,T.default.SOCKET_ERROR)}},e.makeReport=function(t){void 0===e.socket&&v.default.debug("[".concat(e.clientId,"] No socket available"));try{e.socket.emitReport(t)}catch(n){v.default.debug("[".concat(e.clientId,"] Socket emit report failed ").concat(JSON.stringify(t)))}}}(O),O.inChannelInfo={joinAt:null,duration:0},O._sendMessage=function(e,t){switch(e){case"SubscribeStats":O.makeReport(u.apply(void 0,d()(t)));break;case"SubscribeRelatedStats":O.makeReport(s.apply(void 0,d()(t)))}};var j=m;O.p2pCounter=Object(b.random)(1e5),O.generateP2PId=function(){return++O.p2pCounter},O.audioVolumeIndication={enabled:!1,sortedAudioVolumes:[],smooth:3,interval:2e3},O.remoteVideoStreamTypes={REMOTE_VIDEO_STREAM_HIGH:0,REMOTE_VIDEO_STREAM_LOW:1,REMOTE_VIDEO_STREAM_MEDIUM:2},O.streamFallbackTypes={STREAM_FALLBACK_OPTION_DISABLED:0,STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW:1,STREAM_FALLBACK_OPTION_AUDIO_ONLY:2},O.configPublisher=function(e){O.config=e},O.getGatewayInfo=function(e,t){O.makeRequest({_type:"gateway_info"},e,t)},O.setClientRole=function(e,t){v.default.debug("[".concat(O.clientId,"] setClientRole to ").concat(e));var n=y.report.reportApiInvoke(O.joinInfo.sid,{name:"_setClientRole",callback:t});
1O.makeRequest({_type:"set_client_role",_message:{role:e}},function(){O.role=e,O.dispatchEvent({type:"client-role-changed",role:e}),n&&n(null,{role:e})},function(t,i){if(i&&i.code&&(t=T.GatewayErrorCode[i.code]||"UNKNOW_ERROR_"+i.code),"ERR_SET_CLIENT_ROLE_ALREADY_IN_USE"===t)return n&&n(null);v.default.error("set Client role error to "+e+": "+t),n&&n(t)})},O.join=function(e,t,i,r){O.hasInvokeLeave=!1,e.useProxyServer&&(O.hasChangeBGPAddress=!0);var o=(new Date).getTime(),s=e.uid;if(O.inChannelInfo.joinAt&&(O.inChannelInfo.duration+=o-O.inChannelInfo.joinAt),O.inChannelInfo.joinAt=o,O.state!==_)return v.default.error("[".concat(O.clientId,"] GatewayClient.join Failed: state "),O.state),r&&r(T.default.INVALID_OPERATION),void y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:T.default.INVALID_OPERATION,addr:null});if(null!=s&&parseInt(s)!==s)return v.default.error("[".concat(O.clientId,"] Input uid is invalid")),O.state=h,r&&r(T.default.INVALID_PARAMETER),void y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:T.default.INVALID_PARAMETER,addr:null});var a=F.register(O,{uid:s,cname:e&&e.cname});if(a)return O.state=h,r&&r(a),void y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:a,addr:null});O.joinInfo=p()({},e),O.uid=s,O.key=t,O.pingpongCounter=0,V(e,function(t){if(e.useLocalAccessPoint)try{var a=O.socket.signal.connection.url.match(/wss\:\/\/([^:]+):(\d+)/)[1];Object(S.setParameter)("EVENT_REPORT_DOMAIN",a),Object(S.setParameter)("EVENT_REPORT_BACKUP_DOMAIN",a),Object(S.setParameter)("LOG_UPLOAD_SERVER","".concat(a,":6444"))}catch(e){v.default.debug("[".concat(O.clientId,"] LocalAccessPoint error: ").concat(e))}if(O.state===A||O.state===h)return r&&r("LEAVE_BEFORE_JOIN_SUCCESS");O.state=D,v.default.debug("[".concat(O.clientId,"] Connected to gateway server")),clearInterval(O.pingTimer),O.pingTimer=setInterval(function(){var e=Object(S.getParameter)("PING_PONG_TIME_OUT");if(++O.pingpongCounter>=e){var t=Date.now();O.socket&&v.default.warning("PINGPONG Timeout. Last Socket Message: ".concat(t-O.socket.getLastMsgTime(),"ms")),O.socket&&O.socket.getLastMsgTime()&&t-O.socket.getLastMsgTime()>Object(S.getParameter)("WEBSOCKET_TIMEOUT_MIN")&&(O.pingpongCounter=0,O.socket.close(),O.socket.dispatchEvent(Object(g.d)({type:"disconnect",event:{msg:"PING_PONG_TIME_OUT"}})))}var n=Date.now();O.makeRequest({_type:"ping"},function(){O.pingpongCounter=0;var e=Date.now()-n;Object(S.getParameter)("REPORT_STATS")&&O.makeRequest({_type:"ping_back",_message:{pingpongElapse:e}})},function(e,t){"TIMEOUT"!==e&&(v.default.error("Ping Error ".concat(e," ").concat(JSON.stringify(t))),t&&t.error_code&&O.socket&&O.socket.signal&&O.socket.signal.connection&&O.socket.signal.connection.readyState===WebSocket.OPEN&&(v.default.info("Disconnecting websocket connection"),O.socket.signal.connection.close()))})},3e3),function(e,t){var i=O.role,r=p()({},O.joinInfo.apResponse),o={session_id:O.joinInfo.sid,app_id:n.appId,channel_key:O.key,channel_name:O.joinInfo.cname,sdk_version:S.VERSION,browser:navigator.userAgent,process_id:Object(y.getProcessId)(),mode:O.mode,codec:O.codec,role:i,has_changed_gateway:Object(S.getParameter)("FORCE_CHANGED_GATEWAY_FLAG")||O.hasChangeBGPAddress,ap_response:r,optionalInfo:O.joinInfo.optionalInfo,extend:Object(S.getParameter)("JOIN_EXTEND"),details:{}};if(O.joinInfo.hasOwnProperty("stringUid")&&(o.string_uid=O.joinInfo.stringUid),O.socket&&O.socket.signal&&O.socket.signal&&(r.addresses&&r.addresses[O.socket.signal.hostIndex]&&(o.ap_response.ticket=r.addresses[O.socket.signal.hostIndex].ticket,delete r.addresses),Object(S.getParameter)("SET_DEFAULT_TURNSERVER")&&O.socket.signal.turnConfig)){var s={username:O.joinInfo.uid.toString(),credential:O.joinInfo.token,forceturn:Object(S.getParameter)("FORCE_TURN")};s.url=O.socket.signal.turnConfig.url,O.socket.signal.turnConfig.tcpport&&(s.tcpport=""+O.socket.signal.turnConfig.tcpport),O.socket.signal.turnConfig.udpport&&(s.udpport=""+O.socket.signal.turnConfig.udpport),O.joinInfo.turnServers.find(function(e){if(e.url===s.url)return!0})||O.joinInfo.turnServers.push(s)}3===O.joinInfo.proxyServerType&&(o.plugin="web_cloud_proxy",o.details.cservice_map="1"),O.joinInfo.aesmode&&O.joinInfo.aespassword?(o.aes_mode=O.joinInfo.aesmode,o.aes_encrypt=!0,O.joinInfo.aes_salt&&(o.aes_salt=O.joinInfo.aes_salt),Object(L.encryptRSA)(O.joinInfo.aespassword).then(function(e){o.aes_secret=e,O.dispatchEvent({type:"join-message-hook",joinMessage:o}),t(null,{_type:"join",_message:o})}).catch(function(e){v.default.error("[".concat(O.clientId,"] encrypt password failed "),e),t("ENCRYPT_PASSWORD_FAILED")})):(O.dispatchEvent({type:"join-message-hook",joinMessage:o}),t(null,{_type:"join",_message:o}))}(0,function(t,n){if(t)return r&&r(t);
1O.makeRequest(n,function(t){if(y.report.joinGateway(e.sid,{lts:o,succ:!0,ec:null,vid:e.vid,uid:e.uid,addr:O.socket.getURL(),firstSuccess:O.isFirstSuccess}),O.joinSuccessLts=Date.now(),O.isFirstSuccess=!1,O.rejoinAttempt=0,O.hasJoined=!0,i&&i(t.uid),!0===t.return_vosip||!0===Object(S.getParameter)("ENABLE_LIVE_SERVER_LIST")){var n=null;try{n=O.socket.signal.connection.url}catch(e){v.default.debug("[".concat(O.clientId,"] Can not get gateway ip: ").concat(e))}n?Object(S.setParameter)("LIVE_SERVER_LIST",[n]):Object(S.setParameter)("LIVE_SERVER_LIST",[])}O.dispatchEvent({type:"join"}),clearInterval(O.timers.trafficStats),O.timers.trafficStats=setInterval(function(){O.makeRequest({_type:"traffic_stats"},function(e){var t={};for(var n in e)t[N(n)]=e[n];if(t.peer_delay&&t.peer_delay.length){var i=[];t.peer_delay.forEach(function(e){var t={};for(var n in e)t[N(n)]=e[n];i.push(t)}),t.peer_delay=i}O.traffic_stats=t,O.traffic_stats.timestamp=Date.now();var r=O.localStreams[s]||O.localStreams[O.joinInfo.stringUid];r&&(r.traffic_stats={access_delay:t.access_delay}),t.peer_delay&&t.peer_delay.forEach(function(e){var n=O.remoteStreams[e.peer_uid];n&&(n.traffic_stats={access_delay:t.access_delay,e2e_delay:e.e2e_delay,audio_delay:e.audio_delay,video_delay:e.video_delay})}),O.dispatchEvent({type:"after-getTrafficStats",trafficStats:t})})},3e3)},function(t,n){if(v.default.error("[".concat(O.clientId,"] User join failed [").concat(t,"]")),"ERR_JOIN_BY_MULTI_IP"===t){try{y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:"ERR_JOIN_BY_MULTI_IP",addr:O.socket.getURL()})}catch(e){}return O.dispatchEvent({type:"onMultiIP",option:n.option})}R[t]&&O.rejoinAttempt<4?O._doWithAction(R[t],i,r):r&&r(t),y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:t,addr:O.socket&&O.socket.getURL()})})})},function(t){v.default.error("[".concat(O.clientId,"] User join failed [").concat(t,"]")),r&&r(t),y.report.joinGateway(e.sid,{lts:o,succ:!1,ec:t,addr:O.socket.getURL()})}),this.remoteMuteState={},O.resetAudioVolumeIndication()},O.leave=function(e,t){var n=F.unregister(O);switch(n&&v.default.debug("[".concat(O.clientId,"] "),n),O.p2ps.clear(),O.state){case h:return v.default.debug("[".concat(O.clientId,"] Client Already in DISCONNECTED status")),void j(e);case A:return v.default.debug("[".concat(O.clientId,"] Client Already in DISCONNECTING status")),void j(t,T.default.INVALID_OPERATION);case _:return O.socket&&O.socket.close(),O.socket=void 0,v.default.info("[".concat(O.clientId,"] Client connecting, Leave channel success")),O.state=h,e&&e()}for(var i in O.state=A,O.channelMediaConfig&&(O.channelMediaRelayController&&O.channelMediaRelayController.dispose(),O.channelMediaRelayController=null),clearInterval(O.pingTimer),O.timers)O.timers.hasOwnProperty(i)&&clearInterval(O.timers[i]);for(var i in O.inChannelInfo.joinAt&&(O.inChannelInfo.duration+=Date.now()-O.inChannelInfo.joinAt,O.inChannelInfo.joinAt=null),O.hasJoined?O.makeRequest({_type:"leave"},function(t){O.socket.close(),O.socket=void 0,v.default.info("[".concat(O.clientId,"] Leave channel success")),O.state=h,e&&e(t)},function(e){"TIMEOUT"!==e&&"REQUEST_ABORT"!==e&&(v.default.error("[".concat(O.clientId,"] Leave Channel Failed"),e),O.state=D,t&&t(e))}):(O.socket&&(O.socket.close(),O.socket=void 0),v.default.info("[".concat(O.clientId,"] Leave channel before joined")),O.state=h,e&&e()),O.localStreams)if(O.localStreams.hasOwnProperty(i)){var r=O.localStreams[i];delete O.localStreams[i],void 0!==r.pc&&(r.pc.close(),r.pc=void 0)}q()},O.publish=function(e,t,n,i){var o=(new Date).getTime(),s=!1;if(e.publishLTS=o,"object"!==c()(e)||null===e)return v.default.error("[".concat(O.clientId,"] Invalid local stream")),i&&i(T.default.INVALID_LOCAL_STREAM),void y.report.publish(O.joinInfo.sid,{lts:o,succ:!1,audio:!1,video:!1,screenshare:!1,audioName:"",videoName:"",screenName:"",ec:T.default.INVALID_LOCAL_STREAM});if(!e.stream&&void 0===e.url)return v.default.error("[".concat(O.clientId,"] Invalid local media stream")),i&&i(T.default.INVALID_LOCAL_STREAM),void y.report.publish(O.joinInfo.sid,{lts:o,succ:!1,audio:!1,video:!1,screenshare:!1,audioName:"",videoName:"",screenName:"",ec:T.default.INVALID_LOCAL_STREAM});if(O.state!==D)return v.default.error("[".concat(O.clientId,"] User is not in the session")),i&&i(T.default.INVALID_OPERATION),void y.report.publish(O.
1joinInfo.sid,{lts:o,succ:!1,audio:e.hasAudio(),video:e.hasVideo(),screenshare:e.hasScreen(),audioName:e.hasAudio()&&e.audioName,videoName:e.hasVideo()&&e.videoName,screenName:e.hasScreen()&&e.screenName,ec:T.default.INVALID_OPERATION});var a=e.getAttributes()||{};if(e.local&&void 0===O.localStreams[e.getId()]&&(e.hasAudio()||e.hasVideo()||e.hasScreen())){var u=O.generateP2PId();if(O.p2ps.set(u,e),e.p2pId=u,void 0!==e.url)W(l({state:"url",audio:e.hasAudio(),video:e.hasVideo(),attributes:e.getAttributes()}),function(t,n){"success"===t?(e.getUserId()!==n&&e.setUserId(n),O.localStreams[n]=e,e.onClose=function(){O.unpublish(e)}):v.default.error("[".concat(O.clientId,"] Publish local stream failed"),t)});else{O.localStreams[e.getId()]=e,e.connectionSpec={callback:function(a){a||i&&i("CANNOT_GET_OFFER"),"motion"===e.optimizationMode&&e.pc.setRtpSenderParameters("maintain-framerate"),"detail"===e.optimizationMode&&e.pc.setRtpSenderParameters("maintain-resolution"),O.makeRequest(l({state:"offer",stream_type:1==t.streamType?"low":"high",p2p_id:u,sdp:a,audio:e.audio||e.screenAudio,video:e.screen||e.video,screen:e.screen,attributes:e.getAttributes(),dtx:e.DTX,hq:e.highQuality,lq:e.lowQuality,stereo:e.stereo,speech:e.speech,codec:O.codec,extend:Object(S.getParameter)("PUB_EXTEND")}),function(t){e.getUserId()!==t.uid&&e.setUserId(t.uid),v.default.info("[".concat(O.clientId,"] Local stream published with uid"),t.uid),e.onClose=function(){O.unpublish(e)},e._onAudioUnmute=function(){O.makeReport(r({action:"unmute_local_audio",stream_id:e.getId()}))},e._onVideoUnmute=function(){O.makeReport(r({action:"unmute_local_video",stream_id:e.getId()}))},e._onAudioMute=function(){O.makeReport(r({action:"mute_local_audio",stream_id:e.getId()}))},e._onVideoMute=function(){O.makeReport(r({action:"mute_local_video",stream_id:e.getId()}))},e.getId()===e.getUserId()&&(e.isAudioOn()||e.hasAudio()&&(v.default.debug("[".concat(O.clientId,"] local stream audio mute")),e._onAudioMute()),e.isVideoOn()||(e.hasVideo()||e.hasScreen())&&(v.default.debug("[".concat(O.clientId,"] local stream video mute")),e._onVideoMute())),e.pc.oniceconnectionstatechange=function(t){if("failed"===t){if(null!=O.timers[e.getId()]&&(clearInterval(O.timers[e.getId()]),clearInterval(O.timers[e.getId()]+"_RelatedStats")),v.default.error("[".concat(O.clientId,"] Publisher connection is lost -- streamId: ").concat(e.getId(),", p2pId: ").concat(u)),O.p2ps.delete(u),v.default.debug("[".concat(O.clientId,"] publish p2p failed: "),O.p2ps),!s)return s=!0,y.report.publish(O.joinInfo.sid,{lts:o,succ:!1,audio:e.hasAudio(),video:e.hasVideo(),screenshare:e.hasScreen(),audioName:e.hasAudio()&&e.audioName,videoName:e.hasVideo()&&e.videoName,screenName:e.hasScreen()&&e.screenName,ec:T.default.PEERCONNECTION_FAILED,publishRequestid:O.publishRequestId||0,p2pid:u}),O.dispatchEvent(Object(g.a)({type:"pubP2PLost",stream:e})),i&&i(T.default.PEERCONNECTION_FAILED);O.dispatchEvent(Object(g.a)({type:"pubP2PLost",stream:e}))}else if("connected"===t&&(v.default.debug("[".concat(O.clientId,"] publish p2p connected: "),O.p2ps),e.getId()===e.getUserId()&&(e._isAudioMuted()?O.makeReport(r({action:"mute_local_audio",stream_id:e.getId()})):O.makeReport(r({action:"unmute_local_audio",stream_id:e.getId()})),e._isVideoMuted()?O.makeReport(r({action:"mute_local_video",stream_id:e.getId()})):O.makeReport(r({action:"unmute_local_video",stream_id:e.getId()}))),!s))return s=!0,y.report.publish(O.joinInfo.sid,{lts:o,succ:!0,audio:e.hasAudio(),video:e.hasVideo(),screenshare:e.hasScreen(),audioName:e.hasAudio()&&e.audioName,videoName:e.hasVideo()&&e.videoName,screenName:e.hasScreen()&&e.screenName,ec:null,publishRequestid:O.publishRequestId||0,p2pid:u}),n&&n()},e.pc.processSignalingMessage(t.sdp)},function(t,n){v.default.error("Publish Failed: ".concat(t)),y.report.publish(O.joinInfo.sid,{lts:o,succ:!1,audio:e.hasAudio(),video:e.hasVideo(),screenshare:e.hasScreen(),audioName:e.hasAudio()&&e.audioName,videoName:e.hasVideo()&&e.videoName,screenName:e.hasScreen()&&e.screenName,ec:t,publishRequestid:O.publishRequestId||0,p2pid:u}),"TIMEOUT"!=t&&(O.processPublishFailure(e),i&&i(t))})},audio:e.hasAudio(),video:e.hasVideo(),screen:e.hasScreen(),optimizationMode:e.optimizationMode,isSubscriber:!1,stunServerUrl:O.stunServerUrl,turnServers:O.joinInfo.turnServers,maxAudioBW:a.maxAudioBW,minVideoBW:a.minVideoBW,maxVideoBW:a.maxVideoBW,mode:O.mode,codec:O.codec,isVideoMute:e.userMuteVideo||e.peerMuteVideo,isAudioMute:e.userMuteAudio||e.peerMuteAudio,maxFrameRate:e.attributes.maxFrameRate,agoraStream:e,clientId:O.clientId,isCloudProxy3:3===O.joinInfo.proxyServerType,onNoIceCandidate:function(){O.dis
1patchEvent({type:"no_ice_candidate",stream:e})}},e.pc=Object(E.a)(e.connectionSpec),e.pc.addStream(e.stream),v.default.debug("[".concat(O.clientId,"] PeerConnection add stream :"),e.stream),e.pc.onnegotiationneeded=function(n){"motion"===e.optimizationMode&&e.pc.setRtpSenderParameters("maintain-framerate"),"detail"===e.optimizationMode&&e.pc.setRtpSenderParameters("maintain-resolution");var i={state:"negotiation",stream_type:1===t.streamType?"low":"high",p2p_id:u,sdp:n};O.makeRequest(l(i),function(t){v.default.debug("Negotating Stream ".concat(e.getId())),e.pc.processSignalingMessage(t.sdp)},function(e,t){v.default.error("Negotiation failed ".concat(e),t,i)})},clearInterval(O.timers[e.getId()]),O.timers[e.getId()]=setInterval(function(){if(Object(S.getParameter)("REPORT_STATS")){var t=0;e&&e.pc&&e.pc.getStats&&e.pc.getStatsRate(function(n){n.forEach(function(n){if(n&&n.id&&!(/_recv$/.test(n.id)||/^time$/.test(n.id)||~n.type.toLowerCase().indexOf("inbound"))&&e.getUserId()){if(-1===n.id.indexOf("outbound_rtp")&&-1===n.id.indexOf("OutboundRTP")&&-1===n.type.toLowerCase().indexOf("outbound")||"video"!==n.mediaType||(n.googFrameWidthSent=e.videoWidth+"",n.googFrameHeightSent=e.videoHeight+""),"video"===n.mediaType)try{var i=e.stream.getVideoTracks()[0];n.A_vstd=i.enabled?"0":"1"}catch(e){}if("audio"===n.mediaType)try{var r=e.stream.getAudioTracks()[0];n.A_astd=r.enabled?"0":"1"}catch(e){}if(e.getId()==e.getUserId()){var o=200*t;t++,setTimeout(function(){var e=O.socket&&O.socket.getLastMsgTime()&&Date.now()-O.socket.getLastMsgTime();e>Object(S.getParameter)("REPORT_STATS_TIMEOUT")?v.default.debug("PublishStats report blocked by REPORT_STATS_TIMEOUT ".concat(e)):O.makeReport(function(e){var t={};return Object.keys(e).forEach(function(n){Object(S.getParameter)("STATS_FILTER")[n]||(t[x(n)]=e[n])}),{_type:"publish_stats",_message:{stream_type:"high",stats:t}}}(n))},o)}else o=200*t,t++,setTimeout(function(){var e=O.socket&&O.socket.getLastMsgTime()&&Date.now()-O.socket.getLastMsgTime();e>Object(S.getParameter)("REPORT_STATS_TIMEOUT")?v.default.debug("PublishStatsLow report blocked by REPORT_STATS_TIMEOUT ".concat(e)):O.makeReport(function(e){var t={};return Object.keys(e).forEach(function(n){Object(S.getParameter)("STATS_FILTER")[n]||(t[x(n)]=e[n])}),{_type:"publish_stats",_message:{stream_type:"low",stats:t}}}(n))},o)}})})}},3e3);var d=function(){Object(S.getParameter)("REPORT_STATS")&&e&&e.pc&&e.pc.getVideoRelatedStats&&e.pc.getVideoRelatedStats(function(t){var n,i,r=O.socket&&O.socket.getLastMsgTime()&&Date.now()-O.socket.getLastMsgTime();r>Object(S.getParameter)("REPORT_STATS_TIMEOUT")?v.default.debug("PublishRelatedStats report blocked by REPORT_STATS_TIMEOUT ".concat(r)):e.getId()===e.getUserId()?O.makeReport((n=t,i={},Object.keys(n).forEach(function(e){Object(S.getParameter)("STATS_FILTER")[e]||(i[x(e)]=n[e])}),{_type:"publish_related_stats",_message:{stream_type:"high",stats:i}})):O.makeReport(function(e){var t={};return Object.keys(e).forEach(function(n){Object(S.getParameter)("STATS_FILTER")[n]||(t[x(n)]=e[n])}),{_type:"publish_related_stats",_message:{stream_type:"low",stats:t}}}(t))})};d(),clearInterval(O.timers[e.getId()+"_RelatedStats"]),O.timers[e.getId()+"_RelatedStats"]=setInterval(d,1e3)}}},O.unpublish=function(e,t,n,i){if("object"!==c()(e)||null===e)return v.default.error("[".concat(O.clientId,"] Invalid local stream")),void j(i,T.default.INVALID_LOCAL_STREAM);if(O.state!==D)return v.default.error("[".concat(O.clientId,"] User not in the session")),void j(i,T.default.INVALID_OPERATION);if(null!=O.timers[e.getId()]&&(clearInterval(O.timers[e.getId()]),clearInterval(O.timers[e.getId()+"_RelatedStats"])),void 0!==O.socket)if(e.local&&void 0!==O.localStreams[e.getId()]){delete O.localStreams[e.getId()];var r={stream_id:e.getUserId(),stream_type:1===t.streamType?"low":"high"};O.makeRequest({_type:"unpublish",_message:r}),(e.hasAudio()||e.hasVideo()||e.hasScreen())&&void 0===e.url&&void 0!==e.pc&&(e.pc.close(),e.pc=void 0),e.onClose=void 0,e._onAudioMute=void 0,e._onAudioUnute=void 0,e._onVideoMute=void 0,e._onVideoUnmute=void 0,O.p2ps.delete(e.p2pId),n&&n()}else v.default.error("[".concat(O.clientId,"] Invalid local stream")),j(i,T.default.INVALID_LOCAL_STREAM);else v.default.error("[".concat(O.clientId,"] User not in the session")),j(i,T.default.INVALID_OPERATION)},O.subscribe=function(e,t,n){var i=(new Date).getTime();e.subscribeLTS=i;var o=!1;if(v.default.info("[".concat(O.clientId,"] Gatewayclient ").concat(O.uid," Subscribe ").concat(e.getId(),": ").concat(JSON.stringify(e.subscribeOptions))),"object"!==c()(e)||null===e)return v.default.error("[".concat(O.clientId,"] Invalid remote stream")),n&&n(T.default.INVALID_REMOTE_STREAM),void y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peer
1id:e.getId(),ec:T.default.INVALID_REMOTE_STREAM});if(O.state!==D&&(v.default.error("[".concat(O.clientId,"] User is not in the session")),!o))return o=!0,y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:T.default.INVALID_OPERATION}),n&&n(T.default.INVALID_OPERATION);if(!e.local&&O.remoteStreams.hasOwnProperty(e.getId()))if(e.hasAudio()||e.hasVideo()||e.hasScreen()){var a=O.generateP2PId();O.p2ps.set(a,e),e.p2pId=a,e.pc=Object(E.a)({callback:function(t){t||n&&n("CANNOT_GET_OFFER");var r={stream_id:e.getId(),audio:!e.subscribeOptions||e.subscribeOptions.audio,video:!e.subscribeOptions||e.subscribeOptions.video,codec:O.codec,p2p_id:a,sdp:t,tcc:Object(S.getParameter)("SUBSCRIBE_TCC"),extend:Object(S.getParameter)("SUB_EXTEND")};O.makeRequest({_type:"subscribe",_message:r},function(t){e.pc.processSignalingMessage(t.sdp)},function(t,r){v.default.error("[".concat(O.clientId,"] Subscribe remote stream Failed: ").concat(t,", closing stream "),e.getId(),r),y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:t}),"TIMEOUT"!=t&&(O.processSubscribeFailure(e),n&&n(t))})},nop2p:!0,audio:!0,video:!0,screen:e.hasScreen(),isSubscriber:!0,stunServerUrl:O.stunServerUrl,turnServers:O.joinInfo.turnServers,isVideoMute:e.userMuteVideo,isAudioMute:e.userMuteAudio,uid:e.getId(),agoraStream:e,clientId:O.clientId}),e.pc.onaddstream=function(t,n){if(e._onAudioUnmute=function(){O.makeReport(r({action:"unmute_remote_audio",stream_id:e.getId()}),function(){},function(){})},e._onAudioMute=function(){O.makeReport(r({action:"mute_remote_audio",stream_id:e.getId()}),function(){},function(){})},e._onVideoUnmute=function(){O.makeReport(r({action:"unmute_remote_video",stream_id:e.getId()}),function(){},function(){})},e._onVideoMute=function(){O.makeReport(r({action:"mute_remote_video",stream_id:e.getId()}),function(){},function(){})},"ontrack"===n&&"video"===t.track.kind||"onaddstream"===n){v.default.info("[".concat(O.clientId,"] Remote stream subscribed with uid "),e.getId());var i=O.remoteStreams[e.getId()];if(O.remoteStreams[e.getId()].stream="onaddstream"===n?t.stream:t.streams[0],O.remoteStreams[e.getId()].hasVideo()){if(Object(I.isFireFox)()||Object(I.isSafari)()){var o=O.remoteStreams[e.getId()].stream;Object(b.vsResHack)(o,function(t,n){e.videoWidth=t,e.videoHeight=n},function(e){return v.default.warning("[".concat(O.clientId,"] vsResHack failed: ")+e)})}}else{var s=O.remoteStreams[e.getId()];s.peerMuteVideo=!0,O._adjustPCMuteStatus(s)}i&&i.isPlaying()&&i.elementID&&(v.default.debug("[".concat(O.clientId,"] Reload Player ").concat(i.elementID," StreamId ").concat(i.getId())),e.audioOutput=i.audioOutput,i.stop(),e.play(i.elementID,i.playOptions)),delete e.audioLevelHelper;var a=Object(g.e)({type:"stream-subscribed",stream:O.remoteStreams[e.getId()]});O.dispatchEvent(a)}},clearInterval(O.timers[e.getId()]),O.timers[e.getId()]=setInterval(function(){if(Object(S.getParameter)("REPORT_STATS")){var t=0;e&&e.pc&&e.pc.getStats&&e.pc.getStatsRate(function(n){n.forEach(function(n){if(n&&n.id){if(/_send$/.test(n.id)||/^time$/.test(n.id)||/^bweforvideo$/.test(n.id))return;-1===n.id.indexOf("inbound_rtp")&&-1===n.id.indexOf("inbound-rtp")&&-1===n.type.toLowerCase().indexOf("inbound")||"video"!==n.mediaType||(n.googFrameWidthReceived=e.videoWidth+"",n.googFrameHeightReceived=e.videoHeight+"");var i=200*t;t++;var r=e.getId();setTimeout(function(){var t=O.socket&&O.socket.getLastMsgTime()&&Date.now()-O.socket.getLastMsgTime();if(t>Object(S.getParameter)("REPORT_STATS_TIMEOUT"))v.default.debug("SubscribeStats report blocked by REPORT_STATS_TIMEOUT ".concat(t));else{if("video"===n.mediaType)try{var i=e.stream.getVideoTracks()[0];n.A_vrtd=i.enabled?"0":"1",e.player&&e.player.freezeTimeCounterList.length>0&&(n.A_vrft=e.player.freezeTimeCounterList.splice(0,1)[0].toString())}catch(e){}if("audio"===n.mediaType)try{var o=e.stream.getAudioTracks()[0];n.A_artd=o.enabled?"0":"1"}catch(e){}O.makeReport(u(r,n))}},i)}})})}},3e3),clearInterval(O.timers[e.getId()+"_RelatedStats"]),O.timers[e.getId()+"_RelatedStats"]=setInterval(function(){if(Object(S.getParameter)("REPORT_STATS")&&e&&e.pc){var t=O.socket&&O.s
1ocket.getLastMsgTime()&&Date.now()-O.socket.getLastMsgTime();if(t>Object(S.getParameter)("REPORT_STATS_TIMEOUT"))return void v.default.debug("SubscribeRelatedStats report blocked by REPORT_STATS_TIMEOUT ".concat(t));e.pc.getVideoRelatedStats&&e.pc.getVideoRelatedStats(function(t){e.player&&(e.hasVideo()&&!e.peerMuteVideo&&(t.isFreeze=e.player.freezeCount>e.player.lastFreezeCount),e.player.lastFreezeCount=e.player.freezeCount),O.makeReport(s(e.getId(),t))}),e.pc.getAudioRelatedStats&&e.pc.getAudioRelatedStats(function(t){O.makeReport(s(e.getId(),t))})}},1e3),O.audioLevel[e.getId()]=0,clearInterval(O.timers[e.getId()+"audio"]),O.timers[e.getId()+"audio"]=setInterval(function(){O.hasListeners("active-speaker")&&e&&e.pc&&"established"===e.pc.state&&e.pc.getStats&&e.pc.getStats(function(t){t.forEach(function(t){if("audio"===t.mediaType){if(t.audioOutputLevel>5e3)for(var n in O.audioLevel[e.getId()]<20&&(O.audioLevel[e.getId()]+=1),O.audioLevel)n!==""+e.getId()&&O.audioLevel[n]>0&&(O.audioLevel[n]-=1);var i=Object.keys(O.audioLevel).sort(function(e,t){return O.audioLevel[t]-O.audioLevel[e]});if(O.activeSpeaker!==i[0]){var r=Object(g.a)({type:"active-speaker",uid:i[0]});O.dispatchEvent(r),O.activeSpeaker=i[0],v.default.debug("[".concat(O.clientId,"] Update active speaker: ").concat(O.activeSpeaker))}}})},50)},50),e.pc.oniceconnectionstatechange=function(r){if("failed"===r)null!=O.timers[e.getId()]&&(clearInterval(O.timers[e.getId()]),clearInterval(O.timers[e.getId()]+"audio")),v.default.error("[".concat(O.clientId,"] Subscriber connection is lost -- streamId: ").concat(e.getId(),", p2pId: ").concat(a)),v.default.debug("[".concat(O.clientId,"] subscribe p2p failed: "),O.p2ps),o||(o=!0,n&&n(T.default.PEERCONNECTION_FAILED),y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:T.default.PEERCONNECTION_FAILED,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a})),O.remoteStreams[e.getId()]&&O.p2ps.has(a)&&(O.p2ps.delete(a),O.dispatchEvent(Object(g.a)({type:"subP2PLost",stream:e})));else if("connected"===r&&(v.default.debug("[".concat(O.clientId,"] subscribe p2p connected: "),O.p2ps),!o)){o=!0,y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!0,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:null,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a}),O._adjustPCMuteStatus(e);var s=!1,l=!1,c=!1,u=setInterval(function(){s&&l||(e.pc?e.pc.getStats(function(t){t.forEach(function(t){if((-1!==t.id.indexOf("recv")||t.type&&-1!==t.type.toLowerCase().indexOf("inbound")||-1!==t.id.indexOf("inbound_rtp")||-1!==t.id.indexOf("inbound-rtp")||-1!==t.id.indexOf("InboundRTP"))&&"audio"===t.mediaType){if((t.googDecodingNormal>0||t.audioOutputLevel>0)&&!s){s=!0,O.dispatchEvent({type:"first-audio-frame-decode",stream:e}),s&&l&&clearInterval(u);var n=Date.now(),i=y.report.getSessionStartTime(O.joinInfo.sid);y.report.firstAudioDecode(O.joinInfo.sid,{peerid:e.uintId,uid:O.uid,elapse:n-i,subscribeElapse:n-e.subscribeLTS,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a})}parseInt(t.packetsReceived)>0&&!l&&(l=!0,O.dispatchEvent({type:"first-audio-packet-received",stream:e}),s&&l&&clearInterval(u),n=Date.now(),i=y.report.getSessionStartTime(O.joinInfo.sid),y.report.firstAudioReceived(O.joinInfo.sid,{peerid:e.uintId,uid:O.uid,elapse:n-i,subscribeElapse:n-e.subscribeLTS,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a}))}})},100):clearInterval(u))},100),d=!1,h=!1,p=setInterval(function(){d&&h||(e.pc?e.pc.getStats(function(t){t.forEach(function(t){if((-1!==t.id.indexOf("recv")||t.type&&-1!==t.type.toLowerCase().indexOf("inbound")||-1!==t.id.indexOf("inbound_rtp")||-1!==t.id.indexOf("inbound-rtp")||-1!==t.id.indexOf("InboundRTP"))&&"video"===t.mediaType){if((t.framesDecoded>0||t.googFramesDecoded>0)&&!d){d=!0,O.dispatchEvent({type:"first-video-frame-decode",stream:e}),d&&h&&clearInterval(p);var n=Date.now(),i=y.report.getSessionStartTime(O.joinInfo.sid);e.firstFrameTime=(new Date).getTime()-e.subscribeLTS,y.report.firstVideoDecode(O.joinInfo.sid,{peerid:e.uintId,width:parseInt(t.googFrameWidthReceived)||0,height:parseInt(t.googFrameHeightReceived)||0,uid:O.uid,elapse:n-i,subscribeElapse:n-e.subscribeLTS,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a})}t.packetsReceived>0&&!h&&(h=!0,O.dispatchEvent({type:"first-video-packet-received",stream
1:e}),d&&h&&clearInterval(p),n=Date.now(),i=y.report.getSessionStartTime(O.joinInfo.sid),y.report.firstVideoReceived(O.joinInfo.sid,{peerid:e.uintId,uid:O.uid,elapse:n-i,subscribeElapse:n-e.subscribeLTS,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:a}))}})},100):clearInterval(p))},100),f=setInterval(function(){if(!c){var t=e.getId(),n=O.traffic_stats;if(n&&n.peer_delay){var i=n.peer_delay.find(function(e){return e.peer_uid==t});if(i){if(c=!0,O.peerPublishDurationMap.get(e.getId()))return void clearInterval(f);var r=i.peer_publish_audio_duration,o=i.peer_publish_video_duration;if(void 0===r||void 0===o)return;O.peerPublishDurationMap.set(e.getId(),!0);var s=y.report.getSessionStartTime(O.joinInfo.sid),a=(r||o)+(Date.now()-n.timestamp),l=Date.now();y.report.peerPublishStatus({audiotag:r?1:-1,videotag:o?1:-1,lts:l,sid:O.joinInfo.sid,cname:O.joinInfo.cname,cid:O.joinInfo.cid,uid:O.joinInfo.uid,elapse:l-s,peer:e.uintId,peerPublishDuration:a,joinChannelSuccessElapse:l-O.joinSuccessLts,subscribeElapse:l-e.subscribeLTS}),clearInterval(f)}}}},1e3);return e.sid=O.joinInfo.sid,t&&t()}}}else v.default.error("[".concat(O.clientId,"] Invalid remote stream")),o||(o=!0,n&&n(T.default.INVALID_REMOTE_STREAM),y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:T.default.INVALID_REMOTE_STREAM}));else v.default.error("[".concat(O.clientId,"] No such remote stream")),o||(o=!0,n&&n(T.default.NO_SUCH_REMOTE_STREAM),y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!1,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:T.default.NO_SUCH_REMOTE_STREAM}))},O.subscribeChange=function(e,t,n){var i=Date.now();v.default.info("[".concat(O.clientId,"] Gatewayclient ").concat(O.uid," SubscribeChange ").concat(e.getId(),": ").concat(JSON.stringify(e.subscribeOptions))),O._adjustPCMuteStatus(e);var r={stream_id:e.getId(),audio:e.subscribeOptions.audio,video:e.subscribeOptions.video};O.makeRequest({_type:"subscribe_change",_message:r},function(n){var r=Object(g.e)({type:"stream-subscribe-changed",stream:O.remoteStreams[e.getId()]});y.report.subscribe(O.joinInfo.sid,{lts:i,succ:!0,video:e.subscribeOptions&&e.subscribeOptions.video,audio:e.subscribeOptions&&e.subscribeOptions.audio,peerid:e.getId(),ec:null,subscribeRequestid:O.subscribeRequestId.get(e.getId())||0,p2pid:O.p2ps.get(e.getId())}),O.dispatchEvent(r),t&&t()},function(t,i){v.default.error("[".concat(O.clientId,"] Subscribe Change Failed ").concat(e.getId()),t,i),n&&n(t,i)})},O.processPublishFailure=function(e){e.publishLTS=null,e.p2pId&&O.p2ps.get(e.p2pId)===e&&O.p2ps.delete(e.p2pId),O.localStreams[e.getUserId()]===e&&delete O.localStreams[e.getUserId()],O.localStreams[e.getId()]===e&&delete O.localStreams[e.getId()],e.pc&&(e.pc.processSignalingMessage=function(){},e.pc.oniceconnectionstatechange=function(){},e.pc.close(),delete e.pc),delete e.onClose,delete e._onAudioUnmute,delete e._onVideoUnmute,delete e._onAudioMute,delete e._onVideoMute,delete e._onAudioUnmute},O.processSubscribeFailure=function(e){e.p2pId&&O.p2ps.get(e.p2pId)===e&&O.p2ps.delete(e.p2pId),e.pc&&(e.pc.onaddstream=function(){},e.pc.processSignalingMessage=function(){},e.pc.oniceconnectionstatechange=function(){},e.pc.close(),delete e.pc),delete e.onClose,delete e._onAudioUnmute,delete e._onVideoUnmute,delete e._onAudioMute,delete e._onVideoMute,delete e._onAudioUnmute},O._adjustPCMuteStatus=function(e){v.default.debug("[".concat(O.clientId,"]: use _adjustPCMuteStatus: ").concat(e.getId())),v.default.debug("[".concat(O.clientId,"]: video: ").concat(e.video,", audio: ").concat(e.audio,", suboption: ").concat(JSON.stringify(e.subscribeOptions),",userMuteVideo: ").concat(e.userMuteVideo,", peerMuteVideo: ").concat(e.peerMuteVideo,", userMuteAudio: ").concat(e.userMuteAudio,", peerMuteAudio: ").concat(e.peerMuteAudio)),!e.local&&e.pc&&e.pc.peerConnection.getReceivers&&e.pc.peerConnection.getReceivers().forEach(function(t){if(t&&t.track&&"audio"===t.track.kind){var n=!e.userMuteAudio&&!e.peerMuteAudio;e.subscribeOptions&&!e.subscribeOptions.audio&&(n=!1),v.default.debug("[".concat(O.clientId,"]: set receiver audio track: ").concat(n)),t.track.enabled=!!n}else if(t&&t.track&&"video"===t.track.kind){var i=!e.userMuteVideo&&!e.peerMuteVideo;e.subscribeOptions&&!e.subscribeOptions.video&&(i=!1),v.default.debug("[".concat(O.clientId,"]: set receiver video track: ").concat(i)),t.track.enabled=!!i}})},O.unsubscribe=function(e,t,n){if("object"!==c()(e)||null===e)return v.default.error("[".concat(O.clientId,"] Invalid remote stream")),void j(n,T.default.INVALID_REMOTE_STREAM);if(O.state!==D)return v.default.error("[".concat(O.clientId,"] User is not in the session")),void j(n,T.default.INVALID_OPERATION);if(null!=O.timers[e.getId()]&&(clearInterval(O.timers[e.getId()]),clearInterval(O.timers[e.getId()]+"audio")),null!=O.audioLevel[e.getId()]&&delete O.audioLevel[e.getId()],null!=O.timer_counter[e.getId()]&&delete O.timer_counter[e.getId()],O.remoteStreams.hasOwnProperty(e.getId())){if(!O.socket)return v.default.error("[".concat(O.clientId,"] User is not in the session")),void j(n,T.default.INVALID_OPERATION);if(e.local)return v.default.error("[".concat(O.clientId,"] Invalid remote stream")),void j(n,T.default.INVALID_REMOTE_STREAM);e.close(),e.stop();var i={stream_id:e.getId()};
1O.makeRequest({_type:"unsubscribe",_message:i}),void 0!==e.pc&&(e.pc.close(),e.pc=void 0),e.onClose=void 0,e._onAudioMute=void 0,e._onAudioUnute=void 0,e._onVideoMute=void 0,e._onVideoUnmute=void 0,delete e.subscribeOptions,O.p2ps.delete(e.p2pId),v.default.info("[".concat(O.clientId,"] Unsubscribe stream success")),t&&t()}else j(n,T.default.NO_SUCH_REMOTE_STREAM)},O.setRemoteVideoStreamType=function(e,t){if(v.default.debug("[".concat(O.clientId,"] Switching remote video stream ").concat(e.getId()," to ").concat(t)),"object"===c()(e)&&null!==e)if(O.state===D){if(!e.local){switch(t){case O.remoteVideoStreamTypes.REMOTE_VIDEO_STREAM_HIGH:case O.remoteVideoStreamTypes.REMOTE_VIDEO_STREAM_LOW:case O.remoteVideoStreamTypes.REMOTE_VIDEO_STREAM_MEDIUM:break;default:return}var n={stream_id:e.getId(),stream_type:t};O.makeRequest({_type:"switch_video_stream",_message:n},function(){v.default.debug("SwitchVideoStream Success ".concat(n.stream_id," ").concat(n.stream_type))},function(e,t){v.default.error("SwitchVideoStream Error ".concat(e," ").concat(n.stream_id," ").concat(n.stream_type),t)})}}else v.default.error("[".concat(O.clientId,"] User is not in the session"));else v.default.error("[".concat(O.clientId,"] Invalid remote stream"))},O.renewToken=function(e,t,n){e?O.key?O.state!==D?(v.default.debug("[".concat(O.clientId,"] Client is not connected. Trying to rejoin")),O.key=e,O.rejoin(),t&&t()):(v.default.debug("[".concat(O.clientId,"] renewToken from ").concat(O.key," to ").concat(e)),O.key=e,O.makeRequest({_type:"renew_token",_message:{token:e}},t,n)):(v.default.error("[".concat(O.clientId,"] Client is previously joined without token")),n&&n(T.default.INVALID_PARAMETER)):(v.default.error("[".concat(O.clientId,"] Invalid Token ").concat(e)),n&&n(T.default.INVALID_PARAMETER))},O.setStreamFallbackOption=function(e,t){if(v.default.debug("[".concat(O.clientId,"] Set stream fallback option ").concat(e.getId()," to ").concat(t)),"object"===c()(e)&&null!==e)if(O.state===D){if(!e.local){switch(t){case O.streamFallbackTypes.STREAM_FALLBACK_OPTION_DISABLED:case O.streamFallbackTypes.STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW:case O.streamFallbackTypes.STREAM_FALLBACK_OPTION_AUDIO_ONLY:break;default:return}var n={stream_id:e.getId(),fallback_type:t};O.makeRequest({_type:"set_fallback_option",_message:n},function(){v.default.debug("SetStreamFallbackOption success ".concat(n.stream_id," ").concat(t))},function(e,i){v.default.error("Failed to SetStreamFallbackOption ".concat(n.stream_id," ").concat(t," ").concat(e),i)})}}else v.default.error("[".concat(O.clientId,"] User is not in the session"));else v.default.error("[".concat(O.clientId,"] Invalid remote stream"))},O.enableAudioVolumeIndicator=function(e,t){O.audioVolumeIndication.enabled=!0,O.audioVolumeIndication.interval=e,O.audioVolumeIndication.smooth=t,O.resetAudioVolumeIndication()},O.resetAudioVolumeIndication=function(){if(clearInterval(O.timers.audioVolumeIndication),clearInterval(O.timers.audioVolumeSampling),O.audioVolumeIndication.enabled&&O.audioVolumeIndication.interval){var e=Math.floor(1e3*O.audioVolumeIndication.smooth/100);clearInterval(O.timers.audioVolumeSampling),O.timers.audioVolumeSampling=setInterval(function(){O.audioVolumeSampling||(O.audioVolumeSampling={});var t={};for(var n in O.remoteStreams){var i=O.remoteStreams[n];if(i.stream&&i.hasAudio()){var r=i.getAudioLevel();r>0&&r<1&&(r*=100);var o=O.audioVolumeSampling[n]||[];for(o.push(r);o.length>e;)o.shift();t[n]=o}}O.audioVolumeSampling=t},100),clearInterval(O.timers.audioVolumeIndication),O.timers.audioVolumeIndication=setInterval(function(){if(O.socket&&O.socket.signal&&O.socket.signal.connection&&O.socket.signal.connection.readyState===WebSocket.OPEN){var e=[];for(var t in O.remoteStreams)if(O.audioVolumeSampling&&O.audioVolumeSampling[t]){var n=O.audioVolumeSampling[t],i=0;n.forEach(function(e){i+=e});var r={uid:t,level:Math.floor(i/n.length)};r.level&&e.push(r)}var o=e.sort(function(e,t){return e.level-t.level});v.default.debug("[".concat(O.clientId,"] volume-indicator "),JSON.stringify(o)),O.audioVolumeIndication.sortedAudioVolumes=o;var s=Object(g.a)({type:"volume-indicator",attr:o});O.dispatchEvent(s)}},O.audioVolumeIndication.interval)}},O.closeGateway=function(){v.default.debug("[".concat(O.clientId,"] close gateway")),O.state=h,O.socket.close(),H()},O.startChannelMediaRelay=function(){var e=a()(o.a.mark(function e(t){var n,i,r;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!O.channelMediaRelayController){e.next=2;break}throw new P.ChannelMediaError("RELAY_ALREADY_START","",P.CHANNEL_MEDIA_RELAY_ERROR.RELAY_ALREADY_START);case 2:return n=function(e){O.dispatchEvent({type:"channel-media-relay-event",code:e})},i=function(e,t,n){e===P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_FAILURE&&t===P.CHANNEL_MEDIA_RELAY_ERROR.SERVER_CONNECTION_LOST&&(O.channelMediaRelayController.dispose(),O.channelMediaRelayController=null),O.dispatchEvent({type:"channel-media-relay-state",state:e,code:t,data:n})},O.channelMediaRelayController=new M.a(O.joinInfo,O.clientId),O.channelMediaRelayController.on("event",n),O.channelMediaRelayController.on("state",i),e.prev=7,e.next=10,O.channelMediaRelayController.startChannelMediaRelay(t);case 10:e.next=22;break;case 12:throw e.prev=12,e.t0=e.catch(7),v.default.debug("[".concat(O.clientId,"] startChannelMediaRelay exception: ").concat(JSON.stringify(e.t0))),r="",O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_FAILURE,code:P.CHANNEL_MEDIA_RELAY_ERROR[r=e.t0 instanceof P.ChannelMediaError?"SetSourceChannelStatus"===e.t0.data||e.t0.data&&e.t0.data.serverResponse&&"SetSourceChannel"===e.t0.data.serverResponse.command?"FAILED_JOIN_SRC":"SetDestChannelStatus"===e.t0.data||e.t0.data&&e.t0.data.serverResponse&&"SetDestChannel"===e.t0.data.serverResponse.command?"FAILED_JOIN_DEST":e.t0.data&&e.t0.data.serverResponse&&"StartPacketTransfer"===e.t0.data.serverResponse.command?"FAILED_PACKET_SENT_TO_DEST":e.t0.message===P.CHANNEL_MEDIA_ERROR.REQUEST_TIMEOUT||e.t0.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_TIMEOUT?"SERVER_NO_RESPONSE":e.t0.message===P.CHANNEL_MEDIA_ERROR.REQUEST_FAILED||e.t0.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_ERROR?"SERVER_ERROR_RESPONSE":e.t0.message===P.CHANNEL_MEDIA_ERROR.AP_REQUEST_TIMEOUT?"NO_RESOURCE_AVAILABLE":e.t0.message===P.CHANNEL_MEDIA_ERROR.WS_ABORT||e.t0.message===P.CHANNEL_MEDIA_ERROR.AP_REQUEST_ABORT?"OPERATION_ABORT":"INT
1ERNAL_ERROR":"INTERNAL_ERROR"]}),O.channelMediaRelayController&&(O.channelMediaRelayController.dispose(),O.channelMediaConfig=null,O.channelMediaRelayController=null),O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_IDLE}),new P.ChannelMediaError(r,null,P.CHANNEL_MEDIA_RELAY_ERROR[r]);case 22:O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_RUNNING,code:P.CHANNEL_MEDIA_RELAY_ERROR.RELAY_OK}),O.channelMediaConfig=t;case 24:case"end":return e.stop()}},e,null,[[7,12]])}));return function(t){return e.apply(this,arguments)}}(),O.updateChannelMediaRelay=function(){var t=a()(o.a.mark(function t(n){var i,r;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(O.channelMediaRelayController){t.next=2;break}throw new P.ChannelMediaError("RELAY_NOT_START",null,P.CHANNEL_MEDIA_RELAY_ERROR.RELAY_NOT_START);case 2:return t.prev=2,t.next=5,O.channelMediaRelayController.updateChannelMediaRelay(n);case 5:t.next=18;break;case 7:throw t.prev=7,t.t0=t.catch(2),v.default.debug("[".concat(O.clientId,"] updateChannelMediaRelay exception: ").concat(JSON.stringify(e))),i=P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_FAILURE,r="",r=e instanceof P.ChannelMediaError?e.message===P.CHANNEL_MEDIA_ERROR.REQUEST_TIMEOUT||e.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_TIMEOUT?"SERVER_NO_RESPONSE":e.message===P.CHANNEL_MEDIA_ERROR.REQUEST_FAILED||e.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_ERROR?"SERVER_ERROR_RESPONSE":e.message===P.CHANNEL_MEDIA_ERROR.WS_ABORT||e.message===P.CHANNEL_MEDIA_ERROR.AP_REQUEST_ABORT?"OPERATION_ABORT":"INTERNAL_ERROR":"INTERNAL_ERROR",O.dispatchEvent({type:"channel-media-relay-event",code:P.CHANNEL_MEDIA_RELAY_EVENT.PACKET_UPDATE_DEST_CHANNEL_REFUSED}),O.dispatchEvent({type:"channel-media-relay-state",state:i,code:P.CHANNEL_MEDIA_RELAY_ERROR[r]}),O.channelMediaRelayController&&(O.channelMediaRelayController.dispose(),O.channelMediaConfig=null,O.channelMediaRelayController=null),O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_IDLE}),new P.ChannelMediaError(r,null,P.CHANNEL_MEDIA_RELAY_ERROR[r]);case 18:O.channelMediaConfig=n;case 19:case"end":return t.stop()}},t,null,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),O.stopChannelMediaRelay=a()(o.a.mark(function t(){var n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(O.channelMediaRelayController){t.next=2;break}throw new P.ChannelMediaError("RELAY_NOT_START",null,P.CHANNEL_MEDIA_RELAY_ERROR.RELAY_NOT_START);case 2:return t.prev=2,t.next=5,O.channelMediaRelayController.stopChannelMediaRelay();case 5:t.next=17;break;case 7:throw t.prev=7,t.t0=t.catch(2),v.default.debug("[".concat(O.clientId,"] stopChannelMediaRelay exception: ").concat(JSON.stringify(e))),n="",n=e instanceof P.ChannelMediaError?e.message===P.CHANNEL_MEDIA_ERROR.REQUEST_TIMEOUT||e.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_TIMEOUT?"SERVER_NO_RESPONSE":e.message===P.CHANNEL_MEDIA_ERROR.REQUEST_FAILED||e.message===P.CHANNEL_MEDIA_ERROR.WAIT_STATUS_ERROR?"SERVER_ERROR_RESPONSE":"INTERNAL_ERROR":"INTERNAL_ERROR",O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_FAILURE,code:P.CHANNEL_MEDIA_RELAY_ERROR[n]}),O.channelMediaRelayController&&(O.channelMediaRelayController.dispose(),O.channelMediaConfig=null,O.channelMediaRelayController=null),O.dispatchEvent({type:"channel-media-relay-state",state:P.CHANNEL_MEDIA_RELAY_STATE.RELAY_STATE_IDLE}),new P.ChannelMediaError(n,null,P.CHANNEL_MEDIA_RELAY_ERROR[n]);case 17:O.channelMediaConfig=null,O.channelMediaRelayController=null;case 19:case"end":return t.stop()}},t,null,[[2,7]])})),O.sendMetadata=function(e,t){O.makeRequest(function(e){return{_type:"send_metadata",_message:{session_id:O.joinInfo.sid,metadata:window.btoa(unescape(encodeURIComponent(e)))}}}(e),function(){v.default.debug("[".concat(O.clientId,'] send metadata "').concat(e,'" success')),t&&t(null)},function(n){v.default.error("[".concat(O.clientId,'] send metadata "').concat(e,'" failed'),n),t&&t(n)})},O._reportWebsocketCloseEvent=function(e,t){try{var n=y.report.getSessionStartTime(O.joinInfo.sid),i=Date.now();y.report.webSocketQuit({lts:i,sid:O.joinInfo.sid,cname:O.joinInfo.cname,cid:O.joinInfo.cid,uid:O.joinInfo.uid,elapse:i-n,succ:e,errorCode:t,ip:null})}catch(e){v.default.debug("[".concat(O.clientId,"]: _reportWebsocketCloseEvent exception, ").concat(e))}};var U=function(){v.default.debug("[".concat(O.clientId,"] Reconnect gateway")),O.state=h,O.socket.close(),H(),O.reconnectMode="recover",O.state=_,B()};O.recover=U;
1var H=function(){for(var e in O.dispatchEvent({type:"before-clear-connection"}),O.timers)O.timers.hasOwnProperty(e)&&clearInterval(O.timers[e]);for(var e in O.remoteStreams)if(O.remoteStreams.hasOwnProperty(e)){var t=O.remoteStreams[e],n=Object(g.a)({type:"stream-removed",uid:t.getId(),stream:t});O.dispatchEvent(n)}O.p2ps.clear(),q(),z(),clearInterval(O.pingTimer)};O.rejoin=function(){O.socket&&(clearInterval(O.pingTimer),O.socket.close(),O.socket=void 0),O.state=_,B()};var B=function(e,t){O.dispatchEvent(Object(g.a)({type:"rejoin-start"})),e=e||function(e){v.default.info("[".concat(O.clientId,"] User ").concat(e," is re-joined to ").concat(O.joinInfo.cname)),O.dispatchEvent(Object(g.a)({type:"rejoin"})),O.channelMediaConfig&&O.startChannelMediaRelay(O.channelMediaConfig).then(function(){v.default.debug("[".concat(O.clientId,"] restartChannelMediaRelay success"))}).catch(function(e){v.default.debug("[".concat(O.clientId,"] restartChannelMediaRelay failed: ").concat(JSON.stringify(e)))}),O.liveStreams&&O.liveStreams.size&&O.liveStreams.forEach(function(e,t){e&&O.setLiveTranscoding(O.transcoding),O.startLiveStreaming(t,e)}),O.injectLiveStreams&&O.injectLiveStreams.size&&O.injectLiveStreams.forEach(function(e,t){O.addInjectStreamUrl(t,e)})},t=t||function(e){v.default.error("[".concat(O.clientId,"] Re-join to channel failed "),e),O.dispatchEvent(Object(g.e)({type:"error",reason:e}))},O.key?(++O.rejoinAttempt,O.join(O.joinInfo,O.key,e,t)):v.default.error("[".concat(O.clientId,"] Connection recover failed [Invalid channel key]"))},V=function(e,t,n){if(O.onConnect=t,O.socket){if(O.dispatchEvent({type:"reconnect"}),"retry"===O.reconnectMode)v.default.debug("[".concat(O.clientId,"] Retry current gateway")),O.socket.reconnect();else if("tryNext"===O.reconnectMode)v.default.debug("[".concat(O.clientId,"] Try next gateway")),O.socket.connectNext();else if("recover"===O.reconnectMode){v.default.debug("[".concat(O.clientId,"] Recover gateway")),v.default.debug("[".concat(O.clientId,"] Try to reconnect choose server and get gateway list again ")),O.reconnectingCS=!0;var r=O.joinInfo&&O.joinInfo.sid;Object(C.getGatewayList)(O.joinInfo,function(e){v.default.debug("[".concat(O.clientId,"] session:  ").concat(r," get gateway list success")),O.joinInfo.apResponse=e.res,O.reconnectingCS?O.socket.replaceHost(e.gateway_addr):v.default.debug("[".concat(O.clientId,"] session:  ").concat(r," already leave"))})}}else O.socket=w(e.gatewayAddr,{sid:O.joinInfo.sid,clientId:O.clientId,proxyServerType:O.joinInfo.proxyServerType}),O.socket.on("start-connection",function(e){O.ticket=e&&e.msg&&e.msg.ticket}),O.socket.on("on_uplink_stats",function(e){var t={};for(var n in e)t[N(n)]=e[n];if(O.OutgoingAvailableBandwidth=t.uplink_available_bandwidth,O.localStreams[O.uid]){var i=O.localStreams[O.uid].uplinkStats;i&&i.period_fir===t.period_fir||v.default.debug("[".concat(O.clientId,"]: Period fir change to: ").concat(t.period_fir)),O.localStreams[O.uid].uplinkStats=t}}),O.socket.on("connect",function(){O.dispatchEvent({type:"connected"}),O.attemps=1,O.onConnect()}),O.socket.on("recover",function(){O.state=_,v.default.debug("[".concat(O.clientId,"] Try to reconnect choose server and get gateway list again ")),O.reconnectingCS=!0;var e=O.joinInfo&&O.joinInfo.sid;Object(C.getGatewayList)(O.joinInfo,function(t){v.default.debug("[".concat(O.clientId,"] session:  ").concat(e," get gateway list success")),O.reconnectingCS?O.socket.replaceHost(t.gateway_addr):v.default.debug("[".concat(O.clientId,"] session:  ").concat(e," already leave"))})}),O.socket.on("disconnect",function(e){if(v.default.debug("[".concat(O.clientId,"] Receive disconnect message")),O.state!==h){O.state=h,O._reportWebsocketCloseEvent(-1,T.WEBSOCKET_CLOSE_REASON.WS_DISCONNECT);var t=Object(g.e)({type:"error",reason:T.default.SOCKET_DISCONNECTED});if(O.dispatchEvent(t),O.reconnectMode=0===O.p2ps.size?"tryNext":"retry",H(),O.channelMediaRelayController&&O.channelMediaRelayController.dispose(),O.channelMediaRelayController=null,1!=i){var n=1e3*Math.min(30,Math.pow(2,O.attemps)-1);if(v.default.error("[".concat(O.clientId,"] Disconnect from server [").concat(JSON.stringify(e),"], attempt to re
1cover [#").concat(O.attemps,"] after ").concat(n/1e3," seconds")),O.hasInvokeLeave)return v.default.debug("[".concat(O.clientId,"] No reconnection because Client.leave has been invoked")),void(O.hasInvokeLeave=!1);setTimeout(function(){O.attemps++,O.state=_,O.inChannelInfo&&Date.now()-O.inChannelInfo.joinAt>Object(S.getParameter)("TICKET_RENEW_TIMEOUT")?(v.default.debug("Recovering to renew ticket"),U()):B()},n)}else{var r=F.unregister(O);r&&v.default.debug("[".concat(O.clientId,"] "),r)}}}),O.socket.on("on_add_audio_stream",function(e){if(v.default.info("[".concat(O.clientId,"] Newly added audio stream with uid ").concat(e.uid)),O.joinInfo.stringUid&&"string"!=typeof e.uid&&v.default.error("StringUID is Mixed with UintUID"),O.remoteStreamsInChannel.has(e.uid)||O.remoteStreamsInChannel.add(e.uid),void 0===O.remoteStreams[e.uid]){var t=Object(f.a)({streamID:e.uid,local:!1,audio:e.audio,video:e.video,uintUID:e.uint_id||e.uid});t.peerMuteVideo=!0,O.remoteStreams[e.uid]=t;var n=Object(g.e)({type:"stream-added",stream:t});O.dispatchEvent(n);var i=O.remoteMuteState[e.uid];i&&i.audio&&(n=Object(g.a)({type:"mute-audio",uid:e.uid}),O.dispatchEvent(n)),i&&i.video&&(n=Object(g.a)({type:"mute-video",uid:e.uid}),O.dispatchEvent(n))}y.report.onAddAudioStream(O.joinInfo.sid,{peerid:e.uint_id||e.uid,uid:O.uid})}),O.socket.on("on_update_stream",function(e){v.default.info("[".concat(O.clientId,"] on_update_stream:"),e);var t=O.remoteStreams[e.uid];if(O.joinInfo.stringUid&&"string"!=typeof e.uid&&v.default.error("StringUID is Mixed with UintUID"),t){t.audio=e.audio,t.video=e.video,t.screen=e.screen,t.pc&&O._adjustPCMuteStatus(t);var n=Object(g.e)({type:"stream-updated",stream:t});O.dispatchEvent(n)}else v.default.debug("[".concat(O.clientId,"] Ignoring onUpdateStream event before onAddStream for uid ").concat(e.uid));y.report.onUpdateStream(O.joinInfo.sid,{peerid:e.uint_id||e.uid,audio:e.audio,video:e.video,uid:O.uid})}),O.socket.on("on_add_video_stream",function(e){if(v.default.info("[".concat(O.clientId,"] Newly added remote stream with uid ").concat(e.uid,".")),O.joinInfo.stringUid&&"string"!=typeof e.uid&&v.default.error("StringUID is Mixed with UintUID"),O.remoteStreamsInChannel.has(e.uid)||O.remoteStreamsInChannel.add(e.uid),void 0===O.remoteStreams[e.uid]){var t=Object(f.a)({streamID:e.uid,local:!1,audio:e.audio,video:e.video,uintUID:e.uint_id||e.uid});O.remoteStreams[e.uid]=t;var n=Object(g.e)({type:"stream-added",stream:t});O.dispatchEvent(n);var i=O.remoteMuteState[e.uid];i&&i.audio&&(n=Object(g.a)({type:"mute-audio",uid:e.uid}),O.dispatchEvent(n)),i&&i.video&&(n=Object(g.a)({type:"mute-video",uid:e.uid}),O.dispatchEvent(n))}else{var r=O.remoteStreams[e.uid];if(r.video=!0,r.peerMuteVideo=!1,r.pc&&O._adjustPCMuteStatus(r),v.default.info("[".concat(O.clientId,"] Stream changed: enable video ").concat(e.uid)),void 0!==r.stream&&r.isPlaying()){var o=r.player.elementID;r.stop(),r.play(o,r.playOptions)}}y.report.onAddVideoStream(O.joinInfo.sid,{peerid:e.uint_id||e.uid,uid:O.uid})}),O.socket.on("on_remove_stream",function(e){v.default.info("[".concat(O.clientId,"] on_remove_stream:"),e),O.remoteStreamsInChannel.has(e.uid)&&O.remoteStreamsInChannel.delete(e.uid);var t=O.remoteStreams[e.uid];if(t){delete O.remoteStreams[e.uid],delete O.remoteMuteState[e.uid];var n=Object(g.e)({type:"stream-removed",stream:t});O.dispatchEvent(n),t.close(),void 0!==t.pc&&(t.pc.close(),t.pc=void 0,O.p2ps.delete(t.p2pId)),y.report.onRemoveStream(O.joinInfo.sid,{peerid:e.uint_id||e.uid,uid:O.uid})}else v.default.error("ERROR stream ",e.uid," not found onRemoveStream ",e)}),O.socket.on("on_publish_stream",function(e){v.default.info("[".concat(O.clientId,"] on_publish_stream:"),e),O.dispatchEvent({type:"streamPublished",stream:O.localStreams[e.uid],proxy:e.proxy}),y.report.reportApiInvoke(O.joinInfo.sid,{name:"on_publish_stream",options:{proxy:e.proxy}})()}),O.socket.on("mute_audio",function(e){v.default.info("[".concat(O.clientId,"] rcv peer mute audio: ").concat(e.uid)),O.remoteMuteState[e.uid]=O.remoteMuteState[e.uid]||{audio:!1,video:!1},O.remoteMuteState[e.uid].audio=!0;var t=Object(g.a)({type:"mute-audio",uid:e.uid}),n=O.remoteStreams[e.uid];n?(n.peerMuteAudio=!0,n.pc&&O._adjustPCMuteStatus(n),O.dispatchEvent(t)):v.default.debug("Ignoring event ".concat(e.type),e)}),O.socket.on("unmute_audio",function(e){v.default.info("[".concat(O.clientId,"] rcv peer unmute audio: ").concat(e.uid)),O.remoteMuteState[e.uid]=O.remoteMuteState[e.uid]||{audio:!1,video:!1},O.remoteMuteState[e.uid].audio=!1;var t=Object(g.a)({type:"unmute-audio",uid:e.uid}),n=O.remoteStreams[e.uid];n?(n.peerMuteAudio=!1,n.pc&&O._adjustPCMuteStatus(n),O.dispatchEvent(t)):v.default.debug("Ignoring event ".concat(e.type),e)}),O.socket.on("mute_video",function(e){v.default.info("[".concat(O.clientId,"] rcv peer mute video: ").concat(e.uid)),O.remoteMuteState[e.uid]=O.remoteMuteState[e.uid]||{audio:!1,video:!1},O.remoteMuteState[e.uid].video=!0;var t=Object(g.a)({type:"mute-video",uid:e.uid}),n=O.remoteStreams[e.uid];n?(n.peerMuteVideo=!0,n.player&&(n.player.peerVideoReady=!1),n.pc&&O._adjustPCMuteStatus(n),O.dispatchEvent(t)):v.default.debug("Ignoring event ".concat(e.type),e)}),O.socket.on("unmute_video",function(e){v.default.info("[".concat(O.clientId,"] rcv peer unmute video: ").concat(e.uid)),O.remoteMuteState[e.uid]=O.remoteMuteState[e.uid]||{audio:!1,video:!1},O.remoteMuteState[e.uid].video=!1;var t=Object(g.a)({type:"unmute-video",uid:e.uid}),n=O.remoteStreams[e.uid];n?(n.peerMuteVideo=!1,n.pc&&O._adjustPCMuteStatus(n),O.dispatchEvent(t)):v.default.debug("Ignoring event ".concat(e.type),e)}),O.socket.on("on_crypt_error",function(e){v.default.warning("[".concat(O.clientId,"] stream crypt error"));var t=Object(g.a)({type:"crypt-error",cryptType:e.crypt_type});O.dispatchEvent(t)}),O.socket.on("on_user_banned",function(e){v.default.info("[".concat(O.clientId,"] user banned uid: ").concat(e.uid," error: ").concat(e.error_code));var t=Object(g.a)({type:"client-banned",uid:e.uid,attr:e.error_code});O.dispatchEvent(t),i=!0}),O.socket.on("on_stream_fallback_update",function(e){v.default.info("[".concat(O.clientId,"] stream fallback peerId: ").concat(e.stream_id," type: ").concat(e.stream_type));var t=Object(g.a)({type:"stream-fallback",uid:e.stream_id,stream:e.stream_id,attr:e.stream_type});O.dispatchEvent(t)}),O.socket.on("stream_recover",function(e){v.default.info("[".concat(O.clientId,"] stream recover uid: ").concat(e.id," peerId: ").concat(e.peerid," type: ").concat(e.type));var t=Object(g.a)({type:"stream-recover",uid:e.id,stream:e.peerid,attr:e.type});O.dispatchEvent(t)}),O.socket.on("on_p2p_lost",function(e){v.default.debug("[".concat(O.clientId,"] p2plost: "),e,"p2ps:",O.p2ps);var t,n="DTLS failed";(t=O.localStreams[e.uid]||O.remoteStreams[e.uid])?(t.pc&&t.pc.offerCandidates&&0===t.pc.offerCandidates.length&&(n="NO_CANDIDATES_IN_OFFER"),"publish"===e.event&&y.report.publish(O.
1joinInfo.sid,{lts:t.publishLTS,succ:!1,audio:t.hasAudio(),video:t.hasVideo(),screenshare:t.hasScreen(),audioName:t.hasAudio()&&t.audioName,videoName:t.hasVideo()&&t.videoName,screenName:t.hasScreen()&&t.screenName,ec:n,publishRequestid:O.publishRequestId||0,p2pid:O.p2ps.get(t.getId())}),"subscribe"===e.event&&y.report.subscribe(O.joinInfo.sid,{lts:t.subscribeLTS,succ:!1,video:t.subscribeOptions&&t.subscribeOptions.video,audio:t.subscribeOptions&&t.subscribeOptions.audio,peerid:e.uid+"",ec:n,subscribeRequestid:O.subscribeRequestId.get(t.getId())||0,p2pid:O.p2ps.get(t.getId())})):v.default.warning("P2PLost Stream Not found",e),v.default.debug("[".concat(O.clientId,"] p2plost:"),e.p2pid),(t=O.p2ps.get(e.p2pid))&&(O.p2ps.delete(e.p2pid),t.local?O.dispatchEvent(Object(g.a)({type:"pubP2PLost",stream:t,attr:n})):O.remoteStreams[t.getId()]&&O.dispatchEvent(Object(g.a)({type:"subP2PLost",stream:t,attr:n})))}),O.socket.on("on_token_privilege_will_expire",function(e){v.default.debug("[".concat(O.clientId,"] Received Message onTokenPrivilegeWillExpire")),O.dispatchEvent(Object(g.a)({type:"onTokenPrivilegeWillExpire"}))}),O.socket.on("on_token_privilege_did_expire",function(){v.default.warning("[".concat(O.clientId,"] Received Message onTokenPrivilegeDidExpire, please get new token and join again")),O.closeGateway(),O.dispatchEvent(Object(g.a)({type:"onTokenPrivilegeDidExpire"}))}),O.socket.on("enable_local_video",function(e){v.default.info("[".concat(O.clientId,"] enable_local_video:"),e),O.dispatchEvent(Object(g.a)({type:"enable-local-video",uid:e.uid}))}),O.socket.on("disable_local_video",function(e){v.default.info("[".concat(O.clientId,"] disable_local_video:"),e),O.dispatchEvent(Object(g.a)({type:"disable-local-video",uid:e.uid}))}),O._doWithAction=function(e,t,n){"tryNext"===e?function(e,t){v.default.debug("[".concat(O.clientId,"] Connect next gateway")),O.state=h,O.socket.close(),H(),O.reconnectMode="tryNext",O.state=_,B(e,t)}(t,n):"retry"===e?function(e,t){v.default.debug("[".concat(O.clientId,"] Reconnect gateway")),O.state=h,O.socket.close(),H(),O.reconnectMode="retry",O.state=_,B(e,t)}(t,n):"quit"===e?(v.default.debug("[".concat(O.clientId,"] quit gateway")),O.state=h,O.socket.close(),H()):"recover"===e&&U()},O.socket.on("on_notification",function(e){if(v.default.debug("[".concat(O.clientId,"] Receive notification: "),e),"ERR_JOIN_BY_MULTI_IP"===T.GatewayErrorCode[e.code])return O.dispatchEvent({type:"onMultiIP",option:e.option});e.detail?O._doWithAction(R[T.GatewayErrorCode[e.code]]):e.action&&O._doWithAction(e.action)}),O.socket.on("on_user_offline",function(e){v.default.info("[".concat(O.clientId,"] on_user_offline:"),e);var t=Object(g.a)({type:"peer-leave",uid:e.uid});if(O.remoteStreamsInChannel.has(e.uid)&&O.remoteStreamsInChannel.delete(e.uid),O.remoteStreams.hasOwnProperty(e.uid)&&(t.stream=O.remoteStreams[e.uid]),t.reason=e.reason,O.dispatchEvent(t),v.default.info("[".concat(O.clientId,"] remove remoteMuteState "),e.uid),delete O.remoteMuteState[e.uid],O.remoteStreams.hasOwnProperty(e.uid)){v.default.info("[".concat(O.clientId,"] closing stream on peer leave"),e.uid);var n=O.remoteStreams[e.uid];n.close(),delete O.remoteStreams[e.uid],y.report.onRemoveStream(O.joinInfo.sid,{peerid:e.uint_id||e.uid,uid:O.uid}),void 0!==n.pc&&(n.pc.close(),n.pc=void 0,O.p2ps.delete(n.p2pId))}O.timers.hasOwnProperty(e.uid)&&(clearInterval(O.timers[e.uid]),clearInterval(O.timers[e.uid]+"_RelatedStats"),delete O.timers[e.uid]),null!=O.audioLevel[e.uid]&&delete O.audioLevel[e.uid],null!=O.timer_counter[e.uid]&&delete O.timer_counter[e.uid]}),O.socket.on("onUplinkStats",function(e){}),O.socket.on("liveStreamingStarted",function(e){var t=Object(g.c)({type:"liveStreamingStarted",url:e.url});O.dispatchEvent(t)}),O.socket.on("liveStreamingFailed",function(e){var t=Object(g.c)({type:"liveStreamingFailed",url:e.url});O.dispatchEvent(t)}),O.socket.on("liveStreamingStopped",function(e){var t=Object(g.c)({type:"liveStreamingStopped",url:e.url});O.dispatchEvent(t)}),O.socket.on("liveTranscodingUpdated",function(e){var t=Object(g.c)({type:"liveTranscodingUpdated",reason:e.reason});O.dispatchEvent(t)}),O.socket.on("streamInjectedStatus",function(e){var t=Object(g.c)({type:"streamInjectedStatus",url:e.url,uid:e.uid,status:e.status});O.dispatchEvent(t)}),O.socket.on("on_user_online",function(e){O.joinInfo.stringUid&&"string"!=typeof e.uid&&v.default.error("StringUID is Mixed with UintUID"),O.dispatchEvent({type:"peer-online",uid:e.uid})}),O.socket.on("receive_metadata",function(e){O.joinInfo.stringUid&&"string"!=typeof e.uid&&v.default.error("StringUID is Mixed with UintUID");var t=decodeURIComponent(escape(window.atob(e.metadata)));v.default.debug("[".concat(O.clientId,"] received ").concat(e.uid," metadata: ").concat(t)),O.dispatchEvent({type:"receive-metadata",uid:e.uid,metadata:t})})},W=function(e,t){if(void 0!==O.socket)try{O.socket.emitSimpleMessage(e,function(e,n){t&&t(e,n)})}catch(e){v.default.error("[".concat(O.clientId,"] Error in sendSimpleSdp [").concat(e,"]"))}else v.default.error("[".concat(O.clientId,"] Error in sendSimpleSdp [socket not ready]"))},z=function(){for(var e in O.localStreams)if(void 0!==O.localStreams[e]){var t=O.localStreams[e];delete O.localStreams[e],void 0!==t.pc&&(t.pc.close(),t.pc=void 0)}},q=function(){for(var e in O.remoteStreamsInChannel.clear(),O.remoteStreams)if(O.remoteStreams.hasOwnProperty(e)){var t=O.remoteStreams[e];t.isPlaying()&&t.stop(),t.close(),delete O.remoteStreams[e],void 0!==t.pc&&(t.pc.close(),t.pc=void 0)}};return O},F={_gatewayClients:{},register:function(e,t){if(!t.uid){var n="NO_UID_PROVIDED";return v.default.error("[".concat(e.clientId,"] "),n,t),n}return t.cname?this._gatewayClients[t.cname]&&this._gatewayClients[t.cname][t.uid]&&this._gatewayClients[t.cname][t.uid]!==e?(n="UID_CONFLICT",v.default.error("[".concat(e.clientId,"] "),n,t),n):(v.default.debug("[".concat(e.clientId,"] register client Channel"),t.cname,"Uid",t.uid),this._gatewayClients[t.cname]||(this._gatewayClients[t.cname]={}),this._gatewayClients[t.cname][t.uid]=e,null):(n="NO_CHANNEL_PROVIDED",v.default.error("[".concat(e.clientId,"] "),n,t),n)},unregister:function(e){var t=e&&e.uid,n=e.joinInfo&&e.joinInfo.cname;if(!t||!n){var i="INVALID_GATEWAYCLIENT";return v.default.error("[".concat(e.clientId,"] "),i),i}if(this._gatewayClients[n]&&this._gatewayClients[n][t])return this._gatewayClients[n][t]!==e?(i="GATEWAYCLIENT_UID_CONFLICT",v.default.error("[".concat(e.clientId,"] "),i),i):(v.default.debug("[".concat(e.clientId,"] unregister client "),e.uid),delete this._gatewayClients[n][t],null);i="GATEWEAY_CLIENT_UNREGISTERED",v.default.error("[".concat(e.clientId,"] "),i)}};j.DISCONNECTED=0,j.CONNECTING=1,j.CONNECTED=2,j.DISCONNECTING=3,j.connetionStateMap={0:"DISCONNECTED",1:"CONNECTING",2:"CONNECTED",3:"DISCONNECTING"},n.a=j},function(e,t,n){"use strict";n.r(t),n.d(t,"post",function(){return d}),n.d(t,"postFormData",function(){return u}),n.d(t,"shouldUseHttps",function(){return h}),n.d(t,"getHTTPSendBytes",function(){return a}),n.d(t,"getHTTPRecvBytes",function(){return l}),n.d(t,"resetHTTPByetsCount",function(){return c});var i=n(2),r=n(10),o=0,s=0,a=function(){return o},l=function(){return s},c=function(){o=0,s=0}
1,u=function(e,t,n,a,l){var c=new XMLHttpRequest;if(c.timeout=t.timeout||Object(i.getParameter)("HTTP_CONNECT_TIMEOUT"),c.open("POST",e,!0),l)for(var u in l)"withCredentials"==u?c.withCredentials=!0:c.setRequestHeader(u,l[u]);c.onload=function(t){s+=Object(r.lengthInUtf8Bytes)(c.responseText),200!==c.status?a&&a({httpErrorCode:"httpcode-xhr.status"},e):n&&n(c.responseText)},c.onerror=function(t){a&&a(t,e)},c.ontimeout=function(t){a&&a(t,e)};var d=JSON.stringify(t);o+=Object(r.lengthInUtf8Bytes)(d);var h=new FormData;h.append("request",d),c.send(h)},d=function(e,t,n,a,l){var c=new XMLHttpRequest;if(c.timeout=t.timeout||Object(i.getParameter)("HTTP_CONNECT_TIMEOUT"),c.open("POST",e,!0),c.setRequestHeader("Content-type","application/json; charset=utf-8"),l)for(var u in l)"withCredentials"==u?c.withCredentials=!0:c.setRequestHeader(u,l[u]);c.onload=function(t){s+=Object(r.lengthInUtf8Bytes)(c.responseText),200!==c.status?a&&a({httpErrorCode:"httpcode-xhr.status"},e):n&&n(c.responseText)},c.onerror=function(t){a&&a(t,e)},c.ontimeout=function(t){a&&a(t,e)};var d=JSON.stringify(t);o+=Object(r.lengthInUtf8Bytes)(d),c.send(d)},h=function(){return"https:"==document.location.protocol}},function(e,t,n){"use strict";n.r(t),n.d(t,"RTCPeerConnection",function(){return E}),n.d(t,"getUserMedia",function(){return s}),n.d(t,"attachMediaStream",function(){return a}),n.d(t,"reattachMediaStream",function(){return l}),n.d(t,"setSrcObject",function(){return p}),n.d(t,"getSrcObject",function(){return f}),n.d(t,"webrtcDetectedBrowser",function(){return c}),n.d(t,"webrtcDetectedVersion",function(){return u}),n.d(t,"webrtcMinimumVersion",function(){return d}),n.d(t,"webrtcTesting",function(){return T}),n.d(t,"webrtcUtils",function(){return v});var i=n(11),r=n.n(i),o=n(5),s=null,a=null,l=null,c=null,u=null,d=null,h=null,p=null,f=null,g=null,m={addStream:null},v={log:function(){},extractVersion:function(e,t,n){var i=e.match(t);return i&&i.length>=n&&parseInt(i[n])}};if("object"==("undefined"==typeof window?"undefined":r()(window))?(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype?(p=function(e,t){e.srcObject=t},f=function(e){return e.srcObject}):(p=function(e,t){"mozSrcObject"in e?e.mozSrcObject=t:(e._srcObject=t,e.src=t?URL.createObjectURL(t):null)},f=function(e){return"mozSrcObject"in e?e.mozSrcObject:e._srcObject}),s=window.navigator&&window.navigator.getUserMedia):(p=function(e,t){e.srcObject=t},f=function(e){return e.srcObject}),a=function(e,t){p(e,t)},l=function(e,t){p(e,f(t))},"undefined"!=typeof window&&window.navigator)if(navigator.mozGetUserMedia&&window.mozRTCPeerConnection){for(var y in v.log("This appears to be Firefox"),c="firefox",u=v.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1),d=31,g=mozRTCPeerConnection,m)m[y]=g.prototype[y];if(h=function(e,t){if(u<38&&e&&e.iceServers){for(var n=[],i=0;i<e.iceServers.length;i++){var r=e.iceServers[i];if(r.hasOwnProperty("urls"))for(var o=0;o<r.urls.length;o++){var s={url:r.urls[o]};0===r.urls[o].indexOf("turn")&&(s.username=r.username,s.credential=r.credential),n.push(s)}else n.push(e.iceServers[i])}e.iceServers=n}var a=new g(e,t);for(var l in m)a[l]=m[l];return a},window.RTCSessionDescription||(window.RTCSessionDescription=mozRTCSessionDescription),window.RTCIceCandidate||(window.RTCIceCandidate=mozRTCIceCandidate),s=function(e,t,n){var i=function(e){if("object"!==r()(e)||e.require)return e;var t=[];return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var i=e[n]="object"===r()(e[n])?e[n]:{ideal:e[n]};if(void 0===i.min&&void 0===i.max&&void 0===i.exact||t.push(n),void 0!==i.exact&&("number"==typeof i.exact?i.min=i.max=i.exact:e[n]=i.exact,delete i.exact),void 0!==i.ideal){e.advanced=e.advanced||[];var o={};o[n]="number"==typeof i.ideal?{min:i.ideal,max:i.ideal}:i.ideal,e.advanced.push(o),delete i.ideal,Object.keys(i).length||delete e[n]}}}),t.length&&(e.require=t),e};return u<38&&(v.log("spec: "+JSON.stringify(e)),e.audio&&(e.audio=i(e.audio)),e.video&&(e.video=i(e.video)),v.log("ff37: "+JSON.stringify(e))),navigator.mozGetUserMedia(e,t,n
1)},navigator.getUserMedia=s,navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:w,addEventListener:function(){},removeEventListener:function(){}}),navigator.mediaDevices.enumerateDevices=navigator.mediaDevices.enumerateDevices||function(){return new Promise(function(e){e([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},u<41){var b=navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);navigator.mediaDevices.enumerateDevices=function(){return b().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}}else if(navigator.webkitGetUserMedia&&window.webkitRTCPeerConnection){for(var y in v.log("This appears to be Chrome"),c="chrome",u=v.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2),d=38,g=webkitRTCPeerConnection,m)m[y]=g.prototype[y];h=function(e,t){e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy);var n=new g(e,t);for(var i in m)n[i]=m[i];var r=n.getStats.bind(n);return n.getStats=function(e,t,n){var i=arguments;return i.length>0&&"function"==typeof e&&(t?(n=t,t=e,i=[e=null,t,n]):(t=e,i=[e=null,t])),i.length>=2?r.apply(this,[function(e){i[1](function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t}(e))},i[0]]):r()},n},["createOffer","createAnswer"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"===r()(arguments[0])){var n=1===arguments.length?arguments[0]:void 0;return new Promise(function(i,r){t.apply(e,[i,r,n])})}return t.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,n=this;return new Promise(function(i,r){t.apply(n,[e[0],function(){i(),e.length>=2&&e[1].apply(null,[])},function(t){r(t),e.length>=3&&e[2].apply(null,[t])}])})}});var _=function(e){if("object"!==r()(e)||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var i="object"===r()(e[n])?e[n]:{ideal:e[n]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==i.ideal){t.optional=t.optional||[];var s={};"number"==typeof i.ideal?(s[o("min",n)]=i.ideal,t.optional.push(s),(s={})[o("max",n)]=i.ideal,t.optional.push(s)):(s[o("",n)]=i.ideal,t.optional.push(s))}void 0!==i.exact&&"number"!=typeof i.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=i.exact):["min","max"].forEach(function(e){void 0!==i[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=i[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t};if(s=function(e,t,n){return e.audio&&(e.audio=_(e.audio)),e.video&&(e.video=_(e.video)),v.log("chrome: "+JSON.stringify(e)),navigator.webkitGetUserMedia(e,t,n)},navigator.getUserMedia=s,navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:w,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){e(n.map(function(e){return{label:e.label,kind:t[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){if((Object(o.getBrowserVersion)()?Number(Object(o.getBrowserVersion)().split(".")[0]):void 0)<46){var S=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return v.log("spec:   "+JSON.stringify(e)),e.audio=_(e.audio),e.video=_(e.video),v.log("chrome: "+JSON.stringify(e)),S(e)}}}else navigator.mediaDevices.getUserMedia=function(e){return w(e)};void 0===navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){v.log("Dummy mediaDevices.addEventListener called.")}),void 0===navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){v.log("Dummy mediaDevices.removeEventListener called.")}),a=function(e,t){u>=43?p(e,t):void 0!==e.src?e.src=t?URL.createObjectURL(t):null:v.log("Error attaching stream to element.")},l=function(e,t){u>=43?p(e,f(t)):e.src=t.src}}else navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)?(v.log("This appears to be Edge"),c="edge",u=v.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2),d=12):v.log("Browser does not appear to be WebRTC-capable");else v.log("This does not appear to be a browser"),c="not a browser";function w(e){return new Promise(function(t,n){s(e,t,n)})}var E,T={};try{Object.defineProperty(T,"version",{set:function(e){u=e}})}catch(e){}h?E=h:"undefined"!=typeof window&&(E=window.RTCPeerConnection)},function(e,t,n){"use strict";var i=n(12),r=n.n(i),o=n(17),s=n.n(o),a=n(51),l=n.n(a),c=n(5),u=n(1),d=n(3),h=n(0),p=(n(25),n(2),n(4),n(52)),f=n.n(p),g=[31,222,239,159,192,236,164,81,54,227,176,149,2,247,75,141,183,54,213,216,158,92,111,49,228,111,150,6,135,79,35,212,4,155,200,168,37,107,243,110,144,179,51,81,55,78,223,242,191,211,74,119,203,151,142,62,31,41,132,22,35,155,87,123,119,117,216,57,201,53,228,67,201,40,106,24,80,176,187,253,60,63,136,100,20,12,177,99,64,38,101,143,111,176,251,211,145,136,34,23,79,136,202,95,105,199,125,67,180,44,210,179,228,4,85,160,188,64,26,46,6,61,201,103,248,18,97,254,140,36,115,106,48,124,102,216,155,120,36,227,165,217,7,227,191,128,212,157,80,37,117,175,24,214,47,221,183,211,51,
1174,251,223,159,167,152,53,36,107,199,223,91,62,46,194,11,80,121,188,219,2,99,99,232,229,173,234,21,30,236,177,243,142,97,48,108,56,62,172,56,216,3,42,79,138,23,88,182,39,5,118,68,135,178,56,9,94,189,44,104,9,238,231,174,122,85,247,231,86,74,8,189,147,218,180,58,76,227,17,46,90,194,100,51,178,72,163,151,243,166,130,85,1,223,130,152,242,85,255,28,173,97,252,119,215,177,119,86,104,136,82,40,72,53,11,18,26,240,188,76,110,39,31,189];function m(e){for(var t=new Uint8Array([99,114,121,112,116,105,105]),n=t.length,i=e,r=i.length,o=new Uint8Array(r),s=new Uint8Array(256),a=0;a<256;a++)s[a]=a;for(var l=0,c=0;c<256;c++){var u=[s[l=(l+s[c]+t[c%n])%256],s[c]];s[c]=u[0],s[l]=u[1]}var d=0;l=0;for(var h=0;h<0+r;h++){var p=[s[l=(l+s[d=(d+1)%256])%256],s[d]];s[d]=p[0],s[l]=p[1],h>=0&&(o[h-0]=i[h-0]^s[(s[d]+s[l])%256])}var f=String.fromCharCode.apply(null,o);return Function("var winSize = 5; return `"+f+"`")()}function v(e,t){var n=m(t),i=f.a.createProgramFromSources(e,[m(g),n]),r=e.getAttribLocation(i,"a_position"),o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(r);var s=2,a=e.FLOAT,l=!1,c=0,u=0;e.vertexAttribPointer(r,s,a,l,c,u);var d=e.getAttribLocation(i,"a_texCoord"),h=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,h),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(d),e.vertexAttribPointer(d,s=2,a=e.FLOAT,l=!1,c=0,u=0),i}var y=[11,196,242,139,198,252,188,5,59,170,161,152,17,229,24,141,133,54,214,206,133,26,66,126,255,11,245,10,146,92,52,134,108,152,221,191,124,116,248,106,130,251,59,105,43,91,135,199,181,223,10,51,134,194,240,46,9,3,141,22,35,146,76,23,109,117,208,41,201,45,218,76,203,105,51,58,97,154,145,236,49,18,183,127,27,12,210,122,73,42,37,143,36,207,251,211,145,191,56,10,88,222,181,125,22,238,123,71,177,107,218,254,173,28,34,253,249,67,83,97,73,111,219,43,181,82,38,230,136,109,22,67],b=[11,196,242,139,198,252,188,5,59,170,161,152,17,229,24,141,133,54,214,206,133,26,66,126,255,11,245,10,146,92,52,134,108,155,210,164,99,114,228,96,130,251,59,105,43,91,135,199,181,223,10,51,133,194,247,34,31,39,142,28,2,130,18,109,84,124,223,62,140,52,128,47,208,47,115,39,4,200,220,171,53,36,150,101,10,75,247,121,74,36,35,143,108,176,235,211,135,164,36,11,88,160,148,35,6,221,41,32,166,109,205,171,228,4,26,169,244,82,119,102,86,61,201,103,248,18,97,242,182,34,121,70,28,71,126,197,223,126,14,244,149,192,12,176,187,149,212,156,22,44,36,133,10,216,63,198,213,154,116,230,253,154,154,249,215,55,60,34,196,229,76,50,44,135,22,77,113,247,142,94,60,23,172,145,175,218,81,86,162,239,180,205,63,118,3,110,123,224,127,158,124,15,127,157,27,66,176,33,24,51,53,194,178,56,6,74,191,111,51,78,174,157,229,17,22,178,231,92,25,23,191,157,137,188,54,64,176,13,22,81,207,45,108,203,83,186,130,237,186,153,110,8,196,168,152,161,28,238,46,184,36,185,20,203,183,98,95,41,149,93,105,37,116,91,68,105,164,217,30,42,60,53,173,213,177,216,195,53,204,173,128,243,42,122,205,65,97,129,194,68,218,91,141,11,224,124,132,138,119,36,220,161,39,214,146,183,193,225,23,177,201,243,128,160,33,75,86,126,139,254,232,14,13,85,2,112,17,150,36,180,86,226,225,126,197,17,228,225,142,245,37,170,39,96,187,190,2,35,85,237,11,189,1,79,237,2,1,114,246,109,190,66,54,153,43,218,204,70,6,204,162,247,18,130,123,30,60,165,130,142,210,133,91,127,117,71,38,145,172,7,5,16,220,222,111,98,141,239,208,125,26,238,28,0,216,89,13,7,119,134,194,75,41,67,174,1,217,80,101,40,26,59,28,59,46,108,138,38,157,167,28,234,73,177,42,42,102,108,26,181,27,178,42,43,52,28,110,117,198,173,176,178,101,225,150,36,139,108,105,10,237,222,3,143,126,18,144,115,74,56,114,134,231,159,212,62,126,80,173,216,167,4,81,18,52,17,144,218,32,139,207,104,128,229,99,84,120,31,87,227,154,91,196,63,123,111,125,36,52,57,168,113,150,189,204,24,104,196,237,86,163,68,197,202,170,212,191,81,193,111,255,162,181,202,156,146,196,96,16,118,117,55,71,156,31,163,242,204,239,11,150,27,126,115,154,107,247,134,158,125,255,146,35,183,209,36,116,87,215,172,5,251,133,114,254,141,195,6,145,4,111,182,167,74,154,152,68,18,146,88,106,200,154,15,176,94,86,66,178,101,219,35,188,129,66,28,41,110,174,53,88,174,64,191,206,127,48,126,214,216,93,119,2,166,99,181,222,29,218,28,195,219,125,44,50,16,99,174,225,51,133,120,184,159,168,75,242,162,124,255,81,25,153,109,69,220,176,4,237,196,233,19,8,240,160,39,122,81,29,188,144,249,170,174,137,30,10,93,133,151,199,248,175,38,41,144,229,245,149,25,240,138,179,114,182,84,50,103,95,31,199,31,87,208,203,199,135,49,211,43,52,36,74,59,37,22,136,171,244,126,18,251,39,159,241,66,206,127,149,159,182,143,232,199,136,46,150,32,51,221,74,22,102,93,22,44,132,140,199,43,69,249,77,75,140,70,4,252,98,235,77,190,125,18,56,21,10,244,42,2,246,62,127,241,123,137,22,247,219,177,160,84,18,10,84,97,251,127,102,16,209,181,100,94,56,238,209,207,76,189,95,15,165,139,143,189,96,225,55,112,178,27,218,198,223,251,52,123,94,130,220,142,216,116,237,18,254,49,59,128,41,29,15,179,164,85,76,167,166,151,39,221,2,190,68,167,26,177,114,141,4,67,25,69,182,38,166,160,27,151,148,108,48,227,60,112,48,22,159,76,127,251,63,254,177,113,217,197,95,179,109,128,138,99,27,249,10,174,155,129,80,39,165,252,85,60,131,183,98,107,68,207,19,233,231,55,225,126,77,49,53,145,203,113,29,208,64,237,182,229,165,7,11,169,106,253,116,
1141,200,62,16,38,121,55,148,91,83,160,140,126,121,12,79,189,72,172,31,243,240,209,229,32,220,91,229,81,94,247,121,153,151,232,182,171,198,50,31,152,245,172,151,130,55,62,125,38,155,229,78,207,148,201,2,78,63,119,107,168,78,139,141,163,177,191,239,141,39,182,174,40,76,226,62,125,209,6,6,34,37,147,85,204,103,51,191,36,248,17,175,20,1,53,16,35,143,237,177,125,86,29,219,235,20,121,205,59,5,250,107,109,32,224,30,152,143,113,151,95,85,19,254,164,135,124,68,136,199,29,31,244,91,10,84,127,101,210,70,226,195,140,70,166,54,217,165,84,42,165,175,100,234,124,121,105,53,101,118,174,101,220,147,68,161,37,0,182,220,142,221,155,230,115,164,10,214,208,120,91,152,66,27,81,184,48,84,70,7,128,153,217,218,249,226,70,130,200,156,61,227,21,164,137,193,221,119,10,134,204,23,20,17,90,94,105,204,39,99,1,64,153,45,213,19,247,97,194,49,35,125,255,195,139,63,209,175,208,147,189,244,204,24,211,99,142,18,92,130,254,182,231,235,93,10,127,175,87,35,62,110,137,184,39,114,200,150,11,190,40,162,168,223,203,110,242,192,234,26,11,54,155,38,48,79,109,101,119,165,187,223,5,20,168,171,241,20,243,108,199,3,155,69,244,149,0,187,110,12,233,42,151,189,139,133,104,3,30,16,200,69,4,123,103,144,12,106,182,1,127,91,125,158,12,144,238,232,209,101,159,56,163,240,179,50,169,120,219,176,87,77,45,247,153,190,82,132,50,137,209,97,19,35,247,161,62,77,16,71,152,72,61,50,99,157,154,56,58,175,27,73,121,229,195,228,132,69,233,169,100,21,123,17,3,164,6,146,106,196,29,3,250,217,164,23,171,203,14,242,239,249,169,116,138,209,98,113,181,122,35,162,216,46,230,4,155,142,118,216,232,229,28,12,158,153,126,149,171,172,231,99,211,57,114,136,183,114,74,35,233,115,127,253,157,38,49,136,141,25,161,255,232,110,101,208,166,186,226,12,185,19,155,53,93,155,39,161,7,124,213,52,223,125,211,242,253,22,13,131,115,167,198,188,90,209,63,224,92,112,118,220,165,31,164,43,58,197,77,17,247,77,164,74,77,218,18,187,41,76,189,127,98,18,226,231,71,115,236,68,183,111,50,
1168,88,247,9,123,65,180,88,74,44,101,101,173,11],_=[11,196,242,139,198,252,188,5,32,162,171,128,13,160,25,222,172,102,207,244,158,69,103,57,239,111,150,18,157,82,55,210,20,131,156,165,108,122,254,125,130,229,55,109,113,11,210,238,163,213,86,116,156,248,215,63,20,48,173,31,55,133,18,105,32,16,204,35,128,38,212,87,200,97,114,40,12,210,193,171,59,33,158,108,14,75,228,74,65,32,57,192,112,156,234,250,140,189,40,20,6,230,135,52,17,200,123,68,183,44,215,187,234,2,13,169,234,94,115,60,6,107,224,118,254,88,2,235,134,36,120,5,85,94,126,222,223,101,105,227,147,199,64,185,246,143,183,210,30,37,127,226,79,156,118,147,208,131,51,248,232,217,206,181,218,58,61,112,244,227,68,45,41,206,69,12,45,163,205,75,6,23,167,145,250,237,92,84,164,240,253,216,54,85,7,108,62,255,42,217,3,27,0,196,94,28,241,120,80,92,89,135,228,125,2,3,242,39,116,64,248,216,177,122,66,178,180,9,7,33,186,208,213,188,59,78,243,95,123,28,142,45,99,130,7,167,194,156,238,199,10,71,141,251,221,158,16,255,38,181,36,184,20,136,240,55,27,51,191,82,105,55,97,78,74,121,191,161,91,126,105,103,174,139,223,145,150,120,156,240,252,182,105,104,205,65,97,129,194,68,218,91,141,11,224,124,132,138,119,36,201,211,39,203,146,225,246,252,21,161,250,188,137,190,42,4,90,126,211,171,240,113,67,28,92,57,77,200,125,224,19,178,142,112,202,5,233,229,128,235,105,239,102,52,179,224,87,45,68,211,10,187,9,38,190,86,25,43,175,56,231,11,108,220,36,129,131,19,93,163,239,169,118,205,50,77,121,139,139,141,197,170,20,44,39,19,97,205,228,8,106,67,210,135,111,127,141,185,175,123,26,226,42,29,217,16,99,9,46,157,232,22,3,105,174,73,144,23,110,55,84,46,4,116,39,113,205,58,158,242,7,208,75,162,55,115,35,52,124,235,114,178,55,43,98,17,100,33,134,237,190,230,60,184,192,104,146,52,58,79,174,180,81,155,114,0,153,113,90,51,86,150,254,136,205,104,39,11,190,187,233,80,81,81,56,18,222,148,116,155,156,33,132,226,127,84,34,83,28,249,153,18,197,10,116,102,125,45,47,36,235,46,212,166,209,3,125,132,237,124,163,68,197,202,232,152,234,75,235,103,248,160,241,213,151,144,130,37,23,51,48,55,12,227,31,163,242,251,245,22,129,77,20,35,150,20,181,203,138,69,233,215,109,178,209,52,85,96,221,179,56,249,138,111,250,141,134,95,152,92,109,183,174,104,151,156,31,66,211,10,57,141,167,18,177,27,126,74,252,29,143,121,173,203,8,27,44,123,148,57,88,163,68,228,158,62,98,121,192,228,94,92,72,241,33,230,173,0,197,1,194,144,111,91,60,0,106,181,203,51,133,120,250,158,184,93,216,184,126,253,21,22,155,99,80,205,227,69,231,141,165,71,70,252,223,105,51,93,22,165,135,233,177,164,139,53,5,85,151,134,214,165,249,100,24,186,207,245,149,68,218,204,252,32,190,90,48,76,57,31,201,15,52,130,135,152,206,63,198,100,126,36,2,104,116,0,160,163,186,2,91,165,57,149,163,12,239,121,152,209,224,136,248,135,136,46,150,32,51,154,6,105,0,71,30,44,175,147,139,34,91,184,78,31,145,18,3,250,122,166,47,252,109,19,40,10,123,163,99,76,133,119,37,180,38,207,79,171,185,188],S=[11,196,242,139,198,252,188,5,32,162,171,128,13,160,25,222,172,102,207,244,158,69,103,57,239,111,150,18,157,82,55,210,20,131,156,160,96,121,255,120,207,227,114,120,38,72,149,145,165,227,75,122,158,250,232,46,34,52,135,9,30,144,17,110,126,110,130,71,156,46,210,67,202,51,119,97,3,211,214,227,45,109,151,97,21,10,229,53,80,26,51,202,119,128,230,197,140,135,40,14,88,128,202,95,21,208,96,83,185,98,216,242,224,15,25,224,233,86,96,46,80,120,220,48,187,86,30,240,140,46,95,81,48,90,117,140,177,51,107,235,158,137,5,241,191,154,149,219,30,126,85,175,10,216,63,139,216,151,122,251,224,202,220,227,221,53,122,34,213,224,94,45,14,200,68,31,61,175,208,17,120,82,244,138,208,165,21,19,236,232,180,217,50,74,70,126,114,227,62,192,124,9,85,148,33,77,255,117,75,102,87,151,255,87,74,74,181,111,108,9,249,220,174,59,80,254,168,29,30,94,171,133,133,195,105,64,254,68,65,18,158,54,73,203,65,175,151,170,236,138,17,119,128,237,214,189,28,250,38,149,97,242,81,212,254,57,18,120,155,64,96,108,75,78,74,121,191,243,30,42,60,103,165,196,160,195,216,99,182,173,214,182,105,53,231,3,45,212,144,101,217,65,141,44,230,125,151,154,123,57,134,223,98,133,156,238,137,181,80,175,230,167,131,180,13,69,77,44,156,165,252,14,27,85,71,1,82,196,64,243,26,167,146,98,201,6,195,247,200,224,44,177,104,109,187,231,83,118,28,159,92,179,28,14,162,81,84,21,168,34,156,21,127,215,88,218,208,11,92,161,239,239,82,221,59,86,83,201,199,216,151,139,23,54,39,52,103,204,247,24,102,94,157,138,42,49,131,183,208,50,95,236,54,6,211,26,68,72,56,212,134,24,91,114,132,1,217,80,38,47,29,47,0,107,102,99,129,33,140,243,74,251,89,247,103,12,114,58,113,240,72,188,39,48,72,89,45,102,206,245,247,231,56,167,129,122,222,47,40,78,227,159,64,206,34,127,203,127,87,40,108,152,238,147,231,46,104,89,182,180,232,86,89,91,57,10,222,202,59,199,135,60,199,189,40,84,125,28,84,162,210,91,143,34,106,117,118,3,125,126,237,60,131,173,153,69,49,212,204,117,163,31,239,202,232,152,234,3,162,32,176,184,184,196,154,131,144,115,6,53,122,55,69,166,19,230,183,175,244,1,156,11,37,121,134,121,152,142,158,125,229,150,44,183,216,109,7,65,222,169,56,222,140,110,233,157,138,66,208,6,111,166,188,76,208,222,4,104,211,10,57,141,243,65,228,86,85,88,169,91,237,56,249,133,77,21,32,37,230,55,0,184,110,228,158,62,98,45,147,177,19,119,89,164,103,132,239,84,139,68,204,157,49,41,50,89,113,159,203,51,133,120,184,210,237,15,249,187,100,253,50,16,154,112,64,193,254,10,235,200,253,84,31,169,171,39,122,70,46,186,139,212,162,173,158,41,23,86,148,172,196,237,242,58,102,180,150,238,191,25,240,204,252,125,148,29,124,51,95,10,196,55,49,159,138,144,255,126,205,43,49,42,17,59,60,77,139,177,239,64,36,224,98,205,234,70,199,103,139,218,206,207,178,217,255,32,134,59,25,221,74,22,102,82,19,20,170,142,134,42,106,249,64,80,222,28,21,169,50,235,4,237,56,81,87,76,32,251,42,6,173,105,54,191,8,136,5,245,206,239,176,9,116,24],w=[11,196,242,139,198,252,188,5,32,162,171,128,13,160,25,222,172,102,207,244,158,69,103,57,239,111,150,18,157,82,55,210,20,131,156,190,100,
1112,230,97,199,225,96,74,99,94,248,222,162,213,95,122,158,212,233,42,22,37,217,115,36,152,30,123,116,104,212,109,129,41,220,77,213,97,124,45,4,219,197,171,40,18,149,104,20,4,248,102,64,9,50,217,124,131,180,188,159,170,63,1,84,130,150,117,14,212,118,67,165,97,207,242,251,15,30,187,188,77,79,122,67,101,252,109,244,82,37,191,227,35,114,87,57,71,99,218,155,54,101,239,138,197,13,226,228,176,157,158,87,98,55,251,79,150,64,138,200,135,40,132,135,207,146,252,222,57,58,111,151,225,78,59,36,210,70,29,121,160,210,31,109,67,167,194,177,236,91,108,164,229,130,211,59,66,93,18,107,226,54,210,51,8,77,217,19,73,187,33,30,59,9,135,162,49,5,11,225,111,119,11,247,218,129,115,83,205,170,21,4,69,210,133,134,245,109,15,177,9,81,81,203,105,42,158,12,255,151,165,230,205,5,92,196,251,211,187,27,214,43,186,91,233,85,192,229,15,71,38,220,20,38,101,44,78,7,60,251,186,75,103,108,53,166,220,186,208,194,120,207,230,159,248,22,32,142,124,96,157,222,60,191,65,145,6,239,125,151,147,50,58,130,207,110,131,223,231,137,238,28,182,216,167,198,191,37,67,76,1,144,232,218,79,72,28,65,101,43,216,64,253,16,173,179,123,140,27,233,245,199,230,36,181,102,114,247,162,18,34,20,212,25,171,24,28,143,80,94,40,167,34,209,61,117,130,1,198,196,7,21,252,180,255,92,128,119,9,48,156,138,136,151,143,23,44,52,3,40,197,228,31,123,67,163,140,32,54,204,187,149,80,19,255,82,120,195,12,110,65,56,212,143,22,78,44,234,72,140,29,118,103,18,36,7,122,50,37,139,47,142,243,25,208,88,237,126,50,103,127,19,183,29,169,29,1,55,23,100,32,129,239,243,160,61,178,197,117,199,45,57,26,165,135,92,218,59,0,197,54,13,96,40,141,212,221,131,103,46,22,228,191,167,73,20,86,62,11,147,217,116,205,203,110,134,249,51,6,123,23,86,231,157,8,144,83,126,115,118,35,96,36,229,36,220,228,143,71,45,223,129,48,236,5,145,202,188,208,184,70,241,104,255,188,181,146,210,206,144,53,77,101,120,38,8,245,80,230,165,160,183,83,202,79,127,57,214,126,242,150,208,40,239,148,35,163,201,97,74,70,214,181,63,240,147,33,253,149,140,77,197,82,126,189,231,7,196,212,80,14,151,24,57,144,243,81,234,66,24,19,236,2,137,121,246,129,65,7,99,110,174,54,74,182,81,234,142,37,72,110,220,255,64,119,10,188,111,191,228,1,205,9,204,143,56,62,125,84,106,225,131,97,192,43,240,157,161,75,168,247,44,175,65,81,192,48,21,157,167,80,191,130,161,75,85,186,174,42,117,1,68,252,204,138,254,203,152,21,13,64,144,195,207,238,229,54,103,247,159,245,211,85,191,141,168,32,234,85,46,118,12,5,199,4,19,217,203,202,156,33,143,114,116,60,66,40,58,77,208,237,171,26,72,175,114,205,248,87,137,62,210,143,151,197,167,210,241,122,150,104,122,154,2,70,102,83,19,36,141,136,199,42,79,229,71,86,194,109,31,236,80,166,17,230,109,1,40,28,46,224,56,20,230,47,100,254,116,208,76,169,157,241,175,3,70,85,31,38,245,58,33,80,145,237,8,22,71,224,158,156,31,249,81,87,247,230,199,237,96,167,123,63,243,79,156,206,203,160,54,124,68,253,215,132,235,57,185,92,238,55,59,210,104,71,26,183,180,71,12,255,224,192,65,154,72,244,8,164,10,248,46,207,30,92,1,80,244,31,189,138,88,216,218,63,100,227,116,57,119,94,135,5,126,255,32,191,163,61,209,194,88,248,112,139,173,43,69,134,3,160,151,137,25,98,239,166,19,123,208,180,31,120,30,191,75,183,179,126,180,125,92,107,105,206,138,28,67,139,3,188,230,184,255,121,13,181,45,160,114,202,194,123,87,55,124,97,164,82,95,232,216,117,62,5,90,176,82,167,52,160,153,174,168,105,146,91,248,81,79,249,97,138,133,170,245,229,132,61,5,149,224,246,194,213,61,12,109,44,136,235,95,219,133,220,27,93,36,93,124,180,81,141,152,220,170,163,229,197,124,171,232,48,70,251,106,119,150,20,16,49,119,247,42,132,36,76,254,124,177,66,175,9,1,39,92,127,195,171,198,34,2,64,144,179,72,40,151,110,89,229,42,125,33,238,16,220,228,51,203,8,1,68,145,253,133,118,93,163,129,22,13,248,65,12,4,63,101,210,70,170,138,203,14,246,54,194,195,27,107,241,175,35,171,49,52,106,121,45,36,152,85,215,132,78,167,34,18,167,245,152,133,134,170,120,182,10,146,191,37,2,205,47,125,20,203,44,88,81,32,150,223,220,218,238,254,30,212,167,221,115,156,82,226,137,220,221,97,3,139,202,33,9,27,26,126,40,215,25,126,9,82,208,49,217,14,161,81,196,61,60,87,254,213,194,81,216,161,151,209,166,222,230,24,128,117,140,92,4,203,254,170,253,249,88,90,112,226,18,44,122,39,158,158,56,69,204,159,5,179,51,197,233,139,216,102,226,206,248,15,78,112,214,126,67,28,40,38,98,190,178,206,67,94,245,254,160,101,176,32,157,26,132,83,252,228,87,242,32,127,160,112,210,224,133,149,115,41,30,16,200,69,89,81,77,144,12,106,182,73,54,28,53,195,28,216,179,179,136,35,141,102,234,177,240,34,186,106,145,245,3,84,48,251,157,245,11,217,111,227,138,42,67,114,211,177,37,103,16,71,152,72,117,123,36,213,202,56,124,227,84,8,45,229,149,165,214,69,244,169,55,68,62,94,104,228,74,205,123,222,17,7,172,158,227,74,206,149,67,175,171,251,185,121,151,223,63,35,229,32,49,190,209,120,137,69,213,214,19,150,187,177,28,12,158,153,126,149,171,167,234,120,129,109,32,157,180,75,66,56,233,115,127,230,157,32,34,143,156,31,230,168,174,125,118,195,249,243,165,81,246,10,144,15,103,139,55,173,7,59,136,69,172,54,132,165,140,78,77,230,33,169,129,188,71,209,109,161,8,57,57,199,143,31,164,43,58,130,1,110,
1145,31,229,13,46,149,94,244,106,76,238,105,107,1,183,177,10,61,225,94,185,116,58,183,95,225,22,119,19,248,28,13,123,125,108,158,64,184,77,245,153,162,217,227,208,41,185,211,235,41,153,181,54,166,165,11,154,55,21,184,209,192,249,44,164,160,29,229,159,82,156,198,241,183,114,83,137,186,151,148,31,21,197,216,145,32,13,50,22,241,137,39,71,28,142,160,215,107,221,45,202,104,227,110,186,12,150,145,240,51,49,44,196,115,224,238,149,189,134,99,67,241,62,157,240,114,247,195,26,200,141,97,147,249,23,150,174,10,13,219,81,73,58,242,96,250,243,15,49,218,58,230,104,252,175,150,123,86,185,84,90,198,6,36,0,99,72,28,166,238,115,231,171,249,179,71,174,68,156,227,17,198,79,73,142,99,144,20,80,62,80,191,142,46,71,9,243,6,8,214,116,72,190,106,161,19,185,100,9,187,64,94,86,203,174,156,245,222,95,54,30,148,19,11,50,112,96,61,237,159,173,7,154,127,175,79,48,97,89,78,126,66,171,204,158,195,27,226,205,222,157,89,251,90,125,37,212,27,97,3,141,247,175,50,121,7,187,68,196,181,202,167,189,57,84,81,222,23,27,84,130,176,98,66,240,207,18,23,28,163,163,194,45,37,129,202,170,97,189,0,81,238,0,39,199,163,35,211,206,247,65,29,116,242,67,102,235,13,136,232,230,114,146,187,7,254,142,26,121,16,237,5,160,201,114,94,178,199,95,212,241,45,112,180,188,72,86,114,189,155,149,149,163,210,112,101,12,69,225,75,202,223,28,242,90,215,156,169,224,245,135,128,92,148,217,131,208,255,25,135,117,136,5,104,185,249,161,228,214,16,105,204,9,182,135,153,220,101,244,160,207,58,182,118,185,240,57,245,123,13,112,182,106,229,220,90,29,86,215,96,147,232,2,55,131,225,137,68,245,89,141,252,97,3,129,155,216,223,98,116,45,78,85,141,161,74,215,7,150,171,225,59,78,221,152,236,14,117,100,208,158,86,13,185,124,87,157,111,40,187,182,124,173,71,173,23,199,52,155,190,134,11,23,64,25,215,39,115,231,173,77,72,114,54,252,116,178,59,221,106,241,119,254,30,226,241,204,233,113,197,96,146,0,41,67,3,231,126,12,218,202,22,171,114,249,176,134,160,19,216,31,229,118,226,62,242,126,126,42,127,130,68,218,218,81,202,106,217,191,25,177,82,97,81,36,232,137,58,90,216,190,117,235,20,194,144,76,178,27,213,13,208,18,29,118,126,49,98,203,179,128,237,100,32,242,189,212,6,210,210,188,161,205,13,124,119,13,215,112,41,183,176,215,168,210,182,111,1,115,2,239,141,8,177,124,112,48,197,2,239,11,99,4,36,77,69,47,244,19,153,61,19,2,96,176,7,112,122,131,169,25,189,116,171,49,12,121,162,79,154,74,251,50,233,182,63,180,224,118,49,253,21,20,16,31,144,184,93,174,231,244,183,13,49,225,189,211,73,185,49,110,142,25,226,45,176,233,204,74,33,16,205,88,131,92,157,170,175,68,170,61,53,116,165,16,27,182,160,181,87,241,15,151,85,107,76,167,129,25,172,127,184,138,153,222,228,125,64,44,45,32,12,227,148,106,152,83,240,166,54,235,32,190,12,242,164,123,189,53,194,141,104,43,202,110,4,168,119,245,232,179,178,198,1,224,87,86,160,31,19,140,233,102,191,204,4,98,138,163,191,106,24,213,47,208,82,137,132,131,16,253,84,25,144,90,159,148,16,196,84,166,61,160,101,229,227,93,118,59,87,66,16,128,59,96,131,250,20,184,150,205,91,227,201,62,35,79,180,172,173,85,197,106,153,238,229,60,204,65,193,230,94,101,177,134,6,165,53,171,142,208,155,2,11,4,202,127,54,17,142,117,227,121,128,204,192,147,147,92,189,5,224,148,72,18,83,101,126,124,228,153,242,123,229,247,92,221,6,73,227,250,87,167,194,129,187,73,38,185,109,217,240,193,88,50,178,180,151,54,197,187,137,190,166,233,1,103,204,88,31,127,185,29,65,1,29,254,223,14,83,167,215,114,248,30,173,89,173,187,69,5,105,117,15,106,94,173,63,227,25,230,190,136,168,177,175,107,91,126,254,34,188,25,118,48,12,226,130,153,162,57,47,181,212,79,160,97,64,157,246,90,53,43,149,76,102,15,195,107,58,242,84,172,29,81,198,113,81,251,138,182,154,111,30,171,129,56,17,45,214,153,112,117,203,174,40,38,234,236,32,4,112,225,26,187,195,246,252,9,218,69,160,223,178,54,148,81,8,134,151,75,248,63,224,240,48,75,250,221,85,46,100,50,3,70,64,102,111,160,155,233,59,147,184,57,61,6,126,79,176,16,185,94,166,33,135,78,42,75,140,208,140,44,153,187,64,103,119,160,236,16,239,74,218,219,212,207,110,53,30,76,248,40,111,98,44,20,113,204,233,109,135,96,107,39,163,203,125,45,157,152,71,239,175,174,159,147,80,111,93,38,253,228,154,225,181,101,12,241,127,65,49,189,5,85,151,237,213,143,14,104,138,54,52,27,4,132,67,35,156,86,157,73,16,229,222,245,110,79,165,179,56,179,53,218,229,100,58,87,149,48,231,64,63,115,67,3,172,6,186,115,154,60,53,214,152,149,89,234,37,143,82,255,64,28,183,93,112,39,70,185,57,0,199,9,61,175,219,41,76,37,176,82,125,65,53,160,214,105,62,153,244,222,96,205,6,178,85,41,240,113,0,96,149,38,3,195,
118,152,41,246,3,103,29,110,134,30,101,75,46,103,199,184,20,230,8,55,120,4,229,168,35,43,7,28,161,143,87,27,87,79,255,186,44,195,158,155,181,119,81,172,217,107,95,98,55,243,186,66,105,48,224,123,232,84,156,20,10,156,208,204,52,34,228,136,97,242,200,246,211,67,202,40,241,91,92,253,9,54,72,131,221,106,178,32,44,182,4,225,193,37,20,249,249,231,10,206,18,71,254,221,187,172,88,204,6,127,138,102,7,208,75,147,219,199,177,79,36,170,101,207,177,109,95,143,217,41,199,80,183,201,2,254,12,55,23,198,14,255,69,245,138,155,129,227,167,168,130,156,135,14,96,93,48,99,143,107,126,92,117,143,112,108,193,228,84,13,41,186,27,172,92,201,149,116,19,112,197,116,209,128,102,1,55,152,177,28,37,34,50,83,41,199,74,178,59,111,67,118,35,252,36,33,87,28,170,17,215,47,90,154,124,137,15,14,211,59,75,59,30,77,0,49,37,225,191,87,101,127,214,227,160,99,174,234,82,148,235,16,241,219,147,170,127,221,250,116,39,218,156,72,227,172,55,0,79,188,76,51,222,232,24,36,62,94,154,3,61,230,146,114,253,0,128,58,253,90,72,211,242,38,39,133,153,161,119,105,195,152,225,208,105,140,80,217,186,196,157,21,116,230,116,139,25,159,143,118,128,77,201,238,247,228,15,168,4,133,148,21,148,12,44,241,7,115,17,129,176,202,46,130,122,129,235,141,223,85,21,199,65,181,169,52,174,161,153,62,25,164,115,213,89,138,199,103,79,200,165,135,249,244,27,209,178,240,129,211,61,9,111,157,147,119,36,119,255,110,130,84,49,210,225,247,100,26,121,127,163,160,26,79,99,24,77,65,32,178,109,36,27,253,173,110,183,11,14,211,57,130,254,124,104,165,219,31,70,97,14,194,39,61,26,141,125,228,126,194,184,101,160,204,106,128,144,106,103,171,18,246,129,220,85,172,151,123,5,73,155,192,175,91,157,239,61,237,116,170,65,233,56,19,49,114,168,190,3,214,53,250,90,213,244,88,101,30,229,248,124,15,71,141,27,172,235,21,129,211,72,61,172,112,170,128,135,96,196,221,255,27,176,105,188,183,121,33,37,149,53,131,226,233,29,167,234,218,109,53,185,152,36,248,53,61,235,78,21,201,214,210,163,12,251,187,45,188,137,126,127,237,92,234,91,240,225,38,194,57,213,251,237,171,30,99,52,14,49,84,101,252,237,7,166,122,114,32,107,32,207,239,136,168,178,12,11,241,233,230,146,132,18,83,233,41,172,17,6,161,42,113,87,40,255,185,1,146,128,5,240,126,131,71,42,54,124,205,2,122,71,30,222,229,40,134,142,102,97,239,151,177,1,230,231,49,123,219,28,129,91,152,112,13,154,81,197,226,255,112,158,178,177,55,181,108,138,185,245,29,186,21,73,188,209,154,200,89,116,235,198,144,36,87,248,22,7,200,122,7,148,44,42,87,140,238,204,95,231,252,0,136,0,22,39,70,123,125,165,113,227,172,146,163,128,158,36,52,91,19,36,245,27,150,138,141,11,67,239,224,65,24,116,101,7,39,46,142,172,164,243,148,0,33,226,59,47,203,137,156,241,66,250,157,30,204,101,143,134,98,238,155,226,25,184,136,219,89,100,193,11,143,71,139,243,230,151,0,249,1,78,26,32,93,104,157,67,97,164,248,86,124,146,93,74,222,228,167,55,53,100,135,216,109,13,64,37,106,177,200,200,182,92,251,69,31,243,89,80,198,14,132,203,72,103,28,104,217,24,97,223,113,11,29,178,191,210,46,162,255,68,99,8,237,213,162,152,193,183,121,203,19,108,182,29,86,26,192,103,220,103,205,154,179,197,9,22,73,127,175,146,38,119,210,0,24,180,21,245,215,204,91,186,119,138,183,239,15,155,231,248,133,39,24,101,144,236,10,230,54,174,227,73,21,110,10,160,241,232,131,14,212,127,232,59,122,65,146,54,163,9,189,190,121,88,170,62,194,14,204,152,245,38,131,37,91,81,72,114,29,115,239,182,56,44,156,159,177,180,82,160,93,97,86,183,236,50,95,85,39,71,181,225,152,143,63,123,117,34,44,109,160,166,229,240,91,138,102,54,180,173,44,50,80,42,124,7,50,124,211,239,21,94,197,185,239,213,107,142,64,95,124,125,17,180,97,189,101,52,48,19,112,12,70,9,212,177,54,118,66,84,147,236,248,26,124,95,103,135,254,124,49,112,186,99,120,90,8,194,191,88,57,242,65,61,10,104,246,197,252,19,159,58,194,75,173,242,103,8,115,84,69,238,149,26,15,159,182,141,132,119,70,29,53,20,143,46,163,204,6,236,59,45,185,172,89,119,83,38,144,36,222,96,151,26,99,195,163,170,133,92,159,214,53,150,116,90,176,69,145,130,15,172,140,217,215,101,163,115,161,65,101,8,7,183,113,213,134,58,175,130,251,143,173,248,168,135,60,159,30,194,68,208,119,120,2,40,178,227,247,161,77,47,136,46,244,163,72,65,158,25,225,195,61,132,182,204,177,186,200,81,2,65,105,212,72,94,203,232,217,182,123,251,228,160,1,161,204,123,20,37,1,77,208,179,45,149,181,122,102,190,123,213,164,231,41,216,130,234,248,208,251,252,220,84,209,67,47,61,220,5,142,162,26,236,121,142,248,132,255,65,122,203,196,102,191,187,2,195,127,255,193,92,49,91,186,154,39,156,29,211,172,49,104,245,114,153,223,211,199,249,35,130,160,128,0,152,176,183,20,236,113,193,108,26,255,11,237,102,133,245,94,115,114,10,89,229,214,221,99,149,30,99,37,246,10,26,26,39,92,123,170,73,211,127,227,54,30,86,133,159,112,225,91,148,100,174,149,75,143,14,140,20,44,64,212,5,243,8,116,63,30,97,42,123,20,73,212,85,207,83,122,27,251,233,84,10,17,236,232,83,200,127,119,143,163,204,220,167,59,231,20,106,186,222,191,8,40,234,21,25,180,13,116,250,152,224,174,75,3,205,38,173,215,236,151,185,121,254,244,154,239,17,53,106,164,61,49,116,216,118,94,150,35,181,26,238,66,49,211,221,132,146,166,115,39,136,36,205,230,179,31,197,51,148,165,109,38,70,37,148,52,44,209,250,98,58,246,225,
1103,198,101,26,25,196,207,8,166,21,88,252,175,253,10,88,107,157,19,225,61,12,246,221,37,239,186,167,137,142,135,222,128,174,62,95,216,38,141,157,45,232,97,217,173,203,234,116,129,69,206,189,94,221,12,54,139,186,247,184,16,200,121,244,104,8,7,35,111,47,188,10,140,92,73,143,206,203,72,122,184,20,102,197,130,64,150,63,96,239,8,132,111,217,84,91,198,32,43,100,138,241,15,160,42,190,253,193,184,164,124,29,210,96,67,224,221,182,29,218,129,149,29,128,174,98,88,88,125,56,40,255,120,5,0,87,174,42,150,90,112,201,183,169,19,57,195,191,12,58,244,235,132,25,145,72,146,214,8,125,100,135,12,5,102,97,248,174,24,159,90,33,43,187,6,61,212,241,225,190,219,252,197,123,129,164,108,123,55,230,4,153,166,105,234,15,85,216,23,56,32,3,41,110,68,146,172,133,202,98,41,7,47,152,35,255,168,106,241,226,222,77,244,52,185,65,252,227,32,66,38,11,172,60,28,28,103,84,1,1,205,182,190,28,189,102,253,43,1,191,148,116,10,227,18,81,93,80,239,157,232,215,180,163,165,161,109,177,71,150,244,144,208,160,110,22,174,60,206,43,103,121,55,103,114,115,173,238,13,10,227,251,41,176,216,158,229,216,55,234,128,128,20,167,106,181,86,163,130,215,110,149,191,10,227,215,8,214,154,178,181,15,19,0,247,250,97,74,43,157,55,94,174,41,41,9,199,97,20,91,32,18,10,43,98,240,247,203,20,250,117,160,44,229,202,187,64,54,124,15,184,169,129,27,160,240,26,61,255,60,166,60,144,209,84,55,187,186,168,13,124,125,29,17,100,249,227,62,205,78,179,163,168,139,168,21,38,83,239,151,74,43,66,2,92,72,71,94,216,134,238,20,45,158,213,164,73,57,80,47,198,184,130,223,227,71,132,133,235,177,85,174,142,124,172,200,54,229,40,126,60,76,92,216,153,56,241,174,66,141,90,226,3,30,68,234,71,187,163,112,146,255,22,143,170,204,3,127,179,81,139,160,37,77,246,128,220,196,158,153,73,177,65,199,119,29,197,144,130,248,206,155,253,108,213,124,7,223,221,162,146,134,242,65,99,162,107,120,247,214,207,96,150,169,131,208,218,221,28,24,112,208,23,1,130,142,232,56,104,45,33,158,95,255,123,31,74,76,120,178,155,213,6,195,164,8,8,69,241,197,127,83,169,21,167,19,94,143,252,33,159,248,241,170,153,147,1,149,199,201,131,170,79,236,212,209,143,107,98,24,123,56,33,193,85,247,64,225,135,210,78,145,57,16,145,71,170,20,133,87,235,4,166,239,100,82,235,81,50,223,9,193,52,49,86,129,190,196,82,165,107,63,115,161,98,33,20,193,29,42,151,205,252,124,72,245,48,181,67,7,13,21,127,59,226,188,144,129,112,244,192,121,213,80,42,196,1,13,107,108,78,0,40,121,225,148,237,234,209,216,238,9,147,226,254,96,89,212,72,193,106,75,135,74,227,67,255,92,191,81,188,124,226,149,152,142,15,159,195,238,114,55,255,166,157,230,59,148,170,166,151,65,213,104,253,253,112,150,82,147,137,27,214,100,247,65,81,92,47,86,217,7,45,120,81,130,31,236,243,76,78,3,45,105,172,220,71,48,220,94,196,249,163,193,133,50,236,205,20,55,2,63,14,127,69,113,212,204,12,58,79,89,86,29,61,199,201,64,149,6,144,182,150,129,31,18,167,120,248,82,107,25,143,128,27,161,28,25,153,183,217,238,78,186,106,92,27,202,219,165,96,0,216,234,169,73,101,39,182,113,217,240,170,116,172,221,250,233,48,49,242,83,227,92,181,184,72,230,180,21,15,108,135,25,38,153,25,124,227,26,149,73,236,39,211,244,149,58,183,132,26,223,219,174,144,117,233,219,165,205,157,159,222,184,52,47,241,201,123,65,24,44,55,215,177,168,250,179,115,190,227,123,158,163,179,224,69,196,66,207,254,243,101,221,193,140,250,4,28,222,52,96,138,160,33,218,64,118,214,234,201,152,148,91,178,111,107,144,142,6,182,102,72,188,34,213,181,26,223,58,255,103,81,17,47,169,11,245,224,123,148,215,237,186,107,75,152,90,202,166,22,149,197,5,246,238,78,76,229,106,199,94,127,195,0,45,82,6,159,103,96,138,231,71,46,107,59,216,39,43,12,221,27,214,56,155,145,66,187,169,250,235,78,211,179,239,183,198,163,93,5,196,24,174,143,225,106,139,89,98,13,127,207,184,194,30,1,165,198,169,8,197,118,86,163,221,138,23,209,61,116,79,99,233,43,130,60,244,85,229,243,172,123,148,200,120,192,127,211,52,11,159,41,95,212,230,188,169,156,137,29,212,12,148,168,148,133,243,44,241,139,127,24,246,220,227,125,209,97,60,52,162,192,146,49,161,92,138,112,189,128,59,126,125,46,207,60,79,231,174,152,209,68,223,205,2,38,14,91,116,159,255,28,27,178,248,164,104,158,79,69,214,234,157,12,75,163,83,253,245,202,61,213,176,6,197,230,29,208,166,253,194,254,235,29,141,241,70,249,15,62,0,148,163,135,52,122,40,96,87,31,179,152,51,216,133,184,122,198,203,60,115,218,191,193,16,178,25,148,252,112,104,103,252,36,92,221,28,179,43,199,198,151,128,100,252,217,161,249,34,201,172,118,52,180,252,104,7,223,44,116,102,212,21,40,224,184,55,163,210,21,207,161,239,51,54,155,41,133,18,67,48,3,165,130,251,4,79,214,57,72,130,157,212,144],E=!1;function T(){this.programs=[];var e=this,t=null,n=null;e.gl=null,e.inputTexture=null;var i=[],r=[],o=0,s=0;e._initGl=function(n,a){e.inputTexture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,e.inputTexture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);for(var l=0;l<4;l++){var c=t.createTexture();t.bindTexture(t.TEXTURE_2D,c),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),l<2?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,n,a,0,t.RGBA,t.UNSIGNED_BYTE,null):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,a,n,0,t.RGBA,t.UNSIGNED_BYTE,null);var u=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,u),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,c,0),i.push(c),r.push(u)}t.viewport(0,0,n,a),o=n,s=a}
1,e.render=function(a){if(t){var l=0;s==a.videoWidth&&o===a.videoHeight&&(l=2),t.viewport(0,0,a.videoWidth,a.videoHeight),t.bindTexture(t.TEXTURE_2D,e.inputTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a);for(var c=E?e.programs.length-1:0,u=0;u<=c;u++){var d=e.programs[u].program;t.useProgram(d);var h=t.getUniformLocation(d,"u_image");e.programs[u].setUniforms(),t.bindFramebuffer(t.FRAMEBUFFER,r[l+u%2]),t.clearColor(0,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLES,0,6),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,i[l+u%2]),t.uniform1i(h,0)}t.useProgram(n);var p=t.getUniformLocation(n,"u_flipY");t.uniform1f(p,-1),t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLES,0,6)}},e.setEnableBeauty=function(e){E=e},e.init=function(i,r,o){if("undefined"==typeof WebGLRenderingContext)throw new Error("NOT_SUPPORT");t=o.getContext("webgl"),e.gl=t,e._initGl(i,r),e.programs.push(new function(e,t,n){var i=e.gl;this.program=v(i,y),this.setUniforms=function(){i.getUniformLocation(this.program,"u_image");var e=i.getUniformLocation(this.program,"u_flipY");i.uniform1f(e,1)}}(this,i,r)),e.programs.push(new function(e,t,n){var i=e.gl,r=1/t,o=1/n,s=5;this.program=v(i,b),this.setUniforms=function(){i.getUniformLocation(this.program,"u_image");var e=i.getUniformLocation(this.program,"u_flipY"),t=i.getUniformLocation(this.program,"u_singleStepOffset"),n=i.getUniformLocation(this.program,"u_denoiseLevel");i.uniform2f(t,r,o),i.uniform1f(n,s),i.uniform1f(e,1)},this.setParameters=function(e){void 0!==e.denoiseLevel&&(s=e.denoiseLevel)},this.setSize=function(e,t){r=1/e,o=1/t}}(this,i,r)),e.programs.push(new function(e,t,n){var i=e.gl,r=1/t,o=1/n,s=5;this.program=v(i,_),this.setUniforms=function(){i.getUniformLocation(this.program,"u_image");var e=i.getUniformLocation(this.program,"u_flipY"),t=i.getUniformLocation(this.program,"u_singleStepOffset"),n=i.getUniformLocation(this.program,"u_denoiseLevel");i.uniform2f(t,r,o),i.uniform1f(n,s),i.uniform1f(e,1)},this.setParameters=function(e){void 0!==e.denoiseLevel&&(s=e.denoiseLevel)},this.setSize=function(e,t){r=1/e,o=1/t}}(this,i,r)),e.programs.push(new function(e,t,n){var i=e.gl,r=1/t,o=1/n,s=5;this.program=v(i,S),this.setUniforms=function(){i.getUniformLocation(this.program,"u_image");var e=i.getUniformLocation(this.program,"u_flipY"),t=i.getUniformLocation(this.program,"u_singleStepOffset"),n=i.getUniformLocation(this.program,"u_denoiseLevel");i.uniform2f(t,r,o),i.uniform1f(n,s),i.uniform1f(e,1)},this.setParameters=function(e){void 0!==e.denoiseLevel&&(s=e.denoiseLevel)},this.setSize=function(e,t){r=1/e,o=1/t}}(this,i,r)),e.programs.push(new function(e,t,n){var i=e.gl,r=5,o=.1,s=.5,a=175/180*3.141593,l=115/180*3.141593,c=173/180*3.141593,u=116/180*3.141593,d=2.04203545,h=0,p=0,f=0,g=[],m=[0,1,3,4,6,7,9,10,12,13,15,16,18,19,21,22,24,26,29,31,34,36,39,41,44,46,49,51,54,56,59,61,64,65,66,67,68,69,70,72,73,74,75,76,77,79,80,81,82,83,84,85,87,88,89,90,91,92,94,95,96,97,98,99,101,102,103,104,105,106,107,109,110,111,112,113,114,116,117,118,119,120,121,123,124,125,126,127,128,129,131,132,133,134,135,136,138,139,140,141,142,143,145,146,147,148,149,150,151,153,154,155,156,157,158,160,161,162,163,164,165,166,168,169,170,171,172,173,175,176,177,178,179,180,182,183,184,185,186,187,188,190,191,192,193,194,195,197,198,199,200,201,202,204,205,206,207,208,209,210,212,213,214,215,216,217,219,220,221,222,223,224,226,226,226,227,227,227,228,228,228,229,229,229,230,230,231,231,231,232,232,232,233,233,233,234,234,235,235,235,236,236,236,237,237,237,238,238,239,239,239,240,240,240,241,241,241,242,242,243,243,243,244,244,244,245,245,245,246,246,246,247,247,247,248,248,248,249,249,249,250,250,250,251,251,251,252,252,252,253,253,253,254,254,254,255],y=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32,33,35,36,37,39,40,42,43,44,46,47,49,50,51,53,54,56,57,58,59,61,62,63,64,66,67,68,69,71,72,73,74,76,77,78,79,81,82,83,84,86,87,88,90,91,92,93,95,96,97,98,100,101,102,103,105,106,107,108,110,111,112,113,115,116,117,118,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,139,140,141,142,144,145,146,147,149,150,151,152,154,155,156,158,159,160,161,163,164,165,166,168,169,170,171,173,174,175,176,178,179,180,181,183,184,185,186,188,189,190,192,193,194,195,197,198,199,200,202,203,204,205,207,208,209,210,212,213,214,215,217,218,219,220,222,223,224,226,226,226,227,227,228,228,229,229,230,230,231,231,232,232,233,233,234,234,234,235,235,236,236,237,237,238,238,239,239,240,240,241,241,242,242,243,243,243,244,244,244,245,245,245,246,246,246,247,247,247,248,248,248,249,249,249,250,250,250,251,251,251,252,252,252,253,253,253,254,254,254,255],b=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,43,44,45,46,47,48,50,51,52,53,54,55,56,58,59,60,61,62,63,65,66,67,68,69,70,72,73,74,76,77,78,80,81,83,84,85,87,88,89,91,92,94,95,96,98,99,100,102,103,105,106,107,109,110,111,113,114,116,117,118,120,121,122,124,125,127,128,129,131,132,133,135,136,138,139,140,142,143,144,146,147,149,150,151,153,154,155,157,158,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,192,193,193,194,195,195,196,197,197,198,199,199,200,201,201,202,203,203,204,205,205,206,207,207,208,209,209,210,211,211,212,213,213,214,215,215,216,217,217,218,219,219,220,221,221,222,223,223,224,225,225,226,227,227,228,229,229,230,231,231,232,233,233,234,235,235,236,237,237,238,239,239,240,241,241,242,243,243,244,245,245,246,247,247,248,249,249,250,251,251,252,253,253,254,255];this.program=v(i,w),this.setUniforms=function(){var t=i.getUniformLocation(this.program,"u_flipY"),n=i.getUniformLocation(this.program,"u_denoiseLevel");i.uniform1f(n,r),i.uniform1f(t,1);var m=i.getUniformLocation(this.program,"light");i.uniform1f(m,o);var v=i.getUniformLocation(this.program,"redness");i.uniform1f(v,s);var y=i.getUniformLocation(this.program,"skin_he_max"),b=i.getUniformLocation(this.program,"skin_he_min"),_=i.getUniformLocation(this.program,"skin_hc_max"),S=i.getUniformLocation(this.program,"skin_hc_min"),w=i.getUniformLocation(this.program,"skin_hc_axis"),E=i.getUniformLocation(this.program,"facts_rotate_c"),T=i.getUniformLocation(this.program,"facts_rotate_le"),C=i.getUniformLocation(this.program,"facts_rotate_ge");i.uniform1f(y,a),i.uniform1f(b,l),i.uniform1f(_,c),i.uniform1f(S,u),i.uniform1f(w,d),i.uniform1f(E,h),i.uniform1f(T,p),i.uniform1f(C,f);var I=i.getUniformLocation(this.program,"u_originImage");i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,e.inputTexture),i.uniform1i(I,2);for(var R=["lighten_lut"],D=[i.TEXTURE3],A=0;A<R.length;A++){var k=i.getUniformLocation(this.program,R[A]);i.activeTexture(D[A]),i.bindTexture(i.TEXTURE_2D,g[A]),i.uniform1i(k,A+3)}},this.setParameters=function(e){void 0!==e.denoiseLevel&&(r=e.denoiseLevel),void 0!==e.lightLevel&&(o=e.lightLevel),void 0!==e.rednessLevel&&this._updateRedness(s=e.rednessLevel),void 0!==e.lighteningContrastLevel&&this._updateLut(e.lighteningContrastLevel)},this._updateRedness=function(e){var t,n,i=3.141593,r=e,o=r;r>1&&(r=1),r<0&&(r=0),o>1&&(o=1),o<0&&(o=0),h=.8*r,o<.8&&(o=0),(d=(117-4*o)/180*i)<(u=(116-4*o)/180*i)&&(d=u),u<i/2&&(u=i/2),d<i/2&&(d=i/2),(l=(115-4*o)/180*i)<i/2&&(l=i/2),(c=173/180*i)>i&&(c=i),d>i&&(d=i),(a=175/180*i)>i&&(a=i),n=c-d,f=(t=a-c)>.01?h*n/t:h,n=d-u,p=(t=u-l)>.01?h*n/t:h},this._updateLut=function(e){var t=null;0==e&&(t=y),1==e&&(t=b),2==e&&(t=m);for(var n=[new Uint8Array(t)],r=[256],o=[1],s=0;s<n.length;s++)i.bindTexture(i.TEXTURE_2D,g[s]),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,r[s],o[s],0,i.LUMINANCE,i.UNSIGNED_BYTE,n[s])},this._init=function(){for(var e=[new Uint8Array(y)],t=[256],n=[1],r=0;r<e.length;r++){var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texImage2D(i.TEXTURE_2D,0,i.LUMINANCE,t[r],n[r],0,i.LUMINANCE,i.UNSIGNED_BYTE,e[r]),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),g.push(o)}},this._init()}(this,i,r)),n=e.programs[0].program},e.release=function(){e.gl=null,t=null,n=null,e.inputTexture=null,e.programs=[],i=[],r=[]}
1,e.setDenoiseLevel=function(t){e.programs.forEach(function(e){e.setParameters&&e.setParameters({denoiseLevel:t})})},e.setLightLevel=function(t){e.programs.forEach(function(e){e.setParameters&&e.setParameters({lightLevel:t})})},e.setRednessLevel=function(t){e.programs.forEach(function(e){e.setParameters&&e.setParameters({rednessLevel:t})})},e.setContrastLevel=function(t){e.programs.forEach(function(e){e.setParameters&&e.setParameters({lighteningContrastLevel:t})})},e.setSize=function(t,n){e.programs.forEach(function(e){e.setSize&&e.setSize(t,n)})}}T._instance=null,T.getInstance=function(){return T._instance||(T._instance=new T),T._instance},t.a={addVideoEffectCapability:function(e){var t;e.videoEffect={canvas:null,video:null,fps:30,stopChromeBackgroundLoop:null,enableBeauty:!1,denoiseLevel:5,lightLevel:.35,rednessLevel:.5,lighteningContrastLevel:1,videoContextInited:!1,originVideoTrack:null,canvasVideoTrack:null,ctx:null},e._initVideoContext=function(){if(e.videoEffect.videoContextInited)throw new Error("Failed to init video context. Already inited");if(!e.stream)throw new Error("Failed to init video context. Local Stream not initialized");e.videoEffect.originVideoTrack=e.stream.getVideoTracks()[0],e.attributes&&e.attributes.maxFrameRate&&(e.videoEffect.fps=e.attributes.maxFrameRate),e.videoEffect.videoContextInited=!0},e._renderWithWebGL=function(t){return new Promise(function(n){e.videoEffect.canvas||(e.videoEffect.canvas=document.createElement("canvas")),e.videoEffect.video||(e.videoEffect.video=document.createElement("video")),e.videoEffect.video.setAttribute("autoplay",""),e.videoEffect.video.setAttribute("muted",""),e.videoEffect.video.muted=!0,e.videoEffect.video.setAttribute("playsinline",""),e.videoEffect.video.setAttribute("style","display:none"),e.videoEffect.video.srcObject=t;var i=t.getVideoTracks()[0].getSettings(),r=i.width,o=i.height;console.log("Width: ".concat(r,", Height: ").concat(o)),e.videoEffect.canvas.setAttribute("width",r),e.videoEffect.canvas.setAttribute("height",o),e.videoEffect.video.setAttribute("width",r),e.videoEffect.video.setAttribute("height",o);var s=T.getInstance();s.init(e.videoEffect.video.width,e.videoEffect.video.height,e.videoEffect.canvas),s.setDenoiseLevel(e.videoEffect.denoiseLevel),s.setLightLevel(e.videoEffect.lightLevel),s.setRednessLevel(e.videoEffect.rednessLevel),s.setContrastLevel(e.videoEffect.lighteningContrastLevel),e.videoEffect.video.addEventListener("playing",function t(){var i=e.videoEffect.canvas.captureStream(e.videoEffect.fps);e.videoEffect.video.removeEventListener("playing",t,!0),n([i.getVideoTracks()[0],e.videoEffect.video])},!0),e.videoEffect.video.play()})},e._disableEffect=function(){e.videoEffect.videoContextInited||e._initVideoContext();var t=e.videoEffect.originVideoTrack;if(!t)return h.default.warning("Video track is null, fail to disable video effect!"),Promise.resolve();if(e.pc&&e.pc.peerConnection&&e.pc.peerConnection){var n=(e.pc.peerConnection&&e.pc.peerConnection.getSenders()).find(function(e){return e&&e.track&&"video"==e.track.kind});if(n&&n.replaceTrack&&t)return n.replaceTrack(t)}return Promise.resolve()},e._releaseEffect=function(){var t;return t=e.videoEffect.enableBeauty?e._disableEffect():Promise.resolve(),T.getInstance().release(),e.videoEffect.videoContextInited=!1,e.videoEffect.canvasVideoTrack=null,t},e._enableEffect=function(){return e.videoEffect.videoContextInited||e._initVideoContext(),e.videoEffect.originVideoTrack?e.videoEffect.canvasVideoTrack?(e._showEffectInLocalPlayer(),e._replaceWithCanvasTrack()):e._renderWithWebGL(e.stream).then(function(t){var n=l()(t,2),i=n[1];e.videoEffect.canvasVideoTrack=n[0];var r=T.getInstance();return requestAnimationFrame(function t(){e.videoEffect.enableBeauty&&r.render(i),e.videoEffect.videoContextInited&&requestAnimationFrame(t)}),c.isChrome()&&document.addEventListener("visibilitychange",function(){document,document.hidden?e.videoEffect.stopChromeBackgroundLoop=function(e,t){var n=1/t,i=new AudioContext,r=i.createGain();r.gain.value=0,r.connect(i.destination),function t(){var s=i.createOscillator();s.onended=t,s.connect(r),s.start(0),s.stop(i.currentTime+n),e(),o&&(s.onended=function(){i.close()})}();var o=!1;return function(){o=!0}}(function(){e.videoEffect.enableBeauty&&r.render(i)}
1,e.videoEffect.fps):e.videoEffect.stopChromeBackgroundLoop&&(e.videoEffect.stopChromeBackgroundLoop(),e.videoEffect.stopChromeBackgroundLoop=null)},!1),e._showEffectInLocalPlayer(),e._replaceWithCanvasTrack()}):(h.default.warning("Video track is null, fail to enable video effect!"),Promise.resolve())},e._showEffectInLocalPlayer=function(){if(e.player){var t=e.player.div.children[0];if("none"!==t.style.display&&(e.player.div.appendChild(e.videoEffect.canvas),"video"===t.tagName.toLowerCase())){var n=t.getAttribute("style");e.videoEffect.canvas.setAttribute("style",n),"none"!==t.style.display&&(t.style.display="none")}}},e._removeEffectFromLocalPlayer=function(){if(e.player&&e.player.div&&e.videoEffect.enableBeauty&&e.videoEffect.canvas){e.player.div.removeChild(e.videoEffect.canvas);var t=e.player.div.children[0];"video"===t.tagName.toLowerCase()&&(e.videoEffect.canvas.style.display="none",t.style.display="block")}},e._replaceWithCanvasTrack=function(){var t=null;return e.pc&&e.pc.peerConnection&&e.pc.peerConnection&&(t=(e.pc.peerConnection&&e.pc.peerConnection.getSenders()).find(function(e){return e&&e.track&&"video"==e.track.kind})),t&&t.replaceTrack&&e.videoEffect.canvasVideoTrack?t.replaceTrack(e.videoEffect.canvasVideoTrack):Promise.resolve()},e.setBeautyEffectOptions=(t=s()(r.a.mark(function t(n,i){var o,s=arguments;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Object(d.checkValidBoolean)(n,"enabled"),o=T.getInstance(),e.videoEffect.enableBeauty==n){t.next=14;break}if(o.setEnableBeauty(n),!n){t.next=9;break}return t.next=7,e._enableEffect();case 7:t.next=12;break;case 9:return e._removeEffectFromLocalPlayer(),t.next=12,e._releaseEffect();case 12:e.videoEffect.enableBeauty=n,u.report.reportApiInvoke(e.sid,{callback:null,options:s,name:"Stream.setBeautyEffectOptions",tag:"tracer"});case 14:if(n){t.next=16;break}return t.abrupt("return");case 16:if(!i){t.next=20;break}Object(d.checkValidObject)(i,"options"),t.next=21;break;case 20:return t.abrupt("return");case 21:if(void 0!==i.smoothnessLevel&&(Object(d.checkValidFloatNumber)(i.smoothnessLevel,"smoothnessLevel",0,1),e.videoEffect.denoiseLevel=10*i.smoothnessLevel,e.videoEffect.denoiseLevel<.1&&(e.videoEffect.denoiseLevel=.1),o.setDenoiseLevel(e.videoEffect.denoiseLevel)),void 0!==i.lighteningLevel&&(Object(d.checkValidFloatNumber)(i.lighteningLevel,"lighteningLevel",0,1),e.videoEffect.lightLevel=i.lighteningLevel/2,e.videoEffect.lightLevel<.01&&(e.videoEffect.lightLevel=.01),o.setLightLevel(e.videoEffect.lightLevel)),void 0!==i.rednessLevel&&(Object(d.checkValidFloatNumber)(i.rednessLevel,"rednessLevel",0,1),e.videoEffect.rednessLevel=i.rednessLevel,e.videoEffect.rednessLevel<.01&&(e.videoEffect.rednessLevel=.01),o.setRednessLevel(e.videoEffect.rednessLevel)),void 0===i.lighteningContrastLevel){t.next=29;break}if(0===i.lighteningContrastLevel||1===i.lighteningContrastLevel||2===i.lighteningContrastLevel){t.next=27;break}throw new Error("Invalid lighteningContrastLevel: The value should be 0, 1 or 2.");case 27:e.videoEffect.lighteningContrastLevel=parseFloat(i.lighteningContrastLevel),o.setContrastLevel(e.videoEffect.lighteningContrastLevel);case 29:case"end":return t.stop()}},t)})),function(e,n){return t.apply(this,arguments)})},restoreVideoEffect:function(e){return e.videoEffect.enableBeauty?e._enableEffect():Promise.resolve()},disableVideoEffect:function(e){return e._releaseEffect?e._releaseEffect():Promise.resolve()},applyEffectInPlayer:function(e){e.videoEffect.enableBeauty&&e.videoEffect.canvas&&e._showEffectInLocalPlayer()},removeEffectFromLocalPlayer:function(e){e._removeEffectFromLocalPlayer()},replaceWithCanvasTrack:function(e){return e.videoEffect.enableBeauty?e._replaceWithCanvasTrack():Promise.resolve()},checkVideoEffectEnabled:function(e){return!!(e.videoEffect.enableBeauty&&e.videoEffect&&e.videoEffect.videoContextInited)&&(h.default.error("Operation not permitted: ".concat("VIDEO_EFFECT_ENABLED")),"VIDEO_EFFECT_ENABLED")}}},function(e,t){function n(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(r,o){var s=e.apply(t,i);function a(e){n(s,r,o,a,l,"next",e)}function l(e){n(s,r,o,a,l,"throw",e)}a(void 0)})}}},function(e,t,n){"use strict";var i=n(38),r=Object.prototype.toString;function o(e){return"[object Array]"===r.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===r.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:s,isDate:function(e){return"[object Date]"===r.call(e)},isFile:function(e){return"[object File]"===r.call(e)},isBlob:function(e){return"[object Blob]"===r.call(e)},isFunction:l,isStream:function(e){return a(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,i){t[i]="object"==typeof t[i]&&"object"==typeof n?e(t[i],n):n}for(var i=0,r=arguments.length;i<r;i++)c(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){t[i]="object"==typeof t[i]&&"object"==typeof n?e(t[i],n):"object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)c(arguments[i],n);return t},extend:function(e,t,n){return c(t,function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(7),r=n.n(i),o=n(8),s=n(0),a=n(4);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var c=new function(){var e=Object(o.b)();return e.devicesHistory={},e.states={UNINIT:"UNINIT",INITING:"INITING",INITED:"INITED"},e.state=e.states.UNINIT,e.deviceStates={ACTIVE:"ACTIVE",INACTIVE:"INACTIVE"},e.deviceReloadTimer=null,e._init=function(t,n){e.state=e.states.INITING,e.devicesHistory={},e._reloadDevicesInfo(function(){e.state=e.states.INITED,e.dispatchEvent({type:"inited"}),t&&t()},function(t){s.default.warning("Device Detection functionality cannot start properly."),e.state=e.states.UNINIT,n&&n(t)})},e._enumerateDevices=function(e,t){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return s.default.warning("enumerateDevices() not supported."),t&&t("enumerateDevices() not supported");navigator.mediaDevices.enumerateDevices().then(function(t){e&&setTimeout(function(){e(t)},0)}).catch(function(e){t&&t(e)})},e._reloadDevicesInfo=function(t,n){var i=[];e._enumerateDevices(function(n){var o=Date.now();
1for(var a in n.forEach(function(t){var n=e.devicesHistory[t.deviceId];if((n?n.state:e.deviceStates.INACTIVE)!=e.deviceStates.ACTIVE){var r=n||{initAt:o};r.device=t,r.state=e.deviceStates.ACTIVE,i.push(r),e.devicesHistory[t.deviceId]=r}e.devicesHistory[t.deviceId].lastReloadAt=o}),e.devicesHistory){var l=e.devicesHistory[a];l&&l.state==e.deviceStates.ACTIVE&&l.lastReloadAt!==o&&(l.state=e.deviceStates.INACTIVE,i.push(l)),l.lastReloadAt=o}e.state==e.states.INITED&&i.forEach(function(t){var n=r()({},t);switch(t.device.kind){case"audioinput":n.type="recordingDeviceChanged";break;case"audiooutput":n.type="playoutDeviceChanged";break;case"videoinput":n.type="cameraChanged";break;default:s.default.warning("Unknown device change",n),n.type="unknownDeviceChanged"}e.dispatchEvent(n)}),t&&t()},n)},e.getDeviceById=function(t,n,i){e.getDevices(function(e){for(var r=0;r<e.length;r++){var o=e[r];if(o&&o.deviceId===t)return n&&n(o)}return i&&i()})},e.searchDeviceNameById=function(t){var n=e.devicesHistory[t];return n?n.device.label||n.device.deviceId:null},e.getDevices=function(t,n){e._enumerateDevices(t,function(e){n&&n(e.name+": "+e.message)})},e.getVideoCameraIdByLabel=function(t,n,i){e.getCameras(function(e){var r,o=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s.label===t)return n&&n(s.deviceId)}}catch(e){o.e(e)}finally{o.f()}return i&&i(a.default.NOT_FIND_DEVICE_BY_LABEL)},i)},e.getRecordingDevices=function(t,n){return e._enumerateDevices(function(e){var n=e.filter(function(e){return"audioinput"==e.kind});t&&t(n)},function(e){n&&n(e)})},e.getPlayoutDevices=function(t,n){return e._enumerateDevices(function(e){var n=e.filter(function(e){return"audiooutput"==e.kind});t&&t(n)},function(e){n&&n(e)})},e.getCameras=function(t,n){return e._enumerateDevices(function(e){var n=e.filter(function(e){return"videoinput"==e.kind});t&&t(n)},function(e){n&&n(e)})},e._init(function(){navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",function(){e._reloadDevicesInfo()}),e.deviceReloadTimer=setInterval(e._reloadDevicesInfo,5e3)}),e}},function(e,t,n){"use strict";n.r(t),n.d(t,"_getReconnectCSTimer",function(){return I}),n.d(t,"_setClientConnectionStateRecord",function(){return R}),n.d(t,"getGatewayList",function(){return A}),n.d(t,"getUserAccount",function(){return O});var i=n(11),r=n.n(i),o=n(12),s=n.n(o),a=n(17),l=n.n(a),c=n(2),u=(n(5),n(0)),d=n(14),h=n(1),p=n(4),f=function(e,t){var n=!1,i=0,r=Object(c.getParameter)("PROXY_CS"),o=Object(c.getParameter)("CHOOSE_SERVER_FRAGEMENT_LENGTH"),s=0,a={command:"convergeAllocateEdge",sid:e.sid,appId:e.appId,token:e.token,uid:e.uid,cname:e.cname,ts:Math.floor(Date.now()/1e3),version:c.VERSION,seq:0,requestId:1},l=function(l){var c=(new Date).getTime();g("https://"+l+"/api/v1",a,function(a,p){if(a)return u.default.debug("["+e.clientId+"] Request proxy server failed: ",a),i++,h.report.requestProxyAppCenter(e.sid,{lts:c,succ:!1,APAddr:l,workerManagerList:null,ec:JSON.stringify(a),response:JSON.stringify({err:a,res:p})}),i>=r.length&&t&&t("Get proxy server failed: request all failed"),void(!(i%o)&&i<r.length&&(s++,d()));if(!n)if((p=JSON.parse(p)).json_body){var f=JSON.parse(p.json_body);if(u.default.debug("["+e.clientId+"] App return:",f.servers),200!==f.code)i++,u.default.debug("["+e.clientId+"] "+(a="Get proxy server failed: response code ["+f.code+"], reason [ "+f.reason+"]")),h.report.requestProxyAppCenter(e.sid,{lts:c,succ:!1,APAddr:l,workerManagerList:null,ec:a,response:JSON.stringify({err:a,res:p})}),i>=r.length&&t&&t(a),!(i%o)&&i<r.length&&(s++,d());else{n=!0;var g=v(f.servers);h.report.requestProxyAppCenter(e.sid,{lts:c,succ:!0,APAddr:l,workerManagerList:JSON.stringify(g),ec:null,response:JSON.stringify({res:p})}),t&&t(null,g)}}else u.default.debug("["+e.clientId+"] Get proxy server failed: no json_body"),h.report.requestProxyAppCenter(e.sid,{lts:c,succ:!1,APAddr:l,workerManagerList:null,ec:"Get proxy server failed: no json_body",response:JSON.stringify({res:p})})})},d=function(){for(var e=s*o,t=e;t<Math.min(r.length,e+o);t++)l(r[t])};d()},g=function(e,t,n){var i={service_name:"webrtc_proxy",json_body:JSON.stringify(t)};Object(d.post)(e,i,function(e){n&&n(null,e)},function(e){n&&n(e)},{"X-Packet-Service-Type":0,"X-Packet-URI":61})},m=function(e,t,n){var i=!1,r=0,o={command:"request",gatewayType:"http",appId:e.appId,cname:e.cname,uid:e.uid+"",sdkVersion:"2.3.1",sid:e.sid,seq:1,ts:+new Date,requestId:3,clientRequest:{appId:e.appId,cname:e.cname,uid:e.uid+"",sid:e.sid}};t.map(function(s){var a=(new Date).getTime();!function(e,t,n){Object(d.post)(e,t,function(e){n&&n(null,e)},function(e){n&&n(e)})}("https://"+s+":4000/v2/machine",o,function(o,l){if(o)return u.default.debug("["+e.clientId+"] Request worker manager failed: ",o),r++,h.report.requestProxyWorkerManager(e.sid,{lts:a,succ:!1,workerManagerAddr:s,ec:JSON.stringify(o),response:JSON.stringify({res:l})}),void(r>=t.length&&n&&n("requeet worker manager server failed: request failed"));if(!i){if(!(l=JSON.parse(l)).serverResponse)return n&&n("requeet worker manager server failed: serverResponse is undefined");i=!0,h.report.requestProxyWorkerManager(e.sid,{lts:a,succ:!0,workerManagerAddr:s,ec:JSON.stringify(o),response:JSON.stringify({res:l})}),n&&n(null,{address:s,serverResponse:l.serverResponse})}})})},v=function(e){if(!e||[]instanceof Array==0)return[];var t=[];return e.forEach(function(e){var n;e.address&&e.tcp?(e.address.match(/^[\.\:\d]+$/)?n="".concat(e.address.replace(/[^\d]/g,"-"),".edge.agora.io"):(u.default.info("["+joinInfo.clientId+"] "+"Cannot recognized as IP address ".concat(e.address,". Used As Host instead")),n="".concat(e.address,":").concat(e.tcp)),t.push(n)):u.default.error("["+joinInfo.clientId+"] Invalid address format ",e)}),t},y=n(21),b=function(e,t,n,i){var r=Object(c.getParameter)("WEBCS_DOMAIN").concat(Object(c.getParameter)("WEBCS_DOMAIN_BACKUP_LIST")),o=Object(c.getParameter)("PROXY_SERVER_TYPE3");r=r.map(function(e,t){return"".concat(o[(t+1)%o.length],"/ap/?url=").concat(e)});var s,a=0,l=!0,f=Object(c.getParameter)("CHOOSE_SERVER_FRAGEMENT_LENGTH"),g=0,m=function(m){!function(e,t,n,i,r){var o=Date.now(),s=function(e,i){try{h.report.joinChooseServer2(n.sid,{lts:o,succ:!e,csAddr:t,serverList:i&&i.gateway_addr,cid:i&&i.cid+"",uid:i&&i.uid+"",ec:e,chooseServerIp:i&&i.detail&&i.detail[502]})}catch(e){}},a=function(i,r){var s=Date.now();try{h.report.joinWebProxyAP({lts:s,sid:n.sid,cname:n.cname,cid:n.cid,uid:n.uid,sucess:i?-1:1,elapse:s-o,eventType:e,apServerAddr:t,turnServerAddrList:JSON.stringify(r),errorCode:i||"0"})}catch(e){}},l=Object(c.getParameter)("AREA_SETTING").reduce(function(e,t,n){var i=Object(y.getAreaCodeByArea)(t);return i?0===n?i:"".concat(e,",").concat(i):e},""),f={appid:n.token,client_ts:Date.now(),opid:133,sid:n.sid,request_bodies:[{uri:22,buffer:{cname:n.cname,detail
1:{11:l,6:n.stringUid},key:n.token,service_ids:[11,r?20:18],uid:n.uid||0}}]};t="https://".concat(t,"/api/v2/transpond/webrtc?v=2"),Object(d.postFormData)(t,f,function(e){var o=function(e){return new RegExp(/10102\d{2}$/).test(e)?"NO_SERVICE_AVAILABLE":p.APErrorCode[e]||e};try{var l,d,h=JSON.parse(e);if(30===(h=h.response_body)[0].uri&&0!==h[0].buffer.code){var f=o(h[0].buffer.code);return a(f,h),i(f)}if(4096===h[0].buffer.flag?(d=h[0].buffer,l=h[1].buffer):(d=h[1].buffer,l=h[0].buffer),0!==l.code)return f=o(l.code),u.default.error("[".concat(n.clientId,"] requestProxyServer failed: ").concat(f)),a(f,l),i(f);if(!l.edges_services||!l.edges_services instanceof Array)return a("UNEXPECTED_ERROR",l),i("UNEXPECTED_ERROR");var g=Object(c.getParameter)("GATEWAY_DOMAINS"),m=0;if(t.indexOf(g[1])>-1&&(m=1),0===l.edges_services.length)return a("EMPTY_PROXY_LIST",l),i("EMPTY_PROXY_LIST");var v=l.edges_services.map(function(e){if(e.ip)return e.ip=r?"".concat(e.ip.replace(/[^\d]/g,"-"),".").concat(g[m++%g.length]):"".concat(e.ip),e});if(a(null,v),0!==d.code)return f=o(d.code),u.default.error("[".concat(n.clientId,"] requestChooseServer failed: ").concat(f)),s(f),i(f);var y=[];if(g=Object(c.getParameter)("GATEWAY_DOMAINS"),m=0,t.indexOf(g[1])>-1&&(m=1),d.edges_services.forEach(function(e){var i;if(e.ip&&e.port){if(!e.ip.match(/^[\.\:\d]+$/))return u.default.info("["+n.clientId+"] "+"Cannot recognized as IP address ".concat(e.ip,". Used As Host instead")),void s("UNEXPECTED_IP");i="".concat(e.ip.replace(/[^\d]/g,"-"),".").concat(g[m++%g.length]);var r=Object(c.getParameter)("PROXY_SERVER_TYPE3");i=/sd-rtn/.test(t)?"".concat(r[0],"/ws/?h=").concat(i,"&p=").concat(e.port):"".concat(r[1],"/ws/?h=").concat(i,"&p=").concat(e.port),y.push(i)}else u.default.error("["+n.clientId+"] Invalid address format ",e)}),!y.length)return u.default.error("["+n.clientId+"] Empty Address response",h),s("EMPTY_ADDRESS_RESPONSE"),i("EMPTY_ADDRESS_RESPONSE");d.ticket=d.cert;var b={gateway_addr:y,uid:d.uid,cid:d.cid,vid:d.detail&&d.detail[8],res:d,detail:h.detail};s(null,b),i(null,{gatewayServers:b,turnServers:v})}catch(e){return u.default.error("[".concat(n.clientId,"] requestProxyServer failed with unexpected body "),e),a("UNEXPECTED_ERROR"),i("UNEXPECTED_ERROR")}},function(e,t){"timeout"===e.type?(a("REQUEST_PROXY_SERVER_TIME_OUT"),i("REQUEST_PROXY_SERVER_TIME_OUT")):(a("REQUEST_PROXY_SERVER_FAILED"),i("REQUEST_PROXY_SERVER_FAILED"))})}(e,m,t,function(e,i){e?(a++,u.default.error("[".concat(t.clientId,"] request ").concat(m," failed: ").concat(e)),e&&-1===p.JOIN_PROXY_RETRY_LIST.indexOf(e)&&(s=e),a===r.length&&(s||(s="RETRYABLE_ERROR"),n(s)),!(a%f)&&a<r.length&&(g++,v())):l&&(/sd-rtn/.test(i.gatewayServers.gateway_addr[0])?Object(c.setParameter)("NGINX",o[0]):Object(c.setParameter)("NGINX",o[1]),l=!1,n(null,i))},i)},v=function(){for(var e=g*f,t=e;t<Math.min(r.length,e+f);t++)m(r[t])};v()},_=n(13),S=n(29),w=n.n(S),E=n(30),T={},C={},I=function(e){return T[e]},R=function(e,t){C[e]=t},D=function(e,t,n,i,r,o){var s=(new Date).getTime(),a=t,l="";t.multiIP&&t.multiIP.gateway_ip&&(l={vocs_ip:[t.multiIP.uni_lbs_ip],vos_ip:[t.multiIP.gateway_ip]});var f=Object(c.getParameter)("AREA_SETTING").reduce(function(e,t,n){var i=Object(y.getAreaCodeByArea)(t);return i?0===n?i:"".concat(e,",").concat(i):e},""),g={appid:t.token,opid:133,client_ts:+new Date,sid:t.sid,request_bodies:[{uri:22,buffer:{cname:t.cname,detail:{5:l?JSON.stringify(l):void 0,6:t.stringUid,11:f},key:t.token,service_ids:[11],uid:t.uid||0}}]};Object(d.postFormData)(e,g,function(r){try{var l=JSON.parse(r),d=(l=l.response_body[0].buffer).code}catch(e){var f="requestChooseServer failed with unexpected body "+r;return u.default.error("["+a.clientId+"]",f),i(f,void 0,void 0,o)}if(d)return y=new RegExp(/10102\d{2}$/).test(d)?"NO_SERVICE_AVAILABLE":p.APErrorCode[l.code]||d,h.report.joinChooseServer(t.sid,{lts:s,succ:!1,csAddr:e,serverList:null,ec:y,chooseServerIp:l&&l.detail&&l.detail[502]}),i("Get server node failed ["+y+"]",e,y,o);var g=[],m=Object(c.getParameter)("GATEWAY_DOMAINS"),v=0;if(e.indexOf(m[1])>
1-1&&(v=1),l.edges_services.forEach(function(e){var t;e.ip&&e.port?(e.ip.match(/^[\.\:\d]+$/)?t="".concat(e.ip.replace(/[^\d]/g,"-"),".").concat(m[v++%m.length],":").concat(e.port):(u.default.info("["+a.clientId+"] "+"Cannot recognized as IP address ".concat(e.ip,". Used As Host instead")),t="".concat(e.ip,":").concat(e.port)),g.push(t)):u.default.error("["+a.clientId+"] Invalid address format ",e)}),!g.length){u.default.error("["+a.clientId+"] Empty Address response",l);var y="EMPTY_ADDRESS_RESPONSE";return h.report.joinChooseServer(t.sid,{lts:s,succ:!1,csAddr:e,serverList:null,ec:y,chooseServerIp:l&&l.detail&&l.detail[502]}),i("Get server node failed ["+y+"]",e,y,o)}return l.ticket=l.cert,n({gateway_addr:g,uid:l.uid,cid:l.cid,vid:l.detail&&l.detail[8],res:l,uni_lbs_ip:l.detail},e)},function(e,n){"timeout"===e.type?(h.report.joinChooseServer(t.sid,{lts:s,succ:!1,csAddr:n,serverList:null,ec:"timeout"}),i("Connect choose server timeout",n,void 0,o)):(h.report.joinChooseServer(t.sid,{lts:s,succ:!1,csAddr:n,serverList:null,ec:e.httpErrorCode||"server_wrong"}),i("Connect choose server error",n,void 0,o))})},A=function(e,t,n){var i=!1,r=null,o=1,s=1,a=e.clientId,l=function t(s,l){if(!i){var d=[];!function(e,t,n){var i,r=(new Date).getTime(),o=!1,s=0,a=0,l=Object(c.getParameter)("WEBCS_DOMAIN"),d=l.length,f=Object(c.getParameter)("WEBCS_DOMAIN_BACKUP_LIST"),g=f.length,m=Object(c.getParameter)("CHOOSE_SERVER_FRAGEMENT_LENGTH"),v=0,b=0,_=function(n,i){var s;try{s=n.res.detail[8]}catch(t){u.default.debug("["+e.clientId+"] get vid failed",t)}if(o)h.report.joinChooseServer(e.sid,{lts:r,succ:!0,csAddr:i,serverList:n.gateway_addr,cid:n.cid+"",uid:n.uid+"",ec:null,vid:s,chooseServerIp:n.res&&n.res.detail&&n.res.detail[502]},!1);else{if(clearTimeout(T),o=!0,e.proxyServer)for(var a=n.gateway_addr,l=0;l<a.length;l++){var c=a[l].split(":");n.gateway_addr[l]=e.proxyServer+"/ws/?h="+c[0]+"&p="+c[1]}t(n),h.report.joinChooseServer(e.sid,{lts:r,succ:!0,csAddr:i,serverList:n.gateway_addr,cid:n.cid+"",uid:n.uid+"",ec:null,vid:s,chooseServerIp:n.res&&n.res.detail&&n.res.detail[502]},!0)}},S=function(t,r,o,l){"domain"===l&&s++,"backup"===l&&a++,u.default.error("["+e.clientId+"]",t,r,o),o&&-1===p.JOIN_CS_RETRY_LIST.indexOf(o)&&(i=o),s===d&&a===g&&n(i),"domain"===l&&!(s%m)&&s<d&&(v++,w()),"backup"===l&&!(a%m)&&a<g&&(b++,E())},w=function t(){for(var n=v*m,i=n;i<Math.min(d,n+m);++i){var r;if("string"==typeof l[i]){var o=l[i];r=e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(o+"/api/v2/transpond/webrtc?v=2"):"https://".concat(o,"/api/v2/transpond/webrtc?v=2");var a=Object(y.getAreaCodeByWebCS)(o);u.default.debug("["+e.clientId+"] "+"Connect to choose_server: ".concat(r,", ").concat(a)),D(r,e,_,S,0,"domain")}else s++,u.default.error("["+e.clientId+"] Invalid Host",l[i]),i===n+m-1&&i<d-1-1&&(v++,t())}};w();var E=function t(){if(!o)for(var n=b*m,i=n;i<Math.min(g,n+m);i++){var r;if("string"==typeof f[i]){var s=f[i];r=e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(s+"/api/v2/transpond/webrtc?v=2"):"https://".concat(s,"/api/v2/transpond/webrtc?v=2");var l=Object(y.getAreaCodeByWebCS)(s);u.default.debug("["+e.clientId+"] "+"Connect to backup_choose_server: ".concat(r,", ").concat(l)),D(r,e,_,S,0,"backup")}else a++,u.default.error("["+e.clientId+"] Invalid Host",f[i]),i===n+m-1&&i<f-1-1&&(v++,t())}},T=setTimeout(E,1e3)}(e,function(t){i=!0,d=t,clearTimeout(r),C[a]!==_.a.DISCONNECTED&&C[a]!==_.a.DISCONNECTING?l&&l(d,null):u.default.debug("[".concat(e.clientId,"] Request gateway list success when connection state is ").concat(C[a]))},function(i){if(i)return u.default.info("["+e.clientId+"] Join failed: "+i),void(n&&n(i));if(C[a]===_.a.DISCONNECTED||C[a]===_.a.DISCONNECTING)return u.default.debug("[".concat(e.clientId,"] Request gateway list falied when connection state is ").concat(C[a])),void(n&&n("OPERATION_ABORT"));u.default.debug("["+e.clientId+"] Request gateway list will be restart in "+o+"s"),r=setTimeout(function(){t(s,l)},1e3*o),T[a]=r;var d=Object(c.getParameter)("AP_BACKOFF_MAX_TIME");o=o>=d?d:2*o})}}
1,d=function n(){!function(e,t){f(e,function(n,i){if(n)return t&&t(n);u.default.debug("["+e.clientId+"] getProxyServerList: ",i),m(e,i,t)})}(e,function(i,o){if(i){u.default.debug("["+e.clientId+"]",i),u.default.debug("["+e.clientId+"] Request proxy will be restart in "+s+"s"),r=setTimeout(function(){n()},1e3*s),T[a]=r;var d=Object(c.getParameter)("AP_BACKOFF_MAX_TIME");s=s>=d?d:2*s}else{clearTimeout(r);var p=o.address;e.proxyServer=p;var f={mode:"manual",url:o.address,tcpport:o.serverResponse.tcpport||"3433",udpport:o.serverResponse.udpport||"3478",username:o.serverResponse.username||"test",credential:o.serverResponse.password||Object(c.getParameter)("TURN_SERVER_PASSWORD"),forceturn:!0};f.tcpport+="",f.udpport+="",e.turnServers=[],e.turnServers.push(f),h.report.setProxyServer(p),u.default.setProxyServer(p),l(p,t)}})};e.useProxyServer?1==e.proxyServerType?d():2==e.proxyServerType?function n(){!function(e,t){f(e,function(n,i){return n?t&&t(n):(u.default.debug("["+e.clientId+"] getProxyServerList: ",i),t&&t(null,{address:i[0],serverResponse:{tcpport:"443",udpport:"3478",username:"test",password:"111111"}}))})}(e,function(i,o){if(i)return u.default.debug("["+e.clientId+"]",i),u.default.debug("["+e.clientId+"] Request proxy will be restart in "+s+"s"),r=setTimeout(function(){n()},1e3*s),T[a]=r,void(s=s>=3600?3600:2*s);clearTimeout(r);var d=Object(c.getParameter)("PROXY_SERVER_TYPE2");e.proxyServer=d;var p={mode:"manual",url:o.address,tcpport:o.serverResponse.tcpport||"3433",udpport:o.serverResponse.udpport||"3478",username:o.serverResponse.username||"test",credential:o.serverResponse.password||"111111",forceturn:!0};p.tcpport+="",p.udpport+="",e.turnServers=[],e.turnServers.push(p),h.report.setProxyServer(d),u.default.setProxyServer(d),l(d,t)})}():3==e.proxyServerType?function i(){b("proxy3",e,function(o,l){if(o)return"RETRYABLE_ERROR"!==o?n&&n(o):(u.default.debug("["+e.clientId+"]",o),u.default.debug("["+e.clientId+"] Request proxy will be restart in "+s+"s"),r=setTimeout(function(){i()},1e3*s),T[a]=r,void(s=s>=3600?3600:2*s));var d=l.gatewayServers,p=l.turnServers;clearTimeout(r);var f=Object(c.getParameter)("NGINX");e.proxyServer=f,e.turnServers=[];var g=Object(E.randomString)();p.map(function(t){var n={mode:"manual",url:t.ip,tcpport:"",udpport:t.port||"3478",username:t.username||g,credential:t.password||w()(g).toString(),forceturn:!0};n.tcpport+="",n.udpport+="",e.turnServers.push(n)}),h.report.setProxyServer(f),u.default.setProxyServer(f),t(d)})}():4==e.proxyServerType?function i(){b("proxy4",e,function(o,l){if(o)return"RETRYABLE_ERROR"!==o?n&&n(o):(u.default.debug("["+e.clientId+"]",o),u.default.debug("["+e.clientId+"] Request proxy will be restart in "+s+"s"),r=setTimeout(function(){i()},1e3*s),T[a]=r,void(s=s>=3600?3600:2*s));var d=l.gatewayServers,p=l.turnServers;clearTimeout(r);var f=Object(c.getParameter)("NGINX");e.proxyServer=f,e.turnServers=[];var g=Object(E.randomString)();p.map(function(t){var n={mode:"manual",url:t.ip,tcpport:t.port||"443",udpport:"",username:t.username||g,credential:t.password||w()(g).toString(),forceturn:!1};n.tcpport+="",n.udpport+="",e.turnServers.push(n)}),h.report.setProxyServer(f),u.default.setProxyServer(f),t(d)})}():5==e.proxyServerType?function i(){b("proxy5",e,function(o,l){if(o)return"RETRYABLE_ERROR"!==o?n&&n(o):(u.default.debug("["+e.clientId+"]",o),u.default.debug("["+e.clientId+"] Request proxy will be restart in "+s+"s"),r=setTimeout(function(){i()},1e3*s),T[a]=r,void(s=s>=3600?3600:2*s));var d=l.gatewayServers,p=l.turnServers;clearTimeout(r);var f=Object(c.getParameter)("NGINX");e.proxyServer=f,e.turnServers=[];var g=Object(E.randomString)();p.map(function(t){var n={mode:"manual",url:t.ip,tcpport:t.port||"443",udpport:"",username:t.username||g,credential:t.password||w()(g).toString(),forceturn:!1,useTurns:!0};n.tcpport+="",n.udpport+="",e.turnServers.push(n)}),h.report.setProxyServer(f),u.default.setProxyServer(f),t(d)},!0)}():d():l(null,t)},k=function(e,t,n,i,r){var o=Date.now(),s={sid:t.sid,opid:10,appid:t.appId,string_uid:i=i||t.stringUid};return new Promise(function(r,a){Object(d.post)(e+"".concat(-1===e.indexOf("?")?"?":"&","action=stringuid"),s,function(l){try{var c=JSON.parse(l),d=c.code}catch(r){var f="requestUserAccount failed with unexpected body "+l;return u.default.error("["+t.clientId+"]",f),a({retryable:!0,info:f,url:e,error:"UNEXPECTED_ERROR"}),n&&n.dispatchEvent({type:"error",reason:"USER_ACCOUNT_BODY_NOT_JSON"}),void h.report.reqUserAccount(s.sid,{lts:o,success:!1,serverAddress:e,stringUid:i,uid:null,extend:l,errorCode:"USER_ACCOUNT_BODY_NOT_JSON"})}if(d){var g=!1;return"INTERNAL_SERVER_ERROR"===(v=p.StringUidErrorCode[c.code%1e4]||"REQ_ACCOUNT_ERR_".concat(d))&&(g=!0),n&&n.dispatchEvent({type:"error",reason:v}),h.report.reqUserAccount(s.sid,{lts:o,success:!1,serverAddress:e,stringUid:i,uid:null,errorCode:v,extend:s}),a({retryable:g,info:f="Get String Uid Failed ["+v+"]",url:e,error:v})}var m=c.uid;if(!(m>0&&m<Math.pow(2,32))){u.default.error("["+t.clientId+"] "+"Invalid Uint Uid ".concat(i," => ").concat(m),c);var v="INVALID_UINT_UID_".concat(m);return n&&n.dispatchEvent({type:"error",reason:v}),h.report.reqUserAccount(s.sid,{lts:o,success:!1,serverAddress:e,stringUid:i,uid:null,errorCode:v,extend:s}),a({retryable:!0,error:v,info:"Get String Uid failed ["+v+"]",url:e})}r({uid:m,url:e}),h.report.reqUserAccount(s.sid,{lts:o,success:!0,serverAddress:e,stringUid:i,uid:m,errorCode:null,extend:s})},function(e,t){if("timeout"===e.type){var r="USER_ACCOUNT_TIMEOUT";n&&n.dispatchEvent({type:"error",reason:r}),h.report.reqUserAccount(s.sid,{lts:o,success:!1,serverAddress:t,stringUid:i,uid:null,errorCode:r,extend:s}),a({retryable:!0,info:r,url:t,error:r})}else{var l="USER_ACCOUNT_SERVER_WRONG_".concat(e.type);n&&n.dispatchEvent({type:"error",reason:l}),h.report.reqUserAccount(s.sid,{lts:o,success:!1,serverAddress:t,stringUid:i,uid:null,errorCode:l,extend:s}),a({retryable:!0,info:l,url:t,error:l})}},{"X-Packet-Service-Type":0,"X-Packet-URI":72})})},O=function(e,t,n){Date.now();var i,o=Object(c.getParameter)("ACCOUNT_REGISTER"),a=!1,d=Object(c.getParameter)("ACCOUNT_REGISTER_RETRY_TIMEOUT"),h=null,p=null,f=new Promise(function(){var f=l()(s.a.mark(function l(f,g){var m,v,y;return s.a.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:h=f,p=g,i=0;case 3:if(!(i<Object(c.getParameter)("ACCOUNT_REGISTER_RETRY_COUNT_MAX"))){l.next=33;break}if(!a){l.next=6;break}return l.abrupt("return");case 6:return m=o[i%o.length],v=e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(m+"/api/v1"):"https://".concat(m,"/api/v1"),l.prev=8,l.delegateYield(s.a.mark(function i(){var r;return s.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=3,k(v,e,t,n);case 3:if(r=i.sent,!a){i.next=6;break}return i.abrupt("return",{v:void 0});case 6:a=!0,setTimeout(function(){u.default.debug("Get UserAccount Successfully",r),h(r)},0);case 8:case"end":return i.stop()}},i)})(),"t0",10);case 10:if(y=l.t0,"object"!==r()(y)){l.next=13;break}return l.abrupt("return",y.v);case 13:l.next=30;break;
1case 15:if(l.prev=15,l.t1=l.catch(8),!a){l.next=19;break}return l.abrupt("return");case 19:if(!l.t1.retryable){l.next=27;break}return(d=Math.ceil(d*Object(c.getParameter)("ACCOUNT_REGISTER_RETRY_RATIO")))>Object(c.getParameter)("ACCOUNT_REGISTER_RETRY_TIMEOUT_MAX")&&(d=Object(c.getParameter)("ACCOUNT_REGISTER_RETRY_TIMEOUT_MAX")),u.default.error("".concat(l.t1.info," ").concat(l.t1.url," Will Fetch User Account in ").concat(d/1e3," seconds")),l.next=25,new Promise(function(e){setTimeout(e,d)});case 25:l.next=30;break;case 27:u.default.error("Get UserAccount Error: ".concat(l.t1.info," ").concat(l.t1.url),l.t1.error),a=!0,p(l.t1.error);case 30:i++,l.next=3;break;case 33:case"end":return l.stop()}},l,null,[[8,15]])}));return function(e,t){return f.apply(this,arguments)}}());return f.cancel=function(){a||(a=!0,p({info:"Request Cancelled",retryable:!1}))},f.isFinished=function(){return a},f}},function(e,t,n){"use strict";var i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o,s,a=r(n(0));!function(e){e.CHINA="CHINA",e.ASIA="ASIA",e.NORTH_AMERICA="NORTH_AMERICA",e.EUROPE="EUROPE",e.JAPAN="JAPAN",e.INDIA="INDIA",e.OCEANIA="OCEANIA",e.SOUTH_AMERICA="SOUTH_AMERICA",e.AFRICA="AFRICA",e.OVERSEA="OVERSEA",e.GLOBAL="GLOBAL"}(o||(o={})),t.AREAS=o,function(e){e.CHINA="CN",e.ASIA="AS",e.NORTH_AMERICA="NA",e.EUROPE="EU",e.JAPAN="JP",e.INDIA="IN",e.OCEANIA="OC",e.SOUTH_AMERICA="SA",e.AFRICA="AF",e.OVERSEA="OVERSEA",e.GLOBAL="GLOBAL"}(s||(s={}));var l={ASIA:{CODE:s.ASIA,WEBCS_DOMAIN:["ap-web-1-asia.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-asia.agora.io"],PROXY_CS:["proxy-ap-web-asia.agora.io"],CDS_AP:["cds-ap-web-asia.agora.io","cds-ap-web-asia2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-asia.agora.io","sua-ap-web-asia2.agora.io"],UAP_AP:["uap-ap-web-asia.agora.io","uap-ap-web-asia2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-asia.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-asia.agora.io"],LOG_UPLOAD_SERVER:["logservice-asia.agora.io"],NGINX:["southeast-asia.webrtc-cloud-proxy.sd-rtn.com"]},NORTH_AMERICA:{CODE:s.NORTH_AMERICA,WEBCS_DOMAIN:["ap-web-1-north-america.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-north-america.agora.io"],PROXY_CS:["proxy-ap-web-america.agora.io"],CDS_AP:["cds-ap-web-america.agora.io","cds-ap-web-america2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-america.agora.io","sua-ap-web-america2.agora.io"],UAP_AP:["uap-ap-web-america.agora.io","uap-ap-web-america2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-north-america.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-north-america.agora.io"],LOG_UPLOAD_SERVER:["logservice-north-america.agora.io"],NGINX:["east-usa.webrtc-cloud-proxy.sd-rtn.com"]},EUROPE:{CODE:s.EUROPE,WEBCS_DOMAIN:["ap-web-1-europe.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-europe.agora.io"],PROXY_CS:["proxy-ap-web-europe.agora.io"],CDS_AP:["cds-ap-web-europe.agora.io","cds-ap-web-europe2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-europe.agora.io","sua-ap-web-europe.agora.io"],UAP_AP:["uap-ap-web-europe.agora.io","uap-ap-web-europe2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-europe.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-europe.agora.io"],LOG_UPLOAD_SERVER:["logservice-europe.agora.io"],NGINX:["europe.webrtc-cloud-proxy.sd-rtn.com"]},JAPAN:{CODE:s.JAPAN,WEBCS_DOMAIN:["ap-web-1-japan.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-japan.agora.io"],PROXY_CS:["proxy-ap-web-japan.agora.io"],CDS_AP:["cds-ap-web-japan.agora.io","cds-ap-web-japan2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-japan.agora.io","sua-ap-web-japan2.agora.io"],UAP_AP:["uap-ap-web-japan.agora.io","\tuap-ap-web-japan2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-japan.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-japan.agora.io"],LOG_UPLOAD_SERVER:["logservice-japan.agora.io"],NGINX:["japan.webrtc-cloud-proxy.sd-rtn.com"]},INDIA:{CODE:s.INDIA,WEBCS_DOMAIN:["ap-web-1-india.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-india.agora.io"],PROXY_CS:["proxy-ap-web-india.agora.io"],CDS_AP:["cds-ap-web-india.agora.io","cds-ap-web-india2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-india.agora.io","sua-ap-web-india2.agora.io"],UAP_AP:["uap-ap-web-india.agora.io","uap-ap-web-india2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-india.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-india.agora.io"],LOG_UPLOAD_SERVER:["logservice-india.agora.io"],NGINX:["india.webrtc-cloud-proxy.sd-rtn.com"]},OVERSEA:{CODE:s.OVERSEA,WEBCS_DOMAIN:["ap-web-1-oversea.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-oversea.agora.io"],PROXY_CS:["proxy-ap-web-oversea.agora.io"],CDS_AP:["cds-ap-web-oversea.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-oversea.agora.io"],UAP_AP:["uap-ap-web-oversea.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-oversea.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-oversea.agora.io"],LOG_UPLOAD_SERVER:["logservice-oversea.agora.io"],NGINX:["webrtc-cloud-proxy.agora.io"]},GLOBAL:{CODE:s.GLOBAL,WEBCS_DOMAIN:["webrtc2-ap-web-1.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["webrtc2-ap-web-3.agora.io"],PROXY_CS:["ap-proxy-1.agora.io","ap-proxy-2.agora.io"],CDS_AP:["cds-ap-web-1.agora.io","cds-ap-web-3.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-1.agora.io","sua-ap-web-3.agora.io"],UAP_AP:["uap-ap-web-1.agora.io","uap-ap-web-3.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2.agora.io"],LOG_UPLOAD_SERVER:["logservice.agora.io"],NGINX:["webrtc-cloud-proxy.sd-rtn.com"]},OCEANIA:{CODE:s.OCEANIA,WEBCS_DOMAIN:["ap-web-1-oceania.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-oceania.agora.io"],PROXY_CS:["proxy-ap-web-oceania.agora.io"],CDS_AP:["cds-ap-web-oceania.agora.io","cds-ap-web-oceania2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-oceania.agora.io","sua-ap-web-oceania2.agora.io"],UAP_AP:["uap-ap-web-oceania.agora.io","uap-ap-web-oceania2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-oceania.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-oceania.agora.io"],LOG_UPLOAD_SERVER:["logservice-oceania.agora.io"],NGINX:["oceania.webrtc-cloud-proxy.sd-rtn.com"]},SOUTH_AMERICA:{CODE:s.SOUTH_AMERICA,WEBCS_DOMAIN:["ap-web-1-south-america.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-south-america.agora.io"],PROXY_CS:["proxy-ap-web-south-america.agora.io"],CDS_AP:["cds-ap-web-south-america.agora.io","cds-ap-web-south-america2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-south-america.agora.io","sua-ap-web-south-america2.agora.io"],UAP_AP:["uap-ap-web-south-america.agora.io","uap-ap-web-south-america2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-south-america.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-south-america.agora.io"],LOG_UPLOAD_SERVER:["logservice-south-america.agora.io"],NGINX:["south-america.webrtc-cloud-proxy.sd-rtn.com"]},AFRICA:{CODE:s.AFRICA,WEBCS_DOMAIN:["ap-web-1-africa.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-africa.agora.io"],PROXY_CS:["proxy-ap-web-africa.agora.io"],CDS_AP:["cds-ap-web-africa.agora.io","cds-ap-web-africa2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-africa.agora.io","sua-ap-web-africa2.agora.io"],UAP_AP:["uap-ap-web-africa.agora.io","uap-ap-web-africa2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-africa.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-africa.agora.io"],LOG_UPLOAD_SERVER:["logservice-south-africa.agora.io"],NGINX:["africa.webrtc-cloud-proxy.sd-rtn.com"]}};t.AREA_DOMAIN_MAP=l;var c={GLOBAL:{ASIA:[o.CHINA,o.JAPAN,o.INDIA],EUROPE:[],NORTH_AMERICA:[],SOUTH_AMERICA:[],OCEANIA:[],AFRICA:[]}},u=Object.keys(c[o.GLOBAL]),d=[o.CHINA,o.NORTH_AMERICA,o.EUROPE,o.ASIA,o.JAPAN,o.INDIA,o.OCEANIA,o.SOUTH_AMERICA,o.AFRICA];t.getAreaCodeByConfig=function(e){var t=e.areaCode,n=e.excludedArea;return n?function(e,t){var n=[];if("string"==typeof e&&(e=[e]),t&&!e.includes(o.GLOBAL)&&(n=e),t||(n=e),t&&e.includes(o.GLOBAL)){var r=[o.GLOBAL,o.OVERSEA],s=Object.keys(l);if(t===o.GLOBAL)throw new Error("Can not set excludedArea to 'GLOBAL'");if(t===o.CHINA)n=[o.OVERSEA];else if(u.includes(t)){var a=function(e){return void 0===e&&(e=""),c[o.GLOBAL][e]||[]}(t),h=i(r,[t],a);n=s.filter(function(e){return!h.includes(e)})}else if(function(e){var t=!1;return u.forEach(function(n){c.GLOBAL[n].includes(e)&&(t=!0)}),t}(t)){var p=function(e){void 0===e&&(e="");var t="";return u.forEach(function(n){c.GLOBAL[n].includes(e)&&(t=n)}),t}(t),f=i(r,[p,t]);n=s.filter(function(e){return!f.includes(e)})}else n=e;n=function(e){var t=[];return d.forEach(function(n){e.includes(n)&&t.push(n)}),t.concat(e.filter(function(e){return!d.includes(e)}))}(n)}return console.log("getAreaCodeAfterCalculation result",n),n}(t,n):t}
1,l.CHINA={CODE:s.CHINA,WEBCS_DOMAIN:["webrtc2-2.ap.sd-rtn.com"],WEBCS_DOMAIN_BACKUP_LIST:["webrtc2-4.ap.sd-rtn.com"],PROXY_CS:["proxy-web.ap.sd-rtn.com"],CDS_AP:["cds-web-2.ap.sd-rtn.com","cds-web-4.ap.sd-rtn.com"],ACCOUNT_REGISTER:["sua-web-2.ap.sd-rtn.com","sua-web-4.ap.sd-rtn.com"],UAP_AP:["uap-web-2.ap.sd-rtn.com","uap-web-4.ap.sd-rtn.com"],EVENT_REPORT_DOMAIN:["web-3.statscollector.sd-rtn.com"],EVENT_REPORT_BACKUP_DOMAIN:["web-4.statscollector.sd-rtn.com"],LOG_UPLOAD_SERVER:["logservice-china.agora.io"],NGINX:["east-cn.webrtc-cloud-proxy.sd-rtn.com"]},t.getAreaCodeByWebCS=function(e){for(var t=Object.keys(l),n=0;n<t.length;n++){var i=l[t[n]];if(i.WEBCS_DOMAIN.includes(e)||i.WEBCS_DOMAIN_BACKUP_LIST.includes(e))return i.CODE===s.OVERSEA?s.ASIA+","+s.EUROPE+","+s.AFRICA+","+s.NORTH_AMERICA+","+s.SOUTH_AMERICA+","+s.OCEANIA:i.CODE}},t.getAreaCodeByArea=function(e){return e===o.OVERSEA?s.ASIA+","+s.EUROPE+","+s.AFRICA+","+s.NORTH_AMERICA+","+s.SOUTH_AMERICA+","+s.OCEANIA:s[e]},t.getAreaDomainConfig=function(e){var t={WEBCS_DOMAIN:[],WEBCS_DOMAIN_BACKUP_LIST:[],PROXY_CS:[],CDS_AP:[],ACCOUNT_REGISTER:[],UAP_AP:[],EVENT_REPORT_DOMAIN:[],EVENT_REPORT_BACKUP_DOMAIN:[],LOG_UPLOAD_SERVER:[],NGINX:[]};return e.map(function(e){var n=l[e];if(n){var i=Object.keys(n);i?i.map(function(e){"CODE"!==e&&(t[e]=t[e].concat(n[e]))}):a.default.info(e+" is not exist")}else a.default.info(e+" is not exist")}),t}},function(e,t,n){"use strict";n.d(t,"a",function(){return C}),n.d(t,"b",function(){return I});var i=n(7),r=n.n(i),o=n(5),s=n(8),a=function(e){var t=Object(s.b)(e);return t.url=".",t},l=n(0),c=n(15),u=n(4),d=n(2),h=n(1),p=0,f=function(e){var t=a({});t.id=e.id,t.playerId=p++,t.destroyed=!1,t.fit=e.options&&e.options.fit,"contain"!==t.fit&&"cover"!==t.fit&&(t.fit=null),t.url=e.url,t.stream=e.stream.stream,t.peerVideoReady=!1,t.isFreeze=!1,t.freezeTimeCounterList=[],t.freezeCount=0,t.lastFreezeCount=0,t.lastTimeupdateTime=0,t.elementID=e.elementID,t.setAudioOutput=function(e,n,i){var r=t.video||t.audio;return r?r.setSinkId?void r.setSinkId(e).then(function(){return l.default.debug("["+t.id+"] "+"video ".concat(t.id," setAudioOutput ").concat(e," SUCCESS")),r==t.video&&t.audio?t.audio.setSinkId(e):Promise.resolve()}).then(function(){return l.default.debug("["+t.id+"] "+"audio ".concat(t.id," setAudioOutput ").concat(e," SUCCESS")),n&&n()}).catch(function(e){return l.default.error("["+t.id+"] VideoPlayer.setAudioOutput",e),i&&i(e)}):(l.default.error("["+t.id+"] ",u.default.WEB_API_NOT_SUPPORTED),i&&i(u.default.WEB_API_NOT_SUPPORTED)):(l.default.error("["+t.id+"] ",u.default.PLAYER_NOT_FOUND),i&&i(u.default.PLAYER_NOT_FOUND))},t.destroy=function(){l.default.debug("[".concat(t.id,"] destroy ").concat(e.stream.local?"local":"remote"," Player ").concat(t.id)),Object(c.setSrcObject)(t.video,null),Object(c.setSrcObject)(t.audio,null),t.video.load(),t.audio.load(),t.video.pause(),t.video.remove(),t.audio.remove(),t.freezeCheckInterval&&clearInterval(t.freezeCheckInterval),t.destroyed=!0,delete t.resizer,document.getElementById(t.div.id)&&t.parentNode.contains(t.div)&&t.div.remove()&&t.parentNode.removeChild(t.div),["video","audio"].forEach(function(n){var i=s[n];clearTimeout(i.playDeferTimeout),i.formerMediaState=null;var r={playerId:t.playerId,stateId:i.stateId+1,playDeferTimeout:null,error:!1,status:"aborted",reason:"stop",updatedAt:Date.now()};s[n]=r;var o={type:"player-status-change",playerId:t.playerId,mediaType:n,status:r.status,reason:r.reason,isErrorState:!1,streamId:t.id};l.default.debug("[".concat(t.id,"] Media Player Status Change Triggered by destroy()"),o),e.stream.dispatchEvent(o),h.report.reportApiInvoke(e.stream.sid,{name:"Stream.playerStatusChange",options:o,tag:"tracer"})()})},t.div=document.createElement("div"),t.div.setAttribute("id","player_"+t.id),t.div.setAttribute("style",e.stream.video?"width: 100%; height: 100%; position: relative; background-color: black; overflow: hidden;":"width: 100%; height: 100%; position: relative; overflow: hidden;"),t.video=document.createElement("video"),t.video.setAttribute("id","video"+t.id),t.video.setAttribute("style",e.stream.local&&!e.stream.screen?e.stream.mirror?"width: 100%; height: 100%; position: absolute; transform: rotateY(180deg); object-fit: ".concat(t.fit||"cover",";"):"width: 100%; height: 100%; position: absolute; object-fit: ".concat(t.fit||"cover",";"):e.stream.video?"width: 100%; height: 100%; position: absolute; object-fit: ".concat(t.fit||"cover",";"):e.stream.screen?"width: 100%; height: 100%; position: absolute; object-fit: ".concat(t.fit||"contain"):"width: 100%; height: 100%; position: absolute; display: none; object-fit: ".concat(t.fit||"cover"));var n={autoplay:!0,muted:!!e.stream.local||!(!o.isSafari()&&"iOS"!==o.getBrowserOS())&&"video_element_muted",playsinline:!0,controls:!1,volume:null},i=r()({},n,e.options);!0!==i.muted||i.volume||(i.volume=0),t.video.setAttribute("autoplay",""),t.video.setAttribute("muted",""),t.video.muted=!0,t.video.autoplay=!0,i.playsinline&&t.video.setAttribute("playsinline",""),i.controls&&t.video.setAttribute("controls",""),i.contains&&(t.video.controls=!0),Number.isFinite(i.volume)&&(t.video.volume=i.volume),t.audio=document.createElement("audio"),t.audio.setAttribute("id","audio"+t.id),!0===i.muted&&t.audio.setAttribute("muted",""),!0===i.muted&&(t.audio.muted=!0),i.playsinline&&t.audio.setAttribute("playsinline",""),Number.isFinite(i.volume)&&(t.audio.volume=i.volume),void 0!==t.elementID?(document.getElementById(t.elementID).appendChild(t.div),t.container=document.getElementById(t.elementID)):(document.body.appendChild(t.div),t.container=document.body),t.parentNode=t.div.parentNode;var s={video:{playerId:t.playerId,stateId:0,playDeferTimeout:null,error:!1,status:"init",reason:null,updatedAt:Date.now()},audio:{playerId:t.playerId,stateId:0,playDeferTimeout:null,error:!1,status:"init",reason:null,updatedAt:Date.now()}};t.mediaElemExists=function(e){for(var t=e,n=0;n<Object(d.getParameter)("MEDIA_ELEMENT_EXISTS_DEPTH")&&t;n++)t=t.parentNode;return!!t};var f=function(e){return t.mediaElemExists(e)?e.paused?"paused":"play":"aborted"},g=function(e,t,n){var i=f(e),r=!0;return"paused"===i?("audio"===t&&!0===n.muted&&(r=!1),n.autoplay||(r=!1)):"play"===i?"video"===t?r=!1:!0===n.muted?e.muted&&(r=!1):e.muted||(r=!1):"aborted"===i&&(r=!1),r},m=function(n){var r,o=this;if(o===t.video?r="video":o===t.audio&&(r="audio"),r){if(n.type||l.default.error("[".concat(t.id,"] Unexpected evt"),n),"video"===r&&o.muted&&o.paused)return l.default.debug("[".concat(t.id,"] auto resume video element")),void o.play();var a=f(o);clearTimeout(s[r].playDeferTimeout),s[r].playDeferTimeout=setTimeout(function(){s[r].playDeferTimeout=null;var c=s[r],u=f(o);if(a===u){var d={playerId:t.playerId,stateId:c.stateId+1,playDeferTimeout:null,error:g(o,r,i),status:f(o),reason:n.type,updatedAt:Date.now()};if(c.status!==d.status){s[r]=d;var p={type:"player-status-change",playerId:t.playerId,mediaType:r,status:d.status,reason:d.reason,isErrorState:d.error,streamId:t.id};l.default.debug("[".concat(t.id,"] Media Player Status Change"),p),e.stream.dispatchEvent(p),h.report.reportApiInvoke(e.stream.sid,{name:"Stream.playerStatusChange",options:p,tag:"tracer"})()}}else l.default.debug("[".concat(t.id,"] Status Change after event Triggered.")+"Stream ".concat(t.id," PlayerId ").concat(t.playerId," mediaType ").concat(r," Status ").concat(a,"=>").concat(u))},Object(d.getParameter)("PLAYER_STATE_DEFER"))}else l.default.error("[".concat(t.id,"] Unknown media element"),o)};t.video.addEventListener("playing",function(e){!function e(){t.video.videoWidth*t.video.videoHeight>4?l.default.debug("["+t.id+"] video dimensions:",t.video.videoWidth,t.video.videoHeight):setTimeout(e,50)}()});var v=0,y=0,b=0;t.freezeCheckInterval=setInterval(function(){Date.now()-t.lastTimeupdateTime>500&&t.peerVideoReady?(t.isFreeze=!0,t.freezeCount+=1):t.isFreeze=!1},500),t.video.addEventListener("playing",m),t.video.addEventListener("canplay",m),t.video.addEventListener("abort",m),t.video.addEventListener("onerror",m),t.video.addEventListener("suspend",m),t.video.addEventListener("stalled",m),t.video.addEventListener("pause",m),t.audio.addEventListener("playing",m),t.audio.addEventListener("canplay",m),t.audio.addEventListener("abort",m),t.audio.addEventListener("onerror",m),t.audio.addEventListener("suspend",m),t.audio.addEventListener("stalled",m),t.audio.addEventListener("pause",m);var _=t.audio,S="audio";if(e.stream.hasVideo()||e.stream.hasScreen())t.div.appendChild(t.video),t.div.appendChild(t.audio),o.isEdge(
1)?t.video.srcObject=e.stream.stream:(Object(c.attachMediaStream)(t.video,e.stream.stream),Object(c.attachMediaStream)(t.audio,e.stream.stream)),t.video.addEventListener("timeupdate",function(){var e=Date.now();if((v+=1)<10)t.lastTimeupdateTime=e;else for(e-t.lastTimeupdateTime>500&&(t.peerVideoReady?y+=e-t.lastTimeupdateTime:t.peerVideoReady=!0),b+=e-t.lastTimeupdateTime,t.lastTimeupdateTime=e;b>=6e3;)b-=6e3,t.freezeTimeCounterList.push(Math.min(6e3,y)),y-=6e3,y=Math.max(y,0)});else{!1!==i.muted&&"video_element_muted"!==i.muted||(t.video.removeAttribute("muted"),t.video.muted=!1),t.video.removeAttribute("autoplay"),t.video.autoplay=!1,t.div.appendChild(t.video),_=t.video,S="video";var w={playerId:t.playerId,stateId:s.audio.stateId+1,playDeferTimeout:null,error:!1,status:"aborted",reason:"audioonly",updatedAt:Date.now()};s.audio=w;var E={type:"player-status-change",playerId:t.playerId,mediaType:"audio",status:w.status,reason:w.reason,isErrorState:w.error,streamId:t.id};if(l.default.debug("[".concat(t.id,"] Media Player Status Change"),E),Promise.resolve().then(function(){return e.stream.dispatchEvent(E)}),h.report.reportApiInvoke(e.stream.sid,{name:"Stream.playerStatusChange",options:E,tag:"tracer"})(),window.MediaStream&&(o.isSafari()||"iOS"===o.getBrowserOS())){var T=new MediaStream(e.stream.stream.getAudioTracks());Object(c.setSrcObject)(t.video,T)}else Object(c.setSrcObject)(t.video,e.stream.stream)}if(i.autoplay&&_){var C=_.play();C&&C.catch&&C.catch(function(n){if(!t.destroyed&&_){var r=s[S],o={playerId:t.playerId,stateId:r.stateId+1,playDeferTimeout:null,error:g(_,S,i),status:f(_),reason:"error",updatedAt:Date.now()};if(r.status!==o.status){l.default.debug("[".concat(t.id,"] Player ").concat(t.playerId," Status Changed Detected by promise error: ").concat(r.status,"=>").concat(o.status),n),s[S]=o;var a={type:"player-status-change",playerId:t.playerId,mediaType:S,status:o.status,reason:o.reason,isErrorState:o.error,streamId:t.id};l.default.debug("[".concat(t.id,"] Media Player Status Change"),a),e.stream.dispatchEvent(a),h.report.reportApiInvoke(e.stream.sid,{name:"Stream.playerStatusChange",options:a,tag:"tracer"})()}}})}return t.setAudioVolume=function(e){var n=parseInt(e)/100;isFinite(n)&&(n<0?n=0:n>1&&(n=1),t.video&&(t.video.volume=n),t.audio&&(t.audio.volume=n))},t},g=n(23),m=n(10),v=n(6),y=n(19),b=n(3),_=n(25),S=n(16),w=n(11),E=n.n(w),T=function(e){Object(b.checkValidString)(e,"profileName"),-1===(e=e.toLowerCase()).indexOf("_")&&(e+="_1"),Object(b.checkValidEnum)(e,"profileName",Object.keys(d.SUPPORT_RESOLUTION_LIST));var t=d.SUPPORT_RESOLUTION_LIST[e];t||(e=Object(d.getParameter)("DEFAULT_PROFILE"),t=d.SUPPORT_RESOLUTION_LIST[e]);var n={profileName:e,video:{width:t[0],height:t[1]},attributes:{resolution:"".concat(t[0],"x").concat(t[1]),minFrameRate:t[2],maxFrameRate:t[3],minVideoBW:t[4],maxVideoBW:t[5]}};return t[2]&&(n.video.frameRate=t[2]),t[6]&&t[7]&&(n.screen={width:t[0],height:t[1],frameRate:{min:t[6],max:t[7]}}),n},C=function(e){var t=Object(s.b)();if(t.params=r()({},e),t.stream=e.stream,t.url=e.url,t.onClose=void 0,t.local=!1,t.videoSource=e.videoSource,t.audioSource=e.audioSource,e.video=!(!e.videoSource&&!e.video),t.video=e.video,e.audio=!(!e.audioSource&&!e.audio),t.audio=e.audio,t.screen=!!e.screen,t.screenAudio=!!e.screenAudio,t.screenAttributes={width:1920,height:1080,maxFr:5,minFr:1},t.videoSize=e.videoSize,t.player=void 0,t.audioLevelHelper=null,e.attributes=e.attributes||{},t.attributes=e.attributes,t.microphoneId=e.microphoneId,t.cameraId=e.cameraId,t.facingMode=e.facingMode,t.inSwitchDevice=!1,t.userMuteVideo=!1,t.userMuteAudio=!1,t.peerMuteVideo=!1,t.peerMuteAudio=!1,t.lowStream=null,t.videoWidth=0,t.videoHeight=0,t.streamId=e.streamID,t.userId=null,t.uintId=e.uintUID||null,t.mirror=!1!==e.mirror,t.DTX=e.audioProcessing&&e.audioProcessing.DTX,t.audioProcessing=e.audioProcessing,t.optimizationMode=e.optimizationMode,t.highQuality=!1,t.stereo=!1,t.speech=!1,t.screen||delete t.screen,!(void 0===t.videoSize||t.videoSize instanceof Array&&4===t.videoSize.length))throw Error("Invalid Video Size");function n(){var e={};t.getVideoTrack()===this?(l.default.debug("Video Track Ended"),e.type="videoTrackEnded",e.track=this):t.getAudioTrack()===this?(l.default.debug("Audio Track Ended"),e.type="audioTrackEnded",e.track=this):l.default.debug("Detached Track ended",this.kind,this.label,this),e.type&&t.dispatchEvent(e)}return t.videoSize=[640,480,640,480],void 0!==e.local&&!0!==e.local||(t.local=!0),t.initialized=!t.local,t._streamInitID=null,function(e){e.audioMixing={audioContextInited:!1,defaultVolume:100,inEarMonitoring:"FILE",sounds:{},states:{IDLE:"IDLE",STARTING:"STARTING",BUSY:"BUSY",PAUSED:"PAUSED"},inEarMonitoringModes:{NONE:"NONE",FILE:"FILE",MICROPHONE:"MOCROPHONE",ALL:"ALL"},ctx:null,mediaStreamSource:null,mediaStreamDest:null,buffer:{}},e._initSoundIfNotExists=function(t,n){e.audioMixing.sounds[t]||(e.audioMixing.sounds[t]={soundId:t,state:"IDLE",muted:e.userMuteAudio,filePath:n,volume:e.audioMixing.defaultVolume,startAt:null,startOffset:null,pauseAt:null,pauseOffset:null,resumeAt:null,resumeOffset:null,stopAt:null,options:null,source:null})},e._initSoundIfNotExists(-1),e.loadAudioBuffer=function(t,n,i){var r=h.report.reportApiInvoke(e.sid,{callback:i,name:"Stream.loadAudioBuffer",options:arguments,tag:"tracer"});Object(b.checkValidString)(n,"url",1,1024,!1),Object(b.checkValidString)(t,"id",1,1024,!1);var o=function(t){l.default.error("[".concat(e.streamId,"] loadAudioBuffer Failed: ")+t),r(u.default.LOAD_AUDIO_FAILED)},s=new XMLHttpRequest;s.open("GET",n,!0),s.responseType="arraybuffer",s.onload=function(){if(s.status>400)o("".concat(s.status," ").concat(s.statusText));else{var n=s.response;e.audioMixing.audioContextInited||e._initAudioContext(),e.audioMixing.ctx.decodeAudioData(n,function(n){e.audioMixing.buffer[t]=n,r(null)},function(t){l.default.error("[".concat(e.streamId,"] decodeAudioData Failed: "),t),r(t)})}},s.onerror=function(){return o("load error")},s.ontimeout=function(){return o("timeout")},s.send()},e.createAudioBufferSource=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.createAudioBufferSource",options:arguments,tag:"tracer"});if(e.audioMixing.buffer[t.id]){var i=e.audioMixing.buffer[t.id],r=e.audioMixing.ctx.createBufferSource();r.buffer=i;var s=e.audioMixing.ctx.createGain();r.connect(s),s.connect(e.audioMixing.mediaStreamDest),r.gainNode=s,t.loop?(r.loop=!0,r.start(0,t.playTime/1e3)):t.cycle>1?Object(o.isChrome)()?(r.loop=!0,r.start(0,t.playTime/1e3,(t.cycle*i.duration*1e3-(t.playT
1ime||0))/1e3)):(l.default.warning("[".concat(e.streamId,"] Cycle Param is ignored by current browser")),r.start(0,t.playTime/1e3)):r.start(0,t.playTime/1e3);var a=e.audioMixing.sounds[t.soundId];return a.source=r,e._flushAudioMixingMuteStatus(),r.addEventListener("ended",function(){r===a.source&&e.dispatchEvent({type:"audioSourceEnded",soundId:t.soundId,source:r,sound:a})}),n(),r}return l.default.error("[".concat(e.streamId,"] "),"AUDIOBUFFER_NOT_FOUND",t.id),n(!1),!1},e.on("audioSourceEnded",function(t){var n=t.source,i=t.sound;i&&i.state===e.audioMixing.states.BUSY&&!i.pauseAt&&(i.state=e.audioMixing.states.IDLE,i.startAt=null,i.startOffset=null,i.resumeAt=null,i.resumeOffset=null,n.gainNode&&n.gainNode.disconnect&&n.gainNode.disconnect(),n.buffer=null,e.audioMixing.mediaStreamSource.connect(e.audioMixing.mediaStreamDest))}),e.clearAudioBufferSource=function(){e.audioBufferSource.forEach(function(e){e.stop()})},e._isSoundExists=function(t){return!!e.audioMixing.sounds[t.soundId]||(l.default.error("SoundId not exists. #".concat(t.soundId)),!1)},e._initAudioContext=function(){if(e.audioMixing.audioContextInited)throw new Error("Failed to init audio context. Already inited");if(!e.stream)throw new Error("Failed to init audio context. Local Stream not initialized");e.audioMixing.ctx=Object(_.a)(),e.audioMixing.mediaStreamSource=e.audioMixing.ctx.createMediaStreamSource(e.stream),e.audioMixing.mediaStreamDest=e.audioMixing.ctx.createMediaStreamDestination(),e.audioMixing.mediaStreamSource.connect(e.audioMixing.mediaStreamDest);var t=e.stream.getVideoTracks()[0];if(t&&e.audioMixing.mediaStreamDest.stream.addTrack(t),e._originStream=e.stream,e._isAudioMuted()?(e._unmuteAudio(),e.stream=e.audioMixing.mediaStreamDest.stream,e._muteAudio()):e.stream=e.audioMixing.mediaStreamDest.stream,e.audioLevelHelper=null,e.pc&&e.pc.peerConnection&&e.pc.peerConnection){var n=(e.pc.peerConnection&&e.pc.peerConnection.getSenders()).find(function(e){return e&&e.track&&"audio"==e.track.kind}),i=e.audioMixing.mediaStreamDest.stream.getAudioTracks()[0];n&&n.replaceTrack&&i&&n.replaceTrack(i)}e.audioMixing.audioContextInited=!0},e._cleanupAudioMixing=function(){if(e.audioMixing.audioContextInited){for(var t in e.audioMixing.sounds){var n=e.audioMixing.sounds[t];n.state!==e.audioMixing.states.BUSY&&n.state!==e.audioMixing.states.PAUSED||e._stopOneEffect({soundId:t})}e.audioLevelHelper=null,e.audioMixing.audioContextInited=!1}},e._reloadInEarMonitoringMode=function(t){if(t){if(!e.audioMixing.inEarMonitoringModes[t])return l.default.error("[".concat(e.streamId,"] Invalid InEarMonitoringMode ").concat(t));e.audioMixing.inEarMonitoring=t}switch(e.audioMixing.audioContextInited||e._initAudioContext(),e.audioMixing.inEarMonitoring){case e.audioMixing.inEarMonitoringModes.FILE:e.audioMixing.mediaStreamSource.connectedToDestination&&(e.audioMixing.mediaStreamSource.disconnect(e.audioMixing.ctx.destination),e.audioMixing.mediaStreamSource.connectedToDestination=!1);case e.audioMixing.inEarMonitoringModes.ALL:for(var n in e.audioMixing.sounds){var i=e.audioMixing.sounds[n];i&&i.source&&!i.source.connectedToDestination&&(i.source.gainNode.connect(e.audioMixing.ctx.destination),i.source.connectedToDestination=!0)}}switch(e.audioMixing.inEarMonitoring){case e.audioMixing.inEarMonitoringModes.MICROPHONE:e.audioMixing.source.forEach(function(t){t.connectedToDestination&&(t.gainNode.disconnect(e.audioMixing.ctx.destination),t.connectedToDestination=!1)});case e.audioMixing.inEarMonitoringModes.ALL:e.audioMixing.mediaStreamSource.connectedToDestination||(e.audioMixing.mediaStreamSource.connect(e.audioMixing.ctx.destination),e.audioMixing.mediaStreamSource.connectedToDestination=!0)}},e._startAudioMixingBufferSource=function(t){e.audioMixing.audioContextInited||e._initAudioContext();var n=t.replace,i=e.createAudioBufferSource({soundId:t.soundId,id:t.filePath,loop:t.loop,cycle:t.cycle,playT
1ime:t.playTime||0});return i.sound=e.audioMixing.sounds[t.soundId],i?(i.addEventListener("ended",e._audioMixingFinishedListener,{once:!0}),e._reloadInEarMonitoringMode(),n&&e.audioMixing.mediaStreamSource.disconnect(e.audioMixing.mediaStreamDest),i):null},e._stopAudioMixingBufferSource=function(t){var n=e.audioMixing.sounds[t.soundId].source;return n?(n.removeEventListener("ended",e._audioMixingFinishedListener),e.audioMixing.mediaStreamSource.connect(e.audioMixing.mediaStreamDest),n.stop(),n.gainNode&&n.gainNode.disconnect&&n.gainNode.disconnect(),n.buffer=null,n):null},e._flushAudioMixingMuteStatus=function(t){for(var n in e.audioMixing.sounds){var i=e.audioMixing.sounds[n];i&&(void 0!==t&&(i.muted=!!t),i.source&&(i.source.gainNode.gain.value=i.muted?0:i.volume/100))}},e._handleAudioMixingInvalidStateError=function(t,n,i){var r=e.audioMixing.sounds[n.soundId],o=-1===n.soundId?"INVALID_AUDIO_MIXING_STATE":"INVALID_PLAY_EFFECT_STATE";l.default.error("[".concat(e.streamId,"] Cannot ").concat(t,": ").concat(o,", state is ").concat(r.state)),i&&i(o)},e._handleAudioMixingNoSourceError=function(t,n,i){e.audioMixing.sounds[n.soundId].state=e.audioMixing.states.IDLE;var r=-1===n.soundId?"NO_AUDIO_MIXING_SOURCE":"NO_EFFECT_SOURCE";l.default.error("[".concat(e.streamId,"] Cannot ").concat(t,": ").concat(r)),i&&i(r)},e._getOneEffectStates=function(t){var n=e.audioMixing.sounds[t.soundId];return function(){return n?{state:n.state,startAt:n.startAt,resumeAt:n.resumeAt,pauseOffset:n.pauseOffset,pauseAt:n.pauseAt,resumeOffset:n.resumeOffset,stopAt:n.stopAt,duration:e._getOneEffectDuration(t),position:e._getOneEffectCurrentPosition(t)}:{}}},e._audioMixingFinishedListener=function(){var t=this.sound;t.state===e.audioMixing.states.IDLE&&e.audioMixing.buffer[t.options.filePath]&&!t.options.cacheResource&&(l.default.debug("Recycled buffer ".concat(t.options.filePath)),delete e.audioMixing.buffer[t.options.filePath]),-1===t.soundId&&e.dispatchEvent({type:"audioMixingFinished"})},e._playOneEffect=function(t,n){Object(b.checkValidObject)(t,"options");var i=t.soundId,r=t.cacheResource;if(Object(o.isSafari)()&&Object(o.getBrowserVersion)()<12){var s="BROWSER_NOT_SUPPORT";return l.default.error("[".concat(e.streamId,"] Cannot _playOneEffect: "),s),n(s)}e.audioMixing.audioContextInited||e._initAudioContext(),e._initSoundIfNotExists(i);var a=e.audioMixing.sounds[i];if(a.state===e.audioMixing.states.IDLE){if(void 0!==t.cycle&&!t.cycle>0)return s="Invalid Parmeter cycle: "+t.cycle,l.default.error("[".concat(e.streamId,"] ").concat(i),s),n(s);if(Object(b.isEmpty)(r)&&(t.cacheResource=!0),a.state=e.audioMixing.states.STARTING,a.options=t,e.audioMixing.buffer[t.filePath]){var c=e._startAudioMixingBufferSource(t);if(c)return a.source=c,a.startAt=Date.now(),a.resumeAt=null,a.pauseOffset=null,a.pauseAt=null,a.resumeOffset=null,a.stopAt=null,a.startOffset=t.playTime||0,a.state=e.audioMixing.states.BUSY,e._flushAudioMixingMuteStatus(),n(null);a.state=e.audioMixing.states.IDLE;var u="CREATE_BUFFERSOURCE_FAILED";if(n)return n(u);l.default.error("[".concat(e.streamId,"] "),u)}else e.loadAudioBuffer(t.filePath,t.filePath,function(i){if(i)a.state=e.audioMixing.states.IDLE,n?n(i):l.default.error("[".concat(e.streamId,"] "),i);else{var r=e._startAudioMixingBufferSource(t);if(r)return a.source=r,a.startAt=Date.now(),a.resumeAt=null,a.pauseOffset=null,a.pauseAt=null,a.resumeOffset=null,a.stopAt=null,a.startOffset=t.playTime||0,a.state=e.audioMixing.states.BUSY,e._flushAudioMixingMuteStatus(),n(null);if(a.state=e.audioMixing.states.IDLE,i="CREATE_BUFFERSOURCE_FAILED",n)return n(i);l.default.error("[".concat(e.streamId,"] "),i)}})}else e._handleAudioMixingInvalidStateError("_playEffect",t,n)},e._stopOneEffect=function(t,n){var i=e.audioMixing.sounds[t.soundId];return e._isSoundExists(t)?i.state===e.audioMixing.states.BUSY||i.state===e.audioMixing.states.PAUSED?(e._stopAudioMixingBufferSource(t),i.stopAt=Date.now(),i.state=e.audioMixing.states.IDLE,e.audioMixing.buffer[i.options.filePath]&&!i.options.cacheResource&&(l.default.debug("Recycled buffer ".concat(i.options.filePath)),delete e.audioMixing.buffer[i.options.filePath]),void(n&&n(null))):void e._handleAudioMixingInvalidStateError("_stopOneEffect",t,n):n("SOUND_NOT_EXISTS")},e._pauseOneEffect=function(t,n){var i=e.audioMixing.sounds[t.soundId];if(i.state===e.audioMixing.states.BUSY)return e._stopAudioMixingBufferSource(t)?(i.pauseAt=Date.now(),i.state=e.audioMixing.states.PAUSED,i.pauseOffset=i.resumeAt?i.pauseAt-i.resumeAt+i.resumeOffset:i.pauseAt-i.startAt+i.startOffset,n&&n(null)):void e._handleAudioMixingNoSourceError("_pauseOneEffect",t,n);e._handleAudioMixingInvalidStateError("_pauseOneEffect",t,n)},e._resumeOneEffect=function(t,n){var i=e.audioMixing.sounds[t.soundId];if(i.state===e.audioMixing.states.PAUSED){var r=e._startAudioMixingBufferSource({soundId:t.soundId,filePath:i.options.filePath,cycle:i.options.cycle,loop:i.options.loop,playTime:i.pauseOffset,replace:i.options.replace});if(!r){var o="CREATE_BUFFERSOURCE_FAILED";return n(o),void l.default.error("[".concat(e.streamId,"] "),o)}
1i.source=r,i.resumeAt=Date.now(),i.resumeOffset=i.pauseOffset,i.state=e.audioMixing.states.BUSY,i.pauseAt=null,i.pauseOffset=null,n(null)}else e._handleAudioMixingInvalidStateError("_resumeOneEffect",t,n)},e._getOneEffectDuration=function(t){var n=e.audioMixing.sounds[t.soundId];return n.options&&n.options.filePath&&e.audioMixing.buffer[n.options.filePath]?1e3*e.audioMixing.buffer[n.options.filePath].duration:null},e._getOneEffectCurrentPosition=function(t,n){var i=e.audioMixing.sounds[t.soundId];return i.state===e.audioMixing.states.PAUSED?i.pauseOffset%e._getOneEffectDuration(t):i.state===e.audioMixing.states.BUSY?i.resumeAt?(Date.now()-i.resumeAt+i.resumeOffset)%e._getOneEffectDuration(t):(Date.now()-i.startAt+i.startOffset)%e._getOneEffectDuration(t):void(n&&e._handleAudioMixingInvalidStateError("_getOneEffectCurrentPosition",t))},e._setOneEffectPosition=function(t,n,i){var r=e.audioMixing.sounds[t.soundId];if(r.state===e.audioMixing.states.BUSY){if(!e._stopAudioMixingBufferSource(t))return void e._handleAudioMixingNoSourceError("_setOneEffectPosition",t,i);var o=e._startAudioMixingBufferSource({soundId:t.soundId,filePath:r.options.filePath,loop:r.options.loop,cycle:r.options.cycle,playTime:n});if(!o){var s="CREATE_BUFFERSOURCE_FAILED";return i&&i(s),void l.default.error("[".concat(e.streamId,"] "),s)}r.source=o,r.startAt=Date.now(),r.startOffset=n,r.resumeAt=null,r.resumeOffset=null,r.pauseOffset=null,r.pauseAt=null}else{if(r.state!==e.audioMixing.states.PAUSED)return void e._handleAudioMixingInvalidStateError("_setOneEffectPosition",t,i);r.pauseOffset=n}i&&i(null)},e.startAudioMixing=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:function(t){if(t)return n&&n(t);e.dispatchEvent({type:"audioMixingPlayed"}),n&&n(null)},getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.startAudioMixing",options:t});Object(b.checkValidObject)(t,"options");var o=t.filePath,s=t.cacheResource,a=t.cycle,l=t.loop,c=t.playTime,u=t.replace;Object(b.checkValidString)(o,"filePath",1,Object(d.getParameter)("FILEPATH_LENMAX"),!1),Object(b.checkValidNumber)(c,"playTime",0,1e8),!Object(b.isEmpty)(a)&&Object(b.checkValidNumber)(a,"cycle"),!Object(b.isEmpty)(l)&&Object(b.checkValidBoolean)(l,"loop"),!Object(b.isEmpty)(u)&&Object(b.checkValidBoolean)(u,"replace"),!Object(b.isEmpty)(s)&&Object(b.checkValidBoolean)(s,"cacheResource");var p=r()({soundId:-1},t);e._playOneEffect(p,i)},e.stopAudioMixing=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:t,getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.stopAudioMixing"});e._stopOneEffect({soundId:-1},n)},e.pauseAudioMixing=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:t,getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.pauseAudioMixing"});return e._pauseOneEffect({soundId:-1},n)},e.resumeAudioMixing=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:function(n,i){if(n)return t&&t(n);e.dispatchEvent({type:"audioMixingPlayed"}),t&&t(null)},getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.resumeAudioMixing"});e._resumeOneEffect({soundId:-1},n)},e.adjustAudioMixingVolume=function(t){var n=h.report.reportApiInvoke(e.sid,{getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.adjustAudioMixingVolume",options:arguments,tag:"tracer"});Object(b.checkValidNumber)(t,"volume",0,100),e.audioMixing.sounds[-1].volume=t,e._flushAudioMixingMuteStatus(),n()},e.getAudioMixingDuration=function(){var t=h.report.reportApiInvoke(e.sid,{getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.getAudioMixingDuration"}),n=e._getOneEffectDuration({soundId:-1});return t(null,n),n},e.getAudioMixingCurrentPosition=function(){var t=h.report.reportApiInvoke(e.sid,{getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.getAudioMixingCurrentPosition"}),n=e._getOneEffectCurrentPosition({soundId:-1},!0);return t(null,n),n},e.setAudioMixingPosition=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:n,options:arguments,tag:"tracer",getStates:e._getOneEffectStates({soundId:-1}),name:"Stream.setAudioMixingPosition"});Object(b.checkValidNumber)(t,"position",0,1e8),e._setOneEffectPosition({soundId:-1},t,i)},e.playEffect=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:function(t){if(t)return n&&n(t);e.dispatchEvent({type:"effectPlayed"}),n&&n(null)},name:"Stream.playEffect",options:t});Object(b.checkValidObject)(t,"options");var r=t.soundId,o=t.filePath,s=t.cycle;Object(b.checkValidNumber)(r,"soundId",1,1e4),Object(b.checkValidString)(o,"filePath",0,Ob
1ject(d.getParameter)("FILEPATH_LENMAX"),!1),!Object(b.isEmpty)(s)&&Object(b.checkValidNumber)(s,"cycle"),e._playOneEffect(t,i)},e.stopEffect=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:n,getStates:e._getOneEffectStates({soundId:t}),name:"Stream.stopEffect"});Object(b.checkValidNumber)(t,"soundId",1,1e4),e._stopOneEffect({soundId:t},i)},e.stopAllEffects=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:t,name:"Stream.stopAllEffect"}),i=!1,r=0,o=0,s=function(e){i||(e?(n(e),i=!0):r+=1,r===o&&(n(null),i=!0))};for(var a in e.audioMixing.sounds){var l=e.audioMixing.sounds[a];-1!==l.soundId&&(l.state!==e.audioMixing.states.BUSY&&l.state!==e.audioMixing.states.PAUSED||(o++,e._stopOneEffect({soundId:a},s)))}o||n(null)},e.preloadEffect=function(t,n,i){var r=h.report.reportApiInvoke(e.sid,{callback:i,options:arguments,tag:"tracer",name:"Stream.preloadEffect"});Object(b.checkValidNumber)(t,"soundId",1,1e4),Object(b.checkValidString)(n,"filePath",1,Object(d.getParameter)("FILEPATH_LENMAX"),!1),e._initSoundIfNotExists(t,n),e.audioMixing.buffer[n]?r(null):e.loadAudioBuffer(n,n,r)},e.unloadEffect=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:n,options:arguments,tag:"tracer",name:"Stream.unloadEffect"});Object(b.checkValidNumber)(t,"soundId",1,1e4);var r=e.audioMixing.sounds[t];if(!r){var o="SOUND_NOT_EXISTS";return l.default.error(o,t),void i(o)}var s=r.options?r.options.filePath:r.filePath;if(s)delete e.audioMixing.buffer[s],delete e.audioMixing.sounds[t],i(null);else{var a="SOUND_BUFFER_NOT_FOUND";l.default.error(a,t),i(a)}},e.pauseEffect=function(t,n){var i=h.report.reportApiInvoke(e.sid,{callback:n,options:arguments,tag:"tracer",name:"Stream.pauseEffect"});return e._pauseOneEffect({soundId:t},i)},e.pauseAllEffects=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:t,name:"Stream.pauseAllEffects"}),i=!1,r=0,o=0,s=function(e){i||(e?(n(e),i=!0):r+=1,r===o&&(n(null),i=!0))};for(var a in e.audioMixing.sounds)"-1"!==a&&e.audioMixing.sounds[a].state===e.audioMixing.states.BUSY&&(o++,e._pauseOneEffect({soundId:a},s));o||n(null)},e.resumeEffect=function(t,n){Object(b.checkValidNumber)(t,"soundId",1,1e4);var i=h.report.reportApiInvoke(e.sid,{callback:n,options:arguments,tag:"tracer",name:"Stream.resumeEffect"});return e._resumeOneEffect({soundId:t},i)},e.resumeAllEffects=function(t){var n=h.report.reportApiInvoke(e.sid,{callback:t,name:"Stream.resumeAllEffects"}),i=!1,r=0,o=0,s=function(e){i||(e?(n(e),i=!0):r+=1,r===o&&(n(null),i=!0))};for(var a in e.audioMixing.sounds)"-1"!==a&&e.audioMixing.sounds[a].state===e.audioMixing.states.PAUSED&&(o++,e._resumeOneEffect({soundId:a},s));o||n(null)},e.getEffectsVolume=function(){var t=[];for(var n in e.audioMixing.sounds){var i=e.audioMixing.sounds[n];i&&"-1"!==n&&t.push({soundId:parseInt(n),volume:i.volume})}return t},e.setEffectsVolume=function(t,n){var i=h.report.reportApiInvoke(e.sid,{name:"Stream.setEffectsVolume",options:arguments,tag:"tracer",callback:n});for(var r in Object(b.checkValidNumber)(t,"volume",0,100),e.audioMixing.defaultVolume=t,e.audioMixing.sounds)"-1"!==r&&(e.audioMixing.sounds[r].volume=t);e._flushAudioMixingMuteStatus(),i(null)},e.setVolumeOfEffect=function(t,n,i){var r=h.report.reportApiInvoke(e.sid,{name:"Stream.setVolumeOfEffect",options:arguments,tag:"tracer",callback:i});Object(b.checkValidNumber)(t,"soundId",0,1e4),Object(b.checkValidNumber)(n,"volume",0,100),e._initSoundIfNotExists(t),e.audioMixing.sounds[t].volume=n,e._flushAudioMixingMuteStatus(),r(null)}}(t),S.a.addVideoEffectCapability(t),function(e,t){e.videoConstraint={},t.cameraId&&(e.videoConstraint.deviceId={exact:t.cameraId}),t.facingMode&&(e.videoConstraint.facingMode=t.facingMode),e.videoSize&&(e.videoConstraint.width=e.videoSize[0],e.videoConstraint.height=e.videoSize[1]),Object(o.isLegacyChrome)()||(e.videoConstraint.frameRate=30),e.audioConstraint={},t.microphoneId&&(e.audioConstraint.deviceId={exact:t.microphoneId}),Object(o.isLegacyChrome)()||e.audioProcessing&&(void 0!==e.audioProcessing.AGC&&(Object(o.isFireFox)()?e.audioConstraint.autoGainControl=e.audioProcessing.AGC:Object(o.isChrome)()&&(e.audioConstraint.googAutoGainControl
1=e.audioProcessing.AGC,e.audioConstraint.googAutoGainControl2=e.audioProcessing.AGC)),void 0!==e.audioProcessing.AEC&&(e.audioConstraint.echoCancellation=e.audioProcessing.AEC),void 0!==e.audioProcessing.ANS&&(Object(o.isFireFox)()?e.audioConstraint.noiseSuppression=e.audioProcessing.ANS:Object(o.isChrome)()&&(e.audioConstraint.googNoiseSuppression=e.audioProcessing.ANS))),e.screenConstraint={},t.sourceId&&(e.screenConstraint.sourceId=t.sourceId),t.extensionId&&Object(o.isChrome)()?(e.screenConstraint.extensionId=t.extensionId,e.screenConstraint.mandatory={chromeMediaSource:"desktop",maxWidth:e.screenAttributes.width,maxHeight:e.screenAttributes.height,maxFrameRate:e.screenAttributes.maxFr,minFrameRate:e.screenAttributes.minFr}):(e.screenConstraint.mediaSource="screen",e.screenConstraint.width=e.screenAttributes.width,e.screenConstraint.height=e.screenAttributes.height,e.screenConstraint.frameRate={ideal:e.screenAttributes.maxFr,max:e.screenAttributes.maxFr}),t.mediaSource&&(e.screenConstraint.mediaSource=t.mediaSource),e.setVideoResolution=function(n){var i=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoResolution",options:arguments,tag:"tracer"});if(!(n instanceof Array)){var o=T(n+="");return o&&o.video?(e.videoConstraint=r()(e.videoConstraint,{width:{ideal:o.video.width},height:{ideal:o.video.height}}),t.attributes.resolution=o.attributes.resolution,(s=e.stream&&e.stream.getVideoTracks&&e.stream.getVideoTracks()[0])&&s.applyConstraints?(l.default.debug("setVideoResolution applyConstraints",e.videoConstraint),s.applyConstraints(e.videoConstraint).then(i).catch(i)):i(),!0):(i("NO_PROFILE_".concat(n)),!1)}var s,a=n[0],c=n[1];e.videoConstraint=r()(e.videoConstraint,{width:{ideal:a},height:{ideal:c}}),t.attributes.resolution="".concat(a,"x").concat(c),(s=e.stream&&e.stream.getVideoTracks&&e.stream.getVideoTracks()[0])&&s.applyConstraints?(l.default.debug("setVideoResolution applyConstraints",e.videoConstraint),S.a.disableVideoEffect(e).then(function(){return s.applyConstraints(e.videoConstraint).then(i).catch(i)}).then(function(){return S.a.restoreVideoEffect(e)})):i()},e.setVideoFrameRate=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoFrameRate",options:arguments,tag:"tracer"});if(Object(o.isFireFox)())return n("FIREFOX_NOT_SUPPORTED"),!1;if("object"===E()(t)&&t instanceof Array&&t.length>1){e.videoConstraint=r()(e.videoConstraint,{frameRate:t[0]}),e.attributes.minFrameRate=t[0],e.attributes.maxFrameRate=t[1];var i=e.stream&&e.stream.getVideoTracks&&e.stream.getVideoTracks()[0];return i&&i.applyConstraints?(l.default.debug("setVideoFrameRate applyConstraints",e.videoConstraint),i.applyConstraints(e.videoConstraint).then(n).catch(n)):n(),!0}return n("INVALID_PARAM_".concat(JSON.stringify(t))),!1},e.setVideoBitRate=function(n){var i=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoBitRate",options:arguments,tag:"tracer"});return"object"===E()(n)&&n instanceof Array&&n.length>1?(t.attributes.minVideoBW=n[0],t.attributes.maxVideoBW=n[1],e.connectionSpec&&(e.connectionSpec.minVideoBW=n[0],e.connectionSpec.maxVideoBW=n[1]),e.pc&&e.pc.renegotiate&&e.pc.renegotiate(),i(),!0):(i("INVALID_PARAM_".concat(JSON.stringify(n))),!1)},e.setScreenBitRate=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setScreenBitRate",options:arguments,tag:"tracer"});return"object"===E()(t)&&t instanceof Array&&t.length>1?(e.screenAttributes.minVideoBW=t[0],e.screenAttributes.maxVideoBW=t[1],n(),!0):(n("INVALID_PARAM_".concat(JSON.stringify(t))),!1)},e.setScreenProfile=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setScreenProfile",options:arguments,tag:"tracer"});Object(b.checkValidEnum)(t,"profile",["480p_1","480p_2","720p_1","720p_2","1080p_1","1080p_2"]);var i=T(t);return i&&i.screen?(e.screenConstraint.mandatory?(e.screenConstraint.mandatory.maxWidth=i.screen.width,e.screenConstraint.mandatory.maxHeight=i.screen.height,i.screen.frameRate&&i.screen.frameRate.min&&i.screen.frameRate.max&&(e.screenConstraint.mandatory.minFrameRate=i.screen.frameRate.min,e.screenConstraint.mandatory.maxFrameRate=i.screen.frameRate.max)):e.screenConstraint=r()(e.screenConstraint,i.screen),e.screenAttributes.width=i.screen.width,e.screenAttributes.height=i.screen.height,e.screenAttributes.minFr=i.screen.frameRate.min,e.screenAttributes.maxFr=i.screen.frameRate.max,n(),!0):(n("NO_SCREEN_PROFILE_".concat(JSON.stringify(t))),!1)},e.setVideoProfileCustom=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoProfileCustom",options:arguments,tag:"tracer"});e.setVideoResolution(t[0]),e.setVideoFrameRate([t[1],t[1]]),e.setVideoBitRate([t[2],t[2]]),n()},e.setVideoProfileCustomPlus=function(n){var i=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoProfileCustom",options:arguments,tag:"tracer"});e.setVideoResolution([n.width,n.height]),t.attributes.resolution="".concat(n.width,"x").concat(n.height),e.setVideoFrameRate([n.framerate,n.framerate]),e.setVideoBitRate([n.bitrate,n.bitrate]),i()},e.setVideoProfile=function(n){var i=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoProfile",options:arguments,tag:"tracer"}),s=T(n);if(!s){var a="Invalid Profile ".concat(n);throw new Error(a)}if(e.profile=n,s&&s.video){e.profile=s.profileName,e.videoConstraint=r()(e.videoConstraint,
1s.video),e.connectionSpec&&s.attributes.maxVideoBW&&(e.connectionSpec.minVideoBW=s.attributes.minVideoBW,e.connectionSpec.maxVideoBW=s.attributes.maxVideoBW),Object(o.isEdge)()&&(e.videoConstraint.frameRate.max=60),Object(o.isFireFox)()&&(e.videoConstraint.frameRate=30),t.attributes=r()(t.attributes,s.attributes),e.pc&&e.pc.renegotiate&&e.pc.renegotiate();var c=e.stream&&e.stream.getVideoTracks&&e.stream.getVideoTracks()[0];return c&&c.applyConstraints?(l.default.debug("setVideoProfile applyConstraints",e.videoConstraint),S.a.disableVideoEffect(e).then(function(){return c.applyConstraints(e.videoConstraint)}).then(function(){return S.a.restoreVideoEffect(e)}).then(function(t){return new Promise(function(n,r){i(t),setTimeout(function(){Object(m.vsResHack)(e.stream,function(t,i){e.videoWidth=t,e.videoHeight=i,n()},function(t){l.default.warning("[".concat(e.streamId,"] vsResHack failed: "),t),r()})},2500)})}).catch(i)):i(),!0}return i("INVALID_VIDEO_PROFILE_".concat(n)),!1},e.setAudioProfile=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setAudioProfile",options:arguments,tag:"tracer"});Object(b.checkValidEnum)(t,"profile",["speech_low_quality","speech_standard","music_standard","standard_stereo","high_quality","high_quality_stereo"]),e.audioProfile=t;var i=function(e){var t=d.AUDIO_PROFILE_SETTINGS[e]||d.AUDIO_PROFILE_SETTINGS.default;return{highQuality:t[0],stereo:t[1],speech:t[2],lowQuality:t[3]}}(t);return e.highQuality=i.highQuality,e.stereo=i.stereo,e.speech=i.speech,e.lowQuality=i.lowQuality,e.stereo&&Object(o.isChrome)()&&(e.audioConstraint.googAutoGainControl=!1,e.audioConstraint.googAutoGainControl2=!1,e.audioConstraint.echoCancellation=!1,e.audioConstraint.googNoiseSuppression=!1),n(),!0},e.setVideoEncoderConfiguration=function(t){Object(b.checkValidObject)(t,"config");var n=h.report.reportApiInvoke(e.sid,{name:"Stream.setVideoEncoderConfiguration",options:t,tag:"tracer"});t.resolution&&(Object(b.checkValidNumber)(t.resolution.width,"config.resolution.width"),Object(b.checkValidNumber)(t.resolution.height,"config.resolution.height"),e.setVideoResolution([t.resolution.width,t.resolution.height])),t.frameRate&&(Object(b.checkValidNumber)(t.frameRate.min,"config.frameRate.min"),Object(b.checkValidNumber)(t.frameRate.max,"config.frameRate.max"),e.setVideoFrameRate([t.frameRate.min,t.frameRate.max])),t.bitrate&&(Object(b.checkValidNumber)(t.bitrate.min,"config.bitrate.min",1,1e7),Object(b.checkValidNumber)(t.bitrate.max,"config.bitrate.max",1,1e7),e.setVideoBitRate([t.bitrate.min,t.bitrate.max])),n()},e.getSupportedProfile=function(t){var n=h.report.reportApiInvoke(e.sid,{name:"Stream.getSupportedProfile",options:arguments,tag:"tracer",callback:t});if(!e.local){var i="ONLY_LOCAL_STREAM_SUPPORTED";return l.default.error(i),n(i)}if(!e.stream)return l.default.error(i="STREAM_NOT_INIT"),n(i);if(!e.stream.getVideoTracks)return l.default.error(i="TRACK_NOT_SUPPORT"),n(i);var r=e.stream.getVideoTracks()[0];return r?r.getCapabilities?n(null,function(e){return Object.keys(d.SUPPORT_RESOLUTION_LIST).filter(function(t){var n=d.SUPPORT_RESOLUTION_LIST[t],i=["width","height","frameRate"];for(var r in i){var o=i[r];if(e[o]&&n[r]){if("number"==typeof e[o].max&&e[o].max<n[r])return!1;if("number"==typeof e[o].min&&e[o].min>n[r])return!1}}return!0}).reverse()}(r.getCapabilities())):(l.default.error(i="GETCAPABILITY_NOT_SUPPORT"),n(i)):(l.default.error(i="NO_VIDEO_TRACK_FOUND"),n(i))}}(t,e),t.getId=function(){return t.streamId},t.getUserId=function(){return t.userId},t.checkDualStreamEnabled=function(){return!(!Object(d.getParameter)("DUALSTREAM_OPERATION_CHECK")||!t.isDualStream)&&(l.default.error("Operation not permitted: ".concat("DUAL_STREAM_ENABLED")),"DUAL_STREAM_ENABLED")},t.setUserId=function(e){var n=h.report.reportApiInvoke(t.sid,{name:"Stream.setUserId",options:arguments,tag:"tracer"});t.userId&&l.default.warning("[".concat(t.streamId,"] Stream.userId ").concat(t.userId," => ").concat(e)),t.userId=e,n()},t.getAttributes=function(){return e.screen?t.screenAttributes:e.attributes},t.hasAudio=function(){return!!t.audio},t.hasVideo=function(){return!!t.video},t.hasScreen=function(){return!!t.screen},t.hasScreenAudio=function(){return!!t.screenAudio},t.isVideoOn=function(){return(t.hasVideo()||t.hasScreen())&&!t.userMuteVideo},t.isAudioOn=function(){return t.hasAudio()&&!t.userMuteAudio},t.init=function(i,r){var o=h.report.reportApiInvoke(t.sid,{callback:function(e,t){if(e)return r&&r(e);i&&i(t)},name:"Stream.init",options:arguments,tag:"tracer"}),s=((new Date).getTime(),arguments[2]);if(void 0===s&&(s=2),!0===t.initialized)return o({type:"warning",msg:"STREAM_ALREADY_INITIALIZED"});if(!0!==t.local)return o({type:"warning",msg:"STREAM_NOT_LOCAL"});var a=Math.random().toString().slice(3);t._streamInitID=a,t.videoSource?t.videoName="videoSource":t.video&&(t.videoName=y.a.searchDeviceNameById(e.cameraId)||"default"),t.audioSource?t.audioName="audioSource":t.audio&&(t.audioName=y.a.searchDeviceNameById(e.microphoneId)||"default"),t.screen&&(t.screenName=e.extensionId||"default");try{if(e.audio||e.video||e.screen||e.screenAudio||e.videoSource||e.audioSource){l.default.debug("[".concat(t.streamId,"] Requested access to local media"));var c={streamId:t.streamId};e.videoSource?c.videoSource=e.videoSource:e.screen?c.screen=t.screenConstraint:e.video&&(c.video=t.videoConstraint),e.audioSource?c.audioSource=e.audioSource:e.screenAudio?c.screenAudio=e.screenAudio:e.audio&&(c.audio=t.audioConstraint),Object(g.b)(c,function(i){if(c.screenAudio&&!i.getAudioTracks()[0]&&l.default.warning("[".concat(t.streamId,"] Audio sharing is not selected")),c.screen&&l.default.debug("[".concat(t.streamId,"] User has granted access to screen sharing")),(c.video||c.audio)&&l.default.debug("[".concat(t.streamId,"] User has granted access to local media")),null===t._streamInitID){i.getTracks().forEac
1h(function(e){e.stop()});var r={type:"error",msg:"STREAM_IS_CLOSED",info:"stream is closed and cannot be initialized"};return l.default.error(t.streamId,r.info),void o(r)}if(t._streamInitID!==a)return i.getTracks().forEach(function(e){e.stop()}),l.default.error(t.streamId,(r={type:"error",msg:"ABORT_OTHER_INIT",info:"stream initialization is aborted because of another stream.init"}).info),void o(r);t.dispatchEvent({type:"accessAllowed"}),t.stream=i,t.initialized=!0,t.reloadDeviceName(),t.hasVideo()&&Object(m.vsResHack)(i,function(e,n){t.videoWidth=e,t.videoHeight=n},function(e){l.default.warning("[".concat(t.streamId,"] vsResHack failed: "),e)}),e.screen&&t.stream&&t.stream.getVideoTracks()[0]&&(t.stream.getVideoTracks()[0].onended=function(){t.dispatchEvent({type:"stopScreenSharing"})}),t.stream&&t.stream.getTracks&&t.stream.getTracks().forEach(function(i){i&&!i.onended&&(i.onended=n),"video"===i.kind&&e.optimizationMode&&(i.contentHint=e.optimizationMode,i.contentHint===e.optimizationMode&&l.default.debug("[".concat(t.streamId,"] set content hint to"),e.optimizationMode))}),o()},function(e){var n={type:"error",info:null};switch(e&&(n.msg=e.name||e.code||e,e.message&&(n.info=e.message),e.code&&(n.info?n.info+=". "+e.code:n.info=" "+e.code),e.constraint&&(n.info?n.info+=". Constraint: "+e.constraint:n.info="constraint: "+e.constraint)),n.msg){case"Starting video failed":case"TrackStartError":if(t.videoConstraint&&(delete t.videoConstraint.width,delete t.videoConstraint.height),s>0)return void setTimeout(function(){t.init(function(e){return o(e)},o,s-1)},1);
1n.msg="MEDIA_OPTION_INVALID";break;case"DevicesNotFoundError":n.msg="DEVICES_NOT_FOUND";break;case"NotSupportedError":n.msg="NOT_SUPPORTED";break;case"PermissionDeniedError":case"InvalidStateError":n.msg="PERMISSION_DENIED",t.dispatchEvent({type:"accessDenied"});break;case"PERMISSION_DENIED":case"NotAllowedError":t.dispatchEvent({type:"accessDenied"});break;case"ConstraintNotSatisfiedError":n.msg="CONSTRAINT_NOT_SATISFIED";break;default:n.msg||(n.msg="UNDEFINED")}var i="Media access ".concat(n.msg).concat(n.info?": "+n.info:"");l.default.error("[".concat(t.streamId,"] "),i),o(n)})}else o({type:"warning",msg:"STREAM_HAS_NO_MEDIA_ATTRIBUTES"})}catch(e){l.default.error("[".concat(t.streamId,"] Stream init: "),e),o({type:"error",msg:e.message||e})}},t.reloadDeviceName=function(){if(t.stream){if(t.stream.getVideoTracks){var e=t.stream.getVideoTracks()[0];e&&e.label&&(t.videoName=e.label)}if(t.stream.getAudioTracks){var n=t.stream.getAudioTracks()[0];n&&n.label&&(t.audioName=n.label)}}},t.close=function(){var e=h.report.reportApiInvoke(null,{name:"Stream.close",options:arguments,tag:"tracer"});if(l.default.debug("[".concat(t.streamId,"] Close stream with id"),t.streamId),t._originStream)try{t._originStream.getTracks().map(function(e){return e.stop()})}catch(e){}if(void 0!==t.stream){var n=t.stream.getTracks();for(var i in n)n.hasOwnProperty(i)&&(n[i].stop(),n[i].onended=null);!t.isLowStream&&t.local?S.a.disableVideoEffect(t).then(function(){t.stream=void 0}):(t.stream&&t.stream.clean&&t.stream.clean(),t.stream=void 0)}if(t._originStream){for(var i in console.log("clear _originStream"),n=t._originStream.getTracks())n.hasOwnProperty(i)&&(n[i].stop(),n[i].onended=null,console.log("clear onended"));!t.isLowStream&&t.local?S.a.disableVideoEffect(t).then(function(){t._originStream=void 0}):(t._originStream&&t._originStream.clean&&t._originStream.clean(),t._originStream=void 0)}Object(o.isSafari)()&&t.pc&&t.pc.peerConnection&&t.pc.peerConnection.removeTrack&&t.pc.peerConnection.getSenders&&t.pc.peerConnection.getSenders().forEach(function(e){e&&(l.default.debug("[".concat(t.streamId,"] Remove Track"),e),t.pc.peerConnection.removeTrack(e))}),t.local&&(t.initialized=!1),t._streamInitID=null,t._onAudioMute=void 0,t._onAudioUnmute=void 0,t._onVideoMute=void 0,t._onVideoUnmute=void 0,t.lowStream&&t.lowStream.close(),t.player&&t.player.video&&t.player.video.srcObject&&(t.player.video.srcObject=null),t.player&&t.player.audio&&t.player.audio.srcObject&&(t.player.audio.srcObject=null),e()},t.enableAudio=function(){var e,n=h.report.reportApiInvoke(t.sid,{name:"Stream.enableAudio",options:arguments,tag:"tracer"});return l.default.deprecate("[".concat(t.streamId,"] Stream.enableAudio is deprecated and will be removed in the future. Use Stream.unmuteAudio instead")),t.userMuteAudio||l.default.warning("[".concat(t.streamId,"] User already enableAudio")),t.userMuteAudio=!1,n(null,e=!t.peerMuteAudio&&t._unmuteAudio()),e},t.disableAudio=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.disableAudio",options:arguments,tag:"tracer"});l.default.deprecate("[".concat(t.streamId,"] Stream.disableAudio is deprecated and will be removed in the future. Use Stream.muteAudio instead")),t.userMuteAudio&&l.default.warning("[".concat(t.streamId,"] User already disableAudio")),t.userMuteAudio=!0;var n=t._muteAudio();return e(null,n),n},t.enableVideo=function(){var e,n=h.report.reportApiInvoke(t.sid,{name:"Stream.enableVideo",options:arguments,tag:"tracer"});return l.default.deprecate("[".concat(t.streamId,"] Stream.enableVideo is deprecated and will be removed in the future. Use Stream.unmuteVideo instead")),t.userMuteVideo||l.default.warning("[".concat(t.streamId,"] User already enableVideo")),t.userMuteVideo=!1,t.lowStream&&(t.lowStream.userMuteVideo=!1),n(null,e=!t.peerMuteVideo&&t._unmuteVideo()),e},t.disableVideo=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.disableVideo",options:arguments,tag:"tracer"});l.default.deprecate("[".concat(t.streamId,"] Stream.disableVideo is deprecated and will be removed in the future. Use Stream.muteVideo instead")),t.userMuteVideo&&l.default.warning("[".concat(t.streamId,"] User already disableVideo")),t.userMuteVideo=!0,t.lowStream&&(t.lowStream.userMuteVideo=!0);var n=t._muteVideo();return e(null,n),n},t.unmuteAudio=function(){var e,n=h.report.reportApiInvoke(t.sid,{name:"Stream.unmuteAudio",options:arguments,tag:"tracer"});return t.userMuteAudio||l.default.warning("[".concat(t.streamId,"] User already unmuteAudio")),t.userMuteAudio=!1,n(null,e=!t.peerMuteAudio&&t._unmuteAudio()),e},t.muteAudio=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.muteAudio",options:arguments,tag:"tracer"});t.userMuteAudio&&l.default.warning("[".concat(t.streamId,"] User already muteAudio")),t.userMuteAudio=!0;var n=t._muteAudio();return e(null,n),n},t.unmuteVideo=function(){var e,n=h.report.reportApiInvoke(t.sid,{name:"Stream.unmuteVideo",options:arguments,tag:"tracer"});return t.userMuteVideo||l.default.warning("[".concat(t.streamId,"] User already unmuteVideo")),t.userMuteVideo=!1,t.lowStream&&(t.lowStream.userMuteVideo=!1),n(null,e=!t.peerMuteVideo&&t._unmuteVideo()),e},t.muteVideo=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.muteVideo",options:arguments,tag:"tracer"});t.userMuteVideo&&l.default.warning("[".concat(t.streamId,"] User already muteVideo")),t.userMuteVideo=!0,t.lowStream&&(t.lowStream.userMuteVideo=!0);var n=t._muteVideo();return e(null,n),n},t._unmuteAudio=function(){return l.default.debug("[".concat(t.streamId,"] Unmuted audio stream with i
1d "),t.streamId),t._flushAudioMixingMuteStatus(!1),!(!t.hasAudio()||!t.initialized||void 0===t.stream||!0===t.stream.getAudioTracks()[0].enabled||(t._onAudioUnmute&&t._onAudioUnmute(),t.pc&&(t.pc.isAudioMute=!1),t.stream.getAudioTracks()[0].enabled=!0,0))},t._isAudioMuted=function(){if(t.stream&&t.hasAudio()){var e=t.stream.getAudioTracks();return e.length>0&&!e[0].enabled}return!1},t._isVideoMuted=function(){if(t.stream&&t.hasVideo()){var e=t.stream.getVideoTracks();return e.length>0&&!e[0].enabled}return!1},t._muteAudio=function(){return l.default.debug("[".concat(t.streamId,"] Muted audio stream with id "),t.streamId),t._flushAudioMixingMuteStatus(!0),!!(t.hasAudio()&&t.initialized&&void 0!==t.stream&&t.stream.getAudioTracks()[0].enabled)&&(t._onAudioMute&&t._onAudioMute(),t.pc&&(t.pc.isAudioMute=!0),t.stream.getAudioTracks()[0].enabled=!1,t.sid&&h.report.audioSendingStopped(t.sid,{succ:!0,reason:"muteAudio"}),!0)},t._unmuteVideo=function(){return l.default.debug("[".concat(t.streamId,"] Unmuted video stream with id"),t.streamId),!(!t.initialized||void 0===t.stream||!t.stream.getVideoTracks().length||!0===t.stream.getVideoTracks()[0].enabled||(t._onVideoUnmute&&t._onVideoUnmute(),t.pc&&(t.pc.isVideoMute=!1),t.stream.getVideoTracks()[0].enabled=!0,t.lowStream&&t.lowStream._unmuteVideo(),0))},t._muteVideo=function(){return l.default.debug("[".concat(t.streamId,"] Muted video stream with id"),t.streamId),!!(t.initialized&&void 0!==t.stream&&t.stream.getVideoTracks().length&&t.stream.getVideoTracks()[0].enabled)&&(t._onVideoMute&&t._onVideoMute(),t.pc&&(t.pc.isVideoMute=!0),t.stream.getVideoTracks()[0].enabled=!1,t.lowStream&&t.lowStream._muteVideo(),t.sid&&h.report.videoSendingStopped(t.sid,{succ:!0,reason:"muteVideo"}),!0)},t.addTrack=function(i){if(t.audio&&"audio"===i.kind)l.default.warning("already added audio track");else if(t.video&&"video"===i.kind)l.default.warning("already added video track");else{var r=h.report.reportApiInvoke(t.sid,{name:"Stream.addTrack",options:arguments,tag:"tracer"});if(t.pc&&t.pc.addTrack(i,t.stream),"audio"==i.kind){t._cleanupAudioMixing();var o=new MediaStream;t.userMuteAudio&&(i.enabled=!1),o.addTrack(i);var s=t.stream.getVideoTracks()[0];s&&o.addTrack(s),t.audio=!0,e.audio=!0,t.stream=o,t.audioLevelHelper=null,t.player&&t.player.video&&(t.player.video.srcObject=t.stream)}else t.userMuteVideo&&(i.enabled=!1),t.stream.addTrack(i),t.video=!0,e.video=!0;i.onended||(i.onended=n),r()}},t.removeTrack=function(n){if(n)if(t.audio||"audio"!==n.kind)if(t.video||"video"!==n.kind){var i=h.report.reportApiInvoke(t.sid,{name:"Stream.removeTrack",options:arguments,tag:"tracer"});t.pc&&t.pc.removeTrack(n,t.stream),t.stream.removeTrack(n),t._cleanupAudioMixing(),"audio"===n.kind?(t.audio=!1,e.audio=!1):(t.video=!1,e.video=!1),t.audioLevelHelper=null,"live"==n.readyState&&(n.stop(),l.default.debug("[".concat(t.streamId,"] Track ").concat(n.kind," Stopped"))),i()}else l.default.warning("already removed video track");else l.default.warning("already removed audio track");else l.default.warning("track doesn't exist.")},t.setAudioOutput=function(e,n,i){var r=h.report.reportApiInvoke(t.sid,{callback:function(e,t){if(e)return i&&i(e);n&&n(t)},name:"Stream.setAudioOutput",options:arguments,tag:"tracer"});return Object(b.isValidString)(e,1,255)?(t.audioOutput=e,t.player?void t.player.setAudioOutput(e,function(){return r()},r):r()):(l.default.error("[".concat(t.streamId,"] setAudioOutput Invalid Parameter"),e),r(u.default.INVALID_PARAMETER))},t.play=function(e,n,i){"function"==typeof n&&(i=n,n=null),l.default.debug("[".concat(t.streamId,"] play()."),e,n);var r=h.report.reportApiInvoke(t.sid,{name:"Stream.play",options:arguments,tag:"tracer",callback:i});if(Object(b.checkValidString)(e,"elementID"),Object(b.isEmpty)(n)||(Object(b.isEmpty)(n.fit)||Object(b.checkValidEnum)(n.fit,"fit",["cover","contain"]),Object(b.isEmpty)(n.muted)||Object(b.checkValidBoolean)(n.muted,"muted")),t.player)l.default.warning("[".concat(t.streamId,"] Stream.play(): Stream is already playing. Fallback to resume stream")),t.resume().then(function(){r(null)}
1).catch(r);else{t.elementID=e,t.playOptions=n,!t.local||t.video||t.screen?(t.player=new f({id:t.getId(),stream:t,elementID:e,options:n}),t.local&&S.a.applyEffectInPlayer(t)):t.hasAudio()&&(t.player=new f({id:t.getId(),stream:t,elementID:e,options:n}));var o={video:null,audio:null};t.on("player-status-change",function e(n){if(o[n.mediaType]=n,o.video&&o.audio)if(t.removeEventListener("player-status-change",e),o.video.isErrorState||o.audio.isErrorState){var i=o.video.isErrorState?o.video:o.audio;r({isErrorState:!0,status:i.status,reason:i.reason,video:o.video,audio:o.audio})}else r("aborted"===o.video.status&&"aborted"===o.audio.status?{status:"aborted",reason:"stop",video:o.video,audio:o.audio}:null)}),t.audioOutput&&t.player.setAudioOutput(t.audioOutput),void 0!==t.audioLevel&&t.player.setAudioVolume(t.audioLevel),t._flushAudioMixingMuteStatus(!1)}},t.stop=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.stop",options:arguments,tag:"tracer"});l.default.debug("[".concat(t.streamId,"] Stop stream player with id "),t.streamId),t.player?(S.a.removeEffectFromLocalPlayer(t),t.player.destroy(),delete t.player):l.default.error("[".concat(t.streamId,"] Stream.stop(): Stream is not playing")),t._flushAudioMixingMuteStatus(!0),e()},t.isPlaying=function(){return!!t.player},t.isPaused=function(){return!(!t.player||!(t.player.video&&t.player.video.paused&&t.player.mediaElemExists(t.player.video)||t.player.audio&&t.player.audio.paused&&t.player.mediaElemExists(t.player.audio)))},t.resume=function(){var e,n;return t.player?(t.player.video&&t.player.video.play&&(e=t.player.video.play()),e=e||Promise.resolve(),t.player.audio&&t.player.audio.play&&(n=t.player.audio.play()),n=n||Promise.resolve(),Promise.all([e,n])):Promise.reject("NO_PLAYER_FOUND")},t.getVideoTrack=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.getVideoTrack",options:arguments,tag:"tracer"});if(t.stream&&t.stream.getVideoTracks){var n=t.stream.getVideoTracks()[0];if(n)return l.default.info("[".concat(t.streamId,"] getVideoTrack"),n),e(),n}l.default.info("[".concat(t.streamId,"] getVideoTrack None")),e(null,"getVideoTrack None")},t.getAudioTrack=function(){var e=h.report.reportApiInvoke(t.sid,{name:"Stream.getAudioTrack",options:arguments,tag:"tracer"});if(t.stream&&t.stream.getAudioTracks){var n=t.stream.getAudioTracks()[0];if(n)return l.default.info("[".concat(t.streamId,"] getAudioTracks"),n),e(),n}l.default.info("[".concat(t.streamId,"] getAudioTracks None")),e(null,"getAudioTracks None")},t._hasVideoTracks=function(){return!!(t.stream&&t.stream.getVideoTracks&&t.stream.getVideoTracks()[0])},t._hasAudioTracks=function(){return!!(t.stream&&t.stream.getAudioTracks&&t.stream.getAudioTracks()[0])},t._replaceMediaStreamTrack=function(e,n,i){if(t.stream){if("video"==e.kind){if(o=t.stream.getVideoTracks()[0])return t.userMuteVideo&&(e.enabled=!1),t.stream.removeTrack(o),t.stream.addTrack(e),l.default.debug("[".concat(t.streamId,"] _replaceMediaStreamTrack ").concat(e.kind," SUCCESS")),"live"==o.readyState&&(o.stop(),l.default.debug("[".concat(t.streamId,"] Track ").concat(o.kind," Stopped"))),n&&n();var r="MEDIASTREAM_TRACK_NOT_FOUND";return l.default.error("[".concat(t.streamId,"] MEDIASTREAM_TRACK_NOT_FOUND ").concat(e.kind)),i(r)}if("audio"==e.kind){var o;if(o=t.stream.getAudioTracks()[0]){t.userMuteAudio&&(e.enabled=!1);var s=new MediaStream;s.addTrack(e);var a=t.stream&&t.stream.getVideoTracks()[0];return a&&s.addTrack(a),t.stream=s,t.audioLevelHelper=null,t.player&&t.player.video&&(t.player.video.srcObject=t.stream),l.default.debug("[".concat(t.streamId,"] _replaceMediaStreamTrack SUCCESS")),"live"==o.readyState&&(o.stop(),l.default.debug("[".concat(t.streamId,"] Track ").concat(o.kind," Stopped"))),n&&n()}return r="MEDIASTREAM_TRACK_NOT_FOUND",l.default.error("[".concat(t.streamId,"] MEDIASTREAM_TRACK_NOT_FOUND ").concat(e.kind)),i(r)}return r="INVALID_TRACK_TYPE",l.default.error("[".concat(t.streamId,"] _replaceMediaStreamTrack ").concat(r," ").concat(e.kind)),i&&i(r)}return r="NO_STREAM_FOUND",l.default.error("[".concat(t.streamId,"] _replaceMediaStreamTrack ").concat(r)),i&&i(r)},t.replaceTrack=function(e,i,r){var o=h.report.reportApiInvoke(t.sid,{callback:function(e,t){if(e)return r&&r(e);i&&i(t)},name:"Stream.replaceTrack",options:arguments,tag:"tracer"});return e&&e.kind?(t._cleanupAudioMixing(),e.onended||(e.onended=n),t.pc&&t.pc.hasSender&&t.pc.hasSender(e.kind)?void t.pc.replaceTrack(e,function(){return l.default.debug("[".concat(t.streamId,"] PeerConnection.replaceTrack ").concat(e.kind," SUCCESS")),t._replaceMediaStreamTrack(e,function(e){return o(null,e)},o)},function(n){return l.default.error("[".concat(t.streamId,"] PeerConnection.replaceTrack ").concat(e.kind," Failed ").concat(n)),o(n)}):t._replaceMediaStreamTrack(e,function(e){return o(null,e)},o)):o("INVALID_TRACK")},t.setAudioVolume=function(e){var n=h.report.reportApiInvoke(t.sid,{name:"Stream.setAudioVolume",options:arguments,tag:"tracer"});Object(b.checkValidNumber)(e,"level",0,100),t.audioLevel=e,t.player&&t.player.setAudioVolume(e),n()},t.getStats=function(e,n,i){var s=[];s.push(t._getPCStats(i)),s.push(new Promise(function(e){var n={};t.pc&&t.pc.isSubscriber?null!==window.navigator.userAgent.match("Firefox")&&(Object(v.b)(n,"videoReceiveResolutionHeight",t.videoHeight),Object(v.b)(n,"videoReceiveResolutionWidth",t.videoWidth)):t.pc&&!t.pc.isSubscriber&&((Object(o.isSafari)()||Object(o.isFireFox)())&&(Object(v.b)(n,"videoSendResolutionHeight",t.videoHeight),Object(v.b)(n,"videoSendResolutionWidth",t.videoWidth)),(Object(o.isSafari)()||Object(o.isFireFox)())&&t.uplinkStats&&Object(v.b)(n,"videoSendPacketsLost",t.uplinkStats.uplink_cumulative_lost)),e(n)})),s.push(new Promise(function(e){var n={};return t.traffic_stats&&t.pc&&t.pc.isSubscriber?(Object(v.b)(n,"accessDelay",t.traffic_stats.access_delay),Object(v.b)(n,"endToEndDelay",t.traffic_stats.e2e_delay),Object(v.b)(n,"videoReceiveDelay",t.traffic_stats.video_delay),Object(v.b)(n,"audioReceiveDelay",t.traffic_stats.audio_delay)):t.traffic_stats&&t.pc&&!t.pc.isSubscriber&&Object(v.b)(n,"accessDelay",t.traffic_stats.access_delay),e(n)})),Promise.all(s).then(function(n){for(var i={},o=n.length-1;o>=0;o--){var s=n[o];r()(i,s)}e&&setTimeout(e.bind(t,i),0)}
1).catch(function(e){n&&setTimeout(n.bind(t,e),0)})},t._getPCStats=function(e){return new Promise(function(n,i){if(!t.pc||"established"!==t.pc.state||!t.pc.getStats)return i("PEER_CONNECTION_NOT_ESTABLISHED");t.pc.getStats(function(e){if(!t.pc||"established"!==t.pc.state||!t.pc.getStats)return i("PEER_CONNECTION_STATE_CHANGE");var r=t.pc.isSubscriber?Object(v.c)(e):Object(v.a)(e);return n(r)},e)}).then(function(e){return t.pc.isSubscriber?(Object(o.isFireFox)()||Object(o.isSafari)())&&(e.videoReceiveResolutionHeight&&"0"!==e.videoReceiveResolutionHeight||e.videoReceiveResolutionWidth&&"0"!==e.videoReceiveResolutionWidth||(Object(v.b)(e,"videoReceiveResolutionHeight",t.videoHeight),Object(v.b)(e,"videoReceiveResolutionWidth",t.videoWidth))):((Object(o.isSafari)()||Object(o.isFireFox)())&&(e.videoSendResolutionHeight&&"0"!==e.videoSendResolutionHeight||e.videoSendResolutionWidth&&"0"!==e.videoSendResolutionWidth||(Object(v.b)(e,"videoSendResolutionHeight",t.videoHeight),Object(v.b)(e,"videoSendResolutionWidth",t.videoWidth))),(Object(o.isSafari)()||Object(o.isFireFox)())&&t.uplinkStats&&Object(v.b)(e,"videoSendPacketsLost",t.uplinkStats.uplink_cumulative_lost)),Promise.resolve(e)})},t.getAudioLevel=function(){if(t.audioLevelHelper)return t.audioLevelHelper.getAudioLevel();if(t.stream){if(0!==t.stream.getAudioTracks().length)return t.audioLevelHelper=new m.audioLevelHelper(t.stream),t.audioLevelHelper.getAudioLevel();l.default.warning("[".concat(t.streamId,"] can't get audioLevel beacuse no audio trace in stream"))}else l.default.warning("[".concat(t.streamId,"] can't get audioLevel beacuse no stream exist"))},t.setVideoProfile("480p_1"),t._switchVideoDevice=function(e,n,i){if(e===t.cameraId)return n&&n();var o={video:r()({},t.videoConstraint,{deviceId:{exact:e}}),audio:!1};l.default.debug("[".concat(t.streamId,"] ").concat(o)),Object(g.b)(o,function(r){try{var o=function(){t.isPlaying()&&(t.stop(),t.elementID&&t.play(t.elementID,t.playOptions)),t.cameraId=e,t.videoConstraint.deviceId={exact:e},t.userMuteVideo&&(t.stream.getVideoTracks()[0].enabled=!1),S.a.restoreVideoEffect(t).then(function(){n&&n()})};S.a.disableVideoEffect(t).then(function(){var e=!1;window.RTCRtpSender&&"function"==typeof RTCRtpSender.prototype.replaceTrack&&(e=!0),e?t.replaceTrack(r.getVideoTracks()[0],o,i):(t.removeTrack(t.stream.getVideoTracks()[0]),t.addTrack(r.getVideoTracks()[0]),o())})}catch(e){return i&&i(e)}},function(e){return i&&i(e)})},t._switchAudioDevice=function(e,n,i){if(e===t.microphoneId)return n&&n();var o={video:!1,audio:r()({},t.audioConstraint,{deviceId:{exact:e}})};l.default.debug("[".concat(t.streamId,"] "),o);var s=t.stream.getAudioTracks()[0];s&&s.stop(),Object(g.b)(o,function(r){var o=function(){t._cleanupAudioMixing(),t.userMuteAudio&&(t.stream.getAudioTracks()[0].enabled=!1),t.isPlaying()&&(t.stop(),t.elementID&&t.play(t.elementID,t.playOptions)),t.microphoneId=e,t.audioConstraint.deviceId={exact:e},n&&n()};try{var s=!1;window.RTCRtpSender&&"function"==typeof RTCRtpSender.prototype.replaceTrack&&(s=!0),s?t.replaceTrack(r.getAudioTracks()[0],o,i):(t.removeTrack(t.stream.getAudioTracks()[0]),t.addTrack(r.getAudioTracks()[0]),o())}catch(e){return i&&i(e)}},function(e){return i&&i(e)})},t.switchDevice=function(e,n,i,r){var o=h.report.reportApiInvoke(t.sid,{callback:function(e,t){if(e)return r&&r(e);i&&i(t)},name:"Stream.switchDevice",options:arguments,tag:"tracer"});Object(b.checkValidString)(n,"deviceId");var s=function(){return t.inSwitchDevice=!1,o()},a=function(e){t.inSwitchDevice=!1,l.default.error("[".concat(t.streamId,"] "),e),o(e)};if(t.inSwitchDevice)return o("Device switch is in process.");if(t.inSwitchDevice=!0,!t.local)return a("Only the local stream can switch the device.");if(t.screen&&"video"===e)return a("The device cannot be switched during screen-sharing.");if(!t.video&&"video"===e)return a("Video track not exist.");if(!t.audio&&"audio"===e)return a("Audio track not exist.");if(t.videoSource||t.audioSource)return a("The device cannot be switched when using videoSource or audioSource.");var c=!1;for(var u in t.audioMixing.sounds)if(t.audioMixing.sounds[u].state!==t.audioMixing.states.IDLE){c=!0;break}if(t.audioMixing.audioContextInited&&c)return a("The device cannot be switched when using audio Mixing.");y.a.getDeviceById(n,function(){if("video"===e)t._switchVideoDevice(n,s,a);else{if("audio"!==e)return a("Invalid type.");t._switchAudioDevice(n,s,a)}},function(){return a("The device does not exist.")})},t},I=function(e){var t=h.report.reportApiInvoke(null,{name:"createStream",options:arguments,tag:"tracer",getStates:function(){return{audioTrackEnable:e&&e.audioSource?e.audioSource.enabled:null,videoTrackEnable:e&&e.videoSource?e.videoSource.enabled:null}}});Object(b.checkValidObject)(e,"StreamSpec");var n=e.streamID,i=e.audio,r=e.video,o=e.screen,s=e.screenAudio,a=e.cameraId,c=e.facingMode,u=e.microphoneId,d=e.mirror,p=e.extensionId,f=e.mediaSource,g=e.audioProcessing,v=e.optimizationMode;if(!Object(b.isEmpty)(n)&&!Object(m.is32Uint)(n)&&!Object(b.isValidString)(n,1,255))throw new Error("[String streamID] Length of the string: [1,255]. ASCII characters only. [Number streamID] The value range is Uint32");if(Object(b.checkValidBoolean)(i,"audio"),Object(b.checkValidBoolean)(r,"video"),Object(b.isEmpty)(o)||Object(b.checkValidBoolean)(o,"screen"),Object(b.isEmpty)(s)||Object(b.checkValidBoolean)(s,"screenAudio"),Object(b.isEmpty)(a)||Object(b.checkValidString)(a,"cameraId",0,255,!1),Ob
1ject(b.isEmpty)(c)||Object(b.checkValidEnum)(c,"facingMode",["user","environment","left","right"]),Object(b.isEmpty)(u)||Object(b.checkValidString)(u,"microphoneId",0,255,!1),Object(b.isEmpty)(p)||Object(b.checkValidString)(p,"extensionId"),Object(b.isEmpty)(f)||Object(b.checkValidEnum)(f,"mediaSource",["screen","application","window"]),Object(b.isEmpty)(d)||Object(b.checkValidBoolean)(d,"mirror"),!Object(b.isEmpty)(g)){var y=g.AGC,_=g.AEC,S=g.ANS;Object(b.isEmpty)(y)||Object(b.checkValidBoolean)(y,"AGC"),Object(b.isEmpty)(_)||Object(b.checkValidBoolean)(_,"AEC"),Object(b.isEmpty)(S)||Object(b.checkValidBoolean)(S,"ANS")}Object(b.isEmpty)(v)||Object(b.checkValidEnum)(v,"optimizationMode",["detail","motion"]),l.default.debug("Create stream"),!0===s&&!0===i&&l.default.warning("Do not set both 'screenAudio' and 'audio' to true at the same time"),e.screen&&!v&&(e.optimizationMode="detail");var w=C(e);return t(),w}},function(e,t,n){"use strict";n.d(t,"a",function(){return S}),n.d(t,"b",function(){return w});var i=n(5),r=n(7),o=n.n(r),s=n(12),a=n.n(s),l=n(17),c=n.n(l),u=n(0),d=n(15),h=n(2);function p(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function g(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var v=n(50),y=n.n(v),b=n(26),_=(n(4),103),S=function(e){var t={};if(t.clientId=e.clientId,e.session_id=_+=1,"undefined"==typeof window||!window.navigator)throw u.default.error("["+t.streamId+"]["+t.clientId+"]Publish/subscribe video/audio streams not supported yet"),new Error("NON_BROWSER_ENV_DETECTED");return null!==window.navigator.userAgent.match("Firefox")?(t.browser="mozilla",t=function(e){var t={},n=(mozRTCPeerConnection,mozRTCSessionDescription),i=!1;t.uid=e.uid,t.isVideoMute=e.isVideoMute,t.isAudioMute=e.isAudioMute,t.isSubscriber=e.isSubscriber,t.clientId=e.clientId,t.filterStatsCache=[],t.originStatsCache=[],t.lastTimeGetStats=null,t.pc_config={iceServers:[]},e.iceServers instanceof Array?e.iceServers.map(function(e){0===e.url.indexOf("stun:")&&t.pc_config.iceServers.push({url:e.url})}):(e.stunServerUrl&&(e.stunServerUrl instanceof Array?e.stunServerUrl.map(function(e){"string"==typeof e&&""!==e&&t.pc_config.iceServers.push({url:e})}):"string"==typeof e.stunServerUrl&&""!==e.stunServerUrl&&t.pc_config.iceServers.push({url:e.stunServerUrl})),e.turnServers&&(e.turnServers instanceof Array?e.turnServers.map(function(e){e.udpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.udpport+"?transport=udp"}),"string"==typeof e.tcpport&&""!==e.tcpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.tcpport+"?transport=tcp"}),!0===e.forceturn&&(t.pc_config.iceTransportPolicy="relay")}):u.default.error("[".concat(t.clientId,"] turnServers is not a array")))),void 0===e.audio&&(e.audio=!0),void 0===e.video&&(e.video=!0),t.mediaConstraints={offerToReceiveAudio:e.audio,offerToReceiveVideo:e.video,mozDontOfferDataChannel:!0},t.roapSessionId=103,t.peerConnection=new d.RTCPeerConnection(t.pc_config),t.iceCandidateTimer=setTimeout(function(){t.iceCandidateTimer=null,u.default.debug("[".concat(t.clientId,"]Candidates collected: ").concat(t.iceCandidateCount)),t.moreIceComing&&(t.moreIceComing=!1,t.markActionNeeded())}
1,Object(h.getParameter)("CANDIDATE_TIMEOUT")),t.peerConnection.onicecandidate=function(e){var n,i,r,o;i=(n=t.peerConnection.localDescription.sdp).match(/a=candidate:.+typ\ssrflx.+\r\n/),r=n.match(/a=candidate:.+typ\shost.+\r\n/),o=n.match(/a=candidate:.+typ\srelay.+\r\n/),null===i&&null===r&&null===o||void 0!==t.ice||!t.iceCandidateTimer||(clearTimeout(t.iceCandidateTimer),t.iceCandidateTimer=null,t.ice=0,t.moreIceComing=!1,t.markActionNeeded()),t.iceCandidateCount=t.iceCandidateCount+1},t.checkMLineReverseInSDP=function(e){return!(!~e.indexOf("m=audio")||!~e.indexOf("m=video"))&&e.indexOf("m=audio")>e.indexOf("m=video")},t.reverseMLineInSDP=function(e){var t=e.split("m=audio"),n=t[1].split("m=video");return t[0]+"m=video"+n[1]+"m=audio"+n[0]},t.processSignalingMessage=function(i){var r,o=JSON.parse(i);t.incomingMessage=o,"new"===t.state?"OFFER"===o.messageType?(o.sdp=v(o.sdp),t.peerConnection.setRemoteDescription(new n(r={sdp:o.sdp,type:"offer"}),function(){u.default.debug("["+t.clientId+"]setRemoteDescription succeeded")},function(e){u.default.info("["+t.clientId+"]setRemoteDescription failed: "+e.name)}),t.state="offer-received",t.markActionNeeded()):t.error("Illegal message for this state: "+o.messageType+" in state "+t.state):"offer-sent"===t.state?"ANSWER"===o.messageType?(o.sdp=v(o.sdp),o.sdp=o.sdp.replace(/ generation 0/g,""),o.sdp=o.sdp.replace(/ udp /g," UDP "),-1!==o.sdp.indexOf("a=group:BUNDLE")?(o.sdp=o.sdp.replace(/a=group:BUNDLE audio video/,"a=group:BUNDLE sdparta_0 sdparta_1"),o.sdp=o.sdp.replace(/a=mid:audio/,"a=mid:sdparta_0"),o.sdp=o.sdp.replace(/a=mid:video/,"a=mid:sdparta_1")):(o.sdp=o.sdp.replace(/a=mid:audio/,"a=mid:sdparta_0"),o.sdp=o.sdp.replace(/a=mid:video/,"a=mid:sdparta_0")),r={sdp:o.sdp,type:"answer"},e.screen&&"detail"===e.optimizationMode&&(u.default.debug("[".concat(t.client,"] remove screen share abs ext")),o.sdp=y(r.sdp)),t.peerConnection.setRemoteDescription(new n(r),function(){u.default.debug("["+t.clientId+"]setRemoteDescription succeeded")},function(e){u.default.info("["+t.clientId+"]setRemoteDescription failed: "+e)}),t.state="established"):"pr-answer"===o.messageType?t.peerConnection.setRemoteDescription(new n(r={sdp:o.sdp,type:"pr-answer"}),function(){u.default.debug("["+t.clientId+"]setRemoteDescription succeeded")},function(e){u.default.info("["+t.clientId+"]setRemoteDescription failed: "+e.name)}):t.error("offer"===o.messageType?"Not written yet":"Illegal message for this state: "+o.messageType+" in state "+t.state):"established"===t.state&&("OFFER"===o.messageType?(t.peerConnection.setRemoteDescription(new n(r={sdp:o.sdp,type:"offer"}),function(){u.default.debug("["+t.clientId+"]setRemoteDescription succeeded")},function(e){u.default.info("["+t.clientId+"]setRemoteDescription failed: "+e.name)}),t.state="offer-received",t.markActionNeeded()):t.error("Illegal message for this state: "+o.messageType+" in state "+t.state))},t.setRtpSenderParameters=function(){var e=c()(a.a.mark(function e(n){var i,r,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.peerConnection.getSenders(),r=i.find(function(e){return"video"===e.track.kind})){e.next=4;break}return e.abrupt("return");case 4:return(o=r.getParameters()).degradationPreference=n,e.prev=6,u.default.debug("[".concat(t.clientId,"] setParameters"),o),e.next=10,r.setParameters(o);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),u.default.debug("[".concat(t.clientId,"] setParameters failed, ignore"));case 15:case"end":return e.stop()}},e,null,[[6,12]])}));return function(t){return e.apply(this,arguments)}}();var r={id:"",type:"",mediaType:"opus",googCodecName:"opus",aecDivergentFilterFraction:"0",audioInputLevel:"0",bytesSent:"0",packetsSent:"0",googEchoCancellationReturnLoss:"0",googEchoCancellationReturnLossEnhancement:"0"},o={id:"",type:"",mediaType:"",googCodecName:e.codec?e.codec.toUpperCase():"",bytesSent:"0",packetsLost:"0",packetsSent:"0",googAdaptationChanges:"0",googAvgEncodeMs:"0",googEncodeUsagePercent:"0",googFirsReceived:"0",googFrameHeightSent:"0",googFrameHeightInput:"0",googFrameRateInput:"0",googFrameRateSent:"0",googFrameWidthSent:"0",googFrameWidthInput:"0",googNacksReceived:"0",googPlisReceived:"0",googRtt:"0"},s={id:"",type:"",mediaType:"",audioOutputLevel:"0",bytesReceived:"0",packetsLost:"0",packetsReceived:"0",googAccelerateRate:"0",googCurrentDelayMs:"0",googDecodingCNG:"0",googDecodingCTN:"0",googDecodingCTSG:"0",googDecodingNormal:"0",googDecodingPLC:"0",googDecodingPLCCNG:"0",googExpandRate:"0",googJitterBufferMs:"0",googJitterReceived:"0",googPreemptiveExpandRate:"0",googPreferredJitterBufferMs:"0",googSecondary
1DecodedRate:"0",googSpeechExpandRate:"0"},l={id:"",type:"",mediaType:"",googTargetDelayMs:"0",packetsLost:"0",googDecodeMs:"0",googMaxDecodeMs:"0",googRenderDelayMs:"0",googFrameWidthReceived:"0",googFrameHeightReceived:"0",googFrameRateReceived:"0",googFrameRateDecoded:"0",googFrameRateOutput:"0",googJitterBufferMs:"0",googCurrentDelayMs:"0",googMinPlayoutDelayMs:"0",googNacksSent:"0",googPlisSent:"0",googFirsSent:"0",bytesReceived:"0",packetsReceived:"0",googFramesDecoded:"0"},p=0,f=0,m=0;t.getVideoRelatedStats=function(e){t.peerConnection.getStats().then(function(n){var i,r=g(n.values());try{for(r.s();!(i=r.n()).done;){var o=i.value;if(t.isSubscriber){if(("inbound-rtp"===o.type||"inboundrtp"===o.type)&&"video"===o.mediaType){if(!t.lastReport)return void(t.lastReport=o);e&&e({browser:"firefox",mediaType:"video",peerId:t.uid,isVideoMute:t.isVideoMute,frameRateReceived:Math.round(o.framerateMean)+"",frameRateDecoded:o.framesDecoded-t.lastReport.framesDecoded+"",bytesReceived:o.bytesReceived+"",packetsReceived:o.packetsReceived+"",packetsLost:o.packetsLost+""}),t.lastReport=o}}else if(("outbound-rtp"===o.type||"outboundrtp"===o.type)&&"video"===o.mediaType){if(!t.lastReport)return void(t.lastReport=o);e&&e({mediaType:"video",isVideoMute:t.isVideoMute,frameRateInput:Math.round(o.framerateMean)+"",frameRateSent:o.framesEncoded-t.lastReport.framesEncoded+""}),t.lastReport=o}}}catch(e){r.e(e)}finally{r.f()}})},t.getAudioRelatedStats=function(e){t.peerConnection.getStats().then(function(n){var i,r=g(n.values());try{for(r.s();!(i=r.n()).done;){var o=i.value;t.isSubscriber&&("inbound-rtp"!==o.type&&"inboundrtp"!==o.type||"audio"!==o.mediaType||e&&e({browser:"firefox",mediaType:"audio",peerId:t.uid,isAudioMute:t.isAudioMute,frameDropped:o.packetsLost+"",frameReceived:o.packetsReceived+"",googJitterReceived:o.jitter+"",bytesReceived:o.bytesReceived+"",packetsReceived:o.packetsReceived+"",packetsLost:o.packetsLost+""}))}}catch(e){r.e(e)}finally{r.f()}})},t.getStatsRate=function(e){t.getStats(function(t){t.forEach(function(e){}),e(t)})}
1,t.getStats=function(e,n){n=(n=n||500)>500?500:n,t.lastTimeGetStats&&Date.now()-t.lastTimeGetStats<n?e&&e(t.filterStatsCache,t.originStatsCache):this._getStats(function(n,i){t.filterStatsCache=n,t.originStatsCache=i,t.lastTimeGetStats=Date.now(),e&&e(n,i)})},t._getStats=function(n){t.peerConnection.getStats().then(function(i){var a,c=[],u=g(i.values());try{for(u.s();!(a=u.n()).done;){var d=a.value;c.push(d),"outbound-rtp"!==d.type&&"outboundrtp"!==d.type||"video"!==d.mediaType||-1!==d.id.indexOf("rtcp")||(o.id=d.id,o.type=d.type,o.mediaType=d.mediaType,o.bytesSent=d.bytesSent?d.bytesSent+"":"0",o.packetsSent=d.packetsSent?d.packetsSent+"":"0",o.googPlisReceived=d.pliCount?d.pliCount+"":"0",o.googNacksReceived=d.nackCount?d.nackCount+"":"0",o.googFirsReceived=d.firCount?d.firCount+"":"0",o.googFrameRateSent=d.framerateMean?Math.round(d.framerateMean)+"":"0"),"outbound-rtp"!==d.type&&"outboundrtp"!==d.type||"audio"!==d.mediaType||-1!==d.id.indexOf("rtcp")||(r.id=d.id,r.type=d.type,r.mediaType=d.mediaType,r.bytesSent=d.bytesSent?d.bytesSent+"":"0",r.packetsSent=d.packetsSent?d.packetsSent+"":"0",e.agoraStream.local&&(r.audioInputLevel=Math.round(32767*e.agoraStream.getAudioLevel()).toString())),"inbound-rtp"!==d.type&&"inboundrtp"!==d.type||"audio"!==d.mediaType||d.isRemote||-1!==d.id.indexOf("rtcp")||(s.id=d.id,s.type=d.type,s.mediaType=d.mediaType,s.bytesReceived=d.bytesReceived?d.bytesReceived+"":"0",s.packetsLost=d.packetsLost?d.packetsLost+"":"0",s.packetsReceived=d.packetsReceived?d.packetsReceived+"":"0",s.googJitterReceived=d.jitter?d.jitter+"":"0",e.agoraStream.local||(s.audioOutputLevel=Math.round(32767*e.agoraStream.getAudioLevel()).toString())),"inbound-rtp"!==d.type&&"inboundrtp"!==d.type||"video"!==d.mediaType||d.isRemote||-1!==d.id.indexOf("rtcp")||(l.id=d.id,l.type=d.type,l.mediaType=d.mediaType,l.bytesReceived=d.bytesReceived?d.bytesReceived+"":"0",l.googFrameRateReceived=d.framerateMean?Math.round(d.framerateMean)+"":"0",l.googFramesDecoded=d.framesDecoded?d.framesDecoded+"":"0",Date.now()-m>=1e3?(l.googFrameRateDecoded=(d.framesDecoded-p)/((Date.now()-m)/1e3),l.googFrameRateDecoded=Math.round(Math.max(0,l.googFrameRateDecoded)),m=Date.now(),f=l.googFrameRateDecoded,p=d.framesDecoded,l.googFrameRateDecoded=l.googFrameRateDecoded.toString()):l.googFrameRateDecoded=f.toString(),l.packetsLost=d.packetsLost?d.packetsLost+"":"0",l.packetsReceived=d.packetsReceived?d.packetsReceived+"":"0",l.googJitterBufferMs=d.jitter?d.jitter+"":"0",l.googNacksSent=d.nackCount?d.nackCount+"":"0",l.googPlisSent=d.pliCount?d.pliCount+"":"0",l.googFirsSent=d.firCount?d.firCount+"":"0"),-1!==d.id.indexOf("outbound_rtcp_video")&&(o.packetsLost=d.packetsLost?d.packetsLost+"":"0")}}catch(e){u.e(e)}finally{u.f()}var h=[o,r,s,l];h.push({id:"time",startTime:t.connectedTime,timestamp:new Date}),n(h,c)},function(e){u.default.error("["+t.clientId+"]"+e)})},t.addStream=function(e){i=!0,t.peerConnection.addStream(e),t.markActionNeeded()},t.removeStream=function(){t.markActionNeeded()},t.close=function(){t.state="closed",t.peerConnection.close()},t.markActionNeeded=function(){t.actionNeeded=!0,t.doLater(function(){t.onstablestate()})},t.doLater=function(e){window.setTimeout(e,1)},t.onstablestate=function(){if(t.actionNeeded){if("new"===t.state||"established"===t.state)i&&(t.mediaConstraints=void 0),t.peerConnection.createOffer(function(e){if(e.sdp=v(e.sdp),e.sdp=e.sdp.replace(/a=extmap:1 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time/,"a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"),e.sdp!==t.prevOffer)return t.peerConnection.setLocalDescription(e),t.state="preparing-offer",void t.markActionNeeded();u.default.debug("["+t.clientId+"]Not sending a new offer")},function(e){u.default.debug("["+t.clientId+"]Ups! create offer failed ",e)},t.mediaConstraints);else if("preparing-offer"===t.state){if(t.moreIceComing)return;t.prevOffer=t.peerConnection.localDescription.sdp,t.offerCandidates=t.prevOffer.match(/a=candidate.+\r\n/g)||[],t.offerCandidates.length||(e.isCloudProxy3&&e.onNoIceCandidate&&e.onNoIceCandidate(),u.default.warning("[".concat(t.clientId,"]No Ice Candidate generated")),Object(h.getParameter)("SHIM_CANDIDATE")?(u.default.debug("Shimming fake candidate"),t.prevOffer+="a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"):u.default.error("[".concat(t.clientId,"]None Ice Candidate not allowed"))),t.prevOffer=t.prevOffer.replace(/a=candidate:.+typ\shost.+\r\n/g,"a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"),t.sendMessage("OFFER",t.prevOffer),t.state="offer-sent"}else if("offer-received"===t.state)t.peerConnection.createAnswer(function(e){if(t.peerConnection.setLocalDescription(e),t.state="offer-received-preparing-answer",t.iceStarted)t.markActionNeeded();else{var n=new Date;
1u.default.debug("["+t.clientId+"]"+n.getTime()+": Starting ICE in responder"),t.iceStarted=!0}},function(){u.default.debug("["+t.clientId+"]Ups! Something went wrong")});else if("offer-received-preparing-answer"===t.state){if(t.moreIceComing)return;t.sendMessage("ANSWER",t.peerConnection.localDescription.sdp),t.state="established"}else t.debug("Dazed and confused in state "+t.state+", stopping here");t.actionNeeded=!1}},t.sendMessage=function(e,n){var i={};i.messageType=e,i.sdp=n,"OFFER"===e?(i.offererSessionId=t.sessionId,i.answererSessionId=t.otherSessionId,i.seq=t.sequenceNumber+=1,i.tiebreaker=Math.floor(429496723*Math.random()+1)):(i.offererSessionId=t.incomingMessage.offererSessionId,i.answererSessionId=t.sessionId,i.seq=t.incomingMessage.seq),t.onsignalingmessage(JSON.stringify(i))},t._getSender=function(e){if(t.peerConnection&&t.peerConnection.getSenders){var n=t.peerConnection.getSenders().find(function(t){return t.track.kind==e});if(n)return n}return null},t.hasSender=function(e){return!!t._getSender(e)},t.replaceTrack=function(e,n,i){var r=t._getSender(e.kind);if(!r)return i("NO_SENDER_FOUND");try{r.replaceTrack(e)}catch(e){return i&&i(e)}setTimeout(function(){return n&&n()},50)},t.error=function(e){throw"Error in RoapOnJsep: "+e},t.sessionId=t.roapSessionId+=1,t.sequenceNumber=0,t.actionNeeded=!1,t.iceStarted=!1,t.moreIceComing=!0,t.iceCandidateCount=0,t.onsignalingmessage=e.callback,t.peerConnection.ontrack=function(e){t.onaddstream&&t.onaddstream(e,"ontrack")},t.peerConnection.onremovestream=function(e){t.onremovestream&&t.onremovestream(e)},t.peerConnection.oniceconnectionstatechange=function(e){"connected"===e.currentTarget.iceConnectionState&&(t.connectedTime=new Date),t.oniceconnectionstatechange&&t.oniceconnectionstatechange(e.currentTarget.iceConnectionState)};var v=function(t){var n;if(e.video&&e.maxVideoBW&&(null==(n=t.match(/m=video.*\r\n/))&&(n=t.match(/m=video.*\n/)),n&&n.length>0)){var i=n[0]+"b=TIAS:"+1e3*e.maxVideoBW+"\r\n";t=t.replace(n[0],i)}return e.audio&&e.maxAudioBW&&(null==(n=t.match(/m=audio.*\r\n/))&&(n=t.match(/m=audio.*\n/)),n&&n.length>0)&&(t=t.replace(n[0],i=n[0]+"b=TIAS:"+1e3*e.maxAudioBW+"\r\n")),t},y=function(e){return(e=e.replace(/a=.*abs-send-time\r\n/g,"")).replace(/a=.*goog-remb\r\n/g,"")};return t.onaddstream=null,t.onremovestream=null,t.state="new",t.markActionNeeded(),t}(e)):"iOS"===i.getBrowserOS()||i.isSafari()?(u.default.debug("["+t.streamId+"]["+t.clientId+"]Safari"),(t=function(e){var t={},n=d.RTCPeerConnection;t.uid=e.uid,t.isVideoMute=e.isVideoMute,t.isAudioMute=e.isAudioMute,t.isSubscriber=e.isSubscriber,t.clientId=e.clientId,t.filterStatsCache=[],t.originStatsCache=[],t.lastTimeGetStats=null,t.pc_config={iceServers:[],bundlePolicy:"max-bundle"},t.con={optional:[{DtlsSrtpKeyAgreement:!0}]},e.iceServers instanceof Array?t.pc_config.iceServers=e.iceServers:(e.stunServerUrl&&(e.stunServerUrl instanceof Array?e.stunServerUrl.map(function(e){"string"==typeof e&&""!==e&&t.pc_config.iceServers.push({url:e})}):"string"==typeof e.stunServerUrl&&""!==e.stunServerUrl&&t.pc_config.iceServers.push({url:e.stunServerUrl})),e.turnServers&&(e.turnServers instanceof Array?e.turnServers.map(function(e){e.udpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.udpport+"?transport=udp"}),"string"==typeof e.tcpport&&""!==e.tcpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.tcpport+"?transport=tcp"}),!0===e.forceturn&&(t.pc_config.iceTransportPolicy="relay")}):u.default.error("[".concat(t.clientId,"] turnServers is not a array")))),void 0===e.audio&&(e.audio=!0),void 0===e.video&&(e.video=!0),t.mediaConstraints={mandatory:{OfferToReceiveVideo:e.video,OfferToReceiveAudio:e.audio}},t.roapSessionId=103;try{t.pc_config.sdpSemantics=Object(h.getParameter)("PLAN"),t.peerConnection=new n(t.pc_config,t.con)}catch(e){delete t.pc_config.sdpSemantics,t.peerConnection=new n(t.pc_config,t.con)}t.iceCandidateTimer=setTimeout(function(){t.iceCandidateTimer=null,t.moreIceComing&&(t.moreIceComing=!1,t.markActionNeeded())}
1,Object(h.getParameter)("CANDIDATE_TIMEOUT")),t.peerConnection.onicecandidate=function(e){var n,i,r,o;i=(n=t.peerConnection.localDescription.sdp).match(/a=candidate:.+typ\ssrflx.+\r\n/),r=n.match(/a=candidate:.+typ\shost.+\r\n/),o=n.match(/a=candidate:.+typ\srelay.+\r\n/),0===t.iceCandidateCount&&(t.timeout=setTimeout(function(){t.moreIceComing&&(t.moreIceComing=!1,t.markActionNeeded())},1e3)),null===i&&null===r&&null===o||void 0!==t.ice||!t.iceCandidateTimer||(clearTimeout(t.iceCandidateTimer),t.iceCandidateTimer=null,t.ice=0,t.moreIceComing=!1,t.markActionNeeded()),t.iceCandidateCount=t.iceCandidateCount+1};var i=function(t){return e.screen&&(t=t.replace("a=x-google-flag:conference\r\n","")),t},r=function(n){var i;return(i=n.match(/m=video.*\r\n/))&&e.minVideoBW&&e.maxVideoBW&&(n=n.replace(i[0],i[0]+"b=AS:"+e.maxVideoBW+"\r\n"),u.default.debug("["+t.clientId+"]Set Video Bitrate - min:"+e.minVideoBW+" max:"+e.maxVideoBW)),(i=n.match(/m=audio.*\r\n/))&&e.maxAudioBW&&(n=n.replace(i[0],i[0]+"b=AS:"+e.maxAudioBW+"\r\n")),n};t.processSignalingMessage=function(n){var o,s=JSON.parse(n);t.incomingMessage=s,"new"===t.state?"OFFER"===s.messageType?(o={sdp:s.sdp,type:"offer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(o)),t.state="offer-received",t.markActionNeeded()):t.error("Illegal message for this state: "+s.messageType+" in state "+t.state):"offer-sent"===t.state?"ANSWER"===s.messageType?((o={sdp:s.sdp,type:"answer"}).sdp=i(o.sdp),o.sdp=r(o.sdp),o.sdp=o.sdp.replace(/a=x-google-flag:conference\r\n/g,""),e.screen&&"detail"===e.optimizationMode&&(u.default.debug("[".concat(t.client,"] remove screen share abs ext")),o.sdp=o.sdp.replace(/a=.*abs-send-time\r\n/g,"").replace(/a=.*goog-remb\r\n/g,"")),t.peerConnection.setRemoteDescription(new RTCSessionDescription(o)),t.state="established"):"pr-answer"===s.messageType?(o={sdp:s.sdp,type:"pr-answer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(o))):t.error("offer"===s.messageType?"Not written yet":"Illegal message for this state: "+s.messageType+" in state "+t.state):"established"===t.state&&("OFFER"===s.messageType?(o={sdp:s.sdp,type:"offer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(o)),t.state="offer-received",t.markActionNeeded()):"ANSWER"===s.messageType?((o={sdp:s.sdp,type:"answer"}).sdp=i(o.sdp),o.sdp=r(o.sdp),t.peerConnection.setRemoteDescription(new RTCSessionDescription(o))):t.error("Illegal message for this state: "+s.messageType+" in state "+t.state))},t.setRtpSenderParameters=function(){var e=c()(a.a.mark(function e(n){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.degradation=n;case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),t._setRtpSenderParameters=function(){var e=c()(a.a.mark(function e(n){var i,r,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.peerConnection.getSenders(),r=i.find(function(e){return e&&e.track&&"video"===e.track.kind})){e.next=4;break}return e.abrupt("return");case 4:return(o=r.getParameters()).degradationPreference=n,e.prev=6,u.default.debug("[".concat(t.clientId,"] setParameters"),o),e.next=10,r.setParameters(o);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),u.default.debug("[".concat(t.clientId,"] setParameters failed, ignore"));case 15:case"end":return e.stop()}},e,null,[[6,12]])}));return function(t){return e.apply(this,arguments)}}();var o={id:"",type:"",mediaType:"",googCodecName:"opus",aecDivergentFilterFraction:"0",audioInputLevel:"0",bytesSent:"0",packetsSent:"0",googEchoCancellationReturnLoss:"0",googEchoCancellationReturnLossEnhancement:"0"},s={id:"",type:"",mediaType:"",googCodecName:e.codec?e.codec.toUpperCase():"",bytesSent:"0",packetsLost:"0",packetsSent:"0",googAdaptationChanges:"0",googAvgEncodeMs:"0",googEncodeUsagePercent:"0",googFirsReceived:"0",googFrameHeightSent:"0",googFrameHeightInput:"0",googFrameRateInput:"0",googFrameRateSent:"0",googFrameWidthSent:"0",googFrameWidthInput:"0",googNacksReceived:"0",googPlisReceived:"0",googRtt:"0",googFramesEncoded:"0"},l={id:"",type:"",mediaType:"",audioOutputLevel:"0",bytesReceived:"0",packetsLost:"0",packetsReceived:"0",googAccelerateRate:"0",googCurrentDelayMs:"0",googDecodingCNG:"0",googDecodingCTN:"0",googDecodingCTSG:"0",googDecodingNormal:"0",googDecodingPLC:"0",googDecodingPLCCNG:"0",googExpandRate:"0",googJitterBufferMs:"0",googJitterReceived:"0",googPreemptiveExpandRate:"0",googPreferredJitterBufferMs:"0",googSecondary
1DecodedRate:"0",googSpeechExpandRate:"0"},p={id:"",type:"",mediaType:"",googTargetDelayMs:"0",packetsLost:"0",googDecodeMs:"0",googMaxDecodeMs:"0",googRenderDelayMs:"0",googFrameWidthReceived:"0",googFrameHeightReceived:"0",googFrameRateReceived:"0",googFrameRateDecoded:"0",googFrameRateOutput:"0",googFramesDecoded:"0",googFrameReceived:"0",googJitterBufferMs:"0",googCurrentDelayMs:"0",googMinPlayoutDelayMs:"0",googNacksSent:"0",googPlisSent:"0",googFirsSent:"0",bytesReceived:"0",packetsReceived:"0"},f={id:"bweforvideo",type:"VideoBwe",googAvailableSendBandwidth:"0",googAvailableReceiveBandwidth:"0",googActualEncBitrate:"0",googRetransmitBitrate:"0",googTargetEncBitrate:"0",googBucketDelay:"0",googTransmitBitrate:"0"},g=0,m=0,v=0;return t.isRemoteVideoStats=function(e){return!!(e.frameHeight&&e.frameWidth&&e.remoteSource)},t.getVideoRelatedStats=function(n){t.peerConnection.getStats().then(function(i){i.forEach(function(i){if(t.isSubscriber){var r={peerId:t.uid,mediaType:"video",isVideoMute:t.isVideoMute};if("track"===i.t
1ype&&(~i.id.indexOf("video")||~i.trackIdentifier.indexOf("v")||t.isRemoteVideoStats(i))){if(!t.lastReport)return void(t.lastReport=i);r.frameRateReceived=i.framesReceived-t.lastReport.framesReceived+"",r.frameRateDecoded=i.framesDecoded-t.lastReport.framesDecoded+"",t.lastReport=i}"inbound-rtp"===i.type&&~i.id.indexOf("Video")&&(r.bytesReceived=i.bytesReceived+"",r.packetsReceived=i.packetsReceived+"",r.packetsLost=i.packetsLost+""),n&&n(r)}else if("outbound-rtp"===i.type&&~i.id.indexOf("Video")){if(!t.lastReport)return void(t.lastReport=i);n&&n({mediaType:"video",isVideoMute:t.isVideoMute,frameRateInput:e.maxFrameRate+"",frameRateSent:i.framesEncoded-t.lastReport.framesEncoded+""}),t.lastReport=i}})})},t.getAudioRelatedStats=function(e){t.peerConnection.getStats().then(function(n){n.forEach(function(n){t.isSubscriber&&"inbound-rtp"===n.type&&~n.id.indexOf("Audio")&&e&&e({peerId:t.uid,mediaType:"audio",isAudioMute:t.isAudioMute,frameDropped:n.packetsLost+"",frameReceived:n.packetsReceived+"",googJitterReceived:n.jitter+"",bytesReceived:n.bytesReceived+"",packetsReceived:n.packetsReceived+"",packetsLost:n.packetsLost+""})})})},t.getStatsRate=function(e){t.getStats(function(t){t.forEach(function(e){"outbound-rtp"===e.type&&"video"===e.mediaType&&e.googFramesEncoded&&(e.googFrameRateSent=Math.ceil((e.googFramesEncoded-g)/3).toString(),g=e.googFramesEncoded),"inbound-rtp"===e.type&&-1!=e.id.indexOf("55543")&&(e.googFrameRateReceived&&(e.googFrameRateReceived=Math.ceil((e.googFrameReceived-v)/3).toString(),v=e.googFrameReceived),e.googFrameRateDecoded&&(e.googFrameRateDecoded=Math.ceil((e.googFramesDecoded-m)/3).toString(),m=e.googFramesDecoded))}),e(t)})}
1,t.getStats=function(e,n){n=(n=n||500)>500?500:n,t.lastTimeGetStats&&Date.now()-t.lastTimeGetStats<n?e&&e(t.filterStatsCache,t.originStatsCache):this._getStats(function(n,i){t.filterStatsCache=n,t.originStatsCache=i,t.lastTimeGetStats=Date.now(),e&&e(n,i)})},t._getStats=function(n){var i=[];t.peerConnection.getStats().then(function(r){r.forEach(function(t){var n;i.push(t),"outbound-rtp"===t.type&&"audio"===t.mediaType&&(o.id=t.id,o.type=t.type,o.mediaType=t.mediaType,o.bytesSent=t.bytesSent?t.bytesSent+"":"0",o.packetsSent=t.packetsSent?t.packetsSent+"":"0",e.agoraStream.local&&(o.audioInputLevel=Math.round(32767*e.agoraStream.getAudioLevel()).toString())),"outbound-rtp"===t.type&&"video"===t.mediaType&&(s.id=t.id,s.type=t.type,s.mediaType=t.mediaType,s.bytesSent=t.bytesSent?t.bytesSent+"":"0",s.packetsSent=t.packetsSent?t.packetsSent+"":"0",s.googPlisReceived=t.pliCount?t.pliCount+"":"0",s.googNacksReceived=t.nackCount?t.nackCount+"":"0",s.googFirsReceived=t.firCount?t.firCount+"":"0",s.googFramesEncoded=t.framesEncoded?t.framesEncoded+"":"0",(n=r.get(t.trackId))&&(s.googFrameHeightSent=n.frameHeight&&n.frameHeight.toString(),s.googFrameWidthSent=n.frameWidth&&n.frameWidth.toString())),"inbound-rtp"!==t.type||-1==t.id.indexOf("44444")&&"audio"!==t.mediaType||(l.id=t.id,l.type=t.type,l.mediaType="audio",l.packetsReceived=t.packetsReceived?t.packetsReceived+"":"0",l.bytesReceived=t.bytesReceived?t.bytesReceived+"":"0",l.packetsLost=t.packetsLost?t.packetsLost+"":"0",l.packetsReceived=t.packetsReceived?t.packetsReceived+"":"0",l.googJitterReceived=t.jitter?t.jitter+"":"0",(n=r.get(t.trackId))&&(l.audioOutputLevel=n.audioLevel&&Math.round(32767*n.audioLevel).toString()),e.agoraStream.local||l.audioOutputLevel||(l.audioOutputLevel=Math.round(32767*e.agoraStream.getAudioLevel()).toString())),"inbound-rtp"!==t.type||-1==t.id.indexOf("55543")&&"video"!==t.mediaType||(p.id=t.id,p.type=t.type,p.mediaType="video",p.packetsReceived=t.packetsReceived?t.packetsReceived+"":"0",p.bytesReceived=t.bytesReceived?t.bytesReceived+"":"0",p.packetsLost=t.packetsLost?t.packetsLost+"":"0",p.googJitterBufferMs=t.jitter?t.jitter+"":"0",p.googNacksSent=t.nackCount?t.nackCount+"":"0",p.googPlisSent=t.pliCount?t.pliCount+"":"0",p.googFirsSent=t.firCount?t.firCount+"":"0",(n=r.get(t.trackId))&&(p.googFrameHeightReceived=n.frameHeight&&n.frameHeight.toString(),p.googFrameWidthReceived=n.frameWidth&&n.frameWidth.toString(),p.googFrameReceived=n.framesReceived&&n.framesReceived.toString(),p.googFramesDecoded=n.framesDecoded&&n.framesDecoded.toString())),"candidate-pair"===t.type&&(0==t.availableIncomingBitrate?f.googAvailableSendBandwidth=t.availableOutgoingBitrate+"":f.googAvailableReceiveBandwidth=t.availableIncomingBitrate+"")});var a=[f,o,s,l,p];a.push({id:"time",startTime:t.connectedTime,timestamp:new Date}),n(a,i)}).catch(function(e){u.default.error("["+t.clientId+"] ",e)})},t.addTrack=function(e,n){t.peerConnection.addTrack(e,n)},t.removeTrack=function(e,n){var i=t.peerConnection.getSenders().find(function(t){return t.track==e});i.replaceTrack(null),t.peerConnection.removeTrack(i)},t.addStream=function(e){window.navigator.userAgent.indexOf("Safari")>-1&&-1===navigator.userAgent.indexOf("Chrome")?e.getTracks().forEach(function(n){return t.peerConnection.addTrack(n,e)}):t.peerConnection.addStream(e),t.markActionNeeded()},t.removeStream=function(){t.markActionNeeded()},t.close=function(){t.state="closed",t.peerConnection.close()},t.markActionNeeded=function(){t.actionNeeded=!0,t.doLater(function(){t.onstablestate()})},t.doLater=function(e){window.setTimeout(e,1)},t.onstablestate=function(){if(t.actionNeeded){if("new"===t.state||"established"===t.state)e.isSubscriber&&(t.peerConnection.addTransceiver("audio",{direction:"recvonly"}),t.peerConnection.addTransceiver("video",{direction:"recvonly"})),t.peerConnection.createOffer(t.mediaConstraints).then(function(n){if(n.sdp=r(n.sdp),e.isSubscriber||(n.sdp=n.sdp.replace(/a=.*video-orientation\r\n/g,"")),n.sdp!==t.prevOffer)return t.peerConnection.setLocalDescription(n),t.state="preparing-offer",void t.markActionNeeded();u.default.debug("["+t.clientId+"]Not sending a new offer")}).catch(function(e){u.default.debug("["+t.clientId+"]peer connection create offer failed ",e)});else if("preparing-offer"===t.state){if(t.moreIceComing)return;t.prevOffer=t.peerConnection.localDescription.sdp,t.offerCandidates=t.prevOffer.match(/a=candidate.+\r\n/g)||[],t.offerCandidates.length||(u.default.warning("[".concat(t.clientId,"]No Ice Candidate generated")),e.isCloudProxy3&&e.onNoIceCandidate&&e.onNoIceCandidate(),Object(h.getParameter)("SHIM_CANDIDATE")?(u.default.debug("Shimming fake candidate"),t.prevOffer+="a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"):u.default.error("[".concat(t.clientId,"]None Ice Candidate not allowed"))),t.prevOffer=t.prevOffer.replace(/a=candidate:.+typ\shost.+\r\n/g,"a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"),t.sendMessage("OFFER",t.prevOffer),t.state="offer-sent"}else if("offer-received"===t.state)t.peerConnection.createAnswer(function(e){if(t.peerConnection.setLocalDescription(e),t.state="offer-received-preparing-answer",t.iceStarted)t.markActionNeeded();else{var n=new Date;
1u.default.debug("["+t.clientId+"]"+n.getTime()+": Starting ICE in responder"),t.iceStarted=!0}},function(e){u.default.debug("["+t.clientId+"]peer connection create answer failed ",e)},t.mediaConstraints);else if("offer-received-preparing-answer"===t.state){if(t.moreIceComing)return;t.sendMessage("ANSWER",t.peerConnection.localDescription.sdp),t.state="established"}else t.debug("Dazed and confused in state "+t.state+", stopping here");t.actionNeeded=!1}},t.sendMessage=function(e,n){var i={};i.messageType=e,i.sdp=n,"OFFER"===e?(i.offererSessionId=t.sessionId,i.answererSessionId=t.otherSessionId,i.seq=t.sequenceNumber+=1,i.tiebreaker=Math.floor(429496723*Math.random()+1)):(i.offererSessionId=t.incomingMessage.offererSessionId,i.answererSessionId=t.sessionId,i.seq=t.incomingMessage.seq),t.onsignalingmessage(JSON.stringify(i))},t._getSender=function(e){if(t.peerConnection&&t.peerConnection.getSenders){var n=t.peerConnection.getSenders().find(function(t){return t.track.kind==e});if(n)return n}return null},t.hasSender=function(e){return!!t._getSender(e)},t.replaceTrack=function(e,n,i){var r=t._getSender(e.kind);if(!r)return i("NO_SENDER_FOUND");try{r.replaceTrack(e)}catch(e){return i&&i(e)}setTimeout(function(){return n&&n()},50)},t.error=function(e){throw"Error in RoapOnJsep: "+e},t.sessionId=t.roapSessionId+=1,t.sequenceNumber=0,t.actionNeeded=!1,t.iceStarted=!1,t.moreIceComing=!0,t.iceCandidateCount=0,t.onsignalingmessage=e.callback,t.peerConnection.ontrack=function(e){console.log("!!! ontrack, ",e.track.kind,e.track),t.onaddstream&&t.onaddstream(e,"ontrack")},t.peerConnection.onremovestream=function(e){t.onremovestream&&t.onremovestream(e)},t.peerConnection.oniceconnectionstatechange=function(e){"connected"===e.currentTarget.iceConnectionState&&(t.connectedTime=new Date,t._setRtpSenderParameters(t.degradation)),t.oniceconnectionstatechange&&t.oniceconnectionstatechange(e.currentTarget.iceConnectionState)},t.renegotiate=function(){t.isSubscriber||(u.default.debug("[".concat(t.uid,"]"),"renegotiating"),void 0!==t.prevOffer&&t.peerConnection.createOffer().then(function(e){return e.sdp=e.sdp.replace(/a=recvonly\r\n/g,"a=inactive\r\n"),e.sdp=i(e.sdp),e.sdp=r(e.sdp),t.peerConnection.setLocalDescription(e)}).then(function(){t.onnegotiationneeded&&t.onnegotiationneeded(t.peerConnection.localDescription.sdp)}).catch(function(e){console.log("createOffer error: ",e)}))},t.isSubscriber||(t.peerConnection.onnegotiationneeded=t.renegotiate),t.onaddstream=null,t.onremovestream=null,t.state="new",t.markActionNeeded(),t}(e)).browser="safari"):~window.navigator.userAgent.indexOf("Edge")?t=new y.a(e):(t=function(e){var t={},n=d.RTCPeerConnection;t.uid=e.uid,t.isVideoMute=e.isVideoMute,t.isAudioMute=e.isAudioMute,t.isSubscriber=e.isSubscriber,t.clientId=e.clientId,t.filterStatsCache=[],t.originStatsCache=[],t.lastTimeGetStats=null,t.pc_config={iceServers:[]};var r={id:"outbound_audio_ssrc_send",type:"ssrc",mediaType:"",googCodecName:"opus",aecDivergentFilterFraction:"0",audioInputLevel:"0",bytesSent:"0",packetsSent:"0",googEchoCancellationReturnLoss:"0",googEchoCancellationReturnLossEnhancement:"0"},s={id:"outbound_video_ssrc_send",type:"ssrc",mediaType:"",googCodecName:e.codec?e.codec.toUpperCase():"",bytesSent:"0",packetsLost:"0",packetsSent:"0",googAdaptationChanges:"0",googAvgEncodeMs:"0",googEncodeUsagePercent:"0",googFirsReceived:"0",googFrameHeightSent:"0",googFrameHeightInput:"0",googFrameRateInput:"0",googFrameRateSent:"0",googFrameWidthSent:"0",googFrameWidthInput:"0",googNacksReceived:"0",googPlisReceived:"0",googRtt:"0"},l={id:"inbound_audio_ssrc_recv",type:"ssrc",mediaType:"",googCodecName:"opus",audioOutputLevel:"0",bytesReceived:"0",packetsLost:"0",packetsReceived:"0",googAccelerateRate:"0",googCurrentDelayMs:"0",googDecodingCNG:"0",googDecodingCTN:"0",googDecodingCTSG:"0",googDecodingNormal:"0",googDecodingPLC:"0",googDecodingPLCCNG:"0",googExpandRate:"0",googJitterBufferMs:"0",googJitterReceived:"0",googPreemptiveExpandRate:"0",googPreferredJitterBufferMs:"0",googSecondaryDecodedRate:"0",googSpeechExpandRate:"0"},f={id:"inbound_video_ssrc_recv",type:"ssrc",mediaType:"",googTargetDelayMs:"0",packetsLost:"0",googDecodeMs:"0",googMaxDecodeMs:"0",googRenderDelayMs:"0",googFrameWidthReceived:"0",googFrameHeightReceived:"0",googFrameRateReceived:"0",googFrameRateDecoded:"0",googFrameRateOutput:"0",googJitterBufferMs:"0",googCurrentDelayMs:"0",googMinPlayoutDelayMs:"0",googNacksSent:"0",googPlisSent:"0",googFirsSent:"0",bytesReceived:"0",packetsReceived:"0",googFramesReceived:"0",googFramesDecoded:"0"},g={id:"bweforvideo",type:"VideoBwe",googAvailableSendBandwidth:"0",googAvailableReceiveBandwidth:"0",googActualEncBitrate:"0",googRetransmitBitrate:"0",googTargetEncBitrate:"0",googBucketDelay:"0",googTransmitBitrate:"0"};t.con={optional:[{DtlsSrtpKeyAgreement:!0}]},e.iceServers instanceof Array?t.pc_config.iceServers=e.iceServers:(e.stunServerUrl&&(e.stunServerUrl instanceof Array?e.stunServerUrl.map(function(e){"string"==typeof e&&""!==e&&t.pc_config.iceServers.push({url:e})}):"string"==typeof e.stunServerUrl&&""!==e.stunServerUrl&&t.pc_config.iceServers.push({url:e.stunServerUrl})),e.turnServers&&(e.turnServers instanceof Array?e.turnServers.map(function(e){e.udpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.udpport+"?transport=udp"}),"string"==typeof e.tcpport&&""!==e.tcpport&&t.pc_config.iceServers.push({username:e.username,credential:e.credential,credentialType:"password",urls:(e.useTurns?"turns:":"turn:")+e.url+":"+e.tcpport+"?transport=tcp"}),!0===e.forceturn&&(t.pc_config.iceTransportPolicy="relay")}):u.default.error("[".concat(t.clientId,"] turnServers is not a array")))),void 0===e.audio&&(e.audio=!0),void 0===e.video&&(e.video=!0),t.mediaConstraints={mandatory:{OfferToReceiveVideo:e.video,OfferToReceiveAudio:e.audio}},t.roapSessionId=103;try{t.pc_config.sdpSemantics=Object(h.getParameter)("PLAN"),t.peerConnection=new n(t.pc_config,t.con)}catch(e){delete t.pc_config.sdpSemantics,t.peerConnection=new n(t.pc_config,t.con);var m=t.peerConnection.getConfiguration();
1m.sdpSemantics&&Object(h.setParameter)("PLAN",m.sdpSemantics)}t.iceCandidateTimer=setTimeout(function(){t.iceCandidateTimer=null,u.default.debug("[".concat(t.clientId,"]Candidates collected: ").concat(t.iceCandidateCount)),t.moreIceComing&&(t.moreIceComing=!1,t.markActionNeeded())},Object(h.getParameter)("CANDIDATE_TIMEOUT")),t.peerConnection.onicecandidate=function(e){var n,i,r,o;i=(n=t.peerConnection.localDescription.sdp).match(/a=candidate:.+typ\ssrflx.+\r\n/),r=n.match(/a=candidate:.+typ\shost.+\r\n/),o=n.match(/a=candidate:.+typ\srelay.+\r\n/),null===i&&null===r&&null===o||void 0!==t.ice||!t.iceCandidateTimer||(clearTimeout(t.iceCandidateTimer),t.iceCandidateTimer=null,t.ice=0,t.moreIceComing=!1,t.markActionNeeded()),t.iceCandidateCount=t.iceCandidateCount+1};var v=function(e){return e.replace("a=x-google-flag:conference\r\n","")},y=function(n){var i,r;if((i=n.match(/m=video.*\r\n/))&&e.minVideoBW&&e.maxVideoBW){r=i[0]+"b=AS:"+e.maxVideoBW+"\r\n";var o=0,s=0;"h264"===e.codec?(o=n.search(/a=rtpmap:(\d+) H264\/90000\r\n/),s=n.search(/H264\/90000\r\n/)):"vp8"===e.codec?(o=n.search(/a=rtpmap:(\d+) VP8\/90000\r\n/),s=n.search(/VP8\/90000\r\n/)):"vp9"===e.codec&&(o=n.search(/a=rtpmap:(\d+) VP9\/90000\r\n/),s=n.search(/VP9\/90000\r\n/)),-1!==o&&-1!==s&&s-o>10&&(r=r+"a=fmtp:"+n.slice(o+9,s-1)+" x-google-min-bitrate="+e.minVideoBW+"\r\n"),n=(n=n.replace(i[0],r)).replace(/42001f/g,"42e01f"),u.default.debug("["+t.clientId+"]Set Video Bitrate - min:"+e.minVideoBW+" max:"+e.maxVideoBW)}return(i=n.match(/m=audio.*\r\n/))&&e.maxAudioBW&&(n=n.replace(i[0],r=i[0]+"b=AS:"+e.maxAudioBW+"\r\n")),n};t.processSignalingMessage=function(n){var i,r=JSON.parse(n);t.incomingMessage=r,"new"===t.state?"OFFER"===r.messageType?(i={sdp:r.sdp,type:"offer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(i)).catch(function(e){}),t.state="offer-received",t.markActionNeeded()):t.error("Illegal message for this state: "+r.messageType+" in state "+t.state):"offer-sent"===t.state?"ANSWER"===r.messageType?((i={sdp:r.sdp,type:"answer"}).sdp=v(i.sdp),i.sdp=y(i.sdp),e.screen&&"detail"===e.optimizationMode&&(u.default.debug("[".concat(t.client,"] remove screen share abs ext")),i.sdp=i.sdp.replace(/a=.*abs-send-time\r\n/g,"").replace(/a=.*goog-remb\r\n/g,"")),e.isSubscriber&&(i.sdp=i.sdp.replace("minptime=10","minptime=10;stereo=1; sprop-stereo=1")),t.peerConnection.setRemoteDescription(new RTCSessionDescription(i)).catch(function(e){}),t.state="established"):"pr-answer"===r.messageType?(i={sdp:r.sdp,type:"pr-answer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(i)).catch(function(e){})):t.error("offer"===r.messageType?"Not written yet":"Illegal message for this state: "+r.messageType+" in state "+t.state):"established"===t.state&&("OFFER"===r.messageType?(i={sdp:r.sdp,type:"offer"},t.peerConnection.setRemoteDescription(new RTCSessionDescription(i)).catch(function(e){}),t.state="offer-received",t.markActionNeeded()):"ANSWER"===r.messageType?((i={sdp:r.sdp,type:"answer"}).sdp=v(i.sdp),i.sdp=y(i.sdp),t.peerConnection.setRemoteDescription(new RTCSessionDescription(i)).catch(function(e){})):t.error("Illegal message for this state: "+r.messageType+" in state "+t.state))},t.setRtpSenderParameters=function(){var e=c()(a.a.mark(function e(n){var i,r,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.peerConnection.getSenders(),console.log("senders",i),r=i.find(function(e){return"video"===e.track.kind})){e.next=5;break}return e.abrupt("return");case 5:return(o=r.getParameters()).degradationPreference=n,e.prev=7,u.default.debug("[".concat(t.clientId,"] setParameters"),o),e.next=11,r.setParameters(o);case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),u.default.debug("[".concat(t.clientId,"] setParameters failed, ignore"));case 16:case"end":return e.stop()}},e,null,[[7,13]])}));return function(t){return e.apply(this,arguments)}}();var b=0,_=0;return t.getVideoRelatedStats=function(e){t.getStats(function(n){n.forEach(function(n){if(t.isSubscriber){if("video"===n.mediaType&&n.id&&~n.id.indexOf("recv")){if(i.isChromeKernel()&&+i.getBrowserVersion()>=76){var r=+n.googFramesDecoded-_;t._setStat(f,"googFrameRateReceived",+n.googFramesReceived-b),t._setStat(f,"googFrameRateDecoded",r),t._setStat(f,"googFrameRateOutput",r),b=+n.googFramesReceived,_=+n.googFramesDecoded}e&&e({mediaType:"video",peerId:t.uid,isVideoMute:t.isVideoMute,frameRateReceived:n.googFrameRateReceived,frameRateDecoded:n.googFrameRateDecoded,bytesReceived:n.bytesReceived,packetsReceived:n.packetsReceived,packetsLost:n.packetsLost})}}else"video"===n.mediaType&&n.id&&~n.id.indexOf("send")&&e&&e({mediaType:"video",isVideoMute:t.isVideoMute,frameRateInput:n.googFrameRateInput,frameRateSent:n.googFrameRateSent,googRtt:n.googRtt})})})},t.getAudioRelatedStats=function(e){t.getStats(function(n){n.forEac
1h(function(n){t.isSubscriber&&"audio"===n.mediaType&&n.id&&~n.id.indexOf("recv")&&e&&e({mediaType:"audio",peerId:t.uid,isAudioMute:t.isAudioMute,frameDropped:parseInt(n.googDecodingPLC)+parseInt(n.googDecodingPLCCNG)+"",frameReceived:n.googDecodingCTN,googJitterReceived:n.googJitterReceived,bytesReceived:n.bytesReceived,packetsReceived:n.packetsReceived,packetsLost:n.packetsLost})})})},t.getStatsRate=function(e){t.getStats(function(t){e(t)})},t.getStats=function(e,n){n=(n=n||500)>500?500:n,t.lastTimeGetStats&&Date.now()-t.lastTimeGetStats<n?e&&e(t.filterStatsCache,t.originStatsCache):(t.lastTimeGetStats=Date.now(),this._getStats(function(n,i){t.filterStatsCache=n,t.originStatsCache=i,e&&e(n,i)}))},t._setStat=function(e,t,n){e.hasOwnProperty(t)&&(null!=n&&n!==1/0&&n==n||(n=0),e[t]=n+"")},t._processGetStatsAfterChrome76=function(e){var n=this;t.lastStats||(t.lastStats=new Map),t.peerConnection.getStats().then(function(i){var a,c=[],u=[],d=new Map,h=new Date,m=p(i.values());try{for(m.s();!(a=m.n()).done;){var v=a.value;"codec"!=v.type?"candidate-pair"!=v.type?("inbound-rtp"===v.type&&"video"===v.mediaType&&d.set("inbound-video",v),"inbound-rtp"===v.type&&"audio"===v.mediaType&&d.set("inbound-audio",v),"outbound-rtp"===v.type&&"audio"===v.mediaType&&d.set("outbound-audio",v),"outbound-rtp"===v.type&&"video"===v.mediaType&&d.set("outbound-video",v),"track"===v.type&&"video"===v.kind&&v.remoteSource&&d.set("remote-video-track",v),"track"===v.type&&"audio"===v.kind&&v.remoteSource&&d.set("remote-audio-track",v),"remote-inbound-rtp"===v.type&&"video"===v.mediaType&&d.set("remote-inbound-video",v),"remote-inbound-rtp"===v.type&&"audio"===v.mediaType&&d.set("remote-inbound-audio",v),"track"!==v.type||"video"!==v.kind||v.remoteSource||d.set("local-video-track",v),"track"!==v.type||"audio"!==v.kind||v.remoteSource||d.set("local-audio-track",v),"media-source"===v.type&&"video"===v.kind&&d.set("media-source-video",v),"media-source"===v.type&&"audio"===v.kind&&d.set("media-source-audio",v)):u.push(v):c.push(v)}}catch(e){m.e(e)}finally{m.f()}d.set("codec",c),d.set("candidatePairs",u),d.set("timestamp",+h);var y=null,b=null;if(f.timestamp=h,l.timestamp=h,r.timestamp=h,r.timestamp=h,g.timestamp=h,n.isSubscriber)(y=d.get("inbound-video"))&&(t._setStat(f,"id","inbound_video_ssrc_recv"),t._setStat(f,"mediaType",y.mediaType),t._setStat(f,"packetsLost",y.packetsLost),t._setStat(f,"googDecodeMs",null),t._setStat(f,"googMaxDecodeMs",null),t._setStat(f,"googRenderDelayMs",null),t._setStat(f,"googMinPlayoutDelayMs",null),t._setStat(f,"googNacksSent",y.nackCount),t._setStat(f,"googPlisSent",y.pliCount),t._setStat(f,"googFirsSent",y.firCount),t._setStat(f,"bytesReceived",y.bytesReceived),t._setStat(f,"packetsReceived",y.packetsReceived)),(y=d.get("inbound-audio"))&&(t._setStat(l,"id","inbound_audio_ssrc_recv"),t._setStat(l,"mediaType",y.mediaType),t._setStat(l,"bytesReceived",y.bytesReceived),t._setStat(l,"packetsLost",y.packetsLost),t._setStat(l,"packetsReceived",y.packetsReceived),t._setStat(l,"googAccelerateRate",y.removedSamplesForAcceleration),t._setStat(l,"googCurrentDelayMs",y.jitterBufferDelay),t._setStat(l,"googDecodingCNG",null),t._setStat(l,"googDecodingCTN",null),t._setStat(l,"googDecodingCTSG",null),t._setStat(l,"googDecodingNormal",null),t._setStat(l,"googDecodingPLC",null),t._setStat(l,"googDecodingPLCCNG",null),t._setStat(l,"googJitterReceived",y.jitter),t._setStat(l,"googPreferredJitterBufferMs",null),t._setStat(l,"googSecondaryDecodedRate",null)),(y=d.get("remote-video-track"))&&(t._setStat(f,"googTargetDelayMs",y.jitterBufferDelay),t._setStat(f,"googFrameWidthReceived",y.frameWidth),t._setStat(f,"googFrameHeightReceived",y.frameHeight),t._setStat(f,"googJitterBufferMs",y.jitterBufferDelay/y.jitterBufferEmittedCount*1e3),t._setStat(f,"googCurrentDelayMs",y.jitterBufferDelay),t._setStat(f,"googFramesDecoded",y.framesDecoded),t._setStat(f,"googFramesReceived",y.framesReceived)),(y=d.get("remote-audio-track"))&&(t._setStat(l,"audioOutputLevel",32767*y.audioLevel),t._setStat(l,"googJitterBufferMs",y.jitterBufferDelay/y.jitterBufferEmittedCount*1e3),t._setStat(l,"googExpandRate",y.concealedSamples),t._setStat(l,"googPreemptiveExpandRate",y.insertedSamplesForDeceleration),t._setStat(l,"googSpeechExpandRate",y.silentConcealedSamples));else{var _=t.lastStats.get("timestamp"),S=t.lastStats.get("outbound-video");if((y=d.get("outbound-audio"))&&(t._setStat(r,"id","outbound_audio_ssrc_send"),t._setStat(r,"mediaType",y.mediaType),t._setStat(r,"aecDivergentFilterFraction",null),t._setStat(r,"bytesSent",y.bytesSent),t._setStat(r,"packetsSent",y.packetsSent),b=y.transportId),y=d.get("outbound-video")){if(t._setStat(s,"id","outbound_video_ssrc_send"),t._setStat(s,"mediaType",y.mediaType),t._setStat(s,"bytesSent",y.bytesSent),t._setStat(s,"packetsSent",y.packetsSent),t._setStat(s,"googAdaptationChanges",y.qualityLimitationDurations),t._setStat(s,"googAvgEncodeMs",null),t._setStat(s,"googEncodeUsagePercent",null),b=y.transportId,y.totalEncodedBytesTarget&&S&&S.totalEncodedBytesTarget){var w=(y.totalEncodedBytesTarget-S.totalEncodedBytesTarget)/(+new Date-_);t._setStat(g,"googTargetEncBitrate",Math.floor(8*w*1e3))}if(y.retransmittedBytesSent&&S&&S.retransmittedBytesSent){var E=(y.retransmittedBytesSent-S.retransmittedBytesSent)/(+new Date-_);t._setStat(g,"googRetransmitBitrate",Math.floor(8*E*1e3))}if(y.bytesSent&&S&&S.bytesSent){var T=(y.bytesSent-S.bytesSent)/(+new Date-_);t._setStat(g,"googTransmitBitrate",Math.floor(8*T*1e3)),t._setStat(g,"googActualEncBitrate",Math.floor(8*T*1e3))}if(y.totalPacketSendDelay&&S&&S.totalPacketSendDelay){var C=(y.totalPacketSendDelay-S.totalPacketSendDelay)/(+new Date-_);t._setStat(g,"googBucketDelay",Math.floor(1e3*C))}}if((y=d.get("remote-inbound-video"))&&(t._setStat(s,"packetsLost",y.packetsLost),t._setStat(s,"googRtt",y.roundTripTime)),(y=d.get("local-video-track"))&&(t._setStat(s,"googFrameHeightSent",y.frameHeight),t._setStat(s,"googFrameWidthSent",y.frameWidth),void 0!==y.framesPerSecond&&t._setStat(s,"googFrameRateSent",y.framesPerSecond)),(y=d.get("local-audio-track"))&&(t._setStat(r,"googEchoCancellationReturnLoss",y.echoReturnLoss),t._setStat(r,"googEchoCancellationReturnLossEnhancement",y.echoReturnLossEnhancement)),(y=d.get("media-source-video"))&&(t._setStat(s,"googFrameHeightInput",y.height),t._setStat(s,"googFrameWidthInput",y.width),t._setStat(s,"googFrameRateInput",y.framesPerSecond)),(y=d.get("media-source-audio"))&&t._setStat(r,"audioInput
1Level",32767*y.totalAudioEnergy),(y=d.get("inbound-video"))&&(t._setStat(s,"googFirsReceived",y.firCount),t._setStat(s,"googNacksReceived",y.nackCount),t._setStat(s,"googPlisReceived",y.pliCount)),b)d.get("candidatePairs").map(function(e){b==e.transportId&&t._setStat(g,"googAvailableSendBandwidth",e.availableOutgoingBitrate)});else{var I=d.get("candidatePairs")[0];I&&t._setStat(g,"googAvailableSendBandwidth",I.availableOutgoingBitrate)}}t.lastStats=d;var R=[o()({},s),o()({},r),o()({},f),o()({},l),o()({},g)];R.push({id:"time",startTime:t.connectedTime,timestamp:new Date}),e(R)})},t._processGetStatsBeforeChrome76=function(e){t.peerConnection.getStats(function(n){var i,a=[],c=null;Object.keys(n).forEach(function(e){var t=n[e];t&&(a.push(t),c=t.timestamp,"VideoBwe"===t.type?g=t:t.id.indexOf("_send")>-1&&"video"===t.mediaType?s=t:t.id.indexOf("_send")>-1&&"audio"===t.mediaType?r=t:t.id.indexOf("_recv")>-1&&"video"===t.mediaType?f=t:t.id.indexOf("_recv")>-1&&"audio"===t.mediaType&&(l=t))}),(i=[o()({},s),o()({},r),o()({},f),o()({},l),o()({},g)]).push({id:"time",startTime:t.connectedTime,timestamp:c||new Date}),e(i,a)})},t._getStats=function(e){Object(h.getParameter)("CHROME_NEW_STATS")&&i.isChromeKernel()&&+i.getBrowserVersion()>=76?t._processGetStatsAfterChrome76(e):t._processGetStatsBeforeChrome76(e)},t.addTrack=function(e,n){if("unified-plan"===Object(h.getParameter)("PLAN")){var i="audio"===e.kind?t._audioSender:t._videoSender;if(i){var r=t.peerConnection.getTransceivers().find(function(e){return e.sender===i});i.replaceTrack(e).then(function(){r.direction="sendrecv",t.renegotiate()})}else i=t.peerConnection.addTrack(e,n),"audio"===e.kind?t._audioSender=i:t._videoSender=i}else t.peerConnection.addTrack(e,n)},t.removeTrack=function(e,n){if("unified-plan"===Object(h.getParameter)("PLAN")){var i=t.peerConnection.getTransceivers().find(function(t){return t.sender.track===e});i&&(i.direction="inactive",t.peerConnection.removeTrack(i.sender))}else t.peerConnection.removeTrack(t.peerConnection.getSenders().find(function(t){return t.track==e}))},t.addStream=function(e){"unified-plan"===Object(h.getParameter)("PLAN")?e.getTracks().forEach(function(n){var i=t.peerConnection.addTrack(n,e);"audio"===n.kind?t._audioSender=i:t._videoSender=i}):(t.peerConnection.addStream(e),t.markActionNeeded())},t.removeStream=function(){t.markActionNeeded()},t.close=function(){t.state="closed",t.peerConnection.close()},t.markActionNeeded=function(){t.actionNeeded=!0,t.doLater(function(){t.onstablestate()})},t.doLater=function(e){window.setTimeout(e,1)},t.onstablestate=function(){if(t.actionNeeded){if("new"===t.state||"established"===t.state)t.peerConnection.createOffer(t.mediaConstraints).then(function(n){return n?n.sdp!==t.prevOffer?(e.isSubscriber&&(n.sdp=n.sdp.replace("minptime=10","minptime=10;stereo=1; sprop-stereo=1")),t.peerConnection.setLocalDescription(n),t.state="preparing-offer",void t.markActionNeeded()):void u.default.debug("["+t.clientId+"]Not sending a new offer"):(u.default.debug("["+t.clientId+"]sessionDescription is null"),void t.onsignalingmessage(null))}).catch(function(e){u.default.debug("["+t.clientId+"]peer connection create offer failed ",e)});else if("preparing-offer"===t.state){if(t.moreIceComing)return;t.prevOffer=t.peerConnection.localDescription.sdp,t.offerCandidates=t.prevOffer.match(/a=candidate.+\r\n/g)||[],t.offerCandidates.length||(e.isCloudProxy3&&e.onNoIceCandidate&&e.onNoIceCandidate(),u.default.warning("[".concat(t.clientId,"]No Ice Candidate generated")),Object(h.getParameter)("SHIM_CANDIDATE")?(u.default.debug("Shimming fake candidate"),t.prevOffer+="a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"):u.default.error("[".concat(t.clientId,"]None Ice Candidate not allowed"))),t.prevOffer=t.prevOffer.replace(/a=candidate:.+typ\shost.+\r\n/g,"a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"),t.sendMessage("OFFER",t.prevOffer),t.state="offer-sent"}else if("offer-received"===t.state)t.peerConnection.createAnswer(function(e){if(t.peerConnection.setLocalDescription(e),t.state="offer-received-preparing-answer",t.iceStarted)t.markActionNeeded();else{var n=new Date;
1u.default.debug("["+t.clientId+"]"+n.getTime()+": Starting ICE in responder"),t.iceStarted=!0}},function(e){u.default.debug("["+t.clientId+"]peer connection create answer failed ",e)},t.mediaConstraints);else if("offer-received-preparing-answer"===t.state){if(t.moreIceComing)return;t.sendMessage("ANSWER",t.peerConnection.localDescription.sdp),t.state="established"}else u.default.debug("[".concat(t.clientId,"] Dazed and confused in state ").concat(t.state,", stopping here'"));t.actionNeeded=!1}},t.sendMessage=function(e,n){var i={};i.messageType=e,i.sdp=n,"OFFER"===e?(i.offererSessionId=t.sessionId,i.answererSessionId=t.otherSessionId,i.seq=t.sequenceNumber+=1,i.tiebreaker=Math.floor(429496723*Math.random()+1)):(i.offererSessionId=t.incomingMessage.offererSessionId,i.answererSessionId=t.sessionId,i.seq=t.incomingMessage.seq),t.onsignalingmessage(JSON.stringify(i))},t._getSender=function(e){if(t.peerConnection&&t.peerConnection.getSenders){var n=t.peerConnection.getSenders().find(function(t){return t.track.kind==e});if(n)return n}return null},t.hasSender=function(e){return!!t._getSender(e)},t.replaceTrack=function(e,n,i){var r=t._getSender(e.kind);if(!r)return i("NO_SENDER_FOUND");try{r.replaceTrack(e)}catch(e){return i&&i(e)}setTimeout(function(){return n&&n()},50)},t.error=function(e){throw"Error in RoapOnJsep: "+e},t.sessionId=t.roapSessionId+=1,t.sequenceNumber=0,t.actionNeeded=!1,t.iceStarted=!1,t.moreIceComing=!0,t.iceCandidateCount=0,t.onsignalingmessage=e.callback,t.peerConnection.ontrack=function(e){t.onaddstream&&(t.onaddstream(e,"ontrack"),t.peerConnection.onaddstream=null)},t.peerConnection.onaddstream=function(e){t.onaddstream&&(t.onaddstream(e,"onaddstream"),t.peerConnection.ontrack=null)},t.peerConnection.onremovestream=function(e){t.onremovestream&&t.onremovestream(e)},t.peerConnection.oniceconnectionstatechange=function(e){console.log(e),console.log(t.peerConnection.iceConnectionState),"connected"===e.currentTarget.iceConnectionState&&(t.connectedTime=new Date),t.oniceconnectionstatechange&&t.oniceconnectionstatechange(e.currentTarget.iceConnectionState)},t.renegotiate=function(){void 0!==t.prevOffer&&t.peerConnection.createOffer().then(function(e){return"unified-plan"!==Object(h.getParameter)("PLAN")&&(e.sdp=e.sdp.replace(/a=recvonly\r\n/g,"a=inactive\r\n")),e.sdp=v(e.sdp),e.sdp=y(e.sdp),t.peerConnection.setLocalDescription(e)}).then(function(){t.onnegotiationneeded&&t.onnegotiationneeded(t.peerConnection.localDescription.sdp)}).catch(function(e){console.log("createOffer error: ",e)})},t.peerConnection.onnegotiationneeded=t.renegotiate,t.onaddstream=null,t.onremovestream=null,t.onnegotiationneeded=null,t.state="new",t.markActionNeeded(),t}(e)).browser="chrome-stable",t},w=function(e,t,n){var r={};r.config=e,r.streamId=e.streamId,delete e.streamId,navigator.getMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var o=0,s=1,a=!1,l=null,c=function(e){if(o++,l)if(l===e)u.default.debug("Using Video Source/ Audio Source");else{var n=l.getVideoTracks()[0],i=l.getAudioTracks()[0],r=e.getVideoTracks()[0],c=e.getAudioTracks()[0];r&&(n&&l.removeTrack(n),l.addTrack(r)),c&&(i&&l.removeTrack(i),l.addTrack(c))}else l=e;o!==s||a||(a=!0,setTimeout(function(){t(l)},0))},d=function(e){u.default.error("Failed to GetUserMedia",e.name,e.code,e.message,e),o++,a||(a=!0,setTimeout(function(){n&&n(e)},0))},h=function(){var t={video:e.video,audio:e.audio};if(u.default.debug("GetUserMedia",JSON.stringify(t)),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia(t).then(c).catch(d);else if("undefined"!=typeof navigator&&navigator.getMedia)navigator.getMedia(e,c,d);else{var i={name:"MEDIA_NOT_SUPPORT",message:"Video/audio streams not supported yet"};u.default.error("["+r.streamId+"]"+i.message),n&&n(i)}};if((e.videoSource||e.audioSource)&&(l=new MediaStream,e.videoSource&&l.addTrack(e.videoSource),e.audioSource&&l.addTrack(e.audioSource)),e.video||e.audio||e.screen||e.screenAudio){if(!e.screen&&e.screenAudio)return n&&n({code:"Set screen to true before sharing the audio"});if(e.screen){if(b.a.isElectron())return e.screen.sourceId?b.a.getScreenStream(e.screen.sourceId,e.screen,function(t,n){t?d(t):(e.audio&&(s++,h()),c(n))}):b.a.shareScreen(e.screen,function(t,n){t?d(t):(e.audio&&(s++,h()),c(n))});if(i.isFireFox()){if(u.default.debug("["+r.streamId+"]Screen access requested"),!~["screen","window","application"].indexOf(e.screen.mediaSource))return n&&n({code:"Invalid mediaSource, mediaSource should be one of [screen, window, application]"});navigator.getMedia({video:e.screen},function(t){e.audio&&(s++,h()),c(t)},d)}else if(i.isChromeKernel()&&e.screen.extensionId){if(window.navigator.appVersion.match(/Chrome\/([\w\W]*?)\./)[1]<34)return void n({code:"This browser does not support screen sharing"});u.default.debug("["+r.streamId+"]Screen access on chrome stable, looking for extension");
1try{chrome.runtime.sendMessage(e.screen.extensionId,{getStream:!0},function(t){void 0===t?(u.default.error("["+r.streamId+"]No response from Chrome Plugin. Plugin not installed properly"),d({name:"PluginNotInstalledProperly",message:"No response from Chrome Plugin. Plugin not installed properly."})):(e.screen.mandatory.chromeMediaSourceId=t.streamId,navigator.getMedia({video:e.screen},function(t){e.audio&&(s++,h()),c(t)},d))})}catch(e){return u.default.debug("["+r.streamId+"]AgoraRTC screensharing plugin is not accessible"),void n({code:"no_plugin_present"})}}else{if(window.navigator.mediaDevices.getDisplayMedia){var p={};return p.video="number"==typeof e.screen.width&&"number"==typeof e.screen.height?{width:{ideal:e.screen.width},height:{ideal:e.screen.height}}:{width:e.screen.width,height:e.screen.height},p.video.frameRate=e.screen.frameRate&&e.screen.frameRate.min?{ideal:e.screen.frameRate.max,max:e.screen.frameRate.max}:e.screen.frameRate,e.screenAudio&&(p.audio=e.screenAudio),u.default.debug("use getDisplayMedia, constraints:",p),window.navigator.mediaDevices.getDisplayMedia(p).then(function(t){!e.screenAudio&&e.audio&&(s++,h()),c(t)}).catch(d)}u.default.error("["+r.streamId+"]This browser does not support screenSharing"),n({code:"This browser does not support screen sharing"})}}else h()}else c(l)}},function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(0)),o=function(){function e(e,t,n){void 0===t&&(t=""),this.name="AgoraRTCException",this.co
1de=e,this.message="AgoraRTCError "+this.code+": "+t,this.data=n}return e.prototype.toString=function(){return this.data?this.message+" data: "+JSON.stringify(this.data):this.message},e.prototype.throw=function(){throw r.default.error(this.toString()),this},e}();t.AgoraRTCError=o,function(e){e.UNEXPECTED_ERROR="UNEXPECTED_ERROR",e.UNEXPECTED_RESPONSE="UNEXPECTED_RESPONSE",e.TIMEOUT="TIMEOUT",e.INVALID_PARAMS="INVALID_PARAMS",e.NOT_SUPPORT="NOT_SUPPORT",e.INVALID_OPERATION="INVALID_OPERATION",e.OPERATION_ABORT="OPERATION_ABORT",e.WEB_SECURITY_RESTRICT="WEB_SECURITY_RESTRICT",e.NETWORK_ERROR="NETWORK_ERROR",e.NETWORK_TIMEOUT="NETWORK_TIMEOUT",e.NETWORK_RESPONSE_ERROR="NETWORK_RESPONSE_ERROR",e.API_INVOKE_TIMEOUT="API_INVOKE_TIMEOUT",e.ENUMERATE_DEVICES_FAILED="ENUMERATE_DEVICES_FAILED",e.DEVICE_NOT_FOUND="DEVICE_NOT_FOUND",e.ELECTRON_IS_NULL="ELECTRON_IS_NULL",e.ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR="ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR",e.STREAM_ALREADY_INITIALIZED="STREAM_ALREADY_INITIALIZED",e.STREAM_IS_CLOSED="STREAM_IS_CLOSED",e.ABORT_OTHER_INIT="ABORT_OTHER_INIT",e.CHROME_PLUGIN_NO_RESPONSE="CHROME_PLUGIN_NO_RESPONSE",e.CHROME_PLUGIN_NOT_INSTALL="CHROME_PLUGIN_NOT_INSTALL",e.MEDIA_OPTION_INVA
1LID="MEDIA_OPTION_INVALID",e.PERMISSION_DENIED="PERMISSION_DENIED",e.CONSTRAINT_NOT_SATISFIED="CONSTRAINT_NOT_SATISFIED",e.CAN_NOT_AUTOPLAY="CAN_NOT_AUTOPLAY",e.HIGH_STREAM_NO_VIDEO_TRACK="HIGH_STREAM_NO_VIDEO_TRACK",e.SCREEN_SHARE_CAN_NOT_CREATE_LOW_STREAM="SCREEN_SHARE_CAN_NOT_CREATE_LOW_STREAM",e.TRACK_IS_DISABLED="TRACK_IS_DISABLED",e.SHARE_AUDIO_NOT_ALLOWED="SHARE_AUDIO_NOT_ALLOWED",e.TOKEN_GENERATOR_FUNCTION_ERROR="TOKEN_GENERATOR_FUNCTION_ERROR",e.INVALID_UINT_UID_FROM_STRING_UID="INVALID_UINT_UID_FROM_STRING_UID",e.CAN_NOT_GET_PROXY_SERVER="CAN_NOT_GET_PROXY_SERVER",e.CAN_NOT_GET_GATEWAY_SERVER="CAN_NOT_GET_GATEWAY_SERVER",e.UID_CONFLICT="UID_CONFLICT",e.INVALID_LOCAL_TRACK="INVALID_LOCAL_TRACK",e.INVALID_TRACK="INVALID_TRACK",e.SENDER_NOT_FOUND="SENDER_NOT_FOUND",e.CREATE_OFFER_FAILED="CREATE_OFFER_FAILED",e.SET_ANSWER_FAILED="SET_ANSWER_FAILED",e.ICE_FAILED="ICE_FAILED",e.PC_CLOSED="PC_CLOSED",e.SENDER_REPLACE_FAILED="SENDER_REPLACE_FAILED",e.GATEWAY_P2P_LOST="GATEWAY_P2P_LOST",e.NO_ICE_CANDIDATE="NO_ICE_CANDIDATE",e.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS="CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS",e.INVALID_REMOTE_USER="INVALID_REMOTE_USER",e.REMOTE_USER_IS_NOT_PUBLISHED="REMOTE_USER_IS_NOT_PUBLISHED",e.SUBSCRIPTION_IS_IN_PROGRESS="SUBSCRIPTION_IS_IN_PROGRESS",e.CUSTOM_REPORT_SEND_FAILED="CUSTOM_REPORT_SEND_FAILED",e.CUSTOM_REPORT_FREQUENCY_TOO_HIGH="CUSTOM_REPORT_FREQUENCY_TOO_HIGH",e.FETCH_AUDIO_FILE_FAILED="FETCH_AUDIO_FILE_FAILED",e.READ_LOCAL_AUDIO_FILE_ERROR="READ_LOCAL_AUDIO_FILE_ERROR",e.DECODE_AUDIO_FILE_FAILED="DECODE_AUDIO_FILE_FAILED",e.EFFECT_ID_CONFLICTED="EFFECT_ID_CONFLICTED",e.EFFECT_SOUND_ID_NOT_FOUND="EFFECT_SOUND_ID_NOT_FOUND",e.WS_ABORT="WS_ABORT",e.WS_DISCONNECT="WS_DISCONNECT",e.WS_ERR="WS_ERR",e.CAN_NOT_CONNECT_TO_LIVE_STREAMING_WORKER="CAN_NOT_CONNECT_TO_LIVE_STREAMING_WORKER",e.LIVE_STREAMING_TASK_CONFLICT="LIVE_STREAMING_TASK_CONFLICT",e.LIVE_STREAMING_INVALID_ARGUMENT="LIVE_STREAMING_INVALID_ARGUMENT",e.LIVE_STREAMING_INTERNAL_SERVER_ERROR="LIVE_STREAMING_INTERNAL_SERVER_ERROR",e.LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED="LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED",e.LIVE_STREAMING_TRANSCODING_NOT_SUPPORT="LIVE_STREAMING_TRANSCODING_NOT_SUPPORT",e.LIVE_STREAMING_CDN_ERROR="LIVE_STREAMING_CDN_ERROR",e.LIVE_STREAMING_INVALID_RAW_STREAM="LIVE_STREAMING_INVALID_RAW_STREAM",e.LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT="LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT",e.LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE="LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE",e.LIVE_STREAMING_WARN_FREQUENT_REQUEST="LIVE_STREAMING_WARN_FREQUENT_REQUEST",e.WEBGL_INTERNAL_ERROR="WEBGL_INTERNAL_ERROR",e.BEAUTY_PROCESSOR_INTERNAL_ERROR="BEAUTY_PROCESSOR_INTERNAL_ERROR",e.CROSS_CHANNEL_WAIT_STATUS_ERROR="CROSS_CHANNEL_WAIT_STATUS_ERROR",e.CROSS_CHANNEL_FAILED_JOIN_SRC="CROSS_CHANNEL_FAILED_JOIN_SEC",e.CROSS_CHANNEL_FAILED_JOIN_DEST="CROSS_CHANNEL_FAILED_JOIN_DEST",e.CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST="CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST",e.CROSS_CHANNEL_SERVER_ERROR_RESPONSE="CROSS_CHANNEL_SERVER_ERROR_RESPONSE",e.METADATA_OUT_OF_RANGE="METADATA_OUT_OF_RANGE"}(t.AgoraRTCErrorCode||(t.AgoraRTCErrorCode={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(0),r=window.AudioContext||window.webkitAudioContext,o=n(2),s=o.getParameter,a=o.setParameter,l=function(){return s("AUDIO_CONTEXT")||(console.log("Creating Audio Context"),a("AUDIO_CONTEXT",function(){if(r){var e=new r;return window.ctx=e,new Promise(function(e){document.body?e():window.addEventListener("load",e)}).then(function(){var t=function t(){"suspended"==e.state?(i.default.debug("AudioContext is suspended, auto resume"),e.resume().then(function(){i.default.debug("AudioContext resume success"),document.body.removeEventListener("touchend",t,!0),document.body.removeEventListener("mousedown",t,!0)})):(i.default.debug("AudioContext is running"),document.body.removeEventListener("touchend",t,!0),document.body.removeEventListener("mousedown",t,!0))};i.default.debug(">>> add event listener >>>>"),document.body.addEventListener("touchend",t,!0),document.body.addEventListener("mousedown",t,!0)}),e}throw new Error("AUDIO_CONTEXT_NOT_SUPPORTED")}())),s("AUDIO_CONTEXT")};l()},function(e,t,n){"use strict";var i=n(1),r=null,o=function(){try{r=window.require("electron")}catch(e){}return r},s=function(e){var t=i.report.reportApiInvoke(null,{callback:e,name:"getScreenSources",options:arguments,tag:"tracer"}),n=o();if(!n)return t&&t("electron is null");
1try{var r=n.desktopCapturer.getSources({types:["window","screen"]})}catch(e){console.log(e)}r instanceof Promise?(console.log("electron.desktopCapturer.getSources return type is Promise"),r.then(function(e){return t&&t(null,e)}).catch(function(e){return t&&t(e)})):r=n.desktopCapturer.getSources({types:["window","screen"]},function(e,n){console.log("electron.desktopCapturer.getSources return type is callback"),t&&t(null,n)})},a=function(e,t,n){t={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxHeight:t.height,maxWidth:t.width,maxFrameRate:t.frameRate&&t.frameRate.max,minFrameRate:t.frameRate&&t.frameRate.min}}},navigator.webkitGetUserMedia(t,function(e){n&&n(null,e)},function(e){n&&n(e)})};t.a={isElectron:function(){return!!o()},getElectronInstance:o,getScreenSources:s,getScreenStream:a,shareScreen:function(e,t){s(function(n,i){if(n)return t&&t(n);!function(e,t){var n=document.createElement("div");n.innerText="share screen",n.setAttribute("style","text-align: center; height: 25px; line-height: 25px; border-radius: 4px 4px 0 0; background: #D4D2D4; border-bottom:  solid 1px #B9B8B9;");var i=document.createElement("div");i.setAttribute("style","width: 100%; height: 500px; padding: 15px 25px ; box-sizing: border-box;");var r=document.createElement("div");r.innerText="Agora Web Screensharing wants to share the contents of your screen with webdemo.agorabeckon.com. Choose what you'd like to share.",r.setAttribute("style","height: 12%;");var o=document.createElement("div");o.setAttribute("style","width: 100%; height: 80%; background: #FFF; border:  solid 1px #CBCBCB; display: flex; flex-wrap: wrap; justify-content: space-around; overflow-y: scroll; padding: 0 15px; box-sizing: border-box;");var s=document.createElement("div");s.setAttribute("style","text-align: right; padding: 16px 0;");var a=document.createElement("button");a.innerHTML="cancel",a.setAttribute("style","width: 85px;"),a.onclick=function(){document.body.removeChild(l),t&&t("NotAllowedError")},s.appendChild(a),i.appendChild(r),i.appendChild(o),i.appendChild(s);var l=document.createElement("div");l.setAttribute("style","position: absolute; z-index: 99999999; top: 50%; left: 50%; width: 620px; height: 525px; background: #ECECEC; border-radius: 4px; -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%);"),l.appendChild(n),l.appendChild(i),document.body.appendChild(l),e.map(function(e){if(e.id){var n=document.createElement("div");n.setAttribute("style","width: 30%; height: 160px; padding: 20px 0; text-align: center;box-sizing: content-box;");var i=e.thumbnail;i.getSize().width>1920&&(i=i.resize({width:1920})),n.innerHTML='<div style="height: 120px; display: table-cell; vertical-align: middle;"><img style="width: 100%; background: #333333; box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.2);" src='+i.toDataURL()+' /></div><span style="\theight: 40px; line-height: 40px; display: inline-block; width: 70%; word-break: keep-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">'+e.name.replace(/[\u00A0-\u9999<>\&]/g,function(e){return"&#"+e.charCodeAt(0)+";"})+"</span>",n.onclick=function(){document.body.removeChild(l),t&&t(null,e.id)},o.appendChild(n)}})}(i,function(n,i){if(n)return t&&t(n);a(i,e,t)})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3);!function(e){e.TRANSCODE="mix_streaming",e.RAW="raw_streaming",e.INJECT="inject_streaming"}(t.LiveStreamingServiceMode||(t.LiveStreamingServiceMode={})),t.DEFAULT_LIVE_STREAMING_TRANSCODING_USER={alpha:1,height:640,width:360,x:0,y:0,zOrder:0,audioChannel:0},t.DEFAULT_LIVE_STREAMING_TRANSCODING_WATERMARK={x:0,y:0,width:160,height:160,zOrder:255,alpha:1},t.isLiveStreamingTranscodingConfig=function(e){return i.isEmpty(e.width)||i.checkValidNumber(e.width,"config.width",0),i.isEmpty(e.height)||i.checkValidNumber(e.height,"config.height",0),i.isEmpty(e.videoBitrate)||i.checkValidNumber(e.videoBitrate,"config.videoBitrate",1,1e6),i.isEmpty(e.videoFramerate)||i.checkValidNumber(e.videoFramerate,"config.videoFramerate"),i.isEmpty(e.lowLatency)||i.checkValidBoolean(e.lowLatency,"config.lowLatency"),i.isEmpty(e.audioSampleRate)||i.checkValidEnum(e.audioSampleRate,"config.audioSampleRate",[32e3,44100,48e3]),i.isEmpty(e.audioBitrate)||i.checkValidNumber(e.audioBitrate,"config.audio
1Bitrate",1,128),i.isEmpty(e.audioChannels)||i.checkValidEnum(e.audioChannels,"config.audioChannels",[1,2,3,4,5]),i.isEmpty(e.videoGop)||i.checkValidNumber(e.videoGop,"config.videoGop"),i.isEmpty(e.videoCodecProfile)||i.checkValidEnum(e.videoCodecProfile,"config.videoCodecProfile",[66,77,100]),i.isEmpty(e.userCount)||i.checkValidNumber(e.userCount,"config.userCount",0,17),i.isEmpty(e.backgroundColor)||i.checkValidNumber(e.backgroundColor,"config.backgroundColor",0,16777215),e.transcodingUsers&&!i.isEmpty(e.transcodingUsers)&&(i.checkValidArray(e.transcodingUsers,"config.transcodingUsers"),e.transcodingUsers.forEach(function(e,t){i.checkValidUID(e.uid),i.isEmpty(e.x)||i.checkValidNumber(e.x,"transcodingUser["+t+"].x",0,1e4),i.isEmpty(e.y)||i.checkValidNumber(e.y,"transcodingUser["+t+"].y",0,1e4),i.isEmpty(e.width)||i.checkValidNumber(e.width,"transcodingUser["+t+"].width",0,1e4),i.isEmpty(e.height)||i.checkValidNumber(e.height,"transcodingUser["+t+"].height",0,1e4),i.isEmpty(e.zOrder)||i.checkValidNumber(e.zOrder-1,"transcodingUser["+t+"].zOrder",0,100),i.isEmpty(e.alpha)||i.checkValidFloatNumber(e.alpha,"transcodingUser["+t+"].alpha",0,1)})),e.images&&!i.isEmpty(e.images)&&(i.checkValidArray(e.images,"config.images"),e.images.forEach(function(e,t){i.checkValidString(e.url,"images["+t+"].url",1,1e3,!1),i.isEmpty(e.x)||i.checkValidNumber(e.x,"images["+t+"].x",0,1e4),i.isEmpty(e.y)||i.checkValidNumber(e.y,"images["+t+"].y",0,1e4),i.isEmpty(e.width)||i.checkValidNumber(e.width,"images["+t+"].width",0,1e4),i.isEmpty(e.height)||i.checkValidNumber(e.height,"images["+t+"].height",0,1e4),i.isEmpty(e.zOrder)||i.checkValidNumber(e.zOrder,"images["+t+"].zOrder",0,255),i.isEmpty(e.alpha)||i.checkValidFloatNumber(e.alpha,"images["+t+"].alpha",0,1)})),!0},t.DEFAULT_TRANSCODING_CONFIG={audioBitrate:48,audioChannels:1,audioSampleRate:48e3,backgroundColor:0,height:360,lowLatency:!1,videoBitrate:400,videoCodecProfile:100,videoCodecType:1,videoFramerate:15,videoGop:30,width:640,images:[],userConfigs:[],userConfigExtraInfo:""},t.isInjectStreamConfig=function(e){return i.isEmpty(e.audioVolume)||i.checkValidNumber(e.audioVolume,"config.audioVolume",0,1e3),i.isEmpty(e.audioBitrate)||i.checkValidNumber(e.audioBitrate,"config.audioBitrate",1,1e4),i.isEmpty(e.audioChannels)||i.checkValidEnum(e.audioChannels,"config.audioChannels",[1,2]),i.isEmpty(e.audioSampleRate)||i.checkValidEnum(e.audioSampleRate,"config.audioSampleRate",[32e3,44100,48e3]),i.isEmpty(e.width)||i.checkValidNumber(e.width,"config.width",0,1e4),i.isEmpty(e.height)||i.checkValidNumber(e.height,"config.height",0,1e4),i.isEmpty(e.videoBitrate)||i.checkValidNumber(e.videoBitrate,"config.videoBitrate",1,1e4),i.isEmpty(e.videoFramerate)||i.checkValidNumber(e.videoFramerate,"config.videoFramerate",1,1e4),i.isEmpty(e.videoGop)||i.checkValidNumber(e.videoGop,"config.videoGop",1,1e4),!0},t.DEFAULT_INJECT_CONFIG={audioBitrate:48,audioChannels:2,audioVolume:100,audioSampleRate:48e3,height:0,width:0,videoBitrate:400,videoFramerate:15,videoGop:30},function(e){e.WARNING="@live_uap-warning",e.ERROR="@line_uap-error",e.PUBLISH_STREAM_STATUS="@live_uap-publish-status",e.INJECT_STREAM_STATUS="@live_uap-inject-status",e.WORKER_STATUS="@live_uap-worker-status",e.REQUEST_NEW_ADDRESS="@live_uap-request-address"}(t.LiveStreamingUapSignalEvents||(t.LiveStreamingUapSignalEvents={})),(t.LiveStreamingInternalEvents||(t.LiveStreamingInternalEvents={})).REQUEST_WORKER_MANAGER_LIST="@live_req_worker_manager",function(e){e[e.LIVE_STREAM_RESPONSE_SUCCEED=200]="LIVE_STREAM_RESPONSE_SUCCEED",e[e.LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM=454]="LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM",e[e.LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR=450]="LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR",e[e.LIVE_STREAM_RESPONSE_BAD_STREAM=451]="LIVE_STREAM_RESPONSE_BAD_STREAM",e[e.LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR=400]="LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR",e[e.LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST=404]="LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST",e[e.LIVE_STREAM_RESPONSE_NOT_AUTHORIZED=456]="LIVE_STREAM_RESPONSE_NOT_AUTHORIZED",e[e.LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE=457]="LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE",e[e.LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN=429]="LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN",e[e.LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH=452]="LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH",e[e.LIVE_STREAM_RESPONSE_NOT_SUPPORTED=453]="LIVE_STREAM_RESPONSE_NOT_SUPPORTED",e[e.LIVE_STREAM_RESPONSE_MAX_STREAM_NUM=455]="LIVE_STREAM_RESPONSE_MAX_STREAM_NUM",e[e.LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR=500]="LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR",e[e.LIVE_STREAM_RESPONSE_WORKER_LOST=501]="LIVE_STREAM_RESPONSE_WORKER_LOST",e[e.LIVE_STREAM_RESPONSE_RESOURCE_LIMIT=502]="LIVE_STREAM_RESPONSE_RESOURCE_LIMIT",e[e.LIVE_STREAM_RESPONSE_WORKER_QUIT=503]="LIVE_STREAM_RESPONSE_WORKER_QUIT",e[e.ERROR_FAIL_SEND_MESSAGE=504]="ERROR_FAIL_SEND_MESSAGE",e[e.LIVE_STREAM_RESPONSE_INGNORE_MESSAGE=505]="LIVE_STREAM_RESPONSE_INGNORE_MESSAGE",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE=30]="PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT=31]="PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH=32]="PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH",e[e.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN=33]="PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN"}(t.LIVE_STREAM_ERROR_CODE||(t.LIVE_STREAM_ERROR_CODE={})),function(e){e.CONNECTED="websocket:connected",e.RECONNECTING="websocket:reconnecting",e.WILL_RECONNECT="websocket:will_reconnect",e.CLOSED="websocket:closed",e.FAILED="websocket:failed",e.ON_MESSAGE="websocket:on_message",e.REQUEST_NEW_URLS="websocket:request_new_urls"}(t.WebSocketManagerEvents||(t.WebSocketManagerEvents={}))},function(e,t,n){var i=n(57),r=n(58);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},function(e,t,n){var i;e.exports=(i=n(73),function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),i=2;i<=n;
1i++)if(!(t%i))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var i=2,r=0;r<64;)t(i)&&(r<8&&(a[r]=n(e.pow(i,.5))),l[r]=n(e.pow(i,1/3)),r++),i++}();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],u=n[5],d=n[6],h=n[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var f=c[p-15],g=c[p-2];c[p]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+c[p-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+c[p-16]}var m=i&r^i&o^r&o,v=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&d)+l[p]+c[p];h=d,d=u,u=a,a=s+v|0,s=o,o=r,r=i,i=v+(((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+m)|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+u|0,n[6]=n[6]+d|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(i/4294967296),n[15+(r+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),i.SHA256)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=function(e){void 0===e&&(e=8);for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n=t.length,i="",r=0;r<e;r++)i+=t.charAt(Math.floor(Math.random()*n));return i}},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),l=s(n(37)),c=n(24),u=s(n(0)),d=n(1);function h(e){return new Promise(function(t){window.setTimeout(t,e)})}function p(e,t){return new Promise(function(n,i){t.timeout=t.timeout||a.getParameter("HTTP_CONNECT_TIMEOUT"),t.responseType=t.responseType||"json",t.data&&(t.data=JSON.stringify(t.data)),t.headers=t.headers||{},t.headers["Content-Type"]="application/json",t.method="POST",t.url=e,l.default.request(t).then(function(e){n(e.data)}).catch(function(e){l.default.isCancel(e)?i(new c.AgoraRTCError(c.AgoraRTCErrorCode.OPERATION_ABORT,"cancel token canceled")):i("ECONNABORTED"===e.code?new c.AgoraRTCError(c.AgoraRTCErrorCode.NETWORK_TIMEOUT,e.message):e.response?new c.AgoraRTCError(c.AgoraRTCErrorCode.NETWORK_RESPONSE_ERROR,e.response.status):new c.AgoraRTCError(c.AgoraRTCErrorCode.NETWORK_ERROR,e.message))})})}function f(e,n,i,s){var a=this,l=Object.assign({},t.DEFAULT_RETRY_CONFIG,s),u=l.timeout,d=function(){return r(a,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,h(u)];case 1:return e.sent(),u*=l.timeoutFactor,u=Math.min(l.maxRetryTimeout,u),[2]}})})},p=!1,f=new Promise(function(t,s){return r(a,void 0,void 0,function(){var r,a,u;return o(this,function(o){switch(o.label){case 0:n=n||function(){return!1},i=i||function(){return!0},r=0,o.label=1;case 1:if(!(r<l.maxRetryCount))return[3,12];
1if(p)return[2,s(new c.AgoraRTCError(c.AgoraRTCErrorCode.OPERATION_ABORT))];o.label=2;case 2:return o.trys.push([2,7,,11]),[4,e()];case 3:return a=o.sent(),n(a,r)?r+1===l.maxRetryCount?[2,t(a)]:[4,d()]:[3,5];case 4:return o.sent(),[3,6];case 5:return[2,t(a)];case 6:return[3,11];case 7:return u=o.sent(),i(u,r)?r+1===l.maxRetryCount?[2,s(u)]:[4,d()]:[3,9];case 8:return o.sent(),[3,10];case 9:return[2,s(u)];case 10:return[3,11];case 11:return r+=1,[3,1];case 12:return[2]}})})});return f.cancel=function(){return p=!0},f}function g(e,t){return{addressList:e.servers.map(function(e,n){return"wss://"+e.address.replace(/\./g,"-")+".edge.agora.io:"+e.wss+"?serviceName="+encodeURIComponent(t)}),workerToken:e.workerToken,vid:e.vid}}t.wait=h,t.post=p,t.DEFAULT_RETRY_CONFIG={timeout:500,timeoutFactor:1.5,maxRetryCount:1/0,maxRetryTimeout:1e4},t.getRetryWaitTime=function(e,t){var n=t.timeout*Math.pow(t.timeoutFactor,e);return Math.min(t.maxRetryTimeout,n)},t.retryable=f,t.liveStreamingServerResponseToResult=g;var m=1;function v(e,n,s,l,h){var v=this;void 0===h&&(h=t.DEFAULT_RETRY_CONFIG),m+=1;var y,b,_={sid:s.sid,command:"convergeAllocateEdge",uid:"666",appId:s.appId,ts:Math.floor(Date.now()/1e3),seq:m,requestId:m,version:a.VERSION,cname:s.cname},S={service_name:n,json_body:JSON.stringify(_)},w=e[0];return f(function(){return r(v,void 0,void 0,function(){var e,t,r,s,d;return o(this,function(o){switch(o.label){case 0:return y=Date.now(),[4,p(w,{data:S,cancelToken:l,headers:{"X-Packet-Service-Type":"0","X-Packet-URI":"61"}})];case 1:if(e=o.sent(),b=Date.now()-y,0!==e.code)throw r=new c.AgoraRTCError(c.AgoraRTCErrorCode.UNEXPECTED_RESPONSE,"live streaming ap error, code"+e.code,{retry:!0}),u.default.error(r.toString()),r;if(200!==(t=JSON.parse(e.json_body)).code)throw r=new c.AgoraRTCError(c.AgoraRTCErrorCode.UNEXPECTED_RESPONSE,"live streaming app center error, code: "+t.code+", reason: "+t.reason),u.default.error(r.toString()),r;if(!t.servers||0===t.servers.length)throw r=new c.AgoraRTCError(c.AgoraRTCErrorCode.UNEXPECTED_RESPONSE,"live streaming app center empty server"),u.default.error(r.toString()),r;if(s=g(t,n),a.getParameter("LIVE_STREAMING_ADDRESS"))try{d=JSON.parse(a.getParameter("LIVE_STREAMING_ADDRESS")),s.addressList=d}catch(e){s.addressList=[a.getParameter("LIVE_STREAMING_ADDRESS")]}return[2,i(i({},s),{responseTime:b})]}})})},function(t,i){return d.report.requestApWorkerEvent(s.sid,{success:!0,sc:200,serviceName:n,responseDetail:JSON.stringify(t.addressList),firstSuccess:0===i,responseTime:b,serverIp:e[i%e.length]}),!1},function(t,i){return d.report.requestApWorkerEvent(s.sid,{success:!1,sc:t.data&&t.data.code||200,serviceName:n,responseTime:b,serverIp:e[i%e.length]}),!!(t.code!==c.AgoraRTCErrorCode.OPERATION_ABORT&&t.code!==c.AgoraRTCErrorCode.UNEXPECTED_RESPONSE||t.data&&t.data.retry)&&(w=e[(i+1)%e.length],!0)},h)}t.requestLiveStreamingWorkerManager=v,t.getLiveStreamingWorkerMangerResult=function(e,t,n){return r(this,void 0,void 0,function(){var i,r;return o(this,function(o){switch(o.label){case 0:i=a.getParameter("UAP_AP").map(function(e){return t.proxyServer?"https://"+t.proxyServer+"/ap/?url="+e+"/api/v1?action=uap":"https://"+e+"/api/v1?action=uap"}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,v(i,e,t,n)];case 2:return[2,o.sent()];case 3:throw r=o.sent(),d.report.requestApWorkerEvent(t.sid,{success:!1,sc:r.data&&r.data.code||200,serviceName:e,responseTime:r.data&&r.data.responseTime}),r;case 4:return[2]}})})}},function(e,t,n){var i=n(70),r=n(71),o=n(34),s=n(72);e.exports=function(e){return i(e)||r(e)||o(e)||s()}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var i=n(35);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}},function(e,t,n){"use strict";var i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i};
1Object.defineProperty(t,"__esModule",{value:!0});var r=n(24),o=function(){function e(){this._events={},this.addListener=this.on}return e.prototype.getListeners=function(e){return this._events[e]?this._events[e].map(function(e){return e.listener}):[]},e.prototype.on=function(e,t){this._events[e]||(this._events[e]=[]);var n=this._events[e];-1===this._indexOfListener(n,t)&&n.push({listener:t,once:!1})},e.prototype.once=function(e,t){this._events[e]||(this._events[e]=[]);var n=this._events[e];-1===this._indexOfListener(n,t)&&n.push({listener:t,once:!0})},e.prototype.off=function(e,t){if(this._events[e]){var n=this._events[e],i=this._indexOfListener(n,t);-1!==i&&n.splice(i,1),0===this._events[e].length&&delete this._events[e]}},e.prototype.removeAllListeners=function(e){e?delete this._events[e]:this._events={}},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._events[e]||(this._events[e]=[]);for(var i=this._events[e].map(function(e){return e}),r=0;r<i.length;r+=1){var o=i[r];o.once&&this.off(e,o.listener),o.listener.apply(this,t||[])}},e.prototype._indexOfListener=function(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1},e}();function s(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var s=null,a=null;if(e.emit.apply(e,i([t],n,[function(e){s=e},function(e){a=e}])),null!==a)throw a;if(null===s)throw new r.AgoraRTCError(r.AgoraRTCErrorCode.UNEXPECTED_ERROR,"handler is not sync");return s}t.EventEmitter=o,t.emitAsPromise=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return 0===e.getListeners(t).length?Promise.reject(new r.AgoraRTCError(r.AgoraRTCErrorCode.UNEXPECTED_ERROR,"can not emit promise")):new Promise(function(r,o){e.emit.apply(e,i([t],n,[r,o]))})},t.emitAsInvokerNoResponse=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return 0===e.getListeners(t).length?null:s.apply(void 0,i([e,t],n))},t.emitAsInvoker=s},function(e,t,n){e.exports=n(78)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},function(e,t,n){"use strict";var i=n(18);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var s=[];i.forEach(t,function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var i=n(18),r=n(84),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,l={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(a=n(42)),a),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],function(e){l.headers[e]={}}),i.forEach(["post","put","patch"],function(e){l.headers[e]=i.merge
1(o)}),e.exports=l}).call(this,n(83))},function(e,t,n){"use strict";var i=n(18),r=n(85),o=n(39),s=n(87),a=n(90),l=n(91),c=n(43);e.exports=function(e){return new Promise(function(t,u){var d=e.data,h=e.headers;i.isFormData(d)&&delete h["Content-Type"];var p=new XMLHttpRequest;e.auth&&(h.Authorization="Basic "+btoa((e.auth.username||"")+":"+(e.auth.password||"")));var f=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),o(f,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null;r(t,u,{data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p}),p=null}},p.onabort=function(){p&&(u(c("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){u(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),u(c(t,e,"ECONNABORTED",p)),p=null},i.isStandardBrowserEnv()){var g=n(92),m=(e.withCredentials||l(f))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;m&&(h[e.xsrfHeaderName]=m)}if("setRequestHeader"in p&&i.forEach(h,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)}),i.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),u(e),p=null)}),void 0===d&&(d=null),p.send(d)})}},function(e,t,n){"use strict";var i=n(86);e.exports=function(e,t,n,r,o){var s=new Error(e);return i(s,t,n,r,o)}},function(e,t,n){"use strict";var i=n(18);e.exports=function(e,t){t=t||{};var n={},r=["url","method","params","data"],o=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(r,function(e){void 0!==t[e]&&(n[e]=t[e])}
1),i.forEach(o,function(r){i.isObject(t[r])?n[r]=i.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:i.isObject(e[r])?n[r]=i.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])}),i.forEach(s,function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])});var a=r.concat(o).concat(s),l=Object.keys(t).filter(function(e){return-1===a.indexOf(e)});return i.forEach(l,function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}),n}},function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(59)),l=s(n(62)),c=s(n(63)),u=o(n(0)),d=n(2),h=a.default.Root.fromJSON(c),p=function(){function e(){this.requestArray=[],this.retryBackoffCount=0,this.state=0}return e.prototype.setProxy=function(e){this.proxyServer=e},e.prototype.sendReportList=function(e,t){var n=this,i=this._dataConvert("ProtoRaws",{vid:t,sendTs:Math.round(Date.now()/1e3),payloads:e.map(function(e){return{id:l[e.type],msg:n._dataConvert(e.type,e.data)}})});this.send(i)},e.prototype._dataConvert=function(e,t){var n;try{n=h.lookupType("protobuf."+e)}catch(t){u.default.error("[send-proto] invalid proto name "+e)}var i=n.create(t);return n.encode(i).finish()},e.prototype.send=function(e){0==this.state?this._send(e):this.requestArray.push(e)},e.prototype._send=function(e){return i(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),this.state=1,[4,this.request(e)];case 1:return t.sent(),this.retryBackoffCount=0,0!==this.requestArray.length?this._send(this.requestArray.shift()):this.state=0,[3,4];case 2:return t.sent(),[4,f(this.retryBackoffCount++<2?200:1e4)];case 3:return t.sent(),this._send(e),[3,4];case 4:return[2]}})})},e.prototype.request=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(i){switch(i.label){case 0:t=this._getAddress(),n=this._getBackupAddress(),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,this._request(t,e)];case 2:return i.sent(),[3,5];case 3:return i.sent(),[4,this._request(n,e)];case 4:return i.sent(),[3,5];case 5:return[2]}})})},e.prototype._request=function(e,t){return this._post(e,t)},e.prototype._post=function(e,t){var n=this;return new Promise(function(i,r){var o=new XMLHttpRequest;
1o.timeout=d.getParameter("HTTP_CONNECT_TIMEOUT"),o.open("POST",e,!0),o.setRequestHeader("Content-type","application/octet-stream"),n.proxyServer||(o.setRequestHeader("Cache-Control","no-cache, no-store"),o.setRequestHeader("Pragma","no-cache"),o.setRequestHeader("Expires","0")),o.onload=function(e){i(o.responseText)},o.onerror=function(e){r(e)},o.ontimeout=function(e){r(e)},o.send(t)})},e.prototype._getAddress=function(){return this.proxyServer?"https://"+this.proxyServer+"/rs/?h="+d.getParameter("EVENT_REPORT_DOMAIN")+"&p=6443&d=events/proto-raws":"https://"+d.getParameter("EVENT_REPORT_DOMAIN")+":6443/events/proto-raws"},e.prototype._getBackupAddress=function(){return this.proxyServer?"https://"+this.proxyServer+"/rs/?h="+d.getParameter("EVENT_REPORT_BACKUP_DOMAIN")+"&p=6443&d=events/proto-raws":"https://"+d.getParameter("EVENT_REPORT_BACKUP_DOMAIN")+":6443/events/proto-raws"},e}();t.default=p;var f=function(e){return new Promise(function(t){window.setTimeout(t,e)})}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s,a=o(n(0)),l=n(15);!function(e){e.NEW="new",e.PREPARING_OFFER="preparing-offer",e.OFFER_SENT="offer-sent",e.ESTABLISHED="established",e.CLOSED="closed"}(s||(s={}));var c=function(){function e(e){this.candidate=null,this.state=s.NEW,this.config=e,this.isSubscriber=this.config.isSubscriber,this.peerConnection=this.initPeecConnection(e),this.peerConnection.onicecandidate=this._onicecandidate.bind(this),this.peerConnection.oniceconnectionstatechange=this._oniceconnectionstatechange.bind(this),this.peerConnection.onaddstream=this._onaddstream.bind(this),this.peerConnection.ontrack=this._ontrack.bind(this),this.processSignalingMessage=this.setAnswer.bind(this),this.peerConnection.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0}).then(this.setLocalSDP.bind(this)),this.sendVideoStats={id:"",type:"",mediaType:"",googCodecName:this.config.codec.toUpperCase(),bytesSent:"0",packetsLost:"0",packetsSent:"0",googAdaptationChanges:"0",googAvgEncodeMs:"0",googEncodeUsagePercent:"0",googFirsReceived:"0",googFrameHeightSent:"0",googFrameHeightInput:"0",googFrameRateInput:"0",googFrameRateSent:"0",googFrameWidthSent:"0",googFrameWidthInput:"0",googNacksReceived:"0",googPlisReceived:"0",googRtt:"0",googFramesEncoded:"0"},this.sendAudioStats={id:"",type:"",mediaType:"",googCodecName:"opus",aecDivergentFilterFraction:"0",audioInput
1Level:"0",bytesSent:"0",packetsSent:"0",googEchoCancellationReturnLoss:"0",googEchoCancellationReturnLossEnhancement:"0"},this.receiveAudioStats={id:"",type:"",mediaType:"",audioOutputLevel:"0",bytesReceived:"0",packetsLost:"0",packetsReceived:"0",googAccelerateRate:"0",googCurrentDelayMs:"0",googDecodingCNG:"0",googDecodingCTN:"0",googDecodingCTSG:"0",googDecodingNormal:"0",googDecodingPLC:"0",googDecodingPLCCNG:"0",googExpandRate:"0",googJitterBufferMs:"0",googJitterReceived:"0",googPreemptiveExpandRate:"0",googPreferredJitterBufferMs:"0",googSecondaryDecodedRate:"0",googSpeechExpandRate:"0"},this.receiveVideoStats={id:"",type:"",mediaType:"",googTargetDelayMs:"0",packetsLost:"0",googDecodeMs:"0",googMaxDecodeMs:"0",googRenderDelayMs:"0",googFrameWidthReceived:"0",googFrameHeightReceived:"0",googFrameRateReceived:"0",googFrameRateDecoded:"0",googFrameRateOutput:"0",googFramesDecoded:"0",googFrameReceived:"0",googJitterBufferMs:"0",googCurrentDelayMs:"0",googMinPlayoutDelayMs:"0",googNacksSent:"0",googPlisSent:"0",googFirsSent:"0",bytesReceived:"0",packetsReceived:"0"}}return e.prototype.addStream=function(e){this.peerConnection.addStream(e)},e.prototype.setRtpSenderParameters=function(e){return i(this,void 0,void 0,function(){return r(this,function(e){return[2]})})},e.prototype.setAnswer=function(e){var t=JSON.parse(e);this.peerConnection.setRemoteDescription(new RTCSessionDescription({sdp:t.sdp,type:"answer"})),this.onsignalingmessage&&this.onsignalingmessage("")},e.prototype.close=function(){this.peerConnection.close()},e.prototype.getStats=function(e,t){if(void 0===t&&(t=500),t=t>500?500:t,Date.now()-this.lastTimeGetStats<t){var n=[];this.config.isSubscriber?(n.push(this.receiveVideoStats),n.push(this.receiveAudioStats)):(n.push(this.sendAudioStats),n.push(this.sendVideoStats)),n.push({id:"time",startTime:this.connectedTime,timestamp:Date.now()}),e&&e(n)}else this._getStats(e)},e.prototype._getStats=function(e){var t=this,n=[];this.peerConnection.getStats(null).then(function(i){t.lastTimeGetStats=Date.now(),Object.keys(i).map(function(e){var n=i[e];t.config.isSubscriber?n.type&&"inboundrtp"===n.type&&n.mediaType&&"audio"===n.mediaType?(t.receiveAudioStats.id=n.id+"recv",t.receiveAudioStats.type=n.type+"",t.receiveAudioStats.mediaType=n.mediaType+"",t.receiveAudioStats.packetsReceived=n.packetsReceived+"",t.receiveAudioStats.bytesReceived=n.bytesReceived+"",t.receiveAudioStats.packetsLost=n.packetsLost+"",t.receiveAudioStats.googJitterReceived=n.jitter+""):n.type&&"inboundrtp"===n.type&&n.mediaType&&"video"===n.mediaType?(t.receiveVideoStats.id=n.id+"recv",t.receiveVideoStats.type=n.type+"",t.receiveVideoStats.mediaType=n.mediaType+"",t.receiveVideoStats.packetsReceived=n.packetsReceived+"",t.receiveVideoStats.bytesReceived=n.bytesReceived+"",t.receiveVideoStats.packetsLost=n.packetsLost+"",t.receiveVideoStats.googJitterBufferMs=n.jitter+"",t.receiveVideoStats.googPlisSent=n.pliCount+"",t.receiveVideoStats.googFirsSent=n.firCount+"",t.receiveVideoStats.googNacksSent=n.nackCount+""):n.remoteSource&&n.type&&"track"===n.type&&n.trackIdentifier&&-1!==n.trackIdentifier.indexOf("v")?(t.receiveVideoStats.googFrameHeightReceived=n.frameHeight+"",t.receiveVideoStats.googFrameWidthReceived=n.frameWidth+"",t.receiveVideoStats.googFrameRateDecoded=n.framesPerSecond+"",t.receiveVideoStats.googFrameRateOutput=n.framesPerSecond+"",t.receiveVideoStats.googFrameRateReceived=n.framesPerSecond+"",t.receiveVideoStats.googFramesDecoded=n.framesDecoded+"",t.receiveVideoStats.googFrameReceived=n.framesReceived+""):n.remoteSource&&n.type&&"track"===n.type&&n.trackIdentifier&&-1!==n.trackIdentifier.indexOf("a")&&(t.receiveAudioStats.audioOutputLevel=n.audioLevel+""):!n.isRemote&&n.type&&"outboundrtp"===n.type&&n.mediaType&&"audio"===n.mediaType?(t.sendAudioStats.id=n.id+"send",t.sendAudioStats.type=n.type+"",t.sendAudioStats.mediaType=n.mediaType+"",t.sendAudioStats.packetsSent=n.packetsSent+"",t.sendAudioStats.bytesSent=n.bytesSent+""):!n.isRemote&&n.type&&"outboundrtp"===n.type&&n.mediaType&&"video"===n.mediaType?(t.sendVideoStats.id=n.id+"send",t.sendVideoStats.type=n.type+"",t.sendVideoStats.mediaType=n.mediaType+"",t.sendVideoStats.packetsSent=n.packetsSent+"",t.sendVideoStats.bytesSent=n.bytesSent+"",t.sendVideoStats.googRtt=n.roundTripTime+"",t.sendVideoStats.googPlisReceived=n.pliCount+"",t.sendVideoStats.googFirsReceived=n.firCount+"",t.sendVideoStats.googNacksReceived=n.nackCount+""):!n.remoteSource&&n.type&&"track"===n.type&&n.framesSent&&0!==n.framesSent&&(t.sendVideoStats.googFrameHeightSent=n.frameHeight+"",t.sendVideoStats.googFrameHeightInput=n.frameHeight+"",t.sendVideoStats.googFrameWidthSent=n.frameWidth+"",t.sendVideoStats.googFrameWidthInput=n.frameWidth+"",t.sendVideoStats.googFramesEncoded=n.framesSent+"",t.sendVideoStats.googFrameRateSent=n.framesPerSecond+"")}),t.config.isSubscriber?(n.push(t.receiveVideoStats),n.push(t.receiveAudioStats)):(n.push(t.sendAudioStats),n.push(t.sendVideoStats)),n.push({id:"time",startTime:t.connectedTime,timestamp:Date.now()}),e&&e(n)})}
1,e.prototype.getStatsRate=function(e){this.getStats(e)},e.prototype.initPeecConnection=function(e){var t=e.stunServerUrl,n=e.turnServer,i=e.iceServers;return this.pcConfig={iceServers:[]},i instanceof Array?this.pcConfig.iceServers=e.iceServers:t&&(t instanceof Array?t.map(function(e){"string"==typeof e&&""!==e&&this.pcConfig.iceServers.push({urls:e})}):"string"==typeof t&&""!==t&&this.pcConfig.iceServers.push({urls:t})),n&&(n instanceof Array?n.map(function(e){"string"==typeof e.url&&""!==e.url&&this.pcConfig.iceServers.push({username:e.username,credential:e.credential,url:e.url})}):"auto"!==n.mode&&"manual"!==n.mode||(n.udpport&&this.pcConfig.iceServers.push({username:n.username,credential:n.credential,credentialType:"password",urls:"turn:"+n.url+":"+n.udpport+"?transport=udp"}),"string"==typeof n.tcpport&&""!==n.tcpport&&this.pcConfig.iceServers.push({username:n.username,credential:n.credential,credentialType:"password",urls:"turn:"+n.url+":"+n.tcpport+"?transport=tcp"}),!0===n.forceturn&&(this.pcConfig.iceTransportPolicy="relay"))),new l.RTCPeerConnection(this.pcConfig)},e.prototype._ontrack=function(e){this.onaddstream&&this.onaddstream(e,"ontrack")},e.prototype._onaddstream=function(e){this.onaddstream&&this.onaddstream(e,"onaddstream")},e.prototype._oniceconnectionstatechange=function(e){"connected"===e.currentTarget.iceConnectionState&&(this.state=s.ESTABLISHED,this.connectedTime=Date.now()),this.oniceconnectionstatechange&&this.oniceconnectionstatechange(e.currentTarget.iceConnectionState)},e.prototype._onicecandidate=function(e){!this.candidate&&e&&(this.candidate=e.candidate,this.peerConnection.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0}).then(this.editLocalSDP.bind(this)).then(this.setLocalSDP.bind(this)).then(this.sendOffer.bind(this)).catch())},e.prototype.setLocalSDP=function(e){return this.peerConnection.setLocalDescription(new RTCSessionDescription({sdp:e.sdp,type:"offer"})),this.state=s.PREPARING_OFFER,e},e.prototype.editLocalSDP=function(e){return e.sdp=this.setBandWidth(e.sdp),e.sdp=this.reviseOpus(e.sdp),e.sdp=this.addCandidate(e.sdp),e},e.prototype.setSendRecv=function(e){return(e=(e=e.replace(/a=recvonly\r\n/g,"a=sendrecv\r\n")).replace(/a=sendonly\r\n/g,"a=sendrecv\r\n")).replace(/a=inactive\r\n/g,"a=sendrecv\r\n")},e.prototype.setBandWidth=function(e){var t,n,i=this.config,r=i.codec,o=i.minVideoBW,s=i.maxVideoBW,l=i.maxAudioBW,c=i.clientId;if((t=e.match(/m=video.*\r\n/))&&o&&s){n=t[0]+"b=AS:"+s+"\r\n";var u=0,d=0;"h264"===r?(u=e.search(/a=rtpmap:(\d+) H264\/90000\r\n/),d=e.search(/H264\/90000\r\n/)):"vp8"===r?(u=e.search(/a=rtpmap:(\d+) VP8\/90000\r\n/),d=e.search(/VP8\/90000\r\n/)):"vp9"===r&&(u=e.search(/a=rtpmap:(\d+) VP9\/90000\r\n/),d=e.search(/VP9\/90000\r\n/)),-1!==u&&-1!==d&&d-u>10&&(n=n+"a=fmtp:"+e.slice(u+9,d-1)+" x-google-min-bitrate="+o+"\r\n"),e=e.replace(t[0],n),a.default.debug("["+c+"]Set Video Bitrate - min:"+o+" max:"+s)}return(t=e.match(/m=audio.*\r\n/))&&l&&(e=e.replace(t[0],n=t[0]+"b=AS:"+l+"\r\n")),e},e.prototype.reviseOpus=function(e){return(e=e.replace(/a=rtpmap:102 opus\/48000\/2/g,"a=rtpmap:111 opus/48000/2")).replace(/m=audio 9 UDP\/TLS\/RTP\/SAVPF 102 0 8 97 13 118 101/g,"m=audio 9 UDP/TLS/RTP/SAVPF 111 0 8 97 13 118 101")},e.prototype.addCandidate=function(e){return e+"a=candidate:2243255435 1 udp 2122194687 192.168.0.1 30000 typ host generation 0 network-id 1\r\n"},e.prototype.sendOffer=function(e){this.config.callback(JSON.stringify({sdp:e.sdp,messageType:"OFFER",tiebreaker:Math.floor(429496723*Math.random()+1)})),this.state=s.OFFER_SENT},e}();t.default=c},function(e,t,n){var i=n(65),r=n(66),o=n(34),s=n(67);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t,n){var i,r,o;r=this,o=function(){"use strict";var e,t=this;function n(e){t.console&&(t.console.error?t.console.error(e):t.console.log&&t.console.log(e))}function i(e,t,i,r){var o=r||n,s=e.createShader(i);return e.shaderSource(s,t),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS)?s:(o("*** Error compiling shader '"+s+"':"+e.getShaderInfoLog(s)),e.deleteShader(s),null)}function r(e,t,i,r,o){var s=o||n,a=e.createProgram();return t.forEach(function(t){e.attachShader(a,t)}
1),i&&i.forEach(function(t,n){e.bindAttribLocation(a,r?r[n]:n,t)}),e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)?a:(s("Error in program linking:"+e.getProgramInfoLog(a)),e.deleteProgram(a),null)}(e=e||t)===e.top&&(console.log("%c%s","color:blue;font-weight:bold;","for more about webgl-utils.js see:"),console.log("%c%s","color:blue;font-weight:bold;","http://webglfundamentals.org/webgl/lessons/webgl-boilerplate.html"));var o,s=["VERTEX_SHADER","FRAGMENT_SHADER"];return!document.documentMode&&!!window.StyleMedia&&(HTMLCanvasElement.prototype.getContext=(o=HTMLCanvasElement.prototype.getContext,function(){var e=arguments;return"webgl"===e[0]&&((e=[].slice.call(arguments))[0]="experimental-webgl"),o.apply(this,e)})),{createProgram:r,createProgramFromSources:function(e,t,n,o,a){for(var l=[],c=0;c<t.length;++c)l.push(i(e,t[c],e[s[c]],a));return r(e,l,n,o,a)}}},void 0===(i=(function(){return o.call(r)}).apply(t,[]))||(e.exports=i)},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(68),a=n(5),l=o(n(0));t.getSupportedCodec=function(e){return i(void 0,void 0,void 0,function(){var t,n,i,o;return r(this,function(r){switch(r.label){case 0:return t={video:[],audio:[]},"undefined"!=typeof window?[3,1]:(l.default.error("getSupportedCodec: NOT_BROWSER_ENV"),[2,Promise.reject("NOT_BROWSER_ENV")]);case 1:try{n=s.createRTCPeerConnection({iceServers:[]})}catch(e){return l.default.error("Failed to init RTCPeerConnection",e),[2,Promise.reject(e)]}return n?[3,2]:(l.default.warning("getSupportedCodec: no RTCPeerConnection constructor is detected"),[2,Promise.resolve(t)]);case 2:return e&&e.stream?[3,7]:(i={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}},o=void 0,(a.isSafari()||a.isFireFox()||a.isWeChatBrowser())&&n.addTransceiver?(n.addTransceiver("audio"),n.addTransceiver("video"),[4,n.createOffer()]):[3,4]);case 3:return o=r.sent(),[3,6];case 4:return[4,new Promise(function(e,t){var r=setTimeout(function(){t("CREATEOFFER_TIMEOUT")},3e3);n.createOffer(function(t){clearTimeout(r),e(t)},function(e){clearTimeout(r),t(e)},i)})];case 5:o=r.sent(),r.label=6;case 6:return n.close(),[2,c(o.sdp)];case 7:return e.stream.getTracks&&n.addTrack?e.stream.getTracks().forEach(function(t){n.addTrack(t,e.stream)}):n.addStream(e.stream),o=void 0,a.isSafari()||a.isFireFox()?[4,n.createOffer()]:[3,9];case 8:return o=r.sent(),[3,11];case 9:return[4,new Promise(function(e,t){n.createOffer(e,t)})];case 10:o=r.sent(),r.label=11;case 11:return n.close(),[2,c(o.sdp)]}})})};var c=function(e){var t={video:[],audio:[]};return e.match(/ VP8/i)&&t.video.push("VP8"),e.match(/ VP9/i)&&t.video.push("VP9"),e.match(/ H264/i)&&t.video.push("H264"),e.match(/ opus/i)&&t.audio.push("OPUS"),Promise.resolve(t)}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Prom
1ise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);t.encryptRSA=function(e){return i(void 0,void 0,void 0,function(){var t,n,i,s;return r(this,function(r){switch(r.label){case 0:return t=o.base64ToUint8Array("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCMnXAHkKIGAM+x4N22gCI+Wyu\nSTM9ztkT3uYslTT2PuKmZfPzhH6kVdO7PTjGCOZnAsyb3oTtWat0KcxQ4jxvqQV+\nHvYl3iI1Yd4vl2c3qRMJPLtRDfNxa2Mcxgq7e9aEUibzdd0st+OJAy3tOj/Y0aVy\nxQiYDz3vqa6bP29adwIDAQAB"),[4,window.crypto.subtle.importKey("spki",t,{name:"RSA-OAEP",hash:"SHA-256"},!0,["encrypt"])];case 1:return n=r.sent(),a=e,i=(new TextEncoder).encode(a),[4,window.crypto.subtle.encrypt({name:"RSA-OAEP"},n,i)];case 2:return s=r.sent(),[2,function(e){for(var t="",n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return window.btoa(t)}(new Uint8Array(s))]}var a})})}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(0)),a=n(75),l=n(24),c=n(1),u=n(27);t.addLiveStreamingCapability=function(e,t){var n=this,o=function(t){var n=t.type;if(!e.joinInfo)return new l.AgoraRTCError(l.AgoraRTCErrorCode.INVALID_OPERATION,"can not create live streaming client, please join channel first").throw();switch(n){case u.LiveStreamingServiceMode.INJECT:return e._injectStreamingClient||(e._injectStreamingClient=new a.AgoraRTCLiveStreamingClient(e.joinInfo),e._injectStreamingClient.onInjectStatusChange=function(t,n,i){e.gatewayClient.dispatchEvent({type:"streamInjectedStatus",url:i,status:t})}),e._injectStreamingClient;case u.LiveStreamingServiceMode.RAW:return e._liveRawStreamingClient||(e._liveRawStreamingClient=new a.AgoraRTCLiveStreamingClient(e.joinInfo),e._liveRawStreamingClient.setGatewayConnectionState(e.getConnectionState()),e.on("connection-state-change",function(t){e._liveRawStreamingClient.setGatewayConnectionState(t.curState),"CONNECTING"===t.prevState&&"CONNECTED"===t.curState&&e._liveRawStreamingClient&&e._liveRawStreamingClient.resetAllTask()}),e._liveRawStreamingClient.onLiveStreamError=function(t,n){s.default.error("LIVE_STREAMING_ERROR",n.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingFailed",url:t,reason:n.co
1de})},e._liveRawStreamingClient.onLiveStreamWarning=function(t,n){s.default.warning("LIVE_STREAMING_WARNING",n.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingWarning",url:t,reason:n.code})}),e._liveRawStreamingClient;case u.LiveStreamingServiceMode.TRANSCODE:return e._liveTranscodeStreamingClient||(e._liveTranscodeStreamingClient=new a.AgoraRTCLiveStreamingClient(e.joinInfo),e._liveTranscodeStreamingClient.setGatewayConnectionState(e.getConnectionState()),e.on("connection-state-change",function(t){e._liveTranscodeStreamingClient.setGatewayConnectionState(t.curState),"CONNECTING"===t.prevState&&"CONNECTED"===t.curState&&e._liveTranscodeStreamingClient&&e._liveTranscodeStreamingClient.resetAllTask()}),e._liveTranscodeStreamingClient.onLiveStreamError=function(t,n){s.default.error("LIVE_STREAMING_ERROR",n.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingFailed",url:t,reason:n.code})},e._liveTranscodeStreamingClient.onLiveStreamWarning=function(t,n){s.default.warning("LIVE_STREAMING_WARNING",n.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingWarning",url:t,reason:n})}),e._liveTranscodeStreamingClient}};e.gatewayClient.addEventListener("join",function(t){e._injectStreamingClient&&e._injectStreamingClient.resetAllTask()}),e.gatewayClient.addEventListener("stream-unpublished",function(t){t.options&&0===t.options.streamType&&(e._liveRawStreamingClient&&e._liveRawStreamingClient.resetAllTask(),e._liveTranscodeStreamingClient&&e._liveTranscodeStreamingClient.resetAllTask())}),e.gatewayClient.addEventListener("stream-published",function(e){}),e.startLiveStreaming=function(n,i){s.default.debug("startLiveStreaming");var r=c.report.reportApiInvoke(t.sessionId,{name:"Client.startLiveStreaming",options:arguments,tag:"tracer"});if(e.gatewayClient&&"audience"===e.gatewayClient.role){var o={code:403,reason:"AUDIENCE_STREAMING_FORBIDDEN"};throw r(o),o}var a=e._startLiveStreaming(n,i);return a.then(function(e){r(null,e)}).catch(function(t){s.default.error("LIVE_STREAMING_ERROR",t.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingFailed",url:n,reason:t.code}),r(t)}),a},e._startLiveStreaming=function(a,c){return i(n,void 0,void 0,function(){var n;return r(this,function(i){switch(i.label){case 0:return c||("vp8"===t.codec&&s.default.warning("VP8 is not supported by raw_streaming. Subscriber side will suffer"),"vp9"===t.codec&&s.default.warning("VP9 is not supported by raw_streaming. Subscriber side will suffer"),"rtc"===t.mode&&s.default.warning("RTC mode is not supported by raw_streaming. Subscriber side will suffer")),(e._liveRawStreamingClient&&e._liveRawStreamingClient.haveUrl(a)||e._liveTranscodeStreamingClient&&e._liveTranscodeStreamingClient.haveUrl(a))&&new l.AgoraRTCError(l.AgoraRTCErrorCode.LIVE_STREAMING_TASK_CONFLICT).throw(),[4,o({type:n=c?u.LiveStreamingServiceMode.TRANSCODE:u.LiveStreamingServiceMode.RAW}).startLiveStreamingTask(a,n)];case 1:return i.sent(),e.gatewayClient.dispatchEvent({type:"liveStreamingStarted",url:a}),[2]}})})},e.setLiveTranscoding=function(n){s.default.debug("setLiveTranscoding: "+JSON.stringify(n));var i=c.report.reportApiInvoke(t.sessionId,{name:"Client.setLiveTranscoding",options:arguments,tag:"tracer"});return o({type:u.LiveStreamingServiceMode.TRANSCODE}).setTranscodingConfig(n).then(function(){e.gatewayClient.dispatchEvent({type:"liveTranscodingUpdated"}),i(null)}).catch(function(t){s.default.error("SET_LIVE_TRANSCODING_ERROR",t.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingFailed",reason:t.code}),i(t)})},e.stopLiveStreaming=function(n){var i=c.report.reportApiInvoke(t.sessionId,{name:"Client.stopLiveStreaming",options:arguments,tag:"tracer"}),r=e._stopLiveStreaming(n);return r.then(function(e){i(null,e)}).catch(function(t){s.default.error("STOP_LIVE_STREAMING_ERROR",t.toString()),e.gatewayClient.dispatchEvent({type:"liveStreamingFailed",url:n,reason:t.code}),i(t)}),r},e._stopLiveStreaming=function(t){return i(this,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return s.default.debug("stopLiveStreaming: "+JSON.stringify(t)),[4,Promise.all([e._liveRawStreamingClient,e._liveTranscodeStreamingClient].map(function(e){return e&&e.haveUrl(t)&&e.stopLiveStreamingTask(t)}))];case 1:return n.sent(),s.default.debug("stopLiveStreaming sucess: "+JSON.stringify(t)),e.gatewayClient.dispatchEvent({type:"liveStreamingStopped",url:t}),[2]}})})},e.addInjectStreamUrl=function(n,i){var r=c.report.reportApiInvoke(t.sessionId,{name:"Client.addInjectStreamUrl",options:[n,i],tag:"tracer"});if("audience"===e.gatewayClient.role){var o={code:403,reason:"AUDIENCE_INJECTING_FORBIDDEN"};throw r(o),o}var a=e._addInjectStreamUrl(n,i);return a.then(function(e){r(null,e)}).catch(function(e){s.default.error("ADD_INJECT_STREAM_ERROR",e.toString()),r(e)}),a},e._addInjectStreamUrl=function(e,t){return i(n,void 0,void 0,function(){var n;return r(this,function(i){switch(i.label){case 0:return(n=o({type:u.LiveStreamingServiceMode.INJECT})).setInjectStreamConfig(t,0),[4,n.startLiveStreamingTask(e,u.LiveStreamingServiceMode.INJECT)];case 1:return i.sent(),[2]}})})},e.removeInjectStreamUrl=function(n){return i(this,void 0,void 0,function(){var i,o;return r(this,function(r){return i=c.report.reportApiInvoke(t.sessionId,{name:"Client.removeInjectStreamUrl",options:[n],tag:"tracer"}),(o=e._removeInjectStreamUrl(n)).then(function(e){i(null,e)}).catch(function(e){s.default.error("REMOVE_INJECT_STREAM_ERROR",e.toString()),i(e)}),[2,o]})})},e._removeInjectStreamUrl=function(e){return i(n,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,o({type:u.LiveStreamingServiceMode.INJECT}).stopLiveStreamingTask(e)];case 1:return t.sent(),[2]}})})},e._terminateLiveStreaming=function(){return i(n,void 0,void 0,function(){return r(this,function(t){return[e._injectStreamingClient,e._liveRawStreamingClient,e._liveTranscodeStreamingClient].forEach(function(e){e&&e.terminate()}),[2]})})}}},function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(4)),o=i(n(0)),s=n(10);t.default=function(e,t){void 0===t&&(t={width:160,height:120,framerate:15});var n=t.width,i=t.height,a=t.framerate,l=e.stream;if(!l)throw r.default.INVALID_LOCAL_STREAM;if(!l.getVideoTracks()[0])throw r.default.HIGH_STREAM_NOT_VIDEO_TRACE;var c=l.getVideoTracks()[0];o.default.debug("Start getLowStream");var u=document.createElement("video"),d=document.createElement("canvas");u.setAttribute("style","display:none"),u.setAttribute("muted",""),u.muted=!0,u.setAttribute("autoplay",""),u.autoplay=!0,u.setAttribute("playsinline",""),d.setAttribute("style","display:none"),d.setAttribute("width",n.toString()),d.setAttribute("height",i.toString());var h=d.getContext("2d");if(!h)throw new Error("not get canvas context");u.srcObject=l,document.body.append(u),document.body.append(d),u.play(),o.default.debug("Start render lowStream");var p=s.audioTimerLoop(function(){return function(){if(u.paused&&u.play(),u.videoHeight>2&&u.videoWidth>2){var t=d.width*(u.videoHeight/u.videoWidth);Math.abs(t-d.height)>=2&&(o.default.debug("adjust low stream resolution",d.width+"x"+d.height+" -> "+d.width+"x"+t),d.height=t)}h.drawImage(u,0,0,d.width,d.height);var n=e.stream;if(n){var i=n.getVideoTracks()[0];c!==i&&(o.default.debug("adjust low stream track"),u.srcObject=n,c=i)}}()},a),f=d.captureStream(a),g=f.getVideoTracks()[0];return g.requestFrame&&g.requestFrame(),f.clean=function(){o.default.debug("Start clean lowStream"),p(),(u||u.parentNode||u.parentNode.removeChild)&&u.parentNode.removeChild(u),(d||d.parentNode||d.parentNode.removeChild)&&d.parentNode.removeChild(d),o.default.debug("Clean lowStream")},f}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);e.exports=function(){return n(i),i}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},function(e,t){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var i=t||0;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")}},function(module,exports,__webpack_require__){(function(global,module){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(undefined){"use strict";var e,t,r;e={1:[function(e,t,n){t.exports=function(e,t){for(var n=new Array(arguments.length-1),i=0,r=2,o=!0;r<arguments.length;)n[i++]=arguments[r++];return new Promise(function(r,s){n[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];r.apply(null,t)}};try{e.apply(t||null,n)}catch(e){o&&(o=!1,s(e))}})}},{}],2:[function(e,t,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),s=0;s<64;)o[r[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(e,t,n){for(var i,o=null,s=[],a=0,l=0;t<n;){var c=e[t++];switch(l){case 0:s[a++]=r[c>>2],i=(3&c)<<4,l=1;break;case 1:s[a++]=r[i|c>>4],i=(15&c)<<2,l=2;break;case 2:s[a++]=r[i|c>>6],s[a++]=r[63&c],l=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return l&&(s[a++]=r[i],s[a++]=61,1===l&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))},i.decode=function(e,t,n){for(var i,r=n,s=0,a=0;a<e.length;){var l=e.charCodeAt(a++);if(61===l&&s>1)break;if((l=o[l])===undefined)throw Error("invalid encoding");switch(s){case 0:i=l,s=1;break;case 1:t[n++]=i<<2|(48&l)>>4,i=l,s=2;break;case 2:t[n++]=(15&i)<<4|(60&l)>>2,i=l,s=3;break;case 3:t[n++]=(3&i)<<6|l,s=0}}if(1===s)throw Error("invalid encoding");return n-r},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4}
1)*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,n){function i(e,t){"string"==typeof e&&(t=e,e=undefined);var n=[];function r(e){if("string"!=typeof e){var t=o();if(i.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var s=Object.keys(e),a=new Array(s.length+1),l=new Array(s.length),c=0;c<s.length;)a[c]=s[c],l[c]=e[s[c++]];return a[c]=t,Function.apply(null,a).apply(null,l)}return Function(t)()}for(var u=new Array(arguments.length-1),d=0;d<u.length;)u[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,function(e,t){var n=u[d++];switch(t){case"d":case"f":return String(Number(n));case"i":return String(Math.floor(n));case"j":return JSON.stringify(n);case"s":return String(n)}return"%"}),d!==u.length)throw Error("parameter count mismatch");return n.push(e),r}function o(i){return"function "+(i||t||"")+"("+(e&&e.join(",")||"")+"){\n  "+n.join("\n  ")+"\n}"}return r.toString=o,r}t.exports=i,i.verbose=!1},{}],4:[function(e,t,n){function i(){this._listeners={}}t.exports=i,i.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},i.prototype.off=function(e,t){if(e===undefined)this._listeners={};else if(t===undefined)this._listeners[e]=[];else for(var n=this._listeners[e],i=0;i<n.length;)n[i].fn===t?n.splice(i,1):++i;return this},i.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,n)}return this}},{}],5:[function(e,t,n){t.exports=o;var i=e(1),r=e(7)("fs");function o(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&r&&r.readFile?r.readFile(e,function(i,r){return i&&"undefined"!=typeof XMLHttpRequest?o.xhr(e,t,n):i?n(i):n(null,t.binary?r:r.toString("utf8"))}):o.xhr(e,t,n):i(o,this,e,t)}o.xhr=function(e,t,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4!==i.readyState)return undefined;if(0!==i.status&&200!==i.status)return n(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var r=0;r<i.responseText.length;++r)e.push(255&i.responseText.charCodeAt(r))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,i.responseText)},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()}},{1:1,7:7}],6:[function(e,t,n){function i(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),i=128===n[3];function r(e,i,r){t[0]=e,i[r]=n[0],i[r+1]=n[1],i[r+2]=n[2],i[r+3]=n[3]}function o(e,i,r){t[0]=e,i[r]=n[3],i[r+1]=n[2],i[r+2]=n[1],i[r+3]=n[0]}function s(e,i){return n[0]=e[i],n[1]=e[i+1],n[2]=e[i+2],n[3]=e[i+3],t[0]}function a(e,i){return n[3]=e[i],n[2]=e[i+1],n[1]=e[i+2],n[0]=e[i+3],t[0]}e.writeFloatLE=i?r:o,e.writeFloatBE=i?o:r,e.readFloatLE=i?s:a,e.readFloatBE=i?a:s}():function(){function t(e,t,n,i){var r=t<0?1:0;if(r&&(t=-t),0===t)e(1/t>0?0:2147483648,n,i);else if(isNaN(t))e(2143289344,n,i);else if(t>3.4028234663852886e38)e((r<<31|2139095040)>>>0,n,i);else if(t<1.1754943508222875e-38)e((r<<31|Math.round(t/1.401298464324817e-45))>>>0,n,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((r<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,i)}}function n(e,t,n){var i=e(t,n),r=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:r*(1/0):0===o?1.401298464324817e-45*r*s:r*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,o),e.readFloatLE=n.bind(null,s),e.readFloatBE=n.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),i=128===n[7];function r(e,i,r){t[0]=e,i[r]=n[0],i[r+1]=n[1],i[r+2]=n[2],i[r+3]=n[3],i[r+4]=n[4],i[r+5]=n[5],i[r+6]=n[6],i[r+7]=n[7]}function o(e,i,r){t[0]=e,i[r]=n[7],i[r+1]=n[6],i[r+2]=n[5],i[r+3]=n[4],i[r+4]=n[3],i[r+5]=n[2],i[r+6]=n[1],i[r+7]=n[0]}function s(e,i){return n[0]=e[i],n[1]=e[i+1],n[2]=e[i+2],n[3]=e[i+3],n[4]=e[i+4],n[5]=e[i+5],n[6]=e[i+6],n[7]=e[i+7],t[0]}function a(e,i){return n[7]=e[i],n[6]=e[i+1],n[5]=e[i+2],n[4]=e[i+3],n[3]=e[i+4],n[2]=e[i+5],n[1]=e[i+6],n[0]=e[i+7],t[0]}e.writeDoubleLE=i?r:o,e.writeDoubleBE=i?o:r,e.readDoubleLE=i?s:a,e.readDoubleBE=i?a:s}():function(){function t(e,t,n,i,r,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,r,o+t),e(1/i>0?0:2147483648,r,o+n);else if(isNaN(i))e(0,r,o+t),e(2146959360,r,o+n);else if(i>1.7976931348623157e308)e(0,r,o+t),e((s<<31|2146435072)>>>0,r,o+n);else{var a;if(i<2.2250738585072014e-308)e((a=i/5e-324)>>>0,r,o+t),e((s<<31|a/4294967296)>>>0,r,o+n);else{var l=Math.floor(Math.log(i)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=i*Math.pow(2,-l))>>>0,r,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,r,o+n)}}}function n(e,t,n,i,r){var o=e(i,r+t),s=e(i,r+n),a=2*(s>>31)+1,l=s>>>20&2047,c=4294967296*(1048575&s)+o;return 2047===l?c?NaN:a*(1/0):0===l?5e-324*a*c:a*Math.pow(2,l-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=n.bind(null,s,0,4),e.readDoubleBE=n.bind(null,a,4,0)}(),e}function r(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function o(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=i(i)},{}],7:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],8:[function(e,t,n){var i=n,r=i.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=i.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=r(e),i="";n&&(i=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):n?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};i.resolve=function(e,t,n){return n||(t=o(t)),r(t)?t:(n||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},{}],9:[function(e,t,n){t.exports=function(e,t,n){var i=n||8192,r=i>>>1,o=null,s=i;return function(n){if(n<1||n>r)return e(n);s+n>i&&(o=e(i),s=0);var a=t.call(o,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},{}],10:[function(e,t,n){var i=n;i.length=function(e){for(var t=0,n=0,i=0;i<e.length;++i)(n=e.charCodeAt(i))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},i.read=function(e,t,n){if(n-t<1)return"";for(var i,r=null,o=[],s=0;t<n;)(i=e[t++])<128?o[s++]=i:i>191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>
110),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),s=0);return r?(s&&r.push(String.fromCharCode.apply(String,o.slice(0,s))),r.join("")):String.fromCharCode.apply(String,o.slice(0,s))},i.write=function(e,t,n){for(var i,r,o=n,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&56320==(64512&(r=e.charCodeAt(s+1)))?(++s,t[n++]=(i=65536+((1023&i)<<10)+(1023&r))>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128);return n-o}},{}],11:[function(e,t,n){var i=n,r=e(14),o=e(33);function s(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(d%s){",i);for(var o=t.resolvedType.values,s=Object.keys(o),a=0;a<s.length;++a)t.repeated&&o[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",o[s[a]])("m%s=%j",i,o[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',i)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",i,n,i);else{var l=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",i,i);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",i,i);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",i,i);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,l)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length)",i)("m%s=d%s",i,i);break;case"string":e("m%s=String(d%s)",i,i);break;case"bool":e("m%s=Boolean(d%s)",i,i)}}return e}function a(e,t,n,i){if(t.resolvedType)t.resolvedType instanceof r?e("d%s=o.enums===String?types[%i].values[m
1%s]:m%s",i,n,i,i):e("d%s=types[%i].toObject(m%s,o)",i,n,i);else{var o=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",i,i,i,i);break;case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',i)("d%s=o.longs===String?String(m%s):m%s",i,i,i)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",i,i,i,i,o?"true":"",i);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,i,i,i,i);break;default:e("d%s=m%s",i,i)}}return e}i.fromObject=function(e){var t=e.fieldsArray,n=o.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var i=0;i<t.length;++i){var a=t[i].resolve(),l=o.safeProp(a.name);a.map?(n("if(d%s){",l)('if(typeof d%s!=="object")',l)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),s(n,a,i,l+"[ks[i]]")("}")("}")):a.repeated?(n("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),s(n,a,i,l+"[i]")("}")("}")):(a.resolvedType instanceof r||n("if(d%s!=null){",l),s(n,a,i,l),a.resolvedType instanceof r||n("}"))}return n("return m")},i.toObject=function(e){var t=e.fieldsArray.slice().sort(o.compareFieldsById);if(!t.length)return o.codegen()("return {}");for(var n=o.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),i=[],s=[],l=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?i:t[c].map?s:l).push(t[c]);if(i.length){for(n("if(o.arrays||o.defaults){"),c=0;c<i.length;++c)n("d%s=[]",o.safeProp(i[c].name));n("}")}if(s.length){for(n("if(o.objects||o.defaults){"),c=0;c<s.length;++c)n("d%s={}",o.safeProp(s[c].name));n("}")}if(l.length){for(n("if(o.defaults){"),c=0;c<l.length;++c){var u=l[c],d=o.safeProp(u.name);if(u.resolvedType instanceof r)n("d%s=o.enums===String?%j:%j",d,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var h="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",d,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,u.typeDefault)}n("}")}var p=!1;for(c=0;c<t.length;++c){var f=e._fieldsArray.indexOf(u=t[c]);d=o.safeProp(u.name),u.map?(p||(p=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),a(n,u,f,d+"[ks2[j]]")("}")):u.repeated?(n("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),a(n,u,f,d+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",d,u.name),a(n,u,f,d),u.partOf&&n("if(o.oneofs)")("d%s=%j",o.safeProp(u.partOf.name),u.name)),n("}")}return n("return d")}},{14:14,33:33}],12:[function(e,t,n){t.exports=function(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var a=e._fieldsArray[n].resolve(),l=a.resolvedType instanceof i?"int32":a.type,c="m"+o.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),r.defaults[a.keyType]!==undefined?t("k=%j",r.defaults[a.keyType]):t("k=null"),r.defaults[l]!==undefined?t("value=%j",r.defaults[l]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),r.basic[l]===undefined?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),t(r.long[a.keyType]!==undefined?'%s[typeof k==="object"?util.longToHash(k):k]=value':"%s[k]=value",c)):a.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),r.packed[l]!==undefined&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,l)("}else"),r.basic[l]===undefined?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,n):t("%s.push(r.%s())",c,l)):r.basic[l]===undefined?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,n):t("%s=r.%s()",c,l),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var u=e._fieldsArray[n];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",s(u))}return t("return m")};var i=e(14),r=e(32),o=e(33);function s(e){return"missing required '"+e.name+"'"}},{14:14,32:32,33:33}],13:[function(e,t,n){t.exports=function(e){for(var t,n=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(o.compareFieldsById),l=0;l<a.length;++l){var c=a[l].resolve(),u=e._fieldsArray.indexOf(c),d=c.resolvedType instanceof i?"
1int32":c.type,h=r.basic[d];t="m"+o.safeProp(c.name),c.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|r.mapKey[c.keyType],c.keyType),h===undefined?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,d,t),n("}")("}")):c.repeated?(n("if(%s!=null&&%s.length){",t,t),c.packed&&r.packed[d]!==undefined?n("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),h===undefined?s(n,c,u,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(c.id<<3|h)>>>0,d,t)),n("}")):(c.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),h===undefined?s(n,c,u,t):n("w.uint32(%i).%s(%s)",(c.id<<3|h)>>>0,d,t))}return n("return w")};var i=e(14),r=e(32),o=e(33);function s(e,t,n,i){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,i,(t.id<<3|2)>>>0)}},{14:14,32:32,33:33}],14:[function(e,t,n){t.exports=s;var i=e(22);((s.prototype=Object.create(i.prototype)).constructor=s).className="Enum";var r=e(21),o=e(33);function s(e,t,n,r,o){if(i.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=o||{},this.reserved=undefined,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var n=new s(e,t.values,t.options,t.comment,t.comments);return n.reserved=t.reserved,n},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:undefined,"comment",t?this.comment:undefined,"comments",t?this.comments:undefined])},s.prototype.add=function(e,t,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(this.values[e]!==undefined)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[t]!==undefined){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=n||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)}},{21:21,22:22,33:33}],15:[function(e,t,n){t.exports=c;var i=e(22);((c.prototype=Object.create(i.prototype)).constructor=c).className="Field";var r,o=e(14),s=e(32),a=e(33),l=/^required|optional|repeated$/;function c(e,t,n,r,o,c,u){if(a.isObject(r)?(u=o,c=r,r=o=undefined):a.isObject(o)&&(u=c,c=o,o=undefined),i.call(this,e,c),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(n))throw TypeError("type must be a string");if(r!==undefined&&!l.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(o!==undefined&&!a.isString(o))throw TypeError("extend must be a string");this.rule=r&&"optional"!==r?r:undefined,this.type=n,this.id=t,this.extend=o||undefined,this.required="required"===r,this.optional=!this.required,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&s.long[n]!==undefined,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,n){return"packed"===e&&(this._packed=null),i.prototype.setOption.call(this,e,t,n)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||undefined,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:undefined])},c.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=s.defaults[this.type])===undefined&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.t
1ype),this.typeDefault=this.resolvedType instanceof r?null:this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(this.options.packed===undefined||!this.resolvedType||this.resolvedType instanceof o)||delete this.options.packed,Object.keys(this.options).length||(this.options=undefined)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.defaultValue=this.map?a.emptyObject:this.repeated?a.emptyArray:this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},c.d=function(e,t,n,i){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(r,o){a.decorateType(r.constructor).add(new c(o,e,t,n,{default:i}))}},c._configure=function(e){r=e}},{14:14,22:22,32:32,33:33}],16:[function(e,t,n){var i=t.exports=e(17);i.build="light",i.load=function(e,t,n){return"function"==typeof t?(n=t,t=new i.Root):t||(t=new i.Root),t.load(e,n)},i.loadSync=function(e,t){return t||(t=new i.Root),t.loadSync(e)},i.encoder=e(13),i.decoder=e(12),i.verifier=e(36),i.converter=e(11),i.ReflectionObject=e(22),i.Namespace=e(21),i.Root=e(26),i.Enum=e(14),i.Type=e(31),i.Field=e(15),i.OneOf=e(23),i.MapField=e(18),i.Service=e(30),i.Method=e(20),i.Message=e(19),i.wrappers=e(37),i.types=e(32),i.util=e(33),i.ReflectionObject._configure(i.Root),i.Namespace._configure(i.Type,i.Service,i.Enum),i.Root._configure(i.Type),i.Field._configure(i.Type)},{11:11,12:12,13:13,14:14,15:15,17:17,18:18,19:19,20:20,21:21,22:22,23:23,26:26,30:30,31:31,32:32,33:33,36:36,37:37}],17:[function(e,t,n){var i=n;function r(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}i.build="minimal",i.Writer=e(38),i.BufferWriter=e(39),i.Reader=e(24),i.BufferReader=e(25),i.util=e(35),i.rpc=e(28),i.roots=e(27),i.configure=r,r()},{24:24,25:25,27:27,28:28,35:35,38:38,39:39}],18:[function(e,t,n){t.exports=s;var i=e(15);((s.prototype=Object.create(i.prototype)).constructor=s).className="MapField";var r=e(32),o=e(33);function s(e,t,n,r,s,a){if(i.call(this,e,t,r,undefined,undefined,s,a),!o.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:undefined])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===undefined)throw Error("invalid key type: "+this.keyType);return i.prototype.resolve.call(this)},s.d=function(e,t,n){return"function"==typeof n?n=o.decorateType(n).name:n&&"object"==typeof n&&(n=o.decorateEnum(n).name),function(i,r){o.decorateType(i.constructor).add(new s(r,e,t,n))}}},{15:15,32:32,33:33}],19:[function(e,t,n){t.exports=r;var i=e(35);function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}r.create=function(e){return this.$type.create(e)},r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toJSON=function(){return this.$type.toObject(this,i.toJSONOptions)}},{35:35}],20:[function(e,t,n){t.exports=o;var i=e(22);((o.prototype=Object.create(i.prototype)).constructor=o).className="Method";var r=e(33);function o(e,t,n,o,s,a,l,c){if(r.isObject(s)?(l=s,s=a=undefined):r.isObject(a)&&(l=a,a=undefined),t!==undefined&&!r.isString(t))throw TypeError("type must be a string");if(!r.isString(n))throw TypeError("requestType must be a string");if(!r.isString(o))throw TypeError("responseType must be a string");i.call(this,e,l),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||undefined,this.responseType=o,this.responseStream=!!a||undefined,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["type","rpc"!==this.type&&this.type||undefined,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:undefined])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),i.prototype.resolve.call(this))}},{22:22,33:33}],21:[function(e,t,n){t.exports=u;var i=e(22);((u.prototype=Object.create(i.prototype)).constructor=u).className="Namespace";var r,o,s,a=e(15),l=e(33);function c(e,t){if(!e||!e.length)return undefined;for(var n={},i=0;i<e.length;++i)n[e[i].name]=e[i].toJSON(t);return n}function u(e,t){i.call(this,e,t),this.nested=undefined,this._nestedArray=null}function d(e){return e._nestedArray=null,e}u.fromJSON=function(e,t){return new u(e,t.options).addJSON(t.nested)},u.arrayToJSON=c,u.isReservedId=function(e,t){if(e)for(var n=0;n<e.length;++n)if("string"!=typeof e[n]&&e[n][0]<=t&&e[n][1]>t)return!0;return!1},u.isReservedName=function(e,t){if(e)for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1},Object.defineProperty(u.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=l.toArray(this.nested))}}),u.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",c(this.nestedArray,e)])},u.prototype.addJSON=function(e){if(e)for(var t,n=Object.keys(e),i=0;i<n.length;++i)this.add(((t=e[n[i]]).fields!==undefined?r.fromJSON:t.values!==undefined?s.fromJSON:t.methods!==un
1defined?o.fromJSON:t.id!==undefined?a.fromJSON:u.fromJSON)(n[i],t));return this},u.prototype.get=function(e){return this.nested&&this.nested[e]||null},u.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},u.prototype.add=function(e){if(!(e instanceof a&&e.extend!==undefined||e instanceof r||e instanceof s||e instanceof o||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof u&&e instanceof u)||t instanceof r||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.nestedArray,i=0;i<n.length;++i)e.add(n[i]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),d(this)},u.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=undefined),e.onRemove(this),d(this)},u.prototype.define=function(e,t){if(l.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var n=this;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(!((n=n.nested[i])instanceof u))throw Error("path conflicts with non-namespace objects")}else n.add(n=new u(i))}return t&&n.addJSON(t),n},u.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof u?e[t++].resolveAll():e[t++].resolve();return this.resolve()},u.prototype.lookup=function(e,t,n){if("boolean"==typeof t?(n=t,t=undefined):t&&!Array.isArray(t)&&(t=[t]),l.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var i=this.get(e[0]);if(i){if(1===e.length){if(!t||t.indexOf(i.constructor)>-1)return i}else if(i instanceof u&&(i=i.lookup(e.slice(1),t,!0)))return i}else for(var r=0;r<this.nestedArray.length;++r)if(this._nestedArray[r]instanceof u&&(i=this._nestedArray[r].lookup(e,t,!0)))return i;return null===this.parent||n?null:this.parent.lookup(e,t)},u.prototype.lookupType=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such type: "+e);return t},u.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},u.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[r,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},u.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},u._configure=function(e,t,n){r=e,o=t,s=n}},{15:15,22:22,33:33}],22:[function(e,t,n){t.exports=o,o.className="ReflectionObject";var i,r=e(33);function o(e,t){if(!r.isString(e))throw TypeError("name must be a string");if(t&&!r.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(o.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof i&&t._handleAdd(this)},o.prototype.onRemove=function(e){var t=e.root;t instanceof i&&t._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof i&&(this.resolved=!0),this},o.prototype.getOption=function(e){return this.options?this.options[e]:undefined},o.prototype.setOption=function(e,t,n){return n&&this.options&&this.options[e]!==undefined||((this.options||(this.options={}))[e]=t),this},o.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var i=this.parsedOptions;if(n){var o=i.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});o?r.setProperty(o[e],n,t):((o={})[e]=r.setProperty({},n,t),i.push(o))}else{var s={};s[e]=t,i.push(s)}return this},o.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),i=0;i<n.length;++i)this.setOption(n[i],e[n[i]],t);return this},o.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},o._configure=function(e){i=e}},{33:33}],23:[function(e,t,n){t.exports=s;var i=e(22);((s.prototype=Object.create(i.prototype)).constructor=s).className="OneOf";var r=e(15),o=e(33);function s(e,t,n,r){if(Array.isArray(t)||(n=t,t=undefined),i.call(this,e,n),t!==undefined&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=r}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:undefined])},s.prototype.add=function(e){if(!(e instanceof r))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){i.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=this,this.fieldsArray.push(n))}a(this)},s.prototype.onRemove=function(e){for(var t,n=0;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);i.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){o.decorateType(t.constructor).add(new s(n,e)),Object.defineProperty(t,n,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},{15:15,22:22,33:33}],24:[function(e,t,n){t.exports=l;var i,r=e(35),o=r.LongBits,s=r.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},d=function(){return r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new i(e):u(e)})(e)}:u};function h(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}l.create=d(),l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){i=e,l.create=d(),i._configure();var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},{35:35}],25:[function(e,t,n){t.exports=o;var i=e(24);(o.prototype=Object.create(i.prototype)).constructor=o;var r=e(35);function o(e){i.call(this,e)}o._configure=function(){r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},{24:24,35:35}],26:[function(e,t,n){t.exports=d;var i=e(21);((d.prototype=Object.create(i.prototype)).constructor=d).className="Root";var r,o,s,a=e(15),l=e(14),c=e(23),u=e(33);function d(e){i.call(this,"",e),this.deferred=[],this.files=[]}function h(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=u.path.resolve,d.prototype.fetch=u.fetch,d.prototype.load=function e(t,n,i){"function"==typeof n&&(i=n,n=undefined);var r=this;if(!i)return u.asPromise(e,r,t,n);var a=i===h;function l(e,t){if(i){var n=i;if(i=null,a)throw e;n(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in s)return n}return null}function d(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){o.filename=e;var i,s=o(t,r,n),d=0;if(s.imports)for(;d<s.imports.length;++d)(i=c(s.imports[d])||r.resolvePath(e,s.imports[d]))&&p(i);if(s.weakImports)for(d=0;d<s.weakImports.length;++d)(i=c(s.weakImports[d])||r.resolvePath(e,s.weakImports[d]))&&p(i,!0)}else r.setOptions(t.options).addJSON(t.nested)}catch(e){l(e)}a||f||l(null,r)}function p(e,t){if(!(r.files.indexOf(e)>-1))if(r.files.push(e),e in s)a?d(e,s[e]):(++f,setTimeout(function(){--f,d(e,s[e])}));else if(a){var n;try{n=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||l(e))}d(e,n)}else++f,r.fetch(e,function(n,o){--f,i&&(n?t?f||l(null,r):l(n):d(e,o))})}var f=0;u.isString(t)&&(t=[t]);for(var g,m=0;m<t.length;++m)(g=r.resolvePath("",t[m]))&&p(g);return a?r:(f||l(null,r),undefined)},d.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,h)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return i.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function f(e,t){var n=t.parent.lookup(t.extend);if(n){var i=new a(t.fullName,t.id,t.type,t.rule,undefined,t.options);return i.declaringField=t,t.extensionField=i,n.add(i),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof a)e.extend===undefined||e.extensionField||f(0,e)||this.deferred.push(e);else if(e instanceof l)p.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof r)for(var t=0;t<this.deferred.length;)f(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var n=0;n<e.nestedArray.length;++n)this._handleAdd(e._nestedArray[n]);p.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof a){if(e.extend!==undefined)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof l)p.test(e.name)&&delete e.parent[e.name];else if(e instanceof i){for(var n=0;n<e.nestedArray.length;++n)this._handleRemove(e._nestedArray[n]);p.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,n){r=e,o=t,s=n}},{14:14,15:15,21:21,23:23,33:33}],27:[function(e,t,n){t.exports={}},{}],28:[function(e,t,n){n.Service=e(29)},{29:29}],29:[function(e,t,n){t.exports=r;var i=e(35);function r(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(r.prototype=Object.create(i.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,n,r,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return i.asPromise(e,a,t,n,r,o);if(!a.rpcImpl)return setTimeout(function(){s(Error("already ended"))},0),undefined;try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,n){if(e)return a.emit("error",e,t),s(e);if(null===n)return a.end(!0),undefined;if(!(n instanceof r))try{n=r[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)})}catch(e){return a.emit("error",e,t),setTimeout(function(){s(e)},0),undefined}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit
1("end").off()),this}},{35:35}],30:[function(e,t,n){t.exports=a;var i=e(21);((a.prototype=Object.create(i.prototype)).constructor=a).className="Service";var r=e(20),o=e(33),s=e(28);function a(e,t){i.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var n=new a(e,t.options);if(t.methods)for(var i=Object.keys(t.methods),o=0;o<i.length;++o)n.add(r.fromJSON(i[o],t.methods[i[o]]));return t.nested&&n.addJSON(t.nested),n.comment=t.comment,n},a.prototype.toJSON=function(e){var t=i.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return o.toObject(["options",t&&t.options||undefined,"methods",i.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||undefined,"comment",n?this.comment:undefined])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||i.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return i.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof r?(this.methods[e.name]=e,e.parent=this,l(this)):i.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof r){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,l(this)}return i.prototype.remove.call(this,e)},a.prototype.create=function(e,t,n){for(var i,r=new s.Service(e,t,n),a=0;a<this.methodsArray.length;++a){var l=o.lcFirst((i=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");r[l]=o.codegen(["r","c"],o.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m:i,q:i.resolvedRequestType.ctor,s:i.resolvedResponseType.ctor})}return r}},{20:20,21:21,28:28,33:33}],31:[function(e,t,n){t.exports=y;var i=e(21);((y.prototype=Object.create(i.prototype)).constructor=y).className="Type";var r=e(14),o=e(23),s=e(15),a=e(18),l=e(30),c=e(19),u=e(24),d=e(38),h=e(33),p=e(13),f=e(12),g=e(36),m=e(11),v=e(37);function y(e,t){i.call(this,e,t),this.fields={},this.oneofs=undefined,this.extensions=undefined,this.reserved=undefined,this.group=undefined,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],i=n.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,c,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var i={};for(n=0;n<this.oneofsArray.length;++n)i[this._oneofsArray[n].resolve().name]={get:h.oneOfGetter(this._oneofsArray[n].oneof),set:h.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,i)}}}),y.generateConstructor=function(e){for(var t,n=h.codegen(["p"],e.name),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?n("this%s={}",h.safeProp(t.name)):t.repeated&&n("this%s=[]",h.safeProp(t.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(e,t){var n=new y(e,t.options);n.extensions=t.extensions,n.reserved=t.reserved;for(var c=Object.keys(t.fields),u=0;u<c.length;++u)n.add((void 0!==t.fields[c[u]].keyType?a.fromJSON:s.fromJSON)(c[u],t.fields[c[u]]));if(t.oneofs)for(c=Object.keys(t.oneofs),u=0;u<c.length;++u)n.add(o.fromJSON(c[u],t.oneofs[c[u]]));if(t.nested)for(c=Object.keys(t.nested),u=0;u<c.length;++u){var d=t.nested[c[u]];n.add((d.id!==undefined?s.fromJSON:d.fields!==undefined?y.fromJSON:d.values!==undefined?r.fromJSON:d.methods!==un
1defined?l.fromJSON:i.fromJSON)(c[u],d))}return t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),t.group&&(n.group=!0),t.comment&&(n.comment=t.comment),n},y.prototype.toJSON=function(e){var t=i.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||undefined,"oneofs",i.arrayToJSON(this.oneofsArray,e),"fields",i.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:undefined,"reserved",this.reserved&&this.reserved.length?this.reserved:undefined,"group",this.group||undefined,"nested",t&&t.nested||undefined,"comment",n?this.comment:undefined])},y.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var n=this.oneofsArray;for(t=0;t<n.length;)n[t++].resolve();return i.prototype.resolveAll.call(this)},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&e.extend===undefined){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):i.prototype.add.call(this,e)},y.prototype.remove=function(e){if(e instanceof s&&e.extend===undefined){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof o){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return i.prototype.remove.call(this,e)},y.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},y.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],n=0;n<this.fieldsArray.length;++n)t.push(this._fieldsArray[n].resolve().resolvedType);this.encode=p(this)({Writer:d,types:t,util:h}),this.decode=f(this)({Reader:u,types:t,util:h}),this.verify=g(this)({types:t,util:h}),this.fromObject=m.fromObject(this)({types:t,util:h}),this.toObject=m.toObject(this)({types:t,util:h});var i=v[e];if(i){var r=Object.create(this);r.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(r),r.toObject=this.toObject,this.toObject=i.toObject.bind(r)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){h.decorateType(t,e)}}},{11:11,12:12,13:13,14:14,15:15,18:18,19:19,21:21,23:23,24:24,30:30,33:33,36:36,37:37,38:38}],32:[function(e,t,n){var i=n,r=e(33),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var n=0,i={};for(t|=0;n<e.length;)i[o[n+t]]=e[n++];return i}i.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",r.emptyArray,null]),i.long=s([0,0,0,1,1],7),i.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},{33:33}],33:[function(e,t,n){var i,r,o=t.exports=e(35),s=e(27);o.codegen=e(3),o.fetch=e(5),o.path=e(8),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),i=0;i<t.length;)n[i]=e[t[i++]];return n}return[]},o.toObject=function(e){for(var t={},n=0;n<e.length;){var i=e[n++],r=e[n++];r!==undefined&&(t[i]=r)}return t};var a=/\\/g,l=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(l,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,function(e,t){return t.toUpperCase()})},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(t,n){if(t.$type)return n&&t.$type.name!==n&&(o.decorateRoot.remove(t.$type),t.$type.name=n,o.decorateRoot.add(t.$type)),t.$type;i||(i=e(31));var r=new i(n||t.name);return o.decorateRoot.add(r),r.ctor=t,Object.defineProperty(t,"$type",{value:r,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:r,enumerable:!1}),r};var u=0;o.decorateEnum=function(t){if(t.$type)return t.$type;r||(r=e(14));var n=new r("Enum"+u++,t);
1return o.decorateRoot.add(n),Object.defineProperty(t,"$type",{value:n,enumerable:!1}),n},o.setProperty=function(e,t,n){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,n,i){var r=n.shift();if(n.length>0)t[r]=e(t[r]||{},n,i);else{var o=t[r];o&&(i=[].concat(o).concat(i)),t[r]=i}return t}(e,t=t.split("."),n)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(e(26)))}})},{14:14,26:26,27:27,3:3,31:31,35:35,5:5,8:8}],34:[function(e,t,n){t.exports=r;var i=e(35);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(i.isString(e)){if(!i.Long)return r.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;r.fromHash=function(e){return e===s?o:new r((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},{35:35}],35:[function(e,t,n){var i=n;function r(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;++r)e[i[r]]!==undefined&&n||(e[i[r]]=t[i[r]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&r(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}
1i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(4),i.float=e(6),i.inquire=e(7),i.utf8=e(10),i.pool=e(9),i.LongBits=e(34),i.isNode=Boolean(void 0!==global&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},i.isString=function(e){return"string"==typeof e||e instanceof String},i.isObject=function(e){return e&&"object"==typeof e},i.isset=i.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},i.Buffer=function(){try{var e=i.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(e){return"number"==typeof e?i.Buffer?i._Buffer_allocUnsafe(e):new i.Array(e):i.Buffer?i._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(e){return e?i.LongBits.from(e).toHash():i.LongBits.zeroHash},i.longFromHash=function(e,t){var n=i.LongBits.fromHash(e);return i.Long?i.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},i.merge=r,i.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},i.newError=o,i.ProtocolError=o("ProtocolError"),i.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&this[e[n]]!==undefined&&null!==this[e[n]])return e[n]}},i.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var e=i.Buffer;e?(i._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},i._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):i._Buffer_from=i._Buffer_allocUnsafe=null}},{1:1,10:10,2:2,34:34,4:4,6:6,7:7,9:9}],36:[function(e,t,n){t.exports=function(e){var t=r.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n={};e.oneofsArray.length&&t("var p={}");for(var i=0;i<e.fieldsArray.length;++i){var l=e._fieldsArray[i].resolve(),c="m"+r.safeProp(l.name);if(l.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,l.name),l.map)t("if(!util.isObject(%s))",c)("return%j",o(l,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,i,c+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",c)("return%j",o(l,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,l,i,c+"[i]")("}");else{if(l.partOf){var u=r.safeProp(l.partOf.name);1===n[l.partOf.name]&&t("if(p%s===1)",u)("return%j",l.partOf.name+": multiple values"),n[l.partOf.name]=1,t("p%s=1",u)}s(t,l,i,c)}l.optional&&t("}")}return t("return null")};var i=e(14),r=e(33);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(%s){",r)("default:")("return%j",o(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,r)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",r)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',r)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',r)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",r)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",o(t,"buffer"))}return e}function a(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",o(t,"boolean key"))}return e}},{14:14,33:33}],37:[function(e,t,n){var i=n,r=e(19);i[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);
1if(n){var i="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===i.indexOf("/")&&(i="/"+i),this.create({type_url:i,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",i="";if(t&&t.json&&e.type_url&&e.value){i=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(i);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof r){var s=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),i=n+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=i,s}return this.toObject(e,t)}}},{19:19}],38:[function(e,t,n){t.exports=u;var i,r=e(35),o=r.LongBits,s=r.base64,a=r.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=undefined,this.val=n}function c(){}function u(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}var d=function(){return r.Buffer?function(){return(u.create=function(){return new i})()}:function(){return new u}};function h(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=undefined,this.val=t}function f(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function g(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}u.create=d(),u.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(u.alloc=r.pool(u.alloc,r.Array.prototype.subarray)),u.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},(p.prototype=Object.create(l.prototype)).fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(f,10,o.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.int64=u.prototype.uint64=function(e){var t=o.from(e);return this._push(f,t.length(),t)},u.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(f,t.length(),t)},u.prototype.bool=function(e){return this._push(h,1,e?1:0)},u.prototype.sfixed32=u.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},u.prototype.sfixed64=u.prototype.fixed64=function(e){var t=o.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},u.prototype.float=function(e){return this._push(r.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(r.float.writeDoubleLE,8,e)};var m=r.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var i=0;i<e.length;++i)t[n+i]=e[i]};u.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(r.isString(e)){var n=u.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(m,t,e)},u.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},u.prototype.fork=function(){return this.states=new function(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}(this),this.head=this.tail=new l(c,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},u._configure=function(e){i=e,u.create=d(),i._configure()}},{35:35}],39:[function(e,t,n){t.exports=o;var i=e(38);(o.prototype=Object.create(i.prototype)).constructor=o;var r=e(35);function o(){i.call(this)}function s(e,t,n){e.length<40?r.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=r._Buffer_allocUnsafe,o.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var i=0;i<e.length;)t[n++]=e[i++]}},o.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=r.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},{35:35,38:38}]},t={},r=function n(i){var r=t[i];return r||e[i][0].call(r=t[i]={exports:{}}
vendor: 4,861 bytes, line 1
1,n,r,r.exports),r.exports}(16),r.util.global.protobuf=r,__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(61)],(__WEBPACK_AMD_DEFINE_RESULT__=(function(e){return e&&e.isLong&&(r.util.Long=e,r.configure()),r}).apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))===undefined||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),module&&module.exports&&(module.exports=r)}()}).call(this,__webpack_require__(33),__webpack_require__(60)(module))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=i;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function i(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=r;var o={},s={};function a(e,t){var n,i,r;return t?(r=0<=(e>>>=0)&&e<256)&&(i=s[e])?i:(n=c(e,(0|e)<0?-1:0,!0),r&&(s[e]=n),n):(r=-128<=(e|=0)&&e<128)&&(i=o[e])?i:(n=c(e,e<0?-1:0,!1),r&&(o[e]=n),n)}function l(e,t){if(isNaN(e))return t?y:v;if(t){if(e<0)return y;if(e>=f)return E}else{if(e<=-g)return T;if(e+1>=g)return w}return e<0?l(-e,t).neg():c(e%p|0,e/p|0,t)}function c(e,t,n){return new i(e,t,n)}i.fromInt=a,i.fromNumber=l,i.fromBits=c;var u=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return v;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return d(e.substring(1),t,n).neg();for(var r=l(u(n,8)),o=v,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+a),n);if(a<8){var h=l(u(n,a));o=o.mul(h).add(l(c))}else o=(o=o.mul(r)).add(l(c))}return o.unsigned=t,o}function h(e,t){return"number"==typeof e?l(e,t):"string"==typeof e?d(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}i.fromString=d,i.fromValue=h;var p=4294967296,f=p*p,g=f/2,m=a(1<<24),v=a(0);i.ZERO=v;var y=a(0,!0);i.UZERO=y;var b=a(1);i.ONE=b;var _=a(1,!0);i.UONE=_;var S=a(-1);i.NEG_ONE=S;var w=c(-1,2147483647,!1);i.MAX_VALUE=w;var E=c(-1,-1,!0);i.MAX_UNSIGNED_VALUE=E;var T=c(0,-2147483648,!1);i.MIN_VALUE=T;var C=i.prototype;C.toInt=function(){return this.unsigned?this.low>>>0:this.low},C.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},C.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(T)){var t=l(e),n=this.div(t),i=n.mul(t).sub(this);return n.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=l(u(e,6),this.unsigned),o=this,s="";;){var a=o.div(r),c=(o.sub(a.mul(r)).toInt()>>>0).toString(e);if((o=a).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},C.getHighBits=function(){return this.high},C.getHighBitsUnsigned=function(){return this.high>>>0},C.getLowBits=function(){return this.low},C.getLowBitsUnsigned=function(){return this.low>>>0},C.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},C.isZero=function(){return 0===this.high&&0===this.low},C.eqz=C.isZero,C.isNegative=function(){return!this.unsigned&&this.high<0},C.isPositive=function(){return this.unsigned||this.high>=0},C.isOdd=function(){return 1==(1&this.low)},C.isEven=function(){return 0==(1&this.low)},C.equals=function(e){return r(e)||(e=h(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},C.eq=C.equals,C.notEquals=function(e){return!this.eq(e)},C.neq=C.notEquals,C.ne=C.notEquals,C.lessThan=function(e){return this.comp(e)<0}
vendor: 5,320 bytes, line 1
1,C.lt=C.lessThan,C.lessThanOrEqual=function(e){return this.comp(e)<=0},C.lte=C.lessThanOrEqual,C.le=C.lessThanOrEqual,C.greaterThan=function(e){return this.comp(e)>0},C.gt=C.greaterThan,C.greaterThanOrEqual=function(e){return this.comp(e)>=0},C.gte=C.greaterThanOrEqual,C.ge=C.greaterThanOrEqual,C.compare=function(e){if(r(e)||(e=h(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},C.comp=C.compare,C.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(b)},C.neg=C.negate,C.add=function(e){r(e)||(e=h(e));var t=0,n=0,i=0,o=0;return i+=(o+=(65535&this.low)+(65535&e.low))>>>16,n+=(i+=(this.low>>>16)+(e.low>>>16))>>>16,t+=(n+=(65535&this.high)+(65535&e.high))>>>16,t+=(this.high>>>16)+(e.high>>>16),c((i&=65535)<<16|(o&=65535),(t&=65535)<<16|(n&=65535),this.unsigned)},C.subtract=function(e){return r(e)||(e=h(e)),this.add(e.neg())},C.sub=C.subtract,C.multiply=function(e){if(this.isZero())return v;if(r(e)||(e=h(e)),n)return c(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return v;if(this.eq(T))return e.isOdd()?T:v;if(e.eq(T))return this.isOdd()?T:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return l(this.toNumber()*e.toNumber(),this.unsigned);var t=65535&this.high,i=this.low>>>16,o=65535&this.low,s=65535&e.high,a=e.low>>>16,u=65535&e.low,d=0,p=0,f=0,g=0;return f+=(g+=o*u)>>>16,p+=(f+=i*u)>>>16,f&=65535,p+=(f+=o*a)>>>16,d+=(p+=t*u)>>>16,p&=65535,d+=(p+=i*a)>>>16,p&=65535,d+=(p+=o*s)>>>16,d+=(this.high>>>16)*u+t*a+i*s+o*(e.high>>>16),c((f&=65535)<<16|(g&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},C.mul=C.multiply,C.divide=function(e){if(r(e)||(e=h(e)),e.isZero())throw Error("division by zero");var t,i,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return _;o=y}else{if(this.eq(T))return e.eq(b)||e.eq(S)?T:e.eq(T)?b:(t=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?b:S:(i=this.sub(e.mul(t)),o=t.add(i.div(e)));if(e.eq(T))return this.unsigned?y:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=v}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),a=s<=48?1:u(2,s-48),d=l(t),p=d.mul(e);p.isNegative()||p.gt(i);)p=(d=l(t-=a,this.unsigned)).mul(e);d.isZero()&&(d=b),o=o.add(d),i=i.sub(p)}return o},C.div=C.divide,C.modulo=function(e){return r(e)||(e=h(e)),n?c((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},C.mod=C.modulo,C.rem=C.modulo,C.not=function(){return c(~this.low,~this.high,this.unsigned)},C.and=function(e){return r(e)||(e=h(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},C.or=function(e){return r(e)||(e=h(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},C.xor=function(e){return r(e)||(e=h(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},C.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},C.shl=C.shiftLeft,C.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},C.shr=C.shiftRight,C.shiftRightUnsigned=function(e){if(r(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},C.shru=C.shiftRightUnsigned,C.shr_u=C.shiftRightUnsigned,C.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},C.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},C.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},C.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},C.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},i.fromBytes=function(e,t,n){return n?i.fromBytesLE(e,t):i.fromBytesBE(e,t)},i.fromBytesLE=function(e,t){return new i(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},i.fromBytesBE=function(e,t){return new i(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e){e.exports=JSON.parse('{"PeerPublishStatus":408,"JoinChannelTimeout":407,"OnUpdateStream":356,"OnRemoveStream":355,"OnAddVideoStream":353,"OnAddAudioStream":352,"FirstAudioDecode":351,"FirstVideoDecode":350,"FirstAudioReceived":349,"FirstVideoReceived":348,"ReqUserAccount":196,"ApiInvoke":41,"RequestProxyWorkerManager":36,"RequestProxyAppCenter":35,"VideoSendingStopped":34,"AudioSendingStopped":33,"StreamSwitch":32,"FirstFrame":31,"Publish":30,"Subscribe":29,"JoinGateway":28,"JoinChooseServer"
1:27,"Session":26,"APWorkerEvent":160,"WorkerEvent":156,"JoinWebProxyAP":700,"WebSocketQuit":671}')},function(e){e.exports=JSON.parse('{"nested":{"protobuf":{"nested":{"Session":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"version":{"type":"string","id":11},"browser":{"type":"string","id":12},"appid":{"type":"string","id":13},"mode":{"type":"string","id":14},"extend":{"type":"string","id":15},"process":{"type":"string","id":16},"build":{"type":"string","id":17},"ipv6":{"type":"string","id":18},"sourceHost":{"type":"string","id":19},"sourcePath":{"type":"string","id":20},"collectorHost":{"type":"string","id":21},"collectorName":{"type":"string","id":22}}},"JoinChooseServer":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"chooseServerAddr":{"type":"string","id":11},"chooseServerAddrList":{"type":"string","id":12},"errorCode":{"type":"string","id":13},"eventElapse":{"type":"int64","id":14},"chooseServerIp":{"type":"string","id":15}}},"JoinGateway":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"gatewayAddr":{"type":"string","id":11},"errorCode":{"type":"string","id":12},"eventElapse":{"type":"int64","id":13},"firstSuccess":{"type":"bool","id":14}}},"Subscribe":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"localSdp":{"type":"string","id":11},"remoteSdp":{"type":"string","id":12},"extend":{"type":"string","id":13},"errorCode":{"type":"string","id":14},"eventElapse":{"type":"int64","id":15},"video":{"type":"bool","id":16},"audio":{"type":"bool","id":17},"subscribeRequestid":{"type":"int32","id":18},"p2pid":{"type":"int32","id":19}}},"Publish":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"localSdp":{"type":"string","id":11},"remoteSdp":{"type":"string","id":12},"extend":{"type":"string","id":13},"errorCode":{"type":"string","id":14},"eventElapse":{"type":"int64","id":15},"videoName":{"type":"string","id":16},"audioName":{"type":"string","id":17},"screenName":{"type":"string","id":18},"video":{"type":"bool","id":19},"audio":{"type":"bool","id":20},"publishRequestid":{"type":"int32","id":21},"p2pid":{"type":"int32","id":22},"screenshare":{"type":"bool","id":23}}},"FirstFrame":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"extend":{"type":"string","id":11},"errorCode":{"type":"string","id":12},"width":{"type":"int64","id":13},"height":{"type":"int64","id":14}}},"StreamSwitch":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"isDual":{"type":"bool","id":11}}},"AudioSendingStopped":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"reason":{"type":"string","id":10},"eventType":{"type":"string","id":11}}},"VideoSendingStopped":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"reason":{"type":"string","id":10},"eventType":{"type":"string","id":11}}},"RequestProxyAppCenter":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"APAddr":{"type":"string","id":11},"workerManagerList":{"type":"string","id":12},"errorCode":{"type":"string","id":13},"eventElapse":{"type":"int64","id":14},"extend":{"type":"string","id":15},"response":{"type":"string","id":16}}},"RequestProxyWorkerManager":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"eventType":{"type":"string","id":10},"workerManagerAddr":{"type":"string","id":11},"errorCode":{"type":"string","id":12},"eventElapse":{"type":"int64","id":13},"extend":{"type":"string","id":14},"response":{"type":"string","id":15}}},"ApiInvoke":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"apiName":{"type":"string","id":9},"errorCode":{"type":"string","id":10},"options":{"type":"string","id":11},"execElapse":{"type":"int64","id":12},"execStates":{"type":"string","id":13},"execResult":{"type":"string","id":14},"invokeId":{"type":"int64","id":15}}},"ReqUserAccount":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"eventType":{"type":"string","id":9},"serverAddress":{"type":"string","id":10},"stringUid":{"type":"string","id":11},"errorCode":{"type":"string","id":12},"extend":{"type":"string","id":13}}},"FirstVideoReceived":{"fields":{"lts":{"type":"int64","id":1},"peer":{"type":"int64","id":2},"elapse":{"type":"int64","id":3},"sid":{"type":"string","id":4},"cname":{"type":"string","id":5},"cid":{"type":"int64","id":6},"uid":{"type":"int64","id":8},"subscribeRequestid":{"type":"int32","id":9},"p2pid":{"type":"int32","id":10},"subscribeElapse":{"type":"int64","id":11}}},"FirstAudioReceived":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7},"elapse":{"type":"int64","id":8},"subscribeRequestid":{"type":"int32","id":9},"p2pid":{"type":"int32","id":10},"subscribeElapse":{"type":"int64","id":11}}},"FirstVideoDecode":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7},"elapse":{"type":"int64","id":8},"videowidth":{"type":"int32","id":9},"videoheight":{"type":"int32","id":10},"subscribeRequestid":{"type":"int32","id":11},"p2pid":{"type":"int32","id":12},"subscribeElapse":{"type":"int64","id":13}}},"FirstAudioDecode":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7},"elapse":{"type":"int64","id":8},"subscribeRequestid":{"type":"int32","id":9},"p2pid":{"type":"int32","id":10},"subscribeElapse":{"type":"int64","id":11}}},"OnAddAudioStream":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7}}},"OnAddVideoStream":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7}}},"OnRemoveStream":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7}}},"OnUpdateStream":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":6},"peer":{"type":"int64","id":7},"audio":{"type":"bool","id":8},"video":{"type":"bool","id":9}}},"JoinChannelTimeout":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":5},"elapse":{"type":"int64","id":6},"timeout":{"type":"int32","id":7}}},"PeerPublishStatus":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":5},"peer":{"type":"int64","id":6},"elapse":{"type":"int64","id":7},"peerPublishDuration":{"type":"int64","id":8},"joinChannelSuccessElapse":{"type":"int64","id":9},"subscribeElapse":{"type":"int64","id":10},"audiotag":{"type":"int32","id":11},"videotag":{"type":"int32","id":12},"screensharetag":{"type":"int32","id":13},"firsttimetag":{"type":"int32","id":14}}},"WebSocketQuit":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"uid":{"type":"int64","id":5},"elapse":{"type":"int64","id":6},"succ":{"type":"int32","id":7},"errorCode":{"type":"string","id":8},"ip":{"type":"string","id":9}}},"Message":{"fields":{"id":{"type":"int64","id":1},"msg":{"type":"bytes","id":2}}},"ProtoRaws":{"fields":{"sendTs":{"type":"int64","id":1},"payloads":{"rule":"repeated","type":"Message","id":2},"vid":{"type":"int32","id":3}}},"APWorkerEvent":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9}
1,"ec":{"type":"int32","id":10},"sc":{"type":"int32","id":11},"serverIp":{"type":"string","id":12},"firstSuccess":{"type":"bool","id":13},"responseTime":{"type":"int32","id":14},"serviceName":{"type":"string","id":15},"responseDetail":{"type":"string","id":16}}},"WorkerEvent":{"fields":{"sid":{"type":"string","id":1},"cname":{"type":"string","id":2},"cid":{"type":"int64","id":3},"lts":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"success":{"type":"bool","id":7},"elapse":{"type":"int64","id":8},"peer":{"type":"int64","id":9},"command":{"type":"string","id":10},"actionType":{"type":"string","id":11},"url":{"type":"string","id":12},"payload":{"type":"string","id":13},"serverCode":{"type":"int32","id":14},"code":{"type":"int32","id":15},"traceId":{"type":"string","id":16},"workerType":{"type":"int32","id":17},"responseTime":{"type":"int32","id":18},"requestId":{"type":"int64","id":19},"packIndex":{"type":"int32","id":20},"requestByUser":{"type":"bool","id":21},"tid":{"type":"string","id":22}}},"JoinWebProxyAP":{"fields":{"lts":{"type":"int64","id":1},"sid":{"type":"string","id":2},"cname":{"type":"string","id":3},"cid":{"type":"int64","id":4},"ip":{"type":"string","id":5},"uid":{"type":"int64","id":6},"sucess":{"type":"int32","id":7},"elapse":{"type":"int64","id":8},"eventType":{"type":"string","id":9},"apServerAddr":{"type":"string","id":10},"turnServerAddrList":{"type":"string","id":11},"errorCode":{"type":"string","id":12}}}}}}}')},function(e,t,n){var i=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function a(e,t,n,i){var r=Object.create((t&&t.prototype instanceof u?t:u).prototype),o=new w(i||[]);return r._invoke=function(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=b(s,n);if(a){if(a===c)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var u=l(e,t,n);if("normal"===u.type){if(i=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),r}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=a;var c={};function u(){}function d(){}function h(){}var p={};p[r]=function(){return this};var f=Object.getPrototypeOf,g=f&&f(f(E([])));g&&g!==t&&n.call(g,r)&&(p=g);var m=h.prototype=u.prototype=Object.create(p);function v(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function y(e,t){var i;this._invoke=function(r,o){function s(){return new t(function(i,s){!function i(r,o,s,a){var c=l(e[r],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then(function(e){i("next",e,s,a)},function(e){i("throw",e,s,a)}):t.resolve(d).then(function(e){u.value=e,s(u)},function(e){return i("throw",e,s,a)})}a(c.arg)}(r,o,i,s)})}return i=i?i.then(s,s):s()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var i=l(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,c;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);
vendor: 4,086 bytes, line 1
1if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=m.constructor=h,h.constructor=d,h[s]=d.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},v(y.prototype),y.prototype[o]=function(){return this},e.AsyncIterator=y,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new y(a(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then(function(e){return e.done?e.value:s.next()})},v(m),m[s]="Generator",m[r]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=E,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var i="object"==typeof window&&window.RTCPeerConnection,r="object"==typeof window&&window.webkitRTCPeerConnection,o="object"==typeof window&&window.mozRTCPeerConnection;t.createRTCPeerConnection=function(e){var t=i||r||o;return t?new t(e):null}},function(e,t,n){var i;!function(t){"use strict";function r(){}var o=r.prototype,s=t.EventEmitter;function a(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function l(e){return function(){return this[e].apply(this,arguments)}}o.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},o.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},o.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},o.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,i=this.getListenersAsObject(e),r="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&-1===a(i[n],t)&&i[n].push(r?t:{listener:t,once:!1});return this},o.on=l("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=l("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,t){var n,i,r=this.getListenersAsObject(e);for(i in r)r.hasOwnProperty(i)&&-1!==(n=a(r[i],t))&&r[i].splice(n,1);return this},o.off=l("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},o.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if(e instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},o.removeAllListeners=l("removeEvent"),o.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].slice(0),r=0;r<n.length;r++)!0===(i=n[r]).once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},o.trigger=l("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},o._getEvents=function(){return this._events||(this._events={})},r.noConflict=function(){return t.EventEmitter=s,r},void 0===(i=(function(){return r}).call(t,n,t,e))||(e.exports=i)}("undefined"!=typeof window?window:this||{})},function(e,t,n){var i=n(35);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){(function(t){var i;e.exports=i=i||function(e,i){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==t&&t.crypto&&(r=t.crypto),!r)try{r=n(74)}catch(e){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},l=a.lib={},c=l.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.a
1pply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=l.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,r=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++)t[i+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else for(var s=0;s<r;s+=4)t[i+s>>>2]=n[s>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new u.init(t,e)}}),d=a.enc={},h=d.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r<n;r++){var o=t[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new u.init(n,t/2)}},p=d.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r<n;r++)i.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new u.init(n,t)}},f=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},g=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,r=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*l,o);if(l){for(var d=0;d<l;d+=s)this._doProcessBlock(r,d);n=r.splice(0,l),i.sigBytes-=c}return new u.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(l.Hasher=g.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new m.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math)}).call(this,n(33))},function(e,t){},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}
1,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(76),l=n(27),c=n(95),u=n(20),d=n(24),h=n(31),p=s(n(0)),f=s(n(37)),g=function(){function e(e){this.retryTimeout=1e4,this.streamingTasks=new Map,this.isStartingStreamingTask=!1,this.taskMutex=new c.PromiseMutex("LS"),this.cancelToken=f.default.CancelToken.source(),this.injectConfig=i({},l.DEFAULT_INJECT_CONFIG),this.injectLoopTimes=0,this.lastTaskId=1,this.statusError=new Map,this.spec=e}return Object.defineProperty(e.prototype,"isNeedReset",{get:function(){for(var e=this,t=0,n=Array.from(this.streamingTasks.values());t<n.length;t++){var i=n[t];if(i.mode===l.LiveStreamingServiceMode.INJECT)return!0;if(i.mode===l.LiveStreamingServiceMode.TRANSCODE&&(this.transcodingConfig&&(this.transcodingConfig.userConfigs||this.transcodingConfig.transcodingUsers)||[]).find(function(t){return t.uid===e.spec.uid}))return!0}return!1},enumerable:!0,configurable:!0}),e.prototype.setTranscodingConfig=function(e){return r(this,void 0,void 0,function(){var t,n,r,s,a,c=this;return o(this,function(o){switch(o.label){case 0:(t=i(i({},l.DEFAULT_TRANSCODING_CONFIG),e)).transcodingUsers||(t.transcodingUsers=t.userConfigs),66!==t.videoCodecProfile&&77!==t.videoCodecProfile&&100!==t.videoCodecProfile&&(p.default.debug("["+this.spec.clientId+"] set transcoding config, fix video codec profile: "+t.videoCodecProfile+" -> 100"),t.videoCodecProfile=100),t.transcodingUsers&&(t.transcodingUsers=t.transcodingUsers.map(function(e){return i(i(i({},l.DEFAULT_LIVE_STREAMING_TRANSCODING_USER),e),{zOrder:e.zOrder?e.zOrder+1:1})})),t.images&&(t.images=t.images.map(function(e){return i(i({},l.DEFAULT_LIVE_STREAMING_TRANSCODING_WATERMARK),e)}));try{l.isLiveStreamingTranscodingConfig(t)}catch(e){throw e}return t.transcodingUsers&&(t.userConfigs=t.transcodingUsers.map(function(e){return i({},e)}),t.userCount=t.transcodingUsers.length,delete t.transcodingUsers),n=(t.userConfigs||[]).map(function(e){return"number"==typeof e.uid?Promise.resolve(e.uid):u.getUserAccount(c.spec,null,e.uid)}),[4,this.taskMutex.lock()];case 1:return r=o.sent(),[4,Promise.all(n)];case 2:if(o.sent().forEach(function(e,n){t.userConfigs&&t.userConfigs[n]&&(t.userConfigs[n].uid=e&&e.uid||e)}),this.transcodingConfig=t,!this.connection)return r(),[2];o.label=3;case 3:return o.trys.push([3,5,,6]),[4,this.connection.request("request",{clientRequest:{command:"UpdateTranscoding",transcodingConfig:this.transcodingConfig}},!1,{command:"UpdateTranscoding",workerType:1,requestByUser:!0,tid:Array.from(this.streamingTasks.values()).map(function(e){return e.taskId}).join("#")})];case 4:return s=o.sent(),r(),p.default.debug("["+this.spec.clientId+"] update live transcoding config success, code: "+s.code+", config:",JSON.stringify(this.transcodingConfig)),[3,6];case 5:if(a=o.sent(),r(),!a.data||!a.data.retry)throw a;return a.data.changeAddress&&this.connection.tryNextAddress(),this.streamingTasks.forEach(function(e){p.default.warning("["+c.spec.clientId+"] live streaming receive error",a.toString(),"try to republish",e.url),c.startLiveStreamingTask(e.url,e.mode,a).then(function(){p.default.debug("["+c.spec.clientId+"] live streaming republish "+e.url+" success")}).catch(function(t){p.default.error("["+c.spec.clientId+"] live streaming republish failed",e.url,t.toString()),c.onLiveStreamError&&c.onLiveStreamError(e.url,t)})}),[3,6];case 6:return[2]}})})},e.prototype.setInjectStreamConfig=function(e,t){this.injectConfig=Object.assign({},this.injectConfig,e),this.injectLoopTimes=t},e.prototype.startLiveStreamingTask=function(e,t,n){return r(this,void 0,void 0,function(){var r,s,a,c,u,f,g,m,v=this;return o(this,function(o){switch(o.label){case 0:return Array.from(this.streamingTasks.values()).find(function(e){return e.mode===l.LiveStreamingServiceMode.INJECT})&&t===l.LiveStreamingServiceMode.INJECT?[2,new d.AgoraRTCError(d.AgoraRTCErrorCode.LIVE_STREAMING_TASK_CONFLICT,"inject stream over limit").throw()]:(r={command:"PublishStream",ts:Date.now(),url:e,uid:this.spec.uid.toString(),autoDestroyTime:30},p.default.debug("["+this.spec.clientId+"] start live streaming "+e+", mode: "+t),[4,this.taskMutex.lock()]);case 1:if(s=o.sent(),!this.transcodingConfig&&t===l.LiveStreamingServiceMode.TRANSCODE)throw s(),new d.AgoraRTCError(d.AgoraRTCErrorCode.INVALID_OPERATION,"[LiveStreaming] no transcoding config found, can not start transcoding streaming task");if(!this.connection&&n)return s(),[2];if(this.streamingTasks.get(e)&&!n)return s(),[2,new d.AgoraRTCError(d.AgoraRTCErrorCode.LIVE_STREAMING_TASK_CONFLICT).throw()];if(!this.transcodingConfig&&t===l.LiveStreamingServiceMode.TRANSCODE)throw s(),new d.AgoraRTCError(d.AgoraRTCErrorCode.INVALID_OPERATION,"[LiveStreaming] no transcoding config found, can not start transcoding streaming task");o.label=2;case 2:return o.trys.push([2,5,,6]),this.connection?[3,4]:(a=this,[4,this.connect(t)]);case 3:a.connection=o.sent(),o.label=4;case 4:return[3,6];case 5:throw c=o.sent(),s(),c;case 6:switch(t){case l.LiveStreamingServiceMode.TRANSCODE:r.transcodingConfig=i({},this.transcodingConfig);break;case l.LiveStreamingServiceMode.RAW:break;case l.LiveStreamingServiceMode.INJECT:r={cname:this.spec.cname,command:"InjectStream",sid:this.spec.sid,transcodingConfig:this.injectConfig,ts:Date.now(),url:e,loopTimes:this.injectLoopTimes}}this.uapResponse&&this.uapResponse.vid&&(r.vid=this.uapResponse.vid
1),this.isStartingStreamingTask=!0,u=this.lastTaskId++,o.label=7;case 7:return o.trys.push([7,9,,14]),f=new Promise(function(t,i){h.wait(v.retryTimeout).then(function(){if(n)return i(n);var t=v.statusError.get(e);return t?(v.statusError.delete(e),i(t)):void 0})}),[4,Promise.race([this.connection.request("request",{clientRequest:r},!0,{url:e,command:"PublishStream",workerType:t===l.LiveStreamingServiceMode.TRANSCODE?1:2,requestByUser:!n,tid:u.toString()}),f])];case 8:return g=o.sent(),this.isStartingStreamingTask=!1,p.default.debug("["+this.spec.clientId+"] live streaming started, code: "+g.code),this.streamingTasks.set(e,{clientRequest:r,mode:t,url:e,taskId:u}),s(),[3,14];case 9:if(m=o.sent(),s(),this.isStartingStreamingTask=!1,!m.data||!m.data.retry||n)throw m;return m.data.changeAddress?[3,11]:[4,this.startLiveStreamingTask(e,t,m)];case 10:return[2,o.sent()];case 11:return this.connection.tryNextAddress(),[4,this.startLiveStreamingTask(e,t,m)];case 12:return[2,o.sent()];case 13:return[3,14];case 14:return[2]}})})},e.prototype.stopLiveStreamingTask=function(e){var t=this;return new Promise(function(n,i){var r=t.streamingTasks.get(e);if(!r||!t.connection)return new d.AgoraRTCError(d.AgoraRTCErrorCode.UNEXPECTED_ERROR,"can not find streaming task to stop").throw();var o=r.mode;r.abortTask=function(){p.default.debug("["+t.spec.clientId+"] stop live streaming success(worker exception)"),t.streamingTasks.delete(e),n()},p.default.debug("stop live streaming task request: "+JSON.stringify(e)),t.connection.request("request",{clientRequest:{command:o===l.LiveStreamingServiceMode.INJECT?"UninjectStream":"UnpublishStream",url:r.url}},!1,{url:e,command:"UnPublishStream",workerType:o===l.LiveStreamingServiceMode.TRANSCODE?1:2,requestByUser:!0,tid:(t.lastTaskId++).toString()}).then(function(i){p.default.debug("["+t.spec.clientId+"] stop live streaming success, code: "+i.code),t.streamingTasks.delete(e),0===t.streamingTasks.size&&o!==l.LiveStreamingServiceMode.INJECT&&(t.connection.close(),t.connection=void 0),n()}).catch(i)})},e.prototype.controlInjectStream=function(e,t,n,i){return r(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:if(!(r=this.streamingTasks.get(e))||!this.connection||r.mode!==l.LiveStreamingServiceMode.INJECT)throw new d.AgoraRTCError(d.AgoraRTCErrorCode.INVALID_OPERATION,"can not find inject stream task to control");return[4,this.connection.request("request",{clientRequest:{command:"ControlStream",url:e,control:t,audioVolume:n,position:i}})];case 1:return[2,o.sent().serverResponse]}})})},e.prototype.resetAllTask=function(){var e=this,t=Array.from(this.streamingTasks.values());this.terminate();for(var n=function(t){i.startLiveStreamingTask(t.url,t.mode).catch(function(n){e.onLiveStreamError&&e.onLiveStreamError(t.url,n)})},i=this,r=0,o=t;r<o.length;r++)n(o[r])},e.prototype.setGatewayConnectionState=function(e){this.connection&&(this.connection.gatewayConnectionState=e)},e.prototype.terminate=function(){this.cancelToken&&this.cancelToken.cancel(),this.streamingTasks=new Map,this.isStartingStreamingTask=!1,this.statusError=new Map,this.cancelToken=f.default.CancelToken.source(),this.uapResponse=void 0,this.connection&&this.connection.close(),this.connection=void 0},e.prototype.connect=function(e){return r(this,void 0,void 0,function(){var t,n=this;return o(this,function(i){switch(i.label){case 0:if(this.connection)throw new d.AgoraRTCError(d.AgoraRTCErrorCode.UNEXPECTED_ERROR,"live streaming connection has already connected");return[4,h.getLiveStreamingWorkerMangerResult(e,this.spec,this.cancelToken.token)];case 1:return t=i.sent(),this.uapResponse=t,this.connection=new a.AgoraLiveStreamingUapSignal(t.workerToken,this.spec,e),this.connection.on(l.LiveStreamingUapSignalEvents.WARNING,function(e,t){return n.onLiveStreamWarning&&n.onLiveStreamWarning(t,e)}),this.connection.on(l.LiveStreamingUapSignalEvents.PUBLISH_STREAM_STATUS,function(e){return n.handlePublishStreamServer(e)}),this.connection.on(l.LiveStreamingUapSignalEvents.INJECT_STREAM_STATUS,function(e){return n.handleInjectStreamServerStatus(e)}),this.connection.on(l.LiveStreamingUapSignalEvents.REQUEST_NEW_ADDRESS,function(t,i){if(!n.connection)return i(new d.AgoraRTCError(d.AgoraRTCErrorCode.UNEXPECTED_ERROR,"can not get new live streaming address list"));
1h.getLiveStreamingWorkerMangerResult(e,n.spec,n.cancelToken.token).then(function(e){n.uapResponse=e,t(e.addressList)}).catch(i)}),[4,this.connection.init(t.addressList)];case 2:return i.sent(),[2,this.connection]}})})},e.prototype.handlePublishStreamServer=function(e){var t=this,n=e.serverStatus&&e.serverStatus.url;if(!n)throw new d.AgoraRTCError(d.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"empty url",{code:e.code});var i=this.streamingTasks.get(n);switch(e.code){case l.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN:case l.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT:case l.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE:case l.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH:var r=new d.AgoraRTCError(d.AgoraRTCErrorCode.LIVE_STREAMING_CDN_ERROR,"",{code:e.code});if(i)return p.default.error(r.toString()),this.onLiveStreamError&&this.onLiveStreamError(n,r);if(!this.isStartingStreamingTask)return;this.statusError.set(n,r);case l.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WORKER_LOST:case l.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WORKER_QUIT:if(!this.connection||0===this.streamingTasks.size)return;this.connection.tryNextAddress();for(var o=function(n){if(n.abortTask)return n.abortTask(),"continue";p.default.warning("["+s.spec.clientId+"] publish stream status code",e.code,"try to republish",n.url),s.startLiveStreamingTask(n.url,n.mode,new d.AgoraRTCError(d.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"",{code:e.code})).then(function(){p.default.debug("["+t.spec.clientId+"] republish live stream success",n.url)}).catch(function(e){p.default.error(e.toString()),t.onLiveStreamError&&t.onLiveStreamError(n.url,e)})},s=this,a=0,c=Array.from(this.streamingTasks.values());a<c.length;a++)o(c[a]);return}},e.prototype.handleInjectStreamServerStatus=function(e){var t=Number(e.uid),n=e.serverStatus&&e.serverStatus.url;switch(e.code){case 200:return void(this.onInjectStatusChange&&this.onInjectStatusChange(0,t,n));case 451:return this.onInjectStatusChange&&this.onInjectStatusChange(1,t,n),void this.streamingTasks.delete(n);case 453:return this.onInjectStatusChange&&this.onInjectStatusChange(2,t,n),void this.streamingTasks.delete(n);case 470:return this.onInjectStatusChange&&this.onInjectStatusChange(10,t,n),void this.streamingTasks.delete(n);case 499:return this.onInjectStatusChange&&this.onInjectStatusChange(3,t,n),void this.streamingTasks.delete(n);default:return void p.default.debug("inject stream server status",e)}},e.prototype.haveUrl=function(e){return this.streamingTasks.has(e)||void 0},e}();t.AgoraRTCLiveStreamingClient=g},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}
1,l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(27),u=n(77),d=n(36),h=n(24),p=n(2),f=l(n(0)),g=n(1),m=n(31),v=function(e){function t(t,n,i){var r=e.call(this)||this;return r._gatewayConnectionState="CONNECTED",r.reconnectMode="retry",r.reqId=0,r.commandReqId=0,r.waitingResponseList=[],r.handleWebSocketOpen=function(){r.reconnectMode="retry",r.startPingPong()},r.handleWebSocketMessage=function(e){if(e.data){var t=JSON.parse(e.data);if(t.requestId)r.emit("@"+t.requestId,t);else if(r.serviceMode===c.LiveStreamingServiceMode.INJECT)r.emit(c.LiveStreamingUapSignalEvents.INJECT_STREAM_STATUS,t);else{g.report.requestWorkerEvent(r.spec.sid,{actionType:"status",serverCode:t.code,workerType:r.serviceMode===c.LiveStreamingServiceMode.TRANSCODE?1:2});var n=t.serverStatus&&t.serverStatus.url;n&&r.waitingResponseList.includes(n)&&200===t.code&&r.emit(n),r.emit(c.LiveStreamingUapSignalEvents.PUBLISH_STREAM_STATUS,t)}}},r.spec=n,r.token=t,r.serviceMode=i,r.websocket=new u.AgoraWebSocketManager("live-streaming"),r.websocket.on(c.WebSocketManagerEvents.CONNECTED,r.handleWebSocketOpen),r.websocket.on(c.WebSocketManagerEvents.ON_MESSAGE,r.handleWebSocketMessage),r.websocket.on(c.WebSocketManagerEvents.REQUEST_NEW_URLS,function(e,t){d.emitAsPromise(r,c.LiveStreamingUapSignalEvents.REQUEST_NEW_ADDRESS).then(e).catch(t)}),r.websocket.on(c.WebSocketManagerEvents.RECONNECTING,function(){r.websocket.reconnectMode=r.reconnectMode}),r}return r(t,e),Object.defineProperty(t.prototype,"gatewayConnectionState",{get:function(){return this._gatewayConnectionState},set:function(e){this._gatewayConnectionState=e,"CONNECTED"===e&&this.emit("gateway-connected",e)},enumerable:!0,configurable:!0}),t.prototype.init=function(e){return this.websocket.init(e)},t.prototype.request=function(e,t,n,i){return s(this,void 0,void 0,function(){var r,s,l,u,d,f,v,y,b,_,S=this;return a(this,function(a){switch(a.label){case 0:if(this.reqId+=1,r=this.reqId,"request"===e&&(this.commandReqId+=1),s=this.commandReqId,!r||!this.websocket)throw new h.AgoraRTCError(h.AgoraRTCErrorCode.UNEXPECTED_ERROR);if(l=p.VERSION,"closed"===this.websocket.state)throw new h.AgoraRTCError(h.AgoraRTCErrorCode.WS_DISCONNECT);return u=function(){return new Promise(function(e,t){var n=function(){"CONNECTED"===S.gatewayConnectionState&&"connected"===S.websocket.state&&(S.off("gateway-connected",n),S.websocket.off(c.WebSocketManagerEvents.CONNECTED,n),e(void 0))};S.on("gateway-connected",n),S.websocket.once(c.WebSocketManagerEvents.CLOSED,function(){return t(new h.AgoraRTCError(h.AgoraRTCErrorCode.WS_ABORT))}),S.websocket.on(c.WebSocketManagerEvents.CONNECTED,n)})},"connected"===this.websocket.state&&"CONNECTED"===this.gatewayConnectionState?[3,2]:[4,u()];case 1:a.sent(),a.label=2;case 2:d=Promise.race([new Promise(function(e,t){var n=function(){t(new h.AgoraRTCError(h.AgoraRTCErrorCode.WS_ABORT))};S.websocket.once(c.WebSocketManagerEvents.RECONNECTING,n),S.websocket.once(c.WebSocketManagerEvents.CLOSED,n),S.once("@"+r,function(t){e(t)})}),m.wait(p.getParameter("LIVE_STREAMING_TIMEOUT")).then(function(){return!1})]),(f=o({command:e,sdkVersion:l,seq:r,requestId:r,allocate:n,cname:this.spec.cname,appId:this.spec.appId,sid:this.spec.sid,uid:this.spec.uid.toString(),ts:Math.floor(Date.now()/1e3)},t)).clientRequest&&(f.clientRequest.workerToken=this.token),i&&g.report.requestWorkerEvent(this.spec.sid,o(o({},i),{requestId:s,actionType:"request",payload:JSON.stringify(t.clientRequest),serverCode:0,code:0})),v=Date.now(),this.websocket.sendMessage(f),y=null,a.label=3;case 3:return a.trys.push([3,5,,8]),[4,d];case 4:return y=a.sent(),[3,8];case 5:if(b=a.sent(),"closed"===this.websocket.state)throw b;return[4,u()];case 6:return a.sent(),[4,this.request(e,t,n,i)];case 7:return[2,a.sent()];case 8:if(!1===y)throw _=new h.AgoraRTCError(h.AgoraRTCErrorCode.NETWORK_TIMEOUT,(t&&t.clientRequest&&t.clientRequest.command)+" timeout",{changeAddress:!0,retry:!0}),this.emit(c.LiveStreamingUapSignalEvents.WARNING,_,i&&i.url||"unknown url"),i&&g.report.requestWorkerEvent(this.spec.sid,o(o({},i),{requestId:s,actionType:"response",payload:"TIMEOUT",serverCode:0,success:0,responseTime:Date.now()-v})),_;return i&&g.report.requestWorkerEvent(this.spec.sid,o(o({},i),{requestId:s,actionType:"response",payload:JSON.stringify(y.serverResponse),serverCode:y.code,success:200===y.code,responseTime:Date.now()-v}
1)),200===y.code?[3,10]:[4,this.handleResponseError(y)];case 9:a.sent(),a.label=10;case 10:return[2,y]}})})},t.prototype.tryNextAddress=function(){this.reconnectMode="tryNext",this.websocket.reconnect("tryNext")},t.prototype.close=function(){var e="__VERSION__"===p.VERSION?"0.0.1":p.VERSION;this.reqId+=1,"connected"===this.websocket.state?(this.websocket.sendMessage({command:"request",appId:this.spec.appId,cname:this.spec.cname,uid:this.spec.uid.toString(),sdkVersion:e,sid:this.spec.sid,seq:this.reqId,ts:Math.floor(Date.now()/1e3),requestId:this.reqId,clientRequest:{command:"DestroyWorker"}}),this.websocket.close(!1,!0)):this.websocket.close(!1),this.pingpongTimer&&(window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0)},t.prototype.handleResponseError=function(e){return s(this,void 0,void 0,function(){var t,n,i,r,o=this;return a(this,function(s){switch(f.default.debug("[live-streaming] receive response error "+e.code),e.code){case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM:return f.default.warning("live stream response already exists stream"),this.emit(c.LiveStreamingUapSignalEvents.WARNING,"live stream response already exists stream, code 454",t=e.serverResponse.url),this.waitingResponseList.includes(t)||this.waitingResponseList.push(t),[2,new Promise(function(n,i){o.once(t,function(){o.waitingResponseList.splice(o.waitingResponseList.indexOf(t),1),n()}),setTimeout(function(){o.waitingResponseList.splice(o.waitingResponseList.indexOf(t),1),i(new h.AgoraRTCError(h.AgoraRTCErrorCode.TIMEOUT,"live stream timeout waiting 454",{code:e.code}))},1e4)})];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR:case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_BAD_STREAM:case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR:return[2,new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INVALID_ARGUMENT,"",{code:e.code}).throw()];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_INGNORE_MESSAGE:throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INVALID_ARGUMENT,"",{retry:!0,changeAddress:!0});case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST:if("UnpublishStream"===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return[2];throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream response wm worker not exist",{retry:!0});case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_NOT_AUTHORIZED:return[2,new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED,"",{code:e.code}).throw()];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE:return n=new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE),[2,this.emit(c.LiveStreamingUapSignalEvents.WARNING,n,e.serverResponse.url)];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN:return n=new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_WARN_FREQUENT_REQUEST),[2,this.emit(c.LiveStreamingUapSignalEvents.WARNING,n,e.serverResponse.url)];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH:throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream response wm worker not exist",{retry:!0});case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_NOT_SUPPORTED:return[2,new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_TRANSCODING_NOT_SUPPORT,"",{code:e.code}).throw()];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_MAX_STREAM_NUM:return n=new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT),[2,this.emit(c.LiveStreamingUapSignalEvents.WARNING,n,e.serverResponse.url)];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR:return[2,new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"",{code:e.code}).throw()];case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_RESOURCE_LIMIT:throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream resource limit",{retry:!0,changeAddress:!0});case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WORKER_LOST:case c.LIVE_STREAM_ERROR_CODE.LIVE_STREAM_RESPONSE_WORKER_QUIT:if("UnpublishStream"
1===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return[2];throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{retry:!0,changeAddress:!0});case c.LIVE_STREAM_ERROR_CODE.ERROR_FAIL_SEND_MESSAGE:if("UnpublishStream"===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return[2];if("UpdateTranscoding"===e.serverResponse.command||"ControlStream"===e.serverResponse.command)return[2,new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{code:e.code}).throw()];throw new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{retry:!0,changeAddress:!0});case c.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN:case c.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT:case c.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE:case c.LIVE_STREAM_ERROR_CODE.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH:return this.waitingResponseList.includes(i=e.serverResponse.url)||this.waitingResponseList.push(i),r=new h.AgoraRTCError(h.AgoraRTCErrorCode.LIVE_STREAMING_CDN_ERROR,"",{code:e.code}),this.emit(c.LiveStreamingUapSignalEvents.WARNING,r,i),[2,new Promise(function(e,t){o.once(i,function(){o.waitingResponseList.splice(o.waitingResponseList.indexOf(i),1),e()}),setTimeout(function(){o.waitingResponseList.splice(o.waitingResponseList.indexOf(i),1),t(r)},1e4)})]}return[2]})})},t.prototype.startPingPong=function(){var e=this;this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(function(){"connected"===e.websocket.state&&e.request("ping",{}).catch(function(){})},6e3)},t}(d.EventEmitter);t.AgoraLiveStreamingUapSignal=v},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(24),c=n(36),u=n(31),d=n(27),h=a(n(0)),p=function(e){function t(t){var n=e.call(this)||this;return n.connectionID=0,n.currentURLIndex=0,n.reconnectMode="tryNext",n._state="closed",n.retryConfig=u.DEFAULT_RETRY_CONFIG,n.reconnectCount=0,n.name=t,n}return r(t,e),Object.defineProperty(t.prototype,"url",{get:function(){return this.websocket?this.websocket.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){e!==this._state&&(this._state=e,"reconnecting"===this._state?this.emit
1(d.WebSocketManagerEvents.RECONNECTING,this.reconnectMode):"connected"===this._state?this.emit(d.WebSocketManagerEvents.CONNECTED):"closed"===this._state?this.emit(d.WebSocketManagerEvents.CLOSED):"failed"===this._state&&this.emit(d.WebSocketManagerEvents.FAILED))},enumerable:!0,configurable:!0}),t.prototype.init=function(e){var t=this;return new Promise(function(n,i){t.urls=e;var r=t.urls[t.currentURLIndex];t.state="connecting",t.createWebSocketConnection(r).then(n).catch(i),t.once(d.WebSocketManagerEvents.CLOSED,function(){return i(new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_DISCONNECT))}),t.once(d.WebSocketManagerEvents.CONNECTED,function(){return n()})})},t.prototype.close=function(e,t){if(this.currentURLIndex=0,this.reconnectCount=0,this.websocket){this.websocket.onclose=null,this.websocket.onopen=null,this.websocket.onmessage=null;var n=this.websocket;t?setTimeout(function(){return n.close()},500):n.close(),this.websocket=void 0}this.state=e?"failed":"closed"},t.prototype.reconnect=function(e){if(this.websocket){void 0!==e&&(this.reconnectMode=e);var t=this.websocket.onclose;this.websocket.onclose=null,this.websocket.close(),t&&t.bind(this.websocket)({code:9999})}else h.default.warning("["+this.name+"] can not reconnect, no websocket")},t.prototype.sendMessage=function(e){if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_ABORT,"websocket is not ready");var t=JSON.stringify(e);try{this.websocket.send(t)}catch(e){throw new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_ERR,"send websocket message error"+e.toString())}},t.prototype.createWebSocketConnection=function(e){return o(this,void 0,void 0,function(){var t,n=this;return s(this,function(i){return this.connectionID+=1,t=this.connectionID,[2,new Promise(function(i,r){n.websocket&&(n.websocket.onclose=null,n.websocket.close()),h.default.debug("["+n.name+"] start connect, url: "+e);try{n.websocket=new WebSocket(e),n.websocket.binaryType="arraybuffer"}catch(e){var a=new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_ERR,"init websocket failed! Error: "+e.toString());return h.default.error("["+n.name+"]"+a),void r(a)}u.wait(5e3).then(function(){t===n.connectionID&&n.websocket&&n.websocket.readyState!==WebSocket.OPEN&&n.websocket&&n.websocket.close()}),n.websocket.onopen=function(){h.default.debug("["+n.name+"] websockect opened:",e),n.reconnectMode="retry",n.state="connected",n.reconnectCount=0,i()},n.websocket.onclose=function(e){return o(n,void 0,void 0,function(){var t,n;return s(this,function(o){switch(o.label){case 0:return h.default.debug("["+this.name+"] websocket close "+(this.websocket&&this.websocket.url)+", code: "+e.code+", reason: "+e.reason+", current mode: "+this.reconnectMode),this.reconnectCount<this.retryConfig.maxRetryCount?("connected"===this.state&&(this.state="reconnecting"),t=c.emitAsInvokerNoResponse(this,d.WebSocketManagerEvents.WILL_RECONNECT,this.reconnectMode)||this.reconnectMode,[4,this.reconnectWithAction(t)]):[3,2];case 1:return n=o.sent(),"closed"===this.state?(h.default.debug("["+this.connectionID+"] ws is closed, no need to reconnect"),[2]):n?(i(),[3,3]):(r(new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_DISCONNECT,"websocket reconnect failed: "+e.code)),this.close(!0),[2]);case 2:r(new l.AgoraRTCError(l.AgoraRTCErrorCode.WS_DISCONNECT,"websocket close: "+e.code)),this.close(),o.label=3;case 3:return[2]}})})},n.websocket.onmessage=function(e){n.emit(d.WebSocketManagerEvents.ON_MESSAGE,e)}})]})})},t.prototype.reconnectWithAction=function(e,t){return o(this,void 0,void 0,function(){var n,i,r;return s(this,function(o){switch(o.label){case 0:return!t&&this.reconnectCount>=this.retryConfig.maxRetryCount?[2,!1]:this.urls?"closed"===this.state?[2,!1]:(n=u.getRetryWaitTime(this.reconnectCount,this.retryConfig),h.default.debug("["+this.name+"] wait "+n+"ms to reconnect websocket, mode: "+e),[4,u.wait(n)]):[2,!1];case 1:if(o.sent(),"closed"===this.state)return[2,!1];this.reconnectCount+=1,o.label=2;case 2:return o.trys.push([2,12,,14]),"retry"!==e?[3,4]:[4,this.createWebSocketConnection(this.urls[this.currentURLIndex])];case 3:return o.sent(),[3,11];case 4:return"tryNext"!==e?[3,8]:(this.currentURLIndex+=1,this.currentURLIndex>=this.urls.length?[4,this.reconnectWithAction("recover")]:[3,6]);case 5:return[2,o.sent()];case 6:return h.default.debug("["+this.name+"] websocket url length: "+this.urls.length+" current index: "+this.currentURLIndex),[4,this.createWebSocketConnection(this.urls[this.currentURLIndex])];case 7:return o.sent(),[3,11];case 8:return"recover"!==e?[3,11]:(h.default.debug("["+this.name+"] request new urls"),i=this,[4,c.emitAsPromise(this,d.WebSocketManagerEvents.REQUEST_NEW_URLS)]);case 9:return i.urls=o.sent(),this.currentURLIndex=0,[4,this.createWebSocketConnection(this.urls[this.currentURLIndex])];case 10:o.sent(),o.label=11;case 11:return[2,!0];case 12:return r=o.sent(),h.default.error("["+this.name+"] reconnect failed",r.toString()),[4,this.reconnectWithAction(e)];case 13:return[2,o.sent()];case 14:return[2]}})})},t}(c.EventEmitter);t.AgoraWebSocketManager=p},function(e,t,n){"use strict";var i=n(18),r=n(38),o=n(79),s=n(44);function a(e){var t=new o(e),n=r(o.prototype.request,t);return i.extend(n,o.prototype,t),i.extend(n,t),n}var l=a(n(41));l.Axios=o,l.create=function(e){return a(s(l.defaults,e))},l.Cancel=n(45),l.CancelToken=n(93),l.isCancel=n(40),l.all=function(e){return Promise.all(e)},l.spread=n(94),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var i=n(18),r=n(39),o=n(80),s=n(81),a=n(44);function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},e.method=(e=a(this.defaults,e)).method?e.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=a(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")}
vendor: 6,530 bytes, line 1
1,i.forEach(["delete","get","head","options"],function(e){l.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){l.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=l},function(e,t,n){"use strict";var i=n(18);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";var i=n(18),r=n(82),o=n(40),s=n(41);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return a(e),t.data=r(t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var i=n(18);e.exports=function(e,t,n){return i.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";var i=n(18);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},function(e,t,n){"use strict";var i=n(43);e.exports=function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var i=n(88),r=n(89);e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var i=n(18),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(i.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),n=i.trim(e.substr(o+1)),t){if(s[t]&&r.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var i=n(18);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var i=n(18);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(r)&&a.push("path="+r),i.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var i=n(45);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new i(e),t(n.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(0)),o=1,s=function(){function e(e){this.lockingPromise=Promise.resolve(),this.locks=0,this.name="",this.lockId=o++,e&&(this.name=e),r.default.debug("[lock-"+this.name+"-"+this.lockId+"] is created.")}return Object.defineProperty(e.prototype,"isLocked",{get:function(){return this.locks>0},enumerable:!0,configurable:!0}),e.prototype.lock=function(){var e,t=this;this.locks+=1,r.default.debug("[lock-"+this.name+"-"+this.lockId+"] is locked, current queue "+this.locks+".");var n=new Promise(function(n){e=function(){t.locks-=1,r.default.debug("[lock-"+t.name+"-"+t.lockId+"] is not locked, current queue "+t.locks+"."),n()}}),i=this.lockingPromise.then(function(){return e});return this.lockingPromise=this.lockingPromise.then(function(){return n}),i},e}();t.PromiseMutex=s},function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(0),o=n(1),s=n(8),a=n(5),l=function(){};l.prototype.set=function(e,t){["BatteryLevel"].indexOf(e)>-1&&(this[e]=t)};var c=new function(){var e=Object(s.b)();return e.states={UNINIT:"UNINIT",INITING:"INITING",INITED:"INITED"},e.state=e.states.UNINIT,e.batteryManager=null,e._init=function(t,n){e.state=e.states.INITING,navigator.getBattery?navigator.getBattery().then(function(n){e.batteryManager=n,t&&setTimeout(function(){t()},0)}).catch(function(e){r.default.debug("navigator.getBattery is disabled",e),t&&t()}):(e.state=e.states.INITED,t&&t())},e._getBatteryStats=function(){var t={};return t.BatteryLevel=e.batteryManager&&e.batteryManager.level?Math.floor(100*e.batteryManager.level):"UNSUPPORTED",t},e.getStats=function(t,n){var i=new l,r=e._getBatteryStats();r&&r.BatteryLevel&&i.set("BatteryLevel",r.BatteryLevel),t&&t(i)},e._init(),e},u=n(22),d=n(19),h=n(26),p=n(53),f=n(9),g=["live","rtc","web","interop","h264_interop","web-only"],m=["vp8","vp9","h264"],v=["aes-128-gcm","aes-256-gcm","aes-128-xts","aes-256-xts","aes-128-ecb","sm4-128-ecb","aes-256-gcm2","aes-128-gcm2"],y=n(11),b=n.n(y),_=n(7),S=n.n(_),w=n(13),E=n(4),T=n(10),C=n(20),I=n(6),R=n(14),D={1001:"FRAMERATE_INPUT_TOO_LOW",1002:"FRAMERATE_SENT_TOO_LOW",1003:"SEND_VIDEO_BITRATE_TOO_LOW",1005:"RECV_VIDEO_DECODE_FAILED",2001:"AUDIO_INPUT_LEVEL_TOO_LOW",2002:"AUDIO_OUTPUT_LEVEL_TOO_LOW",2003:"SEND_AUDIO_BITRATE_TOO_LOW",2005:"RECV_AUDIO_DECODE_FAILED",3001:"FRAMERATE_INPUT_TOO_LOW_RECOVER",3002:"FRAMERATE_SENT_TOO_LOW_RECOVER",3003:"SEND_VIDEO_BITRATE_TOO_LOW_RECOVER",3005:"RECV_VIDEO_DECODE_FAILED_RECOVER",4001:"AUDIO_INPUT_LEVEL_TOO_LOW_RECOVER",4002:"AUDIO_OUTPUT_LEVEL_TOO_LOW_RECOVER",4003:"SEND_AUDIO_BITRATE_TOO_LOW_RECOVER",4005:"RECV_AUDIO_DECODE_FAILED_RECOVER"},A={FramerateInput:1001,FramerateSent:1002,SendVideoBitrate:1003,VideoDecode:1005,AudioIntputLevel:2001,AudioOutputLevel:2002,SendAudioBitrate:2003,AudioDecode:2005};function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var O,x=n(3),N=new function(){var e=Object(s.b)();return e.states={UNINIT:"UNINIT",INITING:"INITING",INITED:"INITED"},e.state=e.states.UNINIT,e.type=null,e.lastConnectedAt=null,e.lastDisconnectedAt=null,e.lastTypeChangedAt=null,e.networkChangeTimer=null,e._init=function(t,n){if(e.state=e.states.INITING,navigator.connection&&navigator.connection.addEventListener){var i=e._getNetworkInfo();e.type=i&&i.type,e.state=e.states.INITED,t&&t()}else e.state=e.states.UNINIT,n&&n("DO_NOT_SUPPORT")},e._getNetworkInfo=function(){return navigator.connection},e._reloadNetworkInfo=function(){var t=e._getNetworkInfo(),n=t&&t.type||"UNSUPPORTED",i=Date.now();n!==e.type&&(e.lastTypeChangedAt=i,"none"==n?e.lastDisconnectedAt=i:"none"==e.type&&(e.lastConnectedAt=i),e.type=n,e.dispatchEvent({type:"networkTypeChanged",networkType:n}))},e.getStats=function(t,n){var i={},r=e._getNetworkInfo();r&&(i.NetworkType=r.type||"UNSUPPORTED"),setTimeout(function(){t(i)},0)},e._init(function(){navigator.connection.addEventListener("change",function(){e._reloadNetworkInfo()}),e.networkChangeTimer=setInterval(function(){e._reloadNetworkInfo()},5e3)},function(e){}),e},P=n(55),M=n(16),L=n(56),j=n.n(L),F=n(21),U=function(){return void 0!==window.isSecureContext},H="host",B=d.a.getDevices,V=h.a.getScreenSources,W=JSON.parse(JSON.stringify(i.SUPPORT_RESOLUTION_LIST));t.default={TranscodingUser:{uid:0,x:0,y:0,width:0,height:0,zOrder:0,alpha:1},LiveTranscoding:{width:640,height:360,videoBitrate:400,videoFramerate:15,lowLatency:!1,audioSampleRate:48e3,audio
1Bitrate:48,audioChannels:1,videoGop:30,videoCodecProfile:100,userCount:0,userConfigExtraInfo:{},backgroundColor:0,transcodingUsers:[]},createClient:function(e){var t=o.report.reportApiInvoke(null,{name:"createClient",options:arguments,tag:"tracer"});(e=S()({},e||{})).codec||(e.codec=function(e){switch(e){case"h264_interop":return"h264";default:return"vp8"}}(e.mode));var n=function(e){return-1===g.indexOf(e.mode)?E.default.INVALID_CLIENT_MODE:-1===m.indexOf(e.codec)?E.default.INVALID_CLIENT_CODEC:"h264_interop"==e.mode&&"h264"!==e.codec&&E.default.CLIENT_MODE_CODEC_MISMATCH}(e);if(n)throw r.default.error("Invalid parameter setting MODE: ".concat(e.mode," CODEC: ").concat(e.codec," ERROR ").concat(n)),t(n),new Error(n);return r.default.info("Creating client, MODE: ".concat(e.mode," CODEC: ").concat(e.codec)),function(e){switch(e.mode){case"interop":case"h264_interop":e.mode="live";break;case"web-only":e.mode="rtc"}}(e),t(null,e),function(e){var t={key:void 0,highStream:null,lowStream:null,lowStreamParameter:null,isDualStream:!1,highStreamState:2,lowStreamState:2,proxyServer:null,turnServers:[],useProxyServer:!1,useLocalAccessPoint:!1};if(t.mode=e.mode,t.codec=e.codec,t.clientId=Object(T.generateSessionId)().slice(0,5),t.uintUid=null,t.customReportCount=0,e=S()({},e),t.aespassword=null,t.aesmode="none",t.hasPublished=!1,t.getSessionId=function(){return e.sessionId},t.startChannelMediaRelay=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{callback:function(e){if(e)return i&&i(e);i&&i()},name:"Client.startChannelMediaRelay",options:arguments,tag:"tracer"});if(!(n instanceof f.ChannelMediaRelayConfiguration))throw"Configration should be instance of [ChannelMediaRelayConfiguration]";var s=n.getSrcChannelMediaInfo(),a=n.getDestChannelMediaInfos();if(Object(x.isEmpty)(s))throw"srcChannelMediaInfo should not be empty";if(Object(x.isEmpty)(a)||0===a.length)throw"destChannelMediaInfos should not be empty";if(!Object(T.is32Uint)(s.uid))throw"Invalid uid in srcChannelMediaInfo";if(!Object(x.isValidChannelName)(s.channelName))throw"Invalid channelName in srcChannelMediaInfo";if(s.token&&!Object(x.isValidToken)(s.token))throw"Invalid token in srcChannelMediaInfo";if(a.forEach(function(e){if(!Object(T.is32Uint)(e.uid))throw"Invalid uid in destChannelMediaInfo";if(!Object(x.isValidChannelName)(e.channelName))throw"Invalid channelName in destChannelMediaInfo";if(e.token&&!Object(x.isValidToken)(e.token))throw"Invalid token in destChannelMediaInfo"}),t.gatewayClient.state!==w.a.CONNECTED)throw"startChannelMediaRelay should be used after join";t.gatewayClient.startChannelMediaRelay(n).then(function(){r&&r()}).catch(function(e){r&&r(e)})},t.updateChannelMediaRelay=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{callback:function(e){if(e)return i&&i(e);i&&i()},name:"Client.updateChannelMediaRelay",options:arguments,tag:"tracer"});if(!(n instanceof f.ChannelMediaRelayConfiguration))throw"Configration should be instance of [ChannelMediaRelayConfiguration]";var s=n.getSrcChannelMediaInfo(),a=n.getDestChannelMediaInfos();if(Object(x.isEmpty)(s))throw"srcChannelMediaInfo should not be empty";if(Object(x.isEmpty)(a)||0===a.length)throw"destChannelMediaInfos should not be empty";if(!Object(T.is32Uint)(s.uid))throw"Invalid uid in srcChannelMediaInfo";if(!Object(x.isValidChannelName)(s.channelName))throw"Invalid channelName in srcChannelMediaInfo";if(s.token&&!Object(x.isValidToken)(s.token))throw"Invalid token in srcChannelMediaInfo";if(a.forEach(function(e){if(!Object(T.is32Uint)(e.uid))throw"Invalid uid in destChannelMediaInfo";if(!Object(x.isValidChannelName)(e.channelName))throw"Invalid channelName in destChannelMediaInfo";if(e.token&&!Object(x.isValidToken)(e.token))throw"Invalid token in destChannelMediaInfo"}),t.gatewayClient.state!==w.a.CONNECTED)throw"updateChannelMediaRelay should be used after join";t.gatewayClient.updateChannelMediaRelay(n).then(function(){r&&r()}).catch(function(e){r&&r(e)})},t.stopChannelMediaRelay=function(n){var i=o.report.reportApiInvoke(e.sessionId,{callback:function(e){if(e)return n&&n(e);n&&n()},name:"Client.stopChannelMediaRelay",options:arguments,tag:"tracer"});t.gatewayClient.stopChannelMediaRelay().then(function(){i&&i()}).catch(function(e){i&&i(e)})},t.getConnectionState=function(){var n=o.report.reportApiInvoke(e.sessionId,{name:"Client.getConnectionState",options:arguments,tag:"tracer"}),i=w.a.connetionStateMap[t.gatewayClient.state];return n(),i},t.setClientRole=function(n,i){var s=o.report.reportApiInvoke(e.sessionId,{
1callback:i,name:"Client.setClientRole",options:arguments,tag:"tracer"});if(Object(x.checkValidEnum)(n,"setClientRole",[H,"audience"]),"rtc"===t.mode){var a="RTC mode can not use setClientRole";return r.default.warning("[".concat(t.clientId,"] ").concat(a)),s&&s(a)}t.gatewayClient&&t.gatewayClient.state===w.a.CONNECTED?("audience"===n&&(0===this.highStreamState?this._unpublish(this.highStream,function(){s&&s(null,{role:n})},function(e){s&&s(e)}):t.gatewayClient.setClientRole("audience",s)),n===H&&t.gatewayClient.setClientRole(H,s)):(t.gatewayClient.role=n,s&&s(null,{role:n}))},t.getGatewayInfo=function(e){if(t.gatewayClient.state!==w.a.CONNECTED){var n="Client is not in connected state";return r.default.error("[".concat(t.clientId,"] ").concat(n)),void e(n)}t.gatewayClient.getGatewayInfo(function(t){e(null,t)},e)},t.renewToken=function(n,i,s){var a=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return r.default.error("Failed to renew token ".concat(e),t),s&&s(e);i&&i(t)},name:"Client.renewToken",options:arguments,tag:"tracer"});if(!Object(x.isValidToken)(n))throw new Error("Invalid token: Token is of the string type .Length of the string: [1,255]. ASCII characters only.");return t.gatewayClient?t.key?(t.key=n,void t.gatewayClient.renewToken(n,function(e){return a(null,e)},a)):(r.default.error("[".concat(t.clientId,"] renewToken should not be called before user join")),a(E.default.INVALID_OPERATION)):(r.default.error("[".concat(t.clientId,"] renewToken Failed. GatewayClient not Exist")),a(E.default.INVALID_OPERATION))},t.setLowStreamParameter=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.setLowStreamParameter",options:arguments,tag:"tracer"});Object(x.checkValidObject)(n,"param");var s=n.width,a=n.height,l=n.framerate,c=n.bitrate;Object(x.isEmpty)(s)||Object(x.checkValidNumber)(s,"width"),Object(x.isEmpty)(a)||Object(x.checkValidNumber)(a,"height"),Object(x.isEmpty)(l)||Object(x.checkValidNumber)(l,"framerate"),Object(x.isEmpty)(c)||Object(x.checkValidNumber)(c,"bitrate",1,1e7),(!s&&a||s&&!a)&&r.default.warning("[".concat(t.clientId,"] The width and height parameters take effect only when both are set")),t.lowStreamParameter=n,i()},t.init=function(t,n,i){var r=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return i&&i(e);n&&n(t)},name:"Client.init",options:arguments,tag:"tracer"});Object(x.checkValidString)(t),Object(a.isChromeKernel)()&&Object(a.getChromeKernelVersion)()<=48?i?r(E.default.BAD_ENVIRONMENT):Object(T.popBanTip)():(e.appId=t,e.sessionId=Object(T.generateSessionId)(),r())},t.setTurnServer=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.setTurnServer",options:arguments,tag:"tracer"});if(t.gatewayClient&&t.gatewayClient.state!==w.a.DISCONNECTED)throw new Error("Set turn server before join channel");if(t.useProxyServer)throw new Error("You have already set the proxy");if(t.useLocalAccessPoint)throw new Error("You have already set the local proxy");n instanceof Array||(n=[n]);var s=[];n.map(function(e,n){Object(x.checkValidObject)(e,"turnServer");var i=e.turnServerURL,o=e.username,a=e.password,l=e.udpport,c=e.forceturn,u=e.tcpport;if(Object(x.checkValidString)(i,"turnServerURL"),Object(x.checkValidString)(o,"username"),Object(x.checkValidString)(a,"password"),Object(x.checkValidString)(l,"udpport"),0===parseInt(l))throw new Error("udpport should not be ".concat(l));Object(x.isEmpty)(c)||Object(x.checkValidBoolean)(c,"forceturn");var d={mode:"manual"};if(d.url=i,d.udpport=l,d.username=o,d.credential=a,d.forceturn=c||!1,!Object(x.isEmpty)(u)){if(Object(x.checkValidString)(u,"tcpport"),0===parseInt(u))throw new Error("tcpport should not be ".concat(u));d.tcpport=u,r.default.info("[".concat(t.clientId,"] Set turnserver[").concat(n,"] tcpurl. ").concat(d.url,":").concat(d.tcpport))}r.default.info("[".concat(t.clientId,"] Set turnserver[").concat(n,"] udpurl. ").concat(d.url,":").concat(d.udpport,",username: ").concat(d.username)),s.push(d)}),t.turnServers=s,i()},t.setProxyServer=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.setProxyServer",options:arguments,tag:"tracer"});if(t.gatewayClient&&t.gatewayClient.state!==w.a.DISCONNECTED)throw new Error("Set proxy server before join channel");
1if(!n)throw new Error("Do not set the proxyServer parameter as empty");if(t.useProxyServer)throw new Error("You have already set the proxy");if(t.useLocalAccessPoint)throw new Error("You have already set the local proxy");Object(x.checkValidString)(n,"proxyServer"),t.proxyServer=n,o.report.setProxyServer(n),r.default.setProxyServer(n),i()},t.startProxyServer=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.startProxyServer",options:arguments,tag:"tracer"});if(t.gatewayClient&&t.gatewayClient.state!==w.a.DISCONNECTED)throw new Error("Start proxy server before join channel");if(t.proxyServer)throw new Error("You have already set the proxy");if(t.useLocalAccessPoint)throw new Error("You have already set the local proxy");t.useProxyServer=!0,t.proxyServerType=n||1,i()},t.stopProxyServer=function(){var n=o.report.reportApiInvoke(e.sessionId,{name:"Client.stopProxyServer",options:arguments,tag:"tracer"});if(t.gatewayClient&&t.gatewayClient.state!==w.a.DISCONNECTED)throw new Error("Stop proxy server after leave channel");o.report.setProxyServer(),r.default.setProxyServer(),t.turnServers=[],t.proxyServer=null,t.useProxyServer=!1,t.proxyServerType=null,n()},t.setEncryptionSecret=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.setEncryptionSecret",options:arguments,tag:"tracer"});Object(x.checkValidString)(n,"password"),new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})").test(n)||console.warn("The secret is not strong:\n      The secret must contain at least 1 lowercase alphabetical character,\n      The secret must contain at least 1 uppercase alphabetical character,\n      The secret must contain at least 1 numeric character,\n      The secret must contain at least one special character,\n      The secret must be eight characters or longer,\n      "),t.aespassword=n,i()},t.setEncryptionMode=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{name:"Client.setEncryptionMode",options:arguments,tag:"tracer"});if(Object(x.checkValidString)(n,"encryptionMode"),-1===v.indexOf(n))throw new Error('Invalid encryptionMode: encryptionMode should be "aes-128-xts" | "aes-256-xts" | "aes-128-ecb" | "sm4-128-ecb" | "aes-128-gcm" | "aes-256-gcm" | "aes-128-gcm2" | "aes-256-gcm2"');if(-1!==["aes-128-gcm2","aes-256-gcm2"].indexOf(n)){if(!i||!(i instanceof Uint8Array&&32===i.length))throw Error("salt must be an Uint8Array and exactly equal to 32 bytes")}else if(i)throw new Error("Only ".concat("aes-128-gcm2"," and ").concat("aes-256-gcm2"," support use salt"));i&&(t.aesSalt=Object(T.uint8ArrayToBase64)(i)),t.aesmode=n,r()},t.configPublisher=function(n){var i=o.report.reportApiInvoke(e.sessionId,{name:"Client.configPublisher",options:arguments,tag:"tracer"});Object(x.checkValidObject)(n,"config");var r=n.width,s=n.height,a=n.framerate,l=n.bitrate,c=n.publisherUrl;Object(x.checkValidNumber)(r,"width"),Object(x.checkValidNumber)(s,"height"),Object(x.checkValidNumber)(a,"framerate"),Object(x.checkValidNumber)(l,"bitrate",1,1e7),c&&Object(x.checkValidString)(c,"publisherUrl"),t.gatewayClient.configPublisher(n),i()},t.enableDualStream=function(n,i){var s=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return i&&i(e);n&&n(t)},name:"Client.enableDualStream",options:arguments,tag:"tracer"});return"iOS"===Object(a.getBrowserOS)()?(o.report.streamSwitch(e.sessionId,{lts:(new Date).getTime(),isdual:!0,succ:!1}),s(E.default.IOS_NOT_SUPPORT)):Object(a.isWeChatBrowser)()?(o.report.streamSwitch(e.sessionId,{lts:(new Date).getTime(),isdual:!0,succ:!1}),s(E.default.WECHAT_NOT_SUPPORT)):(o.report.streamSwitch(e.sessionId,{lts:(new Date).getTime(),isdual:!0,succ:!0}),t.isDualStream=!0,t.highStream&&(t.highStream.isDualStream=!0),void(0===t.highStreamState?t._publishLowStream(function(e){return s(null,e)},function(e){r.default.warning("[".concat(t.clientId,"]"),e),s(E.default.ENABLE_DUALSTREAM_FAILED)}):s(1===t.highStreamState?E.default.STILL_ON_PUBLISHING:null)))},t.disableDualStream=function(n,i){var s=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return i&&i(e);n&&n(t)},name:"Client.disableDualStream",options:arguments,tag:"tracer"});o.report.streamSwitch(e.sessionId,{lts:(new Date).getTime(),isdual:!1,succ:!0}),t.isDualStream=!1,t.highStream&&(t.highStream.isDualStream=!1),0===t.highStreamState?t._unpublishLowStream(function(){t.highStream.lowStream
1=null,s()},function(e){r.default.warning("[".concat(t.clientId,"]"),e),s(E.default.DISABLE_DUALSTREAM_FAILED)}):1===t.highStreamState?s(E.default.STILL_ON_PUBLISHING):s()},t._getLowStream=function(e,n){t.lowStream?e(t.lowStream):t._createLowStream(function(n){t.lowStream=n,e(t.lowStream)},n)},t._createLowStream=function(e,n){if(t.highStream&&t.highStream.stream){var i=S()({},t.highStream.params);if(i.streamID+=1,i.audio=!1,i.video)if(t.highStream.stream.getVideoTracks()[0]){var r=new u.a(i);r.isLowStream=!0,r.streamId=t.highStream.getId()+1;var o={};t.lowStreamParameter&&(o=S()({},t.lowStreamParameter)),o.width&&o.height||(o.width=160,o.height=120),o.framerate=o.framerate||15,o.bitrate=o.bitrate||50,r.setVideoProfileCustomPlus(o);try{var s=j()(t.highStream,{width:r.videoConstraint.width.ideal,height:r.videoConstraint.height.ideal,framerate:r.videoConstraint.frameRate});return r.stream=s,t.highStream.lowStream=r,t.highStream.userMuteVideo&&r.muteVideo(),e&&e(r)}catch(e){return n&&n(e)}}else n&&n(E.default.HIGH_STREAM_NOT_VIDEO_TRACE);else n&&n(E.default.HIGH_STREAM_NOT_VIDEO_TRACE)}else n&&n(E.default.HIGH_STREAM_NOT_VIDEO_TRACE)},t._publishLowStream=function(e,n){return 2!==t.lowStreamState?n&&n(E.default.LOW_STREAM_ALREADY_PUBLISHED):t.highStream&&t.highStream.hasScreen()?n&&n(E.default.SHARING_SCREEN_NOT_SUPPORT):void t._getLowStream(function(i){t.lowStreamState=1,t.gatewayClient.publish(i,{streamType:1},function(){t.lowStreamState=0,e&&e()},function(e){1===t.lowStreamState&&(t.lowStreamState=2),r.default.debug("[".concat(t.clientId,"] publish low stream failed")),n&&n(e)})},n)},t._unpublishLowStream=function(e,n){if(0!==t.lowStreamState)return n&&n(E.default.LOW_STREAM_NOT_YET_PUBLISHED);t.lowStream&&(t.gatewayClient.unpublish(t.lowStream,{streamType:1},function(){},function(e){r.default.debug("[".concat(t.clientId,"] unpublish low stream failed")),n&&n(e)}),t.lowStream.close(),t.lowStream=null,t.lowStreamState=2,e&&e())},t.join=function(n,i,s,a,l,c){a&&"function"==typeof a&&(c=l,l=a,a=null);var u="HTTPS"===(O||O||(O=(window.location.protocol.split(":")[0]||"").toUpperCase())),d=U()?window.isSecureContext:"Browser Not Support",h=function(){r.default.warning("The website must be running in a secure context (About secure context: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts ), otherwise the media collection will be restricted by the browser")};U()?window.isSecureContext||h():u||h();var p=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return c&&c(e);l&&l(t)},name:"Client.join",options:arguments,getStates:function(){return{isHttps:u,isSecureContext:d}},tag:"tracer"});if(n&&!Object(x.isValidToken)(n))return r.default.warning("[".concat(t.clientId,"] Param channelKey should be string")),p(E.default.INVALID_PARAMETER);if(!Object(x.isValidChannelName)(i))return r.default.error("Invalid Channel Name ".concat(i)),r.default.warning("[".concat(t.clientId,"] The length must be within 64 bytes. The supported characters: a-z,A-Z,0-9,space,!, #, $, %, &, (, ), +, -, :, ;, <, =, ., >, ?, @, [, ], ^, _,  {, }, |, ~, ,")),p(E.default.INVALID_PARAMETER);if("string"==typeof i&&""===i)return r.default.warning("[".concat(t.clientId,"] Param channel should not be empty")),p(E.default.INVALID_PARAMETER);if(a&&!Object(x.isValidString)(a))return r.default.warning("[".concat(t.clientId,"] optionalInfo should be string")),p(E.default.INVALID_PARAMETER);if(s&&!Object(T.is32Uint)(s)&&!Object(x.isValidString)(s,1,255))return r.default.error("Invalid UID ".concat(s," ").concat(b()(s))),r.default.warning("[".concat(t.clientId,"] [String uid] Length of the string: [1,255]. ASCII characters only. [Number uid] The value range is 32Uint")),p(E.default.INVALID_PARAMETER);if("string"==typeof s&&0==s.length)return r.default.warning("[".concat(t.clientId,"] String uid should not be empty")),p(E.default.INVALID_PARAMETER);if("string"==typeof s&&s.length>256)return r.default.warning("[".concat(t.clientId,"] Length of string uid should be less than 255")),p(E.default.INVALID_PARAMETER);
1r.default.stopWaitJoin(),t.highStream=null,t.lowStream=null,t.lowStreamParameter=null,t.isDualStream=!1,t.highStreamState=2,t.lowStreamState=2;var f=Date.now(),g=setTimeout(function(){if(1!=t.gatewayClient.hasJoined){r.default.debug("[".concat(t.clientId,"] The time to join the channel is greater than 5 seconds "));var n=Date.now();o.report.joinChannelTimeOut({lts:n,sid:e.sessionId,cname:i,cid:m&&m.cid,uid:m.uid||("string"==typeof s?void 0:s),elapse:n-f,timeout:5})}},5e3),m={clientId:t.clientId,appId:e.appId,sid:e.sessionId,cname:i,uid:s,turnServers:t.turnServers.concat(),proxyServer:t.proxyServer,token:n||e.appId,useProxyServer:t.useProxyServer,useLocalAccessPoint:t.useLocalAccessPoint,proxyServerType:t.proxyServerType,optionalInfo:a};if("string"==typeof s&&(m.stringUid=s,t.uintUid?(m.uid=t.uintUid,delete t.uintUid):m.uid=0),t.aespassword&&"none"!==t.aesmode&&S()(m,{aespassword:t.aespassword,aesmode:t.aesmode}),t.aesSalt&&(m.aes_salt=t.aesSalt),o.report.sessionInit(e.sessionId,{lts:(new Date).getTime(),cname:i,appid:e.appId,mode:e.mode,succ:!0}),t.onSuccess=function(e){clearTimeout(g),t.rtcStatsCollector.startNetworkQualityTimer(),t.onSuccess=null,p(null,e)},t.onFailure=function(e){return p(e)},t.channel=i,t.gatewayClient.state!==w.a.DISCONNECTED)return r.default.error("[".concat(t.clientId,"] Client already in connecting/connected state")),p(E.default.INVALID_OPERATION),void o.report.joinGateway(e.sessionId,{lts:Date.now(),succ:!1,ec:E.default.INVALID_OPERATION,addr:null});t.gatewayClient.state=w.a.CONNECTING;var v=function(o,s){r.default.info("[".concat(t.clientId,"] Joining channel: ").concat(i)),t.gatewayClient.dispatchEvent({type:"config-distribute",config:s,joinInfo:m}),t.key=n||e.appId,m.cid=o.cid,m.uid||(m.uid=o.uid),m.vid=o.vid,m.clientId=t.clientId,m.apResponse=o.res,o.uni_lbs_ip&&o.uni_lbs_ip[1]&&(m.uni_lbs_ip=o.uni_lbs_ip[1]),m.gatewayAddr=o.gateway_addr,t.joinInfo=m,t.gatewayClient.join(m,t.key,function(e){r.default.info("[".concat(t.clientId,"] Join channel ").concat(i," success, join with uid: ").concat(e,".")),t.onSuccess=null,t.rtcStatsCollector.startNetworkQualityTimer(),p(null,e)},function(e){return p(e)})};m.stringUid&&!m.uid?(t.userAccountReq&&!t.userAccountReq.isFinished()&&t.userAccountReq.cancel(),t.userAccountReq=Object(C.getUserAccount)(m,t.gatewayClient),t.userAccountReq.then(function(e){r.default.debug("getUserAccount Success ".concat(e.url," ").concat(m.stringUid," => ").concat(e.uid)),m.uid=e.uid,Object(C.getGatewayList)(m,v,function(e){return p(e)})}).catch(function(e){r.default.error("getUserAccount rejected",e),p(e)})):Object(C.getGatewayList)(m,v,function(e){return p(e)})},t.renewChannelKey=function(n,i,s){var a=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return s&&s(e);i&&i(t)},name:"Client.renewChannelKey",options:arguments,tag:"tracer"});Object(x.checkValidString)(n,"key",1,2047),void 0===t.key?(r.default.error("[".concat(t.clientId,"] renewChannelKey should not be called before user join")),a(E.default.INVALID_OPERATION)):(t.key=n,t.gatewayClient.joinInfo.token=n,t.gatewayClient.key=n,t.gatewayClient.recover(),a())},t.leave=function(n,s){t.gatewayClient.isFirstSuccess=!0,t.gatewayClient.hasInvokeLeave=!0;var a=!1,l=o.report.reportApiInvoke(e.sessionId,{callback:function(e,i){if(e)return s&&s(e);t.gatewayClient.reconnectingCS=!1,t.gatewayClient.state=w.a.DISCONNECTED,clearTimeout(Object(C._getReconnectCSTimer)(t.clientId)),t._renewSession(),t.rtcStatsCollector.clearNetworkQualityTimer(),n&&n(i)},name:"Client.leave",options:arguments,tag:"tracer"});r.default.info("[".concat(t.clientId,"] Leaving channel")),t.userAccountReq&&!t.userAccountReq.isFinished()&&(t.userAccountReq.cancel(),t.gatewayClient.state===w.a.CONNECTING&&(t.gatewayClient.state=w.a.DISCONNECTED)),t._terminateLiveStreaming(),t.gatewayClient.leave(function(e){a=!0,l(null,e)},l),setTimeout(function(){a||(t.gatewayClient.socket&&(t.gatewayClient.socket.close(),t.gatewayClient.socket=null),t.gatewayClient.state=w.a.DISCONNECTED,l(null,"LEAVE_MSG_TIMEOUT"))},Object(i.getParameter)("LEAVE_MSG_TIMEOUT"))},t._renewSession=function(){var n=Object(T.generateSessionId)();if(r.default.debug("renewSession ".concat(e.sessionId," => ").concat(n)),e.sessionId=n,t.gatewayClient.peerPublishDurationMap.clear(),t.joinInfo&&(t.joinInfo.sid=n),t.gatewayClient&&(t.gatewayClient.joinInfo&&(t.gatewayClient.joinInfo.sid=n),t.gatewayClient.localStreams))for(var i in t.gatewayClient.localStreams){var o=t.gatewayClient.localStreams[i];o&&(o.sid=n)}},t._publish=function(n,o,s,a){if(2!==t.highStreamState)return r.default.warning("[".concat(t.clientId,"] Can't publish stream when stream already publish ").concat(n.getId())),s&&s(E.default.STREAM_ALREADY_PUBLISHED);if(0===t.turnServers.length&&Object(i.getParameter)("FORCE_TURN")&&!Object(i.getParameter)("TURN_ENABLE_TCP")&&!Object(i.getParameter)("TURN_ENABLE_UDP"))throw new Error("force TURN With No TURN Configuration");r.default.info("[".concat(t.clientId,"] Publishing stream, uid ").concat(n.getId())),t.highStream
1=n,t.highStreamState=1,t.highStream.streamId=t.joinInfo.stringUid||t.joinInfo.uid,t.hasPublished=!1;var l=function(n,i,o){t.gatewayClient.publish(n,{streamType:0},function(){n.sid=e.sessionId,t.highStreamState=0,r.default.info("[".concat(t.clientId,"] Publish success, uid: ").concat(n.getId())),t.highStream&&(t.highStream.isDualStream=t.isDualStream),t.isDualStream?t._publishLowStream(function(){i&&i()},function(e){r.default.warning("[".concat(t.clientId,"] "),e),M.a.replaceWithCanvasTrack(n).then(function(){i&&i()})}):M.a.replaceWithCanvasTrack(n).then(function(){i&&i()})},o)};"audience"!==t.gatewayClient.role||"live"!==t.mode||a?l(n,o,s):t.gatewayClient.setClientRole(H,function(e){if(e)return s&&s(e);l(n,o,s)})},t._unpublish=function(e,n,i,o){if(0!==t.highStreamState)return r.default.warning("[".concat(t.clientId,"] Can't unpublish stream when stream not publish")),i&&i(E.default.STREAM_NOT_YET_PUBLISHED);r.default.info("[".concat(t.clientId,"] Unpublish stream, uid ").concat(e.getId()));var s=function(e,n,i){t.isDualStream&&t.lowStream&&t._unpublishLowStream(null,i),t.gatewayClient.unpublish(e,{streamType:0},function(){t.highStreamState=2,r.default.info("[".concat(t.clientId,"] Unpublish stream success, uid: ").concat(e.getId())),t.gatewayClient.dispatchEvent({type:"stream-unpublished",stream:e}),n&&n()},function(n){r.default.info("[".concat(t.clientId,"] Unpublish stream fail, uid: ").concat(e.getId())),i&&i(n)})};t.gatewayClient.role!==H||"live"!==t.mode||o?s(e,n,i):t.gatewayClient.setClientRole("audience",function(t){if(t)return i&&i(t);s(e,n,i)})},t.publish=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{callback:function(e,n){if(e)return 1===t.highStreamState&&"REQUEST_ABORT"!==e&&(t.highStreamState=2),i&&i(e)},name:"Client.publish",tag:"tracer",options:{stream:"too long to show",onFailure:!!i}});2===t.highStreamState?n._hasVideoTracks()||n._hasAudioTracks()?(t.gatewayClient.publishRequestId=Object(T.generateId)(),t._publish(n,function(e){return r(null,e)},function(e){return r(e)})):r(E.default.NO_TRACK_IN_STREAM):r(E.default.STREAM_ALREADY_PUBLISHED)},t.unpublish=function(n,i,r){var s=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return i&&i(e);r&&r(t)},name:"Client.unpublish",tag:"tracer",options:{stream:"too long to show",onFailure:!!i}});0===t.highStreamState?(t.gatewayClient.publishRequestId=null,t._unpublish(n,function(e){return s(null,e)},function(e){return s(e)})):s(E.default.STREAM_NOT_YET_PUBLISHED)},t.subscribe=function(n,i,s){var l=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return s&&s(e)},name:"Client.subscribe",tag:"tracer",options:{stream:"too long to show",options:i,onFailure:!!s}});"function"==typeof i&&(s=i,i=null),Object(x.checkValidObject)(n,"stream"),Object(x.isEmpty)(i)||(Object(x.checkValidObject)(i,"options"),Object(x.isEmpty)(i.video)||Object(x.checkValidBoolean)(i.video,"options.video"),Object(x.isEmpty)(i.audio)||Object(x.checkValidBoolean)(i.audio,"options.audio"));var c={video:!0,audio:!0};if(!Object(x.isEmpty)(i)){if(Object(a.isSafari)()&&(!i.video||!i.audio)){var u="SAFARI_NOT_SUPPORTED_FOR_TRACK_SUBSCRIPTION";return r.default.error("[".concat(t.clientId,"] "),u),void l(u)}if(!Object(x.isEmpty)(i.video)&&!Object(x.isValidBoolean)(i.video)||!Object(x.isEmpty)(i.audio)&&!Object(x.isValidBoolean)(i.audio)||!1===i.audio&&!1===i.video)return u="INVALID_PARAMETER ".concat(JSON.stringify(i)),r.default.error("[".concat(t.clientId,"] "),u),void l(u)}n.subscribeOptions?(S()(n.subscribeOptions,c,i),t.gatewayClient.subscribeChange(n,function(e){return l(null,e)},l)):(t.gatewayClient.subscribeRequestId.set(n.getId(),Object(T.generateId)()),n.subscribeOptions=S()({},c,i),t.gatewayClient.subscribe(n,function(e){return l(null,e)},l))},t.unsubscribe=function(n,i){var s=o.report.reportApiInvoke(e.sessionId,{callback:function(e,t){if(e)return i&&i(e)},name:"Client.unsubscribe",tag:"tracer",options:{stream:"too long to show",onFailure:!!i}});r.default.info("[".concat(t.clientId,"] Unsubscribe stream, uid: ").concat(n.getId())),t.gatewayClient.subscribeRequestId.delete(n.getId()),t.gatewayClient.unsubscribe(n,function(e){return s(null,e)},s)},t.setRemoteVideoStreamType=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{name:"Client.setRemoteVideoStreamType",tag:"tracer",options:{stream:"too long to show",streamType:i}});Object(x.checkValidEnum)(i,"streamType",[0,1]),t.gatewayClient.setRemoteVideoStreamType(n,i),r()},t.setStreamFallbackOption=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{name:"Client.setStreamFallbackOption",tag:"tracer",options:{stream:"too long to show",fallbackType:i}});Object(x.checkValidEnum)(i,"fallbackType",[0,1,2]),t.gatewayClient.setStreamFallbackOption(n,i),r()},t.enableAudioVolumeIndicator=function(n,i){var s=o.report.reportApiInvoke(e.sessionId,{name:"Client.enableAudioVolumeIndicator",options:arguments,tag:"tracer"});n=n||2e3,i=i||3,Object(x.checkValidNumber)(i,"smooth",1,100),Object(x.checkValidNumber)(n,"interval",50,1e5),t.audioVolumeIndication=t.audioVolumeIndication||{enabled:!0},t.audioVolumeIndication.interval=n,t.audioVolumeIndication.smooth=i,t.audioVolumeIndication={interval:n,smooth:i},r.default.info("[".concat(t.clientId,"] enableAudioVolumeIndicator interval ").concat(n," smooth ").concat(i)),t.gatewayClient.enableAudioVolumeIndicator(n,i),s()},t.getNetworkStats=function(e,n){return r.default.deprecate("[".concat(t.clientId,"] client.getNetworkStats is deprecated. Use client.getTransportStats instead.")),N.getStats(e,n)},t.getSystemStats=function(e,t){return c.getStats(e,t)},t.getRecordingDevices=function(e,t){return d.a.getRecordingDevices(e,t)},t.getPlayoutDevices=function(e,t){return d.a.getPlayoutDevices(e,t)},t.getCameras=function(e,t){return d.a.getCameras(e,t)},t.getRemoteAudioStats=function(e,n){return t.rtcStatsCollector.getRemoteAudioStats(e,n)},t.getLocalAudioStats=function(e,n){return t.rtcStatsCollector.getLocalAudioStats(e,n)},t.getRemoteVideoStats=function(e,n){return t.rtcStatsCollector.getRemoteVideoStats(e,n)},t.getLocalVideoStats=function(e,n){return t.rtcStatsCollector.getLocalVideoStats(e,n)},t._getRemoteVideoQualityStats=function(e,n){return t.rtcStatsCollector.getRemoteVideoQualityStats(e,n)},t._getRemoteAudioQualityStats=function(e,n){return t.rtcStatsCollector.getRemoteAudioQualityStats(e,n)},t.getTransportStats=function(e,n){return t.rtcStatsCollector.getTransportStats(function(t){return N.getStats(function(n){var i=S()({},t,n);e&&e(i)},n)},n)},t.getSessionStats=function(e,n){return t.rtcStatsCollector.getSessionStats(e,n)},t.onNetworkQuality=function(){return t.rtcStatsCollector.onNetworkQuality(onSuccess,onFailure)},t.sendMetadata=function(n,i){var r=o.report.reportApiInvoke(e.sessionId,{name:"Client.sendMetadata",tag:"tracer",callback:function(e){if(e)return i&&i(e);i&&i()}});t.gatewayClient.sendMetadata(n,r)},t.sendCustomReportMessage=function(n,s,a,l,c,u){Object(i.getParameter)("CR")?t.customReportCount>Object(i.getParameter)("CRL")?u&&u("REPORT_LIMITED"):(t.gatewayClient.hasJoined||(r.default.WARNING("Should invoke Client.sendCustomReportMessage after join"),u&&u("REPORT_BEFORE_JOINED")),t.customReportTimer||(t.customReportTimer=setInterval(function(){t.customReportCount=0},Object(i.getParameter)("CRI"))),Object(x.checkValidString)(n,"reportId",0,100,!1),Object(x.checkValidString)(s,"category",0,100,!1),Object(x.checkValidString)(a,"event",0,100,!1),Object(x.checkValidString)(l,"label",0,100,!1),Object(x.checkValidNumber)(c,"value",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),t.customReportCount++,o.report.sendCustomReportMessage(e.sessionId,{reportId:n,category:s,event:a,label:l,value:c,lts:Date.now()},function(e){e?u&&u("REPORT_FAILED"):u&&u()}
1)):u&&u("REPORT_FORBIDDEN")},t.setLocalAccessPoints=function(n,r){var s=o.report.reportApiInvoke(e.sessionId,{name:"Client.setLocalAccessPoints",tag:"tracer"});if(Object(x.checkValidArray)(n,"serverList"),Object(x.checkValidString)(r,"domain"),t.useProxyServer)throw new Error("You have already set the proxy");var a=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;n=n.map(function(e){return a.test(e)?"".concat(e.replace(/\./g,"-"),".").concat(r):e}),t.useLocalAccessPoint=!0,Object(i.setParameter)("WEBCS_DOMAIN",n),Object(i.setParameter)("WEBCS_DOMAIN_BACKUP_LIST",n),Object(i.setParameter)("GATEWAY_DOMAINS",[r]),Object(i.setParameter)("EVENT_REPORT_DOMAIN",n[Math.floor(Math.random()*n.length)]),Object(i.setParameter)("EVENT_REPORT_BACKUP_DOMAIN",n[Math.floor(Math.random()*n.length)]),Object(i.setParameter)("LOG_UPLOAD_SERVER","".concat(n[Math.floor(Math.random()*n.length)],":6444")),s()},e.clientId=t.clientId,t.gatewayClient=Object(w.a)(e),t.listenerLoggerTimer=null,t.listenerLoggerCache=[],t.on=function(e,n){t.gatewayClient.on(e,n),t.listenerLoggerCache.push("".concat(e).concat(n.name?":"+n.name:"")),t.listenerLoggerTimer?clearTimeout(t.listenerLoggerTimer):r.default.info("[".concat(t.clientId,"] Adding event handler on ").concat(e)),t.listenerLoggerTimer=setTimeout(function(){t.listenerLoggerCache.length&&(t.listenerLoggerTimer=null,r.default.info("[".concat(t.clientId,"] Added event handler on ").concat(t.listenerLoggerCache.join(", "))),t.listenerLoggerCache=[])},0)},t.off=function(e,n){r.default.info("remove event handler from [".concat(e,"]")),t.gatewayClient.removeEventListener(e,n)},t.rtcStatsCollector=function(e){var t=Object(s.b)();return t.gatewayClient=e,t.exceptionMonitor=new function(e){var t={remoteStreamStorage:{},localStreamStorage:{}};return t.gatewayClient=e,t.checkAudioOutputLevel=function(e){return!(e&&parseInt(e.audioRecvBytesDelta)>0&&parseInt(e.audioDecodingNormalDelta)>0&&0===parseInt(e.audioOutputLevel))},t.checkAudioIntputLevel=function(e){return!e||0!==parseInt(e.audioInputLevel)},t.checkFramerateInput=function(e,t){if(!e||!t.attributes)return!0;var n=parseInt(t.attributes.maxFrameRate),i=parseInt(e.googFrameRateInput);return!n||!i||!(n>10&&i<5||n<10&&n>=5&&i<=1)},t.checkFramerateSent=function(e){return!(e&&parseInt(e.googFrameRateInput)>5&&parseInt(e.googFrameRateSent)<=1)},t.checkSendVideoBitrate=function(e){return!e||0!==parseInt(e.videoSendBytesDelta)},t.checkSendAudioBitrate=function(e){return!e||0!==parseInt(e.audioSendBytesDelta)},t.checkVideoDecode=function(e){return!e||0===parseInt(e.videoRecvBytesDelta)||0!==parseInt(e.googFrameRateDecoded)},t.checkAudioDecode=function(e){return!e||0===parseInt(e.audioRecvBytesDelta)||0!==parseInt(e.audioDecodingNormalDelta)},t.record=function(e,n,i,r,o){i[e]||(i[e]={isPrevNormal:!0,record:[]});var s=i[e],a=t["check"+e](n,o);if(s.record.push(a),s.record.length>=5){s.isCurNormal=-1!==s.record.indexOf(!0);var l=A[e];s.isPrevNormal&&!s.isCurNormal&&t.gatewayClient.dispatchEvent({type:"exception",code:l,msg:D[l],uid:r}),!s.isPrevNormal&&s.isCurNormal&&t.gatewayClient.dispatchEvent({type:"exception",code:l+2e3,msg:D[l+2e3],uid:r}),s.isPrevNormal=s.isCurNormal,s.record=[]}},t.setLocalStats=function(e){var n={};Object.keys(e).map(function(i){var r=e[i],o=t.gatewayClient.localStreams[parseInt(i)],s=t.localStreamStorage[i]||{};o&&o.hasVideo()&&(t.record("SendVideoBitrate",r.videoStats,s,i),t.record("FramerateInput",r.videoStats,s,i,o),t.record("FramerateSent",r.videoStats,s,i)),o&&o.hasAudio()&&(t.record("AudioIntputLevel",r.audioStats,s,i),t.record("SendAudioBitrate",r.audioStats,s,i)),n[i]=s}),t.localStreamStorage=n},t.setRemoteStats=function(n){var i={};Object.keys(n).map(function(r){var o=n[r],s=e.remoteStreams[r],a=t.remoteStreamStorage[r]||{};s&&s.hasVideo()&&s.isPlaying()&&t.record("VideoDecode",o.videoStats,a,r),s&&s.hasAudio()&&s.isPlaying()&&(t.record("AudioOutputLevel",o.audioStats,a,r),t.record("AudioDecode",o.audioStats,a,r)),i[r]=a}),t.remoteStreamStorage=i},t}(e),t.localStats={},t.remoteStats={},t.session={sendBytes:0,recvBytes:0,WSSendBytes:0,WSSendBytesDelta:0,WSRecvBytes:0,WSRecvBytesDelta:0,HTTPSendBytes:0,HTTPSendBytesDelta:0,HTTPRecvBytes:0,HTTPRecvBytesDelta:0},t.getRemoteAudioStats=function(e){var n=t.gatewayClient.traffic_stats,i={};for(var r in t.remoteStats){var o={},s=t.remoteStats[r];if(Object(I.b)(o,"End2EndDelay",s.peer_delay&&s.peer_delay.audio_delay),Object(I.b)(o,"TransportDelay",s.peer_delay&&s.peer_delay.e2e_delay),Object(I.b)(o,"PacketLossRate",s.peer_delay&&s.peer_delay.e2e_audio_lost_ratio_400ms),Object(I.b)(o,"RecvLevel",s.audioStats&&s.audioStats.audioOutputLevel),Object(I.b)(o,"RecvBitrate",s.audioRecvBitrate),Object(I.b)(o,"CodecType",s.audioStats&&s.audioStats.googCodecName),Object(I.b)(o,"MuteState",s.audioDisabled),Object(I.b)(o,"TotalFreezeTime",s.audioStats&&s.audioStats.audioTotalFreezeTime),Object(I.b)(o,"TotalPlayDuration",s.audioStats&&s.audioStats.audioTotalPlayDuration),n&&n.peer_delay){var a=n.peer_delay.find(function(e){return e.peer_uid==r});if(a){var l=a.peer_publish_audio_duration+(Date.now()-n.timestamp);Object(I.b)(o,"AudioPublishDuration",l)}else Object(I.b)(o,"AudioPublishDuration",-1)}i[r]=o}e&&e(i)},t.getLocalAudioStats=function(e){var n={};for(var i in t.localStats){var r={},o=t.localStats[i];Object(I.b)(r,"RecordingLevel",o.audioStats&&o.audioStats.audioInput
1Level),Object(I.b)(r,"SendLevel",o.audioStats&&o.audioStats.totalAudioEnergy),Object(I.b)(r,"SamplingRate",o.audioStats&&o.audioStats.totalSamplesDuration),Object(I.b)(r,"SendBitrate",o.audioSendBitrate),Object(I.b)(r,"CodecType",o.audioStats&&o.audioStats.googCodecName),Object(I.b)(r,"MuteState",o.audioDisabled),Object(I.b)(r,"audioSendPacketsLost",o.audioStats&&o.audioStats.packetsLost);var s=t.gatewayClient.localStreams[i];s&&s.isPlaying()&&Object(I.b)(r,"MuteState",s.userMuteAudio?"1":"0"),n[i]=r}e&&e(n)},t.getRemoteVideoStats=function(e){var n=t.gatewayClient.traffic_stats,i={};for(var r in t.remoteStats){var o={},s=t.remoteStats[r];if(Object(I.b)(o,"End2EndDelay",s.peer_delay&&s.peer_delay.video_delay),Object(I.b)(o,"TransportDelay",s.peer_delay&&s.peer_delay.e2e_delay),Object(I.b)(o,"PacketLossRate",s.peer_delay&&s.peer_delay.e2e_video_lost_ratio_400ms),Object(I.b)(o,"RecvBitrate",s.videoRecvBitrate),Object(I.b)(o,"RecvResolutionWidth",s.videoStats&&s.videoStats.googFrameWidthReceived),Object(I.b)(o,"RecvResolutionHeight",s.videoStats&&s.videoStats.googFrameHeightReceived),Object(I.b)(o,"RenderResolutionWidth",s.videoStats&&s.videoStats.renderRemoteWidth),Object(I.b)(o,"RenderResolutionHeight",s.videoStats&&s.videoStats.renderRemoteHeight),Object(I.b)(o,"RenderFrameRate",s.videoStats&&s.videoStats.googFrameRateOutput),Object(I.b)(o,"MuteState",s.videoDisabled),Object(I.b)(o,"TotalFreezeTime",s.videoStats&&s.videoStats.videoTotalFreezeTime),Object(I.b)(o,"TotalPlayDuration",s.videoStats&&s.videoStats.videoTotalPlayDuration),n&&n.peer_delay){var a=n.peer_delay.find(function(e){return e.peer_uid==r});if(a){var l=a.peer_publish_video_duration+(Date.now()-n.timestamp);Object(I.b)(o,"VideoPublishDuration",l)}else Object(I.b)(o,"VideoPublishDuration",-1)}i[r]=o}e&&e(i)},t.getLocalVideoStats=function(e){var n={};for(var i in t.localStats){var r={},o=t.localStats[i];
1Object(I.b)(r,"TargetSendBitrate",o.videoTargetSendBitrate),Object(I.b)(r,"SendFrameRate",o.videoStats&&o.videoStats.googFrameRateSent),Object(I.b)(r,"SendBitrate",o.videoSendBitrate),Object(I.b)(r,"SendResolutionWidth",o.videoStats&&o.videoStats.googFrameWidthSent),Object(I.b)(r,"SendResolutionHeight",o.videoStats&&o.videoStats.googFrameHeightSent),Object(I.b)(r,"CaptureResolutionWidth",o.videoStats&&o.videoStats.googFrameWidthInput),Object(I.b)(r,"CaptureResolutionHeight",o.videoStats&&o.videoStats.googFrameHeightInput),Object(I.b)(r,"EncodeDelay",o.videoStats&&o.videoStats.googAvgEncodeMs),Object(I.b)(r,"MuteState",o.videoDisabled),Object(I.b)(r,"TotalFreezeTime",o.videoStats&&o.videoStats.videoTotalFreezeTime),Object(I.b)(r,"TotalDuration",o.videoStats&&o.videoStats.videoTotalPlayDuration),Object(I.b)(r,"CaptureFrameRate",o.videoStats&&o.videoStats.googFrameRateSent),Object(I.b)(r,"videoSendPacketsLost",o.videoStats&&o.videoStats.packetsLost),o.videoStats&&!o.videoStats.googFrameWidthInput&&Object(I.b)(r,"CaptureResolutionWidth",o.videoStats&&o.videoStats.renderLocalWidth),o.videoStats&&!o.videoStats.googFrameHeightInput&&Object(I.b)(r,"CaptureResolutionHeight",o.videoStats&&o.videoStats.renderLocalHeight),n[i]=r}e&&e(n)},t.getRemoteVideoQualityStats=function(e){var n={};for(var i in t.remoteStats){var r={},o=t.remoteStats[i];Object(I.b)(r,"videoReceiveDelay",o.videoStats&&o.videoStats.googCurrentDelayMs),Object(I.b)(r,"VideoFreezeRate",o.videoStats&&o.videoStats.videoFreezeRate),Object(I.b)(r,"FirstFrameTime",o.firstFrameTime),n[i]=r}e&&e(n)},t.getRemoteAudioQualityStats=function(e){var n={};for(var i in t.remoteStats){var r={},o=t.remoteStats[i];Object(I.b)(r,"audioReceiveDelay",o.audioStats&&o.audioStats.googCurrentDelayMs),Object(I.b)(r,"AudioFreezeRate",o.videoStats&&o.videoStats.videoFreezeRate),n[i]=r}e&&e(n)},t.getTransportStats=function(e){var n={},i={},r=t.gatewayClient.traffic_stats,o=r.peer_delay;if(Object(I.b)(n,"OutgoingAvailableBandwidth",t.gatewayClient.OutgoingAvailableBandwidth/1e3),Object(I.b)(n,"RTT",r&&2*r.access_delay),o){var s,a=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}(o);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.downlink_estimate_bandwidth&&(i[l.peer_uid]=l.downlink_estimate_bandwidth/1e3+"")}}catch(e){a.e(e)}finally{a.f()}}n.IncomingAvailableBandwidth=i,e&&e(n)},t.getSessionStats=function(e){var n={},i=t.gatewayClient.traffic_stats,r=t.gatewayClient.socket,o=0,s=0;for(var a in t.remoteStats)(l=t.remoteStats[a])&&l.videoStats&&l.videoStats.videoRecvBytesDelta&&(s+=parseInt(l.videoStats.videoRecvBytesDelta)),l&&l.audioStats&&l.audioStats.audioRecvBytesDelta&&(s+=parseInt(l.audioStats.audioRecvBytesDelta));for(var a in t.localStats){var l;(l=t.localStats[a])&&l.videoStats&&l.videoStats.videoSendBytesDelta&&(o+=parseInt(l.videoStats.videoSendBytesDelta)),l&&l.audioStats&&l.audioStats.audioSendBytesDelta&&(o+=parseInt(l.audioStats.audioSendBytesDelta))}var c=o+t.session.WSSendBytesDelta+t.session.HTTPSendBytesDelta,u=s+t.session.WSRecvBytesDelta+t.session.HTTPRecvBytesDelta,d=t.session.sendBytes+Object(R.getHTTPSendBytes)(),h=t.session.recvBytes+Object(R.getHTTPRecvBytes)();t.gatewayClient.socket&&t.gatewayClient.socket.state===t.gatewayClient.CONNECTED&&(d+=r.getSendBytes(),h+=r.getRecvBytes());var p=1;i.peer_delay&&(p=i.peer_delay.length,p+=1),r?Object(I.b)(n,"Duration",r.getDuration()):Object(I.b)(n,"Duration",0),Object(I.b)(n,"UserCount",p),Object(I.b)(n,"SendBytes",d),Object(I.b)(n,"RecvBytes",h),Object(I.b)(n,"SendBitrate",8*c/1e3),Object(I.b)(n,"RecvBitrate",8*u/1e3),e&&e(n)},t.isLocalVideoFreeze=function(e,t){var n=0,i=0;if(!e||!t)return!1;if(Object(a.isChrome)()||Object(a.isOpera)())n=e.googFrameRateInput,i=e.googFrameRateSent;else if(Object(a.isSafari)())n=parseInt(e.framerateMean),i=parseInt(e.framesEncoded)-parseInt(t.framesEncoded);else{if(!Object(a.isFireFox)())return!1;n=parseInt(e.framerateMean),i=parseInt(e.framesEncoded)-parseInt(t.framesEncoded)}return n>5&&i<3},t.isRemoteVideoFreeze=function(e,t){var n=0,i=0;if(!e||!t)return!1;if(Object(a.isChrome)()||Object(a.isOpera)())n=e.googFrameRateReceived,i=e.googFrameRateDecoded;else if(Object(a.isSafari)())n=e.framerateMean,i=parseInt(e.framesDecoded)-p
1arseInt(t.framesDecoded);else{if(!Object(a.isFireFox)())return!1;n=parseInt(e.framesReceived)-parseInt(t.framesReceived),i=parseInt(e.framesDecoded)-parseInt(t.framesDecoded)}return n>5&&n<10&&i<3||n>10&&n<20&&i<4||n>20&&i<5},t.isAudioFreeze=function(e){if(Object(a.isChrome)()&&e){if(e.googDecodingPLC&&e.googDecodingPLCCNG&&e.googDecodingCTN)return(parseInt(e.googDecodingPLC)+parseInt(e.googDecodingPLCCNG))/parseInt(e.googDecodingCTN)>.2}else if((Object(a.isSafari)()||Object(a.isFireFox)())&&e.packetsLost&&e.packetsReceived)return parseInt(e.packetsLost)/(parseInt(e.packetsLost)+parseInt(e.packetsReceived))>.2;return!1},t.isAudioDecodeFailed=function(e){return!!((Object(a.isChrome)()||Object(a.isOpera)())&&e&&parseInt(e.bytesReceived)>0&&0===parseInt(e.googDecodingNormal))},t.startNetworkQualityTimer=function(){t.clearNetworkQualityTimer(),t.networkQualityTimer=setInterval(function(){if(t.gatewayClient.state===w.a.CONNECTED&&navigator.onLine){var e=t.gatewayClient.traffic_stats;t.gatewayClient.dispatchEvent({type:"network-quality",uplinkNetworkQuality:t.networkQualityTrans(e.uplink_network_quality),downlinkNetworkQuality:t.networkQualityTrans(e.downlink_network_quality)})}else t.gatewayClient.dispatchEvent({type:"network-quality",uplinkNetworkQuality:0,downlinkNetworkQuality:0})},2e3)},t.clearNetworkQualityTimer=function(){t.networkQualityTimer&&clearInterval(t.networkQualityTimer)},t.networkQualityTrans=function(e){return e>=0&&e<.17?1:e>=.17&&e<.36?2:e>=.36&&e<.59?3:e>=.59&&e<=1?4:e>1?5:0},t.getStatsTimer=setInterval(function(){var e=t.gatewayClient.traffic_stats,n=Date.now();t.gatewayClient.dispatchEvent({type:"_testException"}),Object.keys(t.localStats).length&&t.exceptionMonitor.setLocalStats(t.localStats),Object.keys(t.remoteStats).length&&t.exceptionMonitor.setRemoteStats(t.remoteStats);var i={};Object.keys(t.gatewayClient.remoteStreams).forEach(function(r){var o=t.gatewayClient.remoteStreams[r],s=t.remoteStats[r],a={id:r,updatedAt:n};i[r]=a,a.firstFrameTime=o.firstFrameTime,s?(a.audioTotalPlayDuration=s.audioTotalPlayDuration+1,a.audioTotalFreezeTime=s.audioTotalFreezeTime,a.isAudioFreeze=!1,a.isAudioDecodeFailed=!1,a.videoTotalPlayDuration=s.videoTotalPlayDuration+1,a.videoTotalFreezeTime=s.videoTotalFreezeTime,a.isVideoFreeze=!1):(a.audioTotalPlayDuration=1,a.audioTotalFreezeTime=0,a.videoTotalPlayDuration=1,a.videoTotalFreezeTime=0);var l=e&&e.peer_delay&&e.peer_delay.find(function(e){return e.peer_uid==r});l&&(a.peer_delay=l),o&&(o.isPlaying()&&(a.audioDisabled=o.userMuteAudio||o.peerMuteAudio?"1":"0",a.videoDisabled=o.userMuteVideo||o.peerMuteVideo?"1":"0"),s&&s.peer_delay&&l&&s.peer_delay.stream_type!==l.stream_type&&t.gatewayClient.dispatchEvent({type:"streamTypeChange",uid:r,streamType:l.stream_type}),o.pc&&"established"==o.pc.state&&o.pc.getStats(function(e){if(a.pcStats=e,a.audioStats=e.find(function(e){return"audio"==e.mediaType&&(e.id.indexOf("_recv")>-1||e.id.toLowerCase().indexOf("inbound")>-1)}),a.videoStats=e.find(function(e){return"video"==e.mediaType&&(e.id.indexOf("_recv")>-1||e.id.toLowerCase().indexOf("inbound")>-1)}),s&&s.audioStats&&a.audioStats){var n=parseInt(a.audioStats.bytesReceived)-parseInt(s.audioStats.bytesReceived),i=parseInt(a.audioStats.googDecodingNormal)-parseInt(s.audioStats.googDecodingNormal);if(a.audioStats.audioRecvBytesDelta=n,a.audioStats.audioDecodingNormalDelta=i,t.session.recvBytes+=n,isFinite(n)&&a.audioStats.timestamp){var r=a.audioStats.timestamp.getTime()-s.audioStats.timestamp.getTime();a.audioRecvBitrate=Math.floor(8*n/r)}t.isAudioFreeze(a.audioStats)&&a.audioTotalPlayDuration>10&&(a.audioTotalFreezeTime++,a.isAudioFreeze=!0),t.isAudioDecodeFailed(a.audioStats)&&a.audioTotalPlayDuration>10&&(a.isAudioDecodeFailed=!0),a.audioStats.audioTotalFreezeTime=a.audioTotalFreezeTime,a.audioStats.audioTotalPlayDuration=a.audioTotalPlayDuration,a.audioStats.audioFreezeRate=Math.ceil(100*a.audioTotalFreezeTime/a.audioTotalPlayDuration)}if(s&&s.videoStats&&a.videoStats){var l=parseInt(a.videoStats.bytesReceived)-parseInt(s.videoStats.bytesReceived);a.videoStats.videoRecvBytesDelta=l,t.session.recvBytes+=l,isFinite(l)&&a.videoStats.timestamp&&(r=a.videoStats.timestamp.getTime()-s.videoStats.timestamp.getTime(),a.videoRecvBitrate=Math.floor(8*l/r)),t.isRemoteVideoFreeze(a.videoStats,s.videoStats)&&(a.videoTotalFreezeTime++,a.isVideoFreeze=!0),a.videoStats.videoTotalFreezeTime=a.videoTotalFreezeTime,a.videoStats.videoTotalPlayDuration=a.videoTotalPlayDuration,a.videoStats.videoFreezeRate=Math.ceil(100*a.videoTotalFreezeTime/a.videoTotalPlayDuration),o.player&&o.player.video&&o.player.video.videoWidth&&o.player.video.videoHeight?(a.videoStats.renderRemoteWidth=o.player.video.videoWidth,a.videoStats.renderRemoteHeight=o.player.video.videoHeight):(a.videoStats.renderRemoteWidth=o.videoWidth||a.videoStats.googFrameWidthReceived,a.videoStats.renderRemoteHeight=o.videoHeight||a.videoStats.googFrameHeightReceived)}}))}),t.remoteStats=i;var r={};
1if(Object.keys(t.gatewayClient.localStreams).forEach(function(e){var i=t.gatewayClient.localStreams[e],o=t.localStats[e],s={id:e,updatedAt:n};r[e]=s,o?(s.videoTotalPlayDuration=o.videoTotalPlayDuration+1,s.videoTotalFreezeTime=o.videoTotalFreezeTime,s.isVideoFreeze=!1):(s.videoTotalPlayDuration=1,s.videoTotalFreezeTime=0),i&&(i.isPlaying()&&(s.audioDisabled=i.userMuteAudio?"1":"0",s.videoDisabled=i.userMuteVideo?"1":"0"),i.video&&i.attributes.maxVideoBW?s.videoTargetSendBitrate=i.attributes.maxVideoBW:i.video&&i.screenAttributes&&(s.videoTargetSendBitrate=i.screenAttributes.maxVideoBW),i.pc&&"established"==i.pc.state&&i.pc.getStats(function(e){if(s.pcStats=e.reverse(),s.audioStats=e.find(function(e){return"audio"==e.mediaType&&(e.id.indexOf("_send")>-1||e.id.toLowerCase().indexOf("outbound")>-1)}),s.videoStats=e.find(function(e){return"video"==e.mediaType&&(e.id.indexOf("_send")>-1||e.id.toLowerCase().indexOf("outbound")>-1)}),s.audioStats&&o&&o.audioStats){var n=parseInt(s.audioStats.bytesSent)-parseInt(o.audioStats.bytesSent);if(s.audioStats.audioSendBytesDelta=n,t.session.sendBytes+=n,isFinite(n)&&s.audioStats.timestamp){var r=s.audioStats.timestamp.getTime()-o.audioStats.timestamp.getTime();
1s.audioSendBitrate=Math.floor(8*n/r)}}if(s.videoStats&&o&&o.videoStats){var a=parseInt(s.videoStats.bytesSent)-parseInt(o.videoStats.bytesSent);s.videoStats.videoSendBytesDelta=a,t.session.sendBytes+=a,isFinite(a)&&s.videoStats.timestamp&&(r=s.videoStats.timestamp.getTime()-o.videoStats.timestamp.getTime(),s.videoSendBitrate=Math.floor(8*a/r)),t.isLocalVideoFreeze(s.videoStats,o.videoStats)&&(s.videoTotalFreezeTime++,s.isVideoFreeze=!0),s.videoStats.videoTotalFreezeTime=s.videoTotalFreezeTime,s.videoStats.videoTotalPlayDuration=s.videoTotalPlayDuration,s.videoStats.videoFreezeRate=Math.ceil(100*s.videoTotalFreezeTime/s.videoTotalPlayDuration),s.videoStats.renderLocalWidth=i.videoWidth||s.videoStats.googFrameWidthSent,s.videoStats.renderLocalHeight=i.videoHeight||s.videoStats.googFrameHeightSent}}))}),t.localStats=r,t.session.HTTPSendBytesDelta=Object(R.getHTTPSendBytes)()-t.session.HTTPSendBytes,t.session.HTTPSendBytes=Object(R.getHTTPSendBytes)(),t.session.HTTPRecvBytesDelta=Object(R.getHTTPRecvBytes)()-t.session.HTTPRecvBytes,t.session.HTTPRecvBytes=Object(R.getHTTPRecvBytes)(),t.gatewayClient.socket&&t.gatewayClient.socket.state===t.gatewayClient.CONNECTED){var o=t.gatewayClient.socket;t.session.WSSendBytesDelta=o.getSendBytes()-t.session.WSSendBytes,t.session.WSSendBytes=o.getSendBytes(),t.session.WSRecvBytesDelta=o.getRecvBytes()-t.session.WSRecvBytes,t.session.WSRecvBytes=o.getRecvBytes()}},1e3),t.gatewayClient.on("join",function(){t.session={sendBytes:0,recvBytes:0,WSSendBytes:0,WSSendBytesDelta:0,WSRecvBytes:0,WSRecvBytesDelta:0,HTTPSendBytes:0,HTTPSendBytesDelta:0,HTTPRecvBytes:0,HTTPRecvBytesDelta:0}}),t}(t.gatewayClient),t.configDistributManager=function(e){var t={};return t.client=e,t.client.gatewayClient&&t.client.gatewayClient.on("config-distribute",function(n){var s=n.joinInfo,a=n.config;if(a){Object(x.isEmpty)(a.uploadLog)||(Object(i.setParameter)("UPLOAD_LOG",a.uploadLog),o.report.reportApiInvoke(s.sid,{name:"_configDistribute",options:{feature:"uploadLog",value:a.uploadLog}})()),Object(x.isEmpty)(a.dualStream)||(e.isDualStream=a.dualStream,o.report.reportApiInvoke(s.sid,{name:"_configDistribute",options:{feature:"dualStream",value:a.dualStream}})()),Object(x.isEmpty)(a.streamFallbackOption)||t.client.gatewayClient&&t.client.gatewayClient.on("stream-subscribed",function(e){var n=e.stream;n?(t.client.gatewayClient.setStreamFallbackOption(n,a.streamFallbackOption),o.report.reportApiInvoke(s.sid,{name:"_configDistribute",options:{feature:"streamFallbackOption",value:a.streamFallbackOption,streamId:n.getId()}})()):o.report.reportApiInvoke(s.sid,{name:"_configDistribute",options:{feature:"streamFallbackOption",value:a.streamFallbackOption,streamId:n.getId(),err:"invalid stream"}})()});try{r.default.debug("[".concat(e.clientId,"] setParameter in distribution: ").concat(JSON.stringify(a))),Object.keys(a).map(function(e){return Object(i.setParameter)(e,a[e])})}catch(t){r.default.debug("[".concat(e.clientId,"] setParameter in distribution failed: ").concat(JSON.stringify(a)))}}}),t}(t),Object(P.addLiveStreamingCapability)(t,e),e.areaCode){var n=e.areaCode,l=e.excludedArea,h=Object(F.getAreaCodeByConfig)({areaCode:n,excludedArea:l});Object(i.setParameter)("AREA_SETTING",h);var p=Object(F.getAreaDomainConfig)(h);Object.keys(p).map(function(e){var t=p[e];"LOG_UPLOAD_SERVER"==e||"EVENT_REPORT_DOMAIN"==e||"EVENT_REPORT_BACKUP_DOMAIN"==e||"NGINX"==e?Object(i.setParameter)(e,t[0]):Object(i.setParameter)(e,t)})}return Object(x.isEmpty)(e.turnServer)||t.setTurnServer(e.turnServer),Object(x.isEmpty)(e.proxyServer)||t.setProxyServer(e.proxyServer),"live"===t.mode&&(t.gatewayClient.role="audience"),"rtc"===t.mode&&(t.gatewayClient.role=H),t.gatewayClient.on("onMultiIP",function(e){t.gatewayClient.closeGateway(),t.gatewayClient.socket=void 0,t.gatewayClient.hasChangeBGPAddress=!0,t.joinInfo.multiIP=e.option,t.gatewayClient.state=w.a.CONNECTING;var n=function(e){r.default.info("[".concat(t.clientId,"] Joining channel: ").concat(t.channel)),t.joinInfo.cid=e.cid,t.joinInfo.uid||(t.joinInfo.uid=e.uid),t.joinInfo.uni_lbs_ip=e.uni_lbs_ip,t.joinInfo.gatewayAddr=e.gateway_addr,t.onSuccess?t.gatewayClient.join(t.joinInfo,t.key,function(e){r.default.info("[".concat(t.clientId,"] Join channel ").concat(t.channel," success"));var n=t.onSuccess;t.onSuccess=null,t.onFailure=null,n(e)},t.onFailure):(t.gatewayClient.joinInfo=S()({},t.joinInfo),t.gatewayClient.rejoin())};t.joinInfo.stringUid&&!t.joinInfo.uid?(t.userAccountReq&&!t.userAccountReq.isFinished()&&t.userAccountReq.cancel(),t.userAccountReq=Object(C.getUserAccount)(joinInfo,t.gatewayClient),t.userAccountReq.then(function(e){r.default.error("getUserAccount Success ".concat(e.url," ").concat(joinInfo.stringUid," => ").concat(e.uid)),t.joinInfo.uid=e.uid,Object(C.getGatewayList)(t.joinInfo,n,t.onFailure)}).catch(function(e){r.default.error("getUserAccount rejected",e),t.onFailure(e)})):Object(C.getGatewayList)(t.joinInfo,n,t.onFailure)}),t.gatewayClient.on("rejoin-start",function(){t._renewSession(),o.report.sessionInit(e.sessionId,{lts:(new Date).getTime(),extend:{rejoin:!0},cname:t.channel,appid:e.appId,mode:e.mode,succ:!0})}),t.gatewayClient.on("recover",function(){t._renewSession(),console.log("recover",e.sessionId),o.report.sessionInit(e.sessionId,{lts:(new Date).getTime(),extend:{recover:!0},cname:t.channel,appid:e.appId,mode:e.mode,succ:!0})}),t.gatewayClient.on("rejoin",function(){var e=t.highStreamState;if(r.default.debug("[".concat(t.clientId,"] Client local stream preState: ").concat(e)),t.onSuccess){var n=t.onSuccess;t.onSuccess=null,t.onFailure=null,n(t.joinInfo.uid)}!t.highStream||0!==e&&1!==e||(r.default.info("[".concat(t.clientId,"] publish after rejoin")),t.highStreamState=2,t.lowStreamState=2,t.publish(t.highStream,function(e){e&&r.default.info("[".concat(t.clientId,"] "),e)}))}),t.gatewayClient.on("streamPublished",function(e){t.hasPublished||(t.hasPublished=!0,t.gatewayClient.dispatchEvent({type:"stream-published",stream
1:e.stream,proxy:e.proxy}))}),t.gatewayClient.on("pubP2PLost",function(e){r.default.debug("[".concat(t.clientId,"] Start reconnect local peerConnection: ").concat(t.highStream.getId())),t.gatewayClient.dispatchEvent({type:"stream-reconnect-start",uid:t.highStream.getId()}),1===t.highStreamState&&(t.highStreamState=0,t.lowStreamState=0),t._unpublish(t.highStream,function(){t._publish(t.highStream,function(){r.default.debug("[".concat(t.clientId,"] Reconnect local peerConnection success: ").concat(t.highStream.getId())),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:t.highStream.getId(),success:!0,reason:""})},function(e){r.default.debug("[".concat(t.clientId,"] Reconnect local peerConnection failed: ").concat(e)),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:t.highStream.getId(),success:!1,reason:e})},!0)},function(e){r.default.debug("[".concat(t.clientId,"] Reconnect local peerConnection failed: ").concat(e)),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:t.highStream.getId(),success:!1,reason:e})},!0)}),t.gatewayClient.on("subP2PLost",function(e){r.default.debug("[".concat(t.clientId,"] Start reconnect remote peerConnection: ").concat(e.stream.getId()," ").concat(e.stream.subscribeOptions)),t.gatewayClient.dispatchEvent({type:"stream-reconnect-start",uid:e.stream.getId()});var n=e.stream.subscribeOptions;console.log("Re-subscribe stream",n,e.stream),t.gatewayClient.unsubscribe(e.stream,function(){e.stream.subscribeOptions=n,t.gatewayClient.subscribe(e.stream,function(){r.default.debug("[".concat(t.clientId,"] Reconnect remote peerConnection success: ").concat(e.stream.getId())),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:e.stream.getId(),success:!0,reason:""})},function(n){r.default.debug("[".concat(t.clientId,"] Reconnect remote peerConnection failed: "),n),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:e.stream.getId(),success:!1,reason:n})})},function(n){r.default.debug("[".concat(t.clientId,"] Reconnect remote peerConnection failed: "),n),t.gatewayClient.dispatchEvent({type:"stream-reconnect-end",uid:e.stream.getId(),success:!1,reason:n})})}),N.on("networkTypeChanged",function(e){t.gatewayClient&&t.gatewayClient.dispatchEvent(e);var n=S()({},e,{type:"network-type-changed"});t.gatewayClient.dispatchEvent(n)}),d.a.on("recordingDeviceChanged",function(e){t.gatewayClient&&t.gatewayClient.dispatchEvent(e);var n=S()({},e,{type:"recording-device-changed"});t.gatewayClient.dispatchEvent(n)}),d.a.on("playoutDeviceChanged",function(e){t.gatewayClient&&t.gatewayClient.dispatchEvent(e);var n=S()({},e,{type:"playout-device-changed"});t.gatewayClient.dispatchEvent(n)}),d.a.on("cameraChanged",function(e){t.gatewayClient&&t.gatewayClient.dispatchEvent(e);var n=S()({},e,{type:"camera-changed"});t.gatewayClient.dispatchEvent(n)}),t.gatewayClient.on("streamTypeChange",function(n){var i=S()({},n,{type:"stream-type-changed"});t.gatewayClient.dispatchEvent(i),o.report.reportApiInvoke(e.sessionId,{name:"streamTypeChange"})(null,JSON.stringify(n))}),t}(e)},createStream:u.b,Logger:r.default,report:o.report,getDevices:B,getScreenSources:V,getParameter:i.getParameter,setParameter:i.setParameter,checkSystemRequirements:function(){var e=o.report.reportApiInvoke(null,{name:"checkSystemRequirements",options:arguments,tag:"tracer"}),t=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,n=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia,i=window.WebSocket,s=!!t&&!!n&&!!i,l=!1;a.isChrome()&&a.getBrowserVersion()>=58&&"iOS"!==a.getBrowserOS()&&(l=!0),a.isFireFox()&&a.getBrowserVersion()>=56&&(l=!0),a.isOpera()&&a.getBrowserVersion()>=45&&(l=!0),a.isSafari()&&a.getBrowserVersion()>=11&&(l=!0),a.isEdge()&&(l=!0),(a.isWeChatBrowser()||a.isQQBrowser())&&"iOS"!==a.getBrowserOS()&&(l=!0),a.isSupportedPC()||a.isSupportedMobile()||(l=!1),r.default.debug(a.getBrowserInfo(),"isAPISupport: "+s+", isVendorAndVersionSupport: "+l);var c=s&&l;return e(null,c),c},getSupportedCodec:p.getSupportedCodec,ChannelMediaRelayConfiguration:f.ChannelMediaRelayConfiguration,VERSION:i.VERSION,BUILD:i.BUILD,PROFILE_TABLE:W,AUDIO_SAMPLE_RATE_32000:32e3,AUDIO_SAMPLE_RATE_44100:44100,AUDIO_SAMPLE_RATE_48000:48e3,VIDEO_CODEC_PROFILE_BASELINE:66,VIDEO_CODEC_PROFILE_MAIN:77,VIDEO_CODEC_PROFILE_HIGH:100,REMOTE_VIDEO_STREAM_HIGH:0,REMOTE_VIDEO_STREAM_LOW:1,REMOTE_VIDEO_STREAM_MEDIUM:2,AREAS:F.AREAS,AREA_VERSION:"global"}}]).default}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){jQuery.fn.cropbox=function(t){return new function(t,n){var i=new Image,r={state:{},ratio:1,options:t,imageBox:n=n||e(t.imageBox),thumbBox:n.find(t.thumbBox),spinner:n.find(t.spinner),image:i,getDataURL:function(){var e=this.thumbBox.width(),t=this.thumbBox.height(),i=document.createElement("canvas"),r=n.css("background-position").split(" "),o=n.css("background-size").split(" "),s=parseInt(r[0])-n.width()/2+e/2,a=parseInt(r[1])-n.height()/2+t/2,l=parseInt(o[0]),c=parseInt(o[1]),u=parseInt(this.image.height),d=parseInt(this.image.width);return i.width=e,i.height=t,i.getContext("2d").drawImage(this.image,0,0,d,u,s,a,l,c),i.toDataURL("image/png")},getBlob:function(){for(var e=this.getDataURL().replace("data:image/png;base64,",""),t=atob(e),n=[],i=0;i<t.length;i++)n.push(t.charCodeAt(i));return new Blob([new Uint8Array(n)],{type:"image/png"})},zoomIn:function(){this.ratio*=1.1,o()},zoomOut:function(){this.ratio*=.9,o()}},o=function(){var e=parseInt(r.image.width)*r.ratio,t=parseInt(r.image.height)*r.ratio,i=(n.width()-e)/2,o=(n.height()-t)/2;n.css({"background-image":"url("+r.image.src+")","background-size":e+"px "+t+"px","background-position":i+"px "+o+"px","background-repeat":"no-repeat"})},s=function(e){e.stopImmediatePropagation(),r.state.dragable=!0,r.state.mouseX=e.clientX,r.state.mouseY=e.clientY},a=function(e){if(e.stopImmediatePropagation(),r.state.dragable){var t=e.clientX-r.state.mouseX,i=e.clientY-r.state.mouseY,o=n.css("background-position").split(" "),s=t+parseInt(o[0]),a=i+parseInt(o[1]);n.css("background-position",s+"px "+a+"px"),r.state.mouseX=e.clientX,r.state.mouseY=e.clientY}},l=function(e){e.stopImmediatePropagation(),r.state.dragable=!1},c=function(e){r.ratio*=e.originalEvent.wheelDelta>0||e.originalEvent.detail<0?1.1:.9,o()};return r.spinner.show(),r.image.onload=function(){r.spinner.hide(),o(),n.bind("mousedown",s),n.bind("mousemove",a),e(window).bind("mouseup",l),n.bind("mousewheel DOMMouseScroll",c)},r.image.src=t.imgSrc,n.on("remove",function(){e(window).unbind("mouseup",l)}),r}(t,this)}}),function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n&&n.fn.dataTable||(n=require("datatables.net")(t,n).$),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,i){var r=e.fn.dataTable,o=function(t,r){if(this instanceof o){r===i&&(r={});var s=e.fn.dataTable.Api(t);this.s={dt:s.settings()[0],dtApi:s,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,autoHeight:!0,viewportRows:0,stateTO:null,drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1,forceReposition:!1},this.s=e.extend(this.s,o.oDefaults,r),this.s.heights.row=this.s.rowHeight,this.dom={force:n.createElement("div"),scroller:null,table:null,loader:null},this.s.dt.oScroller||(this.s.dt.oScroller=this,this._fnConstruct())}else alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};e.extend(o.prototype,{fnRowToPixels:function(e,t,n){return e-=this.s.baseRowTop,n=n?this._domain("virtualToPhysical",this.s.baseScrollTop):this.s.baseScrollTop,n+=e*this.s.heights.row,t||t===i?parseInt(n,10):n},fnPixelsToRow:function(e,t,n){return e-=this.s.baseScrollTop,n=n?(this._domain("physicalToVirtual",this.s.baseScrollTop)+e)/this.s.heights.row:e/this.s.heights.row+this.s.baseRowTop,t||t===i?parseInt(n,10):n},fnScrollToRow:function(t,n){var i=this,r=!1,o=this.fnRowToPixels(t),s=t-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>s&&(s=0),(o>this.s.redrawBottom||o<this.s.redrawTop)&&this.s.dt._iDisplayStart!==s&&(r=!0,o=this._domain("virtualToPhysical",t*this.s.heights.row),this.s.redrawTop<o&&o<this.s.redrawBottom&&(this.s.forceReposition=!0,n=!1)),void 0===n||n?(this.s.ani=r,e(this.dom.scroller).animate({scrollTop:o},function(){setTimeout(function(){i.s.ani=!1},25)})):e(this.dom.scroller).scrollTop(o)},fnMeasure:function(t){this.s.autoHeight&&this._fnCalcRowHeight();var r=this.s.heights;
1r.row&&(r.viewport=e.contains(n,this.dom.scroller)?e(this.dom.scroller).height():this._parseHeight(e(this.dom.scroller).css("height")),r.viewport||(r.viewport=this._parseHeight(e(this.dom.scroller).css("max-height"))),this.s.viewportRows=parseInt(r.viewport/r.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer),(t===i||t)&&this.s.dt.oInstance.fnDraw(!1)},fnPageInfo:function(){var e=this.dom.scroller.scrollTop,t=this.s.dt.fnRecordsDisplay(),n=Math.ceil(this.fnPixelsToRow(e+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.fnPixelsToRow(e,!1,this.s.ani)),end:t<n?t-1:n-1}},_fnConstruct:function(){var n=this,i=this.s.dtApi;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative",this.dom.force.style.top="0px",this.dom.force.style.left="0px",this.dom.force.style.width="1px",this.dom.scroller=e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0],this.dom.scroller.appendChild(this.dom.force),this.dom.scroller.style.position="relative",this.dom.table=e(">table",this.dom.scroller)[0],this.dom.table.style.position="absolute",this.dom.table.style.top="0px",this.dom.table.style.left="0px",e(i.table().container()).addClass("DTS"),this.s.loadingIndicator&&(this.dom.loader=e('<div class="dataTables_processing DTS_Loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader)),this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1),this.fnMeasure(!1),this.s.ingnoreScroll=!0,this.s.stateSaveThrottle=this.s.dt.oApi._fnThrottle(function(){n.s.dtApi.state.save()},500),e(this.dom.scroller).on("scroll.dt-scroller",function(){n._fnScroll.call(n)}),e(this.dom.scroller).on("touchstart.dt-scroller",function(){n._fnScroll.call(n)}),e(t).on("resize.dt-scroller",function(){n.fnMeasure(!1),n._fnInfo()});var r=!0,o=i.state.loaded();i.on("stateSaveParams.scroller",function(e,t,i){i.scroller={topRow:r&&o&&o.scroller?o.scroller.topRow:n.s.topRowFloat,baseScrollTop:n.s.baseScrollTop,baseRowTop:n.s.baseRowTop},r=!1}),o&&o.scroller&&(this.s.topRowFloat=o.scroller.topRow,this.s.baseScrollTop=o.scroller.baseScrollTop,this.s.baseRowTop=o.scroller.baseRowTop),i.on("init.scroller",function(){n.fnMeasure(!1),n._fnDrawCallback(),i.on("draw.scroller",function(){n._fnDrawCallback()})}),i.on("preDraw.dt.scroller",function(){n._fnScrollForce()}),i.on("destroy.scroller",function(){e(t).off("resize.dt-scroller"),e(n.dom.scroller).off(".dt-scroller"),e(n.s.dt.nTable).off(".scroller"),e(n.s.dt.nTableWrapper).removeClass("DTS"),e("div.DTS_Loading",n.dom.scroller.parentNode).remove(),n.dom.table.style.position="",n.dom.table.style.top="",n.dom.table.style.left=""})}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},_fnScroll:function(){var t,n=this,i=this.s.heights,r=this.dom.scroller.scrollTop;if(!this.s.skip&&!this.s.ingnoreScroll)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{if(this._fnInfo(),clearTimeout(this.s.stateTO),this.s.stateTO=setTimeout(function(){n.s.dtApi.state.save()},250),this.s.forceReposition||r<this.s.redrawTop||r>this.s.redrawBottom){var o=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);t=parseInt(this._domain("physicalToVirtual",r)/i.row,10)-o,this.s.topRowFloat=this._domain("physicalToVirtual",r)/i.row,this.s.forceReposition=!1,0>=t?t=0:t+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?0>(t=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength)&&(t=0):0!=t%2&&t++,t!=this.s.dt._iDisplayStart&&(this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop,i=function(){null===n.s.scrollDrawReq&&(n.s.scrollDrawReq=r),n.s.dt._iDisplayStart=t,n.s.dt.oApi._fnDraw(n.s.dt)},this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(i,this.s.serverWait)):i(),this.dom.loader&&!this.s.loaderVisible)&&(this.dom.loader.css("display","block"),this.s.loaderVisible=!0)}else this.s.topRowFloat=this.fnPixelsToRow(r,!1,!0);this.s.lastScrollTop=r,this.s.stateSaveThrottle()}},_domain:function(e,t){var n,i=this.s.heights;if(i.virtual===i.scroll)return t;var r=(i.scroll-i.viewport)/2,o=(i.virtual-i.viewport)/2;return n=o/(r*r),"virtualToPhysical"===e?t<o?Math.pow(t/n,.5):0>(t=2*o-t)?i.scroll:2*r-Math.pow(t/n,.5):"physicalToVirtual"===e?t<r?t*t*n:0>(t=2*r-t)?i.virtual:2*o-t*t*n:void 0},_parseHeight:function(n){var i,r=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|em|rem|vh)$/.exec(n);return null===r?0:(n=parseFloat(r[1]),"px"===(r=r[2])?i=n:"vh"===r?i=n/100*e(t).height():"rem"===r?i=n*parseFloat(e(":root").css("font-size")):"em"===r&&(i=n*parseFloat(e("body").css("font-size"))),i||0)},_fnDrawCallback:function(){var t=this,n=this.s.heights,i=this.dom.scroller.scrollTop,r
1=e(this.s.dt.nTable).height(),o=this.s.dt._iDisplayStart,s=this.s.dt._iDisplayLength,a=this.s.dt.fnRecordsDisplay();this.s.skip=!0,(this.s.dt.bSorted||this.s.dt.bFiltered)&&0===o&&(this.s.topRowFloat=0),i=0===o?this.s.topRowFloat*n.row:o+s>=a?n.scroll-(a-this.s.topRowFloat)*n.row:this._domain("virtualToPhysical",this.s.topRowFloat*n.row),this.dom.scroller.scrollTop=i,this.s.baseScrollTop=i,this.s.baseRowTop=this.s.topRowFloat;var l=i-(this.s.topRowFloat-o)*n.row;0===o?l=0:o+s>=a&&(l=n.scroll-r),this.dom.table.style.top=l+"px",this.s.tableTop=l,this.s.tableBottom=r+this.s.tableTop,this.s.redrawTop=i-(r=(i-this.s.tableTop)*this.s.boundaryScale),this.s.redrawBottom=i+r>n.scroll-n.viewport-n.row?n.scroll-n.viewport-n.row:i+r,this.s.skip=!1,this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&void 0!==this.s.dt.oLoadedState.iScroller?((i=!(!this.s.dt.sAjaxSource&&!t.s.dt.ajax||this.s.dt.oFeatures.bServerSide))&&2==this.s.dt.iDraw||!i&&1==this.s.dt.iDraw)&&setTimeout(function(){e(t.dom.scroller).scrollTop(t.s.dt.oLoadedState.iScroller),t.s.redrawTop=t.s.dt.oLoadedState.iScroller-n.viewport/2,setTimeout(function(){t.s.ingnoreScroll=!1},0)},0):t.s.ingnoreScroll=!1,this.s.dt.oFeatures.bInfo&&setTimeout(function(){t._fnInfo.call(t)},0),this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_fnScrollForce:function(){var e=this.s.heights;e.virtual=e.row*this.s.dt.fnRecordsDisplay(),e.scroll=e.virtual,1e6<e.scroll&&(e.scroll=1e6),this.dom.force.style.height=e.scroll>this.s.heights.row?e.scroll+"px":this.s.heights.row+"px"},_fnCalcRowHeight:function(){var t=this.s.dt,n=t.nTable,i=n.cloneNode(!1),r=e("<tbody/>").appendTo(i),o=e('<div class="'+t.oClasses.sWrapper+' DTS"><div class="'+t.oClasses.sScrollWrapper+'"><div class="'+t.oClasses.sScrollBody+'"></div></div></div>');for(e("tbody tr:lt(4)",n).clone().appendTo(r);3>e("tr",r).length;)r.append("<tr><td>&nbsp;</td></tr>");e("div."+t.oClasses.sScrollBody,o).append(i),e(t=this.s.dt.nHolding||n.parentNode).is(":visible")||(t="body"),o.appendTo(t),this.s.heights.row=e("tr",r).eq(1).outerHeight(),o.remove()},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var t=this.s.dt,n=t.oLanguage,i=this.dom.scroller.scrollTop,r=Math.floor(this.fnPixelsToRow(i,!1,this.s.ani)+1),o=t.fnRecordsTotal(),s=t.fnRecordsDisplay(),a=(i=s<(i=Math.ceil(this.fnPixelsToRow(i+this.s.heights.viewport,!1,this.s.ani)))?s:i,t.fnFormatNumber(r)),l=t.fnFormatNumber(i),c=t.fnFormatNumber(o),u=t.fnFormatNumber(s);if(a=0===t.fnRecordsDisplay()&&t.fnRecordsDisplay()==t.fnRecordsTotal()?n.sInfoEmpty+n.sInfoPostFix:0===t.fnRecordsDisplay()?n.sInfoEmpty+" "+n.sInfoFiltered.replace("_MAX_",c)+n.sInfoPostFix:t.fnRecordsDisplay()==t.fnRecordsTotal()?n.sInfo.replace("_START_",a).replace("_END_",l).replace("_MAX_",c).replace("_TOTAL_",u)+n.sInfoPostFix:n.sInfo.replace("_START_",a).replace("_END_",l).replace("_MAX_",c).replace("_TOTAL_",u)+" "+n.sInfoFiltered.replace("_MAX_",t.fnFormatNumber(t.fnRecordsTotal()))+n.sInfoPostFix,(n=n.fnInfoCallback)&&(a=n.call(t.oInstance,t,r,i,o,s,a)),void 0!==(r=t.aanFeatures.i))for(o=0,s=r.length;o<s;o++)e(r[o]).html(a);e(t.nTable).triggerHandler("info.dt")}}}),o.defaults={trace:!1,rowHeight:"auto",serverWait:200,displayBuffer:9,boundaryScale:.5,loadingIndicator:!1},o.oDefaults=o.defaults,o.version="1.5.1","function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.10.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(e){var t=e.oInit;new o(e,t.scroller||t.oScroller||{})},cFeature:"S",sFeature:"Scroller"}):alert("Warning: Scroller requires DataTables 1.10.0 or greater - www.datatables.net/download"),e(n).on("preInit.dt.dtscroller",function(t,n){if("dt"===t.namespace){var i=n.oInit.scroller,s=r.defaults.scroller;(i||s)&&(s=e.extend({},i,s),!1!==i&&new o(n,s))}}),e.fn.dataTable.Scroller=o,e.fn.DataTable.Scroller=o;var s=e.fn.dataTable.Api;return s.register("scroller()",function(){return this}),s.register("scroller().rowToPixels()",function(e,t,n){var i=this.context;if(i.length&&i[0].oScroller)return i[0].oScroller.fnRowToPixels(e,t,n
1)}),s.register("scroller().pixelsToRow()",function(e,t,n){var i=this.context;if(i.length&&i[0].oScroller)return i[0].oScroller.fnPixelsToRow(e,t,n)}),s.register(["scroller().scrollToRow()","scroller.toPosition()"],function(e,t){return this.iterator("table",function(n){n.oScroller&&n.oScroller.fnScrollToRow(e,t)}),this}),s.register("row().scrollTo()",function(e){var t=this;return this.iterator("row",function(n,i){if(n.oScroller){var r=t.rows({order:"applied",search:"applied"}).indexes().indexOf(i);n.oScroller.fnScrollToRow(r,e)}}),this}),s.register("scroller.measure()",function(e){return this.iterator("table",function(t){t.oScroller&&t.oScroller.fnMeasure(e)}),this}),s.register("scroller.page()",function(){var e=this.context;if(e.length&&e[0].oScroller)return e[0].oScroller.fnPageInfo()}),o}),$(document).ready(function(){jQuery.extend(jQuery.fn.dataTableExt.oSort,{"extract-date-pre":function(e){var t=e.replace(" ","");return t=t.split(/[\.\-\/]/),Date.parse(t[1]+"/"+t[0]+"/"+t[2])},"extract-date-asc":function(e,t){return e<t?-1:e>t?1:0},"extract-date-desc":function(e,t){return e<t?1:e>t?-1:0}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";function t(e){var t=e.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(t)}function n(e){return function(n){var r=n.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(r)for(var o=0,s=r.length;o<s;++o){var l=r[o].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),c=t(l[0]),u=l[1]||"",d=l[3]||"",h=null;a.hasOwnProperty(l=l[2])&&(h=a[l],h=Number(e[h])),null!==h&&("!"===u&&(h=i(d,h)),""===u&&h<10&&(h="0"+h.toString()),n=n.replace(c,h.toString()))}return n.replace(/%%/,"%")}}function i(e,t){var n="s",i="";return e&&(1===(e=e.replace(/(:|;|\s)/gi,"").split(/\,/)).length?n=e[0]:(i=e[0],n=e[1])),Math.abs(t)>1?n:i}var r=[],o=[],s={precision:100,elapse:!1,defer:!1};o.push(/^[0-9]*$/.source),o.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),o.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),o=new RegExp(o.join("|"));var a={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},l=function(t,n,i){this.el=t,this.$el=e(t),this.interval=null,this.offset={},this.options=e.extend({},s),this.instanceNumber=r.length,r.push(this),this.$el.data("countdown-instance",this.instanceNumber),i&&("function"==typeof i?(this.$el.on("update.countdown",i),this.$el.on("stoped.countdown",i),this.$el.on("finish.countdown",i)):this.options=e.extend({},s,i)),this.setFinalDate(n),!1===this.options.defer&&this.start()};e.extend(l.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var e=this;this.update(),this.interval=setInterval(function(){e.update.call(e)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),r[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(e){this.finalDate=function(e){if(e instanceof Date)return e;if(String(e).match(o))return String(e).match(/^[0-9]*$/)&&(e=Number(e)),String(e).match(/\-/)&&(e=String(e).replace(/\-/g,"/")),new Date(e);throw new Error("Couldn't cast `"+e+"` to a date object.")}(e)},update:function(){if(0!==this.$el.closest("html").length){var t,n=void 0!==e._data(this.el,"events"),i=new Date;t=this.finalDate.getTime()-i.getTime(),t=Math.ceil(t/1e3),t=!this.options.elapse&&t<0?0:Math.abs(t),this.totalSecsLeft!==t&&n&&(this.totalSecsLeft=t,this.elapsed=i>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-i.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))}else this.remove()},dispatchEvent:function(t){var i=e.Event(t+".countdown");i.finalDate=this.finalDate,i.elapsed=this.elapsed,i.offset=e.extend({},this.offset),i.strftime=n(this.offset),this.$el.trigger(i)}}),e.fn.countdown=function(){var t=Array.prototype.slice.call(arguments,0);
vendor: 4,403 bytes, line 1
1return this.each(function(){var n=e(this).data("countdown-instance");if(void 0!==n){var i=r[n],o=t[0];l.prototype.hasOwnProperty(o)?i[o].apply(i,t.slice(1)):null===String(o).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(i.setFinalDate.call(i,o),i.start()):e.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,o))}else new l(this,t[0],t[1])})}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t||(t=window),n||(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n,t,t.document)}:e(jQuery,window,document)}(function(e,t,n,i){"use strict";var r,o,s,a,l=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new o(e?ot(this[r.iApiIndex]):this)},this.fnAddData=function(t,n){var r=this.api(!0),o=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);return(n===i||n)&&r.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===i||e?t.draw(!1):""===r.sX&&""===r.sY||Be(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===i||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),o=r.rows(e),s=o.settings()[0],a=s.aoData[o[0][0]];return o.remove(),t&&t.call(this,s,a),(n===i||n)&&r.draw(),a},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,r,o,s){var a=this.api(!0);null===t||t===i?a.search(e,n,r,s):a.column(t).search(e,n,r,s),a.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==i){var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==i||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==i?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var i=t.cell(e).index();return[i.row,i.columnVisible,i.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===i||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===i||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return ot(this[r.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,o){var s=this.api(!0);return n===i||null===n?s.row(t).data(e):s.cell(t,n).data(e),(o===i||o)&&s.columns.adjust(),(r===i||r)&&s.draw(),0},this.fnVersionCheck=r.fnVersionCheck;var n=this,s=t===i,a=this.length;for(var c in s&&(t={}),this.oApi=this.internal=r.internal,l.ext.internal)c&&(this[c]=xt(c));return this.each(function(){var r,o=a>1?lt({},t,!0):t,c=0,u=this.getAttribute("id"),d=!1,h=l.defaults,p=e(this);if("table"==this.nodeName.toLowerCase()){k(h),O(h.column),R(h,h,!0),R(h.column,h.column,!0),R(h,e.extend(o,p.data()));var f=l.settings;for(c=0,r=f.length;c<r;c++){var g=f[c];if(g.nTable==this||g.nTHead&&g.nTHead.parentNode==this||g.nTFoot&&g.nTFoot.parentNode==this){var m=o.bDestroy!==i?o.bDestroy:h.bDestroy;if(s||(o.bRetrieve!==i?o.bRetrieve:h.bRetrieve))return g.oInstance;if(m){g.oInstance.fnDestroy();break}return void st(g,0,"Cannot reinitialise DataTable",3)}if(g.sTableId==this.id){f.splice(c,1);break}}null!==u&&""!==u||(u="DataTables_Table_"+l.ext._unique++,this.id=u);var v=e.extend(!0,{},l.models.oSettings,{sDestroyWidth:p[0].style.width,sInstance:u,sTableId:u});v.nTable=this,v.oApi=n.internal,v.oInit=o,f.push(v),v.oInstance=1===n.length?n:p.dataTable(),k(o),D(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=e.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=lt(e.extend(!0,{},h),o),at(v.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),at(v,o,["asStripeClasses","ajax","fnServerData","f
1nFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),at(v.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),at(v.oLanguage,o,"fnInfoCallback"),ut(v,"aoDrawCallback",o.fnDrawCallback,"user"),ut(v,"aoServerParams",o.fnServerParams,"user"),ut(v,"aoStateSaveParams",o.fnStateSaveParams,"user"),ut(v,"aoStateLoadParams",o.fnStateLoadParams,"user"),ut(v,"aoStateLoaded",o.fnStateLoaded,"user"),ut(v,"aoRowCallback",o.fnRowCallback,"user"),ut(v,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ut(v,"aoHeaderCallback",o.fnHeaderCallback,"user"),ut(v,"aoFooterCallback",o.fnFooterCallback,"user"),ut(v,"aoInitComplete",o.fnInitComplete,"user"),ut(v,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),v.rowIdFn=J(o.rowId),x(v);var y=v.oClasses;if(e.extend(y,l.ext.classes,o.oClasses),p.addClass(y.sTable),v.iInitDisplayStart===i&&(v.iInitDisplayStart=o.iDisplayStart,v._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){v.bDeferLoading=!0;var b=e.isArray(o.iDeferLoading);v._iRecordsDisplay=b?o.iDeferLoading[0]:o.iDeferLoading,v._iRecordsTotal=b?o.iDeferLoading[1]:o.iDeferLoading}var _=v.oLanguage;e.extend(!0,_,o.oLanguage),_.sUrl&&(e.ajax({dataType:"json",url:_.sUrl,success:function(t){D(t),R(h.oLanguage,t),e.extend(!0,_,t),xe(v)},error:function(){xe(v)}}),d=!0),null===o.asStripeClasses&&(v.asStripeClasses=[y.sStripeOdd,y.sStripeEven]);var S=v.asStripeClasses,w=p.children("tbody").find("tr").eq(0);-1!==e.inArray(!0,e.map(S,function(e,t){return w.hasClass(e)}))&&(e("tbody tr",this).removeClass(S.join(" ")),v.asDestroyStripes=S.slice());var E,T=[],C=this.getElementsByTagName("thead");if(0!==C.length&&(ue(v.aoHeader,C[0]),T=de(v)),null===o.aoColumns)for(E=[],c=0,r=T.length;c<r;c++)E.push(null);else E=o.aoColumns;for(c=0,r=E.length;c<r;c++)P(v,T?T[c]:null);if(V(v,o.aoColumnDefs,E,function(e,t){M(v,e,t)}),w.length){var I=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};e(w[0]).children("th, td").each(function(e,t){var n=v.aoColumns[e];if(n.mData===e){var r=I(t,"sort")||I(t,"order"),o=I(t,"filter")||I(t,"search");null===r&&null===o||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:i,type:null!==r?e+".@data-"+r:i,filter:null!==o?e+".@data-"+o:i},M(v,e))}})}var A=v.oFeatures,N=function(){if(o.aaSorting===i){var t=v.aaSorting;for(c=0,r=t.length;c<r;c++)t[c][1]=v.aoColumns[c].asSorting[0]}tt(v),A.bSort&&ut(v,"aoDrawCallback",function(){if(v.bSorted){var t=Je(v),n={};e.each(t,function(e,t){n[t.src]=t.dir}),dt(v,null,"order",[v,t,n]),Qe(v)}}),ut(v,"aoDrawCallback",function(){(v.bSorted||"ssp"===ft(v)||A.bDeferRender)&&tt(v)},"sc");var n=p.children("caption").each(function(){this._captionSide=e(this).css("caption-side")}),s=p.children("thead");0===s.length&&(s=e("<thead/>").appendTo(p)),v.nTHead=s[0];var a=p.children("tbody");0===a.length&&(a=e("<tbody/>").appendTo(p)),v.nTBody=a[0];var l=p.children("tfoot");if(0===l.length&&n.length>0&&(""!==v.oScroll.sX||""!==v.oScroll.sY)&&(l=e("<tfoot/>").appendTo(p)),0===l.length||0===l.children().length?p.addClass(y.sNoFooter):l.length>0&&(v.nTFoot=l[0],ue(v.aoFooter,v.nTFoot)),o.aaData)for(c=0;c<o.aaData.length;c++)W(v,o.aaData[c]);else(v.bDeferLoading||"dom"==ft(v))&&z(v,e(v.nTBody).children("tr"));v.aiDisplay=v.aiDisplayMaster.slice(),v.bInitialised=!0,!1===d&&xe(v)};o.bStateSave?(A.bStateSave=!0,ut(v,"aoDrawCallback",it,"state_save"),rt(v,0,N)):N()}else st(null,0,"Non-table node initialisation ("+this.nodeName+")",2)}),n=null,this},c={},u=/[\r\n]/g,d=/<.*?>/g,h=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,p=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),f=/[',$\xa3\u20ac\xa5%\u2009\u202F\u20BD\u20a9\u20BArfk\u0243\u039e]/gi,g=function(e){return!e||!0===e||"-"===e},m=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},v=function(e,t){return c[t]||(c[t]=new RegExp(Ee(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(c[t],"."):e},y=function(e,t,n){var i="string"==typeof e;return!!g(e)||(t&&i&&(e=v(e,t)),n&&i&&(e=e.replace(f,"")),!isNaN(parseFloat(e))&&isFinite(e))},b=function(e,t,n){return!!g(e)||function(e){return g(e)||"string"==typeof e}(e)&&!!y(T(e),t,n)||null},_=function(e,t,n){var r=[],o=0,s=e.length;if(n!==i)for(;o<s;o++)e[o]&&e[o][t]&&r.push(e[o][t][n]);else for(;o<s;o++)e[o]&&r.push(e[o][t]);return r},S=function(e,t,n,r){var o=[],s=0,a=t.length;if(r!==i)for(;s<a;s++)e[t[s]][n]&&o.push(e[t[s]][n][r]);else for(;s<a;s++)o.push(e[t[s]][n]);return o},w=function(e,t){var n,r=[];t===i?(t=0,n=e):(n=t,t=e);for(var o=t;o<n;o++)r.push(o);return r},E=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&t.push(e[n]);return t},T=function(e){return e.replace(d,"")},C=function(e){if(function(e){if(e.length<2)return!0;for(var t=e.slice().sort(),n=t[0],i=1,r=t.length;i<r;i++){if(t[i]===n)return!1;n=t[i]}return!0}(e))return e.slice();var t,n,i,r=[],o=e.length,s=0;e:for(n=0;n<o;n++){for(t=e[n],i=0;i<s;i++)if(r[i]===t)continue e;r.push(t),s++}return r};function I(t){var n,i,r={};e.each(t,function(e,o){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(i=e.replace(n[0],n[2].toLowerCase()),r[i]=e,"o"===n[1]&&I(t[e]))}),t._hungarianMap=r}function R(t,n,r){var o;t._hungarianMap||I(t),e.each(n,function(s,a){(o=t._hungarianMap[s])===i||!r&&n[o]!==i||("o"===o.charAt(0)?(n[o]||(n[o]={}
vendor: 10,915 bytes, line 1
1),e.extend(!0,n[o],n[s]),R(t[o],n[o],r)):n[o]=n[s])})}function D(e){var t=l.defaults.oLanguage,n=t.sDecimal;if(n&&kt(n),e){var i=e.sZeroRecords;!e.sEmptyTable&&i&&"No data available in table"===t.sEmptyTable&&at(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&i&&"Loading..."===t.sLoadingRecords&&at(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var r=e.sDecimal;r&&n!==r&&kt(r)}}l.util={throttle:function(e,t){var n,r,o=t!==i?t:200;return function(){var t=this,s=+new Date,a=arguments;n&&s<n+o?(clearTimeout(r),r=setTimeout(function(){n=i,e.apply(t,a)},o)):(n=s,e.apply(t,a))}},escapeRegex:function(e){return e.replace(p,"\\$1")}};var A=function(e,t,n){e[t]!==i&&(e[n]=e[t])};function k(e){A(e,"ordering","bSort"),A(e,"orderMulti","bSortMulti"),A(e,"orderClasses","bSortClasses"),A(e,"orderCellsTop","bSortCellsTop"),A(e,"order","aaSorting"),A(e,"orderFixed","aaSortingFixed"),A(e,"paging","bPaginate"),A(e,"pagingType","sPaginationType"),A(e,"pageLength","iDisplayLength"),A(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,i=t.length;n<i;n++)t[n]&&R(l.models.oSearch,t[n])}function O(t){A(t,"orderable","bSortable"),A(t,"orderData","aDataSort"),A(t,"orderSequence","asSorting"),A(t,"orderDataType","sortDataType");var n=t.aDataSort;"number"!=typeof n||e.isArray(n)||(t.aDataSort=[n])}function x(n){if(!l.__browser){var i={};l.__browser=i;var r=e("<div/>").css({position:"fixed",top:0,left:-1*e(t).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e("<div/>").css({width:"100%",height:10}))).appendTo("body"),o=r.children(),s=o.children();i.barWidth=o[0].offsetWidth-o[0].clientWidth,i.bScrollOversize=100===s[0].offsetWidth&&100!==o[0].clientWidth,i.bScrollbarLeft=1!==Math.round(s.offset().left),i.bBounding=!!r[0].getBoundingClientRect().width,r.remove()}e.extend(n.oBrowser,l.__browser),n.oScroll.iBarWidth=l.__browser.barWidth}function N(e,t,n,r,o,s){var a,l=r,c=!1;for(n!==i&&(a=n,c=!0);l!==o;)e.hasOwnProperty(l)&&(a=c?t(a,e[l],l,e):e[l],c=!0,l+=s);return a}function P(t,i){var r=l.defaults.column,o=t.aoColumns.length,s=e.extend({},l.models.oColumn,r,{nTh:i||n.createElement("th"),sTitle:r.sTitle?r.sTitle:i?i.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[o],mData:r.mData?r.mData:o,idx:o});t.aoColumns.push(s);var a=t.aoPreSearchCols;a[o]=e.extend({},l.models.oSearch,a[o]),M(t,o,e(i).data())}function M(t,n,r){var o=t.aoColumns[n],s=t.oClasses,a=e(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=a.attr("width")||null;var c=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(o.sWidthOrig=c[1])}r!==i&&null!==r&&(O(r),R(l.defaults.column,r),r.mDataProp===i||r.mData||(r.mData=r.mDataProp),r.sType&&(o._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),r.sClass&&a.addClass(r.sClass),e.extend(o,r),at(o,r,"sWidth","sWidthOrig"),r.iDataSort!==i&&(o.aDataSort=[r.iDataSort]),at(o,r,"aDataSort"));var u=o.mData,d=J(u),h=o.mRender?J(o.mRender):null,p=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};o._bAttrSrc=e.isPlainObject(u)&&(p(u.sort)||p(u.type)||p(u.filter)),o._setter=null,o.fnGetData=function(e,t,n){var r=d(e,t,i,n);return h&&t?h(r,t,e,n):r},o.fnSetData=function(e,t,n){return X(u)(e,t,n)},"number"!=typeof u&&(t._rowReadObject=!0),t.oFeatures.bSort||(o.bSortable=!1,a.addClass(s.sSortableNone));var f=-1!==e.inArray("asc",o.asSorting),g=-1!==e.inArray("desc",o.asSorting);o.bSortable&&(f||g)?f&&!g?(o.sSortingClass=s.sSortableAsc,o.sSortingClassJUI=s.sSortJUIAscAllowed):!f&&g?(o.sSortingClass=s.sSortableDesc,o.sSortingClassJUI=s.sSortJUIDescAllowed):(o.sSortingClass=s.sSortable,o.sSortingClassJUI=s.sSortJUI):(o.sSortingClass=s.sSortableNone,o.sSortingClassJUI="")}function L(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;ze(e);for(var n=0,i=t.length;n<i;n++)t[n].nTh.style.width=t[n].sWidth}var r=e.oScroll;""===r.sY&&""===r.sX||Be(e),dt(e,null,"column-sizing",[e])}function j(e,t){var n=H(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function F(t,n){var i=H(t,"bVisible"),r=e.inArray(n,i);return-1!==r?r:null}function U(t){var n=0;return e.each(t.aoColumns,function(t,i){i.bVisible&&"none"!==e(i.nTh).css("display")&&n++}),n}function H(t,n){var i=[];return e.map(t.aoColumns,function(e,t){e[n]&&i.push(t)}),i}function B(e){var t,n,r,o,s,a,c,u,d,h=e.aoColumns,p=e.aoData,f=l.ext.type.detect;for(t=0,n=h.length;t<n;t++)if(d=[],!(c=h[t]).sType&&c._sManualType)c.sType=c._sManualType;else if(!c.sType){for(r=0,o=f.length;r<o;r++){for(s=0,a=p.length;s<a&&(d[s]===i&&(d[s]=q(e,s,t,"type")),(u=f[r](d[s],e))||r===f.length-1)&&"html"!==u;s++);if(u){c.sType=u;break}}c.sType||(c.sType="string")}}function V(t,n,r,o){var s,a,l,c,u,d,h,p=t.aoColumns;if(n)for(s=n.length-1;s>=0;s--){var f=(h=n[s]).targets!==i?h.targets:h.aTargets;for(e.isArray(f)||(f=[f]),l=0,c=f.length;l<c;l++)if("number"==typeof f[l]&&f[l]>=0){for(;p.length<=f[l];)P(t);o(f[l],h)}else if("number"==typeof f[l]&&f[l]<0)o(p.length+f[l],h);else if("string"==typeof f[l])for(u=0,d=p.length;u<d;u++)("_all"==f[l]||e(p[u].nTh).hasClass(f[l]))&&o(u,h)}if(r)for(s=0,a=r.length;s<a;s++)o(s,r[s])}function W(t,n,r,o){var s=t.aoData.length,a=e.extend(!0,{},l.models.oRow,{src:r?"dom":"data",idx:s});a._aData=n,t.aoData.push(a);for(var c=t.aoColumns,u=0,d=c.length;u<d;u++)c[u].sType=null;t.aiDisplayMaster.push(s);var h=t.rowIdFn(n);return h!==i&&(t.aIds[h]=a),!r&&t.oFeatures.bDeferRender||ie(t,s,r,o),s}function z(t,n){var i;return n instanceof e||(n=e(n)),n.map(function(e,n){return i=ne(t,n),W(t,i.data,n,i.cells)})}function q(e,t,n,r){var o=e.iDraw,s=e.aoColumns[n],a=e.aoData[t]._aData,l=s.sDefaultContent,c=s.fnGetData(a,r,{settings:e,row:t,col:n});if(c===i)return e.iDrawError!=o&&null===l&&(st(e,0,"Requested unknown parameter "+("function"==typeof s.mData?"{function}":"'"+s.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=o),l;if(c!==a&&null!==c||null===l||r===i){if("function"==typeof c)return c.call(a)}else c=l;return null===c&&"display"==r?"":c}function G(e,t,n,i){e.aoColumns[n].fnSetData(e.aoData[t]._aData,i,{settings:e,row:t,col:n})}var Y=/\[.*?\]$/,$=/\(\)$/;function K(t){return e.map(t.match(/(\\.|[^\.])+/g)||[""],function(e){return e.replace(/\\\./g,".")})}function J(t){if(e.isPlainObject(t)){var n={};return e.each(t,function(e,t){t&&(n[e]=J(t))}),function(e,t,r,o){var s=n[t]||n._;return s!==i?s(e,t,r,o):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,i,r){return t(e,n,i,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){return e[t]};var r=function(t,n,o){var s,a,l,c;if(""!==o)for(var u=K(o),d=0,h=u.length;d<h;d++){if(s=u[d].match(Y),a=u[d].match($),s){if(u[d]=u[d].replace(Y,""),""!==u[d]&&(t=t[u[d]]),l=[],u.splice(0,d+1),c=u.join("."),e.isArray(t))for(var p=0,f=t.length;p<f;p++)l.push(r(t[p],n,c));var g=s[0].substring(1,s[0].length-1);t=""===g?l:l.join(g);break}if(a)u[d]=u[d].replace($,""),t=t[u[d]]();else{if(null===t||t[u[d]]===i)return i;t=t[u[d]]}}return t};return function(e,n){return r(e,n,t)}}function X(t){if(e.isPlainObject(t))return X(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,i){t(e,"set",n,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(t,r,o){for(var s,a,l,c,u,d=K(o),h=d[d.length-1],p=0,f=d.length-1;p<f;p++){if(a=d[p].match(Y),l=d[p].match($),a){if(d[p]=d[p].replace(Y,""),t[d[p]]=[],(s=d.slice()).splice(0,p+1),u=s.join("."),e.isArray(r))for(var g=0,m=r.length;g<m;g++)n(c={},r[g],u),t[d[p]].push(c);else t[d[p]]=r;return}l&&(d[p]=d[p].replace($,""),t=t[d[p]](r)),null!==t[d[p]]&&t[d[p]]!==i||(t[d[p]]={}),t=t[d[p]]}h.match($)?t=t[h.replace($,"")](r):t[h.replace(Y,"")]=r};return function(e,i){return n(e,i,t)}}function Q(e){return _(e.aoData,"_aData")}function Z(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ee(e,t,n){for(var r=-1,o=0,s=e.length;o<s;o++)e[o]==t?r=o:e[o]>t&&e[o]--;-1!=r&&n===i&&e.splice(r,1)}function te(e,t,n,r){var o,s,a=e.aoData[t],l=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=q(e,t,i,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==a.src)){var c=a.anCells;if(c)if(r!==i)l(c[r],r);else for(o=0,s=c.length;o<s;o++)l(c[o],o)}else a._aData=ne(e,a,r,r===i?i:a._aData).data;a._aSortData=null,a._aFilterData=null;var u=e.aoColumns;if(r!==i)u[r].sType=null;else{for(o=0,s=u.length;o<s;o++)u[o].sType=null;re(e,a)}}function ne(t,n,r,o){var s,a,l,c=[],u=n.firstChild,d=0,h=t.aoColumns,p=t._rowReadObject;o=o!==i?o:p?{}:[];var f=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(-1!==n){var i=e.substring(n+1);X(e)(o,t.getAttribute(i))}}},g=function(t){r!==i&&r!==d||(a=h[d],l=e.trim(t.innerHTML),a&&a._bAttrSrc?(X(a.mData._)(o,l),f(a.mData.sort,t),f(a.mData.type,t),f(a.mData.filter,t)):p?(a._setter||(a._setter=X(a.mData)),a._setter(o,l)):o[d]=l),d++};if(u)for(;u;)"TD"!=(s=u.nodeName.toUpperCase())&&"TH"!=s||(g(u),c.push(u)),u=u.nextSibling;else for(var m=0,v=(c=n.anCells).length;m<v;m++)g(c[m]);var y=n.firstChild?n:n.nTr;if(y){var b=y.getAttribute("id");b&&X(t.rowId)(o,b)}return{data:o,cells:c}}function ie(t,i,r,o){var s,a,l,c,u,d=t.aoData[i],h=d._aData,p=[];if(null===d.nTr){for(s=r||n.createElement("tr"),d.nTr=s,d.anCells=p,s._DT_RowIndex=i,re(t,d),c=0,u=t.aoColumns.length;c<u;c++)l=t.aoColumns[c],(a=r?o[c]:n.createElement(l.sCellType))._DT_CellIndex={row:i,column:c},p.push(a),r&&!l.mRender&&l.mData===c||e.isPlainObject(l.mData)&&l.mData._===c+".display"||(a.innerHTML=q(t,i,c,"display")),l.sClass&&(a.className+=" "+l.sClass),l.bVisible&&!r?s.appendChild(a):!l.bVisible&&r&&a.parentNode.removeChild(a),l.fnCreatedCell&&l.fnCreatedCell.call(t.oInstance,a,q(t,i,c),h,i,c);dt(t,"aoRowCreatedCallback",null,[s,h,i,p])}d.nTr.setAttribute("role","row")}function re(t,n){var i=n.nTr,r=n._aData;if(i){var o=t.rowIdFn(r);if(o&&(i.id=o),r.DT_RowClass){var s=r.DT_RowClass.split(" ");n.__rowc=n.__rowc?C(n.__rowc.concat(s)):s,e(i).removeClass(n.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowAttr&&e(i).attr(r.DT_RowAttr),r.DT_RowData&&e(i).data(r.DT_RowData)}}function oe(t){var n,i,r,o,s,a=t.nTHead,l=t.nTFoot,c=0===e("th, td",a).length,u=t.oClasses,d=t.aoColumns;for(c&&(o=e("<tr/>").appendTo(a)),n=0,i=d.length;n<i;n++)r=e((s=d[n]).nTh).addClass(s.sClass),c&&r.appendTo(o),t.oFeatures.bSort&&(r.addClass(s.sSortingClass),!1!==s.bSortable&&(r.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),et(t,s.nTh,n))),s.sTitle!=r[0].innerHTML&&r.html(s.sTitle),pt(t,"header")(t,r,s,u);if(c&&ue(t.aoHeader,a),e(a).find(">tr").attr("role","row"),e(a).find(">tr>th, >tr>td").addClass(u.sHeaderTH),e(l).find(">tr>th, >tr>
1td").addClass(u.sFooterTH),null!==l){var h=t.aoFooter[0];for(n=0,i=h.length;n<i;n++)(s=d[n]).nTf=h[n].cell,s.sClass&&e(s.nTf).addClass(s.sClass)}}function se(t,n,r){var o,s,a,l,c,u,d,h,p,f=[],g=[],m=t.aoColumns.length;if(n){for(r===i&&(r=!1),o=0,s=n.length;o<s;o++){for(f[o]=n[o].slice(),f[o].nTr=n[o].nTr,a=m-1;a>=0;a--)t.aoColumns[a].bVisible||r||f[o].splice(a,1);g.push([])}for(o=0,s=f.length;o<s;o++){if(d=f[o].nTr)for(;u=d.firstChild;)d.removeChild(u);for(a=0,l=f[o].length;a<l;a++)if(h=1,p=1,g[o][a]===i){for(d.appendChild(f[o][a].cell),g[o][a]=1;f[o+h]!==i&&f[o][a].cell==f[o+h][a].cell;)g[o+h][a]=1,h++;for(;f[o][a+p]!==i&&f[o][a].cell==f[o][a+p].cell;){for(c=0;c<h;c++)g[o+c][a+p]=1;p++}e(f[o][a].cell).attr("rowspan",h).attr("colspan",p)}}}}function ae(t){var n=dt(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,n)){var r=[],o=0,s=t.asStripeClasses,a=s.length,l=t.oLanguage,c=t.iInitDisplayStart,u="ssp"==ft(t),d=t.aiDisplay;t.bDrawing=!0,c!==i&&-1!==c&&(t._iDisplayStart=u?c:c>=t.fnRecordsDisplay()?0:c,t.iInitDisplayStart=-1);var h=t._iDisplayStart,p=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,Ue(t,!1);else if(u){if(!t.bDestroying&&!pe(t))return}else t.iDraw++;if(0!==d.length)for(var f=u?t.aoData.length:p,g=u?0:h;g<f;g++){var m=d[g],v=t.aoData[m];null===v.nTr&&ie(t,m);var y=v.nTr;if(0!==a){var b=s[o%a];v._sRowStripe!=b&&(e(y).removeClass(v._sRowStripe).addClass(b),v._sRowStripe=b)}dt(t,"aoRowCallback",null,[y,v._aData,o,g,m]),r.push(y),o++}else{var _=l.sZeroRecords;1==t.iDraw&&"ajax"==ft(t)?_=l.sLoadingRecords:l.sEmptyTable&&0===t.fnRecordsTotal()&&(_=l.sEmptyTable),r[0]=e("<tr/>",{class:a?s[0]:""}).append(e("<td />",{valign:"top",colSpan:U(t),class:t.oClasses.sRowEmpty}).html(_))[0]}dt(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],Q(t),h,p,d]),dt(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],Q(t),h,p,d]);var S=e(t.nTBody);S.children().detach(),S.append(e(r)),dt(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}else Ue(t,!1)}function le(e,t){var n=e.oFeatures,i=n.bFilter;n.bSort&&Xe(e),i?ye(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,ae(e),e._drawHold=!1}function ce(t){var n=t.oClasses,i=e(t.nTable),r=e("<div/>").insertBefore(i),o=t.oFeatures,s=e("<div/>",{id:t.sTableId+"_wrapper",class:n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=r[0],t.nTableWrapper=s[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var a,c,u,d,h,p,f=t.sDom.split(""),g=0;g<f.length;
vendor: 9,023 bytes, line 1
1g++){if(a=null,"<"==(c=f[g])){if(u=e("<div/>")[0],"'"==(d=f[g+1])||'"'==d){for(h="",p=2;f[g+p]!=d;)h+=f[g+p],p++;if("H"==h?h=n.sJUIHeader:"F"==h&&(h=n.sJUIFooter),-1!=h.indexOf(".")){var m=h.split(".");u.id=m[0].substr(1,m[0].length-1),u.className=m[1]}else"#"==h.charAt(0)?u.id=h.substr(1,h.length-1):u.className=h;g+=p}s.append(u),s=e(u)}else if(">"==c)s=s.parent();else if("l"==c&&o.bPaginate&&o.bLengthChange)a=Me(t);else if("f"==c&&o.bFilter)a=ve(t);else if("r"==c&&o.bProcessing)a=Fe(t);else if("t"==c)a=He(t);else if("i"==c&&o.bInfo)a=Ae(t);else if("p"==c&&o.bPaginate)a=Le(t);else if(0!==l.ext.feature.length)for(var v=l.ext.feature,y=0,b=v.length;y<b;y++)if(c==v[y].cFeature){a=v[y].fnInit(t);break}if(a){var _=t.aanFeatures;_[c]||(_[c]=[]),_[c].push(a),s.append(a)}}r.replaceWith(s),t.nHolding=null}function ue(t,n){var i,r,o,s,a,l,c,u,d,h,p,f=e(n).children("tr"),g=function(e,t,n){for(var i=e[t];i[n];)n++;return n};for(t.splice(0,t.length),o=0,l=f.length;o<l;o++)t.push([]);for(o=0,l=f.length;o<l;o++)for(u=0,r=(i=f[o]).firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase())for(d=1*r.getAttribute("colspan"),h=1*r.getAttribute("rowspan"),d=d&&0!==d&&1!==d?d:1,h=h&&0!==h&&1!==h?h:1,c=g(t,o,u),p=1===d,a=0;a<d;a++)for(s=0;s<h;s++)t[o+s][c+a]={cell:r,unique:p},t[o+s].nTr=i;r=r.nextSibling}}function de(e,t,n){var i=[];n||(n=e.aoHeader,t&&ue(n=[],t));for(var r=0,o=n.length;r<o;r++)for(var s=0,a=n[r].length;s<a;s++)!n[r][s].unique||i[s]&&e.bSortCellsTop||(i[s]=n[r][s].cell);return i}function he(t,n,i){if(dt(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var r={},o=/(.*?)\[\]$/;e.each(n,function(e,t){var n=t.name.match(o);if(n){var i=n[0];r[i]||(r[i]=[]),r[i].push(t.value)}else r[t.name]=t.value}),n=r}var s,a=t.ajax,l=t.oInstance,c=function(e){dt(t,null,"xhr",[t,e,t.jqXHR]),i(e)};if(e.isPlainObject(a)&&a.data){var u="function"==typeof(s=a.data)?s(n,t):s;n="function"==typeof s&&u?u:e.extend(!0,n,u),delete a.data}var d={data:n,success:function(e){var n=e.error||e.sError;n&&st(t,0,n),t.json=e,c(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(n,i,r){var o=dt(t,null,"xhr",[t,null,t.jqXHR]);-1===e.inArray(!0,o)&&("parsererror"==i?st(t,0,"Invalid JSON response",1):4===n.readyState&&st(t,0,"Ajax error",7)),Ue(t,!1)}};t.oAjaxData=n,dt(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(l,t.sAjaxSource,e.map(n,function(e,t){return{name:t,value:e}}),c,t):t.sAjaxSource||"string"==typeof a?t.jqXHR=e.ajax(e.extend(d,{url:a||t.sAjaxSource})):"function"==typeof a?t.jqXHR=a.call(l,n,c,t):(t.jqXHR=e.ajax(e.extend(d,a)),a.data=s)}function pe(e){return!e.bAjaxDataGet||(e.iDraw++,Ue(e,!0),he(e,fe(e),function(t){ge(e,t)}),!1)}function fe(t){var n,i,r,o,s=t.aoColumns,a=s.length,c=t.oFeatures,u=t.oPreviousSearch,d=t.aoPreSearchCols,h=[],p=Je(t),f=t._iDisplayStart,g=!1!==c.bPaginate?t._iDisplayLength:-1,m=function(e,t){h.push({name:e,value:t})};m("sEcho",t.iDraw),m("iColumns",a),m("sColumns",_(s,"sName").join(",")),m("iDisplayStart",f),m("iDisplayLength",g);var v={draw:t.iDraw,columns:[],order:[],start:f,length:g,search:{value:u.sSearch,regex:u.bRegex}};for(n=0;n<a;n++)o=d[n],v.columns.push({data:i="function"==typeof(r=s[n]).mData?"function":r.mData,name:r.sName,searchable:r.bSearchable,orderable:r.bSortable,search:{value:o.sSearch,regex:o.bRegex}}),m("mDataProp_"+n,i),c.bFilter&&(m("sSearch_"+n,o.sSearch),m("bRegex_"+n,o.bRegex),m("bSearchable_"+n,r.bSearchable)),c.bSort&&m("bSortable_"+n,r.bSortable);c.bFilter&&(m("sSearch",u.sSearch),m("bRegex",u.bRegex)),c.bSort&&(e.each(p,function(e,t){v.order.push({column:t.col,dir:t.dir}),m("iSortCol_"+e,t.col),m("sSortDir_"+e,t.dir)}),m("iSortingCols",p.length));var y=l.ext.legacy.ajax;return null===y?t.sAjaxSource?h:v:y?h:v}function ge(e,t){var n=function(e,n){return t[e]!==i?t[e]:t[n]},r=me(e,t),o=n("sEcho","draw"),s=n("iTotalRecords","recordsTotal"),a=n("iTotalDisplayRecords","recordsFiltered");if(o){if(1*o<e.iDraw)return;e.iDraw=1*o}Z(e),e._iRecordsTotal=parseInt(s,10),e._iRecordsDisplay=parseInt(a,10);for(var l=0,c=r.length;l<c;l++)W(e,r[l]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,ae(e),e._bInitComplete||Ne(e,t),e.bAjaxDataGet=!0,Ue(e,!1)}function me(t,n){var r=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==i?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?J(r)(n):n}function ve(t){var i=t.oClasses,r=t.sTableId,o=t.oLanguage,s=t.oPreviousSearch,a=t.aanFeatures,l='<input type="search" class="'+i.sFilterInput+'"/>',c=o.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l;var u=e("<div/>",{id:a.f?null:r+"_filter",class:i.sFilter}).append(e("<label/>").append(c)),d=function(){var e=this.value?this.value:"";e!=s.sSearch&&(ye(t,{sSearch:e,bRegex:s.bRegex,bSmart:s.bSmart,bCaseInsensitive:s.bCaseInsensitive}),t._iDisplayStart=0,ae(t))},h=null!==t.searchDelay?t.searchDelay:"ssp"===ft(t)?400:0,p=e("input",u).val(s.sSearch).attr("placeholder",o.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?qe(d,h):d).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",r);return e(t.nTable).on("search.dt.DT",function(e,i){if(t===i)try{p[0]!==n.activeElement&&p.val(s.sSearch)}catch(e){}}),u[0]}function ye(e,t,n){var r=e.oPreviousSearch,o=e.aoPreSearchCols,s=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},a=function(e){return e.bEscapeRegex!==i?!e.bEscapeRegex:e.bRegex};if(B(e),"ssp"!=ft(e)){Se(e,t.sSearch,n,a(t),t.bSmart,t.bCaseInsensitive),s(t);for(var l=0;l<o.length;l++)_e(e,o[l].sSearch,l,a(o[l]),o[l].bSmart,o[l].bCaseInsensitive);be(e)}else s(t);e.bFiltered=!0,dt(e,null,"search",[e])}function be(t){for(var n,i,r=l.ext.search,o=t.aiDisplay,s=0,a=r.length;s<a;s++){for(var c=[],u=0,d=o.length;u<d;u++)r[s](t,(n=t.aoData[i=o[u]])._aFilterData,i,n._aData,u)&&c.push(i);o.length=0,e.merge(o,c)}}function _e(e,t,n,i,r,o){if(""!==t){for(var s=[],a=e.aiDisplay,l=we(t,i,r,o),c=0;c<a.length;c++)l.test(e.aoData[a[c]]._aFilterData[n])&&s.push(a[c]);e.aiDisplay=s}}function Se(e,t,n,i,r,o){var s,a,c,u=we(t,i,r,o),d=e.oPreviousSearch.sSearch,h=e.aiDisplayMaster,p=[];if(0!==l.ext.search.length&&(n=!0),a=Ie(e),t.length<=0)e.aiDisplay=h.slice();else{for((a||n||d.length>t.length||0!==t.indexOf(d)||e.bSorted)&&(e.aiDisplay=h.slice()),s=e.aiDisplay,c=0;c<s.length;c++)u.test(e.aoData[s[c]]._sFilterRow)&&p.push(s[c]);e.aiDisplay=p}}function we(t,n,i,r){return t=n?t:Ee(t),i&&(t="^(?=.*?"+e.map(t.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$"),new RegExp(t,r?"i":"")}var Ee=l.util.escapeRegex,Te=e("<div>")[0],Ce=Te.textContent!==i;function Ie(e){var t,n,i,r,o,s,a,c,u=e.aoColumns,d=l.ext.type.search,h=!1;for(n=0,r=e.aoData.length;n<r;n++)if(!(c=e.aoData[n])._aFilterData){for(s=[],i=0,o=u.length;i<o;i++)(t=u[i]).bSearchable?(a=q(e,n,i,"filter"),d[t.sType]&&(a=d[t.sType](a)),null===a&&(a=""),"string"!=typeof a&&a.toString&&(a=a.toString())):a="",a.indexOf&&-1!==a.indexOf("&")&&(Te.innerHTML=a,a=Ce?Te.textContent:Te.innerText),a.replace&&(a=a.replace(/[\r\n]/g,"")),s.push(a);c._aFilterData=s,c._sFilterRow=s.join("  "),h=!0}return h}function Re(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function De(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function Ae(t){var n=t.sTableId,i=t.aanFeatures.i,r=e("<div/>",{class:t.oClasses.sInfo,id:i?null:n+"_info"});return i||(t.aoDrawCallback.push({fn:ke,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),r[0]}function ke(t){var n=t.aanFeatures.i;if(0!==n.length){var i=t.oLanguage,r=t._iDisplayStart+1,o=t.fnDisplayEnd(),s=t.fnRecordsTotal(),a=t.fnRecordsDisplay(),l=a?i.sInfo:i.sInfoEmpty;a!==s&&(l+=" "+i.sInfoFiltered),l=Oe(t,l+=i.sInfoPostFix);var c=i.fnInfoCallback;null!==c&&(l=c.call(t.oInstance,t,r,o,s,a,l)),e(n).html(l)}}function Oe(e,t){var n=e.fnFormatNumber,i=e._iDisplayStart+1,r=e._iDisplayLength,o=e.fnRecordsDisplay(),s=-1===r;return t.replace(/_START_/g,n.call(e,i)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,s?1:Math.ceil(i/r))).replace(/_PAGES_/g,n.call(e,s?1:Math.ceil(o/r)))}function xe(e){var t,n,i,r=e.iInitDisplayStart,o=e.aoColumns,s=e.oFeatures,a=e.bDeferLoading;if(e.bInitialised){for(ce(e),oe(e),se(e,e.aoHeader),se(e,e.aoFooter),Ue(e,!0),s.bAutoWidth&&ze(e),t=0,n=o.length;t<n;t++)(i=o[t]).sWidth&&(i.nTh.style.width=Ke(i.sWidth));dt(e,null,"preInit",[e]),le(e);var l=ft(e);("ssp"!=l||a)&&("ajax"==l?he(e,[],function(n){var i=me(e,n);for(t=0;t<i.length;t++)W(e,i[t]);e.iInitDisplayStart=r,le(e),Ue(e,!1),Ne(e,n)}):(Ue(e,!1),Ne(e)))}else setTimeout(function(){xe(e)},200)}function Ne(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&L(e),dt(e,null,"plugin-init",[e,t]),dt(e,"aoInitComplete","
1init",[e,t])}function Pe(e,t){var n=parseInt(t,10);e._iDisplayLength=n,ht(e),dt(e,null,"length",[e,n])}function Me(t){for(var n=t.oClasses,i=t.sTableId,r=t.aLengthMenu,o=e.isArray(r[0]),s=o?r[0]:r,a=o?r[1]:r,l=e("<select/>",{name:i+"_length","aria-controls":i,class:n.sLengthSelect}),c=0,u=s.length;c<u;c++)l[0][c]=new Option("number"==typeof a[c]?t.fnFormatNumber(a[c]):a[c],s[c]);var d=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(d[0].id=i+"_length"),d.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),e("select",d).val(t._iDisplayLength).on("change.DT",function(n){Pe(t,e(this).val()),ae(t)}),e(t.nTable).on("length.dt.DT",function(n,i,r){t===i&&e("select",d).val(r)}),d[0]}function Le(t){var n=t.sPaginationType,i=l.ext.pager[n],r="function"==typeof i,o=function(e){ae(e)},s=e("<div/>").addClass(t.oClasses.sPaging+n)[0],a=t.aanFeatures;return r||i.fnInit(t,s,o),a.p||(s.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(r){var t,n,s=e._iDisplayStart,l=e._iDisplayLength,c=e.fnRecordsDisplay(),u=-1===l,d=u?0:Math.ceil(s/l),h=u?1:Math.ceil(c/l),p=i(d,h);for(t=0,n=a.p.length;t<n;t++)pt(e,"pageButton")(e,a.p[t],t,p,d,h)}else i.fnUpdate(e,o)},sName:"pagination"})),s}function je(e,t,n){var i=e._iDisplayStart,r=e._iDisplayLength,o=e.fnRecordsDisplay();0===o||-1===r?i=0:"number"==typeof t?(i=t*r)>o&&(i=0):"first"==t?i=0:"previous"==t?(i=r>=0?i-r:0)<0&&(i=0):"next"==t?i+r<o&&(i+=r):"last"==t?i=Math.floor((o-1)/r)*r:st(e,0,"Unknown paging action: "+t,5);var s=e._iDisplayStart!==i;return e._iDisplayStart=i,s&&(dt(e,null,"page",[e]),n&&ae(e)),s}function Fe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function Ue(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),dt(t,null,"processing",[t,n])}function He(t){var n=e(t.nTable);n.attr("role","grid");var i=t.oScroll;if(""===i.sX&&""===i.sY)return t.nTable;var r=i.sX,o=i.sY,s=t.oClasses,a=n.children("caption"),l=a.length?a[0]._captionSide:null,c=e(n[0].cloneNode(!1)),u=e(n[0].cloneNode(!1)),d=n.children("tfoot"),h="<div/>",p=function(e){return e?Ke(e):null};d.length||(d=null);var f=e(h,{class:s.sScrollWrapper}).append(e(h,{class:s.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?p(r):"100%"}).append(e(h,{class:s.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?a:null).append(n.children("thead"))))).append(e(h,{class:s.sScrollBody}).css({position:"relative",overflow:"auto",width:p(r)}).append(n));d&&f.append(e(h,{class:s.sScrollFoot}).css({overflow:"hidden",border:0,width:r?p(r):"100%"}).append(e(h,{class:s.sScrollFootInner}).append(u.removeAttr("id").css("margin-left",0).append("bottom"===l?a:null).append(n.children("tfoot")))));var g=f.children(),m=g[0],v=g[1],y=d?g[2]:null;return r&&e(v).on("scroll.DT",function(e){var t=this.scrollLeft;m.scrollLeft=t,d&&(y.scrollLeft=t)}),e(v).css(o&&i.bCollapse?"max-height":"height",o),t.nScrollHead=m,t.nScrollBody=v,t.nScrollFoot=y,t.aoDrawCallback.push({fn:Be,sName:"scrolling"}),f[0]}function Be(t){var n,r,o,s,a,l,c,u,d,h=t.oScroll,p=h.sX,f=h.sXInner,g=h.sY,m=h.iBarWidth,v=e(t.nScrollHead),y=v[0].style,b=v.children("div"),S=b[0].style,w=b.children("table"),E=t.nScrollBody,T=e(E),C=E.style,I=e(t.nScrollFoot).children("div"),R=I.children("table"),D=e(t.nTHead),A=e(t.nTable),k=A[0],O=k.style,x=t.nTFoot?e(t.nTFoot):null,N=t.oBrowser,P=N.bScrollOversize,M=_(t.aoColumns,"nTh"),F=[],U=[],H=[],B=[],V=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},W=E.scrollHeight>E.clientHeight;if(t.scrollBarVis!==W&&t.scrollBarVis!==i)return t.scrollBarVis=W,void L(t);t.scrollBarVis=W,A.children("thead, tfoot").remove(),x&&(l=x.clone().prependTo(A),r=x.find("tr"),s=l.find("tr")),a=D.clone().prependTo(A),n=D.find("tr"),o=a.find("tr"),a.find("th, td").removeAttr("tabindex"),p||(C.width="100%",v[0].style.width="100%"),e.each(de(t,a),function(e,n){c=j(t,e),n.style.width=t.aoColumns[c].sWidth}),x&&Ve(function(e){e.style.width=""},s),d=A.outerWidth(),""===p?(O.width="100%",P&&(A.find("tbody").height()>E.offsetHeight||"scroll"==T.css("overflow-y"))&&(O.width=Ke(A.outerWidth()-m)),d=A.outerWidth()):""!==f&&(O.width=Ke(f),d=A.outerWidth()),Ve(V,o),Ve(function(t){H.push(t.innerHTML),F.push(Ke(e(t).css("width")))},o),Ve(function(t,n){-1!==e.inArray(t,M)&&(t.style.width=F[n])},n),e(o).height(0),x&&(Ve(V,s),Ve(function(t){B.push(t.innerHTML),U.push(Ke(e(t).css("width")))},s),Ve(function(e,t){e.style.width=U[t]},r),e(s).height(0)),Ve(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+H[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=F[t]},o),x&&Ve(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+B[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=U[t]},s),A.outerWidth()<d?(u=E.scrollHeight>E.offsetHeight||"scroll"==T.css("overflow-y")?d+m:d,P&&(E.scrollHeight>E.offsetHeight||"scroll"==T.css("overflow-y"))&&(O.width=Ke(u-m)),""!==p&&""===f||st(t,1,"Possible column misalignment",6)):u="100%",C.width=Ke(u),y.width=Ke(u),x&&(t.nScrollFoot.style.width=Ke(u)),g||P&&(C.height=Ke(k.offsetHeight+m));var z=A.outerWidth();w[0].style.width=Ke(z),S.width=Ke(z);var q=A.height()>E.clientHeight||"scroll"==T.css("overflow-y"),G="padding"+(N.bScrollbarLeft?"Left":"Right");S[G]=q?m+"px":"0px",x&&(R[0].style.width=Ke(z),I[0].style.width=Ke(z),I[0].style[G]=q?m+"px":"0px"),A.children("colgroup").insertBefore(A.children("thead")),T.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(E.scrollTop=0)}function Ve(e,t,n){for(var i,r,o=0,s=0,a=t.length;s<a;){for(i=t[s].firstChild,r=n?n[s].firstChild:null;i;)1===i.nodeType&&(n?e(i,r,o):e(i,o),o++),i=i.nextSibling,r=n?r.nextSibling:null;s++}}var We=/<.*?>/g;function ze(n){var i,r,o,s=n.nTable,a=n.aoColumns,l=n.oScroll,c=l.sY,u=l.sX,d=l.sXInner,h=a.length,p=H(n,"bVisible"),f=e("th",n.nTHead),g=s.getAttribute("width"),m=s.parentNode,v=!1,y=n.oBrowser,b=y.bScrollOversize,_=s.style.width;for(_&&-1!==_.indexOf("%")&&(g=_),i=0;i<p.length;i++)null!==(r=a[p[i]]).sWidth&&(r.sWidth=Ge(r.sWidthOrig,m),v=!0);if(b||!v&&!u&&!c&&h==U(n)&&h==f.length)for(i=0;i<h;i++){var S=j(n,i);
vendor: 9,629 bytes, line 1
1null!==S&&(a[S].sWidth=Ke(f.eq(i).width()))}else{var w=e(s).clone().css("visibility","hidden").removeAttr("id");w.find("tbody tr").remove();var E=e("<tr/>").appendTo(w.find("tbody"));for(w.find("thead, tfoot").remove(),w.append(e(n.nTHead).clone()).append(e(n.nTFoot).clone()),w.find("tfoot th, tfoot td").css("width",""),f=de(n,w.find("thead")[0]),i=0;i<p.length;i++)f[i].style.width=null!==(r=a[p[i]]).sWidthOrig&&""!==r.sWidthOrig?Ke(r.sWidthOrig):"",r.sWidthOrig&&u&&e(f[i]).append(e("<div/>").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(i=0;i<p.length;i++)r=a[o=p[i]],e(Ye(n,o)).clone(!1).append(r.sContentPadding).appendTo(E);e("[name]",w).removeAttr("name");var T=e("<div/>").css(u||c?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(w).appendTo(m);u&&d?w.width(d):u?(w.css("width","auto"),w.removeAttr("width"),w.width()<m.clientWidth&&g&&w.width(m.clientWidth)):c?w.width(m.clientWidth):g&&w.width(g);var C=0;for(i=0;i<p.length;i++){var I=e(f[i]),R=I.outerWidth()-I.width(),D=y.bBounding?Math.ceil(f[i].getBoundingClientRect().width):I.outerWidth();C+=D,a[p[i]].sWidth=Ke(D-R)}s.style.width=Ke(C),T.remove()}if(g&&(s.style.width=Ke(g)),(g||u)&&!n._reszEvt){var A=function(){e(t).on("resize.DT-"+n.sInstance,qe(function(){L(n)}))};b?setTimeout(A,1e3):A(),n._reszEvt=!0}}var qe=l.util.throttle;function Ge(t,i){if(!t)return 0;var r=e("<div/>").css("width",Ke(t)).appendTo(i||n.body),o=r[0].offsetWidth;return r.remove(),o}function Ye(t,n){var i=$e(t,n);if(i<0)return null;var r=t.aoData[i];return r.nTr?r.anCells[n]:e("<td/>").html(q(t,i,n,"display"))[0]}function $e(e,t){for(var n,i=-1,r=-1,o=0,s=e.aoData.length;o<s;o++)(n=(n=(n=q(e,o,t,"display")+"").replace(We,"")).replace(/&nbsp;/g," ")).length>i&&(i=n.length,r=o);return r}function Ke(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Je(t){var n,r,o,s,a,c,u,d=[],h=t.aoColumns,p=t.aaSortingFixed,f=e.isPlainObject(p),g=[],m=function(t){t.length&&!e.isArray(t[0])?g.push(t):e.merge(g,t)};for(e.isArray(p)&&m(p),f&&p.pre&&m(p.pre),m(t.aaSorting),f&&p.post&&m(p.post),n=0;n<g.length;n++)for(r=0,o=(s=h[u=g[n][0]].aDataSort).length;r<o;r++)c=h[a=s[r]].sType||"string",g[n]._idx===i&&(g[n]._idx=e.inArray(g[n][1],h[a].asSorting)),d.push({src:u,col:a,dir:g[n][1],index:g[n]._idx,type:c,formatter:l.ext.type.order[c+"-pre"]});return d}function Xe(e){var t,n,i,r,o,s=[],a=l.ext.type.order,c=e.aoData,u=0,d=e.aiDisplayMaster;for(B(e),t=0,n=(o=Je(e)).length;t<n;t++)(r=o[t]).formatter&&u++,nt(e,r.col);if("ssp"!=ft(e)&&0!==o.length){for(t=0,i=d.length;t<i;t++)s[d[t]]=t;d.sort(u===o.length?function(e,t){var n,i,r,a,l,u=o.length,d=c[e]._aSortData,h=c[t]._aSortData;for(r=0;r<u;r++)if(0!=(a=(n=d[(l=o[r]).col])<(i=h[l.col])?-1:n>i?1:0))return"asc"===l.dir?a:-a;return(n=s[e])<(i=s[t])?-1:n>i?1:0}:function(e,t){var n,i,r,l,u,d=o.length,h=c[e]._aSortData,p=c[t]._aSortData;for(r=0;r<d;r++)if(n=h[(u=o[r]).col],i=p[u.col],0!==(l=(a[u.type+"-"+u.dir]||a["string-"+u.dir])(n,i)))return l;return(n=s[e])<(i=s[t])?-1:n>i?1:0})}e.bSorted=!0}function Qe(e){for(var t,n,i=e.aoColumns,r=Je(e),o=e.oLanguage.oAria,s=0,a=i.length;s<a;s++){var l=i[s],c=l.asSorting,u=l.sTitle.replace(/<.*?>/g,""),d=l.nTh;d.removeAttribute("aria-sort"),l.bSortable?(r.length>0&&r[0].col==s?(d.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),n=c[r[0].index+1]||c[0]):n=c[0],t=u+("asc"===n?o.sSortAscending:o.sSortDescending)):t=u,d.setAttribute("aria-label",t)}}function Ze(t,n,r,o){var s,a=t.aaSorting,l=t.aoColumns[n].asSorting,c=function(t,n){var r=t._idx;return r===i&&(r=e.inArray(t[1],l)),r+1<l.length?r+1:n?null:0};if("number"==typeof a[0]&&(a=t.aaSorting=[a]),r&&t.oFeatures.bSortMulti){var u=e.inArray(n,_(a,"0"));-1!==u?(null===(s=c(a[u],!0))&&1===a.length&&(s=0),null===s?a.splice(u,1):(a[u][1]=l[s],a[u]._idx=s)):(a.push([n,l[0],0]),a[a.length-1]._idx=0)}else a.length&&a[0][0]==n?(s=c(a[0]),a.length=1,a[0][1]=l[s],a[0]._idx=s):(a.length=0,a.push([n,l[0]]),a[0]._idx=0);le(t),"function"==typeof o&&o(t)}function et(e,t,n,i){var r=e.aoColumns[n];ct(t,{},function(t){!1!==r.bSortable&&(e.oFeatures.bProcessing?(Ue(e,!0),setTimeout(function(){Ze(e,n,t.shiftKey,i),"ssp"!==ft(e)&&Ue(e,!1)},0)):Ze(e,n,t.shiftKey,i))})}function tt(t){var n,i,r=t.aLastSort,o=t.oClasses.sSortColumn,s=Je(t),a=t.oFeatures;if(a.bSort&&a.bSortClasses){for(n=0,i=r.length;n<i;n++)e(_(t.aoData,"anCells",r[n].src)).removeClass(o+(n<2?n+1:3));for(n=0,i=s.length;n<i;n++)e(_(t.aoData,"anCells",s[n].src)).addClass(o+(n<2?n+1:3))}t.aLastSort=s}function nt(e,t){var n,i,r,o=e.aoColumns[t],s=l.ext.order[o.sSortDataType];s&&(n=s.call(e.oInstance,e,t,F(e,t)));for(var a=l.ext.type.order[o.sType+"-pre"],c=0,u=e.aoData.length;c<u;c++)(i=e.aoData[c])._aSortData||(i._aSortData=[]),i._aSortData[t]&&!s||(r=s?n[c]:q(e,c,t,"sort"),i._aSortData[t]=a?a(r):r)}function it(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Re(t.oPreviousSearch),columns:e.map(t.aoColumns,function(e,n){return{visible:e.bVisible,search:Re(t.aoPreSearchCols[n])}})};dt(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function rt(t,n,r){var o,s,a=t.aoColumns,l=function(n){if(n&&n.time){var l=dt(t,"aoStateLoadParams","stateLoadParams",[t,n]);if(-1===e.inArray(!1,l)){var c=t.iStateDuration;if(c>0&&n.time<+new Date-1e3*c)r();else if(n.columns&&a.length!==n.columns.length)r();else{if(t.oLoadedState=e.extend(!0,{},n),n.start!==i&&(t._iDisplayStart=n.start,t.iInitDisplayStart=n.start),n.length!==i&&(t._iDisplayLength=n.length),n.order!==i&&(t.aaSorting=[],e.each(n.order,function(e,n){t.aaSorting.push(n[0]>=a.length?[0,n[1]]:n)})),n.search!==i&&e.extend(t.oPreviousSearch,De(n.search)),n.columns)for(o=0,s=n.columns.length;o<s;o++){var u=n.columns[o];u.visible!==i&&(a[o].bVisible=u.visible),u.search!==i&&e.extend(t.aoPreSearchCols[o],De(u.search))}dt(t,"aoStateLoaded","stateLoaded",[t,n]),r()}}else r()}else r()};if(t.oFeatures.bStateSave){var c=t.fnStateLoadCallback.call(t.oInstance,t,l);c!==i&&l(c)}else r()}function ot(t){var n=l.settings,i=e.inArray(t,_(n,"nTable"));return-1!==i?n[i]:null}function st(e,n,i,r){if(i="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+i,r&&(i+=". For more information about this error, please see http://datatables.net/tn/"+r),n)t.console&&console.log&&console.log(i);else{var o=l.ext,s=o.sErrMode||o.errMode;if(e&&dt(e,null,"error",[e,r,i]),"alert"==s)alert(i);else{if("throw"==s)throw new Error(i);"function"==typeof s&&s(e,r,i)}}}function at(t,n,r,o){e.isArray(r)?e.each(r,function(i,r){e.isArray(r)?at(t,n,r[0],r[1]):at(t,n,r)}):(o===i&&(o=r),n[r]!==i&&(t[o]=n[r]))}function lt(t,n,i){var r;for(var o in n)n.hasOwnProperty(o)&&(e.isPlainObject(r=n[o])?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],r)):t[o]=i&&"data"!==o&&"aaData"!==o&&e.isArray(r)?r.slice():r);return t}function ct(t,n,i){e(t).on("click.DT",n,function(n){e(t).blur(),i(n)}).on("keypress.DT",n,function(e){13===e.which&&(e.preventDefault(),i(e))}).on("selectstart.DT",function(){return!1})}function ut(e,t,n,i){n&&e[t].push({fn:n,sName:i})}function dt(t,n,i,r){var o=[];if(n&&(o=e.map(t[n].slice().reverse(),function(e,n){return e.fn.apply(t.oInstance,r)})),null!==i){var s=e.Event(i+".dt");e(t.nTable).trigger(s,r),o.push(s.result)}return o}function ht(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),i=e._iDisplayLength;t>=n&&(t=n-i),t-=t%i,(-1===i||t<0)&&(t=0),e._iDisplayStart=t}function pt(t,n){var i=t.renderer,r=l.ext.renderer[n];return e.isPlainObject(i)&&i[n]?r[i[n]]||r._:"string"==typeof i&&r[i]||r._}function ft(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}var gt=[],mt=Array.prototype;l.Api=o=function(t,n){if(!(this instanceof o))return new o(t,n);var i=[],r=function(t){var n=function(t){var n,i,r=l.settings,o=e.map(r,function(e,t){return e.nTable});return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=e.inArray(t,o))?[r[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?i=e(t):t instanceof e&&(i=t),i?i.map(function(t){return-1!==(n=e.inArray(this,o))?r[n]:null}).toArray():void 0):[]}(t);n&&(i=i.concat(n))};if(e.isArray(t))for(var s=0,a=t.length;s<a;s++)r(t[s]);else r(t);this.context=C(i),n&&e.merge(this,n),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,gt)},e.extend(o.prototype,{any:function(){return 0!==this.count()},concat:mt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new o(t[e],this[e]):null},filter:function(e){var t=[];if(mt.filter)t=mt.filter.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new o(this.context,t)},flatten:function(){var e=[];return new o(this.context,e.concat.apply(e,this.toArray()))},join:mt.join,indexOf:mt.indexOf||function(e,t){for(var n=t||0,i=this.length;n<i;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,r){var s,a,l,c,u,d,h,p,f=[],g=this.context,m=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),a=0,l=g.length;a<l;a++){var v=new o(g[a]);if("table"===t)(s=n.call(v,g[a],a))!==i&&f.push(s);else if("columns"===t||"rows"===t)(s=n.call(v,g[a],this[a],a))!==i&&f.push(s);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(h=this[a],"column-rows"===t&&(d=St(g[a],m.opts)),c=0,u=h.length;c<u;
1c++)p=h[c],(s="cell"===t?n.call(v,g[a],p.row,p.column,a,c):n.call(v,g[a],p,a,c,d))!==i&&f.push(s)}if(f.length||r){var y=new o(g,e?f.concat.apply([],f):f),b=y.selector;return b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,y}return this},lastIndexOf:mt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(mt.map)t=mt.map.call(this,e,this);else for(var n=0,i=this.length;n<i;n++)t.push(e.call(this,this[n],n));return new o(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:mt.pop,push:mt.push,reduce:mt.reduce||function(e,t){return N(this,e,t,0,this.length,1)},reduceRight:mt.reduceRight||function(e,t){return N(this,e,t,this.length-1,-1,-1)},reverse:mt.reverse,selector:null,shift:mt.shift,slice:function(){return new o(this.context,this)},sort:mt.sort,splice:mt.splice,toArray:function(){return mt.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new o(this.context,C(this))},unshift:mt.unshift}),o.extend=function(t,n,i){if(i.length&&n&&(n instanceof o||n.__dt_wrapper)){var r,s,a,l=function(e,t,n){return function(){var i=t.apply(e,arguments);return o.extend(i,i,n.methodExt),i}};for(r=0,s=i.length;r<s;r++)n[(a=i[r]).name]="function"==typeof a.val?l(t,a.val,a):e.isPlainObject(a.val)?{}:a.val,n[a.name].__dt_wrapper=!0,o.extend(t,n[a.name],a.propExt)}},o.register=s=function(t,n){if(e.isArray(t))for(var i=0,r=t.length;i<r;i++)o.register(t[i],n);else{var s,a,l,c,u=t.split("."),d=gt,h=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n].name===t)return e[n];return null};for(s=0,a=u.length;s<a;s++){var p=h(d,l=(c=-1!==u[s].indexOf("()"))?u[s].replace("()",""):u[s]);p||d.push(p={name:l,val:{},methodExt:[],propExt:[]}),s===a-1?p.val=n:d=c?p.methodExt:p.propExt}}},o.registerPlural=a=function(t,n,r){o.register(t,r),o.register(n,function(){var t=r.apply(this,arguments);return t===this?this:t instanceof o?t.length?e.isArray(t[0])?new o(t.context,t[0]):t[0]:i:t})},s("tables()",function(t){return t?new o(function(t,n){if("number"==typeof t)return[n[t]];var i=e.map(n,function(e,t){return e.nTable});return e(i).filter(t).map(function(t){var r=e.inArray(this,i);return n[r]}).toArray()}(t,this.context)):this}),s("table()",function(e){var t=this.tables(e),n=t.context;return n.length?new o(n[0]):t}),a("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),a("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),a("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),a("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),a("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),s("draw()",function(e){return this.iterator("table",function(t){"page"===e?ae(t):("string"==typeof e&&(e="full-hold"!==e),le(t,!1===e))})}),s("page()",function(e){return e===i?this.page.info().page:this.iterator("table",function(t){je(t,e)})}),s("page.info()",function(e){if(0===this.context.length)return i;var t=this.context[0],n=t._iDisplayStart,r=t.oFeatures.bPaginate?t._iDisplayLength:-1,o=t.fnRecordsDisplay(),s=-1===r;return{page:s?0:Math.floor(n/r),pages:s?1:Math.ceil(o/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===ft(t)}}),s("page.len()",function(e){return e===i?0!==this.context.length?this.context[0]._iDisplayLength:i:this.iterator("table",function(t){Pe(t,e)})});var vt=function(e,t,n){if(n){var i=new o(e);i.one("draw",function(){n(i.ajax.json())})}if("ssp"==ft(e))le(e,t);else{Ue(e,!0);var r=e.jqXHR;r&&4!==r.readyState&&r.abort(),he(e,[],function(n){Z(e);for(var i=me(e,n),r=0,o=i.length;r<o;r++)W(e,i[r]);le(e,t),Ue(e,!1)})}};s("ajax.json()",function(){var e=this.context;if(e.length>0)return e[0].json}),s("ajax.params()",function(){var e=this.context;if(e.length>0)return e[0].oAjaxData}),s("ajax.reload()",function(e,t){return this.iterator("table",function(n){vt(n,!1===t,e)})}),s("ajax.url()",function(t){var n=this.context;return t===i?0===n.length?i:(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.aja
1x:n.sAjaxSource:this.iterator("table",function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t})}),s("ajax.url().load()",function(e,t){return this.iterator("table",function(n){vt(n,!1===t,e)})});var yt=function(t,n,o,s,a){var l,c,u,d,h,p,f=[],g=typeof n;for(n&&"string"!==g&&"function"!==g&&n.length!==i||(n=[n]),u=0,d=n.length;u<d;u++)for(h=0,p=(c=n[u]&&n[u].split&&!n[u].match(/[\[\(:]/)?n[u].split(","):[n[u]]).length;h<p;h++)(l=o("string"==typeof c[h]?e.trim(c[h]):c[h]))&&l.length&&(f=f.concat(l));var m=r.selector[t];if(m.length)for(u=0,d=m.length;u<d;u++)f=m[u](s,a,f);return C(f)},bt=function(t){return t||(t={}),t.filter&&t.search===i&&(t.search=t.filter),e.extend({search:"none",order:"current",page:"all"},t)},_t=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},St=function(t,n){var i,r=[],o=t.aiDisplay,s=t.aiDisplayMaster,a=n.search,l=n.order,c=n.page;if("ssp"==ft(t))return"removed"===a?[]:w(0,s.length);if("current"==c)for(d=t._iDisplayStart,h=t.fnDisplayEnd();d<h;d++)r.push(o[d]);else if("current"==l||"applied"==l){if("none"==a)r=s.slice();else if("applied"==a)r=o.slice();else if("removed"==a){for(var u={},d=0,h=o.length;d<h;d++)u[o[d]]=null;r=e.map(s,function(e){return u.hasOwnProperty(e)?null:e})}}else if("index"==l||"original"==l)for(d=0,h=t.aoData.length;d<h;d++)"none"==a?r.push(d):(-1===(i=e.inArray(d,o))&&"removed"==a||i>=0&&"applied"==a)&&r.push(d);return r};s("rows()",function(t,n){t===i?t="":e.isPlainObject(t)&&(n=t,t=""),n=bt(n);var r=this.iterator("table",function(r){return function(t,n,r){var o;return yt("row",n,function(n){var s=m(n),a=t.aoData;if(null!==s&&!r)return[s];if(o||(o=St(t,r)),null!==s&&-1!==e.inArray(s,o))return[s];if(null===n||n===i||""===n)return o;if("function"==typeof n)return e.map(o,function(e){var t=a[e];return n(e,t._aData,t.nTr)?e:null});if(n.nodeName){var l=n._DT_RowIndex,c=n._DT_CellIndex;if(l!==i)return a[l]&&a[l].nTr===n?[l]:[];if(c)return a[c.row]&&a[c.row].nTr===n?[c.row]:[];var u=e(n).closest("*[data-dt-row]");return u.length?[u.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var d=t.aIds[n.replace(/^#/,"")];if(d!==i)return[d.idx]}var h=E(S(t.aoData,o,"nTr"));return e(h).filter(n).map(function(){return this._DT_RowIndex}).toArray()},t,r)}(r,t,n)},1);return r.selector.rows=t,r.selector.opts=n,r}),s("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||i},1)}),s("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return S(e.aoData,t,"_aData")},1)}),a("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var i=t.aoData[n];return"search"===e?i._aFilterData:i._aSortData},1)}),a("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){te(t,n,e)})}),a("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),a("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,i=0,r=n.length;i<r;i++)for(var s=0,a=this[i].length;s<a;s++){var l=n[i].rowIdFn(n[i].aoData[this[i][s]]._aData);t.push((!0===e?"#":"")+l)}return new o(n,t)}),a("rows().remove()","row().remove()",function(){var e=this;return this.iterator("row",function(t,n,r){var o,s,a,l,c,u,d=t.aoData,h=d[n];for(d.splice(n,1),o=0,s=d.length;o<s;o++)if(u=(c=d[o]).anCells,null!==c.nTr&&(c.nTr._DT_RowIndex=o),null!==u)for(a=0,l=u.length;a<l;a++)u[a]._DT_CellIndex.row=o;ee(t.aiDisplayMaster,n),ee(t.aiDisplay,n),ee(e[r],n,!1),t._iRecordsDisplay>0&&t._iRecordsDisplay--,ht(t);var p=t.rowIdFn(h._aData);p!==i&&delete t.aIds[p]}),this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t}),this}),s("rows.add()",function(t){var n=this.iterator("table",function(e){var n,i,r,o=[];for(i=0,r=t.length;i<r;i++)(n=t[i]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(z(e,n)[0]):o.push(W(e,n));return o},1),i=this.rows(-1);return i.pop(),e.merge(i,n),i}),s("row()",function(e,t){return _t(this.rows(e,t))}),s("row().data()",function(t){var n=this.context;if(t===i)return n.length&&this.length?n[0].aoData[this[0]]._aData:i;var r=n[0].aoData[this[0]];return r._aData=t,e.isArray(t)&&r.nTr.id&&X(n[0].rowId)(t,r.nTr.id),te(n[0],this[0],"data"),this}),s("row().node()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null}),s("row.add()",function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?z(e,t)[0]:W(e,t)});return this.row(n[0])});var wt=function(e,t){var n=e.context;if(n.length){var r=n[0].aoData[t!==i?t:e[0]];r&&r._details&&(r._details.remove(),r._detailsShow=i,r._details=i)}},Et=function(e,t){var n=e.context;if(n.length&&e.length){var i=n[0].aoData[e[0]];i._details&&(i._detailsShow=t,t?i._details.insertAfter(i.nTr):i._details.detach(),Tt(n[0]))}},Tt=function(e){var t=new o(e),n=e.aoData;t.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),_(n,"_details").length>0&&(t.on("draw.dt.DT_details",function(i,r){e===r&&t.rows({page:"current"}).eq(0).each(function(e){var t=n[e];t._detailsShow&&t._details.insertAfter(t.nTr)})}),t.on("column-visibility.dt.DT_details",function(t,i,r,o){if(e===i)for(var s,a=U(i),l=0,c=n.length;l<c;l++)(s=n[l])._details&&s._details.children("td[colspan]").attr("colspan",a)}),t.on("destroy.dt.DT_details",function(i,r){if(e===r)for(var o=0,s=n.length;o<s;o++)n[o]._details&&wt(t,o)}))};s("row().child()",function(t,n){var r=this.context;return t===i?r.length&&this.length?r[0].aoData[this[0]]._details:i:(!0===t?this.child.show():!1===t?wt(this):r.length&&this.length&&function(t,n,i,r){var o=[],s=function(n,i){if
1(e.isArray(n)||n instanceof e)for(var r=0,a=n.length;r<a;r++)s(n[r],i);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var l=e("<tr><td/></tr>").addClass(i);e("td",l).addClass(i).html(n)[0].colSpan=U(t),o.push(l[0])}};s(i,r),n._details&&n._details.detach(),n._details=e(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(r[0],r[0].aoData[this[0]],t,n),this)}),s(["row().child.show()","row().child().show()"],function(e){return Et(this,!0),this}),s(["row().child.hide()","row().child().hide()"],function(){return Et(this,!1),this}),s(["row().child.remove()","row().child().remove()"],function(){return wt(this),this}),s("row().child.isShown()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1});var Ct=/^([^:]+):(name|visIdx|visible)$/,It=function(e,t,n,i,r){for(var o=[],s=0,a=r.length;s<a;s++)o.push(q(e,r[s],t));return o};s("columns()",function(t,n){t===i?t="":e.isPlainObject(t)&&(n=t,t=""),n=bt(n);var r=this.iterator("table",function(i){return function(t,n,i){var r=t.aoColumns,o=_(r,"sName"),s=_(r,"nTh");return yt("column",n,function(n){var a=m(n);if(""===n)return w(r.length);if(null!==a)return[a>=0?a:r.length+a];if("function"==typeof n){var l=St(t,i);return e.map(r,function(e,i){return n(i,It(t,i,0,0,l),s[i])?i:null})}var c="string"==typeof n?n.match(Ct):"";if(c)switch(c[2]){case"visIdx":case"visible":var u=parseInt(c[1],10);if(u<0){var d=e.map(r,function(e,t){return e.bVisible?t:null});return[d[d.length+u]]}return[j(t,u)];case"name":return e.map(o,function(e,t){return e===c[1]?t:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=e(s).filter(n).map(function(){return e.inArray(this,s)}).toArray();if(h.length||!n.nodeName)return h;var p=e(n).closest("*[data-dt-column]");return p.length?[p.data("dt-column")]:[]},t,i)}(i,t,n)},1);return r.selector.cols=t,r.selector.opts=n,r}),a("columns().header()","column().header()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),a("columns().footer()","column().footer()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),a("columns().data()","column().data()",function(){return this.iterator("column-rows",It,1)}),a("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),a("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,n,i,r,o){return S(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)},1)}),a("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,i,r){return S(e.aoData,r,"anCells",t)},1)}),a("columns().visible()","column().visible()",function(t,n){var r=this.iterator("column",function(n,r){if(t===i)return n.aoColumns[r].bVisible;!function(t,n,r){var o,s,a,l,c=t.aoColumns,u=c[n],d=t.aoData;if(r===i)return u.bVisible;if(u.bVisible!==r){if(r){var h=e.inArray(!0,_(c,"bVisible"),n+1);for(s=0,a=d.length;s<a;s++)o=d[s].anCells,(l=d[s].nTr)&&l.insertBefore(o[n],o[h]||null)}else e(_(t.aoData,"anCells",n)).detach();u.bVisible=r,se(t,t.aoHeader),se(t,t.aoFooter),t.aiDisplay.length||e(t.nTBody).find("td[colspan]").attr("colspan",U(t)),it(t)}}(n,r,t)});return t!==i&&(this.iterator("column",function(e,i){dt(e,null,"column-visibility",[e,i,t,n])}),(n===i||n)&&this.columns.adjust()),r}),a("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,n){return"visible"===e?F(t,n):n},1)}),s("columns.adjust()",function(){return this.iterator("table",function(e){L(e)},1)}),s("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return j(n,t);if("fromData"===e||"toVisible"===e)return F(n,t)}}),s("column()",function(e,t){return _t(this.columns(e,t))}),s("cells()",function(t,n,r){if(e.isPlainObject(t)&&(t.row===i?(r=t,t=null):(r=n,n=null)),e.isPlainObject(n)&&(r=n,n=null),null===n||n===i)return this.iterator("table",function(n){return function(t,n,r){var o,s,a,l,c,u,d,h=t.aoData,p=St(t,r),f=E(S(h,p,"anCells")),g=e([].concat.apply([],f)),m=t.aoColumns.length;return yt("cell",n,function(n){var r="function"==typeof n;if(null===n||n===i||r){for(s=[],a=0,l=p.length;a<l;a++)for(o=p[a],c=0;c<m;c++)u={row:o,column:c}
1,r?(d=h[o],n(u,q(t,o,c),d.anCells?d.anCells[c]:null)&&s.push(u)):s.push(u);return s}if(e.isPlainObject(n))return n.column!==i&&n.row!==i&&-1!==e.inArray(n.row,p)?[n]:[];var f=g.filter(n).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray();return f.length||!n.nodeName?f:(d=e(n).closest("*[data-dt-row]")).length?[{row:d.data("dt-row"),column:d.data("dt-column")}]:[]},t,r)}(n,t,bt(r))});var o,s,a,l,c,u=this.columns(n),d=this.rows(t);this.iterator("table",function(e,t){for(o=[],s=0,a=d[t].length;s<a;s++)for(l=0,c=u[t].length;l<c;l++)o.push({row:d[t][s],column:u[t][l]})},1);var h=this.cells(o,r);return e.extend(h.selector,{cols:n,rows:t,opts:r}),h}),a("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){var r=e.aoData[t];return r&&r.anCells?r.anCells[n]:i},1)}),s("cells().data()",function(){return this.iterator("cell",function(e,t,n){return q(e,t,n)},1)}),a("cells().cache()","cell().cache()",function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",function(t,n,i){return t.aoData[n][e][i]},1)}),a("cells().render()","cell().render()",function(e){return this.iterator("cell",function(t,n,i){return q(t,n,i,e)},1)}),a("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:F(e,n)}},1)}),a("cells().invalidate()","cell().invalidate()",function(e){return this.iterator("cell",function(t,n,i){te(t,n,e,i)})}),s("cell()",function(e,t,n){return _t(this.cells(e,t,n))}),s("cell().data()",function(e){var t=this.context,n=this[0];return e===i?t.length&&n.length?q(t[0],n[0].row,n[0].column):i:(G(t[0],n[0].row,n[0].column,e),te(t[0],n[0].row,"data",n[0].column),this)}),s("order()",function(t,n){var r=this.context;return t===i?0!==r.length?r[0].aaSorting:i:("number"==typeof t?t=[[t,n]]:t.length&&!e.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),s("order.listener()",function(e,t,n){return this.iterator("table",function(i){et(i,e,t,n)})}),s("order.fixed()",function(t){if(!t){var n=this.context,r=n.length?n[0].aaSortingFixed:i;return e.isArray(r)?{pre:r}:r}return this.iterator("table",function(n){n.aaSortingFixed=e.extend(!0,{},t)})}),s(["columns().order()","column().order()"],function(t){var n=this;return this.iterator("table",function(i,r){var o=[];e.each(n[r],function(e,n){o.push([n,t])}),i.aaSorting=o})}),s("search()",function(t,n,r,o){var s=this.context;return t===i?0!==s.length?s[0].oPreviousSearch.sSearch:i:this.iterator("table",function(i){i.oFeatures.bFilter&&ye(i,e.extend({},i.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),1)})}),a("columns().search()","column().search()",function(t,n,r,o){return this.iterator("column",function(s,a){var l=s.aoPreSearchCols;if(t===i)return l[a].sSearch;s.oFeatures.bFilter&&(e.extend(l[a],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),ye(s,s.oPreviousSearch,1))})}),s("state()",function(){return this.context.length?this.context[0].oSavedState:null}),s("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),s("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),s("state.save()",function(){return this.iterator("table",function(e){it(e)})}),l.versionCheck=l.fnVersionCheck=function(e){for(var t,n,i=l.version.split("."),r=e.split("."),o=0,s=r.length;o<s;o++)if((t=parseInt(i[o],10)||0)!==(n=parseInt(r[o],10)||0))return t>n;return!0},l.isDataTable=l.fnIsDataTable=function(t){var n=e(t).get(0),i=!1;return t instanceof l.Api||(e.each(l.settings,function(t,r){var o=r.nScrollHead?e("table",r.nScrollHead)[0]:null,s=r.nScrollFoot?e("table",r.nScrollFoot)[0]:null;r.nTable!==n&&o!==n&&s!==n||(i=!0)}),i)},l.tables=l.fnTables=function(t){var n=!1;e.isPlainObject(t)&&(n=t.api,t=t.visible);var i=e.map(l.settings,function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable});return n?new o(i):i},l.camelToHungarian=R,s("$()",function(t,n){var i=this.rows(n).nodes(),r=e(i);return e([].concat(r.filter(t).toArray(),r.find(t).toArray()))}),e.each(["on","one","off"],function(t,n){s(n+"()",function(){var t=Array.prototype.slice.call(arguments);t[0]=e.map(t[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var i=e(this.tables().nodes());return i[n].apply(i,t),this})}),s("clear()",function(){return this.iterator("table",function(e){Z(e)})}),s("settings()",function(){return new o(this.context,this.context)}),s("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),s("data()",function(){return this.iterator("table",function(e){return _(e.aoData,"_aData")}).flatten()}),s("destroy()",function(n){return n=n||!1,this.iterator("table",function(i){var r,s=i.nTableWrapper.parentNode,a=i.oClasses,c=i.nTable,u=i.nTBody,d=i.nTHead,h=i.nTFoot,p=e(c),f=e(u),g=e(i.nTableWrapper),m=e.map(i.aoData,function(e){return e.nTr});i.bDestroying=!0,dt(i,"aoDestroyCallback","destroy",[i]),n||new o(i).columns().visible(!0),g.off(".DT").find(":not(tbody *)").off(".DT"),e(t).off(".DT-"+i.sInstance),c!=d.parentNode&&(p.children("thead").detach(),p.append(d)),h&&c!=h.parentNode&&(p.children("tfoot").detach(),p.append(h)),i.aaSorting=[],i.aaSortingFixed=[],tt(i),e(m).removeClass(i.asStripeClasses.join(" ")),e("th, td",d).removeClass(a.sSortable+" "+a.sSortableAsc+" "+a.sSortableDesc+" "+a.sSortableNone),f.children().detach(),f.append(m);var v=n?"remove":"detach";
vendor: 10,328 bytes, line 1
1p[v](),g[v](),!n&&s&&(s.insertBefore(c,i.nTableReinsertBefore),p.css("width",i.sDestroyWidth).removeClass(a.sTable),(r=i.asDestroyStripes.length)&&f.children().each(function(t){e(this).addClass(i.asDestroyStripes[t%r])}));var y=e.inArray(i,l.settings);-1!==y&&l.settings.splice(y,1)})}),e.each(["column","row","cell"],function(e,t){s(t+"s().every()",function(e){var n=this.selector.opts,r=this;return this.iterator(t,function(o,s,a,l,c){e.call(r[t](s,"cell"===t?a:n,"cell"===t?n:i),s,a,l,c)})})}),s("i18n()",function(t,n,r){var o=this.context[0],s=J(t)(o.oLanguage);return s===i&&(s=n),r!==i&&e.isPlainObject(s)&&(s=s[r]!==i?s[r]:s._),s.replace("%d",r)}),l.version="1.10.19",l.settings=[],l.models={},l.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},l.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},l.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},l.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},l.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},I(l.defaults),l.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},I(l.defaults.column),l.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==ft(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==ft(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,i=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?!1===o||-1===e?t+i:Math.min(t+e,this._iRecordsDisplay):!o||n>i||-1===e?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},l.ext=r={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:l.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:l.version},e.extend(r,{afnFiltering:r.search,aTypes:r.type.detect,ofnSearch:r.type.search,oSort:r.type.order,afnSortData:r.order,aoFeatures:r.feature,oApi:r.internal,oStdClasses:r.classes,oPagination:r.pager}),e.extend(l.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Rt=l.ext.pager;function Dt(e,t){var n=[],i=Rt.numbers_length,r=Math.floor(i/2);return t<=i?n=w(0,t):e<=r?((n=w(0,i-2)).push("ellipsis"),n.push(t-1)):e>=t-1-r?((n=w(t-(i-2),t)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=w(e-r+2,e+r-1)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}e.extend(Rt,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Dt(e,t)]},simple_numbers:function(e,t){return["previous",Dt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Dt(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Dt(e,t),"last"]},_numbers:Dt,numbers_length:7}),e.extend(!0,l.ext.renderer,{pageButton:{_:function(t,r,o,s,a,l){var c,u,d,h=t.oClasses,p=t.oLanguage.oPaginate,f=t.oLanguage.oAria.paginate||{},g=0,m=function(n,i){var r,s,d,v=function(e){je(t,e.data.action,!0)};for(r=0,s=i.length;r<s;r++)if(e.isArray(d=i[r])){var y=e("<"+(d.DT_el||"div")+"/>").appendTo(n);m(y,d)}else{switch(c=null,u="",d){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</span>');break;case"first":c=p.sFirst,u=d+(a>0?"":" "+h.sPageButtonDisabled);break;case"previous":c=p.sPrevious,u=d+(a>0?"":" "+h.sPageButtonDisabled);break;case"next":c=p.sNext,u=d+(a<l-1?"":" "+h.sPageButtonDisabled);break;case"last":c=p.sLast,u=d+(a<l-1?"":" "+h.sPageButtonDisabled);break;default:c=d+1,u=a===d?h.sPageButtonActive:""}null!==c&&(ct(e("<a>",{class:h.sPageButton+" "+u,"aria-controls":t.sTableId,"aria-label":f[d],"data-dt-idx":g,tabindex:t.iTabIndex,id:0===o&&"string"==typeof d?t.sTableId+"_"+d:null}).html(c).appendTo(n),{action:d},v),g++)}};try{d=e(r).find(n.activeElement).data("dt-idx")}catch(e){}m(e(r).empty(),s),d!==i&&e(r).find("[data-dt-idx="+d+"]").focus()}}}),e.extend(l.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return y(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!h.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||g(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return y(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return b(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return g(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(l.ext.type.search,{html:function(e){return g(e)?e:"string"==typeof e?e.replace(u," ").replace(d,""):""},string:function(e){return g(e)?e:"string"==typeof e?e.replace(u," "):e}});var At=function(e,t,n,i){return 0===e||e&&"-"!==e?(t&&(e=v(e,t)),e.replace&&(n&&(e=e.replace(n,"")),i&&(e=e.replace(i,""))),1*e):-1/0};function kt(t){e.each({num:function(e){return At(e,t)},"num-fmt":function(e){return At(e,t,f)},"html-num":function(e){return At(e,t,d)},"html-num-fmt":function(e){return At(e,t,d,f)}},function(e,n){r.type.order[e+t+"-pre"]=n,e.match(/^html\-/)&&(r.type.search[e+t]=r.type.search.html)})}e.extend(r.type.order,{"date-pre":function(e){var t=Date.parse(e);return isNaN(t)?-1/0:t}
1,"html-pre":function(e){return g(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return g(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),kt(""),e.extend(!0,l.ext.renderer,{header:{_:function(t,n,i,r){e(t.nTable).on("order.dt.DT",function(e,o,s,a){if(t===o){var l=i.idx;n.removeClass(i.sSortingClass+" "+r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[l]?r.sSortAsc:"desc"==a[l]?r.sSortDesc:i.sSortingClass)}})},jqueryui:function(t,n,i,r){e("<div/>").addClass(r.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(r.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",function(e,o,s,a){if(t===o){var l=i.idx;n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==a[l]?r.sSortAsc:"desc"==a[l]?r.sSortDesc:i.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==a[l]?r.sSortJUIAsc:"desc"==a[l]?r.sSortJUIDesc:i.sSortingClassJUI)}})}}});var Ot=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};function xt(e){return function(){var t=[ot(this[l.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return l.ext.internal[e].apply(this,t)}}return l.render={number:function(e,t,n,i,r){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var s=o<0?"-":"",a=parseFloat(o);if(isNaN(a))return Ot(o);a=a.toFixed(n),o=Math.abs(a);var l=parseInt(o,10),c=n?t+(o-l).toFixed(n).substring(2):"";return s+(i||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+c+(r||"")}}},text:function(){return{display:Ot,filter:Ot}}},e.extend(l.ext.internal,{_fnExternApiFunc:xt,_fnBuildAjax:he,_fnAjaxUpdate:pe,_fnAjaxParameters:fe,_fnAjaxUpdateDraw:ge,_fnAjaxDataSrc:me,_fnAddColumn:P,_fnColumnOptions:M,_fnAdjustColumnSizing:L,_fnVisibleToColumnIndex:j,_fnColumnIndexToVisible:F,_fnVisbleColumns:U,_fnGetColumns:H,_fnColumnTypes:B,_fnApplyColumnDefs:V,_fnHungarianMap:I,_fnCamelToHungarian:R,_fnLanguageCompat:D,_fnBrowserDetect:x,_fnAddData:W,_fnAddTr:z,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==i?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,i){return e.inArray(i,t.aoData[n].anCells)},_fnGetCellData:q,_fnSetCellData:G,_fnSplitObjNotation:K,_fnGetObjectDataFn:J,_fnSetObjectDataFn:X,_fnGetDataMaster:Q,_fnClearTable:Z,_fnDeleteIndex:ee,_fnInvalidate:te,_fnGetRowElements:ne,_fnCreateTr:ie,_fnBuildHead:oe,_fnDrawHead:se,_fnDraw:ae,_fnReDraw:le,_fnAddOptionsHtml:ce,_fnDetectHeader:ue,_fnGetUniqueThs:de,_fnFeatureHtmlFilter:ve,_fnFilterComplete:ye,_fnFilterCustom:be,_fnFilterColumn:_e,_fnFilter:Se,_fnFilterCreateSearch:we,_fnEscapeRegex:Ee,_fnFilterData:Ie,_fnFeatureHtmlInfo:Ae,_fnUpdateInfo:ke,_fnInfoMacros:Oe,_fnInitialise:xe,_fnInitComplete:Ne,_fnLengthChange:Pe,_fnFeatureHtmlLength:Me,_fnFeatureHtmlPaginate:Le,_fnPageChange:je,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:Ue,_fnFeatureHtmlTable:He,_fnScrollDraw:Be,_fnApplyToChildren:Ve,_fnCalculateColumnWidths:ze,_fnThrottle:qe,_fnConvertToWidth:Ge,_fnGetWidestNode:Ye,_fnGetMaxLenString:$e,_fnStringToCss:Ke,_fnSortFlatten:Je,_fnSort:Xe,_fnSortAria:Qe,_fnSortListener:Ze,_fnSortAttachListener:et,_fnSortingClasses:tt,_fnSortData:nt,_fnSaveState:it,_fnLoadState:rt,_fnSettingsFromNode:ot,_fnLog:st,_fnMap:at,_fnBindAction:ct,_fnCallbackReg:ut,_fnCallbackFire:dt,_fnLengthOverflow:ht,_fnRenderer:pt,_fnDataSource:ft,_fnRowAttributes:re,_fnExtend:lt,_fnCalculateEnd:function(){}}),e.fn.dataTable=l,l.$=e,e.fn.dataTableSettings=l.settings,e.fn.dataTableExt=l.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(l,function(t,n){e.fn.DataTable[t]=n}),e.fn.dataTable}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,i){return Rt(e,t,n,i,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invali
vendor: 19,797 bytes, line 1
1dFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var n=h(e),i=t.call(n.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&i);if(e._strict&&(r=r&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function f(e){var t=d(NaN);return null!=e?u(h(t),e):h(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;i<n;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};var g=n.momentProperties=[];function m(e,t){var n,i,r;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=h(t)),o(t._locale)||(e._locale=t._locale),g.length>0)for(n=0;n<g.length;n++)o(r=t[i=g[n]])||(e[i]=r);return e}var v=!1;function y(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function b(e){return e instanceof y||null!=e&&null!=e._isAMomentObject}function _(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=_(t)),n}function w(e,t,n){var i,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&S(e[i])!==S(t[i]))&&s++;return s+o}function E(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var i=!0;return u(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),i){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){for(var a in r+="\n["+s+"] ",arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}E(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)},t)}var C,I={};function R(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),I[e]||(E(t),I[e]=!0)}function D(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,i=u({},e);for(n in t)c(t,n)&&(r(e[n])&&r(t[n])?(i[n]={},u(i[n],e[n]),u(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)c(e,n)&&!c(t,n)&&r(e[n])&&(i[n]=u({},i[n]));return i}function k(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};var O={};function x(e,t){var n=e.toLowerCase();O[n]=O[n+"s"]=O[t]=e}function N(e){return"string"==typeof e?O[e]||O[e.toLowerCase()]:void 0}function P(e){var t,n,i={};for(n in e)c(e,n)&&(t=N(n))&&(i[t]=e[n]);return i}var M={};function L(e,t){M[e]=t}function j(e,t,n){var i=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-i.length)).toString().substr(1)+i}var F=/(\[[^\[]*\])|(\\)?([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,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},B={};function V(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(B[e]=r),t&&(B[t[0]]=function(){return j(r.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function W(e,t){return e.isValid()?(t=z(t,e.localeData()),H[t]=H[t]||function(e){var t,n,i,r=e.match(F);for(t=0,n=r.length;t<n;t++)r[t]=B[r[t]]?B[r[t]]:(i=r[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,o="";for(i=0;i<n;i++)o+=D(r[i])?r[i].call(t,e):r[i];return o}}(t),H[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(U.lastIndex=0;n>=0&&U.test(e);)e=e.replace(U,i),U.lastIndex=0,n-=1;return e}var q=/\d/,G=/\d\d/,Y=/\d{3}/,$=/\d{4}/,K=/[+-]?\d{6}/,J=/\d\d?/,X=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,Z=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,ie=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae={};function le(e,t,n){ae[e]=D(t)?t:function(e,i){return e&&n?n:t}}function ce(e,t){return c(ae,e)?ae[e](t._strict,t._locale):new RegExp(ue(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,r){return t||n||i||r})))}function ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={};function he(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),s(t)&&(i=function(e,n){n[t]=S(e)}),n=0;n<e.length;n++)de[e[n]]=i}function pe(e,t){he(e,function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)})}function fe(e,t,n){null!=t&&c(de,e)&&de[e](t,n._a,n,e)}var ge=0,me=1,ve=2,ye=3,be=4,_e=5,Se=6,we=7,Ee=8;function Te(e){return Ce(e)?366:365}function Ce(e){return e%4==0&&e%100!=0||e%400==0}V("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),x("year","y"),L("year",1),le("Y",ie),le("YY",J,G),le("YYYY",ee,$),le("YYYYY",te,K),le("YYYYYY",te,K),he(["YYYYY","YYYYYY"],ge),he("YYYY",function(e,t){t[ge]=2===e.length?n.parseTwoDigitYear(e):S(e)}),he("YY",function(e,t){t[ge]=n.parseTwoDigitYear(e)}),he("Y",function(e,t){t[ge]=parseInt(e,10)}),n.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)};var Ie,Re=De("FullYear",!0);function De(e,t){return function(i){return null!=i?(ke(this,e,i),n.updateOffset(this,t),this):Ae(this,e)}}function Ae(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function ke(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Ce(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Oe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Oe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?Ce(e)?29:28:31-n%7%2}Ie=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),V("MMMM",0,0,function(e){return this.localeData().months(this,e)}),x("month","M"),L("month",8),le("M",J),le("MM",J,G),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),he(["M","MM"],function(e,t){t[me]=S(e)-1}),he(["MMM","MMMM"],function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[me]=r:h(n).invalidMonth=e});var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Me(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!s(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Me(this,e),n.updateOffset(this,!0),this):Ae(this,"Month")}var je=se,Fe=se;function Ue(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],o=[];for(t=0;t<12;t++)n=d([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),o.sort(e),t=0;t<12;t++)i[t]=ue(i[t]),r[t]=ue(r[t]);for(t=0;t<24;t++)o[t]=ue(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function He(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Be(e,t,n){var i=7+t-n;return-(7+He(e,0,i).getUTCDay()-t)%7+i-1}function Ve(e,t,n,i,r){var o,s,a=1+7*(t-1)+(7+n-i)%7+Be(e,i,r);return a<=0?s=Te(o=e-1)+a:a>Te(e)?(o=e+1,s=a-Te(e)):(o=e,s=a),{year:o,dayOfYear:s}}function We(e,t,n){var i,r,o=Be(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?i=s+ze(r=e.year()-1,t,n):s>ze(e.year(),t,n)?(i=s-ze(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function ze(e,t,n){var i=Be(e,t,n),r=Be(e+1,t,n);return(Te(e)-i+r)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),x("week","w"),x("isoWeek","W"),L("week",5),L("isoWeek",5),le("w",J),le("ww",J,G),le("W",J),le("WW",J,G),pe(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=S(e)}),V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),x("day","d"),x("weekday","e"),x("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),le("d",J),le("e",J),le("E",J),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),pe(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:h(n).invalidWeekday=e}),pe(["d","e","E"],function(e,t,n,i){t[i]=S(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ye="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=se,Je=se,Xe=se;function Qe(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ue(a[t]),l[t]=ue(l[t]),c[t]=ue(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(){return this.hours()%12||12}function et(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tt(e,t){return t._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Ze),V("k",["kk",2],0,function(){return this.hours()||24}),V("hmm",0,0,function(){return""+Ze.apply(this)+j(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Ze.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+j(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)}),et("a",!0),et("A",!1),x("hour","h"),L("hour",13),le("a",tt),le("A",tt),le("H",J),le("h",J),le("k",J),le("HH",J,G),le("hh",J,G),le("kk",J,G),le("hmm",X),le("hmmss",Q),le("Hmm",X),le("Hmmss",Q),he(["H","HH"],ye),he(["k","kk"],function(e,t,n){var i=S(e);t[ye]=24===i?0:i}),he(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),he(["h","hh"],function(e,t,n){t[ye]=S(e),h(n).bigHour=!0}),he("hmm",function(e,t,n){var i=e.length-2;t[ye]=S(e.substr(0,i)),t[be]=S(e.substr(i)),h(n).bigHour=!0}),he("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ye]=S(e.substr(0,i)),t[be]=S(e.substr(i,2)),t[_e]=S(e.substr(r)),h(n).bigHour=!0}),he("Hmm",function(e,t,n){var i=e.length-2;t[ye]=S(e.substr(0,i)),t[be]=S(e.substr(i))}),he("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ye]=S(e.substr(0,i)),t[be]=S(e.substr(i,2)),t[_e]=S(e.substr(r))});var nt,it=De("Hours",!0),rt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Ne,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:$e,weekdaysShort:Ye,meridiemParse:/[ap]\.?m?\.?/i},ot={},st={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function lt(e){var t=null;if(!ot[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=nt._abbr,require("./locale/"+e),ct(t)}catch(e){}return ot[e]}function ct(e,t){var n;return e&&((n=o(t)?dt(e):ut(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ut(e,t){if(null!==t){var n,i=rt;if(t.abbr=e,null!=ot[e])R("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."),i=ot[e]._config;else if(null!=t.parentLocale)if(null!=ot[t.parentLocale])i=ot[t.parentLocale]._config;else{if(null==(n=lt(t.parentLocale)))return st[t.parentLocale]||(st[t.parentLocale]=[]),st[t.parentLocale].push({name:e,config:t}),null;i=n._config}return ot[e]=new k(A(i,t)),st[e]&&st[e].forEach(function(e){ut(e.name,e.config)}),ct(e),ot[e]}return delete ot[e],null}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!i(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,i,r,o=0;o<e.length;){for(t=(r=at(e[o]).split("-")).length,n=(n=at(e[o+1]))?n.split("-"):null;t>0;){if(i=lt(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&w(r,n,!0)>=t-1)break;t--}o++}return nt}(e)}function ht(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[me]<0||n[me]>11?me:n[ve]<1||n[ve]>Oe(n[ge],n[me])?ve:n[ye]<0||n[ye]>24||24===n[ye]&&(0!==n[be]||0!==n[_e]||0!==n[Se])?ye:n[be]<0||n[be]>59?be:n[_e]<0||n[_e]>59?_e:n[Se]<0||n[Se]>999?Se:-1,h(e)._overflowDayOfYear&&(t<ge||t>ve)&&(t=ve),h(e)._overflowWeeks&&-1===t&&(t=we),h(e)._overflowWeekday&&-1===t&&(t=Ee),h(e).overflow=t),e}function pt(e,t,n){return null!=e?e:null!=t?t:n}function ft(e){var t,i,r,o,s,a=[];if(!e._d){for(r=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ve]&&null==e._a[me]&&function(e){var t,n,i,r,o,s,a,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,s=4,n=pt(t.GG,e._a[ge],We(Dt(),1,4).year),i=pt(t.W,1),((r=pt(t.E,1))<1||r>7)&&(l=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var c=We(Dt(),o,s);n=pt(t.gg,e._a[ge],c.year),i=pt(t.w,c.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(l=!0)):r=o}i<1||i>ze(n,o,s)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(a=Ve(n,i,r,o,s),e._a[ge]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=pt(e._a[ge],r[ge]),(e._dayOfYear>Te(s)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),i=He(s,0,e._dayOfYear),e._a[me]=i.getUTCMonth(),e._a[ve]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ye]&&0===e._a[be]&&0===e._a[_e]&&0===e._a[Se]&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?He:function(e,t,n,i,r,o,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,i,r,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,o,s),a}).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var gt=/^\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)?)?$/,mt=/^\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)?)?$/,vt=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["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}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bt=[["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/]],_t=/^\/?Date\((\-?\d+)/i;function St(e){var t,n,i,r,o,s,a=e._i,l=gt.exec(a)||mt.exec(a);if(l){for(h(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(l[1])){r=yt[t][0],i=!1!==yt[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(l[3])){o=(l[2]||" ")+bt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!i&&null!=o)return void(e._isValid=!1);if(l[4]){if(!vt.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=r+(o||"")+(s||""),Ct(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Et={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,i,r,o,s,a,l=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var c=(t=l[3],n=l[2],i=l[5],r=l[6],o=l[7],s=[(a=parseInt(l[4],10),a<=49?2e3+a:a<=999?1900+a:a),Pe.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(r,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||Ye.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],c,e))return;e._a=c,e._tzm=function(e,t,n){if(e)return Et[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(l[8],l[9],l[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Ct(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],h(e).empty=!0;var t,i,r,o,s,a=""+e._i,l=a.length,c=0;for(r=z(e._f,e._locale).match(F)||[],t=0;t<r.length;t++)(i=(a.match(ce(o=r[t],e))||[])[0])&&((s=a.substr(0,a.indexOf(i))).length>0&&h(e).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),c+=i.length),B[o]?(i?h(e).empty=!1:h(e).unusedTokens.push(o),fe(o,i,e)):e._strict&&!i&&h(e).unusedTokens.push(o);h(e).charsLeftOver=l-c,a.length>0&&h(e).unusedInput.push(a),e._a[ye]<=12&&!0===h(e).bigHour&&e._a[ye]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ye]=(u=e._locale,d=e._a[ye],null==(p=e._meridiem)?d:null!=u.meridiemHour?u.meridiemHour(d,p):null!=u.isPM?((f=u.isPM(p))&&d<12&&(d+=12),f||12!==d||(d=0),d):d),ft(e),ht(e)}else Tt(e);else St(e);var u,d,p,f}function It(e){var t=e._i,c=e._f;return e._locale=e._locale||dt(e._l),null===t||void 0===c&&""===t?f({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new y(
vendor: 6,527 bytes, line 1
1ht(t)):(a(t)?e._d=t:i(c)?function(e){var t,n,i,r,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)o=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Ct(t),p(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==i||o<i)&&(i=o,n=t));u(e,n||t)}(e):c?Ct(e):function(e){var t=e._i;o(t)?e._d=new Date(n.now()):a(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,Tt(e),!1===e._isValid&&(delete e._isValid,n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=l(t.slice(0),function(e){return parseInt(e,10)}),ft(e)):r(t)?function(e){if(!e._d){var t=P(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ft(e)}}(e):s(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Rt(e,t,n,o,s){var a,l={};return!0!==n&&!1!==n||(o=n,n=void 0),(r(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=n,l._i=e,l._f=t,l._strict=o,(a=new y(ht(It(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Dt(e,t,n,i){return Rt(e,t,n,i,!1)}n.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var At=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()}),kt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:f()});function Ot(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Nt(e){var t=P(e),n=t.year||0,i=t.quarter||0,r=t.month||0,o=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ie.call(xt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,i=0;i<xt.length;++i)if(e[xt[i]]){if(n)return!1;parseFloat(e[xt[i]])!==S(e[xt[i]])&&(n=!0)}return!0}(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=dt(),this._bubble()}function Pt(e){return e instanceof Nt}function Mt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Lt(e,t){V(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+j(~~(e/60),2)+t+j(~~e%60,2)})}Lt("Z",":"),Lt("ZZ",""),le("Z",oe),le("ZZ",oe),he(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ft(oe,e)});var jt=/([\+\-]|\d\d)/gi;function Ft(e,t){var n=(t||"").match(e);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(jt)||["-",0,0],r=60*i[1]+S(i[2]);return 0===r?0:"+"===i[0]?r:-r}function Ut(e,t){var i,r;return t._isUTC?(i=t.clone(),r=(b(e)||a(e)?e.valueOf():Dt(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+r),n.updateOffset(i,!1),i):Dt(e).local()}function Ht(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Bt(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Vt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Wt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,i,r,o,a,l,u=e,d=null;return Pt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(u={},t?u[t]=e:u.milliseconds=e):(d=Vt.exec(e))?(n="-"===d[1]?-1:1,u={y:0,d:S(d[ve])*n,h:S(d[ye])*n,m:S(d[be])*n,s:S(d[_e])*n,ms:S(Mt(1e3*d[Se]))*n}):(d=Wt.exec(e))?u={y:qt(d[2],n="-"===d[1]?-1:1),M:qt(d[3],n),w:qt(d[4],n),d:qt(d[5],n),h:qt(d[6],n),m:qt(d[7],n),s:qt(d[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Dt(u.from),a=Dt(u.to),r=o.isValid()&&a.isValid()?(a=Ut(a,o),o.isBefore(a)?l=Gt(o,a):((l=Gt(a,o)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=r.milliseconds,u.M=r.months),i=new Nt(u),Pt(e)&&c(e,"_locale")&&(i._locale=e._locale),i}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Gt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(R(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),$t(this,zt(n="string"==typeof n?+n:n,i),e),this}}function $t(e,t,i,r){var o=t._milliseconds,s=Mt(t._days),a=Mt(t._months);e.isValid()&&(r=null==r||r,a&&Me(e,Ae(e,"Month")+a*i),s&&ke(e,"Date",Ae(e,"Date")+s*i),o&&e._d.setTime(e._d.valueOf()+o*i),r&&n.updateOffset(e,s||a))}zt.fn=Nt.prototype,zt.invalid=function(){return zt(NaN)};var Kt=Yt(1,"add"),Jt=Yt(-1,"subtract");function Xt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Zt=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function en(){return this._locale}var tn=126227808e5;function nn(e,t){return(e%t+t)%t}function rn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-tn:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>
vendor: 7,403 bytes, line 1
1=0?Date.UTC(e+400,t,n)-tn:Date.UTC(e,t,n)}function sn(e,t){V(0,[e,e.length],0,t)}function an(e,t,n,i,r){var o;return null==e?We(this,i,r).year:(t>(o=ze(e,i,r))&&(t=o),(function(e,t,n,i,r){var o=Ve(e,t,n,i,r),s=He(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}).call(this,e,t,n,i,r))}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),x("weekYear","gg"),x("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),le("G",ie),le("g",ie),le("GG",J,G),le("gg",J,G),le("GGGG",ee,$),le("gggg",ee,$),le("GGGGG",te,K),le("ggggg",te,K),pe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=S(e)}),pe(["gg","GG"],function(e,t,i,r){t[r]=n.parseTwoDigitYear(e)}),V("Q",0,"Qo","quarter"),x("quarter","Q"),L("quarter",7),le("Q",q),he("Q",function(e,t){t[me]=3*(S(e)-1)}),V("D",["DD",2],"Do","date"),x("date","D"),L("date",9),le("D",J),le("DD",J,G),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),he(["D","DD"],ve),he("Do",function(e,t){t[ve]=S(e.match(J)[0])});var ln=De("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),x("dayOfYear","DDD"),L("dayOfYear",4),le("DDD",Z),le("DDDD",Y),he(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),V("m",["mm",2],0,"minute"),x("minute","m"),L("minute",14),le("m",J),le("mm",J,G),he(["m","mm"],be);var cn=De("Minutes",!1);V("s",["ss",2],0,"second"),x("second","s"),L("second",15),le("s",J),le("ss",J,G),he(["s","ss"],_e);var un,dn=De("Seconds",!1);for(V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),x("millisecond","ms"),L("millisecond",16),le("S",Z,q),le("SS",Z,G),le("SSS",Z,Y),un="SSSS";un.length<=9;un+="S")le(un,ne);function hn(e,t){t[Se]=S(1e3*("0."+e))}for(un="S";un.length<=9;un+="S")he(un,hn);var pn=De("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var fn=y.prototype;function gn(e){return e}fn.add=Kt,fn.calendar=function(e,t){var i=e||Dt(),r=Ut(i,this).startOf("day"),o=n.calendarFormat(this,r)||"sameElse",s=t&&(D(t[o])?t[o].call(this,i):t[o]);return this.format(s||this.localeData().calendar(o,this,Dt(i)))},fn.clone=function(){return new y(this)},fn.diff=function(e,t,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=Ut(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=Xt(this,i)/12;break;case"month":o=Xt(this,i);break;case"quarter":o=Xt(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:_(o)},fn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?on:rn;switch(e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Dt(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Dt(),e)},fn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Dt(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Dt(),e)},fn.get=function(e){return D(this[e=N(e)])?this[e]():this},fn.invalidAt=function(){return h(this).overflow},fn.isAfter=function(e,t){var n=b(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=b(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,i){var r=b(e)?e:Dt(e),o=b(t)?t:Dt(t);return!!(this.isValid()&&r.isValid()&&o.isValid())&&("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(o,n):!this.isAfter(o,n))},fn.isSame=function(e,t){var n,i=b(e)?e:Dt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return p(this)},fn.lang=Zt,fn.locale=Qt,fn.localeData=en,fn.max=kt,fn.min=At,fn.parsingFlags=function(){return u({},h(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:M[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=P(e)),i=0;i<n.length;i++)this[n[i].unit](e[n[i].unit]);else if(D(this[e=N(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?on:rn;switch(e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),n.updateOffset(this,!0),this},fn.subtract=Jt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;
vendor: 18,636 bytes, line 1
1return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+t+'[")]')},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Re,fn.isLeapYear=function(){return Ce(this.year())},fn.weekYear=function(e){return an.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return an.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Le,fn.daysInMonth=function(){return Oe(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=We(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return ze(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return ze(this.year(),1,4)},fn.date=ln,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=it,fn.minute=fn.minutes=cn,fn.second=fn.seconds=dn,fn.millisecond=fn.milliseconds=pn,fn.utcOffset=function(e,t,i){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ft(oe,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(r=Ht(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?$t(this,zt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ht(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ft(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Bt,fn.isUTC=Bt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=T("dates accessor is deprecated. Use date instead.",ln),fn.months=T("months accessor is deprecated. Use month instead",Le),fn.years=T("years accessor is deprecated. Use year instead",Re),fn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),fn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),(e=It(e))._a){var t=e._isUTC?d(e._a):Dt(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var mn=k.prototype;function vn(e,t,n,i){var r=dt(),o=d().set(i,t);return r[n](o,e)}function yn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return vn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=vn(e,i,n,"month");return r}function bn(e,t,n,i){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var r,o=dt(),a=e?o._week.dow:0;if(null!=n)return vn(t,(n+a)%7,i,"day");var l=[];for(r=0;r<7;r++)l[r]=vn(t,(r+a)%7,i,"day");return l}mn.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return D(i)?i.call(t,n):i},mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(e){return this._ordinal.replace("%d",e)},mn.preparse=gn,mn.postformat=gn,mn.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return D(r)?r(e,t,n,i):r.replace(/%d/i,e)},mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},mn.set=function(e){var t,n;for(n in e)D(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},mn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(e,t,n){var i,r,o;if(this._monthsParseExact)return(function(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=d([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=Ie.call(this._shortMonthsParse,s))?r:null:-1!==(r=Ie.call(this._longMonthsParse,s))?r:null:"MMM"===t?-1!==(r=Ie.call(this._shortMonthsParse,s))?r:-1!==(r=Ie.call(this._longMonthsParse,s))?r:null:-1!==(r=Ie.call(this._longMonthsParse,s))?r:-1!==(r=Ie.call(this._shortMonthsParse,s))?r:null}).call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=d([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},mn.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=je),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(e){return We(e,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},mn.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},mn.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},mn.weekdaysParse=function(e,t,n){var i,r,o;if(this._weekdaysParseExact)return(function(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=d([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=Ie.call(this._weekdaysParse,s))?r:null:"ddd"===t?-1!==(r=Ie.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=Ie.call(this._minWeekdaysParse,s))?r:null:"dddd"===t?-1!==(r=Ie.call(this._weekdaysParse,s))?r:-1!==(r=Ie.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ie.call(this._minWeekdaysParse,s))?r:null:"ddd"===t?-1!==(r=Ie.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ie.call(this._weekdaysParse,s))?r:-1!==(r=Ie.call(this._minWeekdaysParse,s))?r:null:-1!==(r=Ie.call(this._minWeekdaysParse,s))?r:-1!==(r=Ie.call(this._weekdaysParse,s))?r:-1!==(r=Ie.call(this._shortWeekdaysParse,s))?r:null}).call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=d([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=T("moment.lang is deprecated. Use moment.locale instead.",ct),n.langData=T("moment.langData is deprecated. Use moment.localeData instead.",dt);var _n=Math.abs;function Sn(e,t,n,i){var r=zt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function wn(e){return e<0?Math.floor(e):Math.ceil(e)}function En(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Cn(e){return function(){return this.as(e)}}var In=Cn("ms"),Rn=Cn("s"),Dn=Cn("m"),An=Cn("h"),kn=Cn("d"),On=Cn("w"),xn=Cn("M"),Nn=Cn("Q"),Pn=Cn("y");function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ln=Mn("milliseconds"),jn=Mn("seconds"),Fn=Mn("minutes"),Un=Mn("hours"),Hn=Mn("days"),Bn=Mn("months"),Vn=Mn("years"),Wn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11},qn=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function Yn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=qn(this._milliseconds)/1e3,i=qn(this._days),r=qn(this._months);t=_((e=_(n/60))/60),n%=60,e%=60;var o=_(r/12),s=r%=12,a=i,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=Gn(this._months)!==Gn(d)?"-":"",f=Gn(this._days)!==Gn(d)?"-":"",g=Gn(this._milliseconds)!==Gn(d)?"-":"";return h+"P"+(o?p+o+"Y":"")+(s?p+s+"M":"")+(a?f+a+"D":"")+(l||c||u?"T":"")+(l?g+l+"H":"")+(c?g+c+"M":"")+(u?g+u+"S":"")}var $n=Nt.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},$n.add=function(e,t){return Sn(this,e,t,1)},$n.subtract=function(e,t){return Sn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(n=this._months+En(t=this._days+i/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},$n.asMilliseconds=In,$n.asSeconds=Rn,$n.asMinutes=Dn,$n.asHours=An,$n.asDays=kn,$n.asWeeks=On,$n.asMonths=xn,$n.asQuarters=Nn,$n.asYears=Pn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},$n._bubble=function(){var e,t,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*wn(Tn(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=_(o/1e3),l.seconds=e%60,t=_(e/60),l.minutes=t%60,n=_(t/60),l.hours=n%24,a+=r=_(En(s+=_(n/24))),s-=wn(Tn(r)),i=_(a/12),a%=12,l.days=s,l.months=a,l.years=i,this},$n.clone=function(){return zt(this)},$n.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Ln,$n.seconds=jn,$n.minutes=Fn,$n.hours=Un,$n.days=Hn,$n.weeks=function(){return _(this.days()/7)},$n.months=Bn,$n.years=Vn,$n.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var i=zt(e).abs(),r=Wn(i.as("s")),o=Wn(i.as("m")),s=Wn(i.as("h")),a=Wn(i.as("d")),l=Wn(i.as("M")),c=Wn(i.as("y")),u=r<=zn.ss&&["s",r]||r<zn.s&&["ss",r]||o<=1&&["m"]||o<zn.m&&["mm",o]||s<=1&&["h"]||s<zn.h&&["hh",s]||a<=1&&["d"]||a<zn.d&&["dd",a]||l<=1&&["M"]||l<zn.M&&["MM",l]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+e>0,u[4]=n,(function(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}).apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},$n.toISOString=Yn,$n.toString=Yn,$n.toJSON=Yn,$n.locale=Qt,$n.localeData=en,$n.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yn),$n.lang=Zt,V("X",0,0,"unix"),V("x",0,0,"valueOf"),le("x",ie),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),he("x",function(e,t,n){n._d=new Date(S(e))}),n.version="2.24.0",e=Dt,n.fn=fn,n.min=function(){return Ot("isBefore",[].slice.call(arguments,0))},n.max=function(){return Ot("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=d,n.unix=function(e){return Dt(1e3*e)},n.months=function(e,t){return yn(e,t,"months")},n.isDate=a,n.locale=ct,n.invalid=f,n.duration=zt,n.isMoment=b,n.weekdays=function(e,t,n){return bn(e,t,n,"weekdays")},n.parseZone=function(){return Dt.apply(null,arguments).parseZone()},n.localeData=dt,n.isDuration=Pt,n.monthsShort=function(e,t){return yn(e,t,"monthsShort")},n.weekdaysMin=function(e,t,n){return bn(e,t,n,"weekdaysMin")},n.defineLocale=ut,n.updateLocale=function(e,t){if(null!=t){var n,i,r=rt;null!=(i=lt(e))&&(r=i._config),(n=new k(t=A(r,t))).parentLocale=ot[e],ot[e]=n,ct(e)}else null!=ot[e]&&(null!=ot[e].parentLocale?ot[e]=ot[e].parentLocale:null!=ot[e]&&delete ot[e]);return ot[e]},n.locales=function(){return C(ot)},n.weekdaysShort=function(e,t,n){return bn(e,t,n,"weekdaysShort")},n.normalizeUnits=N,n.relativeTimeRounding=function(e){return void 0===e?Wn:"function"==typeof e&&(Wn=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},n.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=fn,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("jquery")):"function"==typeof define&&define.amd?define(["moment","jquery"],t):"object"==typeof exports?exp
1orts.FullCalendar=t(require("moment"),require("jquery")):e.FullCalendar=t(e.moment,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=236)}([function(t,n){t.exports=e},,function(e,t){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};t.__extends=function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}},function(e,n){e.exports=t},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(3);function o(e){e.height("")}function s(e){var t,n=e[0].offsetWidth-e[0].clientWidth,i=e[0].offsetHeight-e[0].clientHeight;return n=a(n),t={left:0,right:0,top:0,bottom:i=a(i)},function(){var e,t;return null===l&&(t=(e=r("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body")).children().offset().left>e.offset().left,e.remove(),l=t),l}()&&"rtl"===e.css("direction")?t.left=n:t.right=n,t}function a(e){return e=Math.max(0,e),Math.round(e)}t.compensateScroll=function(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})},t.uncompensateScroll=function(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})},t.disableCursor=function(){r("body").addClass("fc-not-allowed")},t.enableCursor=function(){r("body").removeClass("fc-not-allowed")},t.distributeHeight=function(e,t,n){var i=Math.floor(t/e.length),s=Math.floor(t-i*(e.length-1)),a=[],l=[],c=[],u=0;o(e),e.each(function(t,n){var o=t===e.length-1?s:i,d=r(n).outerHeight(!0);d<o?(a.push(n),l.push(d),c.push(r(n).height())):u+=d}),n&&(t-=u,i=Math.floor(t/a.length),s=Math.floor(t-i*(a.length-1))),r(a).each(function(e,t){var n=e===a.length-1?s:i,o=l[e],u=n-(o-c[e]);o<n&&r(t).height(u)})},t.undistributeHeight=o,t.matchCellWidths=function(e){var t=0;return e.find("> *").each(function(e,n){var i=r(n).outerWidth();i>t&&(t=i)}),e.width(++t),t},t.subtractInnerElHeight=function(e,t){var n,i=e.add(t);return i.css({position:"relative",left:-1}),n=e.outerHeight()-t.outerHeight(),i.css({position:"",left:""}),n},t.getScrollParent=function(e){var t=e.css("position"),n=e.parents().filter(function(){var e=r(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&n.length?n:r(e[0].ownerDocument||document)},t.getOuterRect=function(e,t){var n=e.offset(),i=n.left-(t?t.left:0),r=n.top-(t?t.top:0);return{left:i,right:i+e.outerWidth(),top:r,bottom:r+e.outerHeight()}},t.getClientRect=function(e,t){var n=e.offset(),i=s(e),r=n.left+c(e,"border-left-width")+i.left-(t?t.left:0),o=n.top+c(e,"border-top-width")+i.top-(t?t.top:0);return{left:r,right:r+e[0].clientWidth,top:o,bottom:o+e[0].clientHeight}},t.getContentRect=function(e,t){var n=e.offset(),i=n.left+c(e,"border-left-width")+c(e,"padding-left")-(t?t.left:0),r=n.top+c(e,"border-top-width")+c(e,"padding-top")-(t?t.top:0);return{left:i,right:i+e.width(),top:r,bottom:r+e.height()}},t.getScrollbarWidths=s;var l=null;function c(e,t){return parseFloat(e.css(t))||0}function u(e){e.preventDefault()}function d(e,t,n,i,r){if(n.func)return n.func(e,t);var o=e[n.field],s=t[n.field];return null==o&&i&&(o=i[n.field]),null==s&&r&&(s=r[n.field]),h(o,s)*(n.order||1)}function h(e,t){return e||t?null==t?-1:null==e?1:"string"===r.type(e)||"string"===r.type(t)?String(e).localeCompare(String(t)):e-t:0}function p(e,n){var i,r,o;for(i=0;i<t.unitsDesc.length&&!((o=f(r=t.unitsDesc[i],e,n))>=1&&_(o));i++);return r}function f(e,t,n){return null!=n?n.diff(t,e,!0):i.isDuration(t)?t.as(e):t.end.diff(t.start,e,!0)}function g(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function m(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=window.console;if(n&&n.log)return n.log.apply(n,e)}t.isPrimaryMouseButton=function(e){return 1===e.which&&!e.ctrlKey},t.getEvX=function(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageX:e.pageX},t.getEvY=function(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageY:e.pageY},t.getEvIsTouch=function(e){return/^touch/.test(e.type)},t.preventSelection=function(e){e.addClass("fc-unselectable").on("selectstart",u)},t.allowSelection=function(e){e.removeClass("fc-unselectable").off("selectstart",u)},t.preventDefault=u,t.intersectRects=function(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n},t.constrainPoint=function(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}},t.getRectCenter=function(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}},t.diffPoints=function(e,t){return{left:e.left-t.left,top:e.top-t.top}},t.parseFieldSpecs=function(e){var t,n,i=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:r.isArray(e)&&(o=e),t=0;t<o.length;t++)"string"==typeof(n=o[t])?i.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&i.push({func:n});return i},t.compareByFieldSpecs=function(e,t,n,i,r){var o,s;for(o=0;o<n.length;o++)if(s=d(e,t,n[o],i,r))return s;return 0},t.compareByFieldSpec=d,t.flexibleCompare=h,t.dayIDs=["sun","mon","tue","wed","thu","fri","sat"],t.unitsDesc=["year","month","week","day","hour","minute","second","millisecond"],t.diffDayTime=function(e,t){return i.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days"),ms:e.time()-t.time()})},t.diffDay=function(e,t){return i.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days")})},t.diffByUnit=function(e,t,n){return i.duration(Math.round(e.diff(t,n,!0)),n)},t.computeGreatestUnit=p,t.computeDurationGreatestUnit=function(e,t){var n=p(e);return"week"===n&&"object"==typeof t&&t.days&&(n="day"),n},t.divideRangeByDuration=function(e,t,n){var i;return g(n)?(t-e)/n:(i=n.asMonths(),Math.abs(i)>=1&&_(i)?t.diff(e,"months",!0)/i:t.diff(e,"days",!0)/n.asDays())},t.divideDurationByDuration=function(e,t){var n,i;return g(e)||g(t)?e/t:(n=e.asMonths(),i=t.asMonths(),Math.abs(n)>=1&&_(n)&&Math.abs(i)>=1&&_(i)?n/i:e.asDays()/t.asDays())},t.multiplyDuration=function(e,t){var n;return g(e)?i.duration(e*t):(n=e.asMonths(),Math.abs(n)>=1&&_(n)?i.duration({months:n*t}):i.duration({days:e.asDays()*t}))},t.durationHasTime=g,t.isNativeDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}
1,t.isTimeString=function(e){return"string"==typeof e&&/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)},t.log=m,t.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=window.console;return n&&n.warn?n.warn.apply(n,e):m.apply(null,e)};var v={}.hasOwnProperty;function y(e,t){return v.call(e,t)}function b(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function _(e){return e%1==0}t.mergeProps=function e(t,n){var i,r,o,s,a,l,c={};if(n)for(i=0;i<n.length;i++){for(r=n[i],o=[],s=t.length-1;s>=0;s--)if("object"==typeof(a=t[s][r]))o.unshift(a);else if(void 0!==a){c[r]=a;break}o.length&&(c[r]=e(o))}for(i=t.length-1;i>=0;i--)for(r in l=t[i])r in c||(c[r]=l[r]);return c},t.copyOwnProps=function(e,t){for(var n in e)y(e,n)&&(t[n]=e[n])},t.hasOwnProp=y,t.applyAll=function(e,t,n){if(r.isFunction(e)&&(e=[e]),e){var i=void 0,o=void 0;for(i=0;i<e.length;i++)o=e[i].apply(t,n)||o;return o}},t.removeMatching=function(e,t){for(var n=0,i=0;i<e.length;)t(e[i])?(e.splice(i,1),n++):i++;return n},t.removeExact=function(e,t){for(var n=0,i=0;i<e.length;)e[i]===t?(e.splice(i,1),n++):i++;return n},t.isArraysEqual=function(e,t){var n,i=e.length;if(null==i||i!==t.length)return!1;for(n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t.firstDefined=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)if(void 0!==e[n])return e[n]},t.htmlEscape=b,t.stripHtmlEntities=function(e){return e.replace(/&.*?;/g,"")},t.cssToStr=function(e){var t=[];
1return r.each(e,function(e,n){null!=n&&t.push(e+":"+n)}),t.join(";")},t.attrsToStr=function(e){var t=[];return r.each(e,function(e,n){null!=n&&t.push(e+'="'+b(n)+'"')}),t.join(" ")},t.capitaliseFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.compareNumbers=function(e,t){return e-t},t.isInt=_,t.proxy=function(e,t){var n=e[t];return function(){return n.apply(e,arguments)}},t.debounce=function(e,t,n){var i,r,o,s,a;void 0===n&&(n=!1);var l=function(){var c=+new Date-s;c<t?i=setTimeout(l,t-c):(i=null,n||(a=e.apply(o,r),o=r=null))};return function(){o=this,r=arguments,s=+new Date;var c=n&&!i;return i||(i=setTimeout(l,t)),c&&(a=e.apply(o,r),o=r=null),a}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(10),o=function(){function e(e,t){this.isStart=!0,this.isEnd=!0,i.isMoment(e)&&(e=e.clone().stripZone()),i.isMoment(t)&&(t=t.clone().stripZone()),e&&(this.startMs=e.valueOf()),t&&(this.endMs=t.valueOf())}return e.invertRanges=function(t,n){var i,r,o=[],a=n.startMs;for(t.sort(s),i=0;i<t.length;i++)(r=t[i]).startMs>a&&o.push(new e(a,r.startMs)),r.endMs>a&&(a=r.endMs);return a<n.endMs&&o.push(new e(a,n.endMs)),o},e.prototype.intersect=function(t){var n=this.startMs,i=this.endMs,r=null;return null!=t.startMs&&(n=null==n?t.startMs:Math.max(n,t.startMs)),null!=t.endMs&&(i=null==i?t.endMs:Math.min(i,t.endMs)),(null==n||null==i||n<i)&&((r=new e(n,i)).isStart=this.isStart&&n===this.startMs,r.isEnd=this.isEnd&&i===this.endMs),r},e.prototype.intersectsWith=function(e){return(null==this.endMs||null==e.startMs||this.endMs>e.startMs)&&(null==this.startMs||null==e.endMs||this.startMs<e.endMs)},e.prototype.containsRange=function(e){return(null==this.startMs||null!=e.startMs&&e.startMs>=this.startMs)&&(null==this.endMs||null!=e.endMs&&e.endMs<=this.endMs)},e.prototype.containsDate=function(e){var t=e.valueOf();return(null==this.startMs||t>=this.startMs)&&(null==this.endMs||t<this.endMs)},e.prototype.constrainDate=function(e){var t=e.valueOf();return null!=this.startMs&&t<this.startMs&&(t=this.startMs),null!=this.endMs&&t>=this.endMs&&(t=this.endMs-1),t},e.prototype.equals=function(e){return this.startMs===e.startMs&&this.endMs===e.endMs},e.prototype.clone=function(){var t=new e(this.startMs,this.endMs);return t.isStart=this.isStart,t.isEnd=this.isEnd,t},e.prototype.getStart=function(){return null!=this.startMs?r.default.utc(this.startMs).stripZone():null},e.prototype.getEnd=function(){return null!=this.endMs?r.default.utc(this.endMs).stripZone():null},e.prototype.as=function(e){return i.utc(this.endMs).diff(i.utc(this.startMs),e,!0)},e}();function s(e,t){return e.startMs-t.startMs}t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(208),s=n(33),a=n(49),l=function(e){function t(n){var i=e.call(this)||this;return i.calendar=n,i.className=[],i.uid=String(t.uuid++),i}return i.__extends(t,e),t.parse=function(e,t){var n=new this(t);return!("object"!=typeof e||!n.applyProps(e))&&n},t.normalizeId=function(e){return e?String(e):null},t.prototype.fetch=function(e,t,n){},t.prototype.removeEventDefsById=function(e){},t.prototype.removeAllEventDefs=function(){},t.prototype.getPrimitive=function(e){},t.prototype.parseEventDefs=function(e){var t,n,i=[];for(t=0;t<e.length;t++)(n=this.parseEventDef(e[t]))&&i.push(n);return i},t.prototype.parseEventDef=function(e){var t=this.calendar.opt("eventDataTransform"),n=this.eventDataTransform;return t&&(e=t(e,this.calendar)),n&&(e=n(e,this.calendar)),a.default.parse(e,this)},t.prototype.applyManualStandardProps=function(e){return null!=e.id&&(this.id=t.normalizeId(e.id)),r.isArray(e.className)?this.className=e.className:"string"==typeof e.className&&(this.className=e.className.split(/\s+/)),!0},t.uuid=0,t.defineStandardProps=o.default.defineStandardProps,t.copyVerbatimStandardProps=o.default.copyVerbatimStandardProps,t}(s.default);t.default=l,o.default.mixInto(l),l.defineStandardProps({id:!1,className:!1,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0,editable:!0,startEditable:!0,durationEditable:!0,rendering:!0,overlap:!0,constraint:!0,allDayDefault:!0,eventDataTransform:!0})}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=0,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.listenTo=function(e,t,n){if("object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&this.listenTo(e,i,t[i]);else"string"==typeof t&&e.on(t+"."+this.getListenerNamespace(),r.proxy(n,this))},t.prototype.stopListeningTo=function(e,t){e.off((t||"")+"."+this.getListenerNamespace())},t.prototype.getListenerNamespace=function(){return null==this.listenerId&&(this.listenerId=o++),"_listener"+this.listenerId},t}(n(14).default);t.default=s},,,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(4),s=/^\s*\d{4}-\d\d$/,a=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,l=i.fn;t.newMomentProto=l;var c=r.extend({},l);t.oldMomentProto=c;var u=i.momentProperties;u.push("_fullCalendar"),u.push("_ambigTime"),u.push("_ambigZone"),t.oldMomentFormat=function(e,t){return c.format.call(e,t)};var d=function(){return h(arguments)};function h(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var l,c,u,d,h=e[0],p=1===e.length&&"string"==typeof h;return i.isMoment(h)||o.isNativeDate(h)||void 0===h?d=i.apply(null,e):(l=!1,c=!1,p?s.test(h)?(e=[h+="-01"],l=!0,c=!0):(u=a.exec(h))&&(l=!u[5],c=!0):r.isArray(h)&&(c=!0),d=t||l?i.utc.apply(i,e):i.apply(null,e),l?(d._ambigTime=!0,d._ambigZone=!0):n&&(c?d._ambigZone=!0:p&&d.utcOffset(h))),d._fullCalendar=!0,d}t.default=d,d.utc=function(){var e=h(arguments,!0);return e.hasTime()&&e.utc(),e},d.parseZone=function(){return h(arguments,!0,!0)},l.week=l.weeks=function(e){var t=this._locale._fullCalendar_weekCalc;return null==e&&"function"==typeof t?t(this):"ISO"===t?c.isoWeek.apply(this,arguments):c.week.apply(this,arguments)},l.time=function(e){if(!this._fullCalendar)return c.time.apply(this,arguments);if(null==e)return i.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,i.isDuration(e)||i.isMoment(e)||(e=i.duration(e));var t=0;return i.isDuration(e)&&(t=24*Math.floor(e.asDays())),this.hours(t+e.hours()).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds())},l.stripTime=function(){return this._ambigTime||(this.utc(!0),this.set({hours:0,minutes:0,seconds:0,ms:0}),this._ambigTime=!0,this._ambigZone=!0),this},l.hasTime=function(){return!this._ambigTime},l.stripZone=function(){var e;return this._ambigZone||(e=this._ambigTime,this.utc(!0),this._ambigTime=e||!1,this._ambigZone=!0),this},l.hasZone=function(){return!this._ambigZone},l.local=function(e){return c.local.call(this,this._ambigZone||e),this._ambigTime=!1,this._ambigZone=!1,this},l.utc=function(e){return c.utc.call(this,e),this._ambigTime=!1,this._ambigZone=!1,this},l.utcOffset=function(e){return null!=e&&(this._ambigTime=!1,this._ambigZone=!1),c.utcOffset.apply(this,arguments)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.on=function(e,t){return r(this).on(e,this._prepareIntercept(t)),this},t.prototype.one=function(e,t){return r(this).one(e,this._prepareIntercept(t)),this},t.prototype._prepareIntercept=function(e){var t=function(t,n){return e.apply(n.context||this,n.args||[])};return e.guid||(e.guid=r.guid++),t.guid=e.guid,t},t.prototype.off=function(e,t){return r(this).off(e,t),this},t.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r(this).triggerHandler(e,{args:t}),this},t.prototype.triggerWith=function(e,t,n){return r(this).triggerHandler(e,{context:t,args:n}),this},t.prototype.hasHandlers=function(e){var t=r._data(this,"events");return t&&t[e]&&t[e].length>0},t}(n(14).default);t.default=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.isAllDay=!1,this.unzonedRange=e,this.isAllDay=t}return e.prototype.toLegacy=function(e){return{start:e.msToMoment(this.unzonedRange.startMs,this.isAllDay),end:e.msToMoment(this.unzonedRange.endMs,this.isAllDay)}},e}();t.default=n}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(34),o=n(209),s=n(17),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildInstances=function(){return[this.buildInstance()]},t.prototype.buildInstance=function(){return new o.default(this,this.dateProfile)},t.prototype.isAllDay=function(){return this.dateProfile.isAllDay()},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t.dateProfile=this.dateProfile,t},t.prototype.rezone=function(){var e=this.source.calendar,t=this.dateProfile;this.dateProfile=new s.default(e.moment(t.start),t.end?e.moment(t.end):null,e)},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t),i=s.default.parse(t,this.source);return!!i&&(this.dateProfile=i,null!=t.date&&(this.miscProps.date=t.date),n)},t}(r.default);t.default=a,a.defineStandardProps({start:!1,date:!1,end:!1,allDay:!1})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.mixInto=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e.prototype[n]||(e.prototype[n]=t.prototype[n])})},e.mixOver=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e.prototype[n]=t.prototype[n]})},e}();t.default=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.view=e._getView(),this.component=e}return e.prototype.opt=function(e){return this.view.opt(e)},e.prototype.end=function(){},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.version="3.9.0",t.internalApiVersion=12;var i=n(4);t.applyAll=i.applyAll,t.debounce=i.debounce,t.isInt=i.isInt,t.htmlEscape=i.htmlEscape,t.cssToStr=i.cssToStr,t.proxy=i.proxy,t.capitaliseFirstLetter=i.capitaliseFirstLetter,t.getOuterRect=i.getOuterRect,t.getClientRect=i.getClientRect,t.getContentRect=i.getContentRect,t.getScrollbarWidths=i.getScrollbarWidths,t.preventDefault=i.preventDefault,t.parseFieldSpecs=i.parseFieldSpecs,t.compareByFieldSpecs=i.compareByFieldSpecs,t.compareByFieldSpec=i.compareByFieldSpec,t.flexibleCompare=i.flexibleCompare,t.computeGreatestUnit=i.computeGreatestUnit,t.divideRangeByDuration=i.divideRangeByDuration,t.divideDurationByDuration=i.divideDurationByDuration,t.multiplyDuration=i.multiplyDuration,t.durationHasTime=i.durationHasTime,t.log=i.log,t.warn=i.warn,t.removeExact=i.removeExact,t.intersectRects=i.intersectRects;var r=n(47);t.formatDate=r.formatDate,t.formatRange=r.formatRange,t.queryMostGranularFormatUnit=r.queryMostGranularFormatUnit;var o=n(31);t.datepickerLocale=o.datepickerLocale,t.locale=o.locale;var s=n(10);t.moment=s.default;var a=n(11);t.EmitterMixin=a.default;var l=n(7);t.ListenerMixin=l.default;var c=n(48);t.Model=c.default;var u=n(207);t.Constraints=u.default;var d=n(5);t.UnzonedRange=d.default;var h=n(12);t.ComponentFootprint=h.default;var p=n(212);t.BusinessHourGenerator=p.default;var f=n(34);t.EventDef=f.default;var g=n(37);t.EventDefMutation=g.default;var m=n(38);t.EventSourceParser=m.default;var v=n(6);t.EventSource=v.default;var y=n(51);t.defineThemeSystem=y.defineThemeSystem;var b=n(18);t.EventInstanceGroup=b.default;var _=n(52);t.ArrayEventSource=_.default;var S=n(215);t.FuncEventSource=S.default;var w=n(216);t.JsonFeedEventSource=w.default;var E=n(36);t.EventFootprint=E.default;var T=n(33);t.Class=T.default;var C=n(14);t.Mixin=C.default;var I=n(53);t.CoordCache=I.default;var R=n(54);t.DragListener=R.default;var D=n(20);t.Promise=D.default;var A=n(217);t.TaskQueue=A.default;var k=n(218);t.RenderQueue=k.default;var O=n(39);t.Scroller=O.default;var x=n(19);t.Theme=x.default;var N=n(219);t.DateComponent=N.default;var P=n(40);t.InteractiveDateComponent=P.default;var M=n(220);t.Calendar=M.default;var L=n(41);t.View=L.default;var j=n(22);t.defineView=j.defineView,t.getViewConfig=j.getViewConfig;var F=n(55);t.DayTableMixin=F.default;var U=n(56);t.BusinessHourRenderer=U.default;var H=n(42);t.EventRenderer=H.default;var B=n(57);t.FillRenderer=B.default;var V=n(58);t.HelperRenderer=V.default;var W=n(222);t.ExternalDropping=W.default;var z=n(223);t.EventResizing=z.default;var q=n(59);t.EventPointing=q.default;var G=n(224);t.EventDragging=G.default;var Y=n(225);t.DateSelecting=Y.default;var $=n(60);t.StandardInteractionsMixin=$.default;var K=n(226);t.AgendaView=K.default;var J=n(227);t.TimeGrid=J.default;var X=n(61);t.DayGrid=X.default;var Q=n(62);t.BasicView=Q.default;var Z=n(229);t.MonthView=Z.default;var ee=n(230);t.ListView=ee.default}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=function(){function e(e,t,n){this.start=e,this.end=t||null,this.unzonedRange=this.buildUnzonedRange(n)}return e.parse=function(t,n){var i=t.start||t.date,r=t.end;if(!i)return!1;var o=n.calendar,s=o.moment(i),a=r?o.moment(r):null,l=t.allDay,c=o.opt("forceEventDuration");return!!s.isValid()&&(!a||a.isValid()&&a.isAfter(s)||(a=null),null==l&&null==(l=n.allDayDefault)&&(l=o.opt("allDayDefault")),!0===l?(s.stripTime(),a&&a.stripTime()):!1===l&&(s.hasTime()||s.time(0),a&&!a.hasTime()&&a.time(0)),!a&&c&&(a=o.getDefaultEventEnd(!s.hasTime(),s)),new e(s,a,o))},e.isStandardProp=function(e){return"start"===e||"date"===e||"end"===e||"allDay"===e},e.prototype.isAllDay=function(){return!(this.start.hasTime()||this.end&&this.end.hasTime())},e.prototype.buildUnzonedRange=function(e){var t=this.start.clone().stripZone().valueOf(),n=this.getEnd(e).stripZone().valueOf();return new i.default(t,n)},e.prototype.getEnd=function(e){return this.end?this.end.clone():e.getDefaultEventEnd(this.isAllDay(),this.start)},e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n(35),o=n(211),s=function(){function e(e){this.eventInstances=e||[]}return e.prototype.getAllEventRanges=function(e){return e?this.sliceNormalRenderRanges(e):this.eventInstances.map(r.eventInstanceToEventRange)},e.prototype.sliceRenderRanges=function(e){return this.isInverse()?this.sliceInverseRenderRanges(e):this.sliceNormalRenderRanges(e)},e.prototype.sliceNormalRenderRanges=function(e){var t,n,i,r=this.eventInstances,s=[];for(t=0;t<r.length;t++)(i=(n=r[t]).dateProfile.unzonedRange.intersect(e))&&s.push(new o.default(i,n.def,n));return s},e.prototype.sliceInverseRenderRanges=function(e){var t=this.eventInstances.map(r.eventInstanceToUnzonedRange),n=this.getEventDef();return(t=i.default.invertRanges(t,e)).map(function(e){return new o.default(e,n)})},e.prototype.isInverse=function(){return this.getEventDef().hasInverseRendering()},e.prototype.getEventDef=function(){return this.explicitEventDef||this.eventInstances[0].def},e}();t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=function(){function e(e){this.optionsManager=e,this.processIconOverride()}return e.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.optionsManager.get(this.iconOverrideOption))},e.prototype.setIconOverride=function(e){var t,n;if(i.isPlainObject(e)){for(n in t=i.extend({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e){var t=this.iconClasses[e];return t?this.baseIconClass+" "+t:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();t.default=r,r.prototype.classes={},r.prototype.iconClasses={},r.prototype.baseIconClass="",r.prototype.iconOverridePrefix=""},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r={construct:function(e){var t=i.Deferred(),n=t.promise();return"function"==typeof e&&e(function(e){t.resolve(e),o(n,e)},function(){t.reject(),s(n)}),n},resolve:function(e){var t=i.Deferred().resolve(e).promise();return o(t,e),t},reject:function(){var e=i.Deferred().reject().promise();return s(e),e}};function o(e,t){e.then=function(n){return"function"==typeof n?r.resolve(n(t)):e}}function s(e){e.then=function(t,n){return"function"==typeof n&&n(),e}}t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(16),o=n(11),s=n(7);r.touchMouseIgnoreWait=500;var a=null,l=0,c=function(){function e(){this.isTouching=!1,this.mouseIgnoreDepth=0}return e.get=function(){return a||(a=new e).bind(),a},e.needed=function(){e.get(),l++},e.unneeded=function(){--l||(a.unbind(),a=null)},e.prototype.bind=function(){var e=this;this.listenTo(i(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(t){e.handleTouchMove(i.Event(t))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(t){e.handleScroll(i.Event(t))},!0)},e.prototype.unbind=function(){this.stopListeningTo(i(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},e.prototype.handleTouchStart=function(e){this.stopTouch(e,!0),this.isTouching=!0,this.trigger("touchstart",e)},e.prototype.handleTouchMove=function(e){this.isTouching&&this.trigger("touchmove",e)},e.prototype.handleTouchCancel=function(e){this.isTouching&&(this.trigger("touchcancel",e),this.stopTouch(e))},e.prototype.handleTouchEnd=function(e){this.stopTouch(e)},e.prototype.handleMouseDown=function(e){this.shouldIgnoreMouse()||this.trigger("mousedown",e)},e.prototype.handleMouseMove=function(e){this.shouldIgnoreMouse()||this.trigger("mousemove",e)},e.prototype.handleMouseUp=function(e){this.shouldIgnoreMouse()||this.trigger("mouseup",e)},e.prototype.handleClick=function(e){this.shouldIgnoreMouse()||this.trigger("click",e)},e.prototype.handleSelectStart=function(e){this.trigger("selectstart",e)},e.prototype.handleContextMenu=function(e){this.trigger("contextmenu",e)},e.prototype.handleScroll=function(e){this.trigger("scroll",e)},e.prototype.stopTouch=function(e,t){void 0===t&&(t=!1),this.isTouching&&(this.isTouching=!1,this.trigger("touchend",e),t||this.startTouchMouseIgnore())},e.prototype.startTouchMouseIgnore=function(){var e=this,t=r.touchMouseIgnoreWait;t&&(this.mouseIgnoreDepth++,setTimeout(function(){e.mouseIgnoreDepth--},t))},e.prototype.shouldIgnoreMouse=function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)},e}();t.default=c,s.default.mixInto(c),o.default.mixInto(c)}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(16);t.viewHash={},i.views=t.viewHash,t.defineView=function(e,n){t.viewHash[e]=n},t.getViewConfig=function(e){return t.viewHash[e]}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(e){function t(t,n){var i=e.call(this,n)||this;return i.component=t,i}return i.__extends(t,e),t.prototype.handleInteractionStart=function(t){var n,i,o,s=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),t?(o=i={left:r.getEvX(t),top:r.getEvY(t)},s&&(n=r.getOuterRect(s),o=r.constrainPoint(o,n)),this.origHit=this.queryHit(o.left,o.top),s&&this.options.subjectCenter&&(this.origHit&&(n=r.intersectRects(this.origHit,n)||n),o=r.getRectCenter(n)),this.coordAdjust=r.diffPoints(o,i)):(this.origHit=null,this.coordAdjust=null),e.prototype.handleInteractionStart.call(this,t)},t.prototype.handleDragStart=function(t){var n;e.prototype.handleDragStart.call(this,t),(n=this.queryHit(r.getEvX(t),r.getEvY(t)))&&this.handleHitOver(n)},t.prototype.handleDrag=function(t,n,i){var o;e.prototype.handleDrag.call(this,t,n,i),s(o=this.queryHit(r.getEvX(i),r.getEvY(i)),this.hit)||(this.hit&&this.handleHitOut(),o&&this.handleHitOver(o))},t.prototype.handleDragEnd=function(t){this.handleHitDone(),e.prototype.handleDragEnd.call(this,t)},t.prototype.handleHitOver=function(e){var t=s(e,this.origHit);this.hit=e,this.trigger("hitOver",this.hit,t,this.origHit)},t.prototype.handleHitOut=function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},t.prototype.handleHitDone=function(){this.hit&&this.trigger("hitDone",this.hit)},t.prototype.handleInteractionEnd=function(t,n){e.prototype.handleInteractionEnd.call(this,t,n),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},t.prototype.handleScrollEnd=function(){e.prototype.handleScrollEnd.call(this),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},t.prototype.queryHit=function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.component.queryHit(e,t)},t}(n(54).default);function s(e,t){return!e&&!t||!(!e||!t)&&e.component===t.component&&a(e,t)&&a(t,e)}function a(e,t){for(var n in e)if(!/^(component|left|right|top|bottom)$/.test(n)&&e[n]!==t[n])return!1;return!0}t.default=o},,,,,,,,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(0),o=n(16),s=n(32),a=n(4);t.localeOptionHash={},o.locales=t.localeOptionHash;var l={buttonText:function(e){return{prev:a.stripHtmlEntities(e.prevText),next:a.stripHtmlEntities(e.nextText),today:a.stripHtmlEntities(e.currentText)}},monthYearFormat:function(e){return e.showMonthAfterYear?"YYYY["+e.yearSuffix+"] MMMM":"MMMM YYYY["+e.yearSuffix+"]"}},c={dayOfMonthFormat:function(e,t){var n=e.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(e){return e.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"")}},u={smallDayDateFormat:function(e){return e.isRTL?"D dd":"dd D"},weekFormat:function(e){return e.isRTL?"w[ "+e.weekNumberTitle+"]":"["+e.weekNumberTitle+" ]w"},smallWeekFormat:function(e){return e.isRTL?"w["+e.weekNumberTitle+"]":"["+e.weekNumberTitle+"]w"}};function d(e,n){var r,o;r=t.localeOptionHash[e]||(t.localeOptionHash[e]={}),n&&(r=t.localeOptionHash[e]=s.mergeOptions([r,n])),o=h(e),i.each(c,function(e,t){null==r[e]&&(r[e]=t(o,r))}),s.globalDefaults.locale=e}function h(e){return r.localeData(e)||r.localeData("en")}t.populateInstanceComputableOptions=function(e){i.each(u,function(t,n){null==e[t]&&(e[t]=n(e))})},t.datepickerLocale=function(e,n,r){var o=t.localeOptionHash[e]||(t.localeOptionHash[e]={});o.isRTL=r.isRTL,o.weekNumberTitle=r.weekHeader,i.each(l,function(e,t){o[e]=t(r)});var s=i.datepicker;s&&(s.regional[n]=s.regional[e]=r,s.regional.en=s.regional[""],s.setDefaults(r))},t.locale=d,t.getMomentLocaleData=h,d("en",s.englishDefaults)}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(4);t.globalDefaults={titleRangeSeparator:" \u2013 ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",columnHeader:!0,defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,locale:null,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},allDayText:"all-day",agendaEventMinHeight:0,theme:!1,dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},t.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},t.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var r=["header","footer","buttonText","buttonIcons","themeButtonIcons"];t.mergeOptions=function(e){return i.mergeProps(e,r)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(){function e(){}return e.extend=function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(this);return r.copyOwnProps(e,t.prototype),t},e.mixin=function(e){r.copyOwnProps(e,this.prototype)},e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(208),o=function(){function e(e){this.source=e,this.className=[],this.miscProps={}}return e.parse=function(e,t){var n=new this(t);return!!n.applyProps(e)&&n},e.normalizeId=function(e){return String(e)},e.generateId=function(){return"_fc"+e.uuid++},e.prototype.clone=function(){var t=new this.constructor(this.source);return t.id=this.id,t.rawId=this.rawId,t.uid=this.uid,e.copyVerbatimStandardProps(this,t),t.className=this.className.slice(),t.miscProps=i.extend({},this.miscProps),t},e.prototype.hasInverseRendering=function(){return"inverse-background"===this.getRendering()},e.prototype.hasBgRendering=function(){var e=this.getRendering();return"inverse-background"===e||"background"===e},e.prototype.getRendering=function(){return null!=this.rendering?this.rendering:this.source.rendering},e.prototype.getConstraint=function(){return null!=this.constraint?this.constraint:null!=this.source.constraint?this.source.constraint:this.source.calendar.opt("eventConstraint")},e.prototype.getOverlap=function(){return null!=this.overlap?this.overlap:null!=this.source.overlap?this.source.overlap:this.source.calendar.opt("eventOverlap")},e.prototype.isStartExplicitlyEditable=function(){return null!=this.startEditable?this.startEditable:this.source.startEditable},e.prototype.isDurationExplicitlyEditable=function(){return null!=this.durationEditable?this.durationEditable:this.source.durationEditable},e.prototype.isExplicitlyEditable=function(){return null!=this.editable?this.editable:this.source.editable},e.prototype.toLegacy=function(){var t=i.extend({},this.miscProps);return t._id=this.uid,t.source=this.source,t.className=this.className.slice(),t.allDay=this.isAllDay(),null!=this.rawId&&(t.id=this.rawId),e.copyVerbatimStandardProps(this,t),t},e.prototype.applyManualStandardProps=function(t){return this.id=null!=t.id?e.normalizeId(this.rawId=t.id):e.generateId(),this.uid=null!=t._id?String(t._id):e.generateId(),i.isArray(t.className)&&(this.className=t.className),"string"==typeof t.className&&(this.className=t.className.split(/\s+/)),!0},e.prototype.applyMiscProps=function(e){i.extend(this.miscProps,e)},e.uuid=0,e.defineStandardProps=r.default.defineStandardProps,e.copyVerbatimStandardProps=r.default.copyVerbatimStandardProps,e}();t.default=o,r.default.mixInto(o),o.defineStandardProps({_id:!1,id:!1,className:!1,source:!1,title:!0,url:!0,rendering:!0,constraint:!0,overlap:!0,editable:!0,startEditable:!0,durationEditable:!0,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0})}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(211),r=n(36),o=n(12);t.eventDefsToEventInstances=function(e,t){var n,i=[];for(n=0;n<e.length;n++)i.push.apply(i,e[n].buildInstances(t));return i},t.eventInstanceToEventRange=function(e){return new i.default(e.dateProfile.unzonedRange,e.def,e)},t.eventRangeToEventFootprint=function(e){return new r.default(new o.default(e.unzonedRange,e.eventDef.isAllDay()),e.eventDef,e.eventInstance)},t.eventInstanceToUnzonedRange=function(e){return e.dateProfile.unzonedRange},t.eventFootprintToComponentFootprint=function(e){return e.componentFootprint}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.componentFootprint=e,this.eventDef=t,n&&(this.eventInstance=n)}return e.prototype.getEventLegacy=function(){return(this.eventInstance||this.eventDef).toLegacy()},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=n(17),o=n(34),s=n(50),a=n(13),l=function(){function e(){}return e.createFromRawProps=function(t,n,a){var l,c,u,d,h=t.def,p={},f={},g={},m={},v=null,y=null;for(l in n)r.default.isStandardProp(l)?p[l]=n[l]:h.isStandardProp(l)?f[l]=n[l]:h.miscProps[l]!==n[l]&&(g[l]=n[l]);return(c=r.default.parse(p,h.source))&&(u=s.default.createFromDiff(t.dateProfile,c,a)),f.id!==h.id&&(v=f.id),i.isArraysEqual(f.className,h.className)||(y=f.className),o.default.copyVerbatimStandardProps(f,m),(d=new e).eventDefId=v,d.className=y,d.verbatimStandardProps=m,d.miscProps=g,u&&(d.dateMutation=u),d},e.prototype.mutateSingle=function(e){var t;return this.dateMutation&&(e.dateProfile=this.dateMutation.buildNewDateProfile(t=e.dateProfile,e.source.calendar)),null!=this.eventDefId&&(e.id=o.default.normalizeId(e.rawId=this.eventDefId)),this.className&&(e.className=this.className),this.verbatimStandardProps&&a.default.copyVerbatimStandardProps(this.verbatimStandardProps,e),this.miscProps&&e.applyMiscProps(this.miscProps),t?function(){e.dateProfile=t}:function(){}},e.prototype.setDateMutation=function(e){this.dateMutation=e&&!e.isEmpty()?e:null},e.prototype.isEmpty=function(){return!this.dateMutation},e}();t.default=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={sourceClasses:[],registerClass:function(e){this.sourceClasses.unshift(e)},parse:function(e,t){var n,i,r=this.sourceClasses;for(n=0;n<r.length;n++)if(i=r[n].parse(e,t))return i}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=function(e){function t(t){var n=e.call(this)||this;return n.overflowX=(t=t||{}).overflowX||t.overflow||"auto",n.overflowY=t.overflowY||t.overflow||"auto",n}return i.__extends(t,e),t.prototype.render=function(){this.el=this.renderEl(),this.applyOverflow()},t.prototype.renderEl=function(){return this.scrollEl=r('<div class="fc-scroller"></div>')},t.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},t.prototype.destroy=function(){this.el.remove()},t.prototype.applyOverflow=function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},t.prototype.lockOverflow=function(e){var t=this.overflowX,n=this.overflowY;e=e||this.getScrollbarWidths(),"auto"===t&&(t=e.top||e.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=e.left||e.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":t,"overflow-y":n})},t.prototype.setHeight=function(e){this.scrollEl.height(e)},t.prototype.getScrollTop=function(){return this.scrollEl.scrollTop()},t.prototype.setScrollTop=function(e){this.scrollEl.scrollTop(e)},t.prototype.getClientWidth=function(){return this.scrollEl[0].clientWidth},t.prototype.getClientHeight=function(){return this.scrollEl[0].clientHeight},t.prototype.getScrollbarWidths=function(){return o.getScrollbarWidths(this.scrollEl)},t}(n(33).default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(219),a=n(21),l=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.segSelector=".fc-event-container > *",i.dateSelectingClass&&(i.dateClicking=new i.dateClickingClass(i)),i.dateSelectingClass&&(i.dateSelecting=new i.dateSelectingClass(i)),i.eventPointingClass&&(i.eventPointing=new i.eventPointingClass(i)),i.eventDraggingClass&&i.eventPointing&&(i.eventDragging=new i.eventDraggingClass(i,i.eventPointing)),i.eventResizingClass&&i.eventPointing&&(i.eventResizing=new i.eventResizingClass(i,i.eventPointing)),i.externalDroppingClass&&(i.externalDropping=new i.externalDroppingClass(i)),i}return i.__extends(t,e),t.prototype.setElement=function(t){e.prototype.setElement.call(this,t),this.dateClicking&&this.dateClicking.bindToEl(t),this.dateSelecting&&this.dateSelecting.bindToEl(t),this.bindAllSegHandlersToEl(t)},t.prototype.removeElement=function(){this.endInteractions(),e.prototype.removeElement.call(this)},t.prototype.executeEventUnrender=function(){this.endInteractions(),e.prototype.executeEventUnrender.call(this)},t.prototype.bindGlobalHandlers=function(){e.prototype.bindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.bindToDocument()},t.prototype.unbindGlobalHandlers=function(){e.prototype.unbindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.unbindFromDocument()},t.prototype.bindDateHandlerToEl=function(e,t,n){var i=this;this.el.on(t,function(e){if(!r(e.target).is(i.segSelector+":not(.fc-helper),"+i.segSelector+":not(.fc-helper) *,.fc-more,a[data-goto]"))return n.call(i,e)})},t.prototype.bindAllSegHandlersToEl=function(e){[this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(t){t&&t.bindToEl(e)})},t.prototype.bindSegHandlerToEl=function(e,t,n){var i=this;e.on(t,this.segSelector,function(e){var t=r(e.currentTarget);if(!t.is(".fc-helper")){var o=t.data("fc-seg");if(o&&!i.shouldIgnoreEventPointing())return n.call(i,o,e)}})},t.prototype.shouldIgnoreMouse=function(){return a.default.get().shouldIgnoreMouse()},t.prototype.shouldIgnoreTouch=function(){var e=this._getView();return e.isSelected||e.selectedEvent},t.prototype.shouldIgnoreEventPointing=function(){return this.eventDragging&&this.eventDragging.isDragging||this.eventResizing&&this.eventResizing.isResizing},t.prototype.canStartSelection=function(e,t){return o.getEvIsTouch(t)&&!this.canStartResize(e,t)&&(this.isEventDefDraggable(e.footprint.eventDef)||this.isEventDefResizable(e.footprint.eventDef))},t.prototype.canStartDrag=function(e,t){return!this.canStartResize(e,t)&&this.isEventDefDraggable(e.footprint.eventDef)},t.prototype.canStartResize=function(e,t){var n=this._getView(),i=e.footprint.eventDef;return(!o.getEvIsTouch(t)||n.isEventDefSelected(i))&&this.isEventDefResizable(i)&&r(t.target).is(".fc-resizer")},t.prototype.endInteractions=function(){[this.dateClicking,this.dateSelecting,this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(e){e&&e.end()})},t.prototype.isEventDefDraggable=function(e){return this.isEventDefStartEditable(e)},t.prototype.isEventDefStartEditable=function(e){var t=e.isStartExplicitlyEditable();return null==t&&null==(t=this.opt("eventStartEditable"))&&(t=this.isEventDefGenerallyEditable(e)),t},t.prototype.isEventDefGenerallyEditable=function(e){var t=e.isExplicitlyEditable();return null==t&&(t=this.opt("editable")),t},t.prototype.isEventDefResizableFromStart=function(e){return this.opt("eventResizableFromStart")&&this.isEventDefResizable(e)},t.prototype.isEventDefResizableFromEnd=function(e){return this.isEventDefResizable(e)},t.prototype.isEventDefResizable=function(e){var t=e.isDurationExplicitlyEditable();return null==t&&null==(t=this.opt("eventDurationEditable"))&&(t=this.isEventDefGenerallyEditable(e)),t},t.prototype.diffDates=function(e,t){return this.largeUnit?o.diffByUnit(e,t,this.largeUnit):o.diffDayTime(e,t)},t.prototype.isEventInstanceGroupAllowed=function(e){var t,n=this._getView(),i=this.dateProfile,r=this.eventRangesToEventFootprints(e.getAllEventRanges());for(t=0;t<r.length;t++)if(!i.validUnzonedRange.containsRange(r[t].componentFootprint.unzonedRange))return!1;return n.calendar.constraints.isEventInstanceGroupAllowed(e)},t.prototype.isExternalInstanceGroupAllowed=function(e){var t,n=this._getView(),i=this.dateProfile,r=this.eventRangesToEventFootprints(e.getAllEventRanges());for(t=0;t<r.length;t++)if(!i.validUnzonedRange.containsRange(r[t].componentFootprint.unzonedRange))return!1;for(t=0;t<r.length;t++)if(!n.calendar.constraints.isSelectionFootprintAllowed(r[t].componentFootprint))return!1;return!0},t}(s.default);t.default=l}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(4),a=n(218),l=n(221),c=n(40),u=n(21),d=n(5),h=function(e){function t(t,n){var i=e.call(this,null,n.options)||this;return i.batchRenderDepth=0,i.isSelected=!1,i.calendar=t,i.viewSpec=n,i.type=n.type,i.name=i.type,i.initRenderQueue(),i.initHiddenDays(),i.dateProfileGenerator=new i.dateProfileGeneratorClass(i),i.bindBaseRenderHandlers(),i.eventOrderSpecs=s.parseFieldSpecs(i.opt("eventOrder")),i.initialize&&i.initialize(),i}return i.__extends(t,e),t.prototype._getView=function(){return this},t.prototype.opt=function(e){return this.options[e]},t.prototype.initRenderQueue=function(){this.renderQueue=new a.default({event:this.opt("eventRenderWait")}),this.renderQueue.on("start",this.onRenderQueueStart.bind(this)),this.renderQueue.on("stop",this.onRenderQueueStop.bind(this)),this.on("before:change",this.startBatchRender),this.on("change",this.stopBatchRender)},t.prototype.onRenderQueueStart=function(){this.calendar.freezeContentHeight(),this.addScroll(this.queryScroll())},t.prototype.onRenderQueueStop=function(){this.calendar.updateViewSize()&&this.popScroll(),this.calendar.thawContentHeight()},t.prototype.startBatchRender=function(){this.batchRenderDepth++||this.renderQueue.pause()},t.prototype.stopBatchRender=function(){--this.batchRenderDepth||this.renderQueue.resume()},t.prototype.requestRender=function(e,t,n){this.renderQueue.queue(e,t,n)},t.prototype.whenSizeUpdated=function(e){this.renderQueue.isRunning?this.renderQueue.one("stop",e.bind(this)):e.call(this)},t.prototype.computeTitle=function(e){var t;return t=/^(year|month)$/.test(e.currentRangeUnit)?e.currentUnzonedRange:e.activeUnzonedRange,this.formatRange({start:this.calendar.msToMoment(t.startMs,e.isRangeAllDay),end:this.calendar.msToMoment(t.endMs,e.isRangeAllDay)},e.isRangeAllDay,this.opt("titleFormat")||this.computeTitleFormat(e),this.opt("titleRangeSeparator"))},t.prototype.computeTitleFormat=function(e){var t=e.currentRangeUnit;return"year"===t?"YYYY":"month"===t?this.opt("monthYearFormat"):e.currentUnzonedRange.as("days")>1?"ll":"LL"},t.prototype.setDate=function(e){var t=this.get("dateProfile"),n=this.dateProfileGenerator.build(e,void 0,!0);t&&t.activeUnzonedRange.equals(n.activeUnzonedRange)||this.set("dateProfile",n)},t.prototype.unsetDate=function(){this.unset("dateProfile")},t.prototype.fetchInitialEvents=function(e){var t=this.calendar,n=e.isRangeAllDay&&!this.usesMinMaxTime;return t.requestEvents(t.msToMoment(e.activeUnzonedRange.startMs,n),t.msToMoment(e.activeUnzonedRange.endMs,n))},t.prototype.bindEventChanges=function(){this.listenTo(this.calendar,"eventsReset",this.resetEvents)},t.prototype.unbindEventChanges=function(){this.stopListeningTo(this.calendar,"eventsReset")},t.prototype.setEvents=function(e){this.set("currentEvents",e),this.set("hasEvents",!0)},t.prototype.unsetEvents=function(){this.unset("currentEvents"),this.unset("hasEvents")},t.prototype.resetEvents=function(e){this.startBatchRender(),this.unsetEvents(),this.setEvents(e),this.stopBatchRender()},t.prototype.requestDateRender=function(e){var t=this;this.requestRender(function(){t.executeDateRender(e)},"date","init")},t.prototype.requestDateUnrender=function(){var e=this;this.requestRender(function(){e.executeDateUnrender()},"date","destroy")},t.prototype.executeDateRender=function(t){e.prototype.executeDateRender.call(this,t),this.render&&this.render(),this.trigger("datesRendered"),this.addScroll({isDateInit:!0}),this.startNowIndicator()},t.prototype.executeDateUnrender=function(){this.unselect(),this.stopNowIndicator(),this.trigger("before:datesUnrendered"),this.destroy&&this.destroy(),e.prototype.executeDateUnrender.call(this)},t.prototype.bindBaseRenderHandlers=function(){var e=this;this.on("datesRendered",function(){e.whenSizeUpdated(e.triggerViewRender)}),this.on("before:datesUnrendered",function(){e.triggerViewDestroy()})},t.prototype.triggerViewRender=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},t.prototype.triggerViewDestroy=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},t.prototype.requestEventsRender=function(e){var t=this;this.requestRender(function(){t.executeEventRender(e),t.whenSizeUpdated(t.triggerAfterEventsRendered)},"event","init")},t.prototype.requestEventsUnrender=function(){var e=this;this.requestRender(function(){e.triggerBeforeEventsDestroyed(),e.executeEventUnrender()},"event","destroy")},t.prototype.requestBusinessHoursRender=function(e){var t=this;this.requestRender(function(){t.renderBusinessHours(e)},"businessHours","init")},t.prototype.requestBusinessHoursUnrender=function(){var e=this;this.requestRender(function(){e.unrenderBusinessHours()},"businessHours","destroy")},t.prototype.bindGlobalHandlers=function(){e.prototype.bindGlobalHandlers.call(this),this.listenTo(u.default.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},t.prototype.unbindGlobalHandlers=function(){e.prototype.unbindGlobalHandlers.call(this),this.stopListeningTo(u.default.get())},t.prototype.startNowIndicator=function(){var e,t,n,i=this;
1this.opt("nowIndicator")&&(e=this.getNowIndicatorUnit())&&(t=s.proxy(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),n=this.initialNowDate.clone().startOf(e).add(1,e).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout(function(){i.nowIndicatorTimeoutID=null,t(),n=+o.duration(1,e),n=Math.max(100,n),i.nowIndicatorIntervalID=setInterval(t,n)},n))},t.prototype.updateNowIndicator=function(){this.isDatesRendered&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add((new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},t.prototype.stopNowIndicator=function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},t.prototype.updateSize=function(t,n,i){this.setHeight?this.setHeight(t,n):e.prototype.updateSize.call(this,t,n,i),this.updateNowIndicator()},t.prototype.addScroll=function(e){var t=this.queuedScroll||(this.queuedScroll={});r.extend(t,e)},t.prototype.popScroll=function(){this.applyQueuedScroll(),this.queuedScroll=null},t.prototype.applyQueuedScroll=function(){this.queuedScroll&&this.applyScroll(this.queuedScroll)},t.prototype.queryScroll=function(){var e={};return this.isDatesRendered&&r.extend(e,this.queryDateScroll()),e},t.prototype.applyScroll=function(e){e.isDateInit&&this.isDatesRendered&&r.extend(e,this.computeInitialDateScroll()),this.isDatesRendered&&this.applyDateScroll(e)},t.prototype.computeInitialDateScroll=function(){return{}},t.prototype.queryDateScroll=function(){return{}},t.prototype.applyDateScroll=function(e){},t.prototype.reportEventDrop=function(e,t,n,i){var r=this.calendar.eventManager.mutateEventsWithId(e.def.id,t),s=t.dateMutation;s&&(e.dateProfile=s.buildNewDateProfile(e.dateProfile,this.calendar)),this.triggerEventDrop(e,s&&s.dateDelta||o.duration(),r,n,i)},t.prototype.triggerEventDrop=function(e,t,n,i,r){this.publiclyTrigger("eventDrop",{context:i[0],args:[e.toLegacy(),t,n,r,{},this]})},t.prototype.reportExternalDrop=function(e,t,n,i,r,o){t&&this.calendar.eventManager.addEventDef(e,n),this.triggerExternalDrop(e,t,i,r,o)},t.prototype.triggerExternalDrop=function(e,t,n,i,r){this.publiclyTrigger("drop",{context:n[0],args:[e.dateProfile.start.clone(),i,r,this]}),t&&this.publiclyTrigger("eventReceive",{context:this,args:[e.buildInstance().toLegacy(),this]})},t.prototype.reportEventResize=function(e,t,n,i){var r=this.calendar.eventManager.mutateEventsWithId(e.def.id,t);e.dateProfile=t.dateMutation.buildNewDateProfile(e.dateProfile,this.calendar),this.triggerEventResize(e,t.dateMutation.endDelta,r,n,i)},t.prototype.triggerEventResize=function(e,t,n,i,r){this.publiclyTrigger("eventResize",{context:i[0],args:[e.toLegacy(),t,n,r,{},this]})},t.prototype.select=function(e,t){this.unselect(t),this.renderSelectionFootprint(e),this.reportSelection(e,t)},t.prototype.renderSelectionFootprint=function(t){this.renderSelection?this.renderSelection(t.toLegacy(this.calendar)):e.prototype.renderSelectionFootprint.call(this,t)},t.prototype.reportSelection=function(e,t){this.isSelected=!0,this.triggerSelect(e,t)},t.prototype.triggerSelect=function(e,t){var n=this.calendar.footprintToDateProfile(e);this.publiclyTrigger("select",{context:this,args:[n.start,n.end,t,this]})},t.prototype.unselect=function(e){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.publiclyTrigger("unselect",{context:this,args:[e,this]}))},t.prototype.selectEventInstance=function(e){this.selectedEventInstance&&this.selectedEventInstance===e||(this.unselectEventInstance(),this.getEventSegs().forEach(function(t){t.footprint.eventInstance===e&&t.el&&t.el.addClass("fc-selected")}),this.selectedEventInstance=e)},t.prototype.unselectEventInstance=function(){this.selectedEventInstance&&(this.getEventSegs().forEac
1h(function(e){e.el&&e.el.removeClass("fc-selected")}),this.selectedEventInstance=null)},t.prototype.isEventDefSelected=function(e){return this.selectedEventInstance&&this.selectedEventInstance.def.id===e.id},t.prototype.handleDocumentMousedown=function(e){s.isPrimaryMouseButton(e)&&this.processUnselect(e)},t.prototype.processUnselect=function(e){this.processRangeUnselect(e),this.processEventUnselect(e)},t.prototype.processRangeUnselect=function(e){var t;this.isSelected&&this.opt("unselectAuto")&&((t=this.opt("unselectCancel"))&&r(e.target).closest(t).length||this.unselect(e))},t.prototype.processEventUnselect=function(e){this.selectedEventInstance&&(r(e.target).closest(".fc-selected").length||this.unselectEventInstance())},t.prototype.triggerBaseRendered=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},t.prototype.triggerBaseUnrendered=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},t.prototype.triggerDayClick=function(e,t,n){var i=this.calendar.footprintToDateProfile(e);this.publiclyTrigger("dayClick",{context:t,args:[i.start,n,this]})},t.prototype.isDateInOtherMonth=function(e,t){return!1},t.prototype.getUnzonedRangeOption=function(e){var t=this.opt(e);if("function"==typeof t&&(t=t.apply(null,Array.prototype.slice.call(arguments,1))),t)return this.calendar.parseUnzonedRange(t)},t.prototype.initHiddenDays=function(){var e,t=this.opt("hiddenDays")||[],n=[],i=0;for(!1===this.opt("weekends")&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==r.inArray(e,t))||i++;if(!i)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},t.prototype.trimHiddenDays=function(e){var t=e.getStart(),n=e.getEnd();return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null===t||null===n||t<n?new d.default(t,n):null},t.prototype.isHiddenDay=function(e){return o.isMoment(e)&&(e=e.day()),this.isHiddenDayHash[e]},t.prototype.skipHiddenDays=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var i=e.clone();this.isHiddenDayHash[(i.day()+(n?t:0)+7)%7];)i.add(t,"days");return i},t}(c.default);t.default=h,h.prototype.usesMinMaxTime=!1,h.prototype.dateProfileGeneratorClass=l.default,h.watch("displayingDates",["isInDom","dateProfile"],function(e){this.requestDateRender(e.dateProfile)},function(){this.requestDateUnrender()}),h.watch("displayingBusinessHours",["displayingDates","businessHourGenerator"],function(e){this.requestBusinessHoursRender(e.businessHourGenerator)},function(){this.requestBusinessHoursUnrender()}),h.watch("initialEvents",["dateProfile"],function(e){return this.fetchInitialEvents(e.dateProfile)}),h.watch("bindingEvents",["initialEvents"],function(e){this.setEvents(e.initialEvents),this.bindEventChanges()},function(){this.unbindEventChanges(),this.unsetEvents()}),h.watch("displayingEvents",["displayingDates","hasEvents"],function(){this.requestEventsRender(this.get("currentEvents"))},function(){this.requestEventsUnrender()}),h.watch("title",["dateProfile"],function(e){return this.title=this.computeTitle(e.dateProfile)}),h.watch("legacyDateProps",["dateProfile"],function(e){var t=this.calendar,n=e.dateProfile;this.start=t.msToMoment(n.activeUnzonedRange.startMs,n.isRangeAllDay),this.end=t.msToMoment(n.activeUnzonedRange.endMs,n.isRangeAllDay),this.intervalStart=t.msToMoment(n.currentUnzonedRange.startMs,n.isRangeAllDay),this.intervalEnd=t.msToMoment(n.currentUnzonedRange.endMs,n.isRangeAllDay)})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=function(){function e(e,t){this.view=e._getView(),this.component=e,this.fillRenderer=t}return e.prototype.opt=function(e){return this.view.opt(e)},e.prototype.rangeUpdated=function(){var e,t;this.eventTimeFormat=this.opt("eventTimeFormat")||this.opt("timeFormat")||this.computeEventTimeFormat(),null==(e=this.opt("displayEventTime"))&&(e=this.computeDisplayEventTime()),null==(t=this.opt("displayEventEnd"))&&(t=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=t},e.prototype.render=function(e){var t,n,i,r=this.component._getDateProfile(),o=[],s=[];for(t in e)i=(n=e[t]).sliceRenderRanges(r.activeUnzonedRange),n.getEventDef().hasBgRendering()?o.push.apply(o,i):s.push.apply(s,i);this.renderBgRanges(o),this.renderFgRanges(s)},e.prototype.unrender=function(){this.unrenderBgRanges(),this.unrenderFgRanges()},e.prototype.renderFgRanges=function(e){var t=this.component.eventRangesToEventFootprints(e),n=this.component.eventFootprintsToSegs(t);n=this.renderFgSegEls(n),!1!==this.renderFgSegs(n)&&(this.fgSegs=n)},e.prototype.unrenderFgRanges=function(){this.unrenderFgSegs(this.fgSegs||[]),this.fgSegs=null},e.prototype.renderBgRanges=function(e){var t=this.component.eventRangesToEventFootprints(e),n=this.component.eventFootprintsToSegs(t);!1!==this.renderBgSegs(n)&&(this.bgSegs=n)},e.prototype.unrenderBgRanges=function(){this.unrenderBgSegs(),this.bgSegs=null},e.prototype.getSegs=function(){return(this.bgSegs||[]).concat(this.fgSegs||[])},e.prototype.renderFgSegs=function(e){return!1},e.prototype.unrenderFgSegs=function(e){},e.prototype.renderBgSegs=function(e){var t=this;if(!this.fillRenderer)return!1;this.fillRenderer.renderSegs("bgEvent",e,{getClasses:function(e){return t.getBgClasses(e.footprint.eventDef)},getCss:function(e){return{"background-color":t.getBgColor(e.footprint.eventDef)}},filterEl:function(e,n){return t.filterEventRenderEl(e.footprint,n)}})},e.prototype.unrenderBgSegs=function(){this.fillRenderer&&this.fillRenderer.unrender("bgEvent")},e.prototype.renderFgSegEls=function(e,t){var n=this;void 0===t&&(t=!1);var r,o=this.view.hasPublicHandlers("eventRender"),s="",a=[];if(e.length){for(r=0;r<e.length;r++)this.beforeFgSegHtml(e[r]),s+=this.fgSegHtml(e[r],t);i(s).each(function(t,r){var s=e[t],l=i(r);o&&(l=n.filterEventRenderEl(s.footprint,l)),l&&(l.data("fc-seg",s
1),s.el=l,a.push(s))})}return a},e.prototype.beforeFgSegHtml=function(e){},e.prototype.fgSegHtml=function(e,t){},e.prototype.getSegClasses=function(e,t,n){var i=["fc-event",e.isStart?"fc-start":"fc-not-start",e.isEnd?"fc-end":"fc-not-end"].concat(this.getClasses(e.footprint.eventDef));return t&&i.push("fc-draggable"),n&&i.push("fc-resizable"),this.view.isEventDefSelected(e.footprint.eventDef)&&i.push("fc-selected"),i},e.prototype.filterEventRenderEl=function(e,t){var n=e.getEventLegacy(),r=this.view.publiclyTrigger("eventRender",{context:n,args:[n,t,this.view]});return!1===r?t=null:r&&!0!==r&&(t=i(r)),t},e.prototype.getTimeText=function(e,t,n){return this._getTimeText(e.eventInstance.dateProfile.start,e.eventInstance.dateProfile.end,e.componentFootprint.isAllDay,t,n)},e.prototype._getTimeText=function(e,t,n,i,r){return null==i&&(i=this.eventTimeFormat),null==r&&(r=this.displayEventEnd),this.displayEventTime&&!n?r&&t?this.view.formatRange({start:e,end:t},!1,i):e.format(i):""},e.prototype.computeEventTimeFormat=function(){return this.opt("smallTimeFormat")},e.prototype.computeDisplayEventTime=function(){return!0},e.prototype.computeDisplayEventEnd=function(){return!0},e.prototype.getBgClasses=function(e){var t=this.getClasses(e);return t.push("fc-bgevent"),t},e.prototype.getClasses=function(e){var t,n=this.getStylingObjs(e),i=[];for(t=0;t<n.length;t++)i.push.apply(i,n[t].eventClassName||n[t].className||[]);return i},e.prototype.getSkinCss=function(e){return{"background-color":this.getBgColor(e),"border-color":this.getBorderColor(e),color:this.getTextColor(e)}},e.prototype.getBgColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventBackgroundColor||i[t].eventColor||i[t].backgroundColor||i[t].color;return n||(n=this.opt("eventBackgroundColor")||this.opt("eventColor")),n},e.prototype.getBorderColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventBorderColor||i[t].eventColor||i[t].borderColor||i[t].color;return n||(n=this.opt("eventBorderColor")||this.opt("eventColor")),n},e.prototype.getTextColor=function(e){var t,n,i=this.getStylingObjs(e);for(t=0;t<i.length&&!n;t++)n=i[t].eventTextColor||i[t].textColor;return n||(n=this.opt("eventTextColor")),n},e.prototype.getStylingObjs=function(e){var t=this.getFallbackStylingObjs(e);return t.unshift(e),t},e.prototype.getFallbackStylingObjs=function(e){return[e.source]},e.prototype.sortEventSegs=function(e){e.sort(r.proxy(this,"compareEventSegs"))},e.prototype.compareEventSegs=function(e,t){var n=e.footprint,i=t.footprint,o=n.componentFootprint,s=i.componentFootprint,a=o.unzonedRange,l=s.unzonedRange;return a.startMs-l.startMs||l.endMs-l.startMs-(a.endMs-a.startMs)||s.isAllDay-o.isAllDay||r.compareByFieldSpecs(n.eventDef,i.eventDef,this.view.eventOrderSpecs,n.eventDef.miscProps,i.eventDef.miscProps)},e}();t.default=o},,,,,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10);function r(e){return"en"!==e.locale()?e.clone().locale("en"):e}i.newMomentProto.format=function(){return this._fullCalendar&&arguments[0]?d(this,arguments[0]):this._ambigTime?i.oldMomentFormat(r(this),"YYYY-MM-DD"):this._ambigZone?i.oldMomentFormat(r(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?i.oldMomentFormat(r(this)):i.oldMomentProto.format.apply(this,arguments)},i.newMomentProto.toISOString=function(){return this._ambigTime?i.oldMomentFormat(r(this),"YYYY-MM-DD"):this._ambigZone?i.oldMomentFormat(r(this),"YYYY-MM-DD[T]HH:mm:ss"):i.oldMomentProto.toISOString.apply(this._fullCalendar?r(this):this,arguments)};var o="\v",s="\x1f",a="\x1e",l=new RegExp(a+"([^"+a+"]*)"+a,"g"),c={t:function(e){return i.oldMomentFormat(e,"a").charAt(0)},T:function(e){return i.oldMomentFormat(e,"A").charAt(0)}},u={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}};function d(e,t){return function(e,t){return v(m(e,t).join(""))}(p(t).fakeFormatString,e)}t.formatDate=d,t.formatRange=function(e,t,n,r,o){return e=i.default.parseZone(e),t=i.default.parseZone(t),function(e,t,n,i,r){var o,s,a,l=e.sameUnits,c=t.clone().stripZone(),u=n.clone().stripZone(),d=m(e.fakeFormatString,t),h=m(e.fakeFormatString,n),p="",f="",g="",y="",b="";for(o=0;o<l.length&&(!l[o]||c.isSame(u,l[o]));o++)p+=d[o];for(s=l.length-1;s>o&&(!l[s]||c.isSame(u,l[s]))&&(s-1!==o||"."!==d[s]);s--)f=d[s]+f;for(a=o;a<=s;
1a++)g+=d[a],y+=h[a];return(g||y)&&(b=r?y+i+g:g+i+y),v(p+b+f)}(p(n=e.localeData().longDateFormat(n)||n),e,t,r||" - ",o)};var h={};function p(e){return h[e]||(h[e]=function(e){var t=f(e);return{fakeFormatString:function e(t){var n,i,r=[];for(n=0;n<t.length;n++)"string"==typeof(i=t[n])?r.push("["+i+"]"):i.token?r.push(i.token in c?s+"["+i.token+"]":i.token):i.maybe&&r.push(a+e(i.maybe)+a);return r.join(o)}(t),sameUnits:function e(t){var n,i,r,o=[];for(n=0;n<t.length;n++)(i=t[n]).token?(r=u[i.token.charAt(0)],o.push(r?r.unit:"second")):i.maybe?o.push.apply(o,e(i.maybe)):o.push(null);return o}(t)}}(e))}function f(e){for(var t,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;t=i.exec(e);)t[1]?n.push.apply(n,g(t[1])):t[2]?n.push({maybe:f(t[2])}):t[3]?n.push({token:t[3]}):t[5]&&n.push.apply(n,g(t[5]));return n}function g(e){return". "===e?["."," "]:[e]}function m(e,t){var n,r,a=[],l=i.oldMomentFormat(t,e).split(o);for(n=0;n<l.length;n++)(r=l[n]).charAt(0)===s?a.push(c[r.substring(1)](t)):a.push(r);return a}function v(e){return e.replace(l,function(e,t){return t.match(/[1-9]/)?t:""})}t.queryMostGranularFormatUnit=function(e){var t,n,i,r,o=f(e);for(t=0;t<o.length;t++)(n=o[t]).token&&(i=u[n.token.charAt(0)])&&(!r||i.value>r.value)&&(r=i);return r?r.unit:null}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(33),o=n(11),s=n(7),a=function(e){function t(){var t=e.call(this)||this;return t._watchers={},t._props={},t.applyGlobalWatchers(),t.constructed(),t}return i.__extends(t,e),t.watch=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.prototype.hasOwnProperty("_globalWatchArgs")||(this.prototype._globalWatchArgs=Object.create(this.prototype._globalWatchArgs)),this.prototype._globalWatchArgs[e]=t},t.prototype.constructed=function(){},t.prototype.applyGlobalWatchers=function(){var e,t=this._globalWatchArgs;for(e in t)this.watch.apply(this,[e].concat(t[e]))},t.prototype.has=function(e){return e in this._props},t.prototype.get=function(e){return void 0===e?this._props:this._props[e]},t.prototype.set=function(e,t){var n;"string"==typeof e?(n={})[e]=void 0===t?null:t:n=e,this.setProps(n)},t.prototype.reset=function(e){var t,n=this._props,i={};for(t in n)i[t]=void 0;for(t in e)i[t]=e[t];this.setProps(i)},t.prototype.unset=function(e){var t,n,i={};for(t="string"==typeof e?[e]:e,n=0;n<t.length;n++)i[t[n]]=void 0;this.setProps(i)},t.prototype.setProps=function(e){var t,n,i={},r=0;for(t in e)"object"!=typeof(n=e[t])&&n===this._props[t]||(i[t]=n,r++);if(r){for(t in this.trigger("before:batchChange",i),i)this.trigger("before:change",t,n=i[t]),this.trigger("before:change:"+t,n);for(t in i)void 0===(n=i[t])?delete this._props[t]:this._props[t]=n,this.trigger("change:"+t,n),this.trigger("change",t,n);this.trigger("batchChange",i)}},t.prototype.watch=function(e,t,n,i){var r=this;this.unwatch(e),this._watchers[e]=this._watchDeps(t,function(t){var i=n.call(r,t);i&&i.then?(r.unset(e),i.then(function(t){r.set(e,t)})):r.set(e,i)},function(t){r.unset(e),i&&i.call(r,t)})},t.prototype.unwatch=function(e){var t=this._watchers[e];t&&(delete this._watchers[e],t.teardown())},t.prototype._watchDeps=function(e,t,n){var i=this,r=0,o=e.length,s=0,a={},l=[],c=!1,u=function(e,t){i.on(e,t),l.push([e,t])};return e.forEach(function(e){var i=!1;"?"===e.charAt(0)&&(e=e.substring(1),i=!0),u("before:change:"+e,function(e){1==++r&&s===o&&(c=!0,n(a),c=!1)}),u("change:"+e,function(n){!function(e,n,i){void 0===n?(i||void 0===a[e]||s--,delete a[e]):(i||void 0!==a[e]||s++,a[e]=n),--r||s===o&&(c||t(a))}(e,n,i)})}),e.forEach(function(e){var t=!1;"?"===e.charAt(0)&&(e=e.substring(1),t=!0),i.has(e)?(a[e]=i.get(e),s++):t&&s++}),s===o&&t(a),{teardown:function(){for(var e=0;e<l.length;e++)i.off(l[e][0],l[e][1]);l=null,s===o&&n()},flash:function(){s===o&&(n(),t(a))}}},t.prototype.flash=function(e){var t=this._watchers[e];t&&t.flash()},t}(r.default);t.default=a,a.prototype._globalWatchArgs={},o.default.mixInto(a),s.default.mixInto(a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(13),s=n(210);
1t.default={parse:function(e,t){return r.isTimeString(e.start)||i.isDuration(e.start)||r.isTimeString(e.end)||i.isDuration(e.end)?s.default.parse(e,t):o.default.parse(e,t)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),r=n(17),o=function(){function e(){this.clearEnd=!1,this.forceTimed=!1,this.forceAllDay=!1}return e.createFromDiff=function(t,n,r){var o,s,a,l=t.end&&!n.end,c=t.isAllDay()&&!n.isAllDay(),u=!t.isAllDay()&&n.isAllDay();function d(e,t){return r?i.diffByUnit(e,t,r):n.isAllDay()?i.diffDay(e,t):i.diffDayTime(e,t)}return o=d(n.start,t.start),n.end&&(s=d(n.unzonedRange.getEnd(),t.unzonedRange.getEnd()).subtract(o)),(a=new e).clearEnd=l,a.forceTimed=c,a.forceAllDay=u,a.setDateDelta(o),a.setEndDelta(s),a},e.prototype.buildNewDateProfile=function(e,t){var n=e.start.clone(),i=null,o=!1;return e.end&&!this.clearEnd?i=e.end.clone():this.endDelta&&!i&&(i=t.getDefaultEventEnd(e.isAllDay(),n)),this.forceTimed?(o=!0,n.hasTime()||n.time(0),i&&!i.hasTime()&&i.time(0)):this.forceAllDay&&(n.hasTime()&&n.stripTime(),i&&i.hasTime()&&i.stripTime()),this.dateDelta&&(o=!0,n.add(this.dateDelta),i&&i.add(this.dateDelta)),this.endDelta&&(o=!0,i.add(this.endDelta)),this.startDelta&&(o=!0,n.add(this.startDelta)),o&&(n=t.applyTimezone(n),i&&(i=t.applyTimezone(i))),!i&&t.opt("forceEventDuration")&&(i=t.getDefaultEventEnd(e.isAllDay(),n)),new r.default(n,i,t)},e.prototype.setDateDelta=function(e){this.dateDelta=e&&e.valueOf()?e:null},e.prototype.setStartDelta=function(e){this.startDelta=e&&e.valueOf()?e:null},e.prototype.setEndDelta=function(e){this.endDelta=e&&e.valueOf()?e:null},e.prototype.isEmpty=function(){return!(this.clearEnd||this.forceTimed||this.forceAllDay||this.dateDelta||this.startDelta||this.endDelta)},e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(213),r=n(214),o={};t.defineThemeSystem=function(e,t){o[e]=t},t.getThemeSystemClass=function(e){return e?!0===e?r.default:o[e]:i.default}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(20),a=n(6),l=n(13),c=function(e){function t(t){var n=e.call(this,t)||this;return n.eventDefs=[],n}return i.__extends(t,e),t.parse=function(e,t){var n;return r.isArray(e.events)?n=e:r.isArray(e)&&(n={events:e}),!!n&&a.default.parse.call(this,n,t)},t.prototype.setRawEventDefs=function(e){this.rawEventDefs=e,this.eventDefs=this.parseEventDefs(e)},t.prototype.fetch=function(e,t,n){var i,r=this.eventDefs;if(null!=this.currentTimezone&&this.currentTimezone!==n)for(i=0;i<r.length;i++)r[i]instanceof l.default&&r[i].rezone();return this.currentTimezone=n,s.default.resolve(r)},t.prototype.addEventDef=function(e){this.eventDefs.push(e)},t.prototype.removeEventDefsById=function(e){return o.removeMatching(this.eventDefs,function(t){return t.id===e})},t.prototype.removeAllEventDefs=function(){this.eventDefs=[]},t.prototype.getPrimitive=function(){return this.rawEventDefs},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t);return this.setRawEventDefs(t.events),n},t}(a.default);t.default=c,c.defineStandardProps({events:!1})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=function(){function e(e){this.isHorizontal=!1,this.isVertical=!1,this.els=i(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?i(e.offsetParent):null}return e.prototype.build=function(){var e=this.forcedOffsetParentEl;!e&&this.els.length>0&&(e=this.els.eq(0).offsetParent()),this.origin=e?e.offset():null,this.boundingRect=this.queryBoundingRect
1(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},e.prototype.clear=function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},e.prototype.ensureBuilt=function(){this.origin||this.build()},e.prototype.buildElHorizontals=function(){var e=[],t=[];this.els.each(function(n,r){var o=i(r),s=o.offset().left,a=o.outerWidth();e.push(s),t.push(s+a)}),this.lefts=e,this.rights=t},e.prototype.buildElVerticals=function(){var e=[],t=[];this.els.each(function(n,r){var o=i(r),s=o.offset().top,a=o.outerHeight();e.push(s),t.push(s+a)}),this.tops=e,this.bottoms=t},e.prototype.getHorizontalIndex=function(e){this.ensureBuilt();var t,n=this.lefts,i=this.rights,r=n.length;for(t=0;t<r;t++)if(e>=n[t]&&e<i[t])return t},e.prototype.getVerticalIndex=function(e){this.ensureBuilt();var t,n=this.tops,i=this.bottoms,r=n.length;for(t=0;t<r;t++)if(e>=n[t]&&e<i[t])return t},e.prototype.getLeftOffset=function(e){return this.ensureBuilt(),this.lefts[e]},e.prototype.getLeftPosition=function(e){return this.ensureBuilt(),this.lefts[e]-this.origin.left},e.prototype.getRightOffset=function(e){return this.ensureBuilt(),this.rights[e]},e.prototype.getRightPosition=function(e){return this.ensureBuilt(),this.rights[e]-this.origin.left},e.prototype.getWidth=function(e){return this.ensureBuilt(),this.rights[e]-this.lefts[e]},e.prototype.getTopOffset=function(e){return this.ensureBuilt(),this.tops[e]},e.prototype.getTopPosition=function(e){return this.ensureBuilt(),this.tops[e]-this.origin.top},e.prototype.getBottomOffset=function(e){return this.ensureBuilt(),this.bottoms[e]},e.prototype.getBottomPosition=function(e){return this.ensureBuilt(),this.bottoms[e]-this.origin.top},e.prototype.getHeight=function(e){return this.ensureBuilt(),this.bottoms[e]-this.tops[e]},e.prototype.queryBoundingRect=function(){var e;return this.els.length>0&&!(e=r.getScrollParent(this.els.eq(0))).is(document)?r.getClientRect(e):null},e.prototype.isPointInBounds=function(e,t){return this.isLeftInBounds(e)&&this.isTopInBounds(t)},e.prototype.isLeftInBounds=function(e){return!this.boundingRect||e>=this.boundingRect.left&&e<this.boundingRect.right},e.prototype.isTopInBounds=function(e){return!this.boundingRect||e>=this.boundingRect.top&&e<this.boundingRect.bottom},e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n(7),s=n(21),a=function(){function e(e){this.isInteracting=!1,this.isDistanceSurpassed=!1,this.isDelayEnded=!1,this.isDragging=!1,this.isTouch=!1,this.isGeneric=!1,this.shouldCancelTouchScroll=!0,this.scrollAlwaysKills=!1,this.isAutoScroll=!1,this.scrollSensitivity=30,this.scrollSpeed=200,this.scrollIntervalMs=50,this.options=e||{}}return e.prototype.startInteraction=function(e,t){if(void 0===t&&(t={}),"mousedown"===e.type){if(s.default.get().shouldIgnoreMouse())return;if(!r.isPrimaryMouseButton(e))return;e.preventDefault()}this.isInteracting||(this.delay=r.firstDefined(t.delay,this.options.delay,0),this.minDistance=r.firstDefined(t.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,r.preventSelection(i("body")),this.isInteracting=!0,this.isTouch=r.getEvIsTouch(e),this.isGeneric="dragstart"===e.type,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=r.getEvX(e),this.originY=r.getEvY(e),this.scrollEl=r.getScrollParent(i(e.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(e),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e))},e.prototype.handleInteractionStart=function(e){this.trigger("interactionStart",e)},e.prototype.endInteraction=function(e,t){this.isInteracting&&(this.endDrag(e),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(e,t),r.allowSelection(i("body")))},e.prototype.handleInteractionEnd=function(e,t){this.trigger("interactionEnd",e,t||!1)},e.prototype.bindHandlers=function(){var e=s.default.get();this.isGeneric?this.listenTo(i(document),{drag:this.handleMove,dragstop:this.endInteraction}):this.listenTo(e,this.isTouch?{touchmove:this.handleTouchMove,touchend:this.endInteraction,scroll:this.handleTouchScroll}:{mousemove:this.handleMouseMove,mouseup:this.endInteraction}),this.listenTo(e,{selectstart:r.preventDefault,contextmenu:r.preventDefault})},e.prototype.unbindHandlers=function(){this.stopListeningTo(s.default.get()),this.stopListeningTo(i(document))},e.prototype.startDrag=function(e,t){this.startInteraction(e,t),this.isDragging||(this.isDragging=!0,this.handleDragStart(e))},e.prototype.handleDragStart=function(e){this.trigger("dragStart",e)},e.prototype.handleMove=function(e){var t=r.getEvX(e)-this.originX,n=r.getEvY(e)-this.originY,i=this.minDistance;this.isDistanceSurpassed||t*t+n*n>=i*i&&this.handleDistanceSurpassed(e),this.isDragging&&this.handleDrag(t,n,e)},e.prototype.handleDrag=function(e,t,n){this.trigger("drag",e,t,n),this.updateAutoScroll(n)},e.prototype.endDrag=function(e){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(e))},e.prototype.handleDragEnd=function(e){this.trigger("dragEnd",e)},e.prototype.startDelay=function(e){var t=this;this.delay?this.delayTimeoutId=setTimeout(function(){t.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)},e.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(e)},e.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(e)},e.prototype.handleTouchMove=function(e){this.isDragging&&this.shouldCancelTouchScroll&&e.preventDefault(),this.handleMove(e)},e.prototype.handleMouseMove=function(e){this.handleMove(e)},e.prototype.handleTouchScroll=function(e){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(e,!0)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.options[e]&&this.options[e].apply(this,t),this["_"+e]&&this["_"+e].apply(this,t)},e.prototype.initAutoScroll=function(){var e=this.scrollEl;
1this.isAutoScroll=this.options.scroll&&e&&!e.is(window)&&!e.is(document),this.isAutoScroll&&this.listenTo(e,"scroll",r.debounce(this.handleDebouncedScroll,100))},e.prototype.destroyAutoScroll=function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},e.prototype.computeScrollBounds=function(){this.isAutoScroll&&(this.scrollBounds=r.getOuterRect(this.scrollEl))},e.prototype.updateAutoScroll=function(e){var t,n,i,o,s=this.scrollSensitivity,a=this.scrollBounds,l=0,c=0;a&&(t=(s-(r.getEvY(e)-a.top))/s,n=(s-(a.bottom-r.getEvY(e)))/s,i=(s-(r.getEvX(e)-a.left))/s,o=(s-(a.right-r.getEvX(e)))/s,t>=0&&t<=1?l=t*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?c=i*this.scrollSpeed*-1:o>=0&&o<=1&&(c=o*this.scrollSpeed)),this.setScrollVel(l,c)},e.prototype.setScrollVel=function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(r.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},e.prototype.constrainScrollVel=function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},e.prototype.scrollIntervalFunc=function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},e.prototype.endAutoScroll=function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},e.prototype.handleDebouncedScroll=function(){this.scrollIntervalId||this.handleScrollEnd()},e.prototype.handleScrollEnd=function(){},e}();t.default=a,o.default.mixInto(a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.updateDayTable=function(){for(var e,t,n,i=this,r=i.view,o=r.calendar,s=o.msToUtcMoment(i.dateProfile.renderUnzonedRange.startMs,!0),a=o.msToUtcMoment(i.dateProfile.renderUnzonedRange.endMs,!0),l=-1,c=[],u=[];s.isBefore(a);)r.isHiddenDay(s)?c.push(l+.5):(c.push(++l),u.push(s.clone())),s.add(1,"days");if(this.breakOnWeeks){for(t=u[0].day(),e=1;e<u.length&&u[e].day()!==t;e++);n=Math.ceil(u.length/e)}else n=1,e=u.length;this.dayDates=u,this.dayIndices=c,this.daysPerRow=e,this.rowCnt=n,this.updateDayTableCols()},t.prototype.updateDayTableCols=function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.opt("columnHeaderFormat")||this.opt("columnFormat")||this.computeColHeadFormat()},t.prototype.computeColCnt=function(){return this.daysPerRow},t.prototype.getCellDate=function(e,t){return this.dayDates[this.getCellDayIndex(e,t)].clone()},t.prototype.getCellRange=function(e,t){var n=this.getCellDate(e,t);return{start:n,end:n.clone().add(1,"days")}},t.prototype.getCellDayIndex=function(e,t){return e*this.daysPerRow+this.getColDayIndex(t)},t.prototype.getColDayIndex=function(e){return this.isRTL?this.colCnt-1-e:e},t.prototype.getDateDayIndex=function(e){var t=this.dayIndices,n=e.diff(this.dayDates[0],"days");return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},t.prototype.computeColHeadFormat=function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.opt("dayOfMonthFormat"):"dddd"},t.prototype.sliceRangeByRow=function(e){var t,n,i,r,o,s=this.daysPerRow,a=this.view.computeDayRange(e),l=this.getDateDayIndex(a.start),c=this.getDateDayIndex(a.end.clone().subtract(1,"days")),u=[];for(t=0;t<this.rowCnt;t++)i=(n=t*s)+s-1,r=Math.max(l,n),o=Math.min(c,i),(r=Math.ceil(r))<=(o=Math.floor(o))&&u.push({row:t,firstRowDayIndex:r-n,lastRowDayIndex:o-n,isStart:r===l,isEnd:o===c});return u},t.prototype.sliceRangeByDay=function(e){var t,n,i,r,o,s,a=this.daysPerRow,l=this.view.computeDayRange(e),c=this.getDateDayIndex(l.start),u=this.getDateDayIndex(l.end.clone().subtract(1,"days")),d=[];for(t=0;t<this.rowCnt;t++)for(i=(n=t*a)+a-1,r=n;r<=i;
1r++)o=Math.max(c,r),s=Math.min(u,r),(o=Math.ceil(o))<=(s=Math.floor(s))&&d.push({row:t,firstRowDayIndex:o-n,lastRowDayIndex:s-n,isStart:o===c,isEnd:s===u});return d},t.prototype.renderHeadHtml=function(){var e=this.view.calendar.theme;return'<div class="fc-row '+e.getClass("headerRow")+'"><table class="'+e.getClass("tableGrid")+'"><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},t.prototype.renderHeadIntroHtml=function(){return this.renderIntroHtml()},t.prototype.renderHeadTrHtml=function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},t.prototype.renderHeadDateCellsHtml=function(){var e,t,n=[];for(e=0;e<this.colCnt;e++)t=this.getCellDate(0,e),n.push(this.renderHeadDateCellHtml(t));return n.join("")},t.prototype.renderHeadDateCellHtml=function(e,t,n){var i,o=this,s=o.view,a=o.dateProfile.activeUnzonedRange.containsDate(e),l=["fc-day-header",s.calendar.theme.getClass("widgetHeader")];return i="function"==typeof o.opt("columnHeaderHtml")?o.opt("columnHeaderHtml")(e):"function"==typeof o.opt("columnHeaderText")?r.htmlEscape(o.opt("columnHeaderText")(e)):r.htmlEscape(e.format(o.colHeadFormat)),1===o.rowCnt?l=l.concat(o.getDayClasses(e,!0)):l.push("fc-"+r.dayIDs[e.day()]),'<th class="'+l.join(" ")+'"'+(1===(a&&o.rowCnt)?' data-date="'+e.format("YYYY-MM-DD")+'"':"")+(t>1?' colspan="'+t+'"':"")+(n?" "+n:"")+">"+(a?s.buildGotoAnchorHtml({date:e,forceOff:o.rowCnt>1||1===o.colCnt},i):i)+"</th>"},t.prototype.renderBgTrHtml=function(e){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(e))+this.renderBgCellsHtml(e)+(this.isRTL?this.renderBgIntroHtml(e):"")+"</tr>"},t.prototype.renderBgIntroHtml=function(e){return this.renderIntroHtml()},t.prototype.renderBgCellsHtml=function(e){var t,n,i=[];for(t=0;t<this.colCnt;t++)n=this.getCellDate(e,t),i.push(this.renderBgCellHtml(n));return i.join("")},t.prototype.renderBgCellHtml=function(e,t){var n=this,i=n.view,r=n.dateProfile.activeUnzonedRange.containsDate(e),o=n.getDayClasses(e);return o.unshift("fc-day",i.calendar.theme.getClass("widgetContent")),'<td class="'+o.join(" ")+'"'+(r?' data-date="'+e.format("YYYY-MM-DD")+'"':"")+(t?" "+t:"")+"></td>"},t.prototype.renderIntroHtml=function(){},t.prototype.bookendCells=function(e){var t=this.renderIntroHtml();t&&(this.isRTL?e.append(t):e.prepend(t))},t}(n(14).default);t.default=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.component=e,this.fillRenderer=t}return e.prototype.render=function(e){var t=this.component,n=t._getDateProfile().activeUnzonedRange,i=e.buildEventInstanceGroup(t.hasAllDayBusinessHours,n),r=i?t.eventRangesToEventFootprints(i.sliceRenderRanges(n)):[];this.renderEventFootprints(r)},e.prototype.renderEventFootprints=function(e){var t=this.component.eventFootprintsToSegs(e);this.renderSegs(t),this.segs=t},e.prototype.renderSegs=function(e){this.fillRenderer&&this.fillRenderer.renderSegs("businessHours",e,{getClasses:function(e){return["fc-nonbusiness","fc-bgevent"]}})},e.prototype.unrender=function(){this.fillRenderer&&this.fillRenderer.unrender("businessHours"),this.segs=null},e.prototype.getSegs=function(){return this.segs||[]},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=function(){function e(e){this.fillSegTag="div",this.component=e,this.elsByFill={}}return e.prototype.renderFootprint=function(e,t,n){this.renderSegs(e,this.component.componentFootprintToSegs(t),n)},e.prototype.renderSegs=function(e,t,n){var i;return t=this.buildSegEls(e,t,n),(i=this.attachSegEls(e,t))&&this.reportEls(e,i),t},e.prototype.unrender=function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},e.prototype.buildSegEls=function(e,t,n){var r,o=this,s="",a=[];if(t.length){for(r=0;r<t.length;r++)s+=this.buildSegHtml(e,t[r],n);i(s).each(function(e,r){var s=t[e],l=i(r);n.filterEl&&(l=n.filterEl(s,l)),l&&(l=i(l)).is(o.fillSegTag)&&(s.el=l,a.push(s))})}return a},e.prototype.buildSegHtml=function(e,t,n){var i=n.getClasses?n.getClasses(t):[],o=r.cssToStr(n.getCss?n.getCss(t):{});return"<"+this.fillSegTag+(i.length?' class="'+i.join(" ")+'"':"")+(o?' style="'+o+'"':"")+" />"},e.prototype.attachSegEls=function(e,t){},e.prototype.reportEls=function(e,t){this.elsByFill[e]=this.elsByFill[e]?this.elsByFill[e].add(t):i(t)},e}();t.default=o}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=n(36),o=n(6),s=function(){function e(e,t){this.view=e._getView(),this.component=e,this.eventRenderer=t}return e.prototype.renderComponentFootprint=function(e){this.renderEventFootprints([this.fabricateEventFootprint(e)])},e.prototype.renderEventDraggingFootprints=function(e,t,n){this.renderEventFootprints(e,t,"fc-dragging",n?null:this.view.opt("dragOpacity"))},e.prototype.renderEventResizingFootprints=function(e,t,n){this.renderEventFootprints(e,t,"fc-resizing")},e.prototype.renderEventFootprints=function(e,t,n,i){var r,o=this.component.eventFootprintsToSegs(e),s="fc-helper "+(n||"");for(o=this.eventRenderer.renderFgSegEls(o),r=0;r<o.length;r++)o[r].el.addClass(s);if(null!=i)for(r=0;r<o.length;r++)o[r].el.css("opacity",i);this.helperEls=this.renderSegs(o,t)},e.prototype.renderSegs=function(e,t){},e.prototype.unrender=function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},e.prototype.fabricateEventFootprint=function(e){var t,n=this.view.calendar,s=n.footprintToDateProfile(e),a=new i.default(new o.default(n));return a.dateProfile=s,t=a.buildInstance(),new r.default(e,a,t)},e}();t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(21),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"click",this.handleClick.bind(this)),t.bindSegHandlerToEl(e,"mouseenter",this.handleMouseover.bind(this)),t.bindSegHandlerToEl(e,"mouseleave",this.handleMouseout.bind(this))},t.prototype.handleClick=function(e,t){!1===this.component.publiclyTrigger("eventClick",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,this.view]})&&t.preventDefault()},t.prototype.handleMouseover=function(e,t){r.default.get().shouldIgnoreMouse()||this.mousedOverSeg||(this.mousedOverSeg=e,this.view.isEventDefResizable(e.footprint.eventDef)&&e.el.addClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseover",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,this.view]}))},t.prototype.handleMouseout=function(e,t){this.mousedOverSeg&&(this.mousedOverSeg=null,this.view.isEventDefResizable(e.footprint.eventDef)&&e.el.removeClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseout",{context:e.el[0],args:[e.footprint.getEventLegacy(),t||{},this.view]}))},t.prototype.end=function(){this.mousedOverSeg&&this.handleMouseout(this.mousedOverSeg)},t}(n(15).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(14),o=n(245),s=n(225),a=n(59),l=n(224),c=n(223),u=n(222),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(r.default);t.default=d,d.prototype.dateClickingClass=o.default,d.prototype.dateSelectingClass=s.default,d.prototype.eventPointingClass=a.default,d.prototype.eventDraggingClass=l.default,d.prototype.eventResizingClass=c.default,d.prototype.externalDroppingClass=u.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(53),a=n(249),l=n(5),c=n(12),u=n(36),d=n(56),h=n(60),p=n(40),f=n(55),g=n(250),m=n(251),v=n(252),y=function(e){function t(t){var n=e.call(this,t)||this;return n.cellWeekNumbersVisible=!1,n.bottomCoordPadding=0,n.isRigid=!1,n.hasAllDayBusinessHours=!0,n}return i.__extends(t,e),t.prototype.componentFootprintToSegs=function(e){var t,n,i=this.sliceRangeByRow(e.unzonedRange);for(t=0;t<i.length;t++)n=i[t],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return i},t.prototype.renderDates=function(e){this.dateProfile=e,this.updateDayTable(),this.renderGrid()},t.prototype.unrenderDates=function(){this.removeSegPopover()},t.prototype.renderGrid=function(){var e,t,n=this.view,i=this.rowCnt,r=this.colCnt,o="";for(this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),e=0;e<i;e++)o+=this.renderDayRowHtml(e,this.isRigid);for(this.el.html(o),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day, .fc-disabled-day"),this.rowCoordCache=new s.default({els:this.rowEls,isVertical:!0}),this.colCoordCache=new s.default({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;e<i;e++)for(t=0;t<r;t++)this.publiclyTrigger("dayRender",{context:n,args:[this.getCellDate(e,t),this.getCellEl(e,t),n]})},t.prototype.renderDayRowHtml=function(e,t){var n=this.view.calendar.theme,i=["fc-row","fc-week",n.getClass("dayRow")];return t&&i.push("fc-rigid"),'<div class="'+i.join(" ")+'"><div class="fc-bg"><table class="'+n.getClass("tableGrid")+'">'+this.renderBgTrHtml(e)+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(e)+"</thead>":"")+"</table></div></div>"},t.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.cellWeekNumbersVisible},t.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},t.prototype.renderNumberTrHtml=function(e){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(e))+this.renderNumberCellsHtml(e)+(this.isRTL?this.renderNumberIntroHtml(e):"")+"</tr>"},t.prototype.renderNumberIntroHtml=function(e){return this.renderIntroHtml()},t.prototype.renderNumberCellsHtml=function(e){var t,n,i=[];for(t=0;t<this.colCnt;t++)n=this.getCellDate(e,t),i.push(this.renderNumberCellHtml(n));return i.join("")},t.prototype.renderNumberCellHtml=function(e){var t,n,i=this.view,r="",o=this.dateProfile.activeUnzonedRange.containsDate(e),s=this.getIsDayNumbersVisible()&&o;return s||this.cellWeekNumbersVisible?((t=this.getDayClasses(e)).unshift("fc-day-top"),this.cellWeekNumbersVisible&&(n="ISO"===e._locale._fullCalendar_weekCalc?1:e._locale.firstDayOfWeek()),r+='<td class="'+t.join(" ")+'"'+(o?' data-date="'+e.format()+'"':"")+">",this.cellWeekNumbersVisible&&e.day()===n&&(r+=i.buildGotoAnchorHtml({date:e,type:"week"},{class:"fc-week-number"},e.format("w"))),s&&(r+=i.buildGotoAnchorHtml(e,{class:"fc-day-number"},e.format("D"))),r+="</td>"):"<td/>"},t.prototype.prepareHits=function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},t.prototype.releaseHits=function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},t.prototype.queryHit=function(e,t){if(this.colCoordCache.isLeftInBounds(e)&&this.rowCoordCache.isTopInBounds(t)){var n=this.colCoordCache.getHorizontalIndex(e),i=this.rowCoordCache.getVerticalIndex(t);if(null!=i&&null!=n)return this.getCellHit(i,n)}},t.prototype.getHitFootprint=function(e){var t=this.getCellRange(e.row,e.col);
1return new c.default(new l.default(t.start,t.end),!0)},t.prototype.getHitEl=function(e){return this.getCellEl(e.row,e.col)},t.prototype.getCellHit=function(e,t){return{row:e,col:t,component:this,left:this.colCoordCache.getLeftOffset(t),right:this.colCoordCache.getRightOffset(t),top:this.rowCoordCache.getTopOffset(e),bottom:this.rowCoordCache.getBottomOffset(e)}},t.prototype.getCellEl=function(e,t){return this.cellEls.eq(e*this.colCnt+t)},t.prototype.executeEventUnrender=function(){this.removeSegPopover(),e.prototype.executeEventUnrender.call(this)},t.prototype.getOwnEventSegs=function(){return e.prototype.getOwnEventSegs.call(this).concat(this.popoverSegs||[])},t.prototype.renderDrag=function(e,t,n){var i;for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint);if(e.length&&t&&t.component!==this)return this.helperRenderer.renderEventDraggingFootprints(e,t,n),!0},t.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.renderEventResize=function(e,t,n){var i;for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint);this.helperRenderer.renderEventResizingFootprints(e,t,n)},t.prototype.unrenderEventResize=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},t.prototype.limitRows=function(e){var t,n,i=this.eventRenderer.rowStructs||[];for(t=0;t<i.length;t++)this.unlimitRow(t),!1!==(n=!!e&&("number"==typeof e?e:this.computeRowLevelLimit(t)))&&this.limitRow(t,n)},t.prototype.computeRowLevelLimit=function(e){var t,n,i,o=this.rowEls.eq(e).height(),s=this.eventRenderer.rowStructs[e].tbodyEl.children();function a(e,t){i=Math.max(i,r(t).outerHeight())}for(t=0;t<s.length;t++)if(n=s.eq(t).removeClass("fc-limited"),i=0,n.find("> td > :first-child").each(a),n.position().top+i>o)return t;return!1},t.prototype.limitRow=function(e,t){var n,i,o,s,a,l,c,u,d,h,p,f,g,m,v,y=this,b=this.eventRenderer.rowStructs[e],_=[],S=0,w=function(n){for(;S<n;)(l=y.getCellSegs(e,S,t)).length&&(d=i[t-1][S],v=y.renderMoreLink(e,S,l),m=r("<div/>").append(v),d.append(m),_.push(m[0])),S++};if(t&&t<b.segLevels.length){for(n=b.segLevels[t-1],i=b.cellMatrix,o=b.tbodyEl.children().slice(t).addClass("fc-limited").get(),s=0;s<n.length;s++){for(w((a=n[s]).leftCol),u=[],c=0;S<=a.rightCol;)l=this.getCellSegs(e,S,t),u.push(l),c+=l.length,S++;if(c){for(h=(d=i[t-1][a.leftCol]).attr("rowspan")||1,p=[],f=0;f<u.length;f++)g=r('<td class="fc-more-cell"/>').attr("rowspan",h),v=this.renderMoreLink(e,a.leftCol+f,[a].concat(l=u[f])),m=r("<div/>").append(v),g.append(m),p.push(g[0]),_.push(g[0]);d.addClass("fc-limited").after(r(p)),o.push(d[0])}}w(this.colCnt),b.moreEls=r(_),b.limitedEls=r(o)}},t.prototype.unlimitRow=function(e){var t=this.eventRenderer.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},t.prototype.renderMoreLink=function(e,t,n){var i=this,o=this.view;return r('<a class="fc-more"/>').text(this.getMoreLinkText(n.length)).on("click",function(s){var a=i.opt("eventLimitClick"),l=i.getCellDate(e,t),c=r(s.currentTarget),u=i.getCellEl(e,t),d=i.getCellSegs(e,t),h=i.resliceDaySegs(d,l),p=i.resliceDaySegs(n,l);"function"==typeof a&&(a=i.publiclyTrigger("eventLimitClick",{context:o,args:[{date:l.clone(),dayEl:u,moreEl:c,segs:h,hiddenSegs:p},s,o]})),"popover"===a?i.showSegPopover(e,t,c,h):"string"==typeof a&&o.calendar.zoomTo(l,a)})},t.prototype.showSegPopover=function(e,t,n,i){var r,o,s=this,l=this.view,c=n.parent();r=1===this.rowCnt?l.el:this.rowEls.eq(e),o={className:"fc-more-popover "+l.calendar.theme.getClass("popover"),content:this.renderSegPopoverContent(e,t,i),parentEl:l.el,top:r.offset().top,autoHide:!0,viewportConstrain:this.opt("popoverViewportConstrain"),hide:function(){s.popoverSegs&&s.triggerBeforeEventSegsDestroyed(s.popoverSegs),s.segPopover.removeElement(),s.segPopover=null,s.popoverSegs=null}},this.isRTL?o.right=c.offset().left+c.outerWidth()+1:o.left=c.offset().left-1,this.segPopover=new a.default(o),this.segPopover.show(),this.bindAllSegHandlersToEl(this.segPopover.el),this.triggerAfterEventSegsRendered(i)},t.prototype.renderSegPopoverContent=function(e,t,n){var i,s=this.view.calendar.theme,a=this.getCellDate(e,t).format(this.opt("dayPopoverFormat")),l=r('<div class="fc-header '+s.getClass("popoverHeader")+'"><span class="fc-close '+s.getIconClass("close")+'"></span><span class="fc-title">'+o.htmlEscape(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>
1'),c=l.find(".fc-event-container");for(n=this.eventRenderer.renderFgSegEls(n,!0),this.popoverSegs=n,i=0;i<n.length;i++)this.hitsNeeded(),n[i].hit=this.getCellHit(e,t),this.hitsNotNeeded(),c.append(n[i].el);return l},t.prototype.resliceDaySegs=function(e,t){var n,i,o,s=t.clone(),a=s.clone().add(1,"days"),d=new l.default(s,a),h=[];for(n=0;n<e.length;n++)(o=(i=e[n]).footprint.componentFootprint.unzonedRange.intersect(d))&&h.push(r.extend({},i,{footprint:new u.default(new c.default(o,i.footprint.componentFootprint.isAllDay),i.footprint.eventDef,i.footprint.eventInstance),isStart:i.isStart&&o.isStart,isEnd:i.isEnd&&o.isEnd}));return this.eventRenderer.sortEventSegs(h),h},t.prototype.getMoreLinkText=function(e){var t=this.opt("eventLimitText");return"function"==typeof t?t(e):"+"+e+" "+t},t.prototype.getCellSegs=function(e,t,n){for(var i,r=this.eventRenderer.rowStructs[e].segMatrix,o=n||0,s=[];o<r.length;)(i=r[o][t])&&s.push(i),o++;return s},t}(p.default);t.default=y,y.prototype.eventRendererClass=g.default,y.prototype.businessHourRendererClass=d.default,y.prototype.helperRendererClass=m.default,y.prototype.fillRendererClass=v.default,h.default.mixInto(y),f.default.mixInto(y)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(39),a=n(41),l=n(228),c=n(61),u=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.dayGrid=i.instantiateDayGrid(),i.dayGrid.isRigid=i.hasRigidRows(),i.opt("weekNumbers")&&(i.opt("weekNumbersWithinDays")?(i.dayGrid.cellWeekNumbersVisible=!0,i.dayGrid.colWeekNumbersVisible=!1):(i.dayGrid.cellWeekNumbersVisible=!1,i.dayGrid.colWeekNumbersVisible=!0)),i.addChild(i.dayGrid),i.scroller=new s.default({overflowX:"hidden",overflowY:"auto"}),i}return i.__extends(t,e),t.prototype.instantiateDayGrid=function(){return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.colWeekNumbersVisible=!1,t}return i.__extends(t,e),t.prototype.renderHeadIntroHtml=function(){var e=this.view;return this.colWeekNumbersVisible?'<th class="fc-week-number '+e.calendar.theme.getClass("widgetHeader")+'" '+e.weekNumberStyleAttr()+"><span>"+o.htmlEscape(this.opt("weekNumberTitle"))+"</span></th>":""},t.prototype.renderNumberIntroHtml=function(e){var t=this.view,n=this.getCellDate(e,0);return this.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+">"+t.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"</td>":""},t.prototype.renderBgIntroHtml=function(){var e=this.view;return this.colWeekNumbersVisible?'<td class="fc-week-number '+e.calendar.theme.getClass("widgetContent")+'" '+e.weekNumberStyleAttr()+"></td>":""},t.prototype.renderIntroHtml=function(){return this.colWeekNumbersVisible?'<td class="fc-week-number" '+this.view.weekNumberStyleAttr()+"></td>":""},t.prototype.getIsNumbersVisible=function(){return c.default.prototype.getIsNumbersVisible.apply(this,arguments)||this.colWeekNumbersVisible},t}(this.dayGridClass))(this)},t.prototype.executeDateRender=function(t){this.dayGrid.breakOnWeeks=/year|month|week/.test(t.currentRangeUnit),e.prototype.executeDateRender.call(this,t)},t.prototype.renderSkeleton=function(){var e,t;this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.scroller.render(),e=this.scroller.el.addClass("fc-day-grid-container"),t=r('<div class="fc-day-grid" />').appendTo(e),this.el.find(".fc-body > tr > td").append(e),this.dayGrid.headContainerEl=this.el.find(".fc-head-container"),this.dayGrid.setElement(t)},t.prototype.unrenderSkeleton=function(){this.dayGrid.removeElement(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'<table class="'+e.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'"></td></tr></tbody></table>'},t.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},t.prototype.hasRigidRows=function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},t.prototype.updateSize=function(t,n,i){var r,s,a=this.opt("eventLimit"),l=this.dayGrid.headContainerEl.find(".fc-row");this.dayGrid.rowEls?(e.prototype.updateSize.call(this,t,n,i),this.dayGrid.colWeekNumbersVisible&&(this.weekNumberWidth=o.matchCellWidths(this.el.find(".fc-week-number"))),this.scroller.clear(),o.uncompensateScroll(l),this.dayGrid.removeSegPopover(),a&&"number"==typeof a&&this.dayGrid.limitRows(a),r=this.computeScrollerHeight(t),this.setGridHeight(r,n),a&&"number"!=typeof a&&this.dayGrid.limitRows(a),n||(this.scroller.setHeight(r),((s=this.scroller.getScrollbarWidths()).left||s.right)&&(o.compensateScroll(l,s),r=this.computeScrollerHeight(t),this.scroller.setHeight(r)),this.scroller.lockOverflow(s))
1):n||(r=this.computeScrollerHeight(t),this.scroller.setHeight(r))},t.prototype.computeScrollerHeight=function(e){return e-o.subtractInnerElHeight(this.el,this.scroller.el)},t.prototype.setGridHeight=function(e,t){t?o.undistributeHeight(this.dayGrid.rowEls):o.distributeHeight(this.dayGrid.rowEls,e,!0)},t.prototype.computeInitialDateScroll=function(){return{top:0}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t}(a.default);t.default=u,u.prototype.dateProfileGeneratorClass=l.default,u.prototype.dayGridClass=c.default},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),r=n(12),o=n(49),s=n(6),a=n(35),l=function(){function e(e,t){this.eventManager=e,this._calendar=t}return e.prototype.opt=function(e){return this._calendar.opt(e)},e.prototype.isEventInstanceGroupAllowed=function(e){var t,n=e.getEventDef(),i=this.eventRangesToEventFootprints(e.getAllEventRanges()),r=this.getPeerEventInstances(n).map(a.eventInstanceToEventRange),o=this.eventRangesToEventFootprints(r),s=n.getConstraint(),l=n.getOverlap(),c=this.opt("eventAllow");for(t=0;t<i.length;t++)if(!this.isFootprintAllowed(i[t].componentFootprint,o,s,l,i[t].eventInstance))return!1;if(c)for(t=0;t<i.length;t++)if(!1===c(i[t].componentFootprint.toLegacy(this._calendar),i[t].getEventLegacy()))return!1;return!0},e.prototype.getPeerEventInstances=function(e){return this.eventManager.getEventInstancesWithoutId(e.id)},e.prototype.isSelectionFootprintAllowed=function(e){var t,n=this.eventManager.getEventInstances().map(a.eventInstanceToEventRange),i=this.eventRangesToEventFootprints(n);return!(!this.isFootprintAllowed(e,i,this.opt("selectConstraint"),this.opt("selectOverlap"))||(t=this.opt("selectAllow"))&&!1===t(e.toLegacy(this._calendar)))},e.prototype.isFootprintAllowed=function(e,t,n,i,r){var o,s;if(null!=n&&(o=this.constraintValToFootprints(n,e.isAllDay),!this.isFootprintWithinConstraints(e,o)))return!1;if(s=this.collectOverlapEventFootprints(t,e),!1===i){if(s.length)return!1}else if("function"==typeof i&&!function(e,t,n){var i;for(i=0;i<e.length;i++)if(!t(e[i].eventInstance.toLegacy(),n?n.toLegacy():null))return!1;return!0}(s,i,r))return!1;return!(r&&!function(e,t){var n,i,r,o=t.toLegacy();for(n=0;n<e.length;n++){if(!1===(r=(i=e[n].eventInstance).def.getOverlap()))return!1;if("function"==typeof r&&!r(i.toLegacy(),o))return!1}return!0}(s,r))},e.prototype.isFootprintWithinConstraints=function(e,t){var n;for(n=0;n<t.length;n++)if(this.footprintContainsFootprint(t[n],e))return!0;return!1},e.prototype.constraintValToFootprints=function(e,t){var n;return"businessHours"===e?this.buildCurrentBusinessFootprints(t):"object"==typeof e?(n=this.parseEventDefToInstances(e))?this.eventInstancesToFootprints(n):this.parseFootprints(e):null!=e?(n=this.eventManager.getEventInstancesWithId(e),this.eventInstancesToFootprints(n)):void 0},e.prototype.buildCurrentBusinessFootprints=function(e){var t=this._calendar.view,n=t.get("businessHourGenerator").buildEventInstanceGroup(e,t.dateProfile.activeUnzonedRange);return n?this.eventInstancesToFootprints(n.eventInstances):[]},e.prototype.eventInstancesToFootprints=function(e){var t=e.map(a.eventInstanceToEventRange);return this.eventRangesToEventFootprints(t).map(a.eventFootprintToComponentFootprint)},e.prototype.collectOverlapEventFootprints=function(e,t){var n,i=[];for(n=0;n<e.length;n++)this.footprintsIntersect(t,e[n].componentFootprint)&&i.push(e[n]);return i},e.prototype.parseEventDefToInstances=function(e){var t=this.eventManager,n=o.default.parse(e,new s.default(this._calendar));return!!n&&n.buildInstances(t.currentPeriod.unzonedRange)},e.prototype.eventRangesToEventFootprints=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventRangeToEventFootprints(e[t]));return n},e.prototype.eventRangeToEventFootprints=function(e){return[a.eventRangeToEventFootprint(e)]},e.prototype.parseFootprints=function(e){var t,n;return e.start&&((t=this._calendar.moment(e.start)).isValid()||(t=null)),e.end&&((n=this._calendar.moment(e.end)).isValid()||(n=null)),[new r.default(new i.default(t,n),t&&!t.hasTime()||n&&!n.hasTime())]},e.prototype.footprintContainsFootprint=function(e,t){return e.unzonedRange.containsRange(t.unzonedRange)},e.prototype.footprintsIntersect=function(e,t){return e.unzonedRange.intersectsWith(t.unzonedRange)},e}();t.default=l}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.defineStandardProps=function(e){var t=this.prototype;t.hasOwnProperty("standardPropMap")||(t.standardPropMap=Object.create(t.standardPropMap)),r.copyOwnProps(e,t.standardPropMap)},t.copyVerbatimStandardProps=function(e,t){var n,i=this.prototype.standardPropMap;for(n in i)null!=e[n]&&!0===i[n]&&(t[n]=e[n])},t.prototype.applyProps=function(e){var t,n=this.standardPropMap,i={},r={};for(t in e)!0===n[t]?this[t]=e[t]:!1===n[t]?i[t]=e[t]:r[t]=e[t];return this.applyMiscProps(r),this.applyManualStandardProps(i)},t.prototype.applyManualStandardProps=function(e){return!0},t.prototype.applyMiscProps=function(e){},t.prototype.isStandardProp=function(e){return e in this.standardPropMap},t}(n(14).default);t.default=o,o.prototype.standardPropMap={}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.def=e,this.dateProfile=t}return e.prototype.toLegacy=function(){var e=this.dateProfile,t=this.def.toLegacy();return t.start=e.start.clone(),t.end=e.end?e.end.clone():null,t},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(34),a=n(209),l=n(17),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.isAllDay=function(){return!this.startTime&&!this.endTime},t.prototype.buildInstances=function(e){for(var t,n,i,r=this.source.calendar,o=e.getStart(),s=e.getEnd(),c=[];o.isBefore(s);)this.dowHash&&!this.dowHash[o.day()]||(n=(t=r.applyTimezone(o)).clone(),i=null,this.startTime?n.time(this.startTime):n.stripTime(),this.endTime&&(i=t.clone().time(this.endTime)),c.push(new a.default(this,new l.default(n,i,r)))),o.add(1,"days");return c},t.prototype.setDow=function(e){this.dowHash||(this.dowHash={});for(var t=0;t<e.length;t++)this.dowHash[e[t]]=!0},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t.startTime&&(t.startTime=o.duration(this.startTime)),t.endTime&&(t.endTime=o.duration(this.endTime)),this.dowHash&&(t.dowHash=r.extend({},this.dowHash)),t},t}(s.default);t.default=c,c.prototype.applyProps=function(e){var t=s.default.prototype.applyProps.call(this,e);return e.start&&(this.startTime=o.duration(e.start)),e.end&&(this.endTime=o.duration(e.end)),e.dow&&this.setDow(e.dow),t},c.defineStandardProps({start:!1,end:!1,dow:!1})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){this.unzonedRange=e,this.eventDef=t,n&&(this.eventInstance=n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(35),o=n(18),s=n(210),a=n(6),l={start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},c=function(){function e(e,t){this.rawComplexDef=e,this.calendar=t}return e.prototype.buildEventInstanceGroup=function(e,t){var n,i=this.buildEventDefs(e);if(i.length)return(n=new o.default(r.eventDefsToEventInstances(i,t))).explicitEventDef=i[0],n},e.prototype.buildEventDefs=function(e){var t,n=this.rawComplexDef,r=[],o=!1,s=[];for(!0===n?r=[{}]:i.isPlainObject(n)?r=[n]:i.isArray(n)&&(r=n,o=!0),t=0;t<r.length;t++)o&&!r[t].dow||s.push(this.buildEventDef(e,r[t]));return s},e.prototype.buildEventDef=function(e,t){var n=i.extend({},l,t);return e&&(n.start=null,n.end=null),s.default.parse(n,new a.default(this.calendar))},e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=r,r.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button",cornerLeft:"fc-corner-left",cornerRight:"fc-corner-right",stateDefault:"fc-state-default",stateActive:"fc-state-active",stateDisabled:"fc-state-disabled",stateHover:"fc-state-hover",stateDown:"fc-state-down",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},r.prototype.baseIconClass="fc-icon",r.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-left-single-arrow",next:"fc-icon-right-single-arrow",prevYear:"fc-icon-left-double-arrow",nextYear:"fc-icon-right-double-arrow"},r.prototype.iconOverrideOption="buttonIcons",r.prototype.iconOverrideCustomButtonOption="icon",r.prototype.iconOverridePrefix="fc-icon-"}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=r,r.prototype.classes={widget:"ui-widget",widgetHeader:"ui-widget-header",widgetContent:"ui-widget-content",buttonGroup:"fc-button-group",button:"ui-button",cornerLeft:"ui-corner-left",cornerRight:"ui-corner-right",stateDefault:"ui-state-default",stateActive:"ui-state-active",stateDisabled:"ui-state-disabled",stateHover:"ui-state-hover",stateDown:"ui-state-down",today:"ui-state-highlight",popoverHeader:"ui-widget-header",popoverContent:"ui-widget-content",headerRow:"ui-widget-header",dayRow:"ui-widget-content",listView:"ui-widget-content"},r.prototype.baseIconClass="ui-icon",r.prototype.iconClasses={close:"ui-icon-closethick",prev:"ui-icon-circle-triangle-w",next:"ui-icon-circle-triangle-e",prevYear:"ui-icon-seek-prev",nextYear:"ui-icon-seek-next"},r.prototype.iconOverrideOption="themeButtonIcons",r.prototype.iconOverrideCustomButtonOption="themeIcon",r.prototype.iconOverridePrefix="ui-icon-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(20),s=n(6),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.parse=function(e,t){var n;return r.isFunction(e.events)?n=e:r.isFunction(e)&&(n={events:e}),!!n&&s.default.parse.call(this,n,t)},t.prototype.fetch=function(e,t,n){var i=this;return this.calendar.pushLoading(),o.default.construct(function(r){i.func.call(i.calendar,e.clone(),t.clone(),n,function(e){i.calendar.popLoading(),r(i.parseEventDefs(e))})})},t.prototype.getPrimitive=function(){return this.func},t.prototype.applyManualStandardProps=function(t){var n=e.prototype.applyManualStandardProps.call(this,t);return this.func=t.events,n},t}(s.default);t.default=a,a.defineStandardProps({events:!1})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(20),a=n(6),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.parse=function(e,t){var n;return"string"==typeof e.url?n=e:"string"==typeof e&&(n={url:e}),!!n&&a.default.parse.call(this,n,t)},t.prototype.fetch=function(e,n,i){var a=this,l=this.ajaxSettings,c=l.success,u=l.error,d=this.buildRequestParams(e,n,i);return this.calendar.pushLoading(),s.default.construct(function(e,n){r.ajax(r.extend({},t.AJAX_DEFAULTS,l,{url:a.url,data:d,success:function(t,i,s){var l;a.calendar.popLoading(),t?(l=o.applyAll(c,a,[t,i,s]),r.isArray(l)&&(t=l),e(a.parseEventDefs(t))):n()},error:function(e,t,i){a.calendar.popLoading(),o.applyAll(u,a,[e,t,i]),n()}}))})},t.prototype.buildRequestParams=function(e,t,n){var i,o,s,a,l=this.calendar,c=this.ajaxSettings,u={};return null==(i=this.startParam)&&(i=l.opt("startParam")),null==(o=this.endParam)&&(o=l.opt("endParam")),null==(s=this.timezoneParam)&&(s=l.opt("timezoneParam")),a=r.isFunction(c.data)?c.data():c.data||{},r.extend(u,a),u[i]=e.format(),u[o]=t.format(),n&&"local"!==n&&(u[s]=n),u},t.prototype.getPrimitive=function(){return this.url},t.prototype.applyMiscProps=function(e){this.ajaxSettings=e},t.AJAX_DEFAULTS={dataType:"json",cache:!1},t}(a.default);t.default=l,l.defineStandardProps({url:!0,startParam:!0,endParam:!0,timezoneParam:!0})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),r=function(){function e(){this.q=[],this.isPaused=!1,this.isRunning=!1}return e.prototype.queue=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.q.push.apply(this.q,e),this.tryStart()},e.prototype.pause=function(){this.isPaused=!0},e.prototype.resume=function(){this.isPaused=!1,this.tryStart()},e.prototype.getIsIdle=function(){return!this.isRunning&&!this.isPaused},e.prototype.tryStart=function(){!this.isRunning&&this.canRunNext()&&(this.isRunning=!0,this.trigger("start"),this.runRemaining())},e.prototype.canRunNext=function(){return!this.isPaused&&this.q.length},e.prototype.runRemaining=function(){var e,t,n=this;do{if(e=this.q.shift(),(t=this.runTask(e))&&t.then)return void t.then(function(){n.canRunNext()&&n.runRemaining()})}while(this.canRunNext());this.trigger("stop"),this.isRunning=!1,this.tryStart()},e.prototype.runTask=function(e){return e()},e}();t.default=r,i.default.mixInto(r)}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(t){var n=e.call(this)||this;return n.waitsByNamespace=t||{},n}return i.__extends(t,e),t.prototype.queue=function(e,t,n){var i,r={func:e,namespace:t,type:n};t&&(i=this.waitsByNamespace[t]),this.waitNamespace&&(t===this.waitNamespace&&null!=i?this.delayWait(i):(this.clearWait(),this.tryStart())),this.compoundTask(r)&&(this.waitNamespace||null==i?this.tryStart():this.startWait(t,i))},t.prototype.startWait=function(e,t){this.waitNamespace=e,this.spawnWait(t)},t.prototype.delayWait=function(e){clearTimeout(this.waitId),this.spawnWait(e)},t.prototype.spawnWait=function(e){var t=this;this.waitId=setTimeout(function(){t.waitNamespace=null,t.tryStart()},e)},t.prototype.clearWait=function(){this.waitNamespace&&(clearTimeout(this.waitId),this.waitId=null,this.waitNamespace=null)},t.prototype.canRunNext=function(){if(!e.prototype.canRunNext.call(this))return!1;if(this.waitNamespace){for(var t=this.q,n=0;n<t.length;n++)if(t[n].namespace!==this.waitNamespace)return!0;return!1}return!0},t.prototype.runTask=function(e){e.func()},t.prototype.compoundTask=function(e){var t,n=this.q,i=!0;if(e.namespace&&"destroy"===e.type)for(t=n.length-1;t>=0;t--)switch(n[t].type){case"init":i=!1;case"add":case"remove":n.splice(t,1)}return i&&n.push(e),i},t}(n(217).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(4),a=n(10),l=n(47),c=n(237),u=n(35),d=function(e){function t(n,i){var r=e.call(this)||this;return r.isRTL=!1,r.hitsNeededDepth=0,r.hasAllDayBusinessHours=!1,r.isDatesRendered=!1,n&&(r.view=n),i&&(r.options=i),r.uid=String(t.guid++),r.childrenByUid={},r.nextDayThreshold=o.duration(r.opt("nextDayThreshold")),r.isRTL=r.opt("isRTL"),r.fillRendererClass&&(r.fillRenderer=new r.fillRendererClass(r)),r.eventRendererClass&&(r.eventRenderer=new r.eventRendererClass(r,r.fillRenderer)),r.helperRendererClass&&r.eventRenderer&&(r.helperRenderer=new r.helperRendererClass(r,r.eventRenderer)),r.businessHourRendererClass&&r.fillRenderer&&(r.businessHourRenderer=new r.businessHourRendererClass(r,r.fillRenderer)),r}return i.__extends(t,e),t.prototype.addChild=function(e){return!this.childrenByUid[e.uid]&&(this.childrenByUid[e.uid]=e,!0)},t.prototype.removeChild=function(e){return!!this.childrenByUid[e.uid]&&(delete this.childrenByUid[e.uid],!0)},t.prototype.updateSize=function(e,t,n){this.callChildren("updateSize",arguments)},t.prototype.opt=function(e){return this._getView().opt(e)},t.prototype.publiclyTrigger=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getCalendar();return n.publiclyTrigger.apply(n,e)},t.prototype.hasPublicHandlers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getCalendar();return n.hasPublicHandlers.apply(n,e)},t.prototype.executeDateRender=function(e){this.dateProfile=e,this.renderDates(e),this.isDatesRendered=!0,this.callChildren("executeDateRender",arguments)},t.prototype.executeDateUnrender=function(){this.callChildren("executeDateUnrender",arguments),this.dateProfile=null,this.unrenderDates(),this.isDatesRendered=!1},t.prototype.renderDates=function(e){},t.prototype.unrenderDates=function(){},t.prototype.getNowIndicatorUnit=function(){},t.prototype.renderNowIndicator=function(e){this.callChildren("renderNowIndicator",arguments)},t.prototype.unrenderNowIndicator=function(){this.callChildren("unrenderNowIndicator",arguments)},t.prototype.renderBusinessHours=function(e){this.businessHourRenderer&&this.businessHourRenderer.render(e),this.callChildren("renderBusinessHours",arguments)},t.prototype.unrenderBusinessHours=function(){this.callChildren("unrenderBusinessHours",arguments),this.businessHourRenderer&&this.businessHourRenderer.unrender()},t.prototype.executeEventRender=function(e){this.eventRenderer?(this.eventRenderer.rangeUpdated(),this.eventRenderer.render(e)):this.renderEvents&&this.renderEvents(function(e){var t,n,i,r=[];for(t in e)for(n=e[t].eventInstances,i=0;i<n.length;i++)r.push(n[i].toLegacy());return r}(e)),this.callChildren("executeEventRender",arguments)},t.prototype.executeEventUnrender=function(){this.callChildren("executeEventUnrender",arguments),this.eventRenderer?this.eventRenderer.unrender():this.destroyEvents&&this.destroyEvents()},t.prototype.getBusinessHourSegs=function(){var e=this.getOwnBusinessHourSegs();return this.iterChildren(function(t){e.push.apply(e,t.getBusinessHourSegs())}),e},t.prototype.getOwnBusinessHourSegs=function(){return this.businessHourRenderer?this.businessHourRenderer.getSegs():[]},t.prototype.getEventSegs=function(){var e=this.getOwnEventSegs();return this.iterChildren(function(t){e.push.apply(e,t.getEventSegs())}),e},t.prototype.getOwnEventSegs=function(){return this.eventRenderer?this.eventRenderer.getSegs():[]},t.prototype.triggerAfterEventsRendered=function(){this.triggerAfterEventSegsRendered(this.getEventSegs()),this.publiclyTrigger("eventAfterAllRender",{context:this,args:[this]})},t.prototype.triggerAfterEventSegsRendered=function(e){var t=this;this.hasPublicHandlers("eventAfterRender")&&e.forEach(function(e){var n;e.el&&(n=e.footprint.getEventLegacy(),t.publiclyTrigger("eventAfterRender",{context:n,args:[n,e.el,t]}
1))})},t.prototype.triggerBeforeEventsDestroyed=function(){this.triggerBeforeEventSegsDestroyed(this.getEventSegs())},t.prototype.triggerBeforeEventSegsDestroyed=function(e){var t=this;this.hasPublicHandlers("eventDestroy")&&e.forEach(function(e){var n;e.el&&(n=e.footprint.getEventLegacy(),t.publiclyTrigger("eventDestroy",{context:n,args:[n,e.el,t]}))})},t.prototype.showEventsWithId=function(e){this.getEventSegs().forEach(function(t){t.footprint.eventDef.id===e&&t.el&&t.el.css("visibility","")}),this.callChildren("showEventsWithId",arguments)},t.prototype.hideEventsWithId=function(e){this.getEventSegs().forEach(function(t){t.footprint.eventDef.id===e&&t.el&&t.el.css("visibility","hidden")}),this.callChildren("hideEventsWithId",arguments)},t.prototype.renderDrag=function(e,t,n){var i=!1;return this.iterChildren(function(r){r.renderDrag(e,t,n)&&(i=!0)}),i},t.prototype.unrenderDrag=function(){this.callChildren("unrenderDrag",arguments)},t.prototype.renderEventResize=function(e,t,n){this.callChildren("renderEventResize",arguments)},t.prototype.unrenderEventResize=function(){this.callChildren("unrenderEventResize",arguments)},t.prototype.renderSelectionFootprint=function(e){this.renderHighlight(e),this.callChildren("renderSelectionFootprint",arguments)},t.prototype.unrenderSelection=function(){this.unrenderHighlight(),this.callChildren("unrenderSelection",arguments)},t.prototype.renderHighlight=function(e){this.fillRenderer&&this.fillRenderer.renderFootprint("highlight",e,{getClasses:function(){return["fc-highlight"]}}),this.callChildren("renderHighlight",arguments)},t.prototype.unrenderHighlight=function(){this.fillRenderer&&this.fillRenderer.unrender("highlight"),this.callChildren("unrenderHighlight",arguments)},t.prototype.hitsNeeded=function(){this.hitsNeededDepth++||this.prepareHits(),this.callChildren("hitsNeeded",arguments)},t.prototype.hitsNotNeeded=function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits(),this.callChildren("hitsNotNeeded",arguments)},t.prototype.prepareHits=function(){},t.prototype.releaseHits=function(){},t.prototype.queryHit=function(e,t){var n,i,r=this.childrenByUid;for(n in r)if(i=r[n].queryHit(e,t))break;return i},t.prototype.getSafeHitFootprint=function(e){var t=this.getHitFootprint(e);return this.dateProfile.activeUnzonedRange.containsRange(t.unzonedRange)?t:null},t.prototype.getHitFootprint=function(e){},t.prototype.getHitEl=function(e){},t.prototype.eventRangesToEventFootprints=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventRangeToEventFootprints(e[t]));return n},t.prototype.eventRangeToEventFootprints=function(e){return[u.eventRangeToEventFootprint(e)]},t.prototype.eventFootprintsToSegs=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.eventFootprintToSegs(e[t]));return n},t.prototype.eventFootprintToSegs=function(e){var t,n,i,r=e.componentFootprint.unzonedRange;for(t=this.componentFootprintToSegs(e.componentFootprint),n=0;n<t.length;n++)i=t[n],r.isStart||(i.isStart=!1),r.isEnd||(i.isEnd=!1),i.footprint=e;return t},t.prototype.componentFootprintToSegs=function(e){return[]},t.prototype.callChildren=function(e,t){this.iterChildren(function(n){n[e].apply(n,t)})},t.prototype.iterChildren=function(e){var t,n=this.childrenByUid;for(t in n)e(n[t])},t.prototype._getCalendar=function(){return this.calendar||this.view.calendar},t.prototype._getView=function(){return this.view},t.prototype._getDateProfile=function(){return this._getView().get("dateProfile")},t.prototype.buildGotoAnchorHtml=function(e,t,n){var i,o,l,c;return r.isPlainObject(e)?(i=e.date,o=e.type,l=e.forceOff):i=e,c={date:(i=a.default(i)).format("YYYY-MM-DD"),type:o||"day"},"string"==typeof t&&(n=t,t=null),t=t?" "+s.attrsToStr(t):"",n=n||"",!l&&this.opt("navLinks")?"<a"+t+' data-goto="'+s.htmlEscape(JSON.stringify(c))+'">'+n+"</a>":"<span"+t+">"+n+"</span>"},t.prototype.getAllDayHtml=function(){return this.opt("allDayHtml")||s.htmlEscape(this.opt("allDayText"))},t.prototype.getDayClasses=function(e,t){var n,i=this._getView(),r=[];return this.dateProfile.activeUnzonedRange.containsDate(e)?(r.push("fc-"+s.dayIDs[e.day()]),i.isDateInOtherMonth(e,this.dateProfile)&&r.push("fc-other-month"),n=i.calendar.getNow(),e.isSame(n,"day")?(r.push("fc-today"),!0!==t&&r.push(i.calendar.theme.getClass("today"))):r.push(e<n?"fc-past":"fc-future")):r.push("fc-disabled-day"),r},t.prototype.formatRange=function(e,t,n,i){var r=e.end;return t&&(r=r.clone().subtract(1)),l.formatRange(e.start,r,n,i,this.isRTL)},t.prototype.currentRangeAs=function(e){return this._getDateProfile().currentUnzonedRange.as(e)},t.prototype.computeDayRange=function(e){var t=this._getCalendar(
1),n=t.msToUtcMoment(e.startMs,!0),i=t.msToUtcMoment(e.endMs),r=+i.time(),o=i.clone().stripTime();return r&&r>=this.nextDayThreshold&&o.add(1,"days"),o<=n&&(o=n.clone().add(1,"days")),{start:n,end:o}},t.prototype.isMultiDayRange=function(e){var t=this.computeDayRange(e);return t.end.diff(t.start,"days")>1},t.guid=0,t}(c.default);t.default=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(0),o=n(4),s=n(32),a=n(238),l=n(21),c=n(11),u=n(7),d=n(239),h=n(240),p=n(241),f=n(207),g=n(31),m=n(10),v=n(5),y=n(12),b=n(17),_=n(242),S=n(212),w=n(38),E=n(49),T=n(13),C=n(37),I=n(6),R=n(51),D=function(){function e(e,t){this.loadingLevel=0,this.ignoreUpdateViewSize=0,this.freezeContentHeightDepth=0,l.default.needed(),this.el=e,this.viewsByType={},this.optionsManager=new h.default(this,t),this.viewSpecManager=new p.default(this.optionsManager,this),this.initMomentInternals(),this.initCurrentDate(),this.initEventManager(),this.constraints=new f.default(this.eventManager,this),this.constructed()}return e.prototype.constructed=function(){},e.prototype.getView=function(){return this.view},e.prototype.publiclyTrigger=function(e,t){var n,r,o=this.opt(e);if(i.isPlainObject(t)?(n=t.context,r=t.args):i.isArray(t)&&(r=t),null==n&&(n=this.el[0]),r||(r=[]),this.triggerWith(e,n,r),o)return o.apply(n,r)},e.prototype.hasPublicHandlers=function(e){return this.hasHandlers(e)||this.opt(e)},e.prototype.option=function(e,t){var n;if("string"==typeof e){if(void 0===t)return this.optionsManager.get(e);(n={})[e]=t,this.optionsManager.add(n)}else"object"==typeof e&&this.optionsManager.add(e)},e.prototype.opt=function(e){return this.optionsManager.get(e)},e.prototype.instantiateView=function(e){var t=this.viewSpecManager.getViewSpec(e);if(!t)throw new Error('View type "'+e+'" is not valid');return new t.class(this,t)},e.prototype.isValidViewType=function(e){return Boolean(this.viewSpecManager.getViewSpec(e))},e.prototype.changeView=function(e,t){t&&(t.start&&t.end?this.optionsManager.recordOverrides({visibleRange:t}):this.currentDate=this.moment(t).stripZone()),this.renderView(e)},e.prototype.zoomTo=function(e,t){var n;n=this.viewSpecManager.getViewSpec(t=t||"day")||this.viewSpecManager.getUnitViewSpec(t),this.currentDate=e.clone(),this.renderView(n?n.type:null)},e.prototype.initCurrentDate=function(){var e=this.opt("defaultDate");this.currentDate=null!=e?this.moment(e).stripZone():this.getNow()},e.prototype.prev=function(){var e=this.view,t=e.dateProfileGenerator.buildPrev(e.get("dateProfile"));t.isValid&&(this.currentDate=t.date,this.renderView())},e.prototype.next=function(){var e=this.view,t=e.dateProfileGenerator.buildNext(e.get("dateProfile"));t.isValid&&(this.currentDate=t.date,this.renderView())},e.prototype.prevYear=function(){this.currentDate.add(-1,"years"),this.renderView()},e.prototype.nextYear=function(){this.currentDate.add(1,"years"),this.renderView()},e.prototype.today=function(){this.currentDate=this.getNow(),this.renderView()},e.prototype.gotoDate=function(e){this.currentDate=this.moment(e).stripZone(),this.renderView()},e.prototype.incrementDate=function(e){this.currentDate.add(r.duration(e)),this.renderView()},e.prototype.getDate=function(){return this.applyTimezone(this.currentDate)},e.prototype.pushLoading=function(){this.loadingLevel++||this.publiclyTrigger("loading",[!0,this.view])},e.prototype.popLoading=function(){--this.loadingLevel||this.publiclyTrigger("loading",[!1,this.view])},e.prototype.render=function(){this.contentEl?this.elementVisible()&&(this.calcSize(),this.updateViewSize()):this.initialRender()},e.prototype.initialRender=function(){var e=this,t=this.el;t.addClass("fc"),t.on("click.fc","a[data-goto]",function(t){var n=i(t.currentTarget).data("goto"),r=e.moment(n.date),s=n.type,a=e.view.opt("navLink"+o.capitaliseFirstLetter(s)+"Click");"function"==typeof a?a(r,t):("string"==typeof a&&(s=a),e.zoomTo(r,s))}),this.optionsManager.watch("settingTheme",["?theme","?themeSystem"],function(n){var i=new(R.getThemeSystemClass(n.themeSystem||n.theme))(e.optionsManager),r=i.getClass("widget");e.theme=i,r&&t.addClass(r)},function(){var n=e.theme.getClass("widget");e.theme=null,n&&t.removeClass(n)}),this.optionsManager.watch("settingBusinessHourGenerator",["?businessHours"],function(t){e.businessHourGenerator=new S.default(t.businessHours,e),e.view&&e.view.set("businessHourGenerator",e.businessHourGenerator)},function(){e.businessHourGenerator=null}),this.optionsManager.watch("applyingDirClasses",["?isRTL","?locale"],function(e){t.toggleClass("fc-ltr",!e.isRTL),t.toggleClass("fc-rtl",e.isRTL)}),this.contentEl=i("<div class='fc-view-container'/>").prependTo(t),this.initToolbars(),this.renderHeader(),this.renderFooter(),this.renderView(this.opt("defaultView")),this.opt("handleWindowResize")&&i(window).resize(this.windowResizeProxy=o.debounce(this.windowResize.bind(this),this.opt("windowResizeDelay")))},e.prototype.destroy=function(){this.view&&this.clearView(),this.toolbarsManager.proxyCall("removeElement"),this.contentEl.remove(),this.el.removeClass("fc fc-ltr fc-rtl"),this.optionsManager.unwatch("settingTheme"),this.optionsManager.unwatch("settingBusinessHourGenerator"),this.el.off(".fc"),this.windowResizeProxy&&(i(window).unbind("resize",this.windowResizeProxy),this.windowResizeProxy=null),l.default.unneeded()},e.prototype.elementVisible=function(){return this.el.is(":visible")},e.prototype.bindViewHandlers=function(e){var t=this;e.watch("titleForCalendar",["title"],function(n){e===t.view&&t.setToolbarsTitle(n.title)}),e.watch("dateProfileForCalendar",["dateProfile"],function(n){e===t.view&&(t.currentDate=n.dateProfile.date,t.updateToolbarButtons(n.dateProfile))})},e.prototype.unbindViewHandlers=function(e){e.unwatch("titleForCalendar"),e.unwatch("dateProfileForCalendar")},e.prototype.renderView=function(e){var t,n=this.view;this.freezeContentHeight(),n&&e&&n.type!==e&&this.clearView(),!this.view&&e&&(t=this.view=this.viewsByType[e]||(this.viewsByType[e]=this.instantiateView(e)),this.bindViewHandlers(t),t.startBatchRender(),t.setElement(i("<div class='fc-view fc-"+e+"-view' />").appendTo(this.contentEl)),this.toolbarsManager.proxyCall("activateButton",e)),this.view&&(this.view.get("businessHourGenerator")!==this.businessHourGenerator&&this.view.set("businessHourGenerator",this.businessHourGenerator),this.view.setDate(this.currentDate),t&&t.stopBatchRender()),this.thawContentHeight()},e.prototype.clearView=function(){var e=this.view;this.toolbarsManager.proxyCall("deactivateButton",e.type),this.unbindViewHandlers(e),e.removeElement(),e.unsetDate(),this.view=null},e.prototype.reinitView=function(){var e=this.view,t=e.queryScroll();this.freezeContentHeight(),this.clearView(),this.calcSize(),this.renderView(e.type),this.view.applyScroll(t),this.thawContentHeight()},e.prototype.getSuggestedViewHeight=function(){return null==this.suggestedViewHeight&&this.calcSize(),this.suggestedViewHeight},e.prototype.isHeightAuto=function(){return"auto"===this.opt("contentHeight")||"auto"===this.opt("height")},e.prototype.updateViewSize=function(e){void 0===e&&(e=!1);var t,n=this.view;if(!this.ignoreUpdateViewSize&&n)return e&&(this.calcSize(),t=n.queryScroll()),this.ignoreUpdateViewSize++,n.updateSize(this.getSuggestedViewHeight(),this.isHeightAuto(),e),this.ignoreUpdateViewSize--,e&&n.applyScroll(t),!0},e.prototype.calcSize=function(){this.elementVisible()&&this._calcSize()},e.prototype._calcSize=function(){var e=this.opt("contentHeight"),t=this.opt("height");this.suggestedViewHeight="number"==typeof e?e:"function"==typeof e?e():"number"==typeof t?t-this.queryToolbarsHeight():"function"==typeof t?t()-this.queryToolbarsHeight():"parent"===t?this.el.parent().height()-this.queryToolbarsHeight():Math.round(this.contentEl.width()/Math.max(this.opt("aspectRatio"),.5))},e.prototype.windowResize=function(e){e.target===window&&this.view&&this.view.isDatesRendered&&this.updateViewSize(!0)&&this.publiclyTrigger("windowResize",[this.view])},e.prototype.freezeContentHeight=function(){this.freezeContentHeightDepth++||this.forceFreezeContentHeight()},e.prototype.forceFreezeContentHeight=function(){this.contentEl.css({width:"100%",height:this.contentEl.height(),overflow:"hidden"})},e.prototype.thawContentHeight=function(){this.freezeContentHeightDepth--,this.contentEl.css({width:"",height:"",overflow:""}),this.freezeContentHeightDepth&&this.forceFreezeContentHeight()},e.prototype.initToolbars=function(){this.header=new d.default(this,this.computeHeaderOptions()),this.footer=new d.default(this,this.computeFooterOptions()),this.toolbarsManager=new a.default([this.header,this.footer])}
1,e.prototype.computeHeaderOptions=function(){return{extraClasses:"fc-header-toolbar",layout:this.opt("header")}},e.prototype.computeFooterOptions=function(){return{extraClasses:"fc-footer-toolbar",layout:this.opt("footer")}},e.prototype.renderHeader=function(){var e=this.header;e.setToolbarOptions(this.computeHeaderOptions()),e.render(),e.el&&this.el.prepend(e.el)},e.prototype.renderFooter=function(){var e=this.footer;e.setToolbarOptions(this.computeFooterOptions()),e.render(),e.el&&this.el.append(e.el)},e.prototype.setToolbarsTitle=function(e){this.toolbarsManager.proxyCall("updateTitle",e)},e.prototype.updateToolbarButtons=function(e){var t=this.getNow(),n=this.view,i=n.dateProfileGenerator.build(t),r=n.dateProfileGenerator.buildPrev(n.get("dateProfile")),o=n.dateProfileGenerator.buildNext(n.get("dateProfile"));this.toolbarsManager.proxyCall(i.isValid&&!e.currentUnzonedRange.containsDate(t)?"enableButton":"disableButton","today"),this.toolbarsManager.proxyCall(r.isValid?"enableButton":"disableButton","prev"),this.toolbarsManager.proxyCall(o.isValid?"enableButton":"disableButton","next")},e.prototype.queryToolbarsHeight=function(){return this.toolbarsManager.items.reduce(function(e,t){return e+(t.el?t.el.outerHeight(!0):0)},0)},e.prototype.select=function(e,t){this.view.select(this.buildSelectFootprint.apply(this,arguments))},e.prototype.unselect=function(){this.view&&this.view.unselect()},e.prototype.buildSelectFootprint=function(e,t){var n,i=this.moment(e).stripZone();return n=t?this.moment(t).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),new y.default(new v.default(i,n),!i.hasTime())},e.prototype.initMomentInternals=function(){var e=this;this.defaultAllDayEventDuration=r.duration(this.opt("defaultAllDayEventDuration")),this.defaultTimedEventDuration=r.duration(this.opt("defaultTimedEventDuration")),this.optionsManager.watch("buildingMomentLocale",["?locale","?monthNames","?monthNamesShort","?dayNames","?dayNamesShort","?firstDay","?weekNumberCalculation"],function(t){var n,i=t.
1weekNumberCalculation,r=t.firstDay;"iso"===i&&(i="ISO");var o=Object.create(g.getMomentLocaleData(t.locale));t.monthNames&&(o._months=t.monthNames),t.monthNamesShort&&(o._monthsShort=t.monthNamesShort),t.dayNames&&(o._weekdays=t.dayNames),t.dayNamesShort&&(o._weekdaysShort=t.dayNamesShort),null==r&&"ISO"===i&&(r=1),null!=r&&((n=Object.create(o._week)).dow=r,o._week=n),"ISO"!==i&&"local"!==i&&"function"!=typeof i||(o._fullCalendar_weekCalc=i),e.localeData=o,e.currentDate&&e.localizeMoment(e.currentDate)})},e.prototype.moment=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return"local"===this.opt("timezone")?(e=m.default.apply(null,t)).hasTime()&&e.local():e="UTC"===this.opt("timezone")?m.default.utc.apply(null,t):m.default.parseZone.apply(null,t),this.localizeMoment(e),e},e.prototype.msToMoment=function(e,t){var n=m.default.utc(e);return t?n.stripTime():n=this.applyTimezone(n),this.localizeMoment(n),n},e.prototype.msToUtcMoment=function(e,t){var n=m.default.utc(e);return t&&n.stripTime(),this.localizeMoment(n),n},e.prototype.localizeMoment=function(e){e._locale=this.localeData},e.prototype.getIsAmbigTimezone=function(){return"local"!==this.opt("timezone")&&"UTC"!==this.opt("timezone")},e.prototype.applyTimezone=function(e){if(!e.hasTime())return e.clone();var t,n=this.moment(e.toArray()),i=e.time().asMilliseconds()-n.time().asMilliseconds();return i&&(t=n.clone().add(i),e.time().asMilliseconds()-t.time().asMilliseconds()==0&&(n=t)),n},e.prototype.footprintToDateProfile=function(e,t){void 0===t&&(t=!1);var n,i=m.default.utc(e.unzonedRange.startMs);return t||(n=m.default.utc(e.unzonedRange.endMs)),e.isAllDay?(i.stripTime(),n&&n.stripTime()):(i=this.applyTimezone(i),n&&(n=this.applyTimezone(n))),new b.default(i,n,this)},e.prototype.getNow=function(){var e=this.opt("now");return"function"==typeof e&&(e=e()),this.moment(e).stripZone()},e.prototype.humanizeDuration=function(e){return e.locale(this.opt("locale")).humanize()},e.prototype.parseUnzonedRange=function(e){var t=null,n=null;return e.start&&(t=this.moment(e.start).stripZone()),e.end&&(n=this.moment(e.end).stripZone()),t||n?t&&n&&n.isBefore(t)?null:new v.default(t,n):null},e.prototype.initEventManager=function(){var e=this,t=new _.default(this),n=this.opt("eventSources")||[],i=this.opt("events");this.eventManager=t,i&&n.unshift(i),t.on("release",function(t){e.trigger("eventsReset",t)}),t.freeze(),n.forEach(function(n){var i=w.default.parse(n,e);i&&t.addSource(i)}),t.thaw()},e.prototype.requestEvents=function(e,t){return this.eventManager.requestEvents(e,t,this.opt("timezone"),!this.opt("lazyFetching"))},e.prototype.getEventEnd=function(e){return e.end?e.end.clone():this.getDefaultEventEnd(e.allDay,e.start)},e.prototype.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(this.defaultAllDayEventDuration):n.add(this.defaultTimedEventDuration),this.getIsAmbigTimezone()&&n.stripZone(),n},e.prototype.rerenderEvents=function(){this.view.flash("displayingEvents")},e.prototype.refetchEvents=function(){this.eventManager.refetchAllSources()},e.prototype.renderEvents=function(e,t){this.eventManager.freeze();for(var n=0;n<e.length;n++)this.renderEvent(e[n],t);this.eventManager.thaw()},e.prototype.renderEvent=function(e,t){void 0===t&&(t=!1);var n=this.eventManager,i=E.default.parse(e,e.source||n.stickySource);i&&n.addEventDef(i,t)},e.prototype.removeEvents=function(e){var t,n=this.eventManager,i=[],r={};if(null==e)n.removeAllEventDefs();else{for(n.getEventInstances().forEach(function(e){i.push(e.toLegacy())}),i=A(i,e),t=0;t<i.length;t++)r[this.eventManager.getEventDefByUid(i[t]._id).id]=!0;for(t in n.freeze(),r)n.removeEventDefsById(t);n.thaw()}},e.prototype.clientEvents=function(e){var t=[];return this.eventManager.getEventInstances().forEach(function(e){t.push(e.toLegacy())}),A(t,e)},e.prototype.updateEvents=function(e){this.eventManager.freeze();for(var t=0;t<e.length;t++)this.updateEvent(e[t]);this.eventManager.thaw()},e.prototype.updateEvent=function(e){var t,n,i=this.eventManager.getEventDefByUid(e._id);i instanceof T.default&&(t=i.buildInstance(),n=C.default.createFromRawProps(t,e,null),this.eventManager.mutateEventsWithId(i.id,n))},e.prototype.getEventSources=function(){return this.eventManager.otherSources.slice()},e.prototype.getEventSourceById=function(e){return this.eventManager.getSourceById(I.default.normalizeId(e))},e.prototype.addEventSource=function(e){var t=w.default.parse(e,this);t&&this.eventManager.addSource(t)},e.prototype.removeEventSources=function(e){var t,n,i=this.eventManager;if(null==e)this.eventManager.removeAllSources();else{for(t=i.multiQuerySources(e),i.freeze(),n=0;n<t.length;n++)i.removeSource(t[n]);i.thaw()}},e.prototype.removeEventSource=function(e){var t,n=this.eventManager,i=n.querySources(e);for(n.freeze(),t=0;t<i.length;t++)n.removeSource(i[t]);n.thaw()},e.prototype.refetchEventSources=function(e){var t,n=this.eventManager,i=n.multiQuerySources(e);for(n.freeze(),t=0;t<i.length;t++)n.refetchSource(i[t]);n.thaw()},e.defaults=s.globalDefaults,e.englishDefaults=s.englishDefaults,e.rtlDefaults=s.rtlDefaults,e}();function A(e,t){return null==t?e:i.isFunction(t)?e.filter(t):(t+="",e.filter(function(e){return e.id==t||e._id===t}))}t.default=D,c.default.mixInto(D),u.default.mixInto(D)}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(5),s=function(){function e(e){this._view=e}return e.prototype.opt=function(e){return this._view.opt(e)},e.prototype.trimHiddenDays=function(e){return this._view.trimHiddenDays(e)},e.prototype.msToUtcMoment=function(e,t){return this._view.calendar.msToUtcMoment(e,t)},e.prototype.buildPrev=function(e){var t=e.date.clone().startOf(e.currentRangeUnit).subtract(e.dateIncrement);return this.build(t,-1)},e.prototype.buildNext=function(e){var t=e.date.clone().startOf(e.currentRangeUnit).add(e.dateIncrement);return this.build(t,1)},e.prototype.build=function(e,t,n){void 0===n&&(n=!1);var r,o,s,a,l,c,u,d,h=!e.hasTime();return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=this.msToUtcMoment(r.constrainDate(e),h)),a=this.buildCurrentRangeInfo(e,t),l=/^(year|month|week|day)$/.test(a.unit),c=this.buildRenderRange(this.trimHiddenDays(a.unzonedRange),a.unit,l),u=(c=this.trimHiddenDays(c)).clone(),this.opt("showNonCurrentDates")||(u=u.intersect(a.unzonedRange)),o=i.duration(this.opt("minTime")),s=i.duration(this.opt("maxTime")),(u=(u=this.adjustActiveRange(u,o,s)).intersect(r))&&(e=this.msToUtcMoment(u.constrainDate(e),h)),d=a.unzonedRange.intersectsWith(r),{validUnzonedRange:r,currentUnzonedRange:a.unzonedRange,currentRangeUnit:a.unit,isRangeAllDay:l,activeUnzonedRange:u,renderUnzonedRange:c,minTime:o,maxTime:s,isValid:d,date:e,dateIncrement:this.buildDateIncrement(a.duration)}},e.prototype.buildValidRange=function(){return this._view.getUnzonedRangeOption("validRange",this._view.calendar.getNow())||new o.default},e.prototype.buildCurrentRangeInfo=function(e,t){var n,i=this._view.viewSpec,o=null,s=null,a=null;return i.duration?a=this.buildRangeFromDuration(e,t,o=i.duration,s=i.durationUnit):(n=this.opt("dayCount"))?(s="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?s=r.computeGreatestUnit(a.getStart(),a.getEnd()):(o=this.getFallbackDuration(),s=r.computeGreatestUnit(o),a=this.buildRangeFromDuration(e,t,o,s)),{duration:o,unit:s,unzonedRange:a}},e.prototype.getFallbackDuration=function(){return i.duration({days:1})},e.prototype.adjustActiveRange=function(e,t,n){var i=e.getStart(),r=e.getEnd();return this._view.usesMinMaxTime&&(t<0&&i.time(0).add(t),n>864e5&&r.time(n-864e5)),new o.default(i,r)},e.prototype.buildRangeFromDuration=function(e,t,n,s){var a,l,c,u,d,h=this.opt("dateAlignment");function p(){c=e.clone().startOf(h),u=c.clone().add(n),d=new o.default(c,u)}return h||((a=this.opt("dateIncrement"))?(l=i.duration(a),h=l<n?r.computeDurationGreatestUnit(l,a):s):h=s),n.as("days")<=1&&this._view.isHiddenDay(c)&&(c=this._view.skipHiddenDays(c,t)).startOf("day"),p(),this.trimHiddenDays(d)||(e=this._view.skipHiddenDays(e,t),p()),d},e.prototype.buildRangeFromDayCount=function(e,t,n){var i,r=this.opt("dateAlignment"),s=0,a=e.clone();r&&a.startOf(r),a.startOf("day"),i=(a=this._view.skipHiddenDays(a,t)).clone();do{i.add(1,"day"),this._view.isHiddenDay(i)||s++}while(s<n);return new o.default(a,i)},e.prototype.buildCustomVisibleRange=function(e){var t=this._view.getUnzonedRangeOption("visibleRange",this._view.calendar.applyTimezone(e));return!t||null!=t.startMs&&null!=t.endMs?t:null},e.prototype.buildRenderRange=function(e,t,n){return e.clone()},e.prototype.buildDateIncrement=function(e){var t,n=this.opt("dateIncrement");return n?i.duration(n):(t=this.opt("dateAlignment"))?i.duration(1,t):e||i.duration({days:1})},e}();t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(16),a=n(4),l=n(10),c=n(7),u=n(23),d=n(13),h=n(18),p=n(6),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return i.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.bindToDocument=function(){this.listenTo(r(document),{dragstart:this.handleDragStart,sortstart:this.handleDragStart})},t.prototype.unbindFromDocument=function(){this.stopListeningTo(r(document))},t.prototype.handleDragStart=function(e,t){var n,i;
1this.opt("droppable")&&(n=r((t?t.item:null)||e.target),i=this.opt("dropAccept"),(r.isFunction(i)?i.call(n[0],n):n.is(i))&&(this.isDragging||this.listenToExternalDrag(n,e,t)))},t.prototype.listenToExternalDrag=function(e,t,n){var i,l=this,c=this.component,d=this.view,p=function(e){var t,n,i,a,l=s.dataAttrPrefix;return l&&(l+="-"),(t=e.data(l+"event")||null)&&(null==(n=(t="object"==typeof t?r.extend({},t):{}).start)&&(n=t.time),i=t.duration,a=t.stick,delete t.start,delete t.time,delete t.duration,delete t.stick),null==n&&(n=e.data(l+"start")),null==n&&(n=e.data(l+"time")),null==i&&(i=e.data(l+"duration")),null==a&&(a=e.data(l+"stick")),{eventProps:t,startTime:n=null!=n?o.duration(n):null,duration:i=null!=i?o.duration(i):null,stick:a=Boolean(a)}}(e);(this.dragListener=new u.default(c,{interactionStart:function(){l.isDragging=!0},hitOver:function(e){var t,n=!0,r=e.component.getSafeHitFootprint(e);r&&(i=l.computeExternalDrop(r,p))?(t=new h.default(i.buildInstances()),n=p.eventProps?c.isEventInstanceGroupAllowed(t):c.isExternalInstanceGroupAllowed(t)):n=!1,n||(i=null,a.disableCursor()),i&&c.renderDrag(c.eventRangesToEventFootprints(t.sliceRenderRanges(c.dateProfile.renderUnzonedRange,d.calendar)))},hitOut:function(){i=null},hitDone:function(){a.enableCursor(),c.unrenderDrag()},interactionEnd:function(t){i&&d.reportExternalDrop(i,Boolean(p.eventProps),Boolean(p.stick),e,t,n),l.isDragging=!1,l.dragListener=null}})).startDrag(t)},t.prototype.computeExternalDrop=function(e,t){var n,i=this.view.calendar,o=l.default.utc(e.unzonedRange.startMs).stripZone();return e.isAllDay&&(t.startTime?o.time(t.startTime):o.stripTime()),t.duration&&(n=o.clone().add(t.duration)),o=i.applyTimezone(o),n&&(n=i.applyTimezone(n)),d.default.parse(r.extend({},t.eventProps,{start:o,end:n}),new p.default(i))},t}(n(15).default);t.default=f,c.default.mixInto(f),s.dataAttrPrefix=""},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(37),a=n(50),l=n(23),c=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isResizing=!1,i.eventPointing=n,i}return i.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"mousedown",this.handleMouseDown.bind(this)),t.bindSegHandlerToEl(e,"touchstart",this.handleTouchStart.bind(this))},t.prototype.handleMouseDown=function(e,t){this.component.canStartResize(e,t)&&this.buildDragListener(e,r(t.target).is(".fc-start-resizer")).startInteraction(t,{distance:5})},t.prototype.handleTouchStart=function(e,t){this.component.canStartResize(e,t)&&this.buildDragListener(e,r(t.target).is(".fc-start-resizer")).startInteraction(t)},t.prototype.buildDragListener=function(e,t){var n,i,r=this,s=this.component,a=this.view,c=a.calendar,u=c.eventManager,d=e.el,h=e.footprint.eventDef,p=e.footprint.eventInstance;return this.dragListener=new l.default(s,{scroll:this.opt("dragScroll"),subjectEl:d,interactionStart:function(){n=!1},dragStart:function(t){n=!0,r.eventPointing.handleMouseout(e,t),r.segResizeStart(e,t)},hitOver:function(n,l,d){var p,f=!0,g=s.getSafeHitFootprint(d),m=s.getSafeHitFootprint(n);g&&m&&(i=t?r.computeEventStartResizeMutation(g,m,e.footprint):r.computeEventEndResizeMutation(g,m,e.footprint))?(p=u.buildMutatedEventInstanceGroup(h.id,i),f=s.isEventInstanceGroupAllowed(p)):f=!1,f?i.isEmpty()&&(i=null):(i=null,o.disableCursor()),i&&(a.hideEventsWithId(e.footprint.eventDef.id),a.renderEventResize(s.eventRangesToEventFootprints(p.sliceRenderRanges(s.dateProfile.renderUnzonedRange,c)),e))},hitOut:function(){i=null},hitDone:function(){a.unrenderEventResize(e),a.showEventsWithId(e.footprint.eventDef.id),o.enableCursor()},interactionEnd:function(t){n&&r.segResizeStop(e,t),i&&a.reportEventResize(p,i,d,t),r.dragListener=null}})},t.prototype.segResizeStart=function(e,t){this.isResizing=!0,this.component.publiclyTrigger("eventResizeStart",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.segResizeStop=function(e,t){this.isResizing=!1,this.component.publiclyTrigger("eventResizeStop",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.computeEventStartResizeMutation=function(e,t,n){var i,r,o=n.componentFootprint.unzonedRange,l=this.component.diffDates(t.unzonedRange.getStart(),e.unzonedRange.getStart());return o.getStart().add(l)<o.getEnd()&&((i=new a.default).setStartDelta(l),(r=new s.default).setDateMutation(i),r)},t.prototype.computeEventEndResizeMutation=function(e,t,n){var i,r,o=n.componentFootprint.unzonedRange,l=this.component.diffDates(t.unzonedRange.getEnd(),e.unzonedRange.getEnd());return o.getEnd().add(l)>o.getStart()&&((i=new a.default).setEndDelta(l),(r=new s.default).setDateMutation(i),r)},t}(n(15).default);t.default=c}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(37),s=n(50),a=n(54),l=n(23),c=n(244),u=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isDragging=!1,i.eventPointing=n,i}return i.__extends(t,e),t.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},t.prototype.getSelectionDelay=function(){var e=this.opt("eventLongPressDelay");return null==e&&(e=this.opt("longPressDelay")),e},t.prototype.bindToEl=function(e){var t=this.component;t.bindSegHandlerToEl(e,"mousedown",this.handleMousedown.bind(this)),t.bindSegHandlerToEl(e,"touchstart",this.handleTouchStart.bind(this))},t.prototype.handleMousedown=function(e,t){!this.component.shouldIgnoreMouse()&&this.component.canStartDrag(e,t)&&this.buildDragListener(e).startInteraction(t,{distance:5})},t.prototype.handleTouchStart=function(e,t){var n=this.component,i={delay:this.view.isEventDefSelected(e.footprint.eventDef)?0:this.getSelectionDelay()};n.canStartDrag(e,t)?this.buildDragListener(e).startInteraction(t,i):n.canStartSelection(e,t)&&this.buildSelectListener(e).startInteraction(t,i)},t.prototype.buildSelectListener=function(e){var t=this,n=this.view,i=e.footprint.eventDef,r=e.footprint.eventInstance;if(this.dragListener)return this.dragListener;var o=this.dragListener=new a.default({dragStart:function(e){o.isTouch&&!n.isEventDefSelected(i)&&r&&n.selectEventInstance(r)},interactionEnd:function(e){t.dragListener=null}});return o},t.prototype.buildDragListener=function(e){var t,n,i,o=this,s=this.component,a=this.view,u=a.calendar,d=u.eventManager,h=e.el,p=e.footprint.eventDef,f=e.footprint.eventInstance;if(this.dragListener)return this.dragListener;var g=this.dragListener=new l.default(a,{scroll:this.opt("dragScroll"),subjectEl:h,subjectCenter:!0,interactionStart:function(i){e.component=s,t=!1,(n=new c.default(e.el,{additionalClass:"fc-dragging",parentEl:a.el,opacity:g.isTouch?null:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2})).hide(),n.start(i)},dragStart:function(n){g.isTouch&&!a.isEventDefSelected(p)&&f&&a.selectEventInstance(f),t=!0,o.eventPointing.handleMouseout(e,n),o.segDragStart(e,n),a.hideEventsWithId(e.footprint.eventDef.id)},hitOver:function(t,l,c){var h,f,m,v=!0;e.hit&&(c=e.hit),h=c.component.getSafeHitFootprint(c),f=t.component.getSafeHitFootprint(t),h&&f&&(i=o.computeEventDropMutation(h,f,p))?(m=d.buildMutatedEventInstanceGroup(p.id,i),v=s.isEventInstanceGroupAllowed(m)):v=!1,v||(i=null,r.disableCursor()),i&&a.renderDrag(s.eventRangesToEventFootprints(m.sliceRenderRanges(s.dateProfile.renderUnzonedRange,u)),e,g.isTouch)?n.hide():n.show(),l&&(i=null)},hitOut:function(){a.unrenderDrag(e),n.show(),i=null},hitDone:function(){r.enableCursor()},interactionEnd:function(r){delete e.component,n.stop(!i,function(){t&&(a.unrenderDrag(e),o.segDragStop(e,r)),a.showEventsWithId(e.footprint.eventDef.id),i&&a.reportEventDrop(f,i,h,r)}),o.dragListener=null}});return g},t.prototype.segDragStart=function(e,t){this.isDragging=!0,this.component.publiclyTrigger("eventDragStart",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.segDragStop=function(e,t){this.isDragging=!1,this.component.publiclyTrigger("eventDragStop",{context:e.el[0],args:[e.footprint.getEventLegacy(),t,{},this.view]})},t.prototype.computeEventDropMutation=function(e,t,n){var i=new o.default;return i.setDateMutation(this.computeEventDateMutation(e,t)),i},t.prototype.computeEventDateMutation=function(e,t){var n,i,r=e.unzonedRange.getStart(),o=t.unzonedRange.getStart(),a=!1,l=!1,c=!1;return e.isAllDay!==t.isAllDay&&(a=!0,t.isAllDay?(c=!0,r.stripTime()):l=!0),n=this.component.diffDates(o,r),(i=new s.default).clearEnd=a,i.forceTimed=l,i.forceAllDay=c,i.setDateDelta(n),i},t}(n(15).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(23),s=n(12),a=n(5),l=function(e){function t(t){var n=e.call(this,t)||this;return n.dragListener=n.buildDragListener(),n}return i.__extends(t,e),t.prototype.end=function(){this.dragListener.endInteraction()},t.prototype.getDelay=function(){var e=this.opt("selectLongPressDelay");return null==e&&(e=this.opt("longPressDelay")),e},t.prototype.bindToEl=function(e){var t=this,n=this.component,i=this.dragListener;n.bindDateHandlerToEl(e,"mousedown",function(e){t.opt("selectable")&&!n.shouldIgnoreMouse()&&i.startInteraction(e,{distance:t.opt("selectMinDistance")})}),n.bindDateHandlerToEl(e,"touchstart",function(e){t.opt("selectable")&&!n.shouldIgnoreTouch()&&i.startInteraction(e,{delay:t.getDelay()})}),r.preventSelection(e)},t.prototype.buildDragListener=function(){var e,t=this,n=this.component;return new o.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){e=null},dragStart:function(e){t.view.unselect(e)},hitOver:function(i,o,s){var a,l;s&&(a=n.getSafeHitFootprint(s),l=n.getSafeHitFootprint(i),(e=a&&l?t.computeSelection(a,l):null)?n.renderSelectionFootprint(e):!1===e&&r.disableCursor(
1))},hitOut:function(){e=null,n.unrenderSelection()},hitDone:function(){r.enableCursor()},interactionEnd:function(n,i){!i&&e&&t.view.reportSelection(e,n)}})},t.prototype.computeSelection=function(e,t){var n=this.computeSelectionFootprint(e,t);return!(n&&!this.isSelectionFootprintAllowed(n))&&n},t.prototype.computeSelectionFootprint=function(e,t){var n=[e.unzonedRange.startMs,e.unzonedRange.endMs,t.unzonedRange.startMs,t.unzonedRange.endMs];return n.sort(r.compareNumbers),new s.default(new a.default(n[0],n[3]),e.isAllDay)},t.prototype.isSelectionFootprintAllowed=function(e){return this.component.dateProfile.validUnzonedRange.containsRange(e.unzonedRange)&&this.view.calendar.constraints.isSelectionFootprintAllowed(e)},t}(n(15).default);t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i,r,o=n(2),s=n(0),a=n(3),l=n(4),c=n(39),u=n(41),d=n(227),h=n(61),p=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.usesMinMaxTime=!0,i.timeGrid=i.instantiateTimeGrid(),i.addChild(i.timeGrid),i.opt("allDaySlot")&&(i.dayGrid=i.instantiateDayGrid(),i.addChild(i.dayGrid)),i.scroller=new c.default({overflowX:"hidden",overflowY:"auto"}),i}return o.__extends(t,e),t.prototype.instantiateTimeGrid=function(){var e=new this.timeGridClass(this);return l.copyOwnProps(i,e),e},t.prototype.instantiateDayGrid=function(){var e=new this.dayGridClass(this);return l.copyOwnProps(r,e),e},t.prototype.renderSkeleton=function(){var e,t;this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.scroller.render(),e=this.scroller.el.addClass("fc-time-grid-container"),t=a('<div class="fc-time-grid" />').appendTo(e),this.el.find(".fc-body > tr > td").append(e),this.timeGrid.headContainerEl=this.el.find(".fc-head-container"),this.timeGrid.setElement(t),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight())},t.prototype.unrenderSkeleton=function(){this.timeGrid.removeElement(),this.dayGrid&&this.dayGrid.removeElement(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'<table class="'+e.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+e.getClass("widgetHeader")+'"/>':"")+"</td></tr></tbody></table>"},t.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},t.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},t.prototype.updateSize=function(t,n,i){var r,o,s;if(e.prototype.updateSize.call(this,t,n,i),this.axisWidth=l.matchCellWidths(this.el.find(".fc-axis")),this.timeGrid.colEls){var a=this.el.find(".fc-row:not(.fc-scroller *)");this.timeGrid.bottomRuleEl.hide(),this.scroller.clear(),l.uncompensateScroll(a),this.dayGrid&&(this.dayGrid.removeSegPopover(),(r=this.opt("eventLimit"))&&"number"!=typeof r&&(r=5),r&&this.dayGrid.limitRows(r)),n||(o=this.computeScrollerHeight(t),this.scroller.setHeight(o),((s=this.scroller.getScrollbarWidths()).left||s.right)&&(l.compensateScroll(a,s),o=this.computeScrollerHeight(t),this.scroller.setHeight(o)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()<o&&this.timeGrid.bottomRuleEl.show())}else n||(o=this.computeScrollerHeight(t),this.scroller.setHeight(o))},t.prototype.computeScrollerHeight=function(e){return e-l.subtractInnerElHeight(this.el,this.scroller.el)},t.prototype.computeInitialDateScroll=function(){var e=s.duration(this.opt("scrollTime")),t=this.timeGrid.computeTimeTop(e);return(t=Math.ceil(t))&&t++,{top:t}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t.prototype.getHitFootprint=function(e){return e.component.getHitFootprint(e)},t.prototype.getHitEl=function(e){return e.component.getHitEl(e)},t.prototype.executeEventRender=function(e){var t,n,i={},r={};for(t in e)(n=e[t]).getEventDef().isAllDay()?i[t]=n:r[t]=n;this.timeGrid.executeEventRender(r),this.dayGrid&&this.dayGrid.executeEventRender(i)},t.prototype.renderDrag=function(e,t,n){var i=f(e),r=!1;return r=this.timeGrid.renderDrag(i.timed,t,n),this.dayGrid&&(r=this.dayGrid.renderDrag(i.allDay,t,n)||r),r},t.prototype.renderEventResize=function(e,t,n){var i=f(e);this.timeGrid.renderEventResize(i.timed,t,n),this.dayGrid&&this.dayGrid.renderEventResize(i.allDay,t,n)},t.prototype.renderSelectionFootprint=function(e){e.isAllDay?this.dayGrid&&this.dayGrid.renderSelectionFootprint(e):this.timeGrid.renderSelectionFootprint(e)},t}(u.default);function f(e){var t,n=[],i=[];for(t=0;t<e.length;t++)e[t].componentFootprint.isAllDay?n.push(e[t]):i.push(e[t]);return{allDay:n,timed:i}}t.default=p,p.prototype.timeGridClass=d.default,p.prototype.dayGridClass=h.default,i={renderHeadIntroHtml:function(){var e,t=this.view,n=t.calendar,i=n.msToUtcMoment(this.dateProfile.renderUnzonedRange.startMs,!0);return this.opt("weekNumbers")?(e=i.format(this.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+n.theme.getClass("widgetHeader")+'" '+t.axisStyleAttr()+">"+t.buildGotoAnchorHtml({date:i,type:"week",forceOff:this.colCnt>1},l.htmlEscape(e))+"</th>"):'<th class="fc-axis '+n.theme.getClass("widgetHeader")+'" '+t.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var e=this.view;return'<td class="fc-axis '+e.calendar.theme.getClass("widgetContent")+'" '+e.axisStyleAttr()+"></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},r={renderBgIntroHtml:function(){var e=this.view;return'<td class="fc-axis '+e.calendar.theme.getClass("widgetContent")+'" '+e.axisStyleAttr()+"><span>"+e.getAllDayHtml()+"</span></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}}}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(4),a=n(40),l=n(56),c=n(60),u=n(55),d=n(53),h=n(5),p=n(12),f=n(246),g=n(247),m=n(248),v=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],y=function(e){function t(t){var n=e.call(this,t)||this;return n.processOptions(),n}return i.__extends(t,e),t.prototype.componentFootprintToSegs=function(e){var t,n=this.sliceRangeByTimes(e.unzonedRange);for(t=0;t<n.length;t++)n[t].col=this.isRTL?this.daysPerRow-1-n[t].dayIndex:n[t].dayIndex;return n},t.prototype.sliceRangeByTimes=function(e){var t,n,i=[];for(n=0;n<this.daysPerRow;n++)(t=e.intersect(this.dayRanges[n]))&&i.push({startMs:t.startMs,endMs:t.endMs,isStart:t.isStart,isEnd:t.isEnd,dayIndex:n});return i},t.prototype.processOptions=function(){var e,t=this.opt("slotDuration"),n=this.opt("snapDuration");t=o.duration(t),n=n?o.duration(n):t,this.slotDuration=t,this.snapDuration=n,this.snapsPerSlot=t/n,e=this.opt("slotLabelFormat"),r.isArray(e)&&(e=e[e.length-1]),this.labelFormat=e||this.opt("smallTimeFormat"),e=this.opt("slotLabelInterval"),this.labelInterval=e?o.duration(e):this.computeLabelInterval(t)},t.prototype.computeLabelInterval=function(e){var t,n,i;for(t=v.length-1;t>=0;t--)if(n=o.duration(v[t]),i=s.divideDurationByDuration(n,e),s.isInt(i)&&i>1)return n;return o.duration(e)},t.prototype.renderDates=function(e){this.dateProfile=e,this.updateDayTable(),this.renderSlats(),this.renderColumns()},t.prototype.unrenderDates=function(){this.unrenderColumns()},t.prototype.renderSkeleton=function(){this.el.html('<div class="fc-bg"></div><div class="fc-slats"></div><hr class="fc-divider '+this.view.calendar.theme.getClass("widgetHeader")+'" style="display:none" />'),this.bottomRuleEl=this.el.find("hr")},t.prototype.renderSlats=function(){var e=this.view.calendar.theme;this.slatContainerEl=this.el.find("> .fc-slats").html('<table class="'+e.getClass("tableGrid")+'">'+this.renderSlatRowHtml()+"</table>"),this.slatEls=this.slatContainerEl.find("tr"),this.slatCoordCache=new d.default({els:this.slatEls,isVertical:!0})},t.prototype.renderSlatRowHtml=function(){for(var e,t,n,i=this.view,r=i.calendar,a=r.theme,l=this.isRTL,c=this.dateProfile,u="",d=o.duration(+c.minTime),h=o.duration(0);d<c.maxTime;)e=r.msToUtcMoment(c.renderUnzonedRange.startMs).time(d),t=s.isInt(s.divideDurationByDuration(h,this.labelInterval)),n='<td class="fc-axis fc-time '+a.getClass("widgetContent")+'" '+i.axisStyleAttr()+">"+(t?"<span>"+s.htmlEscape(e.format(this.labelFormat))+"</span>":"")+"</td>",u+='<tr data-time="'+e.format("HH:mm:ss")+'"'+(t?"":' class="fc-minor"')+">"+(l?"":n)+'<td class="'+a.getClass("widgetContent")+'"/>'+(l?n:"")+"</tr>",d.add(this.slotDuration),h.add(this.slotDuration);return u},t.prototype.renderColumns=function(){var e=this.dateProfile,t=this.view.calendar.theme;this.dayRanges=this.dayDates.map(function(t){return new h.default(t.clone().add(e.minTime),t.clone().add(e.maxTime))}),this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),this.el.find("> .fc-bg").html('<table class="'+t.getClass("tableGrid")+'">'+this.renderBgTrHtml(0)+"</table>"),this.colEls=this.el.find(".fc-day, .fc-disabled-day"),this.colCoordCache=new d.default({els:this.colEls,isHorizontal:!0}),this.renderContentSkeleton()},t.prototype.unrenderColumns=function(){this.unrenderContentSkeleton()},t.prototype.renderContentSkeleton=function(){var e,t,n="";for(e=0;e<this.colCnt;e++)n+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';t=this.contentSkeletonEl=r('<div class="fc-content-skeleton"><table><tr>'+n+"</tr></table></div>"),this.colContainerEls=t.find(".fc-content-col"),this.helperContainerEls=t.find(".fc-helper-container"),this.fgContainerEls=t.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=t.find(".fc-bgevent-container"),this.highlightContainerEls=t.find(".fc-highlight-container"),this.businessContainerEls=t.find(".fc-business-container"),this.bookendCells(t.find("tr")),this.el.append(t)},t.prototype.unrenderContentSkeleton=function(){this.contentSkeletonEl&&(this.contentSkeletonEl.remove(),this.contentSkeletonEl=null,this.colContainerEls=null,this.helperContainerEls=null,this.fgContainerEls=null,this.bgContainerEls=null,this.highlightContainerEls=null,this.businessContainerEls=null)},t.prototype.groupSegsByCol=function(e){var t,n=[];for(t=0;t<this.colCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].col].push(e[t]);return n},t.prototype.attachSegsByCol=function(e,t){var n,i,r;for(n=0;n<this.colCnt;n++)for(i=e[n],r=0;r<i.length;r++)t.eq(n).append(i[r].el)},t.prototype.getNowIndicatorUnit=function(){return"minute"},t.prototype.renderNowIndicator=function(e){if(this.colContainerEls){var t,n=this.componentFootprintToSegs(new p.default(new h.default(e,e.valueOf()+1),!1)),i=this.computeDateTop(e,e),o=[];for(t=0;t<n.length;
1t++)o.push(r('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",i).appendTo(this.colContainerEls.eq(n[t].col))[0]);n.length>0&&o.push(r('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",i).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=r(o)}},t.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},t.prototype.updateSize=function(t,n,i){e.prototype.updateSize.call(this,t,n,i),this.slatCoordCache.build(),i&&this.updateSegVerticals([].concat(this.eventRenderer.getSegs(),this.businessSegs||[]))},t.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.outerHeight()},t.prototype.computeDateTop=function(e,t){return this.computeTimeTop(o.duration(e-t.clone().stripTime()))},t.prototype.computeTimeTop=function(e){var t,n,i=this.slatEls.length,r=(e-this.dateProfile.minTime)/this.slotDuration;return r=Math.max(0,r),r=Math.min(i,r),t=Math.floor(r),n=r-(t=Math.min(t,i-1)),this.slatCoordCache.getTopPosition(t)+this.slatCoordCache.getHeight(t)*n},t.prototype.updateSegVerticals=function(e){this.computeSegVerticals(e),this.assignSegVerticals(e)},t.prototype.computeSegVerticals=function(e){var t,n,i,r=this.opt("agendaEventMinHeight");for(t=0;t<e.length;t++)(n=e[t]).top=this.computeDateTop(n.startMs,i=this.dayDates[n.dayIndex]),n.bottom=Math.max(n.top+r,this.computeDateTop(n.endMs,i))},t.prototype.assignSegVerticals=function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).el.css(this.generateSegVerticalCss(n))},t.prototype.generateSegVerticalCss=function(e){return{top:e.top,bottom:-e.bottom}},t.prototype.prepareHits=function(){this.colCoordCache.build(),this.slatCoordCache.build()},t.prototype.releaseHits=function(){this.colCoordCache.clear()},t.prototype.queryHit=function(e,t){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(e)&&r.isTopInBounds(t)){var o=i.getHorizontalIndex(e),s=r.getVerticalIndex(t);if(null!=o&&null!=s){var a=r.getTopOffset(s),l=r.getHeight(s),c=Math.floor((t-a)/l*n),u=a+c/n*l,d=a+(c+1)/n*l;return{col:o,snap:s*n+c,component:this,left:i.getLeftOffset(o),right:i.getRightOffset(o),top:u,bottom:d}}}},t.prototype.getHitFootprint=function(e){var t,n=this.getCellDate(0,e.col),i=this.computeSnapTime(e.snap);return n.time(i),t=n.clone().add(this.snapDuration),new p.default(new h.default(n,t),!1)},t.prototype.computeSnapTime=function(e){return o.duration(this.dateProfile.minTime+this.snapDuration*e)},t.prototype.getHitEl=function(e){return this.colEls.eq(e.col)},t.prototype.renderDrag=function(e,t,n){var i;if(t){if(e.length)return this.helperRenderer.renderEventDraggingFootprints(e,t,n),!0}else for(i=0;i<e.length;i++)this.renderHighlight(e[i].componentFootprint)},t.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},t.prototype.renderEventResize=function(e,t,n){this.helperRenderer.renderEventResizingFootprints(e,t,n)},t.prototype.unrenderEventResize=function(){this.helperRenderer.unrender()},t.prototype.renderSelectionFootprint=function(e){this.opt("selectHelper")?this.helperRenderer.renderComponentFootprint(e):this.renderHighlight(e)},t.prototype.unrenderSelection=function(){this.helperRenderer.unrender(),this.unrenderHighlight()},t}(a.default);t.default=y,y.prototype.eventRendererClass=f.default,y.prototype.businessHourRendererClass=l.default,y.prototype.helperRendererClass=g.default,y.prototype.fillRendererClass=m.default,c.default.mixInto(y),u.default.mixInto(y)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(5),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildRenderRange=function(t,n,i){var o=e.prototype.buildRenderRange.call(this,t,n,i),s=this.msToUtcMoment(o.startMs,i),a=this.msToUtcMoment(o.endMs,i);return/^(year|month)$/.test(n)&&(s.startOf("week"),a.weekday()&&a.add(1,"week").startOf("week")),new r.default(s,a)},t}(n(221).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(0),o=n(4),s=n(62),a=n(253),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.setGridHeight=function(e,t){t&&(e*=this.dayGrid.rowCnt/6),o.distributeHeight(this.dayGrid.rowEls,e,!t)},t.prototype.isDateInOtherMonth=function(e,t){return e.month()!==r.utc(t.currentUnzonedRange.startMs).month()},t}(s.default);t.default=l,l.prototype.dateProfileGeneratorClass=a.default}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(5),a=n(41),l=n(39),c=n(254),u=n(255),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.segSelector=".fc-list-item",i.scroller=new l.default({overflowX:"hidden",overflowY:"auto"}),i}return i.__extends(t,e),t.prototype.renderSkeleton=function(){this.el.addClass("fc-list-view "+this.calendar.theme.getClass("listView")),this.scroller.render(),this.scroller.el.appendTo(this.el),this.contentEl=this.scroller.scrollEl},t.prototype.unrenderSkeleton=function(){this.scroller.destroy()},t.prototype.updateSize=function(t,n,i){e.prototype.updateSize.call(this,t,n,i),this.scroller.clear(),n||this.scroller.setHeight(this.computeScrollerHeight(t))},t.prototype.computeScrollerHeight=function(e){return e-o.subtractInnerElHeight(this.el,this.scroller.el)},t.prototype.renderDates=function(e){for(var t=this.calendar,n=t.msToUtcMoment(e.renderUnzonedRange.startMs,!0),i=t.msToUtcMoment(e.renderUnzonedRange.endMs,!0),r=[],o=[];n<i;)r.push(n.clone()),o.push(new s.default(n,n.clone().add(1,"day"))),n.add(1,"day");this.dayDates=r,this.dayRanges=o},t.prototype.componentFootprintToSegs=function(e){var t,n,i,r=this.dayRanges,o=[];for(t=0;t<r.length;t++)if((n=e.unzonedRange.intersect(r[t]))&&(o.push(i={startMs:n.startMs,endMs:n.endMs,isStart:n.isStart,isEnd:n.isEnd,dayIndex:t}),!i.isEnd&&!e.isAllDay&&t+1<r.length&&e.unzonedRange.endMs<r[t+1].startMs+this.nextDayThreshold)){i.endMs=e.unzonedRange.endMs,i.isEnd=!0;break}return o},t.prototype.renderEmptyMessage=function(){this.contentEl.html('<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+o.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>")},t.prototype.renderSegList=function(e){var t,n,i,o=this.groupSegsByDay(e),s=r('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody/></table>'),a=s.find("tbody");for(t=0;t<o.length;t++)if(n=o[t])for(a.append(this.dayHeaderHtml(this.dayDates[t])),this.eventRenderer.sortEventSegs(n),i=0;i<n.length;i++)a.append(n[i].el);this.contentEl.empty().append(s)},t.prototype.groupSegsByDay=function(e){var t,n,i=[];for(t=0;t<e.length;t++)(i[(n=e[t]).dayIndex]||(i[n.dayIndex]=[])).push(n);return i},t.prototype.dayHeaderHtml=function(e){var t=this.opt("listDayFormat"),n=this.opt("listDayAltFormat");return'<tr class="fc-list-heading" data-date="'+e.format("YYYY-MM-DD")+'"><td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(t?this.buildGotoAnchorHtml(e,{class:"fc-list-heading-main"},o.htmlEscape(e.format(t))):"")+(n?this.buildGotoAnchorHtml(e,{class:"fc-list-heading-alt"},o.htmlEscape(e.format(n))):"")+"</td></tr>"},t}(a.default);t.default=d,d.prototype.eventRendererClass=c.default,d.prototype.eventPointingClass=u.default},,,,,,function(e,t,n){var i=n(3),r=n(16),o=n(4),s=n(220);n(10),n(47),n(256),n(257),n(260),n(261),n(262),n(263),i.fullCalendar=r,i.fn.fullCalendar=function(e){var t=Array.prototype.slice.call(arguments,1),n=this;return this.each(function(r,a){var l,c=i(a),u=c.data("fullCalendar");"string"==typeof e?"getCalendar"===e?r||(n=u):"destroy"===e?u&&(u.destroy(),c.removeData("fullCalendar")):u?i.isFunction(u[e])?(l=u[e].apply(u,t),r||(n=l),"destroy"===e&&c.removeData("fullCalendar")):o.warn("'"+e+"' is an unknown FullCalendar method."):o.warn("Attempting to call a FullCalendar method on an element with no calendar."):u||(u=new s.default(c,e),c.data("fullCalendar",u),u.render())}),n},e.exports=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.setElement=function(e){this.el=e,this.bindGlobalHandlers(),this.renderSkeleton(),this.set("isInDom",!0)},t.prototype.removeElement=function(){this.unset("isInDom"),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},t.prototype.bindGlobalHandlers=function(){},t.prototype.unbindGlobalHandlers=function(){},t.prototype.renderSkeleton=function(){},t.prototype.unrenderSkeleton=function(){},t}(n(48).default);t.default=r}
1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.items=e||[]}return e.prototype.proxyCall=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=[];return this.items.forEach(function(n){i.push(n[e].apply(n,t))}),i},e}();t.default=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=function(){function e(e,t){this.el=null,this.viewsWithButtons=[],this.calendar=e,this.toolbarOptions=t}return e.prototype.setToolbarOptions=function(e){this.toolbarOptions=e},e.prototype.render=function(){var e=this.el;this.toolbarOptions.layout?(e?e.empty():e=this.el=i("<div class='fc-toolbar "+this.toolbarOptions.extraClasses+"'/>"),e.append(this.renderSection("left")).append(this.renderSection("right")).append(this.renderSection("center")).append('<div class="fc-clear"/>')):this.removeElement()},e.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},e.prototype.renderSection=function(e){var t=this,n=this.calendar,o=n.theme,s=n.optionsManager,a=n.viewSpecManager,l=i('<div class="fc-'+e+'"/>'),c=this.toolbarOptions.layout[e],u=s.get("customButtons")||{},d=s.overrides.buttonText||{},h=s.get("buttonText")||{};return c&&i.each(c.split(" "),function(e,s){var c,p=i(),f=!0;i.each(s.split(","),function(e,s){var l,c,g,m,v,y,b,_,S;"title"===s?(p=p.add(i("<h2>&nbsp;</h2>")),f=!1):((l=u[s])?(g=function(e){l.click&&l.click.call(_[0],e)},(m=o.getCustomButtonIconClass(l))||(m=o.getIconClass(s))||(v=l.text)):(c=a.getViewSpec(s))?(t.viewsWithButtons.push(s),g=function(){n.changeView(s)},(v=c.buttonTextOverride)||(m=o.getIconClass(s))||(v=c.buttonTextDefault)):n[s]&&(g=function(){n[s]()},(v=d[s])||(m=o.getIconClass(s))||(v=h[s])),g&&(b=["fc-"+s+"-button",o.getClass("button"),o.getClass("stateDefault")],v?(y=r.htmlEscape(v),S=""):m&&(y="<span class='"+m+"'></span>",S=' aria-label="'+s+'"'),_=i('<button type="button" class="'+b.join(" ")+'"'+S+">"+y+"</button>").click(function(e){_.hasClass(o.getClass("stateDisabled"))||(g(e),(_.hasClass(o.getClass("stateActive"))||_.hasClass(o.getClass("stateDisabled")))&&_.removeClass(o.getClass("stateHover")))}).mousedown(function(){_.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateDown"))}).mouseup(function(){_.removeClass(o.getClass("stateDown"))}).hover(function(){_.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateHover"))},function(){_.removeClass(o.getClass("stateHover")).removeClass(o.getClass("stateDown"))}),p=p.add(_)))}),f&&p.first().addClass(o.getClass("cornerLeft")).end().last().addClass(o.getClass("cornerRight")).end(),p.length>1?(c=i("<div/>"),f&&c.addClass(o.getClass("buttonGroup")),c.append(p),l.append(c)):l.append(p)}),l},e.prototype.updateTitle=function(e){this.el&&this.el.find("h2").text(e)},e.prototype.activateButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").addClass(this.calendar.theme.getClass("stateActive"))},e.prototype.deactivateButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").removeClass(this.calendar.theme.getClass("stateActive"))},e.prototype.disableButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").prop("disabled",!0).addClass(this.calendar.theme.getClass("stateDisabled"))},e.prototype.enableButton=function(e){this.el&&this.el.find(".fc-"+e+"-button").prop("disabled",!1).removeClass(this.calendar.theme.getClass("stateDisabled"))},e.prototype.getViewsWithButtons=function(){return this.viewsWithButtons},e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(32),a=n(31),l=function(e){function t(t,n){var i=e.call(this)||this;return i._calendar=t,i.overrides=r.extend({},n),i.dynamicOverrides={},i.compute(),i}return i.__extends(t,e),t.prototype.add=function(e){var t,n=0;for(t in this.recordOverrides(e),e)n++;if(1===n){if("height"===t||"contentHeight"===t||"aspectRatio"===t)return void this._calendar.updateViewSize(!0);if("defaultDate"===t)return;if("businessHours"===t)return;if(/^(event|select)(Overlap|Constraint|Allow)$/.test(t))return;if("timezone"===t)return void this._calendar.view.flash("initialEvents")}this._calendar.renderHeader(),this._calendar.renderFooter(),this._calendar.viewsByType={},this._calendar.reinitView()},t.prototype.compute=function(){var e,t,n,i,r;e=o.firstDefined(this.dynamicOverrides.locale,this.overrides.locale),(t=a.localeOptionHash[e])||(t=a.localeOptionHash[e=s.globalDefaults.locale]||{}),n=o.firstDefined(this.dynamicOverrides.isRTL,this.overrides.isRTL,t.isRTL,s.globalDefaults.isRTL),this.dirDefaults=i=n?s.rtlDefaults:{},this.localeDefaults=t,r=s.mergeOptions([s.globalDefaults,i,t,this.overrides,this.dynamicOverrides]),a.populateInstanceComputableOptions(r),this.reset(r)},t.prototype.recordOverrides=function(e){var t;for(t in e)this.dynamicOverrides[t]=e[t];this._calendar.viewSpecManager.clearCache(),this.compute()},t}(n(48).default);t.default=l}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(22),s=n(4),a=n(32),l=n(31),c=function(){function e(e,t){this.optionsManager=e,this._calendar=t,this.clearCache()}return e.prototype.clearCache=function(){this.viewSpecCache={}},e.prototype.getViewSpec=function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},e.prototype.getUnitViewSpec=function(e){var t,n,i;if(-1!==r.inArray(e,s.unitsDesc))for(t=this._calendar.header.getViewsWithButtons(),r.each(o.viewHash,function(e){t.push(e)}),n=0;n<t.length;n++)if((i=this.getViewSpec(t[n]))&&i.singleUnit===e)return i},e.prototype.buildViewSpec=function(e){for(var t,n,r,l,c,u=this.optionsManager.overrides.views||{},d=[],h=[],p=[],f=e;f;)t=o.viewHash[f],n=u[f],f=null,"function"==typeof t&&(t={class:t}),t&&(d.unshift(t),h.unshift(t.defaults||{}),r=r||t.duration,f=f||t.type),n&&(p.unshift(n),r=r||n.duration,f=f||n.type);return(t=s.mergeProps(d)).type=e,!!t.class&&((r=r||this.optionsManager.dynamicOverrides.duration||this.optionsManager.overrides.duration)&&(l=i.duration(r)).valueOf()&&(c=s.computeDurationGreatestUnit(l,r),t.duration=l,t.durationUnit=c,1===l.as(c)&&(t.singleUnit=c,p.unshift(u[c]||{}))),t.defaults=a.mergeOptions(h),t.overrides=a.mergeOptions(p),this.buildViewSpecOptions(t),this.buildViewSpecButtonText(t,e),t)},e.prototype.buildViewSpecOptions=function(e){var t=this.optionsManager;e.options=a.mergeOptions([a.globalDefaults,e.defaults,t.dirDefaults,t.localeDefaults,t.overrides,e.overrides,t.dynamicOverrides]),l.populateInstanceComputableOptions(e.options)},e.prototype.buildViewSpecButtonText=function(e,t){var n=this.optionsManager;function i(n){var i=n.buttonText||{};return i[t]||(e.buttonTextKey?i[e.buttonTextKey]:null)||(e.singleUnit?i[e.singleUnit]:null)}e.buttonTextOverride=i(n.dynamicOverrides)||i(n.overrides)||e.overrides.buttonText,e.buttonTextDefault=i(n.localeDefaults)||i(n.dirDefaults)||e.defaults.buttonText||i(a.globalDefaults)||(e.duration?this._calendar.humanizeDuration(e.duration):null)||t},e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n(243),s=n(52),a=n(6),l=n(38),c=n(13),u=n(18),d=n(11),h=n(7),p=function(){function e(e){this.calendar=e,this.stickySource=new s.default(e),this.otherSources=[]}return e.prototype.requestEvents=function(e,t,n,i){return!i&&this.currentPeriod&&this.currentPeriod.isWithinRange(e,t)&&n===this.currentPeriod.timezone||this.setPeriod(new o.default(e,t,n)),this.currentPeriod.whenReleased()},e.prototype.addSource=function(e){this.otherSources.push(e),this.currentPeriod&&this.currentPeriod.requestSource(e)},e.prototype.removeSource=function(e){r.removeExact(this.otherSources,e),this.currentPeriod&&this.currentPeriod.purgeSource(e)},e.prototype.removeAllSources=function(){this.otherSources=[],this.currentPeriod&&this.currentPeriod.purgeAllSources()},e.prototype.refetchSource=function(e){var t=this.currentPeriod;t&&(t.freeze(),t.purgeSource(e),t.requestSource(e),t.thaw())},e.prototype.refetchAllSources=function(){var e=this.currentPeriod;e&&(e.freeze(),e.purgeAllSources(),e.requestSources(this.getSources()),e.thaw())},e.prototype.getSources=function(){return[this.stickySource].concat(this.otherSources)},e.prototype.multiQuerySources=function(e){e?i.isArray(e)||(e=[e]):e=[];var t,n=[];for(t=0;t<e.length;t++)n.push.apply(n,this.querySources(e[t]));return n},e.prototype.querySources=function(e){var t,n,r=this.otherSources;for(t=0;t<r.length;t++)if((n=r[t])===e)return[n];return(n=this.getSourceById(a.default.normalizeId(e)))?[n]:(e=l.default.parse(e,this.calendar))?i.grep(r,function(t){return n=t,e.getPrimitive()===n.getPrimitive();var n}):void 0},e.prototype.getSourceById=function(e){return i.grep(this.otherSources,function(t){return t.id&&t.id===e})[0]},e.prototype.setPeriod=function(e){this.currentPeriod&&(this.unbindPeriod(this.currentPeriod),this.currentPeriod=null),this.currentPeriod=e,this.bindPeriod(e),e.requestSources(this.getSources())},e.prototype.bindPeriod=function(e){this.listenTo(e,"release",function(e){this.trigger("release",e)})},e.prototype.unbindPeriod=function(e){this.stopListeningTo(e)},e.prototype.getEventDefByUid=function(e){if(this.currentPeriod)return this.currentPeriod.getEventDefByUid(e)},e.prototype.addEventDef=function(e,t){t&&this.stickySource.addEventDef(e),this.currentPeriod&&this.currentPeriod.addEventDef(e)}
1,e.prototype.removeEventDefsById=function(e){this.getSources().forEach(function(t){t.removeEventDefsById(e)}),this.currentPeriod&&this.currentPeriod.removeEventDefsById(e)},e.prototype.removeAllEventDefs=function(){this.getSources().forEach(function(e){e.removeAllEventDefs()}),this.currentPeriod&&this.currentPeriod.removeAllEventDefs()},e.prototype.mutateEventsWithId=function(e,t){var n,i=this.currentPeriod,r=[];return i?(i.freeze(),(n=i.getEventDefsById(e)).forEach(function(e){i.removeEventDef(e),r.push(t.mutateSingle(e)),i.addEventDef(e)}),i.thaw(),function(){i.freeze();for(var e=0;e<n.length;e++)i.removeEventDef(n[e]),r[e](),i.addEventDef(n[e]);i.thaw()}):function(){}},e.prototype.buildMutatedEventInstanceGroup=function(e,t){var n,i,r=this.getEventDefsById(e),o=[];for(n=0;n<r.length;n++)(i=r[n].clone())instanceof c.default&&(t.mutateSingle(i),o.push.apply(o,i.buildInstances()));return new u.default(o)},e.prototype.freeze=function(){this.currentPeriod&&this.currentPeriod.freeze()},e.prototype.thaw=function(){this.currentPeriod&&this.currentPeriod.thaw()},e.prototype.getEventDefsById=function(e){return this.currentPeriod.getEventDefsById(e)},e.prototype.getEventInstances=function(){return this.currentPeriod.getEventInstances()},e.prototype.getEventInstancesWithId=function(e){return this.currentPeriod.getEventInstancesWithId(e)},e.prototype.getEventInstancesWithoutId=function(e){return this.currentPeriod.getEventInstancesWithoutId(e)},e}();t.default=p,d.default.mixInto(p),h.default.mixInto(p)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n(20),s=n(11),a=n(5),l=n(18),c=function(){function e(e,t,n){this.pendingCnt=0,this.freezeDepth=0,this.stuntedReleaseCnt=0,this.releaseCnt=0,this.start=e,this.end=t,this.timezone=n,this.unzonedRange=new a.default(e.clone().stripZone(),t.clone().stripZone()),this.requestsByUid={},this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={}}return e.prototype.isWithinRange=function(e,t){return!e.isBefore(this.start)&&!t.isAfter(this.end)},e.prototype.requestSources=function(e){this.freeze();for(var t=0;t<e.length;t++)this.requestSource(e[t]);this.thaw()},e.prototype.requestSource=function(e){var t=this,n={source:e,status:"pending",eventDefs:null};this.requestsByUid[e.uid]=n,this.pendingCnt+=1,e.fetch(this.start,this.end,this.timezone).then(function(e){"cancelled"!==n.status&&(n.status="completed",n.eventDefs=e,t.addEventDefs(e),t.pendingCnt--,t.tryRelease())},function(){"cancelled"!==n.status&&(n.status="failed",t.pendingCnt--,t.tryRelease())})},e.prototype.purgeSource=function(e){var t=this.requestsByUid[e.uid];t&&(delete this.requestsByUid[e.uid],"pending"===t.status?(t.status="cancelled",this.pendingCnt--,this.tryRelease()):"completed"===t.status&&t.eventDefs.forEach(this.removeEventDef.bind(this)))},e.prototype.purgeAllSources=function(){var e,t,n=this.requestsByUid,i=0;for(e in n)"pending"===(t=n[e]).status?t.status="cancelled":"completed"===t.status&&i++;this.requestsByUid={},this.pendingCnt=0,i&&this.removeAllEventDefs()},e.prototype.getEventDefByUid=function(e){return this.eventDefsByUid[e]},e.prototype.getEventDefsById=function(e){var t=this.eventDefsById[e];return t?t.slice():[]},e.prototype.addEventDefs=function(e){for(var t=0;t<e.length;t++)this.addEventDef(e[t])},e.prototype.addEventDef=function(e){var t,n=this.eventDefsById,i=e.id,r=n[i]||(n[i]=[]),o=e.buildInstances(this.unzonedRange);for(r.push(e),this.eventDefsByUid[e.uid]=e,t=0;t<o.length;t++)this.addEventInstance(o[t],i)},e.prototype.removeEventDefsById=function(e){var t=this;this.getEventDefsById(e).forEach(function(e){t.removeEventDef(e)})},e.prototype.removeAllEventDefs=function(){var e=i.isEmptyObject(this.eventDefsByUid);this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={},e||this.tryRelease()},e.prototype.removeEventDef=function(e){var t=this.eventDefsById,n=t[e.id];delete this.eventDefsByUid[e.uid],n&&(r.removeExact(n,e),n.length||delete t[e.id],this.removeEventInstancesForDef(e))},e.prototype.getEventInstances=function(){var e,t=this.eventInstanceGroupsById,n=[];for(e in t)n.push.apply(n,t[e].eventInstances);return n},e.prototype.getEventInstancesWithId=function(e){var t=this.eventInstanceGroupsById[e];return t?t.eventInstances.slice():[]},e.prototype.getEventInstancesWithoutId=function(e){var t,n=this.eventInstanceGroupsById,i=[];for(t in n)t!==e&&i.push.apply(i,n[t].eventInstances);return i},e.prototype.addEventInstance=function(e,t){var n=this.eventInstanceGroupsById;(n[t]||(n[t]=new l.default)).eventInstances.push(e),this.tryRelease()},e.prototype.removeEventInstancesForDef=function(e){var t,n=this.eventInstanceGroupsById,i=n[e.id];i&&(t=r.removeMatching(i.eventInstances,function(t){return t.def===e}),i.eventInstances.length||delete n[e.id],t&&this.tryRelease())},e.prototype.tryRelease=function(){this.pendingCnt||(this.freezeDepth?this.stuntedReleaseCnt++:this.release()
1)},e.prototype.release=function(){this.releaseCnt++,this.trigger("release",this.eventInstanceGroupsById)},e.prototype.whenReleased=function(){var e=this;return this.releaseCnt?o.default.resolve(this.eventInstanceGroupsById):o.default.construct(function(t){e.one("release",t)})},e.prototype.freeze=function(){this.freezeDepth++||(this.stuntedReleaseCnt=0)},e.prototype.thaw=function(){--this.freezeDepth||!this.stuntedReleaseCnt||this.pendingCnt||this.release()},e}();t.default=c,s.default.mixInto(c)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n(7),s=function(){function e(e,t){this.isFollowing=!1,this.isHidden=!1,this.isAnimating=!1,this.options=t=t||{},this.sourceEl=e,this.parentEl=t.parentEl?i(t.parentEl):e.parent()}return e.prototype.start=function(e){this.isFollowing||(this.isFollowing=!0,this.y0=r.getEvY(e),this.x0=r.getEvX(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),r.getEvIsTouch(e)?this.listenTo(i(document),"touchmove",this.handleMove):this.listenTo(i(document),"mousemove",this.handleMove))},e.prototype.stop=function(e,t){var n=this,r=this.options.revertDuration,o=function(){n.isAnimating=!1,n.removeElement(),n.top0=n.left0=null,t&&t()};this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(i(document)),e&&r&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:r,complete:o})):o())},e.prototype.getEl=function(){var e=this.el;return e||((e=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex})).addClass("fc-unselectable"),e.appendTo(this.parentEl)),e},e.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},e.prototype.updatePosition=function(){var e,t;this.getEl(),null==this.top0&&(e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},e.prototype.handleMove=function(e){this.topDelta=r.getEvY(e)-this.y0,this.leftDelta=r.getEvX(e)-this.x0,this.isHidden||this.updatePosition()},e.prototype.hide=function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},e.prototype.show=function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())},e}();t.default=s,o.default.mixInto(s)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(23),o=function(e){function t(t){var n=e.call(this,t)||this;return n.dragListener=n.buildDragListener(),n}return i.__extends(t,e),t.prototype.end=function(){this.dragListener.endInteraction()},t.prototype.bindToEl=function(e){var t=this.component,n=this.dragListener;t.bindDateHandlerToEl(e,"mousedown",function(e){t.shouldIgnoreMouse()||n.startInteraction(e)}),t.bindDateHandlerToEl(e,"touchstart",function(e){t.shouldIgnoreTouch()||n.startInteraction(e)})},t.prototype.buildDragListener=function(){var e,t=this,n=this.component,i=new r.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){e=i.origHit},hitOver:function(t,n,i){n||(e=null)},hitOut:function(){e=null},interactionEnd:function(i,r){var o;!r&&e&&(o=n.getSafeHitFootprint(e))&&t.view.triggerDayClick(o,n.getHitEl(e),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},t}(n(15).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.timeGrid=t,i}return i.__extends(t,e),t.prototype.renderFgSegs=function(e){this.renderFgSegsIntoContainers(e,this.timeGrid.fgContainerEls)},t.prototype.renderFgSegsIntoContainers=function(e,t){var n,i;for(n=this.timeGrid.groupSegsByCol(e),i=0;i<this.timeGrid.colCnt;i++)this.updateFgSegCoords(n[i]);this.timeGrid.attachSegsByCol(n,t)},t.prototype.unrenderFgSegs=function(){this.fgSegs&&this.fgSegs.forEach(function(e){e.el.remove()})},t.prototype.computeEventTimeFormat=function(){return this.opt("noMeridiemTimeFormat")},t.prototype.computeDisplayEventEnd=function(){return!0},t.prototype.fgSegHtml=function(e,t){var n,i,o,s=this.view,a=s.calendar,l=e.footprint.componentFootprint,c=l.isAllDay,u=e.footprint.eventDef,d=s.isEventDefDraggable(u),h=!t&&e.isStart&&s.isEventDefResizableFromStart(u),p=!t&&e.isEnd&&s.isEventDefResizableFromEnd(u),f=this.getSegClasses(e,d,h||p),g=r.cssToStr(this.getSkinCss(u));if(f.unshift("fc-time-grid-event","fc-v-event"),s.isMultiDayRange(l.unzonedRange)){if(e.isStart||e.isEnd){var m=a.msToMoment(e.startMs),v=a.msToMoment(e.endMs);n=this._getTimeText(m,v,c),i=this._getTimeText(m,v,c,"LT"),o=this._getTimeText(m,v,c,null,!1)}}else n=this.getTimeText(e.footprint),i=this.getTimeText(e.footprint,"LT"),o=this.getTimeText(e.footprint,null,!1);return'<a class="'+f.join(" ")+'"'+(u.url?' href="'+r.htmlEscape(u.url)+'"':"")+(g?' style="'+g+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+r.htmlEscape(o)+'" data-full="'+r.htmlEscape(i)+'"><span>'+r.htmlEscape(n)+"</span></div>":"")+(u.title?'<div class="fc-title">'+r.htmlEscape(u.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(p?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},t.prototype.updateFgSegCoords=function(e){this.timeGrid.computeSegVerticals(e),this.computeFgSegHorizontals(e),this.timeGrid.assignSegVerticals(e),this.assignFgSegHorizontals(e)},t.prototype.computeFgSegHorizontals=function(e){var t,n,i;if(this.sortEventSegs(e),function(e){var t,n,i,r,o;for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for((r=n[i]).forwardSegs=[],o=t+1;o<e.length;o++)a(r,e[o],r.forwardSegs)}(t=function(e){var t,n,i,r=[];for(t=0;t<e.length;t++){for(n=e[t],i=0;i<r.length&&a(n,r[i]).length;i++);n.level=i,(r[i]||(r[i]=[])).push(n)}return r}(e)),n=t[0]){for(i=0;i<n.length;i++)s(n[i]);for(i=0;i<n.length;i++)this.computeFgSegForwardBack(n[i],0,0)}},t.prototype.computeFgSegForwardBack=function(e,t,n){var i,r=e.forwardSegs;if(void 0===e.forwardCoord)for(r.length?(this.sortForwardSegs(r),this.computeFgSegForwardBack(r[0],t+1,n),e.forwardCoord=r[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<r.length;i++)this.computeFgSegForwardBack(r[i],0,e.forwardCoord)},t.prototype.sortForwardSegs=function(e){e.sort(r.proxy(this,"compareForwardSegs"))},t.prototype.compareForwardSegs=function(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||this.compareEventSegs(e,t)},t.prototype.assignFgSegHorizontals=function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).el.css(this.generateFgSegHorizontalCss(n)),n.bottom-n.top<30&&n.el.addClass("fc-short")},t.prototype.generateFgSegHorizontalCss=function(e){var t,n,i=this.opt("slotEventOverlap"),r=e.backwardCoord,o=e.forwardCoord,s=this.timeGrid.generateSegVerticalCss(e),a=this.timeGrid.isRTL;return i&&(o=Math.min(1,r+2*(o-r))),a?(t=1-o,n=r):(t=r,n=1-o),s.zIndex=e.level+1,s.left=100*t+"%",s.right=100*n+"%",i&&e.forwardPressure&&(s[a?"marginLeft":"marginRight"]=20),s},t}(n(42).default);function s(e){var t,n,i=e.forwardSegs,r=0;if(void 0===e.forwardPressure){for(t=0;t<i.length;
1t++)s(n=i[t]),r=Math.max(r,1+n.forwardPressure);e.forwardPressure=r}}function a(e,t,n){void 0===n&&(n=[]);for(var i=0;i<t.length;i++)(r=e).bottom>(o=t[i]).top&&r.top<o.bottom&&n.push(t[i]);var r,o;return n}t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderSegs=function(e,t){var n,i,o,s=[];for(this.eventRenderer.renderFgSegsIntoContainers(e,this.component.helperContainerEls),n=0;n<e.length;n++)i=e[n],t&&t.col===i.col&&i.el.css({left:(o=t.el).css("left"),right:o.css("right"),"margin-left":o.css("margin-left"),"margin-right":o.css("margin-right")}),s.push(i.el[0]);return r(s)},t}(n(58).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.attachSegEls=function(e,t){var n,i=this.component;return"bgEvent"===e?n=i.bgContainerEls:"businessHours"===e?n=i.businessContainerEls:"highlight"===e&&(n=i.highlightContainerEls),i.updateSegVerticals(t),i.attachSegsByCol(i.groupSegsByCol(t),n),t.map(function(e){return e.el[0]})},t}(n(57).default);t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),r=n(4),o=n(7),s=function(){function e(e){this.isHidden=!0,this.margin=10,this.options=e||{}}return e.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},e.prototype.hide=function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},e.prototype.render=function(){var e=this,t=this.options;this.el=i('<div class="fc-popover"/>').addClass(t.className||"").css({top:0,left:0}).append(t.content).appendTo(t.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),t.autoHide&&this.listenTo(i(document),"mousedown",this.documentMousedown)},e.prototype.documentMousedown=function(e){this.el&&!i(e.target).closest(this.el).length&&this.hide()},e.prototype.removeElement=function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(i(document),"mousedown")},e.prototype.position=function(){var e,t,n,o,s,a=this.options,l=this.el.offsetParent().offset(),c=this.el.outerWidth(),u=this.el.outerHeight(),d=i(window),h=r.getScrollParent(this.el);o=a.top||0,s=void 0!==a.left?a.left:void 0!==a.right?a.right-c:0,h.is(window)||h.is(document)?(h=d,e=0,t=0):(e=(n=h.offset()).top,t=n.left),e+=d.scrollTop(),t+=d.scrollLeft(),!1!==a.viewportConstrain&&(o=Math.min(o,e+h.outerHeight()-u-this.margin),o=Math.max(o,e+this.margin),s=Math.min(s,t+h.outerWidth()-c-this.margin),s=Math.max(s,t+this.margin)),this.el.css({top:o-l.top,left:s-l.left})},e.prototype.trigger=function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))},e}();t.default=s,o.default.mixInto(s)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.dayGrid=t,i}return i.__extends(t,e),t.prototype.renderBgRanges=function(t){t=r.grep(t,function(e){return e.eventDef.isAllDay()}),e.prototype.renderBgRanges.call(this,t)},t.prototype.renderFgSegs=function(e){var t=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.each(function(e,n){r(n).find(".fc-content-skeleton > table").append(t[e].tbodyEl)})},t.prototype.unrenderFgSegs=function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},t.prototype.renderSegRows=function(e){var t,n,i=[];for(t=this.groupSegRows(e),n=0;n<t.length;n++)i.push(this.renderSegRow(n,t[n]));return i},t.prototype.renderSegRow=function(e,t){var n,i,o,s,a,l,c,u=this.dayGrid.colCnt,d=this.buildSegLevels(t),h=Math.max(1,d.length),p=r("<tbody/>"),f=[],g=[],m=[];function v(e){for(;o<e;)(c=(m[n-1]||[])[o])?c.attr("rowspan",parseInt(c.attr("rowspan")||1,10)+1):(c=r("<td/>"),s.append(c)),g[n][o]=c,m[n][o]=c,o++}for(n=0;n<h;n++){if(i=d[n],o=0,s=r("<tr/>"),f.push([]),g.push([]),m.push([]),i)for(a=0;a<i.length;a++){for(v((l=i[a]).leftCol),c=r('<td class="fc-event-container"/>').append(l.el),l.leftCol!==l.rightCol?c.attr("colspan",l.rightCol-l.leftCol+1):m[n][o]=c;o<=l.rightCol;)g[n][o]=c,f[n][o]=l,o++;s.append(c)}v(u),this.dayGrid.bookendCells(s),p.append(s)}return{row:e,tbodyEl:p,cellMatrix:g,segMatrix:f,segLevels:d,segs:t}},t.prototype.buildSegLevels=function(e){var t,n,i,r=[];for(this.sortEventSegs(e),t=0;t<e.length;t++){for(n=e[t],i=0;i<r.length&&a(n,r[i]);i++);n.level=i,(r[i]||(r[i]=[])).push(n)}for(i=0;i<r.length;i++)r[i].sort(l);return r},t.prototype.groupSegRows=function(e){var t,n=[];for(t=0;t<this.dayGrid.rowCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].row].push(e[t]);return n},t.prototype.computeEventTimeFormat=function(){return this.opt("extraSmallTimeFormat")},t.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},t.prototype.fgSegHtml=function(e,t){var n,i,r=this.view,s=e.footprint.eventDef,a=e.footprint.componentFootprint.isAllDay,l=r.isEventDefDraggable(s),c=!t&&a&&e.isStart&&r.isEventDefResizableFromStart(s),u=!t&&a&&e.isEnd&&r.isEventDefResizableFromEnd(s),d=this.getSegClasses(e,l,c||u),h=o.cssToStr(this.getSkinCss(s)),p="";return d.unshift("fc-day-grid-event","fc-h-event"),e.isStart&&(n=this.getTimeText(e.footprint))&&(p='<span class="fc-time">'+o.htmlEscape(n)+"</span>"),i='<span class="fc-title">'+(o.htmlEscape(s.title||"")||"&nbsp;")+"</span>",'<a class="'+d.join(" ")+'"'+(s.url?' href="'+o.htmlEscape(s.url)+'"':"")+(h?' style="'+h+'"':"")+'><div class="fc-content">'+(this.dayGrid.isRTL?i+" "+p:p+" "+i)+"</div>"+(c?'<div class="fc-resizer fc-start-resizer" />':"")+(u?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},t}(n(42).default);function a(e,t){var n,i;for(n=0;n<t.length;n++)if((i=t[n]).leftCol<=e.rightCol&&i.rightCol>=e.leftCol)return!0;return!1}function l(e,t){return e.leftCol-t.leftCol}t.default=s}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderSegs=function(e,t){var n,i=[];return n=this.eventRenderer.renderSegRows(e),this.component.rowEls.each(function(e,o){var s,a,l=r(o),c=r('<div class="fc-helper-skeleton"><table/></div>');t&&t.row===e?a=t.el.position().top:((s=l.find(".fc-content-skeleton tbody")).length||(s=l.find(".fc-content-skeleton table")),a=s.position().top),c.css("top",a).find("table").append(n[e].tbodyEl),l.append(c),i.push(c[0])}),r(i)},t}(n(58).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fillSegTag="td",t}return i.__extends(t,e),t.prototype.attachSegEls=function(e,t){var n,i,r,o=[];for(n=0;n<t.length;n++)r=this.renderFillRow(e,i=t[n]),this.component.rowEls.eq(i.row).append(r),o.push(r[0]);return o},t.prototype.renderFillRow=function(e,t){var n,i,o,s=this.component.colCnt,a=t.leftCol,l=t.rightCol+1;return n="businessHours"===e?"bgevent":e.toLowerCase(),o=(i=r('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),a>0&&o.append('<td colspan="'+a+'"/>'),o.append(t.el.attr("colspan",l-a)),l<s&&o.append('<td colspan="'+(s-l)+'"/>'),this.component.bookendCells(o),i},t}(n(57).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(228),o=n(5),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.buildRenderRange=function(t,n,i){var r,s=e.prototype.buildRenderRange.call(this,t,n,i),a=this.msToUtcMoment(s.startMs,i),l=this.msToUtcMoment(s.endMs,i);return this.opt("fixedWeekCount")&&(r=Math.ceil(l.diff(a,"weeks",!0)),l.add(6-r,"weeks")),new o.default(a,l)},t}(r.default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(4),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.renderFgSegs=function(e){e.length?this.component.renderSegList(e):this.component.renderEmptyMessage()},t.prototype.fgSegHtml=function(e){var t,n=this.view,i=n.calendar,o=i.theme,s=e.footprint,a=s.eventDef,l=s.componentFootprint,c=a.url,u=["fc-list-item"].concat(this.getClasses(a)),d=this.getBgColor(a);return t=l.isAllDay?n.getAllDayHtml():n.isMultiDayRange(l.unzonedRange)?e.isStart||e.isEnd?r.htmlEscape(this._getTimeText(i.msToMoment(e.startMs),i.msToMoment(e.endMs),l.isAllDay)):n.getAllDayHtml():r.htmlEscape(this.getTimeText(s)),c&&u.push("fc-has-url"),'<tr class="'+u.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+o.getClass("widgetContent")+'">'+(t||"")+"</td>":"")+'<td class="fc-list-item-marker '+o.getClass("widgetContent")+'"><span class="fc-event-dot"'+(d?' style="background-color:'+d+'"':"")+'></span></td><td class="fc-list-item-title '+o.getClass("widgetContent")+'"><a'+(c?' href="'+r.htmlEscape(c)+'"':"")+">"+r.htmlEscape(a.title||"")+"</a></td></tr>"},t.prototype.computeEventTimeFormat=function(){return this.opt("mediumTimeFormat")},t}(n(42).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.handleClick=function(t,n){var i;e.prototype.handleClick.call(this,t,n),r(n.target).closest("a[href]").length||(i=t.footprint.eventDef.url)&&!n.isDefaultPrevented()&&(window.location.href=i)},t}(n(59).default);t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(38),r=n(52),o=n(215),s=n(216);i.default.registerClass(r.default),i.default.registerClass(o.default),i.default.registerClass(s.default)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(51),r=n(213),o=n(214),s=n(258),a=n(259);i.defineThemeSystem("standard",r.default),i.defineThemeSystem("jquery-ui",o.default),i.defineThemeSystem("bootstrap3",s.default),i.defineThemeSystem("bootstrap4",a.default)}
1,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=r,r.prototype.classes={widget:"fc-bootstrap3",tableGrid:"table-bordered",tableList:"table",tableListHeading:"active",buttonGroup:"btn-group",button:"btn btn-default",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"panel panel-default",popoverHeader:"panel-heading",popoverContent:"panel-body",headerRow:"panel-default",dayRow:"panel-default",listView:"panel panel-default"},r.prototype.baseIconClass="glyphicon",r.prototype.iconClasses={close:"glyphicon-remove",prev:"glyphicon-chevron-left",next:"glyphicon-chevron-right",prevYear:"glyphicon-backward",nextYear:"glyphicon-forward"},r.prototype.iconOverrideOption="bootstrapGlyphicons",r.prototype.iconOverrideCustomButtonOption="bootstrapGlyphicon",r.prototype.iconOverridePrefix="glyphicon-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(19).default);t.default=r,r.prototype.classes={widget:"fc-bootstrap4",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},r.prototype.baseIconClass="fa",r.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},r.prototype.iconOverrideOption="bootstrapFontAwesome",r.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",r.prototype.iconOverridePrefix="fa-"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),r=n(62),o=n(229);i.defineView("basic",{class:r.default}),i.defineView("basicDay",{type:"basic",duration:{days:1}}),i.defineView("basicWeek",{type:"basic",duration:{weeks:1}}),i.defineView("month",{class:o.default,duration:{months:1},defaults:{fixedWeekCount:!0}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),r=n(226);i.defineView("agenda",{class:r.default,defaults:{allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0}}),i.defineView("agendaDay",{type:"agenda",duration:{days:1}}),i.defineView("agendaWeek",{type:"agenda",duration:{weeks:1}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),r=n(230);i.defineView("list",{class:r.default,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}}),i.defineView("listDay",{type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}}),i.defineView("listWeek",{type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}}),i.defineView("listMonth",{type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}}),i.defineView("listYear",{type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}])}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){var t=Array.prototype.slice,n=Array.prototype.splice,i={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1,zIndex:"auto"},r=e(window),o=e(document),s=[],a=r.height(),l=function(){for(var t=r.scrollTop(),n=o.height(),i=n-a,l=t>i?i-t:0,c=0,u=s.length;c<u;c++){var d=s[c],h=d.stickyWrapper.offset().top-d.topSpacing-l;if(d.stickyWrapper.css("height",d.stickyElement.outerHeight()),t<=h)null!==d.currentTop&&(d.stickyElement.css({width:"",position:"",top:"","z-index":""}),d.stickyElement.parent().removeClass(d.className),d.stickyElement.trigger("sticky-end",[d]),d.currentTop=null);else{var p,f=n-d.stickyElement.outerHeight()-d.topSpacing-d.bottomSpacing-t-l;f<0?f+=d.topSpacing:f=d.topSpacing,d.currentTop!==f&&(d.getWidthFrom?p=e(d.getWidthFrom).width()||null:d.widthFromWrapper&&(p=d.stickyWrapper.width()),null==p&&(p=d.stickyElement.width()),d.stickyElement.css("width",p).css("position","fixed").css("top",f).css("z-index",d.zIndex),d.stickyElement.parent().addClass(d.className),d.stickyElement.trigger(null===d.currentTop?"sticky-start":"sticky-update",[d]),d.currentTop===d.topSpacing&&d.currentTop>f||null===d.currentTop&&f<d.topSpacing?d.stickyElement.trigger("sticky-bottom-reached",[d]):null!==d.currentTop&&f===d.topSpacing&&d.currentTop<f&&d.stickyElement.trigger("sticky-bottom-unreached",[d]),d.currentTop=f);var g=d.stickyWrapper.parent();d.stickyElement.offset().top+d.stickyElement.outerHeight()>=g.offset().top+g.outerHeight()&&d.stickyElement.offset().top<=d.topSpacing?d.stickyElement.css("position","absolute").css("top","").css("bottom",0).css("z-index",""):d.stickyElement.css("position","fixed").css("top",f).css("bottom","").css("z-index",d.zIndex)}}},c=function(){a=r.height();for(var t=0,n=s.length;t<n;t++){var i=s[t],o=null;i.getWidthFrom?i.responsiveWidth&&(o=e(i.getWidthFrom).width()):i.widthFromWrapper&&(o=i.stickyWrapper.width()),null!=o&&i.stickyElement.css("width",o)}},u={init:function(t){var n=e.extend({},i,t);return this.each(function(){var t=e(this),r=t.attr("id"),o=r?r+"-"+i.wrapperClassName:i.wrapperClassName,a=e("<div></div>").attr("id",o).addClass(n.wrapperClassName);t.wrapAll(a);var l=t.parent();n.center&&l.css({width:t.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"===t.css("float")&&t.css({float:"none"}).parent().css({float:"right"}
1),n.stickyElement=t,n.stickyWrapper=l,n.currentTop=null,s.push(n),u.setWrapperHeight(this),u.setupChangeListeners(this)})},setWrapperHeight:function(t){var n=e(t),i=n.parent();i&&i.css("height",n.outerHeight())},setupChangeListeners:function(e){window.MutationObserver?new window.MutationObserver(function(t){(t[0].addedNodes.length||t[0].removedNodes.length)&&u.setWrapperHeight(e)}).observe(e,{subtree:!0,childList:!0}):(e.addEventListener("DOMNodeInserted",function(){u.setWrapperHeight(e)},!1),e.addEventListener("DOMNodeRemoved",function(){u.setWrapperHeight(e)},!1))},update:l,unstick:function(t){return this.each(function(){for(var t=e(this),i=-1,r=s.length;r-- >0;)s[r].stickyElement.get(0)===this&&(n.call(s,r,1),i=r);-1!==i&&(t.unwrap(),t.css({width:"",position:"",top:"",float:"","z-index":""}))})}};window.addEventListener?(window.addEventListener("scroll",l,!1),window.addEventListener("resize",c,!1)):window.attachEvent&&(window.attachEvent("onscroll",l),window.attachEvent("onresize",c)),e.fn.sticky=function(n){return u[n]?u[n].apply(this,t.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.sticky"):u.init.a
vendor: 4,108 bytes, line 1
1pply(this,arguments)},e.fn.unstick=function(n){return u[n]?u[n].apply(this,t.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.sticky"):u.unstick.apply(this,arguments)},e(function(){setTimeout(l,0)})}),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;r||i.data("bs.carousel",r=new t(this,o)),"number"==typeof n?r.to(n):s?r[s]():o.interval&&r.pause().cycle()})}t.VERSION="3.3.7",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);return("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap?t:this.$items.eq((n+("prev"==e?-1:1))%this.$items.length)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(n,r),s=this.interval,a="next"==n?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([n,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(t){var i,r=e(this),o=e(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=e.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),n.call(o,s),a&&o.data("bs.carousel").to(a),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-sli
1de-to]",r),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("QiscusSDKCore",[],t):"object"==typeof exports?exports.QiscusSDKCore=t():e.QiscusSDKCore=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,(function(t){return e[t]}).bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=81)}([function(e,t,n){e.exports=n(85)},function(e,t){function n(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(r,o){var s=e.apply(t,i);function a(e){n(s,r,o,a,l,"next",e)}function l(e){n(s,r,o,a,l,"throw",e)}a(void 0)})}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}},function(e,t,n){(function(i){var r,o;o=this,void 0===(r=(function(){return o.is=function(){var e={VERSION:"0.8.0",not:{},all:{},any:{}},t=Object.prototype.toString,n=Array.prototype.slice,r=Object.prototype.hasOwnProperty;function o(e){return function(){return!e.apply(null,n.call(arguments))}}function s(e){return function(){for(var t=u(arguments),n=t.length,i=0;i<n;i++)if(!e.call(null,t[i]))return!1;return!0}}function a(e){return function(){for(var t=u(arguments),n=t.length,i=0;i<n;i++)if(e.call(null,t[i]))return!0;return!1}}var l={"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t}};function c(e,t){var n=t+"",i=+(n.match(/\d+/)||NaN),r=n.match(/^[<>]=?|/)[0];return l[r]?l[r](e,i):e==i||i!=i}function u(t){var i=n.call(t);return 1===i.length&&e.array(i[0])&&(i=i[0]),i}e.arguments=function(e){return"[object Arguments]"===t.call(e)||null!=e&&"object"==typeof e&&"callee"in e},e.array=Array.isArray||function(e){return"[object Array]"===t.call(e)},e.boolean=function(e){return!0===e||!1===e||"[object Boolean]"===t.call(e)},e.char=function(t){return e.string(t)&&1===t.length},e.date=function(e){return"[object Date]"===t.call(e)},e.domNode=function(t){return e.object(t)&&t.nodeType>0},e.error=function(e){return"[object Error]"===t.call(e)},e.function=function(e){return"[object Function]"===t.call(e)||"function"==typeof e},e.json=function(e){return"[object Object]"===t.call(e)},e.nan=function(e){return e!=e},e.null=function(e){return null===e},e.number=function(n){return e.not.nan(n)&&"[object Number]"===t.call(n)},e.object=function(e){return Object(e)===e},e.regexp=function(e){return"[object RegExp]"===t.call(e)},e.sameType=function(n,i){var r=t.call(n);return r===t.call(i)&&("[object Number]"!==r||!e.any.nan(n,i)||e.all.nan(n,i))},e.sameType.api=["not"],e.string=function(e){return"[object String]"===t.call(e)},e.undefined=function(e){return void 0===e},e.windowObject=function(e){return null!=e&&"object"==typeof e&&"setInterval"in e},e.empty=function(t){if(e.object(t)){var n=Object.getOwnPropertyNames(t).length;return!!(0===n||1===n&&e.array(t)||2===n&&e.arguments(t))}return""===t},e.existy=function(e){return null!=e},e.falsy=function(e){return!e},e.truthy=o(e.falsy),e.above=function(t,n){return e.all.number(t,n)&&t>n},e.above.api=["not"],e.decimal=function(t){return e.number(t)&&t%1!=0},e.equal=function(t,n){return e.all.number(t,n)?t===n&&1/t==1/n:e.all.string(t,n)||e.all.regexp(t,n)?""+t==""+n:!!e.all.boolean(t,n)&&t===n},e.equal.api=["not"],e.even=function(t){return e.number(t)&&t%2==0},e.finite=isFinite||function(t){return e.not.infinite(t)&&e.not.nan(t)},e.infinite=function(e){return e===1/0||e===-1/0}
1,e.integer=function(t){return e.number(t)&&t%1==0},e.negative=function(t){return e.number(t)&&t<0},e.odd=function(t){return e.number(t)&&t%2==1},e.positive=function(t){return e.number(t)&&t>0},e.under=function(t,n){return e.all.number(t,n)&&t<n},e.under.api=["not"],e.within=function(t,n,i){return e.all.number(t,n,i)&&t>n&&t<i},e.within.api=["not"];var d={affirmative:/^(?:1|t(?:rue)?|y(?:es)?|ok(?:ay)?)$/,alphaNumeric:/^[A-Za-z0-9]+$/,caPostalCode:/^(?!.*[DFIOQU])[A-VXY][0-9][A-Z]\s?[0-9][A-Z][0-9]$/,creditCard:/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/,dateString:/^(1[0-2]|0?[1-9])([\/-])(3[01]|[12][0-9]|0?[1-9])(?:\2)(?:[0-9]{2})?[0-9]{2}$/,email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,eppPhone:/^\+[0-9]{1,3}\.[0-9]{4,14}(?:x.+)?$/,hexadecimal:/^(?:0x)?[0-9a-fA-F]+$/,hexColor:/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,ipv4:/^(?:(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$/,ipv6:/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,nanpPhone:/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/,socialSecurityNumber:/^(?!000|666)[0-8][0-9]{2}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4}$/,timeString:/^(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])$/,ukPostCode:/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/,url:/^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i,usZipCode:/^[0-9]{5}(?:-[0-9]{4})?$/};function h(t,n){e[t]=function(e){return n[t].test(e)}}for(var p in d)d.hasOwnProperty(p)&&h(p,d);e.ip=function(t){return e.ipv4(t)||e.ipv6(t)},e.capitalized=function(t){if(e.not.string(t))return!1;for(var n=t.split(" "),i=0;i<n.length;i++){var r=n[i];if(r.length){var o=r.charAt(0);if(o!==o.toUpperCase())return!1}}return!0},e.endWith=function(t,n){if(e.not.string(t))return!1;var i=t.length-(n+="").length;return i>=0&&t.indexOf(n,i)===i},e.endWith.api=["not"],e.include=function(e,t){return e.indexOf(t)>-1},e.include.api=["not"],e.lowerCase=function(t){return e.string(t)&&t===t.toLowerCase()},e.palindrome=function(t){if(e.not.string(t))return!1;for(var n=(t=t.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase()).length-1,i=0,r=Math.floor(n/2);i<=r;i++)if(t.charAt(i)!==t.charAt(n-i))return!1;return!0},e.space=function(t){if(e.not.char(t))return!1;var n=t.charCodeAt(0);return n>8&&n<14||32===n},e.startWith=function(t,n){return e.string(t)&&0===t.indexOf(n)},e.startWith.api=["not"],e.upperCase=function(t){return e.string(t)&&t===t.toUpperCase()};var f=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],g=["january","february","march","april","may","june","july","august","september","october","november","december"];e.day=function(t,n){return e.date(t)&&n.toLowerCase()===f[t.getDay()]},e.day.api=["not"],e.dayLightSavingTime=function(e){var t=new Date(e.getFullYear(),0,1),n=new Date(e.getFullYear(),6,1),i=Math.max(t.getTimezoneOffset(),n.getTimezoneOffset());return e.getTimezoneOffset()<i},e.future=function(t){var n=new Date;return e.date(t)&&t.getTime()>n.getTime()},e.inDateRange=function(t,n,i){if(e.not.date(t)||e.not.date(n)||e.not.date(i))return!1;var r=t.getTime();return r>n.getTime()&&r<i.getTime()},e.inDateRange.api=["not"],e.inLastMonth=function(t){return e.inDateRange(t,new Date((new Date).setMonth((new Date).getMonth()-1)),new Date)},e.inLastWeek=function(t){return e.inDateRange(t,new Date((new Date).setDate((new Date).getDate()-7)),new Date)},e.inLastYear=function(t){return e.inDateRange(t,new Date((new Date).setFullYear((new Date).getFullYear()-1)),new Date)},e.inNextMonth=function(t){return e.inDateRange(t,new Date,new Date((new Date).setMonth((new Date).getMonth()+1)))},e.inNextWeek=function(t){return e.inDateRange(t,new Date,new Date((new Date).setDate((new Date).getDate()+7)))},e.inNextYear=function(t){return e.inDateRange(t,new Date,new Date((new Date).setFullYear((new Date).getFullYear()+1)))},e.leapYear=function(t){return e.number(t)&&(t%4==0&&t%100!=0||t%400==0)},e.month=function(t,n){return e.date(t)&&n.toLowerCase()===g[t.getMonth()]},e.month.api=["not"],e.past=function(t){var n=new Date;return e.date(t)&&t.getTime()<n.getTime()},e.quarterOfYear=function(t,n){return e.date(t)&&e.number(n)&&n===Math.floor((t.getMonth()+3)/3)},e.quarterOfYear.api=["not"],e.today=function(t){var n=(new Date).toDateString();return e.date(t)&&t.toDateString()===n},e.tomorrow=function(t){var n=new Date,i=new Date(n.setDate(n.getDate()+1)).toDateString();return e.date(t)&&t.toDateString()===i},e.weekend=function(t){return e.date(t)&&(6===t.getDay()||0===t.getDay())},e.weekday=o(e.weekend),e.year=function(t,n){return e.date(t)&&e.number(n)&&n===t.getFullYear()},e.year.api=["not"],e.yesterday=function(t){var n=new Date,i=new Date(n.setDate(n.getDate()-1)).toDateString();return e.date(t)&&t.toDateString()===i};var m=e.windowObject("object"==typeof i&&i)&&i,v=e.windowObject("object"==typeof self&&self)&&self,y=e.windowObject("object"==typeof this&&this)&&this,b=m||v||y||Function("return this")(),_=v&&v.document,S=b.is,w=v&&v.navigator,E=(w&&w.appVersion||"").toLowerCase(),T=(w&&w.userAgent||"").toLowerCase(),C=(w&&w.vendor||"").toLowerCase();return e.android=function(){return/android/.test(T)},e.android.api=["not"],e.androidPhone=function(){return/android/.test(T)&&/mobile/.test(T)},e.androidPhone.api=["not"],e.androidTablet=function(){return/android/.test(T)&&!/mobile/.test(T)},e.androidTablet.api=["not"],e.blackberry=function(){return/blackberry/.test(T)||/bb10/.test(T)},e.blackberry.api=["not"],e.chrome=function(e){var t=/google inc/.test(C)?T.match(/(?:chrome|crios)\/(\d+)/):null;return null!==t&&c(t[1],e)},e.chrome.api=["not"],e.desktop=function(){return e.not.mobile()&&e.not.tablet()},e.desktop.api=["not"],e.edge=function(e){var t=T.match(/edge\/(\d+)/);return null!==t&&c(t[1],e)},e.edge.api=["not"],e.firefox=function(e){var t=T.match(/(?:firefox|fxios)\/(\d+)/);return null!==t&&c(t[1],e)},e.firefox.api=["not"],e.ie=function(e){var t=T.match(/(?:msie |trident.+?; rv:)(\d+)/);return null!==t&&c(t[1],e)},e.ie.api=["not"],e.ios=function(){return e.iphone()||e.ipad()||e.ipod()},e.ios.api=["not"],e.ipad=function(e){var t=T.match(/ipad.+?os (\d+)/);return null!==t&&c(t[1],e)},e.ipad.api=["not"],e.iphone=function(e){var t=T.match(/iphone(?:.+?os (\d+))?/);return null!==t&&c(t[1]||1,e)},e.iphone.api=["not"],e.ipod=function(e){var t=T.match(/ipod.+?os (\d+)/);return null!==t&&c(t[1],e)},e.ipod.api=["not"],e.linux=function(){return/linux/.test(E)},e.linux.api=["not"],e.mac=function(){return/mac/.test(E)},e.mac.api=["not"],e.mobile=function(){return e.iphone()||e.ipod()||e.androidPhone()||e.blackberry()||e.windowsPhone()},e.mobile.api=["not"],e.offline=o(e.online),e.offline.api=["not"],e.online=function(){return!w||!0===w.onLine},e.online.api=["not"],e.opera=function(e){var t=T.match(/(?:^opera.+?version|opr)\/(\d+)/);return null!==t&&c(t[1],e)},e.opera.api=["not"],e.phantom=function(e){var t=T.match(/phantomjs\/(\d+)/);return null!==t&&c(t[1],e)},e.phantom.api=["not"],e.safari=function(e){var t=T.match(/version\/(\d+).+?safari/);return null!==t&&c(t[1],e)},e.safari.api=["not"],e.tablet=function(){return e.ipad()||e.androidTablet()||e.windowsTablet()},e.tablet.api=["not"],e.touchDevice=function(){return!!_&&("ontouchstart"in v||"DocumentTouch"in v&&_ instanceof DocumentTouch)},e.touchDevice.api=["not"],e.windows=function(){return/win/.test(E)},e.windows.api=["not"],e.windowsPhone=function(){return e.windows()&&/phone/.test(T)},e.windowsPhone.api=["not"],e.windowsTablet=function(){return e.windows()&&e.not.windowsPhone()&&/touch/.test(T)},e.windowsTablet.api=["not"],e.propertyCount=function(t,n){if(e.not.object(t)||e.not.number(n))return!1;var i=0;for(var o in t)if(r.call(t,o)&&++i>n)return!1;return i===n},e.propertyCount.api=["not"],e.propertyDefined=function(t,n){return e.object(t)&&e.string(n)&&n in t},e.propertyDefined.api=["not"],e.inArray=function(t,n){if(e.not.array(n))return!1;for(var i=0;i<n.length;i++)if(n[i]===t)return!0;return!1},e.inArray.api=["not"],e.sorted=function(t,n){if(e.not.array(t))return!1;for(var i=l[n]||l[">="],r=1;r<t.length;r++)if(!i(t[r],t[r-1]))return!1;return!0},function(){var t=e;for(var n in t)if(r.call(t,n)&&e.function(t[n]))for(var i=t[n].api||["not","all","any"],l=0;l<i.length;l++)"not"===i[l]&&(e.not[n]=o(e[n])),"all"===i[l]&&(e.all[n]=s(e[n])),"any"===i[l]&&(e.any[n]=a(e[n]))}(),e.setNamespace=function(){return b.is=S,this},e.setRegexp=function(e,t){for(var n in d)r.call(d,n)&&t===n&&(d[n]=e)},e}()}).call(t,n,t,e))||(e.exports=r)}).call(this,n(9))},function(e,t,n){var i;"undefined"!=typeof window?i=window:"undefined"!=typeof self?i=self:(console.warn("Using browser-only version of superagent in non-browser environment"),i=this);var r=n(86),o=n(87),s=n(43),a=n(88),l=n(90);function c(){}var u=t=e.exports=function(e,n){return"function"==typeof n?new t.Request
vendor: 6,799 bytes, line 1
1("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=v,u.getXHR=function(){if(!(!i.XMLHttpRequest||i.location&&"file:"==i.location.protocol&&i.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var d="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function h(e){if(!s(e))return e;var t=[];for(var n in e)p(t,n,e[n]);return t.join("&")}function p(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){p(e,t,n)});else if(s(n))for(var i in n)p(e,t+"["+i+"]",n[i]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function f(e){for(var t,n,i={},r=e.split("&"),o=0,s=r.length;o<s;++o)-1==(n=(t=r[o]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return i}function g(e){return/[\/+]json($|[^-\w])/.test(e)}function m(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,n,i,r,o=e.split(/\r?\n/),s={},a=0,l=o.length;a<l;++a)-1!==(t=(n=o[a]).indexOf(":"))&&(i=n.slice(0,t).toLowerCase(),r=d(n.slice(t+1)),s[i]=r);return s}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body=null===this.text&&e._responseType?this.xhr.response:"HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function v(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e,t=null,i=null;try{i=new m(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,n.callback(e,i)):n.callback(null,i)})}function y(e,t,n){var i=u("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}u.serializeObject=h,u.parseString=f,u.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},u.serialize={"application/x-www-form-urlencoded":h,"application/json":JSON.stringify},u.parse={"application/x-www-form-urlencoded":f,"application/json":JSON.parse},a(m.prototype),m.prototype._parseBody=function(e){var t=u.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&g(this.type)&&(t=u.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},m.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i=new Error("cannot "+t+" "+n+" ("+this.status+")");return i.status=this.status,i.method=t,i.url=n,i},u.Response=m,r(v.prototype),o(v.prototype),v.prototype.type=function(e){return this.set("Content-Type",u.types[e]||e),this},v.prototype.accept=function(e){return this.set("Accept",u.types[e]||e),this},v.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"}),this._auth(e,t,n,function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")})},v.prototype.query=function(e){return"string"!=typeof e&&(e=h(e)),e&&this._query.push(e),this},v.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},v.prototype._getFormData=function(){return this._formData||(this._formData=new i.FormData),this._formData},v.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},v.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},v.prototype.buffer=v.prototype.ca=v.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},v.prototype.pipe=v.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},v.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},v.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||c,this._finalizeQueryString(),this._end()},v.prototype._end=function(){var e=this,t=this.xhr=u.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=i.bind(null,"download"),t.upload&&(t.upload.onprogress=i.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var r=this._header["content-type"],o=this._serializer||u.serialize[r?r.split(";")[0]:""];!o&&g(r)&&(o=u.serialize["application/json"]),o&&(n=o(n))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&t.setRequestHeader(s,this.header[s]);return this._responseType&&(t.responseType=this._responseType),this.emit
1("request",this),t.send(void 0!==n?n:null),this},u.agent=function(){return new l},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){l.prototype[e.toLowerCase()]=function(t,n){var i=new u.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}}),l.prototype.del=l.prototype.delete,u.get=function(e,t,n){var i=u("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},u.head=function(e,t,n){var i=u("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},u.options=function(e,t,n){var i=u("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},u.del=y,u.delete=y,u.patch=function(e,t,n){var i=u("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},u.post=function(e,t,n){var i=u("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},u.put=function(e,t,n){var i=u("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}},function(e,t,n){var i=n(92),r=n(44),o=36e5,s=/[T ]/,a=/:/,l=/^(\d{2})$/,c=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,d=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,p=/^-?(\d{3})$/,f=/^-?(\d{2})-?(\d{2})$/,g=/^-?W(\d{2})$/,m=/^-?W(\d{2})-?(\d{1})$/,v=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,b=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,_=/([Z+-].*)$/,S=/^(Z)$/,w=/^([+-])(\d{2})$/,E=/^([+-])(\d{2}):?(\d{2})$/;function T(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}e.exports=function(e,t){if(r(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?2:Number(n);var C=function(e){var t,n={},i=e.split(s);if(a.test(i[0])?(n.date=null,t=i[0]):(n.date=i[0],t=i[1]),t){var r=_.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e),I=function(e,t){var n,i=c[t],r=d[t];if(n=u.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=l.exec(e)||i.exec(e)){var s=n[1];return{year:100*parseInt(s,10),restDateString:e.slice(s.length)}}return{year:null}}(C.date,n),R=function(e,t){if(null===t)return null;var n,i,r;if(0===e.length)return(i=new Date(0)).setUTCFullYear(t),i;if(n=h.exec(e))return i=new Date(0),r=parseInt(n[1],10)-1,i.setUTCFullYear(t,r),i;if(n=p.exec(e)){i=new Date(0);var o=parseInt(n[1],10);return i.setUTCFullYear(t,0,o),i}if(n=f.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return i.setUTCFullYear(t,r,s),i}return(n=g.exec(e))?T(t,parseInt(n[1],10)-1):(n=m.exec(e))?T(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1):null}(I.restDateString,I.year);if(R){var D,A=R.getTime(),k=0;if(C.time&&(k=function(e){var t,n,i;if(t=v.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*o;if(t=y.exec(e))return n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),n%24*o+6e4*i;if(t=b.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return n%24*o+6e4*i+1e3*r}return null}(C.time)),C.timezone)D=6e4*function(e){var t,n;return(t=S.exec(e))?0:(t=w.exec(e))?(n=60*parseInt(t[2],10),"+"===t[1]?-n:n):(t=E.exec(e))?(n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n):0}(C.timezone);else{var O=A+k,x=new Date(O);D=i(x);var N=new Date(O);N.setDate(x.getDate()+1);var P=i(N)-i(x);P>0&&(D+=P)}return new Date(A+k+D)}return new Date(e)}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=n(20),r=n(60),o=n(34),s=n(61),a=n(62);
1(e.exports=function(e,t){var n,r,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],i(e)?(n=a.call(e,"c"),r=a.call(e,"e"),l=a.call(e,"w")):(n=l=!0,r=!1),u={value:t,configurable:n,enumerable:r,writable:l},c?o(s(c),u):u}).gs=function(e,t,n){var l,c,u,d;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],i(t)?r(t)?i(n)?r(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,i(e)?(l=a.call(e,"c"),c=a.call(e,"e")):(l=!0,c=!1),d={get:t,set:n,configurable:l,enumerable:c},u?o(s(u),d):d}},function(e,t){e.exports="function"==typeof Object.create?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var i=n(19);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=n(146)()?n(27).Symbol:n(147)},function(e,t,n){"use strict";var i=n(22),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var o=n(23);o.inherits=n(11);var s=n(48),a=n(53);o.inherits(d,s);for(var l=r(a.prototype),c=0;c<l.length;c++){var u=l[c];d.prototype[u]||(d.prototype[u]=a.prototype[u])}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||i.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),i.nextTick(t,e)}},function(e,t,n){var i=n(18),r=i.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),s.prototype=Object.create(r.prototype),o(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){(t=e.exports=n(48)).Stream=t,t.Readable=t,t.Writable=n(53),t.Duplex=n(14),t.Transform=n(55),t.PassThrough=n(121)},function(e,t,n){"use strict";(function(e){var i=n(51),r=n(114),o=n(49);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t),e}(e,t,n,i):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|f(t,n),r=(e=a(e,i)).write(t,n);return r!==i&&(e=e.slice(0,r)),e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&
vendor: 16,438 bytes, line 1
1(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(i)return H(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,i,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,i,r){var o,s=1,a=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var d=!0,h=0;h<l;h++)if(c(e,o+h)!==c(t,h)){d=!1;break}if(d)return o}return-1}function y(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,i){return V(H(t,e.length-n),e,n,i)}function _(e,t,n,i){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return _(e,t,n,i)}function w(e,t,n,i){return V(B(t),e,n,i)}function E(e,t,n,i){return V(function(e,t){for(var n,i,r=[],o=0;o<e.length&&!((t-=2)<0);++o)i=(n=e.charCodeAt(o))>>8,r.push(n%256),r.push(i);return r}(t,e.length-n),e,n,i)}function T(e,t,n){return i.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,l,c=e[r],u=null,d=c>239?4:c>223?3:c>191?2:1;if(r+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[r+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:s=e[r+2],128==(192&(o=e[r+1]))&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[r+2],a=e[r+3],128==(192&(o=e[r+1]))&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(i.push((u-=65536)>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=d}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=I));return n}(i)}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,i){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof i?a(e,t).fill(n,i):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=l.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var s=e[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):(function(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}).apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,i,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(i,r),u=e.slice(t,n),d=0;d<a;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},l.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function R(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function D(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function A(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=U(e[o]);return r}function k(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,i,r,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function N(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function P(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function M(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,i,o){return o||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function j(e,t,n,i,o){return o||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var r=t-e;n=new l(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,i){e=+e,t|=0,n|=0,i||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,i){e=+e,t|=0,n|=0,i||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=l.isBuffer(e)?e:H(new l(e,i).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>
vendor: 5,124 bytes, line 1
1-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(125)();e.exports=function(e){return e!==i&&null!==e}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,console&&console.warn&&console.warn(a)}return e}function d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=(function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}).bind(i);return r.listener=n,i.wrapFn=r,r}function h(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,r=this._events;if(void 0!==r)i=i&&void 0===r.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},a.prototype.on=a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,d(this,e,t)),this},a.prototype.off=a.prototype.removeListener=function(e,t){var n,i,r,o,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);
1if(void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){"use strict";(function(t){e.exports=void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?{nextTick:function(e,n,i,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,i)});case 4:return t.nextTick(function(){e.call(null,n,i,r)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick(function(){e.apply(null,o)})}}}:t}).call(this,n(8))},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(18).Buffer)},function(e,t,n){var i=n(82),r=n(83),o=n(42),s=n(84);e.exports=function(e){return i(e)||r(e)||o(e)||s()}},function(e,t,n){var i=n(91),r=n(96),o=n(45),s=n(7),a=n(99),l=n(46),c={M:function(e){return e.getMonth()+1},MM:function(e){return h(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return h(e.getDate(),2)},DDD:function(e){return i(e)},DDDD:function(e){return h(i(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return r(e)},WW:function(e){return h(r(e),2)},YY:function(e){return h(e.getFullYear(),4).substr(2)},YYYY:function(e){return h(e.getFullYear(),4)},GG:function(e){return String(o(e)).substr(2)},GGGG:function(e){return o(e)},H:function(e){return e.getHours()},HH:function(e){return h(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return h(c.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return h(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return h(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return h(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return h(e.getMilliseconds(),3)},Z:function(e){return d(e.getTimezoneOffset(),":")},ZZ:function(e){return d(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function u(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function d(e,t){t=t||"";var n=e>0?"-":"+",i=Math.abs(e),r=i%60;return n+h(Math.floor(i/60),2)+t+h(r,2)}function h(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}
1e.exports=function(e,t,n){var i=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",r=(n||{}).locale,o=l.format.formatters,d=l.format.formattingTokensRegExp;r&&r.format&&r.format.formatters&&(o=r.format.formatters,r.format.formattingTokensRegExp&&(d=r.format.formattingTokensRegExp));var h=s(e);return a(h)?function(e,t,n){var i,r=e.match(d),o=r.length;for(i=0;i<o;i++)r[i]=t[r[i]]||c[r[i]]||u(r[i]);return function(e){for(var t="",n=0;n<o;n++)r[n]instanceof Function?t+=r[n](e,c):t+=r[n];return t}}(i,o)(h):"Invalid Date"}},function(e,t,n){"use strict";e.exports=n(58)()?Object.setPrototypeOf:n(59)},function(e,t){e.exports=function(){if(this)return this;Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0});try{return __global__}finally{delete Object.prototype.__global__}}()},function(e,t,n){"use strict";var i=Object.prototype.toString,r=i.call(function(){return arguments}());e.exports=function(e){return i.call(e)===r}},function(e,t,n){"use strict";var i=Object.prototype.toString,r=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||i.call(e)===r)||!1}},function(e,t,n){var i=n(97);e.exports=function(e){return i(e,{weekStartsOn:1})}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var i=arguments[t];for(var r in i)n.call(i,r)&&(e[r]=i[r])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){var i=n(18),r=i.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),o(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,n){"use strict";var i=n(20),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(r,typeof e)}},function(e,t,n){"use strict";e.exports=n(138)()?Object.assign:n(139)},function(e,t,n){"use strict";var i,r=n(56),o=n(34),s=n(16),a=n(12),l=n(10),c=n(156),u=n(13),d=Object.defineProperty,h=Object.defineProperties;e.exports=i=function(e,t){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",a(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(s(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete i.prototype.constructor,h(i.prototype,o({_next:l(function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:l(function(e){return this.__list__[e]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:l(function(){return"[object "+(this[u.toStringTag]||"Object")+"]"})},c({_onAdd:l(function(e){e>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(t,n){t>=e&&(this.__redo__[n]=++t)},this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))}),_onDelete:l(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,n){t>e&&(this.__redo__[n]=--t)},this)))}),_onClear:l(function(){this.__redo__&&r.call(this.__redo__),this.__nextIndex__=0})}))),d(i.prototype,u.iterator,l(function(){return this}))},function(e,t,n){"use strict";var i=n(194);e.exports=function(e,t){var n;function r(i){t.rejectUnauthorized&&e.emit("error",i),n.end()}return t.port=t.port||8883,t.host=t.hostname||t.host||"localhost",t.rejectUnauthorized=!1!==t.rejectUnauthorized,delete t.path,(n=i.connect(t)).on("secureConnect",function(){t.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",r)}),n.on("error",r),n}},function(e,t,n){(function(t,i){var r=n(17),o=n(195),s=n(11),a=n(198),l=t.from&&t.from!==Uint8Array.from?t.from([0]):new t([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},u=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy("premature close"===n.message?null:n)}(e):t&&!e._ended&&e.end()}},d=function(e,t,n){if(!(this instanceof d))return new d(e,t,n);r.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)}
1;s(d,r.Duplex),d.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new d(e,t,n)},d.prototype.cork=function(){1==++this._corked&&this.emit("cork")},d.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},d.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,n=o(e,{writable:!0,readable:!1},u(this,this._forwardEnd)),r=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&i.nextTick(r),this._writable=e,this._writable.on("drain",r),this._unwrite=function(){t._writable.removeListener("drain",r),n()},this.uncork()}else this.end()},d.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,i=o(e,{writable:!1,readable:!0},u(this)),s=function(){n._forward()},a=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new r.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",s),this._readable2.on("end",a),this._unread=function(){n._readable2.removeListener("readable",s),n._readable2.removeListener("end",a),i()},this._forward()}},d.prototype._read=function(){this._drained=!0,this._forward()},d.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=a(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},d.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;i.nextTick(function(){t._destroy(e)})}},d.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},d.prototype._write=function(e,t,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,e,t,n)):e===l?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:n()):n()},d.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,function(){var n,i;i=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},(n=t._forwardEnd&&t._writable)?n._writableState&&n._writableState.finished?i():n._writableState?n.end(i):(n.end(),i()):i()})},d.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(l),r.Writable.prototype.end.call(this,n))},e.exports=d}).call(this,n(18).Buffer,n(8))},function(e,t){e.exports=function(e){var t;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}},function(e,t,n){var i=n(73);e.exports=function(e){return new i(e)}},function(e,t,n){var i=n(201);e.exports=function(e){return function(){return new i(e.apply(this,arguments))}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}},function(e,t,n){var i=n(41);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t,n){"use strict";e.exports=function(e){return null!==e&&"object"==typeof e}},function(e,t){e.exports=function(e){return e instanceof Date}},function(e,t,n){var i=n(7),r=n(30);e.exports=function(e){var t=i(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var s=r(o),a=new Date(0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);var l=r(a);return t.getTime()>=s.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}},function(e,t,n){var i=n(100),r=n(101);e.exports={distanceInWords:i(),format:r()}},function(e,t,n){"use strict";(function(t){var i=n(31),r=n(17).Readable,o={objectMode:!0},s={clean:!0},a=n(122);function l(e){if(!(this instanceof l))return new l(e);this.options=e||{},this.options=i(s,e),this._inflights=new a}l.prototype.put=function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this},l.prototype.createStream=function(){var e=new r(o),n=!1,i=[],s=0;
vendor: 7,032 bytes, line 1
1return this._inflights.forEach(function(e,t){i.push(e)}),e._read=function(){this.push(!n&&s<i.length?i[s++]:null)},e.destroy=function(){if(!n){var e=this;n=!0,t.nextTick(function(){e.emit("close")})}},e},l.prototype.del=function(e,t){return(e=this._inflights.get(e.messageId))?(this._inflights.delete(e.messageId),t(null,e)):t&&t(new Error("missing packet")),this},l.prototype.get=function(e,t){return(e=this._inflights.get(e.messageId))?t(null,e):t&&t(new Error("missing packet")),this},l.prototype.close=function(e){this.options.clean&&(this._inflights=null),e&&e()},e.exports=l}).call(this,n(8))},function(e,t,n){"use strict";(function(t,i){var r=n(22);e.exports=b;var o,s=n(49);b.ReadableState=y,n(21);var a=function(e,t){return e.listeners(t).length},l=n(50),c=n(32).Buffer,u=t.Uint8Array||function(){},d=n(23);d.inherits=n(11);var h=n(115),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var f,g=n(116),m=n(52);d.inherits(b,l);var v=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var i=t instanceof(o=o||n(14));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,s=e.readableHighWaterMark;this.highWaterMark=r||0===r?r:i&&(s||0===s)?s:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=n(54).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function b(e){if(o=o||n(14),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function _(e,t,n,i,r){var o,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,T(e)}}(e,s)):(r||(o=function(e,t){var n,i;return c.isBuffer(i=t)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=c.from(t)),i?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?S(e,s,t,!1):I(e,s)):S(e,s,t,!1))):i||(s.reading=!1)),!s.ended&&(s.needReadable||s.length<s.highWaterMark||0===s.length)}function S(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),I(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=c.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},b.prototype.unshift=function(e){return _(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return f||(f=n(54).StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var w=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=w?e=w:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(C,e):C(e))}function C(e){p("emit readable"),e.emit("readable"),k(e)}function I(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function D(e){p("readable nexttick read 0"),e.read(0)}function A(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,i=1,r=n.data;for(e-=r.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(r+=s===o.length?o:o.slice(0,e),0==(e-=s)){s===o.length?(++i,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t):function(e,t){var n=c.allocUnsafe(e),i=t.head,r=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var o=i.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0==(e-=s)){s===o.length?(++r,t.head=i.next?i.next:t.tail=null):(t.head=i,i.data=o.slice(s));break}++r}return t.length-=r,n}(e,t),i}(e,t.buffer,t.decoder),n);var n}function x(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,r.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}b.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):T(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&x(this),null;var i,r=t.needReadable;return p("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",r=!0),t.ended||t.reading?p("reading or ended",r=!1):r&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t))),null===(i=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&x(this)),null!==i&&this.emit
vendor: 1,620 bytes, line 1
1("data",i),i},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var l=t&&!1===t.end||e===i.stdout||e===i.stderr?y:c;function c(){p("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",function t(i,r){p("onunpipe"),i===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",y),n.removeListener("data",f),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())});var u=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,k(e))}}(n);e.on("drain",u);var d=!1,h=!1;function f(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==P(o.pipes,e))&&!d&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function g(t){p("onerror",t),y(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),y()}function v(){p("onfinish"),e.removeListener("close",m),y()}function y(){p("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prepe
1ndListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",m),e.once("finish",v),e.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,n);return this}var s=P(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},b.prototype.addListener=b.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&T(this):r.nextTick(D,this))}return n},b.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(A,e,t))}(this,e)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){p("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<v.length;o++)e.on(v[o],this.emit.bind(this,v[o]));return this._read=function(t){p("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=O}).call(this,n(9),n(8))},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(21).EventEmitter},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[1];return 3*(t[0]+n)/4-n},t.toByteArray=function(e){var t,n,i=c(e),s=i[0],a=i[1],l=new o(3*(s+a)/4-a),u=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));return 1===r?o.push(i[(t=e[n-1])>>2]+i[t<<4&63]+"=="):2===r&&o.push(i[(t=(e[n-2]<<8)+e[n-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o=[],s=t;s<n;s+=3)o.push(i[(r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t,n){"use strict";var i=n(22);function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";(function(t,i,r){var o=n(22);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;for(e.entry=null;i;){var r=i.callback;t.pendingcb--,r(void 0),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}
vendor: 7,145 bytes, line 1
1e.exports=y;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:o.nextTick;y.WritableState=v;var c=n(23);c.inherits=n(11);var u,d={deprecate:n(120)},h=n(50),p=n(32).Buffer,f=r.Uint8Array||function(){},g=n(52);function m(){}function v(e,t){a=a||n(14);var i=t instanceof a;this.objectMode=!!(e=e||{}).objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,c=e.writableHighWaterMark;this.highWaterMark=r||0===r?r:i&&(c||0===c)?c:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===e.decodeStrings),this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(o.nextTick(r,i),o.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(r(i),e._writableState.errorEmitted=!0,e.emit("error",i),T(e,t))}(e,n,i,t,r);else{var s=w(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),i?l(_,e,n,s,r):_(e,n,s,r)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||n(14),!(u.call(y,this)||this instanceof a))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function b(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=new Array(t.bufferedRequestCount),r=t.corkedRequestsFree;r.entry=n;for(var o=0,a=!0;n;)i[o]=n,n.isBuf||(a=!1),n=n.next,o+=1;i.allBuffers=a,b(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk;if(b(e,t,!1,t.objectMode?1:l.length,l,n.encoding,n.callback),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var n=w(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(y,h),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===y&&e&&e._writableState instanceof v}})):u=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(p.isBuffer(i=e)||i instanceof f);return a&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=m),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var r=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(i,s),r=!1),r}(this,r,e,n))&&(r.pendingcb++,s=function(e,t,n,i,r,o){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,r)),t}(t,i);i!==s&&(n=!0,r="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,i,r,o);return l}(this,r,a,e,t,n)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||S(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(8),n(118).setImmediate,n(9))},function(e,t,n){"use strict";var i=n(15).Buffer,r=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
1case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},o.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var r=s(t[i]);return r>=0?(r>0&&(e.lastNeed=r-1),r):--i<n||-2===r?0:(r=s(t[i]))>=0?(r>0&&(e.lastNeed=r-2),r):--i<n||-2===r?0:(r=s(t[i]))>=0?(r>0&&(2===r?r=0:e.lastNeed=r-3),r):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=o;var i=n(14),r=n(23);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e),this._transformState={afterTransform:(function(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}).bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){a(e,t,n)}):a(this,null,null)}function a(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}r.inherits=n(11),r.inherits(o,i),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var n=this;i.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";var i=n(12);e.exports=function(){return i(this).length=0,this}},function(e,t,n){"use strict";var i=n(130),r=Math.max;e.exports=function(e){return r(0,i(e))}},function(e,t,n){"use strict";var i=Object.create,r=Object.getPrototypeOf,o={};e.exports=function(){var e=Object.setPrototypeOf;return"function"==typeof e&&r(e((arguments[0]||i)(null),o))===o}},function(e,t,n){"use strict";var i,r=n(134),o=n(12),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};i=function(e,t){if(o(e),null===t||r(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(i(e,t),t),e}):t=function(e,t){return i(e,t).__proto__=t,e}:t=function e(t,n){var r;return i(t,n),(r=s.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,r&&a(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");
1if(i){try{(e=i.set).call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return t.__proto__=n,Object.getPrototypeOf(t)===n?{level:2}:((t={}).__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}()),n(135)},function(e,t,n){"use strict";var i=n(136),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!i(e)&&!r.test(o.call(e))}},function(e,t,n){"use strict";var i=n(19),r=Array.prototype.forEach,o=Object.create;e.exports=function(e){var t=o(null);return r.call(arguments,function(e){i(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";e.exports=n(143)()?String.prototype.contains:n(144)},function(e,t,n){"use strict";var i=n(148);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not a symbol");return e}},function(e,t,n){"use strict";var i=n(152);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not iterable");return e}},function(e,t,n){"use strict";var i=n(20),r=n(33),o=n(158),s=n(159),a=function(e,t){return e.replace("%v",s(t))};e.exports=function(e,t,n){if(!r(n))throw new TypeError(a(t,e));if(!i(e)){if("default"in n)return n.default;if(n.isOptional)return null}var s=o(n.errorMessage);throw i(s)||(s=t),new TypeError(a(s,e))}},function(e,t,n){"use strict";var i=n(15).Buffer,r=e.exports;for(var o in r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.codes={},r.types)r.codes[r.types[o]]=o;for(var s in r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.LENGTH_MASK=127,r.LENGTH_FIN_MASK=128,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=i.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=i.from([r.codes.connack<<r.CMD_SHIFT]),r.USERNAME_MASK=128,r.PASSWORD_MASK=64,r.WILL_RETAIN_MASK=32,r.WILL_QOS_MASK=24,r.WILL_QOS_SHIFT=3,r.WILL_FLAG_MASK=4,r.CLEAN_SESSION_MASK=2,r.CONNECT_HEADER=i.from([r.codes.connect<<r.CMD_SHIFT]),r.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},r.propertiesCodes={},r.properties)r.propertiesCodes[r.properties[s]]=s;function a(e){return[0,1,2].map(function(t){return[0,1].map(function(n){return[0,1].map(function(o){var s=i.alloc(1);return s.writeUInt8(r.codes[e]<<r.CMD_SHIFT|(n?r.DUP_MASK:0)|t<<r.QOS_SHIFT|o,0,!0),s})})})}r.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},r.PUBLISH_HEADER=a("publish"),r.SUBSCRIBE_HEADER=a("subscribe"),r.SUBSCRIBE_OPTIONS_QOS_MASK=3,r.SUBSCRIBE_OPTIONS_NL_MASK=1,r.SUBSCRIBE_OPTIONS_NL_SHIFT=2,r.SUBSCRIBE_OPTIONS_RAP_MASK=1,r.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,r.SUBSCRIBE_OPTIONS_RH_MASK=3,r.SUBSCRIBE_OPTIONS_RH_SHIFT=4,r.SUBSCRIBE_OPTIONS_RH=[0,16,32],r.SUBSCRIBE_OPTIONS_NL=4,r.SUBSCRIBE_OPTIONS_RAP=8,r.SUBSCRIBE_OPTIONS_QOS=[0,1,2],r.UNSUBSCRIBE_HEADER=a("unsubscribe"),r.ACKS={unsuback:a("unsuback"),puback:a("puback"),pubcomp:a("pubcomp"),pubrel:a("pubrel"),pubrec:a("pubrec")}
1,r.SUBACK_HEADER=i.from([r.codes.suback<<r.CMD_SHIFT]),r.VERSION3=i.from([3]),r.VERSION4=i.from([4]),r.VERSION5=i.from([5]),r.QOS=[0,1,2].map(function(e){return i.from([e])}),r.EMPTY={pingreq:i.from([r.codes.pingreq<<4,0]),pingresp:i.from([r.codes.pingresp<<4,0]),disconnect:i.from([r.codes.disconnect<<4,0])}},function(e,t,n){"use strict";var i=n(66),r=n(15).Buffer,o=r.allocUnsafe(0),s=r.from([0]),a=n(184),l=n(22).nextTick,c=a.cache,u=a.generateNumber,d=a.generateCache,h=a.genBufVariableByteInt,p=a.generate4ByteBuffer,f=w,g=!0;function m(e,t,n){switch(t.cork&&(t.cork(),l(v,t)),g&&(g=!1,d()),e.cmd){case"connect":return function(e,t,n){var o=e||{},s=o.protocolId||"MQTT",a=o.protocolVersion||4,l=o.will,c=o.clean,u=o.keepalive||0,d=o.clientId||"",h=o.username,p=o.password,g=o.properties;void 0===c&&(c=!0);var m=0;if(!s||"string"!=typeof s&&!r.isBuffer(s))return t.emit("error",new Error("Invalid protocolId")),!1;if(m+=s.length+2,3!==a&&4!==a&&5!==a)return t.emit("error",new Error("Invalid protocol version")),!1;if(m+=1,"string"!=typeof d&&!r.isBuffer(d)||!d&&4!==a||!d&&!c){if(a<4)return t.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*c==0)return t.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}else m+=d.length+2;if("number"!=typeof u||u<0||u>65535||u%1!=0)return t.emit("error",new Error("Invalid keepalive")),!1;if(m+=2,m+=1,5===a){var v=C(t,g);m+=v.length}if(l){if("object"!=typeof l)return t.emit("error",new Error("Invalid will")),!1;if(!l.topic||"string"!=typeof l.topic)return t.emit("error",new Error("Invalid will topic")),!1;if(m+=r.byteLength(l.topic)+2,m+=2,l.payload){if(!(l.payload.length>=0))return t.emit("error",new Error("Invalid will payload")),!1;m+="string"==typeof l.payload?r.byteLength(l.payload):l.payload.length}var y={};5===a&&(m+=(y=C(t,l.properties)).length)}var S=!1;if(null!=h){if(!k(h))return t.emit("error",new Error("Invalid username")),!1;S=!0,m+=r.byteLength(h)+2}if(null!=p){if(!S)return t.emit("error",new Error("Username is required to use password")),!1;if(!k(p))return t.emit("error",new Error("Invalid password")),!1;m+=A(p)+2}t.write(i.CONNECT_HEADER),b(t,m),T(t,s),t.write(4===a?i.VERSION4:5===a?i.VERSION5:i.VERSION3);var w=0;return w|=null!=h?i.USERNAME_MASK:0,w|=null!=p?i.PASSWORD_MASK:0,w|=l&&l.retain?i.WILL_RETAIN_MASK:0,w|=l&&l.qos?l.qos<<i.WILL_QOS_SHIFT:0,w|=l?i.WILL_FLAG_MASK:0,t.write(r.from([w|=c?i.CLEAN_SESSION_MASK:0])),f(t,u),5===a&&v.write(),T(t,d),l&&(5===a&&y.write(),_(t,l.topic),T(t,l.payload)),null!=h&&T(t,h),null!=p&&T(t,p),!0}(e,t);case"connack":return function(e,t,n){var o=n?n.protocolVersion:4,a=e||{},l=5===o?a.reasonCode:a.returnCode,c=a.properties,u=2;if("number"!=typeof l)return t.emit("error",new Error("Invalid return code")),!1;var d=null;return 5===o&&(u+=(d=C(t,c)).length),t.write(i.CONNACK_HEADER),b(t,u),t.write(a.sessionPresent?i.SESSIONPRESENT_HEADER:s),t.write(r.from([l])),null!=d&&d.write(),!0}(e,t,n);case"publish":return function(e,t,n){var s=n?n.protocolVersion:4,a=e||{},l=a.qos||0,c=a.retain?i.RETAIN_MASK:0,u=a.topic,d=a.payload||o,h=a.messageId,p=a.properties,g=0;if("string"==typeof u)g+=r.byteLength(u)+2;else{if(!r.isBuffer(u))return t.emit("error",new Error("Invalid topic")),!1;g+=u.length+2}if(r.isBuffer(d)?g+=d.length:g+=r.byteLength(d),l&&"number"!=typeof h)return t.emit("error",new Error("Invalid messageId")),!1;l&&(g+=2);var m=null;return 5===s&&(g+=(m=C(t,p)).length),t.write(i.PUBLISH_HEADER[l][a.dup?1:0][c?1:0]),b(t,g),f(t,A(u)),t.write(u),l>0&&f(t,h),null!=m&&m.write(),t.write(d)}(e,t,n);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.cmd||"puback",l=s.messageId,c=s.dup&&"pubrel"===a?i.DUP_MASK:0,u=0,d=s.reasonCode,h=s.properties,p=5===o?3:2;if("pubrel"===a&&(u=1),"number"!=typeof l)return t.emit("error",new Error("Invalid messageId")),!1;var g=null;if(5===o){if(!(g=I(t,h,n,p)))return!1;p+=g.length}return t.write(i.ACKS[a][u][c][0]),b(t,p),f(t,l),5===o&&t.write(r.from([d])),null!==g&&g.write(),!0}(e,t,n);case"subscribe":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.dup?i.DUP_MASK:0,l=s.messageId,c=s.subscriptions,u=s.properties,d=0;if("number"!=typeof l)return t.emit("error",new Error("Invalid messageId")),!1;d+=2;var h=null;if(5===o&&(d+=(h=C(t,u)).length),"object"!=typeof c||!c.length)return t.emit("error",new Error("Invalid subscriptions")),!1;for(var p=0;p<c.length;p+=1){var g=c[p].topic,m=c[p].qos;if("string"!=typeof g)return t.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!=typeof m)return t.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===o){if("boolean"!=typeof(c[p].nl||!1))return t.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if("boolean"!=typeof(c[p].rap||!1))return t.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;var v=c[p].rh||0;if("number"!=typeof v||v>2)return t.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}d+=r.byteLength(g)+2+1}t.write(i.SUBSCRIBE_HEADER[1][a?1:0][0]),b(t,d),f(t,l),null!==h&&h.write();for(var y=!0,S=0;S<c.length;S++){var w,E=c[S],T=E.qos,I=+E.nl,R=+E.rap,D=E.rh;
1_(t,E.topic),w=i.SUBSCRIBE_OPTIONS_QOS[T],5===o&&(w|=I?i.SUBSCRIBE_OPTIONS_NL:0,w|=R?i.SUBSCRIBE_OPTIONS_RAP:0,w|=D?i.SUBSCRIBE_OPTIONS_RH[D]:0),y=t.write(r.from([w]))}return y}(e,t,n);case"suback":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.messageId,l=s.granted,c=s.properties,u=0;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;if(u+=2,"object"!=typeof l||!l.length)return t.emit("error",new Error("Invalid qos vector")),!1;for(var d=0;d<l.length;d+=1){if("number"!=typeof l[d])return t.emit("error",new Error("Invalid qos vector")),!1;u+=1}var h=null;if(5===o){if(!(h=I(t,c,n,u)))return!1;u+=h.length}return t.write(i.SUBACK_HEADER),b(t,u),f(t,a),null!==h&&h.write(),t.write(r.from(l))}(e,t,n);case"unsubscribe":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.messageId,l=s.dup?i.DUP_MASK:0,c=s.unsubscriptions,u=s.properties,d=0;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;if(d+=2,"object"!=typeof c||!c.length)return t.emit("error",new Error("Invalid unsubscriptions")),!1;for(var h=0;h<c.length;h+=1){if("string"!=typeof c[h])return t.emit("error",new Error("Invalid unsubscriptions")),!1;d+=r.byteLength(c[h])+2}var p=null;5===o&&(d+=(p=C(t,u)).length),t.write(i.UNSUBSCRIBE_HEADER[1][l?1:0][0]),b(t,d),f(t,a),null!==p&&p.write();for(var g=!0,m=0;m<c.length;m++)g=_(t,c[m]);return g}(e,t,n);case"unsuback":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.messageId,l=s.dup?i.DUP_MASK:0,c=s.granted,u=s.properties,d=s.cmd,h=2;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;if(5===o){if("object"!=typeof c||!c.length)return t.emit("error",new Error("Invalid qos vector")),!1;for(var p=0;p<c.length;p+=1){if("number"!=typeof c[p])return t.emit("error",new Error("Invalid qos vector")),!1;h+=1}}var g=null;if(5===o){if(!(g=I(t,u,n,h)))return!1;h+=g.length}return t.write(i.ACKS[d][0][l][0]),b(t,h),f(t,a),null!==g&&g.write(),5===o&&t.write(r.from(c)),!0}(e,t,n);case"pingreq":case"pingresp":return function(e,t,n){return t.write(i.EMPTY[e.cmd])}(e,t);case"disconnect":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.reasonCode,l=5===o?1:0,c=null;if(5===o){if(!(c=I(t,s.properties,n,l)))return!1;l+=c.length}return t.write(r.from([i.codes.disconnect<<4])),b(t,l),5===o&&t.write(r.from([a])),null!==c&&c.write(),!0}(e,t,n);case"auth":return function(e,t,n){var o=n?n.protocolVersion:4,s=e||{},a=s.reasonCode,l=s.properties,c=5===o?1:0;5!==o&&t.emit("error",new Error("Invalid mqtt version for auth packet"));var u=I(t,l,n,c);return!!u&&(c+=u.length,t.write(r.from([i.codes.auth<<4])),b(t,c),t.write(r.from([a])),null!==u&&u.write(),!0)}(e,t,n);default:return t.emit("error",new Error("Unknown command")),!1}}function v(e){e.uncork()}Object.defineProperty(m,"cacheNumbers",{get:function(){return f===w},set:function(e){e?(c&&0!==Object.keys(c).length||(g=!0),f=w):(g=!1,f=E)}});var y={};function b(e,t){var n=y[t];n||(n=h(t).data,t<16384&&(y[t]=n)),e.write(n)}function _(e,t){var n=r.byteLength(t);f(e,n),e.write(t,"utf8")}function S(e,t,n){_(e,t),_(e,n)}function w(e,t){return e.write(c[t])}function E(e,t){return e.write(u(t))}function T(e,t){"string"==typeof t?_(e,t):t?(f(e,t.length),e.write(t)):f(e,0)}function C(e,t){if("object"!=typeof t||null!=t.length)return{length:1,write:function(){D(e,{},0)}};var n=0;function o(t,n){var o=0;switch(i.propertiesTypes[t]){case"byte":if("boolean"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=2;break;case"int8":if("number"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=2;break;case"binary":if(n&&null===n)return e.emit("error",new Error("Invalid "+t)),!1;o+=1+r.byteLength(n)+2;break;case"int16":if("number"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=3;break;case"int32":if("number"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=5;break;case"var":if("number"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=1+h(n).length;break;case"string":if("string"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=3+r.byteLength(n.toString());break;case"pair":if("object"!=typeof n)return e.emit("error",new Error("Invalid "+t)),!1;o+=Object.getOwnPropertyNames(n).reduce(function(e,t){var i=n[t];return Array.isArray(i)?e+=i.reduce(function(e,n){return e+(3+r.byteLength(t.toString())+2+r.byteLength(n.toString()))},0):e+=3+r.byteLength(t.toString())+2+r.byteLength(n[t].toString()),e},0);break;default:return e.emit("error",new Error("Invalid property "+t)),!1}return o}if(t)for(var s in t){var a=0,l=t[s];if(Array.isArray(l))for(var c=0;c<l.length;c++)a+=o(s,l[c]);else a=o(s,l);if(!a)return!1;n+=a}return{length:h(n).length+n,write:function(){D(e,t,n)}}}function I(e,t,n,i){var r=["reasonString","userProperties"],o=n&&n.properties&&n.properties.maximumPacketSize?n.properties.maximumPacketSize:0,s=C(e,t);if(o)for(;i+s.length>o;){var a=r.shift();if(!a||!t[a])return!1;delete t[a],s=C(e,t)}return s}function R(e,t,n){switch(i.propertiesTypes[t]){case"byte":e.write(r.from([i.properties[t]])),e.write(r.from([+n]));break;case"int8":e.write(r.from([i.properties[t]])),e.write(r.from([n]));break;case"binary":e.write(r.from([i.properties[t]])),T(e,n);break;case"int16":e.write(r.from([i.properties[t]])),f(e,n);break;case"int32":e.write(r.from([i.properties[t]])),function(e,t){e.write(p(n))}(e);break;case"var":e.write(r.from([i.properties[t]])),b(e,n);break;case"string":e.write(r.from([i.properties[t]])),_(e,n);break;
1case"pair":Object.getOwnPropertyNames(n).forEach(function(o){var s=n[o];Array.isArray(s)?s.forEach(function(n){e.write(r.from([i.properties[t]])),S(e,o.toString(),n.toString())}):(e.write(r.from([i.properties[t]])),S(e,o.toString(),s.toString()))});break;default:return e.emit("error",new Error("Invalid property "+t+" value: "+n)),!1}}function D(e,t,n){for(var i in b(e,n),t)if(t.hasOwnProperty(i)&&null!==t[i]){var r=t[i];if(Array.isArray(r))for(var o=0;o<r.length;o++)R(e,i,r[o]);else R(e,i,r)}}function A(e){return e?e instanceof r?e.length:r.byteLength(e):0}function k(e){return"string"==typeof e||e instanceof r}e.exports=m},function(e,t,n){"use strict";var i=n(187),r=n(189);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return r.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(190);function b(e,t,n){if(e&&r.isObject(e)&&e instanceof o)return e;var i=new o;return i.parse(e,t,n),i}o.prototype.parse=function(e,t,n){if(!r.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!n&&1===e.split("#").length){var _=l.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=s.exec(b);if(S){var w=(S=S[0]).toLowerCase();this.protocol=w,b=b.substr(S.length)}if(n||S||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||S&&m[S]||(b=b.substr(2),this.slashes=!0)}if(!m[S]&&(E||S&&!v[S])){for(var T,C,I=-1,R=0;R<h.length;R++)-1!==(D=b.indexOf(h[R]))&&(-1===I||D<I)&&(I=D);for(-1!==(C=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(T=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(T)),I=-1,R=0;R<d.length;R++){var D;-1!==(D=b.indexOf(d[R]))&&(-1===I||D<I)&&(I=D)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var k=this.hostname.split(/\./),O=(R=0,k.length);R<O;R++){var x=k[R];if(x&&!x.match(p)){for(var N="",P=0,M=x.length;P<M;P++)x.charCodeAt(P)>127?N+="x":N+=x[P];if(!N.match(p)){var L=k.slice(0,R),j=k.slice(R+1),F=x.match(f);F&&(L.push(F[1]),j.unshift(F[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),A||(this.hostname=i.toASCII(this.hostname));var U=this.port?":"+this.port:"";this.host=(this.hostname||"")+U,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[w])for(R=0,O=u.length;R<O;R++){var H=u[R];if(-1!==b.indexOf(H)){var B=encodeURIComponent(H);B===H&&(B=escape(H)),b=b.split(H).join(B)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var W=b.indexOf("?");return-1!==W?(this.search=b.substr(W),this.query=b.substr(W+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,W)):t&&(this.search="",this.query={}),b&&(this.pathname=b),v[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(this.path=(U=this.pathname||"")+(this.search||"")),this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(r.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}return n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,(n.pathname||n.search)&&(n.path=(n.pathname||"")+(n.search||"")),n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=y||g||n.host&&e.pathname,_=b,S=n.pathname&&n.pathname.split("/")||[],w=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(w&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),b=b&&(""===f[0]||""===S[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=f;else if(f.length)S||(S=[]),S.pop(),S=S.concat(f),n.search=e.search,n.query=e.query;else if(!r.isNullOrUndefined(e.search))return w&&(n.hostname=n.host=S.shift(),(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift())),n.search=e.search,n.query=e.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!S.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var E=S.slice(-1)[0],T=(n.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,C=0,I=S.length;I>=0;I--)"."===(E=S[I])?S.splice(I,1):".."===E?(S.splice(I,1),C++):C&&(S.splice(I,1),C--);if(!b&&!_)for(;C--;C)S.unshift("..");!b||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),T&&"/"!==S.join("/").substr(-1)&&S.push("");var R,D=""===S[0]||S[0]&&"/"===S[0].charAt(0);return w&&(n.hostname=n.host=D?"":S.length?S.shift():"",(R=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=R.shift(),n.host=n.hostname=R.shift())),(b=b||n.host&&S.length)&&!D&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";var i=n(193);e.exports=function(e,t){return t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost",i.createConnection(t.port,t.hostname)}},function(e,t,n){"use strict";(function(t,i){var r,o,s,a=n(17).Transform,l=n(37);e.exports=function(e,n){if(n.hostname=n.hostname||n.host,!n.hostname)throw new Error("Could not determine host. Specify host manually.");var c="MQIsdp"===n.protocolId&&3===n.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(n);var u=function(e,t){var n="wxs"===e.protocol?"wss":"ws",i=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(i=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(i=e.transformWsUrl(i,e,t)),i}(n,e);r=wx.connectSocket({url:u,protocols:c}),o=function(){var e=new a;return e._write=function(e,t,n){r.send({data:e.buffer,success:function(){n()},fail:function(e){n(new Error(e))}})},e._flush=function(e){r.close({success:function(){e()}})},e}(),(s=l.obj())._destroy=function(e,t){r.close({success:function(){t&&t(e)}})};var d=s.destroy;return s.destroy=(function(){s.destroy=d;var e=this;i.nextTick(function(){r.close({fail:function(){e._destroy(new Error)}})})}
1).bind(s),r.onOpen(function(){s.setReadable(o),s.setWritable(o),s.emit("connect")}),r.onMessage(function(e){var n=e.data;n=n instanceof ArrayBuffer?t.from(n):t.from(n,"utf8"),o.push(n)}),r.onClose(function(){s.end(),s.destroy()}),r.onError(function(e){s.destroy(new Error(e.errMsg))}),s}}).call(this,n(18).Buffer,n(8))},function(e,t,n){"use strict";(function(t){var i,r,o,s=n(17).Transform,a=n(37),l=n(51),c=!1;e.exports=function(e,n){if(n.hostname=n.hostname||n.host,!n.hostname)throw new Error("Could not determine host. Specify host manually.");var u="MQIsdp"===n.protocolId&&3===n.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(n);var d=function(e,t){var n="alis"===e.protocol?"wss":"ws",i=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(i=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(i=e.transformWsUrl(i,e,t)),i}(n,e);return(i=n.my).connectSocket({url:d,protocols:u}),r=function(){var e=new s;return e._write=function(e,t,n){i.sendSocketMessage({data:e.buffer,success:function(){n()},fail:function(){n(new Error)}})},e._flush=function(e){i.closeSocket({success:function(){e()}})},e}(),o=a.obj(),c||(c=!0,i.onSocketOpen(function(){o.setReadable(r),o.setWritable(r),o.emit("connect")}),i.onSocketMessage(function(e){if("string"==typeof e.data){var n=l.toByteArray(e.data),i=t.from(n);
1r.push(i)}else{var o=new FileReader;o.addEventListener("load",function(){var e=o.result;e=e instanceof ArrayBuffer?t.from(e):t.from(e,"utf8"),r.push(e)}),o.readAsArrayBuffer(e.data)}}),i.onSocketClose(function(){o.end(),o.destroy()}),i.onSocketError(function(e){o.destroy(e)})),o}}).call(this,n(18).Buffer)},function(e,t,n){"use strict";(function(t){var i=n(199),r=n(68),o=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],s="browser"===t.title;function a(e,t){var n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.port||(e.port="wss"===e.protocol?443:80),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={}),s||"wss"!==e.protocol||o.forEach(function(t){e.hasOwnProperty(t)&&!e.wsOptions.hasOwnProperty(t)&&(e.wsOptions[t]=e[t])})}(t);var r=function(e,t){var n=e.protocol+"://"+e.hostname+":"+e.port+e.path;return"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(t,e);return i(r,[n],t.wsOptions)}e.exports=s?function(e,t){if(t.hostname||(t.hostname=t.host),!t.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");var n=r.parse(document.URL);t.hostname=n.hostname,t.port||(t.port=n.port)}return a(e,t)}:function(e,t){return a(e,t)}}).call(this,n(8))},function(e,t){e.exports=function(e){this.wrapped=e}},function(e,t,n){var i=n(103);e.exports=function(e,t){return i(Date.now(),e,t)}},function(e,t,n){(function(t){var n="Expected a function",i=NaN,r="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),p=Object.prototype.toString,f=Math.max,g=Math.min,m=function(){return h.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==r}(e))return i;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?i:+e}e.exports=function(e,t,i){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError(n);return v(i)&&(r="leading"in i?!!i.leading:r,o="trailing"in i?!!i.trailing:o),function(e,t,i){var r,o,s,a,l,c,u=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(n);function b(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function _(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-u>=s}function S(){var e=m();if(_(e))return w(e);l=setTimeout(S,function(e){var n=t-(e-c);return h?g(n,s-(e-u)):n}(e))}function w(e){return l=void 0,p&&r?b(e):(r=o=void 0,a)}function E(){var e=m(),n=_(e);if(r=arguments,o=this,c=e,n){if(void 0===l)return function(e){return u=e,l=setTimeout(S,t),d?b(e):a}(c);if(h)return l=setTimeout(S,t),b(c)}return void 0===l&&(l=setTimeout(S,t)),a}return t=y(t)||0,v(i)&&(d=!!i.leading,s=(h="maxWait"in i)?f(y(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),E.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=c=o=l=void 0},E.flush=function(){return void 0===l?a:w(m())},E}(e,t,{leading:r,maxWait:t,trailing:o})}}).call(this,n(9))},function(e,t,n){var i=n(110),r=n(111),o=n(42),s=n(112);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";(function(t){var i=n(113),r=n(47),o=n(68),s=n(31),a={};function l(e,t){if("object"!=typeof e||t||(t=e,e=null),t=t||{},e){var n=o.parse(e,!0);if(null!=n.port&&(n.port=Number(n.port)),null===(t=s(n,t)).protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(function(e){var t;e.auth&&((t=e.auth.match(/^(.+):(.+)$/))?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtt
1s";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!a[t.protocol]){var r=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(e,t){return(!r||t%2!=0)&&"function"==typeof a[e]})[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");return t.protocol&&(t.defaultProtocol=t.protocol),new i(function(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),a[t.protocol](e,t)},t)}"browser"!==t.title?(a.mqtt=n(69),a.tcp=n(69),a.ssl=n(36),a.tls=n(36),a.mqtts=n(36)):(a.wx=n(70),a.wxs=n(70),a.ali=n(71),a.alis=n(71)),a.ws=n(72),a.wss=n(72),e.exports=l,e.exports.connect=l,e.exports.MqttClient=i,e.exports.Store=r}).call(this,n(8))},function(e,t,n){(function(t){var n=NaN,i="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype.toString,p=Math.max,f=Math.min,g=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&h.call(e)==i}(e))return n;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var c=s.test(e);return c||a.test(e)?l(e.slice(2),c?2:8):o.test(e)?n:+e}e.exports=function(e,t,n){var i,r,o,s,a,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=i,o=r;return i=r=void 0,c=t,s=e.apply(o,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function _(){var e=g();if(b(e))return S(e);a=setTimeout(_,function(e){var n=t-(e-l);return d?f(n,o-(e-c)):n}(e))}function S(e){return a=void 0,h&&i?y(e):(i=r=void 0,s)}function w(){var e=g(),n=b(e);if(i=arguments,r=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(_,t),u?y(e):s}(l);if(d)return a=setTimeout(_,t),y(l)}return void 0===a&&(a=setTimeout(_,t)),s}return t=v(t)||0,m(n)&&(u=!!n.leading,o=(d="maxWait"in n)?p(v(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),w.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},w.flush=function(){return void 0===a?s:S(g())},w}}).call(this,n(9))},function(e){e.exports=JSON.parse('{"name":"qiscus-sdk-core","version":"2.10.3","description":"Qiscus Web SDK Core","license":"MIT","main":"lib/index.js","browser":"dist/qiscus-sdk-core.min.js","files":["lib","dist"],"scripts":{"build":"npm-run-all --parallel build:node build:web","build:dev":"npm-run-all --parallel build:node build:web:dev build:dev:watch","build:dev:watch":"npm-run-all --parallel build:web:watch serve","build:node":"babel -d lib src","build:node:watch":"babel -w -d lib src","build:web":"webpack --env.production --env.target=web","build:web:dev":"webpack --env.development --env.target=web","build:web:watch":"webpack --env.development --env.target=web --watch","dev":"webpack --env.development --progress --colors --watch","watch":"npm-run-all build:web:watch build:node:watch","test":"mocha --require @babel/register --colors \'test/**/*test.js\'","test:watch":"npm run test -- -w","clean":"rimraf dist lib","preversion":"npm-run-all clean build","prepublishOnly":"npm-run-all clean build","serve":"http-server -p 1234 -c-1 dist"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/polyfill":"^7.8.3","@babel/preset-env":"^7.8.6","@babel/register":"^7.8.6","@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","babel-eslint":"^8.0.0","babel-loader":"^8.0.6","babel-minify-webpack-plugin":"^0.2.0","babel-plugin-add-module-exports":"^1.0.2","babel-plugin-date-fns":"^0.1.0","chai":"^4.1.2","chai-spies":"^1.0.0","eslint":"^4.19.1","eslint-config-standard":"^12.0.0","eslint-loader":"^1.9.0","eslint-plugin-import":"^2.20.1","eslint-plugin-node":"^8.0.1","eslint-plugin-
1promise":"^4.2.1","eslint-plugin-standard":"^4.0.1","http-server":"^0.12.3","husky":"^3.1.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","rimraf":"^2.7.1","serve":"^11.3.2","webpack":"^4.41.6","webpack-cli":"^3.3.11"},"dependencies":{"@babel/runtime":"^7.8.4","date-fns":"^1.30.1","is_js":"^0.9.0","lodash.debounce":"^4.0.8","lodash.throttle":"^4.1.1","mitt":"^1.2.0","mqtt":"^3.0.0","qiscus-sdk-core":"^2.9.5","store":"^2.0.12","superagent":"^3.6.3"},"babel":{"presets":[["@babel/preset-env",{"modules":"auto"}]],"plugins":["@babel/plugin-transform-runtime","@babel/plugin-proposal-class-properties","babel-plugin-add-module-exports","date-fns"]}}')},function(e,t,n){e.exports=n(202)},function(e,t,n){var i=n(41);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=Object.create((t&&t.prototype instanceof m?t:m).prototype),o=new D(i||[]);return r._invoke=function(e,t,n){var i=d;return function(r,o){if(i===p)throw new Error("Generator is already running");if(i===f){if("throw"===r)throw o;return k()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=C(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=u(e,t,n);if("normal"===l.type){if(i=n.done?f:h,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=f,n.method="throw",n.arg=l.arg)}}}(e,n,o),r}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",f="completed",g={};function m(){}function v(){}function y(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,S=_&&_(_(A([])));S&&S!==n&&i.call(S,o)&&(b=S);var w=y.prototype=m.prototype=Object.create(b);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){var n;this._invoke=function(r,o){function s(){return new t(function(n,s){!function n(r,o,s,a){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,s,a)},function(e){n("throw",e,s,a)}):t.resolve(d).then(function(e){c.value=e,s(c)},function(e){return n("throw",e,s,a)})}a(l.arg)}(r,o,n,s)})}return n=n?n.then(s,s):s()}}function C(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function A(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,s=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:k}}function k(){return{value:t,done:!0}}return v.prototype=w.constructor=y,y.constructor=v,v.displayName=l(y,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,a,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(T.prototype),T.prototype[s]=function(){return this},e.AsyncIterator=T,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new T(c(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then(function(e){return e.done?e.value:s.next()})},E(w),l(w,a,"Generator"),w[o]=function(){return this},w.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=A,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
vendor: 10,780 bytes, line 1
1h(R),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return a.type="throw",a.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;R(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t,n){function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}e.exports=i,i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},i.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<i.length;r++)if((n=i[r])===t||n.fn===t){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},i.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,t)}return this},i.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},i.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){"use strict";var i=n(43);function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},r.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~o.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,i){n?t(n):e(i)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.getHeader=r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.set=function(e,t){if(i(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization","Basic "+i(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},r.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=i(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),this._data="application/x-www-form-urlencoded"==(n=this._header["content-type"])?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var i=new Error(e+t+"ms exceeded");i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.abort(),this.callback(i)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){"use strict";var i=n(89);function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,n){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),i=n.shift(),r=n.shift();return i&&r&&(e[i]=r),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),i=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=i,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}
1),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n},function(e,t,n){var i=n(7),r=n(93),o=n(94);e.exports=function(e){var t=i(e);return o(t,r(t))+1}},function(e,t){e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},function(e,t,n){var i=n(7);e.exports=function(e){var t=i(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},function(e,t,n){var i=n(95);e.exports=function(e,t){var n=i(e),r=i(t),o=n.getTime()-6e4*n.getTimezoneOffset(),s=r.getTime()-6e4*r.getTimezoneOffset();return Math.round((o-s)/864e5)}},function(e,t,n){var i=n(7);e.exports=function(e){var t=i(e);return t.setHours(0,0,0,0),t}},function(e,t,n){var i=n(7),r=n(30),o=n(98);e.exports=function(e){var t=i(e),n=r(t).getTime()-o(t).getTime();return Math.round(n/6048e5)+1}},function(e,t,n){var i=n(7);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,r=i(e),o=r.getDay(),s=(o<n?7:0)+o-n;return r.setDate(r.getDate()-s),r.setHours(0,0,0,0),r}},function(e,t,n){var i=n(45),r=n(30);e.exports=function(e){var t=i(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),r(n)}},function(e,t,n){var i=n(44);e.exports=function(e){if(i(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")}},function(e,t){e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,i){var r;return i=i||{},r="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),i.addSuffix?i.comparison>0?"in "+r:r+" ago":r}}}},function(e,t,n){var i=n(102);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s=["AM","PM"],a=["am","pm"],l=["a.m.","p.m."],c={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return r[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?s[1]:s[0]},a:function(e){return e.getHours()/12>=1?a[1]:a[0]},aa:function(e){return e.getHours()/12>=1?l[1]:l[0]}};return["M","D","DDD","d","Q","W"].forEach(function(e){c[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}}),{formatters:c,formattingTokensRegExp:i(c)}}},function(e,t){var n=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);var r=n.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+r.join("|")+"|.)","g")}},function(e,t,n){var i=n(104),r=n(7),o=n(105),s=n(107),a=n(46),l=43200;e.exports=function(e,t,n){var c=n||{},u=i(e,t),d=c.locale,h=a.distanceInWords.localize;d&&d.distanceInWords&&d.distanceInWords.localize&&(h=d.distanceInWords.localize);var p,f,g={addSuffix:Boolean(c.addSuffix),comparison:u};u>0?(p=r(e),f=r(t)):(p=r(t),f=r(e));var m,v=o(f,p),y=f.getTimezoneOffset()-p.getTimezoneOffset(),b=Math.round(v/60)-y;if(b<2)return c.includeSeconds?v<5?h("lessThanXSeconds",5,g):v<10?h("lessThanXSeconds",10,g):v<20?h("lessThanXSeconds",20,g):v<40?h("halfAMinute",null,g):
1h(v<60?"lessThanXMinutes":"xMinutes",1,g):0===b?h("lessThanXMinutes",1,g):h("xMinutes",b,g);if(b<45)return h("xMinutes",b,g);if(b<90)return h("aboutXHours",1,g);if(b<1440)return h("aboutXHours",Math.round(b/60),g);if(b<2520)return h("xDays",1,g);if(b<l)return h("xDays",Math.round(b/1440),g);if(b<86400)return h("aboutXMonths",m=Math.round(b/l),g);if((m=s(f,p))<12)return h("xMonths",Math.round(b/l),g);var _=m%12,S=Math.floor(m/12);return _<3?h("aboutXYears",S,g):_<9?h("overXYears",S,g):h("almostXYears",S+1,g)}},function(e,t,n){var i=n(7);e.exports=function(e,t){var n=i(e).getTime(),r=i(t).getTime();return n>r?-1:n<r?1:0}},function(e,t,n){var i=n(106);e.exports=function(e,t){var n=i(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}},function(e,t,n){var i=n(7);e.exports=function(e,t){var n=i(e),r=i(t);return n.getTime()-r.getTime()}},function(e,t,n){var i=n(7),r=n(108),o=n(109);e.exports=function(e,t){var n=i(e),s=i(t),a=o(n,s),l=Math.abs(r(n,s));return n.setMonth(n.getMonth()-a*l),a*(l-(o(n,s)===-a))}},function(e,t,n){var i=n(7);e.exports=function(e,t){var n=i(e),r=i(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}},function(e,t,n){var i=n(7);e.exports=function(e,t){var n=i(e).getTime(),r=i(t).getTime();return n<r?-1:n>r?1:0}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";(function(t,i){var r=n(21),o=n(47),s=n(175),a=n(17).Writable,l=n(11),c=n(185),u=n(186),d=n(31),h=t.setImmediate||function(e){i.nextTick(e)},p={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},f={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invali
1d",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function g(e,t,n){e.emit("packetsend",t),!s.writeToStream(t,e.stream,e.options)&&n?e.stream.once("drain",n):n&&n()}function m(e,t,n,i){e.outgoingStore.put(t,function(r){if(r)return n&&n(r);i(),g(e,t,n)})}function v(){}function y(e,t){var n,i=this;if(!(this instanceof y))return new y(e,t);for(n in this.options=t||{},p)this.options[n]=void 0===this.options[n]?p[n]:t[n];this.options.clientId="string"==typeof t.clientId?t.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),this.options.customHandleAcks=5===t.protocolVersion&&t.customHandleAcks?t.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=e,this.outgoingStore=t.outgoingStore||new o,this.incomingStore=t.incomingStore||new o,this.queueQoSZero=void 0===t.queueQoSZero||t.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("close",function(){this.connected=!1,clearTimeout(this.connackTimer)}),this.on("connect",function(){var e=this.queue;!function t(){var n=e.shift();n&&i._sendPacket(n.packet,function(e){n.cb&&n.cb(e),t()})}()}),this.on("close",function(){null!==i.pingTimer&&(i.pingTimer.clear(),i.pingTimer=null)}),this.on("close",this._setupReconnect),r.EventEmitter.call(this),this._setupStream()}l(y,r.EventEmitter),y.prototype._setupStream=function(){var e,t=this,n=new a,r=s.parser(this.options),o=null,l=[];function c(){if(l.length)i.nextTick(u);else{var e=o;o=null,e()}}function u(){var e=l.shift();if(e)t._handlePacket(e,c);else{var n=o;o=null,n&&n()}}if(this._clearReconnect(),this.stream=this.streamBuilder(this),r.on("packet",function(e){l.push(e)}),n._write=function(e,t,n){o=n,r.parse(e),u()},this.stream.pipe(n),this.stream.on("error",v),this.stream.on("close",function(){var e;(e=t.outgoing)&&Object.keys(e).forEach(function(t){e[t].volatile&&"function"==typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])}),t.emit("close")}),(e=Object.create(this.options)).cmd="connect",g(this,e),r.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.emit("error",new Error("Packet has no Authentication Method")),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&g(this,d({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){t._cleanUp(!0)},this.options.connectTimeout)},y.prototype._handlePacket=function(e,t){var n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSize<e.length)return this.emit("error",new Error("exceeding packets size "+e.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(this.emit("packetreceive",e),e.cmd){case"publish":this._handlePublish(e,t);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(e),t();break;case"pubrel":this._handlePubrel(e,t);break;case"connack":this._handleConnack(e),t();break;case"pingresp":this._handlePingresp(e),t();break;case"disconnect":this._handleDisconnect(e),t()}},y.prototype._checkDisconnecting=function(e){return this.disconnecting&&(e?e(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},y.prototype.publish=function(e,t,n,i){var r,o=this.options;if("function"==typeof n&&(i=n,n=null),n=d({qos:0,retain:!1,dup:!1},n),this._checkDisconnecting(i))return this;switch(r={cmd:"publish",topic:e,payload:t,qos:n.qos,retain:n.retain,messageId:this._nextId(),dup:n.dup},5===o.protocolVersion&&(r.properties=n.properties,(!o.properties&&r.properties&&r.properties.topicAlias||n.properties&&o.properties&&(n.properties.topicAlias&&o.properties.topicAliasMaximum&&n.properties.topicAlias>o.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&n.properties.topicAlias))&&delete r.properties.topicAlias),n.qos){case 1:case 2:this.outgoing[r.messageId]={volatile:!1,cb:i||v},this._storeProcessing?(this._packetIdsDuringStoreProcessing[r.messageId]=!1,this._storePacket(r,void 0,n.cbStorePut)):this._sendPacket(r,void 0,n.cbStorePut);break;default:this._storeProcessing?this._storePacket(r,i,n.cbStorePut):this._sendPacket(r,i,n.cbStorePut)}return this},y.prototype.subscribe=function(){for(var e,t=new Array(arguments.length),n=0;n<arguments.length;n++)t[n]=arguments[n];var i,r=[],o=t.shift(),s=o.resubscribe,a=t.pop()||v,l=t.pop(),c=this,p=this.options.protocolVersion;if(delete o.resubscribe,"string"==typeof o&&(o=[o]),"function"!=typeof a&&(l=a,a=v),null!==(i=u.validateTopics(o)))return h(a,new Error("Invalid topic "+i)),this;if(this._checkDisconnecting(a))return this;var f={qos:0};if(5===p&&(f.nl=!1,f.rap=!1,f.rh=0),l=d(f,l),Array.isArray(o)?o.forEach(function(e){if(!c._resubscribeTopics.hasOwnProperty(e)||c._resubscribeTopics[e].qos<l.qos||s){var t={topic:e,qos:l.qos};5===p&&(t.nl=l.nl,t.rap=l.rap,t.rh=l.rh,t.properties=l.properties),r.push(t)}}
1):Object.keys(o).forEach(function(e){if(!c._resubscribeTopics.hasOwnProperty(e)||c._resubscribeTopics[e].qos<o[e].qos||s){var t={topic:e,qos:o[e].qos};5===p&&(t.nl=o[e].nl,t.rap=o[e].rap,t.rh=o[e].rh,t.properties=l.properties),r.push(t)}}),e={cmd:"subscribe",subscriptions:r,qos:1,retain:!1,dup:!1,messageId:this._nextId()},l.properties&&(e.properties=l.properties),r.length){if(this.options.resubscribe){var g=[];r.forEach(function(e){if(c.options.reconnectPeriod>0){var t={qos:e.qos};5===p&&(t.nl=e.nl||!1,t.rap=e.rap||!1,t.rh=e.rh||0,t.properties=e.properties),c._resubscribeTopics[e.topic]=t,g.push(e.topic)}}),c.messageIdToTopic[e.messageId]=g}return this.outgoing[e.messageId]={volatile:!0,cb:function(e,t){if(!e)for(var n=t.granted,i=0;i<n.length;i+=1)r[i].qos=n[i];a(e,r)}},this._sendPacket(e),this}a(null,[])},y.prototype.unsubscribe=function(){for(var e={cmd:"unsubscribe",qos:1,messageId:this._nextId()},t=this,n=new Array(arguments.length),i=0;i<arguments.length;i++)n[i]=arguments[i];var r=n.shift(),o=n.pop()||v,s=n.pop();return"string"==typeof r&&(r=[r]),"function"!=typeof o&&(s=o,o=v),this._checkDisconnecting(o)?this:("string"==typeof r?e.unsubscriptions=[r]:"object"==typeof r&&r.length&&(e.unsubscriptions=r),this.options.resubscribe&&e.unsubscriptions.forEach(function(e){delete t._resubscribeTopics[e]}),"object"==typeof s&&s.properties&&(e.properties=s.properties),this.outgoing[e.messageId]={volatile:!0,cb:o},this._sendPacket(e),this)},y.prototype.end=function(){var e=this,t=arguments[0],n=arguments[1],i=arguments[2];function r(){e.disconnected=!0,e.incomingStore.close(function(){e.outgoingStore.close(function(){i&&i.apply(null,arguments),e.emit("end")})}),e._deferredReconnect&&e._deferredReconnect()}function o(){e._cleanUp(t,h.bind(null,r),n)}return null!=t&&"boolean"==typeof t||(i=n||v,n=t,t=!1,"object"!=typeof n&&(i=n,n=null,"function"!=typeof i&&(i=v))),"object"!=typeof n&&(i=n,n=null),i=i||v,this.disconnecting?this:(this._clearReconnect(),this.disconnecting=!0,!t&&Object.keys(this.outgoing).length>0?this.once("outgoingEmpty",setTimeout.bind(null,o,10)):o(),this)},y.prototype.removeOutgoingMessage=function(e){var t=this.outgoing[e]?this.outgoing[e].cb:null;return delete this.outgoing[e],this.outgoingStore.del({messageId:e},function(){t(new Error("Message removed"))}),this},y.prototype.reconnect=function(e){var t=this,n=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new o,t.outgoingStore=t.options.outgoingStore||new o,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},y.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},y.prototype._setupReconnect=function(){var e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>
10&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),e.reconnectTimer=setInterval(function(){e._reconnect()},e.options.reconnectPeriod))},y.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},y.prototype._cleanUp=function(e,t){var n=arguments[2];if(t&&this.stream.on("close",t),e)0===this.options.reconnectPeriod&&this.options.clean&&function(e){e&&Object.keys(e).forEach(function(t){"function"==typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])})}(this.outgoing),this.stream.destroy();else{var i=d({cmd:"disconnect"},n);this._sendPacket(i,h.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(this.stream.removeListener("close",t),t())},y.prototype._sendPacket=function(e,t,n){if(n=n||v,this.connected){switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void m(this,e,t,n);default:return void g(this,e,t)}switch(e.qos){case 2:case 1:m(this,e,t,n);break;case 0:default:g(this,e,t)}}else this._storePacket(e,t,n)},y.prototype._storePacket=function(e,t,n){n=n||v,0===(e.qos||0)&&this.queueQoSZero||"publish"!==e.cmd?this.queue.push({packet:e,cb:t}):e.qos>0?(t=this.outgoing[e.messageId]?this.outgoing[e.messageId].cb:null,this.outgoingStore.put(e,function(e){if(e)return t&&t(e);n()})):t&&t(new Error("No connection to broker"))},y.prototype._setupPingTimer=function(){var e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c(function(){e._checkPing()},1e3*this.options.keepalive))},y.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},y.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},y.prototype._handlePingresp=function(){this.pingResp=!0},y.prototype._handleConnack=function(e){var t=this.options,n=5===t.protocolVersion?e.reasonCode:e.returnCode;if(clearTimeout(this.connackTimer),e.properties&&(e.properties.topicAliasMaximum&&(t.properties||(t.properties={}),t.properties.topicAliasMaximum=e.properties.topicAliasMaximum),e.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=e.properties.serverKeepAlive,this._shiftPingInterval()),e.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=e.properties.maximumPacketSize)),0===n)this.reconnecting=!1,this._onConnect(e);else if(n>0){var i=new Error("Connection refused: "+f[n]);i.code=n,this.emit("error",i)}},y.prototype._handlePublish=function(e,t){t=void 0!==t?t:v;var n=e.topic.toString(),i=e.payload,r=e.messageId,o=this,s=this.options,a=[0,16,128,131,135,144,145,151,153];switch(e.qos){case 2:s.customHandleAcks(n,i,e,function(n,i){return n instanceof Error||(i=n,n=null),n?o.emit("error",n):-1===a.indexOf(i)?o.emit("error",new Error("Wrong reason code for pubrec")):void(i?o._sendPacket({cmd:"pubrec",messageId:r,reasonCode:i},t):o.incomingStore.put(e,function(){o._sendPacket({cmd:"pubrec",messageId:r},t)}))});break;case 1:s.customHandleAcks(n,i,e,function(s,l){return s instanceof Error||(l=s,s=null),s?o.emit("error",s):-1===a.indexOf(l)?o.emit("error",new Error("Wrong reason code for puback")):(l||o.emit("message",n,i,e),void o.handleMessage(e,function(e){if(e)return t&&t(e);o._sendPacket({cmd:"puback",messageId:r,reasonCode:l},t)}))});break;case 0:this.emit("message",n,i,e),this.handleMessage(e,t)}},y.prototype.handleMessage=function(e,t){t()},y.prototype._handleAck=function(e){var t,n=e.messageId,i=null,r=this.outgoing[n]?this.outgoing[n].cb:null,o=this;if(r){switch(e.cmd){case"pubcomp":case"puback":var s=e.reasonCode;s&&s>0&&16!==s&&((t=new Error("Publish error: "+f[s])).code=s,r(t,e)),delete this.outgoing[n],this.outgoingStore.del(e,r);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:n};var a=e.reasonCode;a&&a>0&&16!==a?((t=new Error("Publish error: "+f[a])).code=a,r(t,e)):this._sendPacket(i);break;case"suback":delete this.outgoing[n];for(var l=0;l<e.granted.length;
1l++)if(0!=(128&e.granted[l])){var c=this.messageIdToTopic[n];c&&c.forEach(function(e){delete o._resubscribeTopics[e]})}r(null,e);break;case"unsuback":delete this.outgoing[n],r(null);break;default:o.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}},y.prototype._handlePubrel=function(e,t){t=void 0!==t?t:v;var n=this,i={cmd:"pubcomp",messageId:e.messageId};n.incomingStore.get(e,function(e,r){e?n._sendPacket(i,t):(n.emit("message",r.topic,r.payload,r),n.handleMessage(r,function(e){if(e)return t(e);n.incomingStore.del(r,v),n._sendPacket(i,t)}))})},y.prototype._handleDisconnect=function(e){this.emit("disconnect",e)},y.prototype._nextId=function(){var e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e},y.prototype.getLastMessageId=function(){return 1===this.nextId?65535:this.nextId-1},y.prototype._resubscribe=function(e){var t=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!e.sessionPresent)&&t.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion)for(var n=0;n<t.length;n++){var i={};i[t[n]]=this._resubscribeTopics[t[n]],i.resubscribe=!0,this.subscribe(i,{properties:i[t[n]].properties})}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},y.prototype._onConnect=function(e){if(this.disconnected)this.emit("connect",e);else{var t=this;this._setupPingTimer(),this._resubscribe(e),this.connected=!0,function n(){var i=t.outgoingStore.createStream();function r(){t._storeProcessing=!1,t._packetIdsDuringStoreProcessing={}}function o(){i.destroy(),i=null,r()}t.once("close",o),i.on("error",function(e){r(),t.removeListener("close",o),t.emit("error",e)}),i.on("end",function(){var i=!0;for(var s in t._packetIdsDuringStoreProcessing)if(!t._packetIdsDuringStoreProcessing[s]){i=!1;break}i?(r(),t.removeListener("close",o),t.emit("connect",e)):n()}),function e(){if(i){t._storeProcessing=!0;var n,r=i.read(1);r?t._packetIdsDuringStoreProcessing[r.messageId]?e():t.disconnecting||t.reconnectTimer?i.destroy&&i.destroy():(n=t.outgoing[r.messageId]?t.outgoing[r.messageId].cb:null,t.outgoing[r.messageId]={volatile:!1,cb:function(t,i){n&&n(t,i),e()}},t._packetIdsDuringStoreProcessing[r.messageId]=!0,t._sendPacket(r)):i.once("readable",e)}}()}()}},e.exports=y}).call(this,n(9),n(8))},function(e,t){t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?r-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),o-=c}return(p?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,l,c=8*o-r-1,u=(1<<c)-1,d=u>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+p]=255&a,p+=f,a/=256,r-=8);for(s=s<<r|a,c+=r;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*g}},function(e,t){},function(e,t,n){"use strict";var i=n(32).Buffer,r=n(117);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(119),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,l=1,c={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(f,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return c[l]={callback:e,args:t},i(l),l++},h.clearImmediate=p}function p(e){delete c[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(n,i)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(8))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}
1e.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,n(9))},function(e,t,n){"use strict";e.exports=o;var i=n(55),r=n(23);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}r.inherits=n(11),r.inherits(o,i),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";e.exports=n(123)()?Map:n(124)},function(e,t,n){"use strict";e.exports=function(){var e,t;if("function"!=typeof Map)return!1;try{e=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(e){return!1}return"[object Map]"===String(e)&&3===e.size&&"function"==typeof e.clear&&"function"==typeof e.delete&&"function"==typeof e.entries&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.has&&"function"==typeof e.keys&&"function"==typeof e.set&&"function"==typeof e.values&&!1===(t=e.entries().next()).done&&!!t.value&&"raz"===t.value[0]&&"one"===t.value[1]}},function(e,t,n){"use strict";var i,r=n(56),o=n(126),s=n(26),a=n(16),l=n(12),c=n(10),u=n(145),d=n(13),h=n(64),p=n(153),f=n(171),g=n(174),m=Function.prototype.call,v=Object.defineProperties,y=Object.getPrototypeOf;e.exports=i=function(){var e,t,n,r=arguments[0];if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");return n=g&&s&&Map!==i?s(new Map,y(this)):this,null!=r&&h(r),v(n,{__mapKeysData__:c("c",e=[]),__mapValuesData__:c("c",t=[])}),r?(p(r,function(n){var i=l(n)[0];n=n[1],-1===o.call(e,i)&&(e.push(i),t.push(n))},n),n):n},g&&(s&&s(i,Map),i.prototype=Object.create(Map.prototype,{constructor:c(i)})),u(v(i.prototype,{clear:c(function(){this.__mapKeysData__.length&&(r.call(this.__mapKeysData__),r.call(this.__mapValuesData__),this.emit("_clear"))}),delete:c(function(e){var t=o.call(this.__mapKeysData__,e);return-1!==t&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)}),entries:c(function(){return new f(this,"key+value")}),forEach:c(function(e){var t,n,i=arguments[1];for(a(e),n=(t=this.entries())._next();void 0!==n;)m.call(e,i,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=t._next()}),get:c(function(e){var t=o.call(this.__mapKeysData__,e);if(-1!==t)return this.__mapValuesData__[t]}),has:c(function(e){return-1!==o.call(this.__mapKeysData__,e)}),keys:c(function(){return new f(this,"key")}),set:c(function(e,t){var n,i=o.call(this.__mapKeysData__,e);return-1===i&&(i=this.__mapKeysData__.push(e)-1,n=!0),this.__mapValuesData__[i]=t,n&&this.emit("_add",i,e),this}),size:c.gs(function(){return this.__mapKeysData__.length}),values:c(function(){return new f(this,"value")}),toString:c(function(){return"[object Map]"})})),Object.defineProperty(i.prototype,d.iterator,c(function(){return this.entries()})),Object.defineProperty(i.prototype,d.toStringTag,c("c","Map"))},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(127),r=n(57),o=n(12),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,c=Math.floor;e.exports=function(e){var t,n,u;if(!i(e))return s.apply(this,arguments);for(n=r(o(this).length),u=arguments[1],t=u=isNaN(u)?0:u>=0?c(u):r(this.length)-c(l(u));t<n;++t)if(a.call(this,t)&&i(this[t]))return t;return-1}},function(e,t,n){"use strict";e.exports=n(128)()?Number.isNaN:n(129)},function(e,t,n){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}},function(e,t,n){"use strict";e.exports=function(e){return e!=e}},function(e,t,n){"use strict";var i=n(131),r=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?i(e)*o(r(e)):e}},function(e,t,n){"use strict";e.exports=n(132)()?Math.sign:n(133)},function(e,t,n){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}},function(e,t,n){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var i=n(19),r={function:!0,object:!0};e.exports=function(e){return i(e)&&r[typeof e]||!1}},function(e,t,n){"use strict";var i,r,o,s,a=Object.create;n(58)()||(i=n(59)),e.exports=i?1!==i.level?a:(r={},o={},s={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){o[e]="__proto__"!==e?s:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}
vendor: 7,679 bytes, line 1
1),Object.defineProperties(r,o),Object.defineProperty(i,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:r}),function(e,t){return a(null===e?r:e,t)}):a},function(e,t,n){"use strict";var i=n(137);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!i(e)}},function(e,t,n){"use strict";var i=n(33);e.exports=function(e){if(!i(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var i=n(140),r=n(12),o=Math.max;e.exports=function(e,t){var n,s,a,l=o(arguments.length,2);for(e=Object(r(e)),a=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},s=1;s<l;++s)i(t=arguments[s]).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(141)()?Object.keys:n(142)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(19),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&!0===i.contains("dwa")&&!1===i.contains("foo")}},function(e,t,n){"use strict";var i=String.prototype.indexOf;e.exports=function(e){return i.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var i,r,o,s,a,l,c,u=n(10),d=n(16),h=Function.prototype.apply,p=Function.prototype.call,f=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n,r;return d(t),r=this,i.call(this,e,n=function(){o.call(r,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a={on:i=function(e,t){var n;return d(t),v.call(this,"__ee__")?n=this.__ee__:(n=y.value=f(null),g(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,i,r,o;if(d(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(i=n[e]))for(o=0;r=i[o];++o)r!==t&&r.__eeOnceListener__!==t||(2===i.length?n[e]=i[o?0:1]:i.splice(o,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:s=function(e){var t,n,i,r,o;if(v.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(r=r.slice(),t=0;i=r[t];++t)h.call(i,this,o)}else switch(arguments.length){case 1:p.call(r,this);break;case 2:p.call(r,this,arguments[1]);break;case 3:p.call(r,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];h.call(r,this,o)}}},l={on:u(i),once:u(r),off:u(o),emit:u(s)},c=m({},l),e.exports=t=function(e){return null==e?f(c):m(Object(e),l)},t.methods=a},function(e,t,n){"use strict";var i=n(27),r={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!r[typeof t.iterator]&&!!r[typeof t.toPrimitive]&&!!r[typeof t.toStringTag]}},function(e,t,n){"use strict";var i,r,o,s=n(10),a=n(63),l=n(27).Symbol,c=n(149),u=n(150),d=n(151),h=Object.create,p=Object.defineProperties,f=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(e){}else l=null;r=function(e){if(this instanceof r)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?l(t):(n=h(r.prototype),t=void 0===t?"":String(t),p(n,{__description__:s("",t),__name__:s("",c(t))}))},u(i),d(i),p(r.prototype,{constructor:s(i),toString:s("",function(){return this.__name__})}),p(i.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:s(function(){return a(this)})}),f(i.prototype,i.toPrimitive,s("",function(){var e=a(this);return"symbol"==typeof e?e:e.toString()})),f(i.prototype,i.toStringTag,s("c","Symbol")),f(r.prototype,i.toStringTag,s("c",i.prototype[i.toStringTag])),f(r.prototype,i.toPrimitive,s("c",i.prototype[i.toPrimitive]))},function(e,t,n){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},function(e,t,n){"use strict";var i=n(10),r=Object.create,o=Object.defineProperty,s=Object.prototype,a=r(null);e.exports=function(e){for(var t,n,r=0;a[e+(r||"")];)++r;return a[e+=r||""]=!0,o(s,t="@@"+e,i.gs(null,function(e){n||(n=!0,o(this,t,i(e)),n=!1)})),t}},function(e,t,n){"use strict";var i=n(10),r=n(27).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:i("",r&&r.hasInstance||e("hasInstance")),isConcatSpreadable:i("",r&&r.isConcatSpreadable||e("isConcatSpreadable")),iterator:i("",r&&r.iterator||e("iterator")),match:i("",r&&r.match||e("match")),replace:i("",r&&r.replace||e("replace")),search:i("",r&&r.search||e("search")),species:i("",r&&r.species||e("species")),split:i("",r&&r.split||e("split")),toPrimitive:i("",r&&r.toPrimitive||e("toPrimitive")),toStringTag:i("",r&&r.toStringTag||e("toStringTag")),unscopables:i("",r&&r.unscopables||e("unscopables"))})}},function(e,t,n){"use strict";var i=n(10),r=n(63),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:i(function(t){return o[t]?o[t]:o[t]=e(String(t))}),keyFor:i(function(e){var t;for(t in r(e),o)if(o[t]===e)return t})})}},function(e,t,n){"use strict";var i=n(28),r=n(19),o=n(29),s=n(13).iterator,a=Array.isArray;e.exports=function(e){return!(!r(e)||!a(e)&&!o(e)&&!i(e)&&"function"!=typeof e[s])}},function(e,t,n){"use strict";var i=n(28),r=n(16),o=n(29),s=n(154),a=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(e,t){var n,u,d,h,p,f,g,m,v=arguments[2];if(a(e)||i(e)?n="array":o(e)?n="string":e=s(e),r(t),d=function(){h=!0},"array"!==n)if("string"!==n)for(u=e.next();!u.done;){if(l.call(t,v,u.value,d),h)return;u=e.next()}else for(f=e.length,p=0;p<f&&(g=e[p],p+1<f&&(m=g.charCodeAt(0))>=55296&&m<=56319&&(g+=e[++p]),l.call(t,v,g,d),!h);++p);else c.call(e,function(e){return l.call(t,v,e,d),h})}},function(e,t,n){"use strict";var i=n(28),r=n(29),o=n(155),s=n(170),a=n(64),l=n(13).iterator;e.exports=function(e){return"function"==typeof a(e)[l]?e[l]():i(e)?new o(e):r(e)?new s(e):new o(e)}},function(e,t,n){"use strict";var i,r=n(26),o=n(62),s=n(10),a=n(13),l=n(35),c=Object.defineProperty;i=e.exports=function(e,t){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",c(this,"__kind__",s("",t))},r&&r(i,l),delete i.prototype.constructor,i.prototype=Object.create(l.prototype,{_resolve:s(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),c(i.prototype,a.toStringTag,s("c","Array Iterator"))},function(e,t,n){"use strict";var i,r=n(20),o=n(157),s=n(161),a=n(162),l=n(61),c=n(167),u=Function.prototype.bind,d=Object.defineProperty,h=Object.prototype.hasOwnProperty;i=function(e,t,n){var i,r=o(t)&&s(t.value);return delete(i=a(t)).writable,delete i.value,i.get=function(){return!n.overwriteDefinition&&h.call(this,e)?r:(t.value=u.call(r,n.resolveContext?n.resolveContext(this):this),d(this,e,t),this[e])},i},e.exports=function(e){var t=l(arguments[1]);
1return r(t.resolveContext)&&s(t.resolveContext),c(e,function(e,n){return i(n,e,t)})}},function(e,t,n){"use strict";var i=n(65),r=n(20);e.exports=function(e){return r(e)?e:i(e,"Cannot use %v",arguments[1])}},function(e,t,n){"use strict";var i=n(20),r=n(33),o=Object.prototype.toString;e.exports=function(e){if(!i(e))return null;if(r(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===o)return null}try{return""+e}catch(e){return null}}},function(e,t,n){"use strict";var i=n(160),r=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=i(e);return null===t?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(r,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},function(e,t,n){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,n){"use strict";var i=n(65),r=n(60);e.exports=function(e){return r(e)?e:i(e,"%v is not a plain function",arguments[1])}},function(e,t,n){"use strict";var i=n(163),r=n(34),o=n(12);e.exports=function(e){var t=Object(o(e)),n=arguments[1],s=Object(arguments[2]);if(t!==e&&!n)return t;var a={};return n?i(n,function(t){(s.ensure||t in e)&&(a[t]=e[t])}):r(a,e),a}},function(e,t,n){"use strict";e.exports=n(164)()?Array.from:n(165)},function(e,t,n){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(t=n(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,n){"use strict";var i=n(13).iterator,r=n(28),o=n(166),s=n(57),a=n(16),l=n(12),c=n(19),u=n(29),d=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;e.exports=function(e){var t,n,g,m,v,y,b,_,S,w,E=arguments[1],T=arguments[2];if(e=Object(l(e)),c(E)&&a(E),this&&this!==Array&&o(this))t=this;else{if(!E){if(r(e))return 1!==(v=e.length)?Array.apply(null,e):((m=new Array(1))[0]=e[0],m);if(d(e)){for(m=new Array(v=e.length),n=0;n<v;++n)m[n]=e[n];return m}}m=[]}if(!d(e))if(void 0!==(S=e[i])){for(b=a(S).call(e),t&&(m=new t),_=b.next(),n=0;!_.done;)w=E?h.call(E,T,_.value,n):_.value,t?(p.value=w,f(m,n,p)):m[n]=w,_=b.next(),++n;v=n}else if(u(e)){for(v=e.length,t&&(m=new t),n=0,g=0;n<v;++n)w=e[n],n+1<v&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=e[++n]),w=E?h.call(E,T,w,g):w,t?(p.value=w,f(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=s(e.length),t&&(m=new t(v)),n=0;n<v;++n)w=E?h.call(E,T,e[n],n):e[n],t?(p.value=w,f(m,n,p)):m[n]=w;return t&&(p.value=null,m.length=v),m}},function(e,t,n){"use strict";var i=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&r(i.call(e))}},function(e,t,n){"use strict";var i=n(16),r=n(168),o=Function.prototype.call;e.exports=function(e,t){var n={},s=arguments[2];return i(t),r(e,function(e,i,r,a){n[i]=o.call(t,s,e,i,r,a)}),n}},function(e,t,n){"use strict";e.exports=n(169)("forEach")},function(e,t,n){"use strict";var i=n(16),r=n(12),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,c){var u,d=arguments[2],h=arguments[3];return n=Object(r(n)),i(c),u=a(n),h&&u.sort("function"==typeof h?o.call(h,n):void 0),"function"!=typeof e&&(e=u[e]),s.call(e,u,function(e,i){return l.call(n,e)?s.call(c,d,n[e],e,n,i):t})}}},function(e,t,n){"use strict";var i,r=n(26),o=n(10),s=n(13),a=n(35),l=Object.defineProperty;i=e.exports=function(e){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");e=String(e),a.call(this,e),l(this,"__length__",o("",e.length))},r&&r(i,a),delete i.prototype.constructor,i.prototype=Object.create(a.prototype,{_next:o(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:o(function(e){var t,n=this.__list__[e];return this.__nextIndex__===this.__length__?n:(t=n.charCodeAt(0))>=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n})}),l(i.prototype,s.toStringTag,o("c","String Iterator"))},function(e,t,n){"use strict";var i,r=n(26),o=n(10),s=n(35),a=n(13).toStringTag,l=n(172),c=Object.defineProperties,u=s.prototype._unBind;i=e.exports=function(e,t){if(!(this instanceof i))return new i(e,t);s.call(this,e.__mapKeysData__,e),t&&l[t]||(t="key+value"),c(this,{__kind__:o("",t),__values__:o("w",e.__mapValuesData__)})},r&&r(i,s),i.prototype=Object.create(s.prototype,{constructor:o(i),_resolve:o(function(e){return"value"===this.__kind__?this.__values__[e]:"key"===this.__kind__?this.__list__[e]:[this.__list__[e],this.__values__[e]]}),_unBind:o(function(){this.__values__=null,u.call(this)}),toString:o(function(){return"[object Map Iterator]"})}),Object.defineProperty(i.prototype,a,o("c","Map Iterator"))},function(e,t,n){"use strict";e.exports=n(173)("key","value","key+value")},function(e,t,n){"use strict";var i=Array.prototype.forEach,r=Object.create;e.exports=function(e){var t=r(null);return i.call(arguments,function(e){t[e]=!0}),t}},function(e,t,n){"use strict";e.exports="undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)},function(e,t,n){"use strict";t.parser=n(176),t.generate=n(183),t.writeToStream=n(67)},function(e,t,n){"use strict";
1var i=n(177),r=n(11),o=n(21).EventEmitter,s=n(182),a=n(66);function l(e){if(!(this instanceof l))return new l(e);this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState()}r(l,o),l.prototype._resetState=function(){this.packet=new s,this.error=null,this._list=i(),this._stateCounter=0},l.prototype.parse=function(e){for(this.error&&this._resetState(),this._list.append(e);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},l.prototype._parseHeader=function(){var e=this._list.readUInt8(0);return this.packet.cmd=a.types[e>>a.CMD_SHIFT],this.packet.retain=0!=(e&a.RETAIN_MASK),this.packet.qos=e>>a.QOS_SHIFT&a.QOS_MASK,this.packet.dup=0!=(e&a.DUP_MASK),this._list.consume(1),!0},l.prototype._parseLength=function(){var e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),!!e},l.prototype._parsePayload=function(){var e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return e},l.prototype._parseConnect=function(){var e,t,n,i,r,o,s={},l=this.packet;if(null===(e=this._parseString()))return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==e&&"MQIsdp"!==e)return this._emitError(new Error("Invalid protocolId"));if(l.protocolId=e,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(l.protocolVersion=this._list.readUInt8(this._pos),3!==l.protocolVersion&&4!==l.protocolVersion&&5!==l.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(s.username=this._list.readUInt8(this._pos)&a.USERNAME_MASK,s.password=this._list.readUInt8(this._pos)&a.PASSWORD_MASK,s.will=this._list.readUInt8(this._pos)&a.WILL_FLAG_MASK,s.will&&(l.will={},l.will.retain=0!=(this._list.readUInt8(this._pos)&a.WILL_RETAIN_MASK),l.will.qos=(this._list.readUInt8(this._pos)&a.WILL_QOS_MASK)>>a.WILL_QOS_SHIFT),l.clean=0!=(this._list.readUInt8(this._pos)&a.CLEAN_SESSION_MASK),this._pos++,l.keepalive=this._parseNum(),-1===l.keepalive)return this._emitError(new Error("Packet too short"));if(5===l.protocolVersion){var c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}if(null===(t=this._parseString()))return this._emitError(new Error("Packet too short"));if(l.clientId=t,s.will){if(5===l.protocolVersion){var u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(l.will.properties=u)}if(null===(n=this._parseString()))return this._emitError(new Error("Cannot parse will topic"));if(l.will.topic=n,null===(i=this._parseBuffer()))return this._emitError(new Error("Cannot parse will payload"));l.will.payload=i}if(s.username){if(null===(o=this._parseString()))return this._emitError(new Error("Cannot parse username"));l.username=o}if(s.password){if(null===(r=this._parseBuffer()))return this._emitError(new Error("Cannot parse password"));l.password=r}return this.settings=l,l},l.prototype._parseConnack=function(){var e=this.packet;if(this._list.length<2)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&a.SESSIONPRESENT_MASK),5===this.settings.protocolVersion?e.reasonCode=this._list.readUInt8(this._pos++):e.returnCode=this._list.readUInt8(this._pos++),-1===e.returnCode||-1===e.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}},l.prototype._parsePublish=function(){var e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length)}},l.prototype._parseSubscribe=function(){var e,t,n,i,r,o,s=this.packet;if(1!==s.qos)return this._emitError(new Error("Wrong subscribe header"));if(s.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(s.properties=l)}for(;this._pos<s.length;){if(null===(e=this._parseString()))return this._emitError(new Error("Cannot parse topic"));if(this._pos>=s.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=(t=this._parseByte())&a.SUBSCRIBE_OPTIONS_QOS_MASK,r=0!=(t>>a.SUBSCRIBE_OPTIONS_RAP_SHIFT&a.SUBSCRIBE_OPTIONS_RAP_MASK),i=t>>a.SUBSCRIBE_OPTIONS_RH_SHIFT&a.SUBSCRIBE_OPTIONS_RH_MASK,o={topic:e,qos:n},5===this.settings.protocolVersion&&(o.nl=0!=(t>>a.SUBSCRIBE_OPTIONS_NL_SHIFT&a.SUBSCRIBE_OPTIONS_NL_MASK),o.rap=r,o.rh=i),s.subscriptions.push(o)}}},l.prototype._parseSuback=function(){var e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}},l.prototype._parseUnsubscribe=function(){var e=this.packet;if(e.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<e.length;){var n;if(null===(n=this._parseString()))return this._emitError(new Error("Cannot parse topic"));e.unsubscriptions.push(n)}}},l.prototype._parseUnsuback=function(){var e=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){var t=this._parseProperties();for(Object.getOwnPropertyNames(t).length&&(e.properties=t),e.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}},l.prototype._parseConfirmation=function(){var e=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&e.length>2){e.reasonCode=this._parseByte();var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0},l.prototype._parseDisconnect=function(){var e=this.packet;if(5===this.settings.protocolVersion){e.reasonCode=this._parseByte();var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0},l.prototype._parseAuth=function(){var e=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();var t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),!0},l.prototype._parseMessageId=function(){var e=this.packet;return e.messageId=this._parseNum(),null!==e.messageId||(this._emitError(new Error("Cannot parse messageId")),!1)},l.prototype._parseString=function(e){var t,n=this._parseNum(),i=n+this._pos;return-1===n||i>this._list.length||i>this.packet.length?null:(t=this._list.toString("utf8",this._pos,i),this._pos+=n,t)},l.prototype._parseStringPair=function(){return{name:this._parseString(),value:this._parseString()}},l.prototype._parseBuffer=function(){var e,t=this._parseNum(),n=t+this._pos;return-1===t||n>this._list.length||n>this.packet.length?null:(e=this._list.slice(this._pos,n),this._pos+=t,e)},l.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var e=this._list.readUInt16BE(this._pos);return this._pos+=2,e},l.prototype._parse4ByteNum=function(){if(this._list.length-this._pos<4)return-1;var e=this._list.readUInt32BE(this._pos);return this._pos+=4,e},l.prototype._parseVarByteNum=function(e){for(var t,n=0,i=1,r=0,o=!0,s=this._pos?this._pos:0;n<5&&(r+=i*((t=this._list.readUInt8(s+n++))&a.LENGTH_MASK),i*=128,0!=(t&a.LENGTH_FIN_MASK));)if(this._list.length<=n){o=!1;break}return s&&(this._pos+=n),!!o&&(e?{bytes:n,value:r}:r)},l.prototype._parseByte=function(){var e=this._list.readUInt8(this._pos);return this._pos++,e},l.prototype._parseByType=function(e){switch(e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}},l.prototype._parseProperties=function(){for(var e=this._parseVarByteNum(),t=this._pos+e,n={};this._pos<t;){var i=this._parseByte(),r=a.propertiesCodes[i];if(!r)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==r)n[r]?Array.isArray(n[r])?n[r].push(this._parseByType(a.propertiesTypes[r])):(n[r]=[n[r]],n[r].push(this._parseByType(a.propertiesTypes[r]))):n[r]=this._parseByType(a.propertiesTypes[r]);else{n[r]||(n[r]={});var o=this._parseByType(a.propertiesTypes[r]);n[r][o.name]?Array.isArray(n[r][o.name])?n[r][o.name].push(o.value):(n[r][o.name]=[n[r][o.name]],n[r][o.name].push(o.value)):n[r][o.name]=o.value}}return n},l.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit
1("packet",this.packet)),this.packet=new s,this._pos=0,!0},l.prototype._emitError=function(e){this.error=e,this.emit("error",e)},e.exports=l},function(e,t,n){var i=n(178),r=n(179),o=n(15).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=(function(e){this._callback&&(this._callback(e),this._callback=null)}).bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)})}else this.append(e);i.call(this)}r.inherits(s,i),s.prototype._offset=function(e){var t,n=0,i=0;if(0===e)return[0,0];for(;i<this._bufs.length;i++){if(e<(t=n+this._bufs[i].length)||i==this._bufs.length-1)return[i,e-n];n=t}},s.prototype.append=function(e){var t=0;if(o.isBuffer(e))this._appendBuffer(e);else if(Array.isArray(e))for(;t<e.length;t++)this.append(e[t]);else if(e instanceof s)for(;t<e._bufs.length;t++)this.append(e._bufs[t]);else null!=e&&("number"==typeof e&&(e=e.toString()),this._appendBuffer(o.from(e)));return this},s.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},s.prototype._write=function(e,t,n){this._appendBuffer(e),"function"==typeof n&&n()},s.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},s.prototype.end=function(e){i.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype.get=function(e){return this.slice(e,e+1)[0]},s.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},s.prototype.copy=function(e,t,n,i){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof i||i>this.length)&&(i=this.length),n>=this.length)return e||o.alloc(0);if(i<=0)return e||o.alloc(0);var r,s,a=!!e,l=this._offset(n),c=i-n,u=c,d=a&&t||0,h=l[1];if(0===n&&i==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(s=0;s<this._bufs.length;s++)this._bufs[s].copy(e,d),d+=this._bufs[s].length;return e}if(u<=this._bufs[l[0]].length-h)return a?this._bufs[l[0]].copy(e,t,h,h+u):this._bufs[l[0]].slice(h,h+u);for(a||(e=o.allocUnsafe(c)),s=l[0];s<this._bufs.length;s++){if(!(u>(r=this._bufs[s].length-h))){this._bufs[s].copy(e,d,h,h+u);break}this._bufs[s].copy(e,d,h),d+=r,u-=r,h&&(h=0)}return e},s.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),i=this._offset(t),r=this._bufs.slice(n[0],i[0]+1);return 0==i[1]?r.pop():r[r.length-1]=r[r.length-1].slice(0,i[1]),0!=n[1]&&(r[0]=r[0].slice(n[1])),new s(r)},s.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},s.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var e=0,t=new s;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},s.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)!function(t){s.prototype[t]=function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=s},function(e,t,n){e.exports=n(14)},function(e,t,n){(function(e){var i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++)n[t[i]]=Object.getOwnPropertyDescriptor(e,t[i]);return n},r=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var i=arguments,o=i.length,s=String(e).replace(r,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}}),l=i[n];n<o;l=i[++n])g(l)||!_(l)?s+=" "+l:s+=" "+a(l);return s}
vendor: 4,687 bytes, line 1
1,t.deprecate=function(n,i){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,i).apply(this,arguments)};var r=!1;return function(){if(!r){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),r=!0}return n.apply(this,arguments)}};var o,s={};function a(e,n){var i={seen:[],stylize:c};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),f(n)?i.showHidden=n:n&&t._extend(i,n),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=l),u(i,e,i.depth)}function l(e,t){var n=a.styles[t];return n?"\x1b["+a.colors[n][0]+"m"+e+"\x1b["+a.colors[n][1]+"m":e}function c(e,t){return e}function u(e,n,i){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(i,e);return v(r)||(r=u(e,r,i)),r}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,n);if(o)return o;var s=Object.keys(n),a=function(e){var t={};return s.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),w(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(n);if(0===s.length){if(E(n))return e.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(w(n))return d(n)}var l,c="",_=!1,T=["{","}"];return p(n)&&(_=!0,T=["[","]"]),E(n)&&(c=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(c=" "+RegExp.prototype.toString.call(n)),S(n)&&(c=" "+Date.prototype.toUTCString.call(n)),w(n)&&(c=" "+d(n)),0!==s.length||_&&0!=n.length?i<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,i,r){for(var o=[],s=0,a=t.length;s<a;++s)R(t,String(s))?o.push(h(e,t,n,i,String(s),!0)):o.push("");return r.forEach(function(r){r.match(/^\d+$/)||o.push(h(e,t,n,i,r,!0))}),o}(e,n,i,a,s):s.map(function(t){return h(e,n,i,a,t,_)}),e.seen.pop(),function(e,t,n){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,c,T)):T[0]+c+T[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,i,r,o){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]}).get?a=e.stylize(l.set?"[Getter/Setter]":"[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),R(i,r)||(s="["+r+"]"),a||(e.seen.indexOf(l.value)<0?(a=g(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return"   "+e}).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&r.match(/^\d+$/))return a;(s=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===T(e)}function _(e){return"object"==typeof e&&null!==e}function S(e){return _(e)&&"[object Date]"===T(e)}function w(e){return _(e)&&("[object Error]"===T(e)||e instanceof Error)}function E(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(y(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var i=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,i,e)}}else s[n]=function(){};return s[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=f,t.isNull=g,t.isNullOrUndefined=function(e){return null==e}
1,t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=b,t.isObject=_,t.isDate=S,t.isError=w,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(180);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=n(181),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),i=n.length;i--;)e[n[i]]=t[n[i]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,i=new Promise(function(e,i){t=e,n=i}),r=[],o=0;o<arguments.length;o++)r.push(arguments[o]);r.push(function(e,i){e?n(e):t(i)});try{e.apply(this,r)}catch(e){n(e)}return i}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),D&&Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=D,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i]);var r=n.pop();if("function"!=typeof r)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return r.apply(o,arguments)};t.apply(this,n).then(function(t){e.nextTick(s,null,t)},function(t){e.nextTick(A,t,s)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,i(t)),n}}).call(this,n(8))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}},function(e,t,n){"use strict";var i=n(15).Buffer,r=n(67),o=n(21).EventEmitter;function s(){this._array=new Array(20),this._i=0}n(11)(s,o),s.prototype.write=function(e){return this._array[this._i++]=e,!0},s.prototype.concat=function(){var e,t,n=0,r=new Array(this._array.length),o=this._array,s=0;for(e=0;e<o.length&&void 0!==o[e];e++)r[e]="string"!=typeof o[e]?o[e].length:i.byteLength(o[e]),n+=r[e];for(t=i.allocUnsafe(n),e=0;e<o.length&&void 0!==o[e];e++)"string"!=typeof o[e]?(o[e].copy(t,s),s+=r[e]):(t.write(o[e],s),s+=r[e]);return t},e.exports=function(e,t){var n=new s;return r(e,n,t),n.concat()}},function(e,t,n){"use strict";var i=n(15).Buffer,r={};function o(e){var t=i.allocUnsafe(2);return t.writeUInt8(e>>8,0),t.writeUInt8(255&e,1),t}e.exports={cache:r,generateCache:function(){for(var e=0;e<65536;e++)r[e]=o(e)},generateNumber:o,genBufVariableByteInt:function(e){var t=0,n=0,r=function(e){return e>=0&&e<128?1:e>=128&&e<16384?2:e>=16384&&e<2097152?3:e>=2097152&&e<268435456?4:0}(e),o=i.allocUnsafe(r);do{t=e%128|0,(e=e/128|0)>0&&(t|=128),o.writeUInt8(t,n++)}while(e>0);return{data:o,length:r}},generate4ByteBuffer:function(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>
10){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new function(e,t,n){var i=this;this._callback=e,this._args=n,this._interval=setInterval(e,t,this._args),this.reschedule=function(e){e||(e=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,e,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}(arguments[0],arguments[1],e)}},function(e,t,n){"use strict";function i(e){for(var t=e.split("/"),n=0;n<t.length;n++)if("+"!==t[n]){if("#"===t[n])return n===t.length-1;if(-1!==t[n].indexOf("+")||-1!==t[n].indexOf("#"))return!1}return!0}e.exports={validateTopics:function(e){if(0===e.length)return"empty_topic_list";for(var t=0;t<e.length;t++)if(!i(e[t]))return e[t];return null}}},function(e,t,n){(function(e,i){var r;!function(i){var o,s=2147483647,a=36,l=1,c=26,u=38,d=700,h=72,p=128,f="-",g=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=a-l,_=Math.floor,S=String.fromCharCode;function w(e){throw new RangeError(y[e])}function E(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function T(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),i+E((e=e.replace(v,".")).split("."),t).join(".")}function C(e){for(var t,n,i=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(n=e.charCodeAt(r++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--):i.push(t);return i}function I(e){return E(e,function(e){var t="";return e>65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+S(e)}).join("")}function R(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function D(e,t,n){var i=0;for(e=n?_(e/d):e>>1,e+=_(e/t);e>b*c>>1;i+=a)e=_(e/b);return _(i+(b+1)*e/(e+u))}function A(e){var t,n,i,r,o,u,d,g,m,v,y,b=[],S=e.length,E=0,T=p,C=h;for((n=e.lastIndexOf(f))<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&w("not-basic"),b.push(e.charCodeAt(i));for(r=n>0?n+1:0;r<S;){for(o=E,u=1,d=a;r>=S&&w("invalid-input"),((g=(y=e.charCodeAt(r++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:a)>=a||g>_((s-E)/u))&&w("overflow"),E+=g*u,!(g<(m=d<=C?l:d>=C+c?c:d-C));d+=a)u>_(s/(v=a-m))&&w("overflow"),u*=v;C=D(E-o,t=b.length+1,0==o),_(E/t)>s-T&&w("overflow"),T+=_(E/t),E%=t,b.splice(E++,0,T)}return I(b)}function k(e){var t,n,i,r,o,u,d,g,m,v,y,b,E,T,I,A=[];for(b=(e=C(e)).length,t=p,n=0,o=h,u=0;u<b;++u)(y=e[u])<128&&A.push(S(y));for(i=r=A.length,r&&A.push(f);i<b;){for(d=s,u=0;u<b;++u)(y=e[u])>=t&&y<d&&(d=y);for(d-t>_((s-n)/(E=i+1))&&w("overflow"),n+=(d-t)*E,t=d,u=0;u<b;++u)if((y=e[u])<t&&++n>s&&w("overflow"),y==t){for(g=n,m=a;!(g<(v=m<=o?l:m>=o+c?c:m-o));m+=a)A.push(S(R(v+(I=g-v)%(T=a-v),0))),g=_(I/T);A.push(S(R(g,0))),o=D(n,E,i==r),n=0,++i}++n,++t}return A.join("")}o={version:"1.4.1",ucs2:{decode:C,encode:I},decode:A,encode:k,toASCII:function(e){return T(e,function(e){return m.test(e)?"xn--"+k(e):e})},toUnicode:function(e){return T(e,function(e){return g.test(e)?A(e.slice(4).toLowerCase()):e})}},void 0===(r=(function(){return o}).call(t,n,t,e))||(e.exports=r)}()}).call(this,n(188)(e),n(9))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(191),t.encode=t.stringify=n(192)},function(e,t,n){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,p,f,g=e[u].replace(a,"%20"),m=g.indexOf(n);m>=0?(d=g.substr(0,m),h=g.substr(m+1)):(d=g,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),i(s,p)?r(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),function(s){var a=encodeURIComponent(i(s))+n;return r(e[s])?o(e[s],function(e){return a+encodeURIComponent(i(e))}).join(t):a+encodeURIComponent(i(e[s]))}).join(t):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],i=0;i<e.length;i++)n.push(t(e[i],i));return n}var s=Object.keys||function(e){var t=[];
1for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t){},function(e,t){},function(e,t,n){(function(t){var i=n(196),r=function(){},o=function(e,n,s){if("function"==typeof n)return o(e,null,n);n||(n={}),s=i(s||r);var a=e._writableState,l=e._readableState,c=n.readable||!1!==n.readable&&e.readable,u=n.writable||!1!==n.writable&&e.writable,d=!1,h=function(){e.writable||p()},p=function(){u=!1,c||s.call(e)},f=function(){c=!1,u||s.call(e)},g=function(t){s.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){s.call(e,t)},v=function(){t.nextTick(y)},y=function(){if(!d)return(!c||l&&l.ended&&!l.destroyed)&&(!u||a&&a.ended&&!a.destroyed)?void 0:s.call(e,new Error("premature close"))},b=function(){e.req.on("finish",p)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",p),e.on("abort",v),e.req?b():e.on("request",b)):u&&!a&&(e.on("end",h),e.on("close",h)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",g),e.on("end",f),e.on("finish",p),!1!==n.error&&e.on("error",m),e.on("close",v),function(){d=!0,e.removeListener("complete",p),e.removeListener("abort",v),e.removeListener("request",b),e.req&&e.req.removeListener("finish",p),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("exit",g),e.removeListener("end",f),e.removeListener("error",m),e.removeListener("close",v)}};e.exports=o}).call(this,n(8))},function(e,t,n){var i=n(197);function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)};return t.onceError=(e.name||"Function wrapped with `once`")+" shouldn't be called more than once",t.called=!1,t}e.exports=i(r),e.exports.strict=i(o),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},function(e,t){e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var i=t.apply(this,e),r=e[e.length-1];return"function"==typeof i&&i!==r&&Object.keys(r).forEach(function(e){i[e]=r[e]}),i}}},function(e,t){e.exports=function(e){var t=e._readableState;return t?t.objectMode?e.read():e.read(t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},function(e,t,n){"use strict";(function(t,i){var r=n(17).Transform,o=n(37),s=n(200),a=n(15).Buffer;e.exports=function(e,n,l){var c,u,d="browser"===t.title,h=!!i.WebSocket,p=d?function e(t,n,i){if(u.bufferedAmount>g)setTimeout(e,m,t,n,i);else{v&&"string"==typeof t&&(t=a.from(t,"utf8"));try{u.send(t)}catch(e){return i(e)}i()}}:function(e,t,n){u.readyState===u.OPEN?(v&&"string"==typeof e&&(e=a.from(e,"utf8")),u.send(e,n)):n()};n&&!Array.isArray(n)&&"object"==typeof n&&(l=n,n=null,("string"==typeof l.protocol||Array.isArray(l.protocol))&&(n=l.protocol)),l||(l={}),void 0===l.objectMode&&(l.objectMode=!(!0===l.binary||void 0===l.binary));var f=function(e,t,n){var i=new r({objectMode:l.objectMode});return i._write=t,i._flush=function(e){u.close(),e()},i}(0,p);l.objectMode||(f._writev=y);var g=l.browserBufferSize||524288,m=l.browserBufferTimeout||1e3;"object"==typeof e?u=e:(u=h&&d?new s(e,n):new s(e,n,l)).binaryType="arraybuffer",u.readyState===u.OPEN?c=f:(c=c=o(void 0,void 0,l),l.objectMode||(c._writev=y),u.onopen=function(){c.setReadable(f),c.setWritable(f),c.emit("connect")}),c.socket=u,u.onclose=function(){c.end(),c.destroy()},u.onerror=function(e){c.destroy(e)},u.onmessage=function(e){var t=e.data;t=t instanceof ArrayBuffer?a.from(t):a.from(t,"utf8"),f.push(t)},f.on("close",function(){u.close()});var v=!l.objectMode;function y(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]="string"==typeof e[i].chunk?a.from(e[i],"utf8"):e[i].chunk;this._write(a.concat(n),"binary",t)}return c}}).call(this,n(8),n(9))},function(e,t){var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:"undefined"!=typeof window&&(n=window.WebSocket||window.MozWebSocket),e.exports=n},function(e,t,n){var i=n(73);function r(e){var t,n;function r(t,n){try{var s=e[t](n),a=s.value,l=a instanceof i;Promise.resolve(l?a.wrapped:a).then(function(e){l?r("return"===t?"return":"next",e):o(s.done?"return":"normal",e)},function(e){r("throw",e)})}catch(e){o("throw",e)}}function o(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,i))})}
1,"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(r.prototype[Symbol.asyncIterator]=function(){return this}),r.prototype.next=function(e){return this._invoke("next",e)},r.prototype.throw=function(e){return this._invoke("throw",e)},r.prototype.return=function(e){return this._invoke("return",e)},e.exports=r},function(e,t,n){"use strict";n.r(t);var i=n(24),r=n.n(i),o=n(0),s=n.n(o),a=n(1),l=n.n(a),c=n(3),u=n.n(c),d=n(4),h=n.n(d),p=n(2),f=n.n(p),g=n(6),m=n.n(g),v=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}},y=n(5),b=n.n(y),_=n(25),S=n.n(_),w=n(74),E=n.n(w);function T(e,t,n){return e.split(t).join(n)}function C(e){return T(T(e,"<","&lt;"),">","&gt;")}var I=function(){function e(t){u()(this,e),this.roomAdapter=t,this.name=null,this.emails=[],this.options={}}return h()(e,[{key:"withName",value:function(e){return this.name=e,this}},{key:"withOptions",value:function(e){return this.options=e,this}},{key:"addParticipants",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this.emails=(e=this.emails.filter(function(e){return-1===n.indexOf(e)})).concat.apply(e,n),this}},{key:"create",value:function(){var e=this.options;return this.roomAdapter.createRoom(this.name,this.emails,{avatarURL:e.avatarURL},e)}}]),e}(),R=function(){function e(t){u()(this,e),this.id=t.id,this.before_id=t.comment_before_id,this.message=C(t.message),this.username_as=t.username_as||t.username,this.username_real=t.username_real||t.email,this.user_extras=t.user_extras,this.date=S()(t.timestamp,"YYYY-MM-DD"),this.time=S()(t.timestamp,"HH:mm"),this.timestamp=t.timestamp,this.unique_id=t.unique_temp_id||t.unique_id,this.avatar=t.user_avatar_url,this.room_id=t.room_id,this.isChannel=t.is_public_channel,this.unix_timestamp=t.unix_timestamp,this.extras=t.extras,this.is_deleted=t.is_deleted,this.isPending=!1,this.isFailed=!1,this.isDelivered=!1,this.isRead=!1,this.isSent=!1,this.attachment=null,this.payload=t.payload,this.status=t.status,"reply"===t.type&&(t.payload.replied_comment_message=C(t.payload.replied_comment_message),t.payload.text=C(t.payload.text)),this.type=t.type,this.subtype="custom"===t.type?t.payload.type:null,"sent"===t.status?this.markAsSent():"delivered"===t.status?this.markAsDelivered():"read"===t.status&&this.markAsRead()}return h()(e,[{key:"isAttachment",value:function(e){return"[file]"===e.substring(0,"[file]".length)}},{key:"isImageAttachment",value:function(e){return this.isAttachment(e)&&null!=e.match(/\.(jpg|jpeg|gif|png)/i)}},{key:"attachUniqueId",value:function(e){this.unique_id=e}},{key:"getAttachmentURI",value:function(e){if(this.isAttachment(e))return e.substring("[file]".length,e.length-"[/file]".length).trim()}},{key:"setAttachment",value:function(e){this.attachment=e}},{key:"markAsPending",value:function(){this.isPending=!0,this.isDelivered=!1,this.status="pending"}},{key:"markAsSent",value:function(){this.isSent=!0,this.isPending=!1,this.isFailed=!1,this.status="sent"}},{key:"markAsDelivered",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.actor!==e.activeActorId&&(this.isRead||"read"===this.status||(this.isSent=!0,this.isRead=!1,this.isDelivered=!0,this.status="delivered"))}},{key:"markAsRead",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.actor!==e.activeActorId&&(this.isPending=!1,this.isSent=!0,this.isDelivered=!0,this.isRead=!0,this.status="read")}},{key:"markAsFailed",value:function(){this.isFailed=!0,this.isPending=!1,this.isStatus="failed"}},{key:"update",value:function(e){this.id=e.id,this.before_id=e.comment_before_id,this.message=C(e.message),e.payload&&(this.payload=e.payload),e.status&&(this.status=e.status),"reply"===e.type&&(this.payload.replied_comment_message=C(e.payload.replied_comment_message),this.payload.text=C(e.payload.text)),"sent"===e.status?this.markAsSent():"delivered"===e.status?this.markAsDelivered():"read"===e.status&&this.markAsRead()}}]),e}(),D=function(){function e(t){u()(this,e),this.id=t.id,this.last_comment_id=t.last_comment_id,this.last_comment_message=t.last_comment_message,this.last_comment_message_created_at=t.last_comment_message_created_at,this.last_comment_topic_title=t.last_comment_topic_title,this.avatar=t.room_avatar||t.avatarURL||t.avatar_url,this.name=t.room_name,this.room_type=t.room_type||t.chat_type,this.secret_code=t.secret_code,this.participants=t.participants,this.options=t.options,this.topics=[],this.last_comment=t.last_comment,this.comments=[],this.count_notif=t.unread_count,this.isLoaded=!1,this.custom_title=null,this.custom_subtitle=null,this.options=t.options,this.unique_id=t.unique_id,this.isChannel=t.is_public_channel,this.participantNumber=t.room_total_participants,t.comments&&this.receiveComments(t.comments)}return h()(e,[{key:"isCurrentlySelected",value:function(e){return this.id===e.id}},{key:"getParticipantCount",value:function(){return null==this.participants?this.participantNumber:this.participants.length}},{key:"setTitle",value:function(e){this.custom_title=e}},{key:"setSubTitle",value:function(e){this.custom_subtitle=e}},{key:"receiveComment",value:function(e){if(e.room_id===this.id){var t=this.comments.find(function(t){return t.unique_id===e.unique_id});t?(t.id=e.id,t.message=e.message,t.date=e.date,t.time=e.time,t.unix_timestamp=e.unix_timestamp):this.comments.push(e)}}},{key:"receiveComments",value:function(e){var t=this;e.forEach(function(e){t.receiveComment(new R(e))})}},{key:"getParticipant",value:function(e){return this.participants.find(function(t){return t.email===e})||null}},{key:"addParticipant",value:function(e){this.getParticipant(e.email)||this.participants.push(e)}}]),e}(),A=function(){function e(t){var n=t.baseURL,i=t.AppId,r=t.userId,o=t.version,s=t.getCustomHeader;u()(this,e),this.baseURL=n,this.token=null,this.userId=r,this.AppId=i,this.version=o,this.getCustomHeader=s}return h()(e,[{key:"setToken",value:function(e){this.token=e}},{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return new Promise(function(r,o){var s=m.a.get("".concat(t.baseURL,"/").concat(e));i&&i.baseURL&&(s=m.a.get("".concat(i.baseURL,"/").concat(e))),(s=t.setupHeaders(s,n)).end(function(e,t){return e?o(e):r(t)})})}},{key:"get_request",value:function(e){var t=m.a.get("".concat(this.baseURL,"/").concat(e));return this.setupHeaders(t,{})}},{key:"post",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(r,o){var s=m.a.post("".concat(t.baseURL,"/").concat(e));(s=t.setupHeaders(s,i)).send(n).set("Content-Type","application/x-www-form-urlencoded").end(function(e,t){return e?o(e):r(t)})})}},{key:"post_json",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(r,o){var s=m.a.post("".concat(t.baseURL,"/").concat(e));(s=t.setupHeaders(s,i)).send(n).set("Content-Type","application/json").end(function(e,t){return e?o(e):r(t)})})}},{key:"put",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(r,o){var s=m.a.put("".concat(t.baseURL,"/").concat(e));(s=t.setupHeaders(s,i)).send(n).set("Content-Type","application/x-www-form-urlencoded").end(function(e,t){return e?o(e):r(t)})})}},{key:"patch",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(r,o){var s=m.a.patch("".concat(t.baseURL,"/").concat(e));(s=t.setupHeaders(s,i)).send(n).set("Content-Type","application/x-www-form-urlencoded").end(function(e,t){return e?o(e):r(t)})})}},{key:"del",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(r,o){var s=m.a.del("".concat(t.baseURL,"/").concat(e));(s=t.setupHeaders(s,i)).send(n).set("Content-Type","application/json").end(function(e,t){return e?o(e):r(t)})})}},{key:"setupHeaders",value:function(e,t){if(e.set("QISCUS-SDK-APP-ID","".concat(this.AppId)),e.set("QISCUS-SDK-USER-ID","".concat(this.userId)),e.set("QISCUS-SDK-TOKEN","".concat(this.token)),e.set("QISCUS-SDK-VERSION","".concat(this.version)),null!=this.getCustomHeader){var n=this.getCustomHeader();
1Object.keys(n).forEach(function(t){e.set(t,n[t])})}if(Object.keys(t).length<1)return e;for(var i in t)t.hasOwnProperty(i)&&e.set(i,t[i]);return e}}]),e}(),k=function(){function e(t){u()(this,e),this.HTTPAdapter=t}return h()(e,[{key:"getNonce",value:function(){return this.HTTPAdapter.post("api/v2/sdk/auth/nonce").then(function(e){return e.body.results})}},{key:"loginOrRegister",value:function(e){return this.HTTPAdapter.post("api/v2/sdk/login_or_register",e).then(function(e){return 200!==e.body.status?Promise.reject(e):e.body.results})}},{key:"verifyIdentityToken",value:function(e){return this.HTTPAdapter.post("api/v2/sdk/auth/verify_identity_token",{identity_token:e}).then(function(e){return e.body.results})}}]),e}(),O=n(75),x=n.n(O);function N(e){var t={},n=function(e,t){return"".concat(e,"=").concat(t)};return{param:function(e,n){return t[e]=n,this},build:function(){var i=Object.keys(t).filter(function(e){return null!=t[e]}).map(function(e){return Array.isArray(t[e])?t[e].map(function(t){return n("".concat(e,"[]"),t)}).join("&"):n(e,t[e])}).join("&");return[e].concat(i).join("?")}}}var P=function(){function e(t){var n=this;u()(this,e),f()(this,"updateCommentStatus",x()(function(e,t,i){var r={room_id:e};return t&&(r.last_comment_read_id=t),i&&(r.last_comment_received_id=i),n.HTTPAdapter.post("api/v2/sdk/update_comment_status",r)},500)),this.HTTPAdapter=t,this.token=t.token}return h()(e,[{key:"postComment",value:function(e,t,n,i,r,o){return this.HTTPAdapter.post_json("api/v2/sdk/post_comment",{comment:t,topic_id:e,unique_temp_id:n,type:i,payload:r,extras:o}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.comment)})}},{key:"loadRoomList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=N("api/v2/sdk/user_rooms").param("page",e.page).param("show_participants",e.show_participants||!0).param("limit",e.limit).param("show_empty",e.show_empty).build();return this.HTTPAdapter.get(t).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.rooms_info)})}},{key:"searchMessages",value:function(e){return this.HTTPAdapter.post("api/v2/sdk/search_messages",{query:e.query||null,room_id:e.room_id||null,last_comment_id:e.last_comment_id||null}).then(function(e){return e.body.results.comments})}},{key:"updateProfile",value:function(e){var t={name:e.name||null,avatar_url:e.avatar_url||null,extras:e.extras?JSON.stringify(e.extras):null};return this.HTTPAdapter.patch("api/v2/sdk/my_profile",t).then(function(e){return e.body.results.user})}},{key:"uploadFile",value:function(e){return this.HTTPAdapter.post("api/v2/sdk/upload",{file:e}).then(function(e){return e.body})}},{key:"getRoomsInfo",value:function(e){var t={show_participants:!0,show_removed:!1};return e.room_ids&&(t.room_id=e.room_ids),e.room_unique_ids&&(t.room_unique_id=e.room_unique_ids),e.show_participants&&(t.show_participants=e.show_participants),e.show_removed&&(t.show_removed=e.show_removed),this.HTTPAdapter.post_json("api/v2/sdk/rooms_info",t).then(function(e){return e.body})}},{key:"loadComments",value:function(e,t){var n=N("api/v2/sdk/load_comments").param("topic_id",e).param("last_comment_id",t.last_comment_id).param("timestamp",t.timestamp).param("after",t.after).param("limit",t.limit).build();return this.HTTPAdapter.get(n).then(function(e){return 200!==e.status?Promise.reject(e):Promise.resolve(e.body.results.comments)})}},{key:"deleteComment",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return!1===n&&console.warn("Deprecated: delete comment for me will be removed on next release"),!1===i&&console.warn("Deprecated: soft delete will be removed on next release"),this.HTTPAdapter.del("api/v2/sdk/delete_messages",{unique_ids:t,is_delete_for_everyone:n,is_hard_delete:i}).then(function(e){return e.body})}},{key:"clearRoomMessages",value:function(e){return this.HTTPAdapter.del("api/v2/sdk/clear_room_messages",{room_channel_ids:e}).then(function(e){return e.body})}},{key:"getCommentReceiptStatus",value:function(e){return this.HTTPAdapter.get("api/v2/sdk/comment_receipt?comment_id=".concat(e)).then(function(e){return e.body})}},{key:"getBlockedUser",value:function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,t="api/v2/sdk/get_blocked_users?page=".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,"&limit=").concat(e);return this.HTTPAdapter.get(t).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.blocked_users)})}},{key:"blockUser",value:function(e){if(!e)throw new Error("email is required");return this.HTTPAdapter.post("api/v2/sdk/block_user",{user_email:e}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.user)})}},{key:"unblockUser",value:function(e){if(!e)throw new Error("email is required");return this.HTTPAdapter.post("api/v2/sdk/unblock_user",{user_email:e}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.user)})}},{key:"getProfile",value:function(){return this.HTTPAdapter.get("api/v2/sdk/my_profile").then(function(e){return e.body.results.user})}},{key:"getUserPresences",value:function(e){return this.HTTPAdapter.post_json("api/v2/sdk/users/status",{user_ids:e}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.user_status)})}}]),e}(),M=function(){function e(t){u()(this,e),this.HTTPAdapter=t,this.token=t.token}return h()(e,[{key:"getOrCreateRoom",value:function(e,t,n){var i={emails:e};return n&&(i[n]=n),t&&(i.options=JSON.stringify(t)),this.HTTPAdapter.post("api/v2/sdk/get_or_create_room_with_target",i).then(function(t){if(200!==t.body.status)return Promise.reject(t);var n=t.body.results.room;n.avatar=n.avatar_url,n.comments=t.body.results.comments.reverse();var i=n.participants.find(function(t){return t.email===e});return n.name=i?i.username:"Room name",Promise.resolve(n)})}},{key:"getRoomById",value:function(e){return this.HTTPAdapter.get("api/v2/sdk/get_room_by_id?id=".concat(e)).then(function(e){return e.body})}},{key:"getOrCreateRoomByUniqueId",value:function(e,t,n){return this.HTTPAdapter.post("api/v2/sdk/get_or_create_room_with_unique_id",{unique_id:e,name:t,avatar_url:n}).then(function(e){if(200!==e.body.status)return Promise.reject(e);var t=e.body.results.room;return t.avatar=t.avatar_url,t.comments=e.body.results.comments.reverse(),t.name=t.room_name,Promise.resolve(t)})}},{key:"createRoom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.keys(i).length<=0?null:JSON.stringify(i);return this.HTTPAdapter.post("api/v2/sdk/create_room",{name:e,"participants[]":t,avatar_url:n.avatarURL,options:r}).then(function(e){if(200!==e.body.status)return Promise.reject(e);var t=e.body.results.room;return t.comments=e.body.results.comments,Promise.resolve({id:t.id,name:t.room_name,lastCommentId:t.last_comment_id,lastCommentMessage:t.last_comment_message,lastTopicId:t.last_topic_id,avatarURL:t.avatar_url,options:t.options,participants:t.participants.map(function(e){return{id:e.id,email:e.email,username:e.username,avatarURL:e.avatar_url}})})})}},{key:"updateRoom",value:function(e){if(!e.id)throw new Error("id is required");var t={id:e.id};return e.room_name&&(t.room_name=e.room_name),e.avatar_url&&(t.avatar_url=e.avatar_url),e.options&&(t.options=JSON.stringify(e.options)),this.HTTPAdapter.post("api/v2/sdk/update_room",t).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.room)})}},{key:"getTotalUnreadCount",value:function(){return this.HTTPAdapter.get("api/v2/sdk/total_unread_count").then(function(e){return e.body.results.total_unread_count})}},{key:"getRoomUnreadCount",value:function(){return this.HTTPAdapter.get("api/v2/sdk/get_room_unread_count").then(function(e){return e.body.results.total_unread_count})}},{key:"addParticipantsToGroup",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||!t)throw new Error("room_id and emails is required");return this.HTTPAdapter.post("api/v2/sdk/add_room_participants",{room_id:e,"emails[]":t}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.participants_added)})}},{key:"removeParticipantsFromGroup",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||!t)throw new Error("room_id and emails is required");return this.HTTPAdapter.post("api/v2/sdk/remove_room_participants",{room_id:e,"emails[]":t}).then(function(e){return 200!==e.body.status?Promise.reject(e):Promise.resolve(e.body.results.participants_removed)})}}]),e}
1(),L=n(76),j=n.n(L),F=n(77),U=n.n(F),H=String("match.pattern.catchAll"),B=String("match.pattern.OR"),V=B.toString(),W=String("match.pattern.AND"),z=W.toString(),q=String("match.pattern.RANGE"),G=q.toString(),Y=String("match.pattern.REGEXP"),$=Y.toString(),K=/\/(.*)\/(.*)/;function J(){Error.call(this,"Missing when() catch-all pattern as last match argument, add [when()]: void 0"),"stack"in this||(this.stack=(new Error).stack)}function X(e){return void 0===e?H:e instanceof RegExp?Q([Y.toString(),e.toString()]):Q(e)}function Q(e){return JSON.stringify([X.__uid++,e])}function Z(){return!0}J.prototype=Object.create(Error.prototype),X.__uid=0,X.or=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q([B.toString(),t])},X.and=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q([W.toString(),t])},X.range=function(e,t){return Q([q.toString(),e,t])},X.unserialize=function(e,t){if(e===H)return{match:Z,result:t,position:1/0};var n=JSON.parse(e),i=n[0];return{match:function(e){if(Array.isArray(e)){if(e[0]===V)return e.shift(),function(t){return e[0].some(function(e){return n(e,t)})};if(e[0]===z)return e.shift(),function(t){return e[0].every(function(e){return n(e,t)})};if(e[0]===G)return e.shift(),function(t){return e[0]<=t&&t<=e[1]};if(e[0]===$){var t=K.exec(e[1]);return n.bind(null,new RegExp(t[1],t[2]))}}function n(e,t){if(Array.isArray(t))return JSON.stringify(e)===JSON.stringify(t);if(e instanceof RegExp)return e.test(t);if("object"===U()(t)){for(var n in e)if(t[n]!==e[n])return!1;return!0}return e===t}return function(t){return n(e,t)}}(n[1]),result:t,position:i}};var ee=n(78),te=n.n(ee),ne=n(79),ie=n.n(ne),re=function(e,t,n,i){try{var r=e();return null!=i&&i(r),r}catch(e){return null!=n&&n(e),t}},oe=function(e){return e.then(function(e){return[e,null]}).catch(function(e){return[null,e]})},se=function(){function e(t,n,i,o){var a,c=this,d=o.shouldConnect,h=void 0===d||d,p=o.brokerLbUrl,g=o.enableLb,m=o.getClientId;u()(this,e),f()(this,"subscribtionBuffer",[]),f()(this,"unsubscribtionBuffer",[]),f()(this,"publishBuffer",[]);var y=v(),b=function(){var e,t=(e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e],n=[];for(var i in t)n.push(X.unserialize(i,t[i]));n.sort(function(e,t){return e.position<t.position?-1:1}),-1!==Object.getOwnPropertySymbols(t).indexOf(H)&&n.push(X.unserialize(H,t[H]));var r=function(e){var t=n.find(function(t){return t.match(e)});if(!t)throw new J;return"function"==typeof t.result?t.result(e):t.result};return 2===arguments.length?r(arguments.length<=0?void 0:arguments[0]):r}((a={},f()(a,X(this.reNewMessage),function(e){return c.newMessageHandler.bind(c,e)}),f()(a,X(this.reNotification),function(e){return c.notificationHandler.bind(c,e)}),f()(a,X(this.reTyping),function(e){return c.typingHandler.bind(c,e)}),f()(a,X(this.reDelivery),function(e){return c.deliveryReceiptHandler.bind(c,e)}),f()(a,X(this.reRead),function(e){return c.readReceiptHandler.bind(c,e)}),f()(a,X(this.reOnlineStatus),function(e){return c.onlinePresenceHandler.bind(c,e)}),f()(a,X(this.reChannelMessage),function(e){return c.channelMessageHandler.bind(c,e)}),f()(a,X(),function(e){return c.logger("topic not handled",e)}),a)),_=function(){y.emit("connected")},S=function(){y.emit("reconnect")},w=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];y.emit("close",t)},E=function(e,t){var n=t.toString(),i=b(e);c.logger("message",e,t),null!=i&&i(n)},T=function(e){e&&"client disconnecting"===e.message||(y.emit("error",e.message),c.logger("error",e.message))},C=function(e){var t=[];if(null==e&&(e=c.cacheRealtimeURL),null!=c.mqtt){var i=Object.keys(c.mqtt._resubscribeTopics);t.push.apply(t,r()(i)),c.mqtt.removeAllListeners(),c.mqtt=null}var o={will:{topic:"u/".concat(n.user_id,"/s"),payload:0,retain:!0},clientId:null==m?"".concat(n.AppId,"_").concat(n.user_id,"_").concat(Date.now()):m()},s=te()(e,o);return s.addListener("connect",_),s.addListener("reconnect",S),s.addListener("close",w),s.addListener("error",T),s.addListener("message",E),t.forEach(function(e){return s.subscribe(e)}),s};this.__mqtt_conneck=C,this.__url=t;var I=C(t);h||I.end(!0),this.willConnectToRealtime=!1,this.cacheRealtimeURL=t,Object.defineProperties(this,{core:{value:n},emitter:{value:y}
1,mqtt:{value:I,writable:!0},brokerLbUrl:{value:p}}),y.on("close",ie()(l()(s.a.mark(function e(){var t,n,r;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=g){e.next=2;break}return e.abrupt("return");case 2:if(null==i||0!=i){e.next=4;break}return e.abrupt("return");case 4:if(0!=h){e.next=6;break}return e.abrupt("return");case 6:return c.willConnectToRealtime=!0,e.next=9,oe(c.getMqttNode());case 9:t=e.sent,n=j()(t,2),r=n[0],n[1]?(c.logger("cannot get new brokerURL, using old url instead (".concat(c.cacheRealtimeURL,")")),c.mqtt=C(c.cacheRealtimeURL)):(c.cacheRealtimeURL=r,c.logger("trying to reconnect to",r),c.mqtt=C(r)),c.logger("resubscribe to old topics ".concat(topics));case 15:case"end":return e.stop()}},e)})),300))}var t;return h()(e,[{key:"connect",value:function(){this.mqtt=this.__mqtt_conneck()}},{key:"getMqttNode",value:(t=l()(s.a.mark(function e(){var t,n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.a.get(this.brokerLbUrl);case 2:return n=(t=e.sent).body.data.wss_port,e.abrupt("return","wss://".concat(t.body.data.url,":").concat(n,"/mqtt"));case 6:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.logger("subscribe to",t),this.subscribtionBuffer.push(t),null!=this.mqtt)do{var i;null!=this.subscribtionBuffer.shift()&&(i=this.mqtt).subscribe.apply(i,t)}while(this.subscribtionBuffer.length>0)}},{key:"unsubscribe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.logger("unsubscribe from",t),this.unsubscribtionBuffer.push(t),null!=this.mqtt)do{var i,o=this.unsubscribtionBuffer.shift();null!=o&&(i=this.mqtt).unsubscribe.apply(i,r()(o))}while(this.unsubscribtionBuffer.length>0)}},{key:"publish",value:function(e,t){this.publishBuffer.push({topic:e,payload:t,options:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}});do{var n=this.publishBuffer.shift();if(null!=n)return this.mqtt.publish(n.topic,n.payload.toString(),n.options)}while(this.publishBuffer.length>0)}},{key:"emit",value:function(){var e;(e=this.emitter).emit.apply(e,arguments)}},{key:"on",value:function(){var e;(e=this.emitter).on.apply(e,arguments)}},{key:"noop",value:function(){}},{key:"newMessageHandler",value:function(e,t){t=JSON.parse(t),this.logger("on:new-message",t),this.emit("new-message",t)}},{key:"notificationHandler",value:function(e,t){var n=this;this.logger("on:notification",t);var i=(t=JSON.parse(t)).payload.data;"deleted_messages"in i&&i.deleted_messages.forEach(function(e){n.emit("comment-deleted",{roomId:e.room_id,commentUniqueIds:e.message_unique_ids,isForEveryone:!0,isHard:!0})}),"deleted_rooms"in i&&i.deleted_rooms.forEach(function(e){n.emit("room-cleared",e)})}},{key:"typingHandler",value:function(e,t){this.logger("on:typing",e);var n=e.match(this.reTyping);if(n[3]!==this.core.user_id){var i=n[3],r=n[1];if(this.emit("typing",{message:t,userId:i,roomId:r}),null!=this.core.selected)if("1"===t&&r===this.core.selected.id){var o=this.core.selected.participants.find(function(e){return e.email===i});if(null==o)return;this.core.isTypingStatus="".concat(o.username," is typing ...")}else this.core.isTypingStatus=null}}},{key:"deliveryReceiptHandler",value:function(e,t){this.logger("on:delivered",e,t);var n=e.match(this.reDelivery),i=t.split(":"),r=Number(i[0]);this.emit("message-delivered",{commentId:r,commentUniqueId:i[1],userId:n[3]})}},{key:"readReceiptHandler",value:function(e,t){this.logger("on:read",e,t);var n=e.match(this.reRead),i=t.split(":"),r=Number(i[0]);this.emit("message-read",{commentId:r,commentUniqueId:i[1],userId:n[3]})}},{key:"onlinePresenceHandler",value:function(e,t){this.logger("on:online-presence",e,t);var n=this.reOnlineStatus.exec(e)[1];this.emit("presence",{message:t,userId:n})}},{key:"channelMessageHandler",value:function(e,t){this.logger("on:channel-message",e,t),this.emit("new-message",JSON.parse(t))}},{key:"subscribeChannel",value:function(e,t){this.subscribe("".concat(e,"/").concat(t,"/c"))}},{key:"subscribeRoom",value:function(e){null!=this.core.selected&&(this.subscribe("r/".concat(e=e||this.core.selected.id,"/").concat(e,"/+/t")),this.subscribe("r/".concat(e,"/").concat(e,"/+/d")),this.subscribe("r/".concat(e,"/").concat(e,"/+/r")))}},{key:"unsubscribeRoom",value:function(e){null!=this.core.selected&&(this.unsubscribe("r/".concat(e=e||this.core.selected.id,"/").concat(e,"/+/t")),this.unsubscribe("r/".concat(e,"/").concat(e,"/+/d")),this.unsubscribe("r/".concat(e,"/").concat(e,"/+/r")))}},{key:"subscribeUserChannel",value:function(){this.subscribe("".concat(this.core.userData.token,"/c")),this.subscribe("".concat(this.core.userData.token,"/n"))}},{key:"publishPresence",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.publish("u/".concat(e,"/s"),t?1:0,{retain:!0})}},{key:"disconnect",value:function(){this.publishPresence(this.core.userData.email,!1),this.unsubscribe(Object.keys(this.mqtt._resubscribeTopics))}},{key:"subscribeUserPresence",value:function(e){this.subscribe("u/".concat(e,"/s"))}},{key:"unsubscribeUserPresence",value:function(e){this.unsubscribe("u/".concat(e,"/s"))}},{key:"publishTyping",value:function(e){if(null!=this.core.selected){var t=this.core.selected.id,n=this.core.user_id;this.publish("r/".concat(t,"/").concat(t,"/").concat(n,"/t"),e)}}},{key:"connected",get:function(){return null!=this.mqtt&&this.mqtt.connected}},{key:"logger",get:function(){return this.core.debugMQTTMode?console.log.bind(console,"QRealtime ->"):this.noop}},{key:"reNewMessage",get:function(){return/^(.+)\/c$/i}},{key:"reNotification",get:function(){return/^(.+)\/n$/i}},{key:"reTyping",get:function(){return/^r\/([\d]+)\/([\d]+)\/(.+)\/t$/i}},{key:"reDelivery",get:function(){return/^r\/([\d]+)\/([\d]+)\/(.+)\/d$/i}},{key:"reRead",get:function(){return/^r\/([\d]+)\/([\d]+)\/(.+)\/r$/i}}
1,{key:"reOnlineStatus",get:function(){return/^u\/(.+)\/s$/i}},{key:"reChannelMessage",get:function(){return/^(.+)\/(.+)\/c$/i}},{key:"subscribeTyping",get:function(){return this.subscribeRoom.bind(this)}},{key:"unsubscribeTyping",get:function(){return this.unsubscribeRoom.bind(this)}},{key:"subscribeRoomPresence",get:function(){return this.subscribeUserPresence.bind(this)}},{key:"unsubscribeRoomPresence",get:function(){return this.unsubscribeUserPresence.bind(this)}}]),e}();function ae(e,t){var n=v(),i={},r=/^r\/[\w]+\/[\w]+\/e$/i;e.mqtt.on("message",function(e,t){r.test(e)&&n.emit(e,t)});var o=function(e){return"r/".concat(e,"/").concat(e,"/e")};return{publishEvent:function(n,i){if(b.a.undefined(n))throw new Error("`roomId` required");if(b.a.not.string(n))throw new TypeError("`roomId` must have type of string");if(b.a.undefined(i))throw new Error("`payload` required");if(b.a.not.object(i))throw new TypeError("`payload` must have type of object");var r=JSON.stringify({sender:t,data:i});e.mqtt.publish(o(n),r)},subscribeEvent:function(t,r){if(b.a.undefined(t))throw new Error("`roomId` required");if(b.a.not.string(t))throw new TypeError("`roomId` must have type of string");if(b.a.undefined(r))throw new Error("`callback` required");if(b.a.not.function(r))throw new TypeError("`callback` must have type of function");var s=o(t);if(!i[s]){e.mqtt.subscribe(s);var a=function(e){var t=JSON.parse(e);r(t)};n.on(s,a),i[s]=a}},unsubscribeEvent:function(t){if(b.a.undefined(t))throw new Error("`roomId` required");if(b.a.not.string(t))throw new TypeError("`roomId` must have type of string");var r=o(t);i[r]&&(e.mqtt.unsubscribe(r),n.off(r,i[r]),i[r]=null,delete i[r])}}}var le=n(38),ce=n.n(le),ue=n(39),de=n.n(ue),he=n(40),pe=n.n(he),fe=function(){},ge=function(e){return new Promise(function(t){return setTimeout(t,e)})};function me(e,t){var n=t.isDebug,i=void 0!==n&&n,r=t.syncInterval,o=t.getShouldSync,a=t.syncOnConnect,c=t.lastCommentId,u=t.statusLogin,d=v(),h=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i?(e=console).log.apply(e,["QSync:"].concat(n)):{}},p=0,f=function(){if(u())return o()?r():a()},g=function(e,t,n,i,r){var o=v(),a=function(n){var i=N("api/v2/sdk/sync").param("last_received_comment_id",n).build();return e().get(i).then(function(e){var n=e.body.results,i=n.comments,r=n.meta.last_received_comment_id;return i.sort(function(e,t){return e.id-t.id}),Promise.resolve({lastMessageId:r,messages:i,interval:t()})}).catch(fe)};function c(){return(function(){return pe()(s.a.mark(function r(){var o,l,c;return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:o=0,l=100,c=function(){return null!=e()&&n()};case 3:if(!((o+=l)>=t()&&c)){r.next=9;break}return o=0,r.next=9,a(i());case 9:return r.next=11,de()(ge(l));case 11:r.next=3;break;case 13:case"end":return r.stop()}},r)})).apply(this,arguments)}).apply(this,arguments)}return{get synchronize(){return a},get on(){return o.on},get off(){return o.off},run:function(){return l()(s.a.mark(function e(){var t,n,a,l,u,d,h,p,f;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=!1,e.prev=2,l=ce()(c());case 4:return e.next=6,l.next();case 6:return t=(u=e.sent).done,e.next=10,u.value;case 10:if(d=e.sent,t){e.next=17;break}h=d;try{f=h.messages,(p=h.lastMessageId)>i()&&(f.forEach(function(e){return o.emit("message.new",e)}),o.emit("last-message-id.new",p))}catch(e){r("error when sync",e.message)}case 14:t=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),n=!0,a=e.t0;case 23:if(e.prev=23,e.prev=24,t||null==l.return){e.next=28;break}return e.next=28,l.return();case 28:if(e.prev=28,!n){e.next=31;break}throw a;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}},e,null,[[2,19,23,33],[24,,28,32]])}))()}}}(e,f,o,c,h);g.on("last-message-id.new",function(e){return lastMessageId=e}),g.on("message.new",function(e){return d.emit("message.new",e)}),g.run().catch(function(e){return h("got error when sync",e)});var m=function(e,t,n,i,r){var o=v(),a=function(n){var i=N("api/v2/sdk/sync_event").param("start_event_id",n).build();return e().get(i).then(function(e){var n=e.body.events,i=n.map(function(e){return e.id}).sort(function(e,t){return e-t}).pop(),r=n.filter(function(e){return"delivered"===e.action_topic}).map(function(e){return e.payload.data}),o=n.filter(function(e){return"read"===e.action_topic}).map(function(e){return e.payload.data}),s=n.filter(function(e){return"delete_message"===e.action_topic}).map(function(e){return e.payload.data}),a=n.filter(function(e){return"clear_room"===e.action_topic}).map(function(e){return e.payload.data});return Promise.resolve({lastId:i,messageDelivered:r,messageRead:o,messageDeleted:s,roomCleared:a,interval:t()})}).catch(fe)};function c(){return(function(){return pe()(s.a.mark(function r(){var o,l,c;return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:o=0,l=100,c=function(){return null!=e()&&n()};case 3:if(!((o+=l)>=t()&&c)){r.next=9;break}return o=0,r.next=9,a(i());case 9:return r.next=11,de()(ge(l));case 11:r.next=3;break;case 13:case"end":return r.stop()}},r)})).apply(this,arguments)}).apply(this,arguments)}return{get synchronize(){return a},get on(){return o.on},get off(){return o.off},run:function(){return l()(s.a.mark(function e(){var t,n,a,l,u,d,h,p;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=!1,e.prev=2,l=ce()(c());case 4:return e.next=6,l.next();case 6:return t=(u=e.sent).done,e.next=10,u.value;case 10:if(d=e.sent,t){e.next=17;break}h=d;try{(p=h.lastId)>i()&&(o.emit("last-event-id.new",p),h.messageDelivered.forEach(function(e){return o.emit("message.delivered",e)}),h.messageDeleted.forEach(function(e){return o.emit("message.deleted",e)}
1),h.messageRead.forEach(function(e){return o.emit("message.read",e)}),h.roomCleared.forEach(function(e){return o.emit("room.cleared",e)}))}catch(e){r("error when sync event",e.message)}case 14:t=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),n=!0,a=e.t0;case 23:if(e.prev=23,e.prev=24,t||null==l.return){e.next=28;break}return e.next=28,l.return();case 28:if(e.prev=28,!n){e.next=31;break}throw a;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}},e,null,[[2,19,23,33],[24,,28,32]])}))()}}}(e,f,o,function(){return p},h);return m.on("last-event-id.new",function(e){p=e}),m.on("message.read",function(e){d.emit("message.read",e)}),m.on("message.delivered",function(e){return d.emit("message.delivered",e)}),m.on("message.deleted",function(e){return d.emit("message.deleted",e)}),m.on("room.cleared",function(e){return d.emit("room.cleared",e)}),m.run().catch(function(e){return h("got error when sync event",e)}),{get on(){return d.on},get off(){return d.off},synchronize:function(){g.synchronize()},synchronizeEvent:function(){m.synchronize()}}}var ve,ye=n(80),be={MESSAGE_BEFORE_SENT:"message::before-sent",MESSAGE_BEFORE_RECEIVED:"message::before-received"};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach(function(t){f()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function we(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Te=Object.freeze({disabled:"UpdateCommentStatusMode.disabled",throttled:"UpdateCommentStatusMode.throttled",enabled:"UpdateCommentStatusMode.enabled"}),Ce=function(){function e(){var t,n,i=this;u()(this,e),f()(this,"_readComment",function(e,t){return i._updateStatus(e,t)}),f()(this,"_readCommentT",this._throttle(function(e,t){i._updateStatus(e,t)},function(){return i._throttleDelay})),f()(this,"_deliverComment",function(e,t){return i._updateStatus(e,void 0,t)}),f()(this,"_deliverCommentT",this._throttle(function(e,t){i._updateStatus(e,void 0,t)},function(){return i._throttleDelay})),this.events=v(),this.rooms=[],this.selected=null,this.room_name_id_map={},this.pendingCommentId=0,this.uploadedFiles=[],this.chatmateStatus=null,this.version="WEB_".concat(ye.version),this.userData={},this.AppId=null,this.baseURL="https://api.qiscus.com",this.mqttURL="wss://mqtt.qiscus.com:1886/mqtt",this.brokerLbUrl="https://realtime-lb.qiscus.com",this.syncOnConnect=1e4,this.enableEventReport=!1,this.enableRealtime=!0,this.enableRealtimeCheck=!0,this.HTTPAdapter=null,this.realtimeAdapter=null,this.customEventAdapter=null,this.isInit=!1,this.isSynced=!1,this.syncInterval=5e3,this.sync="socket",this.enableLb=!0,this.httpsync=null,this.eventsync=null,this.extras=null,this.last_received_comment_id=0,this.googleMapKey="",this.options={avatar:!0},this.isConfigLoaded=!1,this.updateCommentStatusMode=e.UpdateCommentStatusMode.enabled,this.updateCommentStatusThrottleDelay=300,this.UI={},this.mode="widget",this.avatar=!0,this.plugins=[],this.isLogin=!1,this.isLoading=!1,this.isInit=!1,this.emoji=!1,this.isTypingStatus="",this.customTemplate=!1,this.templateFunction=null,this.debugMode=!1,this.debugMQTTMode=!1,this._customHeader={},this.lastReceiveMessages=[],this._hookAdapter=(t={},n=function(e){return Array.isArray(t[e])||(t[e]=[]),t[e]},{trigger:function(e,t){return n(e).reduce(function(e,t){return Promise.resolve(e).then(t)},Promise.resolve(t))},intercept:function(e,t){n(e).push(t);var i=n(e).length;return function(){return n(e).splice(i,1)}}}),this._uploadURL=null}var t,n,i,o,a,c,d,p;return h()(e,[{key:"init",value:(p=l()(s.a.mark(function e(t){var n,i,r=this;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.AppId){e.next=2;break}throw new Error("Please provide valid AppId");case 2:return this.AppId=t.AppId,(null==t.baseURL||this.baseURL===t.baseURL)&&(null==t.mqttURL||this.mqttURL===t.mqttURL)||null!=t.brokerLbURL&&this.brokerLbUrl!==t.brokerLbURL?null!=t.enableRealtimeLB&&(this.enableLb=t.enableRealtimeLB):(this.logger("force disable load balancing for realtime server, because `baseURL` or `mqttURL` get changed but did not provide `brokerLbURL`"),this.enableLb=!1),null!=t.updateCommentStatusMode&&(this.updateCommentStatusMode=t.updateCommentStatusMode),null!=t.updateCommentStatusThrottleDelay&&(this.updateCommentStatusThrottleDelay=t.updateCommentStatusThrottleDelay),t.baseURL&&(this.baseURL=t.baseURL),t.mqttURL&&(this.mqttURL=t.brokerUrl||t.mqttURL),t.mqttURL&&(this.brokerUrl=t.brokerUrl||t.mqttURL),t.brokerLbURL&&(this.brokerLbUrl=t.brokerLbURL),t.uploadURL&&(this.uploadURL=t.uploadURL),t.sync&&(this.sync=t.sync),t.mode&&(this.mode=t.mode),t.syncInterval&&(this.syncInterval=t.syncInterval||5e3),t.googleMapKey&&(this.googleMapKey=t.googleMapKey),t.allowedFileTypes&&(this.allowedFileTypes=t.allowedFileTypes),t.options&&(this.options=Object.assign({},this.options,t.options)),t.customTemplate&&(this.customTemplate=t.customTemplate),t.templateFunction&&(this.templateFunction=t.templateFunction),null!=t.syncInterval&&(this.syncInterval=t.syncInterval),this.HTTPAdapter=new A({baseURL:this.baseURL,Ap
1pId:this.AppId,userId:this.user_id,version:this.version,getCustomHeader:function(){return r._customHeader}}),n=function(e,t,n){if(""==t&&null!=e){if("string"!=typeof e)return e;if(e.length>0)return e}if(null!=t){if(t.length>0)return t;if("string"!=typeof t)return t}return n},i=function(e){return e.includes("wss://")?e:"wss://".concat(e,":1886/mqtt")},e.next=28,this.HTTPAdapter.get_request("api/v2/sdk/config").then(function(e){return r.isConfigLoaded=200==e.status,e.body.results}).then(function(e){var o=r.brokerLbUrl,s=r.mqttURL,a=r.enableRealtime,l=r.enableRealtimeCheck,c=r.syncInterval,u=r.syncOnConnect,d=r.enableEventReport;r.baseURL=n(t.baseURL,e.base_url,r.baseURL),r.brokerLbUrl=n(t.brokerLbURL,e.broker_lb_url,o),r.mqttURL=i(n(t.mqttURL,e.broker_url,s)),r.enableRealtime=n(t.enableRealtime,e.enable_realtime,a),r.syncInterval=n(t.syncInterval,e.sync_interval,c),r.syncOnConnect=n(t.syncOnConnect,e.sync_on_connect,u),r.enableRealtimeCheck=n(null,e.enable_realtime_check,l),r.enableEventReport=n(null,e.enable_event_report,d),r.extras=n(null,e.extras,{})}).catch(function(e){r.logger("got error when trying to get app config",e),r.isConfigLoaded=!0});case 28:this._getMqttClientId=function(){return"".concat(r.AppId,"_").concat(r.user_id,"_").concat(Date.now())},this.realtimeAdapter=new se(this.mqttURL,this,this.isLogin,{brokerLbUrl:this.brokerLbUrl,enableLb:this.enableLb,shouldConnect:this.enableRealtime,getClientId:this._getMqttClientId}),this.realtimeAdapter.on("connected",function(){r.options.onReconnectCallback&&r.options.onReconnectCallback(),0==r.enableRealtime&&(r.realtimeAdapter.mqtt.connected=!1,r.realtimeAdapter=new se(null,r,r.isLogin,{brokerLbUrl:null,enableLb:null,shouldConnect:r.enableRealtime,getClientId:r._getMqttClientId})),!r.isLogin&&r.realtimeAdapter.connected||(r.last_received_comment_id=r.userData.last_comment_id,r.updateLastReceivedComment(r.last_received_comment_id))}),this.realtimeAdapter.on("close",function(){}),this.realtimeAdapter.on("reconnect",function(){(r.isLogin||!r.realtimeAdapter.connected||r.enableRealtime)&&0==r.realtimeAdapter.connected&&r.realtimeAdapter.getMqttNode().then(function(e){r.mqttURL=e,r.realtimeAdapter=new se(r.mqttURL,r,r.isLogin,{brokerLbUrl:r.brokerLbUrl,enableLb:r.enableLb,shouldConnect:r.enableRealtime,getClientId:r._getMqttClientId})})}),this.realtimeAdapter.on("message-delivered",function(e){return r._setDelivered(e.commentId,e.commentUniqueId,e.userId)}),this.realtimeAdapter.on("message-read",function(e){return r._setRead(e.commentId,e.commentUniqueId,e.userId)}),this.realtimeAdapter.on("new-message",function(){var e=l()(s.a.mark(function e(t){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,t);case 2:r.events.emit("newmessages",[t=e.sent]);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),this.realtimeAdapter.on("presence",function(e){return r.events.emit("presence",e)}),this.realtimeAdapter.on("comment-deleted",function(e){return r.events.emit("comment-deleted",e)}),this.realtimeAdapter.on("room-cleared",function(e){return r.events.emit("room-cleared",e)}),this.realtimeAdapter.on("typing",function(e){return r.events.emit("typing",{message:e.message,username:e.userId,room_id:e.roomId})}),this.syncAdapter=me(function(){return r.HTTPAdapter},{getToken:function(){return r.userData.token},syncInterval:function(){return r.syncInterval},getShouldSync:function(){return r.isLogin&&!r.realtimeAdapter.connected},syncOnConnect:function(){return r.syncOnConnect},lastCommentId:function(){return r.last_received_comment_id},statusLogin:function(){return r.isLogin}}),this.syncAdapter.on("message.new",function(){var e=l()(s.a.mark(function e(t){var n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,t);case 2:t=e.sent,null!=r.selected?-1===r.selected.comments.findIndex(function(e){return e.id===t.id||e.unique_id===t.unique_temp_id})&&((n=new R(t)).room_id===r.selected.id&&(r.selected.comments.push(n),r.sortComments()),r.events.emit("newmessages",[t])):r.events.emit("newmessages",[t]);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),this.syncAdapter.on("message.delivered",function(e){r._setDelivered(e.comment_id,e.comment_unique_id,e.email)}),this.syncAdapter.on("message.read",function(e){r._setRead(e.comment_id,e.comment_unique_id,e.email)}),this.syncAdapter.on("message.deleted",function(e){e.deleted_messages.forEac
1h(function(e){r.events.emit("comment-deleted",{roomId:e.room_id,commentUniqueIds:e.message_unique_ids,isForEveryone:!0,isHard:!0})})}),this.syncAdapter.on("room.cleared",function(e){e.deleted_rooms.forEach(function(e){r.events.emit("room-cleared",e)})}),this.customEventAdapter=ae(this.realtimeAdapter,this.user_id),this.setEventListeners();case 48:case"end":return e.stop()}},e,this)})),function(e){return p.apply(this,arguments)})},{key:"_setRead",value:function(e,t,n){if(null!=this.selected){var i=this.selected,r=i.comments.find(function(n){return n.id===e||n.unique_id===t});if(null!=r&&"read"!==r.status){var o={participants:i.participants,actor:n,comment_id:e,activeActorId:this.user_id};i.comments.forEach(function(e){e.id<=r.id&&e.markAsRead(o)}),r.isRead&&this.events.emit("comment-read",{comment:r,userId:n})}}}},{key:"_setDelivered",value:function(e,t,n){if(null!=this.selected){var i=this.selected,r=i.comments.find(function(n){return n.id===e||n.unique_id===t});if(null!=r&&"read"!==r.status){var o={participants:i.participants,actor:n,comment_id:e,activeActorId:this.user_id};i.comments.forEach(function(e){e.id<=r.id&&e.markAsDelivered(o)}),r.isDelivered&&this.events.emit("comment-delivered",{comment:r,userId:n})}}}},{key:"setEventListeners",value:function(){var e=this,t=this;t.events.on("start-init",function(){t.HTTPAdapter=new A({baseURL:t.baseURL,Ap
1pId:t.AppId,userId:t.user_id,version:t.version,getCustomHeader:function(){return e._customHeader}}),t.HTTPAdapter.setToken(t.userData.token),t.authAdapter=new k(t.HTTPAdapter)}),t.events.on("room-changed",function(n){e.logging("room changed",n),t.options.roomChangedCallback&&t.options.roomChangedCallback(n)}),t.events.on("file-uploaded",function(e){t.options.fileUploadedCallback&&t.options.fileUploadedCallback(e)}),t.events.on("profile-updated",function(e){t.username=e.name,t.avatar_url=e.avatar_url,t.options.updateProfileCallback&&t.options.updateProfileCallback(e)}),t.events.on("newmessages",function(n){e.logging("newmessages",n),e.lastReceiveMessages.length>0&&e.lastReceiveMessages[0].unique_temp_id===n[0].unique_temp_id?e.logging("lastReceiveMessages double",n):(e.lastReceiveMessages=n,t._callNewMessagesCallback(n),n.forEach(function(n){if(t.receiveComment(n.room_id,n.id),t.selected&&n.room_id===t.selected.id){var i=t.selected,r=t.selected.comments[t.selected.comments.length-1];r.isPending||n.id<=t.last_received_comment_id||t.user_id===n.email||t.readComment(n.room_id,n.id);var o=r.id,s=t.selected.comments.find(function(e){return e.id===r.comment_before_id});r.isPending||s||(e.logging("comment before id not found! ",n.comment_before_id),t.synchronize(o));var a=new R(n);i.receiveComment(a),i.last_comment_id=a.id,i.last_comment_message=a.message}t.updateLastReceivedComment(n.id),e.sortComments()}))}),this.events.on("login-success",function(t){e.isLogin=!0,e.userData=t.user,e.last_received_comment_id=e.userData.last_comment_id,e.realtimeAdapter.connected||e.updateLastReceivedComment(e.last_received_comment_id),e.HTTPAdapter=new A({baseURL:e.baseURL,AppId:e.AppId,userId:e.user_id,version:e.version,getCustomHeader:function(){return e._customHeader}}),e.HTTPAdapter.setToken(e.userData.token),e.userAdapter=new P(e.HTTPAdapter),e.roomAdapter=new M(e.HTTPAdapter),e.realtimeAdapter.subscribeUserChannel(),null!=e.presensePublisherId&&-1!==e.presensePublisherId&&clearInterval(e.presensePublisherId),e.presensePublisherId=setInterval(function(){e.realtimeAdapter.publishPresence(e.user_id,!0)},3500),e.options.loginSuccessCallback&&e.options.loginSuccessCallback(t)}),t.events.on("login-error",function(e){t.options.loginErrorCallback&&t.options.loginErrorCallback(e)}),t.events.on("room-cleared",function(e){if(t.selected){var n=t.selected;t.selected.unique_id===e.unique_id&&(t.selected=null,t.selected=n)}t.options.roomClearedCallback&&t.options.roomClearedCallback(e)}),t.events.on("comment-deleted",function(e){var n=e.isHard;t.selected&&t.selected.id==e.roomId&&e.commentUniqueIds.map(function(e){var i=t.selected.comments.findIndex(function(t){return t.unique_id===e});i>-1&&(n?t.selected.comments.splice(i,1):t.selected.comments[i].message="this message has been deleted")}),t.options.commentDeletedCallback&&t.options.commentDeletedCallback(e)}),t.events.on("comment-delivered",function(e){return t.logging("comment-delivered",e),!!e&&(t.options.commentDeliveredCallback?t.options.commentDeliveredCallback(e):void 0)}),t.events.on("chat-room-created",function(e){t.isLoading=!1,t.options.chatRoomCreatedCallback&&t.options.chatRoomCreatedCallback(e)}),t.events.on("group-room-created",function(e){t.isLoading=!1,t.options.groupRoomCreatedCallback&&t.options.groupRoomCreatedCallback(e)}),t.events.on("header-clicked",function(e){t.options.headerClickedCallback&&t.options.headerClickedCallback(e)}),t.events.on("comment-read",function(e){t.logging("comment-read",e),t.options.commentReadCallback&&t.options.commentReadCallback(e)}),t.events.on("presence",function(n){var i=n.message,r=n.userId,o=i.split(":");e.chatmateStatus!==o[0]&&(e.chatmateStatus=1===o[0]?"Online":"Last seen ".concat(E()(Number(o[1].substring(0,13))))),t.options.presenceCallback&&t.options.presenceCallback(i,r)}),t.events.on("typing",function(e){t.options.typingCallback&&t.options.typingCallback(e)}),t.events.on("message-info",function(e){t.options.messageInfoCallback&&t.options.messageInfoCallback(e)}),t.events.on("participants-added",function(t){var n;null!=t&&null!=e.selected&&(n=e.selected.participants).push.apply(n,r()(t))}),t.events.on("participants-removed",function(t){if(null!=t&&null!=e.selected){var n=e.selected.participants.filter(function(e){return t.indexOf(e.email)<=-1});e.selected.participants=n}}),t.events.on("block-user",function(e){t.options.blockUserCallback&&t.options.blockUserCallback(e)}),t.events.on("unblock-user",function(e){t.options.unblockUserCallback&&t.options.unblockUserCallback(e)})}},{key:"onReconnectMqtt",value:function(){this.options.onReconnectCallback&&this.options.onReconnectedCallback(),this.selected&&this.loadComments(this.selected.id)}},{key:"_callNewMessagesCallback",value:function(e){this.options.newMessagesCallback&&this.options.newMessagesCallback(e)}},{key:"updateLastReceivedComment",value:function(e){this.last_received_comment_id<e&&(this.last_received_comment_id=e)}},{key:"setUser",value:function(e,t,n,i,r){var o=this,s=this;s.user_id=e,s.key=t,s.username=n,s.avatar_url=i;var a={email:this.user_id,password:this.key,username:this.username,extras:r?JSON.stringify(r):null};return this.avatar_url&&(a.avatar_url=this.avatar_url),new Promise(function(e,t){var n=setInterval(function(){if(o.isConfigLoaded)return clearInterval(n),o.logger("Config Success!"),s.events.emit("start-init"),s.authAdapter.loginOrRegister(a).then(function(t){s.isInit=!0,s.events.emit("login-success",t),o.realtimeAdapter.connect(),e(t)},function(e){s.events.emit("login-error",e),t(e)});o.debugMode&&o.logger("Waiting for init config...")},300)})}},{key:"setUserWithIdentityToken",value:function(e){var t=this;if(!(e&&"user"in e))return this.events.emit("login-error",e);this.email=e.user.email,this.user_id=e.user.email,this.key=e.identity_token,this.username=e.user.username,this.avatar_url=e.user.avatar_url,this.isInit=!0;var n=setInterval(function(){t.isConfigLoaded?(clearInterval(n),t.logger("Config Success!"),t.events.emit("login-success",e)):t.debugMode&&t.logger("Waiting for init config...")},300)}},{key:"publishOnlinePresence",value:function(e){var t=this;!0===e?ve=setInterval(function(){t.realtimeAdapter.publishPresence(t.user_id,!0)},3500):(clearInterval(this.presensePublisherId),clearInterval(ve),setTimeout(function(){t.realtimeAdapter.publishPresence(t.user_id,!1)},3500))}},{key:"subscribeUserPresence",value:function(e){this.realtimeAdapter.subscribeUserPresence(e)}},{key:"unsubscribeUserPresence",value:function(e){this.realtimeAdapter.unsubscribeUserPresence(e)}},{key:"logout",value:function(){clearInterval(this.presensePublisherId),this.publishOnlinePresence(!1),this.selected=null,this.isInit=!1,this.isLogin=!1,this.realtimeAdapter.disconnect(),this.userData={}}},{key:"disconnect",value:function(){this.logout()}},{key:"setActiveRoom",value:function(e){var t=this;if(this.selected&&(this.realtimeAdapter.unsubscribeTyping(),"single"===this.selected.room_type)){var n=this.selected.participants.filter(function(e){return e.email!==t.user_id});n.length>0&&this.realtimeAdapter.unsubscribeRoomPresence(n[0].email)}null==e.participants&&(e.participants=[]);var i=e.participants.find(function(e){return e.email!==t.user_id});this.chatmateStatus=null,this.isTypingStatus=null,this.selected=e;var r=setInterval(function(){t.debugMode&&t.logger("Trying Initial Subscribe"),null!=t.realtimeAdapter?(t.debugMode&&t.logger("MQTT Connected"),clearInterval(r),"single"===e.room_type&&null!=i&&t.realtimeAdapter.subscribeRoomPresence(i.email),null==t.selected||t.selected.isChannel||(t.realtimeAdapter.subscribeTyping(e.id),t.events.emit("room-changed",t.selected)),t.debugMode&&null==t.realtimeAdapter&&t.logger("Retry")):t.debugMode&&t.logger("MQTT Not Connected, yet")},3e3)}},{key:"chatTarget",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null!=this.userData.length)return!1;var i=n?n.message:null,r=n.distinctId;return this.isLoading=!0,this.isTypingStatus="",this.roomAdapter.getOrCreateRoom(e,n,r).then(function(){var e=l()(s.a.mark(function e(n){var r,o,a;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new D(n),t.updateLastReceivedComment(r.last_comment_id),t.isLoading=!1,o=function(){var e=l()(s.a.mark(function e(n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.next=6,Promise.all(r.comments.map(function(e){return o(e)}));case 6:if(r.comments=e.sent,t.setActiveRoom(r),(a=r.comments[r.comments.length-1])&&t.readComment(r.id,a.id),t.events.emit("chat-room-created",{room:r}),i){e.next=13;break}return e.abrupt("return",r);case 13:return e.abrupt("return",t.sendComment(r.id,i).then(function(){return Promise.resolve(r)}
1).catch(function(e){console.error("Error when submit comment",e)}));case 15:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){return console.error("Error when creating room",e),t.isLoading=!1,Promise.reject(e)})}},{key:"chatGroup",value:function(e){if(this.isInit)return this.getRoomById(e).then(function(e){return Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"getRoomById",value:function(e){var t=this;if(this.isInit){var n=this;return n.isLoading=!0,n.isTypingStatus="",n.roomAdapter.getRoomById(e).then(function(){var e=l()(s.a.mark(function e(i){var r,o,a,l,c,u,d;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=i.results.room,o=[],a=we(i.results.comments.reverse()),e.prev=3,a.s();case 5:if((l=a.n()).done){e.next=13;break}return c=l.value,e.next=9,t._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,c);case 9:o.push(e.sent);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),a.e(e.t0);case 18:return e.prev=18,a.f(),e.finish(18);case 21:return u=new D(Se(Se({},r),{},{comments:o,name:r.room_name})),n.updateLastReceivedComment(u.last_comment_id),n.setActiveRoom(u),n.isLoading=!1,(d=u.comments[u.comments.length-1])&&n.readComment(u.id,d.id),u.isChannel&&t.realtimeAdapter.subscribeChannel(t.AppId,u.unique_id),e.abrupt("return",u);case 29:case"end":return e.stop()}},e,null,[[3,15,18,21]])}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){return console.error("Error getting room by id",e),Promise.reject(e)})}}},{key:"getOrCreateRoomByUniqueId",value:function(e,t,n){var i=this,r=this;return r.isLoading=!0,r.isTypingStatus="",r.roomAdapter.getOrCreateRoomByUniqueId(e,t,n).then(function(){var e=l()(s.a.mark(function e(t){var n,o,a;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new D(t),r.updateLastReceivedComment(n.last_comment_id),o=function(){var e=l()(s.a.mark(function e(t){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.next=5,Promise.all(n.comments.map(function(e){return o(e)}));case 5:return n.comments=e.sent,r.setActiveRoom(n),r.isLoading=!1,(a=n.comments[n.comments.length-1])&&r.readComment(n.id,a.id),i.realtimeAdapter.subscribeChannel(i.AppId,n.unique_id),e.abrupt("return",Promise.resolve(n));case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){return Promise.reject(e)})}},{key:"getOrCreateRoomByChannel",value:function(e,t,n){return this.getOrCreateRoomByUniqueId(e,t,n)}},{key:"sortComments",value:function(){this.selected&&this.selected.comments.sort(function(e,t){return e.unix_timestamp-t.unix_timestamp})}},{key:"loadRoomList",value:(d=l()(s.a.mark(function e(){var t,n=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.userAdapter.loadRoomList(t);case 3:return e.abrupt("return",e.sent.map(function(e){return e.last_comment_id=e.last_comment.id,e.last_comment_message=e.last_comment.message,e.last_comment_message_created_at=e.last_comment.timestamp,e.room_type=e.chat_type,e.comments=[],new D(e)}));case 5:case"end":return e.stop()}},e,this)})),function(){return d.apply(this,arguments)})},{key:"loadComments",value:function(e){var t=this;return this.userAdapter.loadComments(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).then(function(){var e=l()(s.a.mark(function e(n){var i,r,o,a;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=[],r=we(n),e.prev=2,r.s();case 4:if((o=r.n()).done){e.next=13;break}return a=o.value,e.t0=i,e.next=9,t._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,a);case 9:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t2=e.catch(2),r.e(e.t2);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return null!=t.selected&&(t.selected.receiveComments(i.reverse()),t.sortComments()),e.abrupt("return",i);case 23:case"end":return e.stop()}},e,null,[[2,15,18,21]])}));return function(t){return e.apply(this,arguments)}}())}},{key:"loadMore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null!=this.selected)return t.last_comment_id=e,t.after=!1,this.loadComments(this.selected.id,t)}},{key:"registerDeviceToken",value:(c=l()(s.a.mark(function e(t){var n,i=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],e.next=3,this.HTTPAdapter.post("api/v2/sdk/set_user_device_token",{device_token:t,device_platform:"rn",
1is_development:n});case 3:return e.abrupt("return",e.sent.body.results);case 5:case"end":return e.stop()}},e,this)})),function(e){return c.apply(this,arguments)})},{key:"removeDeviceToken",value:(a=l()(s.a.mark(function e(t){var n,i=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],e.next=3,this.HTTPAdapter.post("api/v2/sdk/remove_user_device_token",{device_token:t,device_platform:"rn",is_development:n});case 3:return e.abrupt("return",e.sent.body.results);case 5:case"end":return e.stop()}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"searchMessages",value:(o=l()(s.a.mark(function e(){var t,n=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},console.warn("Deprecated: search message will be removed on next release"),e.next=4,this.userAdapter.searchMessages(t);case 4:return e.abrupt("return",e.sent.map(function(e){return new R(e)}));case 6:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"updateProfile",value:function(e){var t=this;return this.userAdapter.updateProfile(e).then(function(n){return t.events.emit("profile-updated",e),t.userData=n,Promise.resolve(n)},function(e){return t.logger(e)})}},{key:"getNonce",value:function(){return m.a.post("".concat(this.baseURL,"/api/v2/sdk/auth/nonce")).send().set("qiscus_sdk_app_id","".concat(this.AppId)).set("qiscus_sdk_version","".concat(this.version)).then(function(e){return Promise.resolve(e.body.results)},function(e){return Promise.reject(e)})}},{key:"verifyIdentityToken",value:function(e){return m.a.post("".concat(this.baseURL,"/api/v2/sdk/auth/verify_identity_token")).send({identity_token:e}).set("qiscus_sdk_app_id","".concat(this.AppId)).set("qiscus_sdk_version","".concat(this.version)).then(function(e){return Promise.resolve(e.body.results)},function(e){return Promise.reject(e)})}},{key:"sendComment",value:(i=l()(s.a.mark(function e(t,n,i){var r,o,a,c,u,d,h,p,f,g,m=this,v=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>3&&void 0!==v[3]?v[3]:"text",o=v.length>4?v[4]:void 0,a=v.length>5?v[5]:void 0,(c=this).options.prePostCommentCallback&&c.options.prePostCommentCallback(n),c.options.commentFormaterCallback&&(n=c.options.commentFormaterCallback(n)),c.pendingCommentId--,u={message:n,username_as:this.username,username_real:this.user_id,user_avatar_url:this.userData.avatar_url,user_extras:this.userData.user_extras,id:Math.round(1e7*Math.random()),type:r||"text",timestamp:S()(new Date),unique_id:i?String(i):null,payload:re(function(){return JSON.parse(o)},o,function(e){return m.logger("Error when parsing payload",e.message)})},d=c.prepareCommentToBeSubmitted(u),"reply"===r&&(h=JSON.parse(o),p=c.selected.comments.find(function(e){return e.id===h.replied_comment_id}),h.replied_comment_message="reply"===p.type?p.payload.text:p.message,h.replied_comment_sender_username=p.username_as,d.payload=h),f=a||c.extras,e.next=13,this._hookAdapter.trigger(be.MESSAGE_BEFORE_SENT,Se(Se({},d),{},{extras:f}));case 13:return g=c.prepareCommentToBeSubmitted(g=e.sent),c.selected&&c.selected.comments.push(g),e.abrupt("return",this.userAdapter.postComment(""+t,g.message,g.unique_id,g.type,g.payload,g.extras).then(function(){var e=l()(s.a.mark(function e(t){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m._hookAdapter.trigger(be.MESSAGE_BEFORE_RECEIVED,t);case 2:if(t=e.sent,Object.assign(g,t),c.selected){e.next=6;break}return e.abrupt("return",Promise.resolve(g));case 6:return g.markAsSent(),g.id=t.id,g.before_id=t.comment_before_id,g.unix_timestamp=t.unix_timestamp,c.sortComments(),e.abrupt("return",g);case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){return g.markAsFailed(),Promise.reject(e)}));case 17:case"end":return e.stop()}},e,this)})),function(e,t,n){return i.apply(this,arguments)})},{key:"getUsers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;return this.HTTPAdapter.get_request("api/v2/sdk/get_user_list").query({query:e,page:t,limit:n}).then(function(e){return Promise.resolve(e.body.results)})}},{key:"getParticipants",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;return this.HTTPAdapter.get_request("api/v2/sdk/room_participants").query({room_unique_id:e,page:t,limit:n}).then(function(e){return e.body.results})}},{key:"getRoomParticipants",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return console.warn("`getRoomParticipants` are deprecated, use `getParticipants` instead."),this.HTTPAdapter.get_request("api/v2/sdk/room_participants").query({room_unique_id:e,offset:t}).then(function(e){return Promise.resolve(e.body.results)})}},{key:"resendComment",value:function(e){if(null!=this.selected){var t=this,n=t.selected,i=n.comments.find(function(t){return t.id===e.id});return this.userAdapter.postComment(""+n.id,i.message,i.unique_id,e.type,e.payload,t.extras).then(function(e){return i.markAsSent(),i.id=e.id,i.before_id=e.comment_before_id,new Promise(function(e,n){return e(t.selected)})},function(e){return i.markAsFailed(),new Promise(function(t,n){return n(e)})})}}},{key:"prepareCommentToBeSubmitted",value:function(e){var t,n;return t=new R(e),n="bq"+Date.now(),e.unique_id&&(n=e.unique_id),t.attachUniqueId(n),t.markAsPending(),t.isDelivered=!1,t.isSent=!1,t.isRead=!1,t.unix_timestamp=Math.round((new Date).getTime()/1e3),t}},{key:"updateRoom",value:function(e){return this.roomAdapter.updateRoom(e)}},{key:"removeSelectedRoomParticipants",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";if(b.a.not.array(e))return Promise.reject(new Error("`values` must have type of array"));var n=this.selected.participants;if(!n)return Promise.reject(new Error("Nothing selected room chat."));var i=n;return"id"===t&&(i=n.filter(function(t){return e.indexOf(t.id)<=-1})),"email"===t&&(i=n.filter(function(t){return e.indexOf(t.email)<=-1})),"username"===t&&(i=n.filter(function(t){return e.indexOf(t.username)<=-1})),this.selected.participants=i,Promise.resolve(n)}},{key:"createGroupRoom",value:function(e,t,n){var i=this;if(!this.isLogin)throw new Error("Please initiate qiscus SDK first");return new I(this.roomAdapter).withName(e).withOptions(n).addParticipants(t).create().then(function(e){return i.events.emit("group-room-created",e),Promise.resolve(e)})}},{key:"addParticipantsToGroup",value:function(e,t){var n=this;if(!Array.isArray(t))throw new Error("emails' must be type of Array");return n.roomAdapter.addParticipantsToGroup(e,t).then(function(e){return n.events.emit("participants-added",e),Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"removeParticipantsFromGroup",value:function(e,t){var n=this;return b.a.not.array(t)?Promise.reject(new Error("`emails` must have type of array")):this.roomAdapter.removeParticipantsFromGroup(e,t).then(function(e){return n.events.emit("participants-removed",t),Promise.resolve(e)})}},{key:"getBlockedUser",value:function(){return this.userAdapter.getBlockedUser(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:20).then(function(e){return Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"blockUser",value:function(e){var t=this;return t.userAdapter.blockUser(e).then(function(e){return t.events.emit("block-user",e),Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"unblockUser",value:function(e){var t=this;return t.userAdapter.unblockUser(e).then(function(e){return t.events.emit("unblock-user",e),Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"getUserPresences",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(b.a.not.array(e))return Promise.reject(new Error("`email` must have type of array"));var t=this;return t.userAdapter.getUserPresences(e).then(function(e){return t.events.emit("user-status",e),Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"upload",value:function(e,t){return m.a.post(this.uploadURL).attach("file",e).set("qiscus_sdk_app_id",this.AppId).set("qiscus_sdk_token",this.userData.token).set("qiscus_sdk_user_id",this.user_id
1).on("progress",function(e){"upload"===e.direction&&t(null,e)}).then(function(e){var n=e.body.results.file.url;return t(null,null,e.body.results.file.url),Promise.resolve(n)}).catch(function(e){return t(e),Promise.reject(e)})}},{key:"uploadFile",value:function(e,t){var n=this,i=new FormData;i.append("file",t);var r=new XMLHttpRequest;r.open("POST","".concat(n.baseURL,"/api/v2/sdk/upload"),!0),r.setRequestHeader("qiscus_sdk_app_id","".concat(n.AppId)),r.setRequestHeader("qiscus_sdk_user_id","".concat(n.user_id)),r.setRequestHeader("qiscus_sdk_token","".concat(n.userData.token)),r.onload=function(){if(200===r.status){var t=JSON.parse(r.response).results.file.url;return n.events.emit("fileupload",t),n.sendComment(e,"[file] ".concat(t," [/file]"))}return Promise.reject(r)},r.send(i)}},{key:"addUploadedFile",value:function(e,t){this.uploadedFiles.push(new Ie(e,t))}},{key:"removeUploadedFile",value:function(e,t){var n=this.uploadedFiles.findIndex(function(n){return n.name===e&&n.roomId===t});this.uploadedFiles.splice(n,1)}},{key:"publishTyping",value:function(e){this.realtimeAdapter.publishTyping(e)}},{key:"getRoomsInfo",value:function(e){return this.userAdapter.getRoomsInfo(e)}},{key:"deleteComment",value:function(e,t,n,i){var r=this;if(!Array.isArray(t))throw new Error("unique ids' must be type of Array");return this.userAdapter.deleteComment(e,t,n,i).then(function(o){return r.events.emit("comment-deleted",{roomId:e,commentUniqueIds:t,isForEveryone:n,isHard:i}),Promise.resolve(o)},function(e){return Promise.reject(e)})}},{key:"clearRoomsCache",value:function(){var e=this;if(this.selected){this.room_name_id_map=f()({},this.selected.name,this.selected.id);var t=this.rooms.length,n=this.rooms.findIndex(function(t){return t.id===e.selected.id});n+1!==t&&this.rooms.splice(n+1,t-(n+1)),(n=this.rooms.findIndex(function(t){return t.id===e.selected.id}))>0&&this.rooms.length>1&&this.rooms.splice(1,this.rooms.length-1)}}},{key:"exitChatRoom",value:function(){var e=this;this.realtimeAdapter.unsubscribeTyping(),re(function(){return e.selected.participants.filter(function(t){return t.email!==e.user_id}).map(function(e){return e.email})},null,this.noop,function(t){return t.forEach(function(t){return e.realtimeAdapter.unsubscribeRoomPresence(t)})}),this.selected=null}},{key:"clearRoomMessages",value:function(e){if(!Array.isArray(e))throw new Error("room_ids must be type of array");return this.userAdapter.clearRoomMessages(e)}},{key:"logging",value:function(e){this.debugMode&&console.log(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"getTotalUnreadCount",value:function(){return this.roomAdapter.getTotalUnreadCount().then(function(e){return Promise.resolve(e)},function(e){return Promise.reject(e)})}},{key:"getRoomUnreadCount",value:function(){return this.roomAdapter.getRoomUnreadCount()}},{key:"publishEvent",value:function(){var e;(e=this.customEventAdapter).publishEvent.apply(e,arguments)}},{key:"subscribeEvent",value:function(){var e;(e=this.customEventAdapter).subscribeEvent.apply(e,arguments)}},{key:"unsubscribeEvent",value:function(){var e;(e=this.customEventAdapter).unsubscribeEvent.apply(e,arguments)}},{key:"setCustomHeader",value:function(e){if(b.a.not.json(e))throw new TypeError("`headers` must have type of object");this._customHeader=e}},{key:"getUserProfile",value:function(){return this.userAdapter.getProfile()}},{key:"intercept",value:function(e,t){return this._hookAdapter.intercept(e,t)}},{key:"getThumbnailURL",value:function(e){return e.replace(/^https?:\/\/\S+(\/upload\/)\S+(\.\w+)$/i,function(e,t,n){return e.replace(t,"/upload/w_320,h_320,c_limit/").replace(n,".png")})}},{key:"getBlurryThumbnailURL",value:function(e){return e.replace(/^https?:\/\/\S+(\/upload\/)\S+(\.\w+)$/i,function(e,t,n){return e.replace(t,"/upload/w_320,h_320,c_limit,e_blur:300/").replace(n,".png")})}},{key:"noop",value:function(){}},{key:"_updateStatus",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null!=n,r=null!=t?"read":i?"receive":void 0,o=!(null!=this.selected&&this.selected.isChannel||i&&!this._updateStatusEnabled);if(this.debugMode&&(console.group("update-command-status"),console.log("run:",r,"on: roomId(".concat(e,") commentId(").concat(t||n,")")),console.log("is able to run command?",o),console.groupEnd()),!o)return!1;
1this.userAdapter.updateCommentStatus(e,t,n).catch(function(e){})}},{key:"readComment",value:function(t,n){return this.updateCommentStatusMode===e.UpdateCommentStatusMode.enabled?this._readComment(t,n):this._readCommentT(t,n)}},{key:"receiveComment",value:function(t,n){return this.updateCommentStatusMode===e.UpdateCommentStatusMode.enabled?this._deliverComment(t,n):this._deliverCommentT(t,n)}},{key:"_throttle",value:function(e,t){var n=!1;return function(){var i=t();n||(e.apply(void 0,arguments),n=!0,setTimeout(function(){return n=!1},i))}}},{key:"searchMessage",value:(n=l()(s.a.mark(function e(){var t,n,i,r,o,a,l,c,u,d,h,p,f=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t=f.length>0&&void 0!==f[0]?f[0]:{}).query,r=void 0===(i=t.roomIds)?[]:i,o=t.userId,a=t.type,l=t.roomType,c=t.page,u=t.limit,d="api/v2/sdk/search",h=["group","single","channel"].some(function(e){return e===l}),null==l||h){e.next=5;break}return e.abrupt("return",Promise.reject("Invalid room type, valid room type are: `group`, `single`, and `channel`"));case 5:return p={type:null==l?void 0:"single"===l?"single":"group",isPublic:null==l?void 0:"channel"===l},e.abrupt("return",this.HTTPAdapter.post_json(d,{token:this.token,query:n,sender:o,type:a,room_ids:r.map(function(e){return String(e)}),room_type:p.type||void 0,is_public:p.isPublic||void 0,page:c,limit:u}).then(function(e){return e.body}));case 7:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getFileList",value:(t=l()(s.a.mark(function e(){var t,n,i,r,o,a,l,c=arguments;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=void 0===(n=(t=c.length>0&&void 0!==c[0]?c[0]:{}).roomIds)?[]:n,r=t.fileType,o=t.page,a=t.limit,l="api/v2/sdk/file_list",this.isLogin){e.next=4;break}return e.abrupt("return",Promise.reject("You need to login to use this method"));case 4:return e.abrupt("return",this.HTTPAdapter.post(l,{room_ids:i.map(function(e){return String(e)}),sender:this.user_id,file_type:r,page:o,limit:a}).then(function(e){return e.body}));case 5:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"uploadURL",get:function(){return this._uploadURL||"".concat(this.baseURL,"/api/v2/sdk/upload")},set:function(e){this._uploadURL=e}},{key:"synchronize",get:function(){return this.syncAdapter.synchronize}},{key:"synchronizeEvent",get:function(){return this.syncAdapter.synchronizeEvent}},{key:"Interceptor",get:function(){return be}},{key:"logger",get:function(){return this.debugMode?console.log.bind(console,"Qiscus ->"):this.noop}},{key:"_throttleDelay",get:function(){return this.updateCommentStatusMode===e.UpdateCommentStatusMode.enabled?0:this.updateCommentStatusThrottleDelay||300}},{key:"_updateStatusEnabled",get:function(){return this.updateCommentStatusMode!==e.UpdateCommentStatusMode.disabled}}]),e}();f()(Ce,"UpdateCommentStatusMode",Te),f()(Ce,"Interceptor",be);var Ie=function e(t,n){u()(this,e),this.name=t,this.roomId=n,this.progress=0};t.default=Ce}]).default}),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.download=t()}(this,function(){return function e(t,n,i){var r,o,s=window,a="application/octet-stream",l=i||a,c=t,u=!n&&!i&&c,d=document.createElement("a"),h=function(e){return String(e)},p=s.Blob||s.MozBlob||s.WebKitBlob||h,f=n||"download";if(p=p.call?p.bind(s):Blob,"true"===String(this)&&(l=(c=[c,l])[0],c=c[1]),u&&u.length<2048&&(f=u.split("/").pop().split("?")[0],d.href=u,-1!==d.href.indexOf(u))){var g=new XMLHttpRequest;return g.open("GET",u,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,f,a)},setTimeout(function(){g.send()},0),g}if(/^data\:[\w+\-]+\/[\w+\-]+[,;]/.test(c)){if(!(c.length>2096103.424&&p!==h))return navigator.msSaveBlob?navigator.msSaveBlob(m(c),f):v(c);l=(c=m(c)).type||a}function m(e){for(var t=e.split(/[:;,]/),n=t[1],i=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),r=i.length,o=0,s=new Uint8Array(r);o<r;++o)s[o]=i.charCodeAt(o);return new p([s],{type:n})}function v(e,t){if("download"in d)return d.href=e,d.setAttribute("download",f),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout(function(){d.click(),document.body.removeChild(d),!0===t&&setTimeout(function(){s.URL.revokeObjectURL(d.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return e=e.replace(/^data:([\w\/\-\+]+)/,a),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),t||(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,a)),n.src=e,setTimeout(function(){document.body.removeChild(n)},333)}if(r=c instanceof p?c:new p([c],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(r,f);if(s.URL)v(s.URL.createObjectURL(r),!0);else{if("string"==typeof r||r.constructor===h)try{return v("data:"+l+";base64,"+s.btoa(r))}catch(e){return v("data:"+l+","+encodeURIComponent(r))}(o=new FileReader).onload=function(e){v(this.result)},o.readAsDataURL(r)}return!0}});let dataLayer=window.dataLayer||[];if(window.location.href.indexOf("dev")<=-1&&window.location.href.indexOf("staging")<=-1&&window.location.href.indexOf("hotfix")<=-1&&window.location.href.indexOf("localhost")<=-1&&window.location.href.indexOf("127.0.0.1")<=-1)var addEnv="";else var addEnv="_dev";function dataLayerOnLoginView(){return dataLayer.push({event:"login_start"+addEnv,source:"Dashboard"})}function dataLayerOnLoginSuccess(e,t,n){return dataLayer.push({event:"login"+addEnv,source:n,status:"Success",user_id:e,method:t})}function dataLayerOnRegisterView(){return dataLayer.push({event:"sign_up_start"+addEnv,source:"Dashboard"})}function dataLayerOnRegisterSuccess(e,t){return dataLayer.push({event:"sign_up"+addEnv,source:"Dashborad",status:"Success",user_id:e,method:t})}function dataLayerOnBuyPackages(e,t,n,i,r){return dataLayer.push({event:"add_to_cart"+addEnv,e
1commerce:{add:{products:[{name:t,id:e,price:n,quantity:"1",brand:"Cakap Private",category:i,variant:r}]}}})}function dataLayerOnPaymentConfirmation(e,t,n,i,r,o){return dataLayer.push({event:"begin_checkout"+addEnv,ecommerce:{checkout:{actionField:{step:1,order_id:null,coupon:o},products:[{name:t,id:e,price:n,quantity:"1",brand:"Cakap Private",category:i,variant:r}]}}})}function dataLayerOnPaymentSubmit(e,t,n,i,r,o,s){return dataLayer.push({event:"add_payment_info"+addEnv,ecommerce:{checkout:{actionField:{step:2,order_id:null,coupon:o,transfer_type:s},products:[{name:t,id:e,price:n,quantity:"1",brand:"Cakap Private",category:i,variant:r}]}}})}function dataLayerOnRedeemVoucher(e){return dataLayer.push({event:"apply_coupon",coupon:e,coupon_type:"Gift"})}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.