!function(e,t){"object"==typeof exports&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).i18next=t()}(this,(function(){"use strict";const e=e=>"string"==typeof e,t=()=>{let e,t;const s=new Promise(((s,i)=>{e=s,t=i}));return s.resolve=e,s.reject=t,s},s=e=>null==e?"":""+e,i=/###/g,o=e=>e&e.indexOf("###")>-1?e.replace(i,"."):e,n=t=>!t||e(t),r=(t,s,i)=>{const r=e(s)?s.split("."):s;let a=0;for(;a{const{obj:i,k:o}=r(e,t,Object);if(void 0!==i||1===t.length)return void(i[o]=s);let n=t[t.length-1],a=t.slice(0,t.length-1),l=r(e,a,Object);for(;void 0===l.obj&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),l=r(e,a,Object),l?.obj&void 0!==l.obj[`${l.k}.${n}`]&&(l.obj=void 0);l.obj[`${l.k}.${n}`]=s},l=(e,t)=>{const{obj:s,k:i}=r(e,t);if(s&Object.prototype.hasOwnProperty.call(s,i))return s[i]},h=(t,s,i)=>{for(const o in s)"__proto__"!==o&&"constructor"!==o&&(o in t?e(t[o])||t[o]instanceof String||e(s[o])||s[o]instanceof String?i&&(t[o]=s[o]):h(t[o],s[o],i):t[o]=s[o]);return t},u=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const p=t=>e(t)?t.replace(/[&<>"'\/]/g,(e=>c[e])):t;const g=[" ",",","?","!",";"],d=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),f=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let o=e;for(let e=0;e-1&re?.replace("_","-"),y={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class v{constructor(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)})),this}off(e,t){this.observers[e]&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i{let[t,i]=e;for(let e=0;e{let[i,o]=t;for(let t=0;t1&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&this.options.ns.splice(t,1)}getResource(t,s,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,r=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,s],i&(Array.isArray(i)?a.push(...i):e(i)&&n?a.push(...i.split(n)):a.push(i)));const h=l(this.data,a);return!h&!s&&!i&&t.indexOf(".")>-1&&(t=a[0],s=a[1],i=a.slice(2).(".")),!h&&r&&e(i)?f(this.data?.[t]?.[s],i,n):h}addResource(e,t,s,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[e,t];s&(r=r.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(r=e.split("."),i=t,t=r[1]),this.addNamespaces(t),a(this.data,r,i),o.silent||this.emit("added",e,t,s,i)}addResources(t,s,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in i)(e(i[o])||Array.isArray(i[o]))&this.addResource(t,s,o,i[o],{silent:!0});o.silent||this.emit("added",t,s,i)}addResourceBundle(e,t,s,i,o){let n=arguments.length>5&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},r=[e,t];e.indexOf(".")>-1&(r=e.split("."),i=s,s=t,t=r[1]),this.addNamespaces(t);let u=l(this.data,r)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?h(u,s,o):u={...u,...s},a(this.data,r,u),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var S={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach((e=>{t=this.processors[e]?.process(t,s,i,o)??t})),t}};const O={};class L extends b{constructor(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};var s,i;super(),s=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{s[e]&(i[e]=s[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=x.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const s=this.resolve(e,t);return void 0!==s?.res}extractFromKey(t,s){let i=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===i&(i=":");const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let n=s.ns||this.options.defaultNS||[];const r=i&t.indexOf(i)>-1,a=!(this.options.DefinedKeySeparator||s.keySeparator||this.options.DefinedNsSeparator||s.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=g.filter((e=>t.indexOf(e)<0&s.indexOf(e)<0));if(0===i.length)return!0;const o=d.getRegExp(`(${i.map((e=>"?"===e?"\\?":e)).("|")})`);let n=!o.test(e);if(!n){const t=e.indexOf(s);t>0&!o.test(e.substring(0,t))&&(n=!0)}return n})(t,i,o));if(r&!a){const s=t.match(this.interpolator.nestingRegexp);if(s&s.length>0)return{key:t,namespaces:e(n)?[n]:n};const r=t.split(i);(i!==o||i===o&this.options.ns.indexOf(r[0])>-1)&&(n=r.shift()),t=r.(o)}return{key:t,namespaces:e(n)?[n]:n}}translate(t,s,i){if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),l=a[a.length-1],h=s.lng||this.language,u=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===h?.toLowerCase()){if(u){const e=s.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${e}${r}`,usedKey:r,exactUsedKey:r,usedLng:h,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${e}${r}`}return o?{res:r,usedKey:r,exactUsedKey:r,usedLng:h,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:r}const c=this.resolve(t,s);let p=c?.res;const g=c?.usedKey||r,d=c?.exactUsedKey||r,f=Object.prototype.toString.apply(p),m=void 0!==s.Arrays?s.Arrays:this.options.Arrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!e(p)&"boolean"!=typeof p&&"number"!=typeof p;if(!(y&p&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(f)<0)||e(m)&&Array.isArray(p))if(y&&e(m)&&Array.isArray(p))p=p.(m),p&&(p=this.extendTranslation(p,t,s,i));else{let o=!1,a=!1;const u=void 0!==s.count&!e(s.count),g=L.hasDefaultValue(s),d=u?this.pluralResolver.getSuffix(h,s.count,s):"",f=s.ordinal&&u?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",m=u&&!s.ordinal&&0===s.count,y=m&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${d}`]||s[`defaultValue${f}`]||s.defaultValue;!this.isValidLookup(p)&g&&(o=!0,p=y),this.isValidLookup(p)||(a=!0,p=r);const v=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&a?void 0:p,x=g&&y!==p&&this.options.updateMissing;if(a||o||x){if(this.logger.log(x?"updateKey":"missingKey",h,l,r,x?y:p),n){const e=this.resolve(r,{...s,keySeparator:!1});e&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&t&&t[0])for(let s=0;s{const o=g&i!==p?i:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,x,s):this.backendConnector?.saveMissing&this.backendConnector.saveMissing(e,l,t,o,x,s),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&(this.options.saveMissingPlurals&&u?e.forEach((e=>{const t=this.pluralResolver.getSuffixes(e,s);m&s[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach((t=>{i([e],r+t,s[`defaultValue${t}`]||y)}))})):i(e,r,y))}p=this.extendTranslation(p,t,s,c,i),a&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${r}`),(a||o)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${r}`:r,o?p:void 0))}else{if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(c.res=e,c.usedParams=this.getUsedParamsDetails(s),c):e}if(n){const e=Array.isArray(p),t=e?[]:{},i=e?d:g;for(const e in p)if(Object.prototype.hasOwnProperty.call(p,e)){const o=`${i}${n}${e}`;t[e]=this.translate(o,{...s,Arrays:!1,ns:a}),t[e]===o&(t[e]=p[e])}p=t}}return o?(c.res=p,c.usedParams=this.getUsedParamsDetails(s),c):p}extendTranslation(t,s,i,o,n){var r=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const a=e(t)&(void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const e=t.match(this.interpolator.nestingRegexp);l=e&e.length}let h=i.replace&&!e(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||o.usedLng,i),a){const e=t.match(this.interpolator.nestingRegexp);l<(e&e.length)&&(i.nest=!1)}!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),!1!==i.nest&&(t=this.interpolator.nest(t,(function(){for(var e=arguments.length,t=new Array(e),o=0;o1&void 0!==arguments[1]?arguments[1]:{};return e(t)&(t=[t]),t.forEach((t=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(t,a),h=l.key;i=h;let u=l.namespaces;this.options.fallbackNS&(u=u.concat(this.options.fallbackNS));const c=void 0!==a.count&!e(a.count),p=c&&!a.ordinal&&0===a.count,g=void 0!==a.context&&(e(a.context)||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach((e=>{this.isValidLookup(s)||(r=e,O[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(O[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${d.(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((t=>{if(this.isValidLookup(s))return;n=t;const i=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,h,t,e,a);else{let e;c&(e=this.pluralResolver.getSuffix(t,a.count,a));const s=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&(i.push(h+e),a.ordinal&&0===e.indexOf(o)&&i.push(h+e.replace(o,this.options.pluralSeparator)),p&&i.push(h+s)),g){const t=`${h}${this.options.contextSeparator}${a.context}`;i.push(t),c&(i.push(t+e),a.ordinal&&0===e.indexOf(o)&&i.push(t+e.replace(o,this.options.pluralSeparator)),p&&i.push(t+s))}}let r;for(;r=i.pop();)this.isValidLookup(s)||(o=r,s=this.getResource(t,e,r,a))})))}))})),{res:s,usedKey:i,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let t=arguments.length>0&void 0!==arguments[0]?arguments[0]:{};const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","Arrays","postProcess","interpolation"],i=t.replace&!e(t.replace);let o=i?t.replace:t;if(i&void 0!==t.count&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const e of s)delete o[e]}return o}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&t===s.substring(0,12)&&void 0!==e[s])return!0;return!1}}class w{constructor(e){this.options=e,this.edLngs=this.options.edLngs||!1,this.logger=x.create("languageUtils")}getScriptPartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.("-")))}getLanguagePartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(t){if(e(t)&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(e){}return e&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.edLngs||!this.edLngs.length||this.edLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.edLngs&!this.isedCode(s)||(t=s)})),!t&&this.options.edLngs&&e.forEach((e=>{if(t)return;const s=this.getLanguagePartFromCode(e);if(this.isedCode(s))return t=s;t=this.options.edLngs.find((e=>e===s?e:e.indexOf("-")<0&s.indexOf("-")<0?void 0:e.indexOf("-")>0&&s.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(t,s){if(!t)return[];if("function"==typeof t&(t=t(s)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.getFallbackCodes(s||this.options.fallbackLng||[],t),o=[],n=e=>{e&(this.isedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in edLngs: ${e}`))};return e(t)&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(t))):e(t)&&n(this.formatLanguageCode(t)),i.forEach((e=>{o.indexOf(e)<0&&n(this.formatLanguageCode(e))})),o}}const $={zero:0,one:1,two:2,few:3,many:4,other:5},R={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class C{constructor(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=x.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};const s=m("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(s,{type:i})}catch(s){if(!Intl)return this.logger.error("No Intl , please use an Intl polyfill!"),R;if(!e.match(/-|_/))return R;const i=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(i,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{},s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,s).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{},s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort(((e,t)=>$[e]-$[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let s=arguments.length>2&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const P=function(t,s,i){let o=arguments.length>3&void 0!==arguments[3]?arguments[3]:".",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=((e,t,s)=>{const i=l(e,s);return void 0!==i?i:l(t,s)})(t,s,i);return!r&n&&e(i)&&(r=f(t,i,o),void 0===r&&(r=f(s,i,o))),r},N=e=>e.replace(/\$/g,"$$$$");class j{constructor(){let e=arguments.length>0&void 0!==arguments[0]?arguments[0]:{};this.logger=x.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,awValueToEscape:i,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:l,unescapeSuffix:h,unescapePrefix:c,nestingPrefix:g,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:x}=e.interpolation;this.escape=void 0!==t?t:p,this.escapeValue=void 0===s||s,this.awValueToEscape=void 0!==i&i,this.prefix=o?u(o):n||"{{",this.suffix=r?u(r):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=g?u(g):d||u("$t("),this.nestingSuffix=f?u(f):m||u(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==x&&x,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,i,o,n){let r,a,l;const h=this.options&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const t=P(i,h,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,o,{...n,...i,interpolationkey:e}):t}const t=e.split(this.formatSeparator),s=t.shift().trim(),r=t.(this.formatSeparator).trim();return this.format(P(i,h,s,this.options.keySeparator,this.options.ignoreJSONStructure),r,o,{...n,...i,interpolationkey:s})};this.resetRegExp();const c=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>N(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?N(this.escape(e)):N(e)}].forEach((i=>{for(l=0;r=i.regex.exec(t);){const o=r[1].trim();if(a=u(o),void 0===a)if("function"==typeof c){const s=c(t,r,n);a=e(s)?s:""}else if(n&Object.prototype.hasOwnProperty.call(n,o))a="";else{if(p){a=r[0];continue}this.logger.warn(`missed to in variable ${o} for interpolating ${t}`),a=""}else e(a)||this.awValueToEscape||(a=s(a));const h=i.safeValue(a);if(t=t.replace(r[0],h),p?(i.regex.lastIndex+=a.length,i.regex.lastIndex-=r[0].length):i.regex.lastIndex=0,l++,l>=this.maxReplaces)break}})),t}nest(t,i){let o,n,r,a=arguments.length>2&void 0!==arguments[2]?arguments[2]:{};const l=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${s}[ ]*{`));let o=`{${i[1]}`;e=i[0],o=this.interpolate(o,r);const n=o.match(/'/g),a=o.match(/"/g);((n?.length??0)%2==0&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;o=this.nestingRegexp.exec(t);){let h=[];r={...a},r=r.replace&!e(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let u=!1;if(-1!==o[0].indexOf(this.formatSeparator)&!/{.*}/.test(o[1])){const e=o[1].split(this.formatSeparator).map((e=>e.trim()));o[1]=e.shift(),h=e,u=!0}if(n=i(l.call(this,o[1].trim(),r),r),n&o[0]===t&&!e(n))return n;e(n)||(n=s(n)),n||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),n=""),u&(n=h.reduce(((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:o[1].trim()})),n.trim())),t=t.replace(o[0],n),this.regexp.lastIndex=0}return t}}const E=e=>{const t={};return(s,i,o)=>{let n=o;o&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=i+JSON.stringify(n);let a=t[r];return a||(a=e(m(i),o),t[r]=a),a(s)}};class F{constructor(){let e=arguments.length>0&void 0!==arguments[0]?arguments[0]:{};this.logger=x.create("formatter"),this.options=e,this.formats={number:E(((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)})),currency:E(((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)})),datetime:E(((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)})),relativetime:E(((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")})),list:E(((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=E(t)}format(e,t,s){let i=arguments.length>3&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:n}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);"currency"===t&o.indexOf(":")<0?s.currency||(s.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?s.range||(s.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...i]=e.split(":"),o=i.(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=o),"false"===o&(s[n]=!1),"true"===o&&(s[n]=!0),isNaN(o)||(s[n]=parseInt(o,10))}}))}return{formatName:t,formatOptions:s}})(t);if(this.formats[o]){let t=e;try{const r=i?.formatParams?.[i.interpolationkey]||{},a=r.locale||r.lng||i.locale||i.lng||s;t=this.formats[o](e,a,{...n,...i,...r})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class V extends b{constructor(e,t,s){let i=arguments.length>3&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=x.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const o={},n={},r={},a={};return e.forEach((e=>{let i=!0;t.forEach((t=>{const r=`${e}|${t}`;!s.reload&this.store.hasResourceBundle(e,t)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,i=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[t]&&(a[t]=!0)))})),i||(r[e]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){const i=e.split("|"),o=i[0],n=i[1];t&this.emit("failedLoading",o,n,t),!t&&s&&this.store.addResourceBundle(o,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach((s=>{((e,t,s,i)=>{const{obj:o,k:n}=r(e,t,Object);o[n]=o[n]||[],o[n].push(s)})(s.loaded,[o],n),((e,t)=>{void 0!==e.pending[t]&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((e=>{a[e]||(a[e]={});const t=s.loaded[e];t.length&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,n=arguments.length>5?arguments[5]:void 0;if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:o,callback:n});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}r&a&&i{this.read.call(this,e,t,s,i+1,2*o,n)}),o):n(r,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(e,t,r);try{const s=a(e,t);s&"function"==typeof s.then?s.then((e=>r(null,e))).catch(r):r(null,s)}catch(e){r(e)}}prepareLoading(t,s){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&o();e(t)&(t=this.languageUtils.toResolveHierarchy(t)),e(s)&&(s=[s]);const n=this.queueLoad(t,s,i,o);if(!n.toLoad.length)return n.pending.length||o(),null;n.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:"";const s=e.split("|"),i=s[0],o=s[1];this.read(i,o,"read",void 0,void 0,((s,n)=>{s&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,n),this.loaded(e,s,n)}))}saveMissing(e,t,s,i,o){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&""!==s){if(this.backend?.create){const a={...n,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,s,i,a):l(e,t,s,i),o&"function"==typeof o.then?o.then((e=>r(null,e))).catch(r):r(null,o)}catch(e){r(e)}else l(e,t,s,i,r,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const D=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,edLngs:!1,nonExplicitedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,Arrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let s={};if("object"==typeof t[1]&(s=t[1]),e(t[1])&&(s.defaultValue=t[1]),e(t[2])&&(s.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{s[t]=e[t]}))}return s},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),A=t=>(e(t.ns)&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.edLngs?.indexOf?.("cimode")<0&&(t.edLngs=t.edLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),I=()=>{};class T extends b{constructor(){let e=arguments.length>0&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var s;if(super(),this.options=A(e),this.services={},this.logger=x,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((e=>{"function"==typeof s[e]&(s[e]=s[e].bind(s))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var s=this;let i=arguments.length>0&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof i&(o=i,i={}),!i.defaultNS&&!1!==i.defaultNS&&i.ns&&(e(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const n=D();this.options={...n,...this.options,...A(i)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==i.keySeparator&(this.options.DefinedKeySeparator=i.keySeparator),void 0!==i.nsSeparator&&(this.options.DefinedNsSeparator=i.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?x.init(r(this.modules.logger),this.options):x.init(null,this.options),e=this.modules.formatter?this.modules.formatter:F;const t=new w(this.options);this.store=new k(this.options.resources,this.options);const i=this.services;i.logger=x,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new C(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new j(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new V(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o1?t-1:0),o=1;o{e.init&e.init(this)}))}if(this.format=this.options.interpolation.format,o||(o=I),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((e=>{this[e]=function(){return s.store[e](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=function(){return s.store[e](...arguments),s}}));const a=t(),l=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),o(e,t)};if(this.languages&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(t){let s=arguments.length>1&void 0!==arguments[1]?arguments[1]:I;const i=e(t)?t:this.language;if("function"==typeof t&(s=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&e.indexOf(t)<0&&e.push(t)}))};if(i)t(i);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>t(e)))}this.options.preload?.forEach?.((e=>t(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)}))}else s(null)}reloadResources(e,s,i){const o=t();return"function"==typeof e&(i=e,e=void 0),"function"==typeof s&&(i=s,s=void 0),e||(e=this.languages),s||(s=this.options.ns),i||(i=I),this.services.backendConnector.reload(e,s,(e=>{o.resolve(),i(e)})),o}use(e){if(!e)throw new Error("You are ing an undefined module! Please check the object you are ing to i18next.use()");if(!e.type)throw new Error("You are ing a wrong module! Please check the object you are ing to i18next.use()");return"backend"===e.type&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&S.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e-1)&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(s,i){var o=this;this.isLanguageChangingTo=s;const n=t();this.emit("languageChanging",s);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,t)=>{t?(r(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit("languageChanged",t),this.logger.log("languageChanged",t)):this.isLanguageChangingTo=void 0,n.resolve((function(){return o.t(...arguments)})),i&i(e,(function(){return o.t(...arguments)}))},l=t=>{s||t||!this.services.languageDetector||(t=[]);const i=e(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);i&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheLanguage?.(i)),this.loadResources(i,(e=>{a(e,i)}))};return s||!this.services.languageDetector||this.services.languageDetector.async?!s&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(s):l(this.services.languageDetector.detect()),n}getFixedT(t,s,i){var o=this;const n=function(e,t){let s;if("object"!=typeof t){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l`${s.keyPrefix}${h}${e}`)):s.keyPrefix?`${s.keyPrefix}${h}${e}`:e,o.t(u,s)};return e(t)?n.lng=t:n.lngs=t,n.ns=s,n.keyPrefix=i,n}t(){for(var e=arguments.length,t=new Array(e),s=0;s1&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const n=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,n);if(void 0!==e)return e}return!!this.hasResourceBundle(s,e)||(!(this.services.backendConnector.backend&(!this.options.resources||this.options.partialBundledLanguages))||!(!n(s,e)||i&&!n(o,e)))}loadNamespaces(s,i){const o=t();return this.options.ns?(e(s)&(s=[s]),s.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{o.resolve(),i&&i(e)})),o):(i&&i(),Promise.resolve())}loadLanguages(s,i){const o=t();e(s)&(s=[s]);const n=this.options.preload||[],r=s.filter((e=>n.indexOf(e)<0&this.services.languageUtils.isedCode(e)));return r.length?(this.options.preload=n.concat(r),this.loadResources((e=>{o.resolve(),i&i(e)})),o):(i&&i(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new w(D());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new T(arguments.length>0&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I;const s=e.forkResourceStore;s&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new T(i);void 0===e.debug&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},s){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},Object.keys(e[t]).reduce(((s,i)=>(s[i]={...e[t][i]},s)),{}))),{});o.store=new k(e,i),o.services.resourceStore=o.store}return o.translator=new L(o.services,i),o.translator.on("*",(function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i{if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=i(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==i(e)?e:e+""}e=function e(t){var n=1(e=((e,t)=>{if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=O(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==O(e)?e:e+""))(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))})}return o}function O(e){return(O="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})(e)}if("function"==typeof fetch&&(h=void 0!==S&&S.fetch?S.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),(0,m.hasXMLHttpRequest)()&&(void 0!==S&&S.XMLHttpRequest?b=S.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(b=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==S&&S.ActiveXObject?v=S.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(v=window.ActiveXObject)),!(h="function"!=typeof h?void 0:h)&&!b&&!v)try{h=e("cross-fetch")}catch(e){}var w=function(e,t){if(t&&"object"===O(t)){var n,o="";for(n in t)o+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!o)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+o.slice(1)}return e},j=function(e,t,n,o){function r(t){if(!t.ok)return n(t.statusText||"Error",{status:t.status});t.text().then(function(e){n(null,{status:t.status,data:e})}).catch(n)}if(o){o=o(e,t);if(o instanceof Promise)return void o.then(r).catch(n)}("function"==typeof fetch?fetch:h)(e,t).then(r).catch(n)},P=!1;o.default=function(e,t,n,o){if("function"==typeof n&(o=n,n=void 0),o=o||function(){},h&&0!==t.indexOf("file:")){var r=e,i=t,s=n,a=o,u=(r.queryStringParams&&(i=w(i,r.queryStringParams)),g({},"function"==typeof r.customHeaders?r.customHeaders():r.customHeaders)),c=("undefined"==typeof window&&void 0!==S&&void 0!==S.process&&S.process.versions&&S.process.versions.node&&(u["-Agent"]="i18next-http-backend (node/".concat(S.process.version,"; ").concat(S.process.platform," ").concat(S.process.arch,")")),s&(u["Content-Type"]="application/json"),"function"==typeof r.requestOptions?r.requestOptions(s):r.requestOptions),f=g({method:s?"POST":"GET",body:s?r.stringify(s):void 0,headers:u},P?{}:c),s="function"==typeof r.alternateFetch&&1<=r.alternateFetch.length?r.alternateFetch:void 0;try{j(i,f,a,s)}catch(e){if(!c||0===Object.keys(c).length||!e.message||e.message.indexOf("not implemented")<0)return a(e);try{Object.keys(c).forEach(function(e){delete f[e]}),j(i,f,a,s),P=!0}catch(e){a(e)}}}else if((0,m.hasXMLHttpRequest)()||"function"==typeof ActiveXObject){var u=e,r=t,c=n,l=o;c&"object"===O(c)&&(c=w("",c).slice(1)),u.queryStringParams&&(r=w(r,u.queryStringParams));try{var d=b?new b:new v("MSXML2.XMLHTTP.3.0"),p=(d.open(c?"POST":"GET",r,1),u.crossDomain||d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.withCredentials=!!u.withCredentials,c&d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),d.overrideMimeType&&d.overrideMimeType("application/json"),u.customHeaders);if(p="function"==typeof p?p():p)for(var y in p)d.setRequestHeader(y,p[y]);d.onreadystatechange=function(){3e&"function"==typeof e.then)(e))return e;return Promise.resolve(e)};var n=[],r=n.forEach,i=n.slice},{}],4:[function(e,t,n){},{}]},{},[1])(1)}); !function(t,e){"object"==typeof exports&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jqueryI18next=e()}(this,function(){"use strict";function t(t,a){function i(n,a,i){function r(t,n){return f.parseDefaultValueFromContent?e({},t,{defaultValue:n}):t}if(0!==a.length){var o="text";if(0===a.indexOf("[")){var l=a.split("]");a=l[1],o=l[0].substr(1,l[0].length-1)}if(a.indexOf(";")===a.length-1&(a=a.substr(0,a.length-2)),"html"===o)n.html(t.t(a,r(i,n.html())));else if("text"===o)n.text(t.t(a,r(i,n.text())));else if("prepend"===o)n.prepend(t.t(a,r(i,n.html())));else if("append"===o)n.append(t.t(a,r(i,n.html())));else if(0===o.indexOf("data-")){var s=o.substr("data-".length),d=t.t(a,r(i,n.data(s)));n.data(s,d),n.attr(o,d)}else n.attr(o,t.t(a,r(i,n.attr(o))))}}function r(t,n){var r=t.attr(f.selectorAttr);if(r||void 0===r||!1===r||(r=t.text()||t.val()),r){var o=t,l=t.data(f.targetAttr);if(l&(o=t.find(l)||t),n||!0!==f.useOptionsAttr||(n=t.data(f.optionsAttr)),n=n||{},r.indexOf(";")>=0){var s=r.split(";");a.each(s,function(t,e){""!==e&i(o,e.trim(),n)})}else i(o,r,n);if(!0===f.useOptionsAttr){var d={};d=e({clone:d},n),delete d.lng,t.data(f.optionsAttr,d)}}}function o(t){return this.each(function(){r(a(this),t),a(this).find("["+f.selectorAttr+"]").each(function(){r(a(this),t)})})}var f=arguments.length>2&void 0!==arguments[2]?arguments[2]:{};f=e({},n,f),a[f.tName]=t.t.bind(t),a[f.i18nName]=t,a.fn[f.handleName]=o}var e=Object.assign||function(t){for(var e=1;e4&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let i=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!o.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!o.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&(i+="; HttpOnly"),n.secure&(i+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}(e,encodeURIComponent(t),r)},read(e){const t=`${e}=`,o=document.cookie.split(";");for(let e=0;e-1&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const n=e.substring(1).split("&");for(let e=0;e0){n[e].substring(0,i)===o&(t=n[e].substring(i+1))}}}return t}};let a=null;const s=()=>{if(null!==a)return a;try{a="undefined"!==window&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){a=!1}return a};var l={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&s())return window.localStorage.getItem(t)||void 0},cacheLanguage(e,t){let{lookupLocalStorage:o}=t;o&s()&&window.localStorage.setItem(o,e)}};let c=null;const u=()=>{if(null!==c)return c;try{c="undefined"!==window&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){c=!1}return c};var d={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&u())return window.sessionStorage.getItem(t)||void 0},cacheLanguage(e,t){let{lookupSessionStorage:o}=t;o&u()&&window.sessionStorage.setItem(o,e)}},g={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,Language:o,language:n}=navigator;if(e)for(let o=0;o0?t:void 0}},h={name:"htmlTag",lookup(e){let t,{htmlTag:o}=e;const n=o||("undefined"!=typeof document?document.documentElement:null);return n&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},p={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const o=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(o))return;const n="number"==typeof t?t:0;return o[n]?.replace("/","")}},f={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const o="number"==typeof t?t+1:1,n="undefined"!=typeof window&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[o]}};let m=!1;try{document.cookie,m=!0}catch(e){}const w=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];m||w.splice(1,1);class S{constructor(e){let t=arguments.length>1&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let o=arguments.length>0&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=o,this.options=function(o){return t.call(e.call(arguments,1),(e=>{if(e)for(const t in e)void 0===o[t]&(o[t]=e[t])})),o}(n,this.options||{},{order:w,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(i),this.addDetector(r),this.addDetector(l),this.addDetector(d),this.addDetector(g),this.addDetector(h),this.addDetector(p),this.addDetector(f)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach((e=>{if(this.detectors[e]){let o=this.detectors[e].lookup(this.options);o&"string"==typeof o&&(o=[o]),o&&(t=t.concat(o))}})),t=t.map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheLanguage(e,this.options)})))}}return S.type="languageDetector",S})); /** * Timeago is a jQuery plugin that makes it easy to automatically * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). * * @name timeago * @version 0.11.3 * @requires jQuery v1.2.3+ * @author Ryan McGeary * @license MIT License - http://www.opensource.org/licenses/mit-license.php * * For usage and examples, visit: * http://timeago.yarp.com/ * * Copyright (c) 2008-2012, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org) */ (function(n){function r(){var t=u(this);return isNaN(t.datetime)||n(this).text(i(t.datetime)),this}function u(i){if(i=n(i),!i.data("timeago")){i.data("timeago",{datetime:t.datetime(i)});var r=n.trim(i.text());r.length>0&!(t.isTime(i)&&i.attr("title"))&&i.attr("title",r)}return i.data("timeago")}function i(n){return t.inWords(f(n))}function f(n){return(new Date).getTime()-n.getTime()}n.timeago=function(t){return t instanceof Date?i(t):typeof t=="string"?i(n.timeago.parse(t)):typeof t=="number"?i(new Date(t)):i(n.timeago.datetime(t))};var t=n.timeago;n.extend(n.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(t){function r(r,u){var f=n.isFunction(r)?r(u,t):r,e=i.numbers&i.numbers[u]||u;return f.replace(/%d/i,e)}var i=this.settings.strings,s=i.prefixAgo,h=i.suffixAgo,l,a;this.settings.allowFuture&t<0&&(s=i.prefixFromNow,h=i.suffixFromNow);var f=Math.abs(t)/1e3,e=f/60,o=e/60,u=o/24,c=u/365;return l=f<45&r(i.seconds,Math.round(f))||f<90&&r(i.minute,1)||e<45&&r(i.minutes,Math.round(e))||e<90&&r(i.hour,1)||o<24&&r(i.hours,Math.round(o))||o<42&&r(i.day,1)||u<30&&r(i.days,Math.round(u))||u<45&&r(i.month,1)||u<365&&r(i.months,Math.round(u/30))||c<1.5&&r(i.year,1)||r(i.years,Math.round(c)),a=i.wordSeparator===undefined?" ":i.wordSeparator,n.trim([s,l,h].(a))},parse:function(t){var i=n.trim(t);return i=i.replace(/\.\d\d\d+/,""),i=i.replace(/-/,"/").replace(/-/,"/"),i=i.replace(/T/," ").replace(/Z/," UTC"),i=i.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(i)},datetime:function(i){var r=t.isTime(i)?n(i).attr("datetime"):n(i).attr("title");return t.parse(r)},isTime:function(t){return n(t).get(0).tagName.toLowerCase()==="time"}});n.fn.timeago=function(){var n=this,i;return n.each(r),i=t.settings,i.refreshMillis>0&setInterval(function(){n.each(r)},i.refreshMillis),n};document.createElement("abbr");document.createElement("time")})(jQuery); function overlib(){return!olLoaded||isExclusive(overlib.arguments)?!0:(olCheckMouseCapture&olMouseCapture(),over&&(over=typeof over.id!="string"?o3_frame.document.all.overDiv:over,cClick()),olHideDelay=0,o3_text=ol_text,o3_cap=ol_cap,o3_sticky=ol_sticky,o3_background=ol_background,o3_close=ol_close,o3_hpos=ol_hpos,o3_offsetx=ol_offsetx,o3_offsety=ol_offsety,o3_fgcolor=ol_fgcolor,o3_bgcolor=ol_bgcolor,o3_textcolor=ol_textcolor,o3_capcolor=ol_capcolor,o3_closecolor=ol_closecolor,o3_width=ol_width,o3_border=ol_border,o3_cellpad=ol_cellpad,o3_status=ol_status,o3_autostatus=ol_autostatus,o3_height=ol_height,o3_snapx=ol_snapx,o3_snapy=ol_snapy,o3_fixx=ol_fixx,o3_fixy=ol_fixy,o3_relx=ol_relx,o3_rely=ol_rely,o3_fgbackground=ol_fgbackground,o3_bgbackground=ol_bgbackground,o3_padxl=ol_padxl,o3_padxr=ol_padxr,o3_padyt=ol_padyt,o3_padyb=ol_padyb,o3_fullhtml=ol_fullhtml,o3_vpos=ol_vpos,o3_aboveheight=ol_aboveheight,o3_capicon=ol_capicon,o3_textfont=ol_textfont,o3_captionfont=ol_captionfont,o3_closefont=ol_closefont,o3_textsize=ol_textsize,o3_captionsize=ol_captionsize,o3_closesize=ol_closesize,o3_timeout=ol_timeout,o3_function=ol_function,o3_delay=ol_delay,o3_hauto=ol_hauto,o3_vauto=ol_vauto,o3_closeclick=ol_closeclick,o3_wrap=ol_wrap,o3_followmouse=ol_followmouse,o3_mouseoff=ol_mouseoff,o3_closetitle=ol_closetitle,o3_css=ol_css,o3_compatmode=ol_compatmode,o3_fgclass=ol_fgclass,o3_bgclass=ol_bgclass,o3_textfontclass=ol_textfontclass,o3_captionfontclass=ol_captionfontclass,o3_closefontclass=ol_closefontclass,setRunTimeVariables(),fnRef="",o3_frame=ol_frame,!(over=createDivContainer()))?!1:(parseTokens("o3_",overlib.arguments),!postParseChecks("o3_",overlib.arguments))?!1:o3_delay==0?runHook("olMain",FREPLACE):(o3_delayid=setTimeout("runHook('olMain', FREPLACE)",o3_delay),!1)}function nd(n){return olLoaded&&!isExclusive()&&(hideDelay(n),o3_removecounter>=1&&(o3_showingsticky=0),o3_showingsticky==0?(o3_allowmove=0,over!=null&&(o3_compatmode?1:o3_timerid==0)&&runHook("hideObject",FREPLACE,over)):o3_removecounter++),!0}function cClick(){return olLoaded&&(runHook("hideObject",FREPLACE,over),o3_showingsticky=0),!1}function overlib_pagedefaults(){parseTokens("ol_",overlib_pagedefaults.arguments)}function olMain(){var t,n;return(runHook("olMain",FBEFORE),o3_background!=""||o3_fullhtml?t=runHook("ol_content_background",FALTERNATE,o3_css,o3_text,o3_background,o3_fullhtml):(n=pms[o3_css-1-pmStart]=="cssoff"||pms[o3_css-1-pmStart]=="cssclass",o3_fgbackground!=""&(o3_fgbackground='background="'+o3_fgbackground+'"'),o3_bgbackground!=""&&(o3_bgbackground=n?'background="'+o3_bgbackground+'"':o3_bgbackground),o3_fgcolor!=""&&(o3_fgcolor=n?'bgcolor="'+o3_fgcolor+'"':o3_fgcolor),o3_bgcolor!=""&&(o3_bgcolor=n?'bgcolor="'+o3_bgcolor+'"':o3_bgcolor),o3_height=o3_height>0?n?'height="'+o3_height+'"':o3_height:"",t=o3_cap==""?runHook("ol_content_simple",FALTERNATE,o3_css,o3_text):o3_sticky?runHook("ol_content_caption",FALTERNATE,o3_css,o3_text,o3_cap,o3_close):runHook("ol_content_caption",FALTERNATE,o3_css,o3_text,o3_cap,"")),o3_sticky&&(o3_timerid>0&&(clearTimeout(o3_timerid),o3_timerid=0),o3_showingsticky=1,o3_removecounter=0),!runHook("olCreatePopup",FREPLACE,t))?!1:(o3_autostatus>0&&(o3_status=o3_text,o3_autostatus>1&&(o3_status=o3_cap),o3_wrap&&(o3_status=o3_status.replace(/ /g," "))),o3_allowmove=0,o3_timeout>0&&(o3_timerid>0&&clearTimeout(o3_timerid),o3_timerid=setTimeout("cClick()",o3_timeout)),runHook("disp",FREPLACE,o3_status),runHook("olMain",FAFTER),olOp&&event&&event.type=="mouseover"&&!o3_status?"":o3_status!="")}function ol_content_simple(n){var t=/,/.test(o3_cellpad),i='':!olNs4&&t?' style="'+setCellPadStr(o3_cellpad)+'">':">")+(o3_textfontclass?"":wrapStr(0,o3_textsize,"text"))+n+(o3_textfontclass?"":wrapStr(1,o3_textsize))+"<\/td><\/tr><\/table><\/td><\/tr><\/table>";return set_background(""),i}function ol_content_caption(n,t,i){var r,e,o=/,/.test(o3_cellpad),u,f;return u="",f="onmouseover",o3_closeclick==1&(f=(o3_closetitle?"title='"+o3_closetitle+"'":"")+" onclick"),o3_capicon!=""&&(r=' hspace = "5" align = "middle" alt = ""',typeof o3_dragimg!="undefined"&&o3_dragimg&&(r=' hspace="5" name="'+o3_dragimg+'" id="'+o3_dragimg+'" align="middle" alt="Drag Enabled" title="Drag Enabled"'),o3_capicon='"),i!=""&&(u="'+(o3_closefontclass?"":wrapStr(0,o3_closesize,"close"))+i+(o3_closefontclass?"":wrapStr(1,o3_closesize,"close"))+"<\/a><\/td>"),e='':">")+(o3_captionfontclass?"":""+wrapStr(0,o3_captionsize,"caption"))+o3_capicon+t+(o3_captionfontclass?"":wrapStr(1,o3_captionsize)+"<\/b>")+"<\/td>"+u+'<\/tr><\/table>':!olNs4&&o?' style="'+setCellPadStr(o3_cellpad)+'">':">")+(o3_textfontclass?"":wrapStr(0,o3_textsize,"text"))+n+(o3_textfontclass?"":wrapStr(1,o3_textsize))+"<\/td><\/tr><\/table><\/td><\/tr><\/table>",set_background(""),e}function ol_content_background(n,t,i){var r;return r=i?n:'<\/td><\/tr><\/td>'+(o3_textfontclass?"":wrapStr(0,o3_textsize,"text"))+n+(o3_textfontclass?"":wrapStr(1,o3_textsize))+'<\/td><\/td><\/tr><\/td><\/tr><\/table>',set_background(t),r}function set_background(n){n==""?olNs4?over.background.src=null:over.style&(over.style.backgroundImage="none"):olNs4?over.background.src=n:over.style&&(over.style.width=o3_width+"px",over.style.backgroundImage="url("+n+")")}function disp(n){runHook("disp",FBEFORE,n);o3_allowmove==0&(runHook("placeLayer",FREPLACE),olNs6&&olShowId<0?olShowId=setTimeout("runHook('showObject', FREPLACE, over)",1):runHook("showObject",FREPLACE,over),o3_allowmove=o3_sticky||o3_followmouse==0?0:1);runHook("disp",FAFTER,n);n!=""&(self.status=n)}function olCreatePopup(n){if(runHook("olCreatePopup",FBEFORE,n),o3_wrap){var t,i,r=olNs4?over:over.style;r.top=r.left=(olIe4&!olOp?0:-1e4)+(olNs4?0:"px");layerWrite(n);t=olNs4?over.clip.width:over.offsetWidth;t>(i=windowWidth())&(n=n.replace(/\ /g," "),o3_width=i,o3_wrap=0)}return layerWrite(n),o3_wrap&&(o3_width=olNs4?over.clip.width:over.offsetWidth),runHook("olCreatePopup",FAFTER,n),!0}function placeLayer(){var n,t,i=0;o3_frame.innerWidth&(i=18);iwidth=windowWidth();winoffset=olIe4?eval("o3_frame."+docRoot+".scrollLeft"):o3_frame.pageXOffset;n=runHook("horizontalPlacement",FCHAIN,iwidth,winoffset,i);o3_frame.innerHeight?iheight=o3_frame.innerHeight:eval("o3_frame."+docRoot)&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval("o3_frame."+docRoot+".clientHeight")&&(iheight=eval("o3_frame."+docRoot+".clientHeight"));scrolloffset=olIe4?eval("o3_frame."+docRoot+".scrollTop"):o3_frame.pageYOffset;t=runHook("verticalPlacement",FCHAIN,iheight,scrolloffset);repositionTo(over,n,t)}function olMouseMove(n){var n=n?n:event;n.pageX?(o3_x=n.pageX,o3_y=n.pageY):n.clientX&(o3_x=eval("e.clientX+o3_frame."+docRoot+".scrollLeft"),o3_y=eval("e.clientY+o3_frame."+docRoot+".scrollTop"));o3_allowmove==1&runHook("placeLayer",FREPLACE);hoveringSwitch&!olNs4&&runHook("cursorOff",FREPLACE)&&(olHideDelay?hideDelay(olHideDelay):cClick(),hoveringSwitch=!hoveringSwitch)}function no_overlib(){return ver3fix}function olMouseCapture(){capExtent=document;var t,i="",l,k,n,u,r,f=olMouseMove;if(u=!olIe4&window.onmousemove,document.onmousemove||u){if(u&&(capExtent=window),n=capExtent.onmousemove.toString(),t=n.match(/function[ ]*(\w*)\(/),t==null)i=n+"(e); ";else if(t[1]=="anonymous"||t[1]=="olMouseMove"||u&t[1]=="onmousemove"){if(!olOp&&u&&(l=n.indexOf("{")+1,k=n.lastIndexOf("}"),r=n.substring(l,k),(l=r.indexOf("("))!=-1&&(r=r.substring(0,l).replace(/^\s+/,"").replace(/\s+$/,""),eval("typeof "+r+" == 'undefined'")?window.onmousemove=null:i=r+"(e);")),!i){olCheckMouseCapture=!1;return}}else t[1]?i=t[1]+"(e); ":(l=n.indexOf("{")+1,k=n.lastIndexOf("}"),i=n.substring(l,k)+"\n");i+="olMouseMove(e); ";f=new Function("e",i)}capExtent.onmousemove=f;olNs4&capExtent.captureEvents(Event.MOUSEMOVE)}function parseTokens(n,ar){for(var i,f=-1,e=n!="ol_",r=e&&!ar.length?1:0,u,t=0;tpmStart&ar[t]=pmCount||ar[t]==DONOTHING)continue;if(ar[t]==INARRAY){r=0;eval(n+"text=ol_texts["+ar[++t]+"].toString()");continue}if(ar[t]==CAPARRAY){eval(n+"cap=ol_caps["+ar[++t]+"].toString()");continue}if(ar[t]==STICKY){n!="ol_"&eval(n+"sticky=1");continue}if(ar[t]==BACKGROUND){eval(n+'background="'+ar[++t]+'"');continue}if(ar[t]==NOCLOSE){n!="ol_"&opt_NOCLOSE();continue}if(ar[t]==CAPTION){eval(n+"cap='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==CENTER||ar[t]==LEFT||ar[t]==RIGHT){eval(n+"hpos="+ar[t]);n!="ol_"&(olHautoFlag=1);continue}if(ar[t]==OFFSETX){eval(n+"offsetx="+ar[++t]);continue}if(ar[t]==OFFSETY){eval(n+"offsety="+ar[++t]);continue}if(ar[t]==FGCOLOR){eval(n+'fgcolor="'+ar[++t]+'"');continue}if(ar[t]==BGCOLOR){eval(n+'bgcolor="'+ar[++t]+'"');continue}if(ar[t]==TEXTCOLOR){eval(n+'textcolor="'+ar[++t]+'"');continue}if(ar[t]==CAPCOLOR){eval(n+'capcolor="'+ar[++t]+'"');continue}if(ar[t]==CLOSECOLOR){eval(n+'closecolor="'+ar[++t]+'"');continue}if(ar[t]==WIDTH){eval(n+"width="+ar[++t]);continue}if(ar[t]==BORDER){eval(n+"border="+ar[++t]);continue}if(ar[t]==CELLPAD){t=opt_MULTIPLEARGS(++t,ar,n+"cellpad");continue}if(ar[t]==STATUS){eval(n+"status='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==AUTOSTATUS){eval(n+"autostatus=("+n+"autostatus == 1) ? 0 : 1");continue}if(ar[t]==AUTOSTATUSCAP){eval(n+"autostatus=("+n+"autostatus == 2) ? 0 : 2");continue}if(ar[t]==HEIGHT){eval(n+"height="+n+"aboveheight="+ar[++t]);continue}if(ar[t]==CLOSETEXT){eval(n+"close='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==SNAPX){eval(n+"snapx="+ar[++t]);continue}if(ar[t]==SNAPY){eval(n+"snapy="+ar[++t]);continue}if(ar[t]==FIXX){eval(n+"fixx="+ar[++t]);continue}if(ar[t]==FIXY){eval(n+"fixy="+ar[++t]);continue}if(ar[t]==RELX){eval(n+"relx="+ar[++t]);continue}if(ar[t]==RELY){eval(n+"rely="+ar[++t]);continue}if(ar[t]==FGBACKGROUND){eval(n+'fgbackground="'+ar[++t]+'"');continue}if(ar[t]==BGBACKGROUND){eval(n+'bgbackground="'+ar[++t]+'"');continue}if(ar[t]==PADX){eval(n+"padxl="+ar[++t]);eval(n+"padxr="+ar[++t]);continue}if(ar[t]==PADY){eval(n+"padyt="+ar[++t]);eval(n+"padyb="+ar[++t]);continue}if(ar[t]==FULLHTML){n!="ol_"&eval(n+"fullhtml=1");continue}if(ar[t]==BELOW||ar[t]==ABOVE){eval(n+"vpos="+ar[t]);n!="ol_"&(olVautoFlag=1);continue}if(ar[t]==CAPICON){eval(n+'capicon="'+ar[++t]+'"');continue}if(ar[t]==TEXTFONT){eval(n+"textfont='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==CAPTIONFONT){eval(n+"captionfont='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==CLOSEFONT){eval(n+"closefont='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==TEXTSIZE){eval(n+'textsize="'+ar[++t]+'"');continue}if(ar[t]==CAPTIONSIZE){eval(n+'captionsize="'+ar[++t]+'"');continue}if(ar[t]==CLOSESIZE){eval(n+'closesize="'+ar[++t]+'"');continue}if(ar[t]==TIMEOUT){eval(n+"timeout="+ar[++t]);continue}if(ar[t]==FUNCTION){n=="ol_"?typeof ar[t+1]!="number"&(i=ar[++t],ol_function=typeof i=="function"?i:null):(r=0,i=null,typeof ar[t+1]!="number"&&(i=ar[++t]),opt_FUNCTION(i));continue}if(ar[t]==DELAY){eval(n+"delay="+ar[++t]);continue}if(ar[t]==HAUTO){eval(n+"hauto=("+n+"hauto == 0) ? 1 : 0");continue}if(ar[t]==VAUTO){eval(n+"vauto=("+n+"vauto == 0) ? 1 : 0");continue}if(ar[t]==CLOSECLICK){eval(n+"closeclick=("+n+"closeclick == 0) ? 1 : 0");continue}if(ar[t]==WRAP){eval(n+"wrap=("+n+"wrap == 0) ? 1 : 0");continue}if(ar[t]==FOLLOWMOUSE){eval(n+"followmouse=("+n+"followmouse == 1) ? 0 : 1");continue}if(ar[t]==MOUSEOFF){eval(n+"mouseoff=("+n+"mouseoff==0) ? 1 : 0");i=ar[t+1];n!="ol_"&eval(n+"mouseoff")&&typeof i=="number"&&(ipmUpper)&&(olHideDelay=ar[++t]);continue}if(ar[t]==CLOSETITLE){eval(n+"closetitle='"+escSglQuote(ar[++t])+"'");continue}if(ar[t]==CSSOFF||ar[t]==CSSCLASS){eval(n+"css="+ar[t]);continue}if(ar[t]==COMPATMODE){eval(n+"compatmode=("+n+"compatmode==0) ? 1 : 0");continue}if(ar[t]==FGCLASS){eval(n+'fgclass="'+ar[++t]+'"');continue}if(ar[t]==BGCLASS){eval(n+'bgclass="'+ar[++t]+'"');continue}if(ar[t]==TEXTFONTCLASS){eval(n+'textfontclass="'+ar[++t]+'"');continue}if(ar[t]==CAPTIONFONTCLASS){eval(n+'captionfontclass="'+ar[++t]+'"');continue}if(ar[t]==CLOSEFONTCLASS){eval(n+'closefontclass="'+ar[++t]+'"');continue}t=parseCmdLine(n,t,ar)}r&o3_function&&(o3_text=o3_function());n=="o3_"&o3_wrap&&(o3_width=0,u=/<.*\n*>/ig,u.test(o3_text)||(o3_text=o3_text.replace(/[ ]+/g," ")),u.test(o3_cap)||(o3_cap=o3_cap.replace(/[ ]+/g," ")));n=="o3_"&o3_sticky&&(o3_close||o3_frame==ol_frame||(o3_close=ol_close),o3_mouseoff&&o3_frame==ol_frame&&opt_NOCLOSE(" "))}function layerWrite(n){if(n+="\n",olNs4){var t=o3_frame.document.layers.overDiv.document;t.write(n);t.close()}else if(typeof over.innerHTML!="undefined")olIe5&isMac&&(over.innerHTML=""),over.innerHTML=n;else{for(range=o3_frame.document.createRange(),range.setStartAfter(over),domfrag=range.createContextualFragment(n);over.hasChildNodes();)over.removeChild(over.lastChild);over.appendChild(domfrag)}}function showObject(n){runHook("showObject",FBEFORE,n);var t=olNs4?n:n.style;t.visibility="visible";runHook("showObject",FAFTER,n)}function hideObject(n){runHook("hideObject",FBEFORE,n);var t=olNs4?n:n.style;olNs6&olShowId>0&&(clearTimeout(olShowId),olShowId=0);t.visibility="hidden";t.top=t.left=(olIe4&!olOp?0:-1e4)+(olNs4?0:"px");o3_timerid>0&clearTimeout(o3_timerid);o3_delayid>0&clearTimeout(o3_delayid);o3_timerid=0;o3_delayid=0;self.status="";(n.onmouseout||n.onmouseover)&(olNs4&&n.releaseEvents(Event.MOUSEOUT||Event.MOUSEOVER),n.onmouseout=n.onmouseover=null);runHook("hideObject",FAFTER,n)}function repositionTo(n,t,i){var r=olNs4?n:n.style;r.left=t+(olNs4?0:"px");r.top=i+(olNs4?0:"px")}function cursorOff(){var n=parseInt(over.style.left),t=parseInt(over.style.top),i=n+(over.offsetWidth>=parseInt(o3_width)?over.offsetWidth:parseInt(o3_width)),r=t+(over.offsetHeight>=o3_aboveheight?over.offsetHeight:o3_aboveheight);return o3_xi||o3_yr?!0:!1}function opt_FUNCTION(n){return o3_text=n?typeof n=="string"?/.+\(.*\)/.test(n)?eval(n):n:n():o3_function?o3_function():"No Function",0}function opt_NOCLOSE(n){return n||(o3_close=""),olNs4?(over.captureEvents(Event.MOUSEOUT||Event.MOUSEOVER),over.onmouseover=function(){o3_timerid>0&(clearTimeout(o3_timerid),o3_timerid=0)},over.onmouseout=function(n){olHideDelay?hideDelay(olHideDelay):cClick(n)}):over.onmouseover=function(){hoveringSwitch=!0;o3_timerid>0&(clearTimeout(o3_timerid),o3_timerid=0)},0}function opt_MULTIPLEARGS(n,t,i){for(var k=n,u,r="",k=n;kpmStart)break;r+=t[k]+","}return r&(r=r.substring(0,--r.length)),k--,u=olNs4&&/cellpad/i.test(i)?r.split(",")[0]:r,eval(i+'="'+u+'"'),k}function nbspCleanup(){o3_wrap&&(o3_text=o3_text.replace(/\ /g," "),o3_cap=o3_cap.replace(/\ /g," "))}function escSglQuote(n){return n.toString().replace(/'/g,"\\'")}function OLonLoad_handler(n){var r,l,i,t;if(olLoaded||(olLoaded=1),window.removeEventListener&n.eventPhase==3)window.removeEventListener("load",OLonLoad_handler,!1);else if(window.detachEvent&(window.detachEvent("onload",OLonLoad_handler),t=document.body.getAttribute("onload"),t&&(t=t.toString().match(/\w+\(.*\)[;\s]+/g),t&t.length)))for(i=0;i":"<\/div>":"<\/font>":(r="o3_"+i+"font",u="o3_"+(i=="caption"?"cap":i)+"color",f&!olNs4?e?'':'':'')}function quoteMultiNameFonts(n){for(var t,i=n.split(","),r=0;r0&clearTimeout(o3_timerid),o3_timerid=setTimeout("cClick()",o3_timeout=n))}function horizontalPlacement(n,t,i){var r,e=n,u=t,f=parseInt(o3_width),o;return o3_fixx>-1||o3_relx!=null?r=o3_relx!=null?o3_relx<0?u+o3_relx+e-f-i:u+o3_relx:o3_fixx:(o3_hauto==1&(o3_x-u>e/2&&o3_hpos==RIGHT&&o3_x-u-(f+o3_offsetx-e>e-i)?o3_hpos=LEFT:o3_hpos==LEFT&&o3_x-o3_offsetx-fu+e-i&&(r=e+u-f-i,r<0&&(r=0))),o3_hpos==LEFT&&(r=o3_x-o3_offsetx-f,r1&&(o=r%o3_snapx,r=o3_hpos==LEFT?r-(o3_snapx+o):r+(o3_snapx-o),r-1||o3_rely!=null?i=o3_rely!=null?o3_rely<0?r+o3_rely+f-u:r+o3_rely:o3_fixy:(o3_vauto==1&&(o3_y-r>f/2&&o3_vpos==BELOW&&o3_y+u+o3_offsety-(r+f)>0?o3_vpos=ABOVE:o3_vpos==ABOVE&&o3_y-(u+o3_offsety)-r<0&&(o3_vpos=BELOW)),o3_vpos==ABOVE?(o3_aboveheight==0&&(o3_aboveheight=u),i=o3_y-(o3_aboveheight+o3_offsety),i1&&(e=i%o3_snapy,i=o3_aboveheight>0&&o3_vpos==ABOVE?i-(o3_snapy+e):i+(o3_snapy-e),i<\/div>'),r=layerReference(n)):(r=t.document.createElement("DIV"),r.id=n,f.appendChild(r)),u=r.style),u.position="absolute",u.visibility="hidden",u.zIndex=i,u.left=olIe4&&!olOp?u.top="0px":u.top=-1e4+(olNs4?0:"px")),r}function layerReference(n){return olNs4?o3_frame.document.layers[n]:document.all?o3_frame.document.all[n]:o3_frame.document.getElementById(n)}function isFunction(n){var i=!0,t;if(typeof n=="object"){for(t=0;tu){for(k=u;k-1){t=r;break}return t}function postParseChecks(n,t){if(typeof postParse!="undefined"&postParse.length)for(var k=0;k-1&(u.alt[pms[CSSOFF-1-pmStart]]=t)):i==FBEFORE||i==FAFTER?(u=i==1?u.before:u.after,typeof t=="object"?u=u.concat(t):u[u.length++]=t,r&&(u=reOrder(u,t,r))):i==FALTERNATE?f=="number"&&(u.alt[pms[r-1-pmStart]]=t):i==FCHAIN&&(u=u.chain,typeof t=="object"?u=u.concat(t):u[u.length++]=t);return}}function RunTimeFunction(n){isFunction(n)&(typeof n=="object"?runTime=runTime.concat(n):runTime[runTime.length++]=n)}function CmdLineFunction(n){isFunction(n)&&(typeof n=="object"?cmdLine=cmdLine.concat(n):cmdLine[cmdLine.length++]=n)}function PostParseFunction(n){isFunction(n)&&(typeof n=="object"?postParse=postParse.concat(n):postParse[postParse.length++]=n)}function runHook(n,t){var l=hookPts[n],r=null,u,i,ar=runHook.arguments,k;if(t==FREPLACE)i=argToString(ar,2),r=typeof l!="undefined"&(l=l.ovload)?eval("l("+i+")"):eval(n+"("+i+")");else if(t==FBEFORE||t==FAFTER){if(typeof l!="undefined"&(l=t==1?l.before:l.after,l.length))for(i=argToString(ar,2),k=0;k0;k--)if((r=eval("l[k-1]("+i+")"))!=void 0)break;return r}function FunctionReference(){this.ovload=null;this.before=[];this.after=[];this.alt=[];this.chain=[]}function Info(n,t){this.version=n;this.prerelease=t;this.simpleversion=Math.round(this.version*100);this.major=parseInt(this.simpleversion/100);this.minor=parseInt(this.simpleversion/10)-this.major*10;this.revision=parseInt(this.simpleversion)-this.major*100-this.minor*10;this.meets=meets}function meets(n){return n?this.simpleversion>=Math.round(100*parseFloat(n)):!1}var olLoaded=0,pmStart=1e7,pmUpper=10001e3,pmCount=pmStart+1,pmt="",pms=[],olInfo=new Info("4.22",0),FREPLACE=0,FBEFORE=1,FAFTER=2,FALTERNATE=3,FCHAIN=4,olHideForm=0,olHautoFlag=0,olVautoFlag=0,hookPts=[],postParse=[],cmdLine=[],runTime=[],ol_fgcolor,ol_bgcolor,ol_textcolor,ol_capcolor,ol_closecolor,ol_textfont,ol_captionfont,ol_closefont,ol_textsize,ol_captionsize,ol_closesize,ol_width,ol_border,ol_cellpad,ol_offsetx,ol_offsety,ol_text,ol_cap,ol_sticky,ol_background,ol_close,ol_hpos,ol_status,ol_autostatus,ol_height,ol_snapx,ol_snapy,ol_fixx,ol_fixy,ol_relx,ol_rely,ol_fgbackground,ol_bgbackground,ol_padxl,ol_padxr,ol_padyt,ol_padyb,ol_fullhtml,ol_vpos,ol_aboveheight,ol_capicon,ol_frame,ol_timeout,ol_function,ol_delay,ol_hauto,ol_vauto,ol_closeclick,ol_wrap,ol_followmouse,ol_mouseoff,ol_closetitle,ol_compatmode,ol_css,ol_fgclass,ol_bgclass,ol_textfontclass,ol_captionfontclass,ol_closefontclass,ol_texts,ol_caps,oW,oH,agent,versNum,capExtent,olShowId,olCheckMouseCapture;Commands("donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass");typeof ol_fgcolor=="undefined"&(ol_fgcolor="#CCCCFF");typeof ol_bgcolor=="undefined"&(ol_bgcolor="#333399");typeof ol_textcolor=="undefined"&(ol_textcolor="#000000");typeof ol_capcolor=="undefined"&(ol_capcolor="#FFFFFF");typeof ol_closecolor=="undefined"&(ol_closecolor="#9999FF");typeof ol_textfont=="undefined"&(ol_textfont="Verdana,Arial,Helvetica");typeof ol_captionfont=="undefined"&(ol_captionfont="Verdana,Arial,Helvetica");typeof ol_closefont=="undefined"&(ol_closefont="Verdana,Arial,Helvetica");typeof ol_textsize=="undefined"&(ol_textsize="1");typeof ol_captionsize=="undefined"&(ol_captionsize="1");typeof ol_closesize=="undefined"&(ol_closesize="1");typeof ol_width=="undefined"&(ol_width="200");typeof ol_border=="undefined"&(ol_border="1");typeof ol_cellpad=="undefined"&(ol_cellpad=2);typeof ol_offsetx=="undefined"&(ol_offsetx=10);typeof ol_offsety=="undefined"&(ol_offsety=10);typeof ol_text=="undefined"&(ol_text="Default Text");typeof ol_cap=="undefined"&(ol_cap="");typeof ol_sticky=="undefined"&(ol_sticky=0);typeof ol_background=="undefined"&(ol_background="");typeof ol_close=="undefined"&(ol_close="Close");typeof ol_hpos=="undefined"&(ol_hpos=RIGHT);typeof ol_status=="undefined"&(ol_status="");typeof ol_autostatus=="undefined"&(ol_autostatus=0);typeof ol_height=="undefined"&(ol_height=-1);typeof ol_snapx=="undefined"&(ol_snapx=0);typeof ol_snapy=="undefined"&(ol_snapy=0);typeof ol_fixx=="undefined"&(ol_fixx=-1);typeof ol_fixy=="undefined"&(ol_fixy=-1);typeof ol_relx=="undefined"&(ol_relx=null);typeof ol_rely=="undefined"&(ol_rely=null);typeof ol_fgbackground=="undefined"&(ol_fgbackground="");typeof ol_bgbackground=="undefined"&(ol_bgbackground="");typeof ol_padxl=="undefined"&(ol_padxl=1);typeof ol_padxr=="undefined"&(ol_padxr=1);typeof ol_padyt=="undefined"&(ol_padyt=1);typeof ol_padyb=="undefined"&(ol_padyb=1);typeof ol_fullhtml=="undefined"&(ol_fullhtml=0);typeof ol_vpos=="undefined"&(ol_vpos=BELOW);typeof ol_aboveheight=="undefined"&(ol_aboveheight=0);typeof ol_capicon=="undefined"&(ol_capicon="");typeof ol_frame=="undefined"&(ol_frame=self);typeof ol_timeout=="undefined"&(ol_timeout=0);typeof ol_function=="undefined"&(ol_function=null);typeof ol_delay=="undefined"&(ol_delay=0);typeof ol_hauto=="undefined"&(ol_hauto=0);typeof ol_vauto=="undefined"&(ol_vauto=0);typeof ol_closeclick=="undefined"&(ol_closeclick=0);typeof ol_wrap=="undefined"&(ol_wrap=0);typeof ol_followmouse=="undefined"&(ol_followmouse=1);typeof ol_mouseoff=="undefined"&(ol_mouseoff=0);typeof ol_closetitle=="undefined"&(ol_closetitle="Close");typeof ol_compatmode=="undefined"&(ol_compatmode=0);typeof ol_css=="undefined"&(ol_css=CSSOFF);typeof ol_fgclass=="undefined"&(ol_fgclass="");typeof ol_bgclass=="undefined"&(ol_bgclass="");typeof ol_textfontclass=="undefined"&(ol_textfontclass="");typeof ol_captionfontclass=="undefined"&(ol_captionfontclass="");typeof ol_closefontclass=="undefined"&(ol_closefontclass="");typeof ol_texts=="undefined"&(ol_texts=["Text 0","Text 1"]);typeof ol_caps=="undefined"&(ol_caps=["Caption 0","Caption 1"]);var o3_text="",o3_cap="",o3_sticky=0,o3_background="",o3_close="Close",o3_hpos=RIGHT,o3_offsetx=2,o3_offsety=2,o3_fgcolor="",o3_bgcolor="",o3_textcolor="",o3_capcolor="",o3_closecolor="",o3_width=100,o3_border=1,o3_cellpad=2,o3_status="",o3_autostatus=0,o3_height=-1,o3_snapx=0,o3_snapy=0,o3_fixx=-1,o3_fixy=-1,o3_relx=null,o3_rely=null,o3_fgbackground="",o3_bgbackground="",o3_padxl=0,o3_padxr=0,o3_padyt=0,o3_padyb=0,o3_fullhtml=0,o3_vpos=BELOW,o3_aboveheight=0,o3_capicon="",o3_textfont="Verdana,Arial,Helvetica",o3_captionfont="Verdana,Arial,Helvetica",o3_closefont="Verdana,Arial,Helvetica",o3_textsize="1",o3_captionsize="1",o3_closesize="1",o3_frame=self,o3_timeout=0,o3_timerid=0,o3_allowmove=0,o3_function=null,o3_delay=0,o3_delayid=0,o3_hauto=0,o3_vauto=0,o3_closeclick=0,o3_wrap=0,o3_followmouse=1,o3_mouseoff=0,o3_closetitle="",o3_compatmode=0,o3_css=CSSOFF,o3_fgclass="",o3_bgclass="",o3_textfontclass="",o3_captionfontclass="",o3_closefontclass="",o3_x=0,o3_y=0,o3_showingsticky=0,o3_removecounter=0,over=null,fnRef,hoveringSwitch=!1,olHideDelay,isMac=navigator.Agent.indexOf("Mac")!=-1,olOp=navigator.Agent.toLowerCase().indexOf("opera")>-1&document.createTextNode,olNs4=navigator.appName=="Netscape"&&parseInt(navigator.appVersion)==4,olNs6=document.getElementById?!0:!1,olKq=olNs6&&/konqueror/i.test(navigator.Agent),olIe4=document.all?!0:!1,olIe5=!1,olIe55=!1,docRoot="document.body";olNs4&(oW=window.innerWidth,oH=window.innerHeight,window.onresize=function(){(oW!=window.innerWidth||oH!=window.innerHeight)&&location.reload()});olIe4&(agent=navigator.Agent,/MSIE/.test(agent)&&(versNum=parseFloat(agent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/i)[1]),versNum>=5&&(olIe5=!0,olIe55=versNum>=5.5&&!olOp?!0:!1,olNs6&&(olNs6=!1))),olNs6&&(olIe4=!1));document.compatMode&document.compatMode=="CSS1Compat"&&(docRoot=olIe4&&!olOp?"document.documentElement":docRoot);window.addEventListener?window.addEventListener("load",OLonLoad_handler,!1):window.attachEvent&window.attachEvent("onload",OLonLoad_handler);olShowId=-1;Hook("ol_content_simple",ol_content_simple,FALTERNATE,CSSOFF);Hook("ol_content_caption",ol_content_caption,FALTERNATE,CSSOFF);Hook("ol_content_background",ol_content_background,FALTERNATE,CSSOFF);Hook("ol_content_simple",ol_content_simple,FALTERNATE,CSSCLASS);Hook("ol_content_caption",ol_content_caption,FALTERNATE,CSSCLASS);Hook("ol_content_background",ol_content_background,FALTERNATE,CSSCLASS);PostParseFunction(checkPositionFlags);Hook("hideObject",nbspCleanup,FAFTER);Hook("horizontalPlacement",horizontalPlacement,FCHAIN);Hook("verticalPlacement",verticalPlacement,FCHAIN);(olNs4||olIe5&isMac||olKq)&&(olLoaded=1);NoParameterCommands("sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode");olCheckMouseCapture=!0;olNs4||olNs6||olIe4?olMouseCapture():(overlib=no_overlib,nd=no_overlib,ver3fix=!0); !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&o.force;return!(!t||!s&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'×',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e(""),M=e(""),B=e(""),q=e(""),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.4",warning:a};return b}()})}("function"==typeof define&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); //# sourceMappingURL=toastr.js.map; /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(n){"function"==typeof define&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=((u=t&&t.fn&&t.fn.select2&&t.fn.select2.amd?t.fn.select2.amd:u)&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(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:(t=e,function(){return y&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&n.length?["require","exports","module"]:t,a=0;a":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('');return this.options.get("multiple")&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d(''),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.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",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):tthis.$results.outerHeight()||s<0)&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.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}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),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){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},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("")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html(''),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},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 i('×')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s×')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;nthis.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.looreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.looreIfNeeded.bind(this))},e.prototype.looreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loore())},e.prototype.loore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n(''),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u(""),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.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)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.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."),n=e[t].apply(e,s)}),-1{u.resolve=n,u.reject=t});const f={};t.pageTranslated=new Promise((n,t)=>{f.resolve=n,f.reject=t});t.startUp=async function(){try{t.debug&console.log("y$.base: startup");await e();i.base.customTitle!==""&(document.title="Yucata - "+i18next.t(i.base.customTitle));i.ui.init();r("[data-i18n]","i18n",(n,t)=>i18next.t(n,t));r("[data-i18n-alt]","i18n-alt",n=>i18next.t(n));r("[data-i18n-title]","i18n-title",n=>i18next.t(n));r("[data-i18n-placeholder]","i18n-placeholder",n=>i18next.t(n));r("[data-i18n-value]","i18n-value",n=>i18next.t(n));$("ul.sf-menu").superfish();f.resolve();i.s.init()}catch(n){console.error("Startup failed:",n)}};t.stringFormat=function(n,...t){return n.replace(/{(\d+)}/g,(n,i)=>t[i]||n)};t.getDataTablesTranslation=function(n,t){return{processing:i18next.t("DataTables.processing"),lengthMenu:i18next.t("DataTables.lengthMenu"),zeroRecords:n||i18next.t("DataTables.NoMatchesFound"),info:i18next.t("DataTables.info"),infoEmpty:i18next.t("DataTables.infoEmpty"),infoFiltered:i18next.t("DataTables.infoFiltered"),infoPostFix:i18next.t("DataTables.infoPostFix"),search:i18next.t("DataTables.search"),searchPlaceholder:t||"",url:"",paginate:{first:i18next.t("DataTables.paginate.first"),previous:i18next.t("DataTables.paginate.previous"),next:i18next.t("DataTables.paginate.next"),last:i18next.t("DataTables.paginate.last")}}}})(this); (function(){"use strict";const n={};n.create=function(n,t,i){var u,r;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/; Secure"};n.read=function(n){var r,u,i,t;try{for(r=n+"=",u=document.cookie.split(";"),i=0;i(n.type==="mouseover"?t($(n.currentTarget)):nd(),!1))}function s(n){const r=n.attr("class").split(" "),i=c(r,"jPlayerID"),u=n.hasClass("jAction");i>0?u?t.showPlayerContextMenuChat(i):t.showPlayerContextMenu(i):nd()}function h(n){const r=n.data("gamename"),i=n.data("gameidname");i?t.showGameContextMenu({gameName:r,gameIDName:i}):nd()}function c(n,t){const i=n.find(n=>n.startsWith(t));return i?i.substring(t.length):0}function l(){function n(){const n=Date.now()-t.getTime(),i=new Date(r.getTime()+n);$("#yucataServerTime").text(i.toLocaleString())}const t=new Date,i=[...aYucataServerTimeStart];i[1]-=1;const r=new Date(...i);n();setTimeout(()=>{n(),setInterval(n,6e4)},(60-t.getSeconds())*1e3)}function a(){$(".watermarkclass").each(function(){try{$(this).watermark($(this).attr("title"))}catch(n){}})}function f(n,t){const u=parseInt(n);r=u;i.has(u)?overlib(o(i.get(u),Is),FULLHTML,FOLLOWMOUSE,MOUSEOFF,NOCLOSE,OFFSETX,15,OFFSETY,5,HAUTO,VAUTO,DELAY,500,TIMEOUT,3e3):ServiceGetFlairById(n,t,null)}function v(n){e(n,!0)}function y(n){e(n,!1)}function e(n,t){n.d&(i.set(n.d.ID,n.d),r===n.d.ID)&&overlib(o(n.d,t),FULLHTML,FOLLOWMOUSE,MOUSEOFF,NOCLOSE,OFFSETX,15,OFFSETY,5,HAUTO,VAUTO,DELAY,500,TIMEOUT,3e3)}function o(n,t){const i=$("").addClass("tablecontext").attr({cellpadding:2,cellspacing:0}).append(p(n,t));return i[0].outerHTML}function p(n,i){const r=[];if(r.push(`${t.renderFlair(n).html()}`),r.push(`${w(n.Country)} ${i18next.t("Menu.OpenGames")}${n.OpenGameCount}`),n.ID===ID?r.push(`${i18next.t("Menu.MyProfile")}`):r.push(`${i18next.t("Menu.SendChatMessage")}`),r.push(`${i18next.t("Menu.PlayerInfo")}`),n.ID!==""&r.push(`${i18next.t("Menu.GameHistory")}`),n.ID!=ID){var u=BaseUrlWithLang+"ranking/"+.replace(new RegExp("\\.","g"),"__dot__")+"#opponent_"+n.ID;r.push(`${i18next.t("Menu.GameHistoryWithMe")}`)}return y$.buddies.isBuddy(n.ID)?r.push(`${i18next.t("Menu.RemoveFromBuddyList")}`):r.push(`${i18next.t("Menu.AddToBuddyList")}`),n.ID!==ID&r.push(`${i18next.t("Menu.SendMessage")}`),i&&n.ID!==ID&&Is===!0&&(r.push(`${i18next.t("Menu.MuteMinutes",{minutes:"10"})}`),r.push(`${i18next.t("Menu.MuteMinutes",{minutes:"60"})}`)),r.("")}function w(n){return``}function b(n){return` ${n.gameName} ${i18next.t("Menu.CreateInvitation")} ${i18next.t("Menu.RankingTable")} ${i18next.t("Menu.GameInfo")} ${i18next.t("Menu.GameRules")} `}const t={},i=new Map;let r=0;t.init=function(){$("#master-tl").on("click",()=>{window.location=BaseUrlWithLang});$(".main-scroll-to-top").on("click",()=>{window.scrollTo(0,0)});u(".jPlayerInfo",s);u(".jGameInfo",h);l();a();$(".portletsettings").each(function(){var n=$(this).data("dialogname");if(n)$(this).on("click",function(){$("#"+n).dialog("open")})})};t.setLanguage=function(n){const t=window.location.href,i=/(https?:\/\/[^\/]+\/)([a-z]{2})(\/|$)/,r=t.match(i);if(r){const u=r[2];if(u!==n){const r=t.replace(i,`$1${n}$3`);window.location.href=r}}else console.log("Kein g�ltiger Sprachcode in der URL gefunden.")};t.activateTab=function(n){$(".l-tabs__tab_navigator, .l-tabs__tab_content").removeClass("is_active");var i,t;n!==""&(i=$(n+", "+n+"_content"),i.length!==0&&(t=i));(n===""||i.length===0)&(t=$(".l-tabs > .l-tabs__tab_navigator").first(),t.length!==0&&(n="#"+t.attr("id")),t=t.add($(".l-tabs > .l-tabs__tab_content").first()));t.addClass("is_active");window.location.hash=n};t.portletClose=function(n){$(`.${n}`).hide(500);n==="controls_donationdrive_ascx"&ServiceHideDD(index)};t.renderFlair=function(n){const t=n.GravatarLink.includes("?")?"&":"?";return $("").append($("").attr({cellpadding:0,cellspacing:0}).append($("").append($("").append($("").attr({src:`${n.GravatarLink}${t}s=32`,alt:"Gravatar",title:i18next.t("Flair.GetGravatar")}).css({paddingRight:"5px",width:"32px",height:"32px"}))).append($("").append($("").css("font-weight","bold").text(n.)).append($("").css({whiteSpace:"nowrap",fontWeight:"normal"}).text(n.RankName)))))};t.showGameContextMenu=function(n){overlib(b(n),FULLHTML,FOLLOWMOUSE,MOUSEOFF,NOCLOSE,OFFSETX,15,OFFSETY,0,HAUTO,VAUTO,DELAY,500,TIMEOUT,3e3)};t.showPlayerContextMenu=function(n){f(n,y)};t.showPlayerContextMenuChat=function(n){f(n,v)};n.y$.ui=t})(this); (function(){"use strict";function t(n){$("#tblDonationHistory").html('<\/table>');$("#tblDonationHistoryTable").DataTable({searching:!1,pagingType:"full_numbers",info:!0,language:y$.base.getDataTablesTranslation(i18next.t("PlayerInfo.DonationInfoText",{url:BaseUrlWithLang+"Donations"})),ordering:!1,autoWidth:!1,stateSave:!1,dom:'<"top"flp>rt<"bottom"ip><"clear">',pageLength:10,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,i18next.t("All")]],data:n.d,drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#tblDonationHistory .dataTables_paginate").hide(),$("#tblDonationHistory .dataTables_length").hide(),$("#tblDonationHistory .dataTables_info").hide()):($("#tblDonationHistory .dataTables_paginate").show(),$("#tblDonationHistory .dataTables_info").show(),$("#tblDonationHistory .dataTables_length").show())},columns:[{title:i18next.t("PlayerInfo.Date"),data:"DonationDateString"},{title:i18next.t("PlayerInfo.Amount"),data:"Amount"}]})}const n={};n.hideDDForGood=function(){$(".controls_donationdrive_ascx").hide(500);ServiceHideDD(0)};n.showPlayerDonations=function(n){y$.base.initialized.then(()=>{ServiceGetDonationHistory(n,t)})};y$.donation=n})(this); var ol_border=1,ol_fgcolor="#71A1E1",ol_bgcolor="#00305E",ol_textcolor="#000000",ol_textsize="10pt"; function BaseServiceCall(n,t,i,r,u){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:BaseUrl+"Services/YucataService.svc/"+n,data:t,dataType:"json",timeout:2e6,success:function(n){i&i(n,u)},error:function(n){r&&r(n,u)}})}function ServiceCall(n,t,i,r,u){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:BaseUrl+"Services/Service.svc/"+n,data:t,dataType:"json",timeout:2e6,success:function(n){i&i(n,u)},error:function(n){r&&r(n,u)}})}function BaseServiceCallGET(n,t,i,r,u){$.ajax({type:"GET",contentType:"application/json; charset=utf-8",url:BaseUrl+"Services/YucataService.svc/"+n,data:t,dataType:"json",timeout:2e6,success:function(n){i&i(n,u)},error:function(n){r&&r(n,u)}})}function ServiceSetGameLike(n,t,i,r){BaseServiceCall("SetGameLike",JSON.stringify({gameTypeId:n,gameLikeValue:t}),i,r)}function ServiceGetMessages(n,t,i){BaseServiceCall("GetMessages",JSON.stringify({lastId:n}),t,i)}function ServiceLikeForumPost(n,t,i){return BaseServiceCall("LikeForumPost",JSON.stringify({postid:n}),t,i),!1}function ServiceGetNextGameOnTurnRoute(n,t){BaseServiceCall("GetNextGameOnTurnRoute","{}",n,t)}function ServiceGetUnreessages(n,t){BaseServiceCall("GetUnreessages","",n,t)}function ServiceHideMessage(n,t,i){BaseServiceCall("HideMessage",JSON.stringify({id:n}),t,i)}function ServiceGetTrueSkillForPlayer(n,t,i){BaseServiceCall("GetTrueSkillForPlayer",JSON.stringify({pid:n}),t,i)}function ServiceGetDonationHistory(n,t,i){BaseServiceCall("GetDonationHistory",JSON.stringify({pid:n}),t,i)}function ServiceGetRecentlyFinishedGames(n,t,i){BaseServiceCall("GetRecentlyFinishedGames",JSON.stringify({Id:n}),t,i)}function ServiceGetSugggestions(n,t,i,r){BaseServiceCall("GetSuggestions",JSON.stringify({referenceGameType:n,max:t}),i,r)}function ServiceGetRecentlyFinishedGameDetail(n,t,i){BaseServiceCall("GetRecentlyFinishedGameDetail",JSON.stringify({gameId:n}),t,i)}function ServiceDeleteMessage(n,t){BaseServiceCall("DeleteMessage",JSON.stringify({id:n,msgType:t}),null,null)}function ServiceSendChatMessage(n,t,i,r){BaseServiceCall("SendChatMessage",JSON.stringify({message:n,recipient:t}),i,r)}function ServiceSendGameChatMessage(n,t,i,r){BaseServiceCall("SendGameChatMessage",JSON.stringify({message:n,gameId:t}),i,r)}function ServiceGetChatMessages(n,t){BaseServiceCall("GetChatMessages","",n,t)}function ServiceGetGameChatMessages(n,t,i){BaseServiceCall("GetGameChatMessages",JSON.stringify({gameId:n}),t,i)}function ServiceClearChat(){BaseServiceCall("ClearChat","",null,null)}function ServiceHideDD(n){BaseServiceCall("HideDD",JSON.stringify({days:n}),null,null)}function ServiceDeleteChatMessage(n,t,i){BaseServiceCall("DeleteChatMessage",JSON.stringify({id:n}),t,i)}function ServiceMute(n,t,i,r){BaseServiceCall("Mute",JSON.stringify({ID:n,minutes:t}),i,r)}function ServiceGetTrueSkillRatingsByGameType(n,t,i,r){BaseServiceCall("GetTrueSkillRatingsByGameType",JSON.stringify({gameTypeId:n,pageId:t}),i,r)}function ServiceGetOnlines(n,t){BaseServiceCallGET("GetOnlines","",n,t)}function ServiceGetLiveGames(n,t){BaseServiceCall("GetLiveGames","",n,t)}function ServiceGetQuarantinedGames(n,t){BaseServiceCall("GetQuarantinedGames","",n,t)}function ServiceGetPublicInvitations(n,t){BaseServiceCall("GetPublicInvitations","",function(t){RemapInvitationRecord(t,n)},t)}function ServiceGetPublicInvitationsByGameTypeId(n,t,i){BaseServiceCall("GetPublicInvitationsByGameTypeId",JSON.stringify({id:n}),function(n){RemapInvitationRecord(n,t)},i)}function ServiceGetPublicInvitationsByPlayerId(n,t,i){BaseServiceCall("GetPublicInvitationsByPlayerId",JSON.stringify({id:n}),function(n){RemapInvitationRecord(n,t)},i)}function ServiceGetRandomGameInvitations(n,t){BaseServiceCall("GetRandomGameInvitations","",function(t){RemapInvitationRecord(t,n)},t)}function ServiceGetPersonalInvitations(n,t){BaseServiceCall("GetPersonalInvitations","",function(t){RemapInvitationRecord(t,n)},t)}function ServiceGetSentInvitations(n,t){BaseServiceCall("GetSentInvitations","",function(t){RemapInvitationRecord(t,n)},t)}function ServiceGetInvitation(n,t,i){BaseServiceCall("GetInvitation",JSON.stringify({gameId:n}),function(n){RemapSingleInvitationRecord(n,t)},i)}function ServiceAcceptInvitation(n,t,i){BaseServiceCall("AcceptInvitation",JSON.stringify({id:n}),t,i)}function ServiceGetMatchQuality(n,t,i,r){BaseServiceCall("GetMatchQuality",JSON.stringify({id:n}),t,i,r)}function ServiceDeleteInvitation(n,t,i){BaseServiceCall("DeleteInvitation",JSON.stringify({id:n}),t,i)}function ServiceGetFlairById(n,t,i){BaseServiceCall("GetFlairById",JSON.stringify({id:n}),t,i)}function ServiceGetWonGames(n,t){BaseServiceCall("GetWonGames","",n,t)}function ServiceGetBuddies(n,t){BaseServiceCall("GetBuddies","",n,t)}function ServiceAddBuddy(n,t,i){BaseServiceCall("AddBuddy",JSON.stringify({buddyId:n}),t,i)}function ServiceBlock(n,t,i,r){ServiceCall("Block",JSON.stringify({Id:n,reason:t}),i,r)}function ServiceUnblock(n,t,i){ServiceCall("Unblock",JSON.stringify({Id:n}),t,i)}function ServiceRemoveBuddy(n,t,i){BaseServiceCall("RemoveBuddy",JSON.stringify({buddyId:n}),t,i)}function ServiceSetWindowSize(n,t,i,r,u){BaseServiceCall("SetWindowSize",JSON.stringify({windowId:n,width:t,height:i}),r,u)}function ServiceGetGameLikes(n,t,i){BaseServiceCall("GetGameLikes",JSON.stringify({playerID:n}),t,i)}function ServiceGetGamesByOpponent(n,t,i){BaseServiceCall("GetGamesByOpponent",JSON.stringify({playerID:n}),t,i)}function ServiceGetGamesByGameType(n,t,i){BaseServiceCall("GetGamesByGameType",JSON.stringify({playerID:n}),t,i)}function ServiceGetPlayedOpponents(n,t,i){BaseServiceCall("GetPlayedOpponents",JSON.stringify({pid:n}),t,i)}function ServiceGetPlayedGameTypes(n,t,i){BaseServiceCall("GetPlayedGameTypes",JSON.stringify({pid:n}),t,i)}function ServiceGetAllPlayedGames(n,t,i){BaseServiceCall("GetAllPlayedGames",JSON.stringify({ID:n}),t,i)}function ServiceGetGamesByOpponentByGameType(n,t,i,r){BaseServiceCall("GetGamesByOpponentByGameType",JSON.stringify({playerID:n,opponentID:t}),i,r)}function ServiceGetGamesByGameTypeByOpponent(n,t,i,r){BaseServiceCall("GetGamesByGameTypeByOpponent",JSON.stringify({playerID:n,gameType:t}),i,r)}function ServiceGetGamesByGameTypeAllGames(n,t,i,r){BaseServiceCall("GetGamesByGameTypeAllGames",JSON.stringify({playerID:n,gameType:t}),i,r)}function ServiceGetGamesByOpponentAllGames(n,t,i,r){BaseServiceCall("GetGamesByOpponentAllGames",JSON.stringify({playerID:n,opponentID:t}),i,r)}function ServiceGetGamesByGameTypeByOpponentAllGames(n,t,i,r,u){BaseServiceCall("GetGamesByGameTypeByOpponentAllGames",JSON.stringify({playerID:n,opponentID:t,gameType:i}),r,u)}function ServiceGetNote(n,t,i,r){BaseServiceCall("GetNote",JSON.stringify({gameID:n,pid:t}),i,r)}function ServiceSetNote(n,t,i,r,u){BaseServiceCall("SetNote",JSON.stringify({gameID:n,pid:t,note:i}),r,u)}function ServiceGetTrueSkillDevelopmentForOneGameAndPlayer(n,t,i,r){BaseServiceCall("GetTrueSkillDevelopmentForOneGameAndPlayer",JSON.stringify({gameTypeId:n,playerId:t}),i,r)}function ServiceGetAllPlayedGamesById(n,t,i){BaseServiceCall("GetAllPlayedGamesById",JSON.stringify({playerId:n}),t,i)}function ServiceGetRankingList(n,t){BaseServiceCall("GetRankingList","",n,t)}function ServiceGetLastChatMessageReadTime(n,t,i){BaseServiceCall("GetLastChatMessageReadTime",JSON.stringify({channelId:n}),t,i)}function ServiceSetLastChatMessageReadTime(n,t,i,r){BaseServiceCall("SetLastChatMessageReadTime",JSON.stringify({channelId:n,epoch:t}),i,r)}function ServiceGetGamesList(n,t){BaseServiceCall("GetGamesList","{}",n,t)}function ServiceGetStatistics(n,t){BaseServiceCall("GetStatistics","",n,t)}function AllowedToSave(){var n=document.getElementsByName("SaveStatusFailed")[0];return n.getAttribute("value")==="False"}function ServiceSetGameStatusSecure(n,t,i,r,u,f,e){var o,s;if(!AllowedToSave()){f&f();return}o=arguments.length<=6?"":e;s=function(n){var t=document.getElementsByName("SaveStatusFailed")[0];t.setAttribute("value","True");f&f(n)};BaseServiceCall("SetGameStatusSecureWithMove",JSON.stringify({gameID:n,pid:t,status:i,origStatus:r,move:o}),u,s)}function ServiceSetDBStatusSecure(n,t,i,r,u){var e,f,o;return AllowedToSave()?(e=arguments.length<=4?"":u,f=$.ajax({type:"POST","async":!1,contentType:"application/json; charset=utf-8",url:BaseUrl+"Services/YucataService.svc/SetGameStatusSecureWithMove",data:JSON.stringify({gameID:n,pid:t,status:i,origStatus:r,move:e}),dataType:"json",timeout:2e4}),f.status!=200&(o=document.getElementsByName("SaveStatusFailed")[0],o.setAttribute("value","True")),f.status==200):!1}function RemapInvitationRecord(n,t){new_d=[];n.d.forEach(function(n){new_record={};for(var t in _invitationRecordMapping)new_record[_invitationRecordMapping[t]]=n[t];new_d.push(new_record)});n.d=new_d;t(n)}function RemapSingleInvitationRecord(n,t){new_record={};for(var i in _invitationRecordMapping)new_record[_invitationRecordMapping[i]]=n.d[i];n.d=new_record;t(n)}var _invitationRecordMapping={A:"ID",B:"GameTypeId",C:"Players",D:"GameName",E:"NumPlayers",F:"IsRanking",G:"HasReturn",H:"InvType",I:"InvitedPlayers",J:"Text",K:"CreatorID",L:"CreationDate",M:"HasCoverImage",N:"CoverImagePath",O:"FullName",Q:"IsRandomGame",R:"IsWon",S:"MinLikeLevel",T:"InvitationOptions",U:"Setting",V:"Scenario",W:"SkillRequirement",X:"SpeedRequirement",Y:"CreatorMu",Z:"CreatorSigma",AA:"GameTypeName"}; function InitializeSignalR(){if($.connection.hub.url=SignalRDomain,ID!=""){$.connection.hub.qs="ID="+ID+"&="++"&Hash="+Hash;var n=$.connection.globalHub;n&(n.client.NextGame=function(n,t){t||HandleNextGame(n,!0)},n.client.NewMessage=function(n){if(n.ChatRoomID===-1){y$.chat.addMessage(document.getElementById("divChat"),n,"tableChat",!0);return}},n.client.clearChat=function(){$("#divChat").html("")},n.client.removeMessages=function(n){n.forEach(function(n){$("#RowChatMessage"+n.ID).remove()})},n.client.removeOnlineData=function(n){y$.s.removeOnlineData(n)},n.client.updateOnlineData=function(n){y$.s.updateOnlineData(n);y$.games.refresh()},n.client.updateOnlineCounts=function(n,t){y$.s.updateOnlineCounts(n,t)},n.client.broadcastMessage=function(n){toastr.info(n,i18next.t("Messages.NewBroadcast"),{timeOut:"300000"});y$.chat.increaseUnreessageCount("divmessbroadcast")},n.client.personalMessage=function(n,t){toastr.info(t,i18next.t("Messages.MessageFrom",{sender:n}),{timeOut:"50000"});y$.chat.increaseUnreessageCount("divmesspersonal")},n.client.systemMessage=function(n){toastr.info(n,i18next.t("Messages.NewSystemMessage"),{timeOut:"50000"});y$.chat.increaseUnreessageCount("divmesssystem")},n.client.newForumMessage=function(){y$.chat.increaseUnreessageCount("divmessforum")},n.client.receivedInvitation=function(n,t){var i,r;new_record={};for(i in _invitationRecordMapping)new_record[_invitationRecordMapping[i]]=n[i];r=new_record.IsRandomGame?i18next.t("Invitation.RandomGame"):new_record.FullName;toastr.info(i18next.t("Invitation.InviteFrom")+t,r,{timeOut:"50000",preventDuplicates:!0});y$.invitation.addPersonalInvitationsRecord(new_record)},n.client.withdrawnInvitation=function(n){y$.invitation.removePersonalInvitationsRecord(n)},n.client.invitationAccepted=function(){},n.client.gameStarted=function(n){y$.invitation.removePersonalInvitationsRecord(n.ID);y$.games.addGameToCurrentGameList(n)},n.client.moveDone=function(n,t,i){y$.games.handleMoveDone(n,t,i)},n.client.turnDone=function(n,t,i){y$.games.handleTurnDone(n,t,i)},n.client.gameFinished=function(n){y$.games.handleGameFinished(n)},n.client.gameVanished=function(n){y$.games.removeGameFromCurrentGameList(n)},n.client.=function(){$.connection.hub.stop();ID=""},$.connection.hub.start().done(function(){}).fail(function(){}),$.connection.hub.disconnected(function(){setTimeout(function(){$.connection.hub.start()},5e3)}))}}$(document).ready(function(){InitializeSignalR()}); (function(){"use strict";function h(n,t,i,r){var u,f;(Is||==r)&(n.id="ChatMessage"+t,u=document.createElement("a"),u.href="javascript:y$.chat.removeChatMessage("+t+");",u.id="aDeleteChatMessage"+t,u.style.display="none",f=document.createElement("span"),f.className="sprite-common messages-image sprite-common-btnDelete",f.alt=i18next.t("Menu.DeleteThisChatMessage"),f.title=i18next.t("Menu.DeleteThisChatMessage"),u.appendChild(f),n.appendChild(u),$(n).addClass("jDeleteableChatMessage"))}function c(n,t,i,r){var u=window.open(n,t,"width="+i+",height="+r+",menubar=no,toolbar=no,status=no,locationbar=no,resizable=yes,scrollbars=yes");u.resizeTo(i,r);u.focus()}function e(){var n=y$.cookie.read("chatHideEmojis");return n===null&y$.cookie.create("chatHideEmojis","false",1e3),n==="true"}function a(n){if(y$.base.debug)try{console.log("y$.chat.updateChatCB. Loaded records: "+n.d.length)}catch(i){}var t=null;n!==null&(t=n.d,t!==null&&t.length>0&&v(t,document.getElementById("divChat"),"tableChat"))}function v(t,i,r){for(var u=0;u/g,"\n");for(var t,i,r,u;n.search(/http\:/)!=-1;)u=/([\s\S]*)(http\:[^\s]*)([\s\S]*)/,u.exec(n),i=RegExp.$1,t=RegExp.$2,r=RegExp.$3,t=t.replace(/http\:/,"hXtXtXp"),n=i+""+t+"<\/a>"+r;for(n=n.replace(/hXtXtXp/g,"http:");n.search(/https\:/)!=-1;)u=/([\s\S]*)(https\:[^\s]*)([\s\S]*)/,u.exec(n),i=RegExp.$1,t=RegExp.$2,r=RegExp.$3,t=t.replace(/https\:/,"hXtXtXpXs"),n=i+""+t+"<\/a>"+r;for(n=n.replace(/hXtXtXpXs/g,"https:");n.search(/ftp\:/)!=-1;)u=/([\s\S]*)(ftp\:[^\s]*)([\s\S]*)/,u.exec(n),i=RegExp.$1,t=RegExp.$2,r=RegExp.$3,t=t.replace(/ftp\:/,"fXtXp"),n=i+""+t+"<\/a>"+r;return n=n.replace(/fXtXp/g,"https:"),n.replace(/\n/g,"")}function w(n){(u=!1,n!==null)&n.d!==null&&b(n.d)}function t(n,t){t>0&&($("#"+n+"count").html(t),$("#"+n).show("slow"),$("#divnomessages").hide())}function b(n){var i="0<\/span> "+i18next.t("Messages.personal")+"<\/a><\/p>0<\/span> "+i18next.t("Messages.broadcast")+"<\/a><\/p>0<\/span> "+i18next.t("Messages.system")+"<\/a><\/p>0<\/span> "+i18next.t("Messages.discussionBoard")+"<\/a><\/p>"+i18next.t("Messages.NoUnreessages")+"<\/p>",r=$("#divUnreessages").html(i);n.UnreadBroadcastMessages+n.UnreadForumMessages+n.UnreadPersonalMessages+n.UnreadSystemMessages>0?(t("divmesspersonal",n.UnreadPersonalMessages),t("divmessbroadcast",n.UnreadBroadcastMessages),t("divmesssystem",n.UnreadSystemMessages),t("divmessforum",n.UnreadForumMessages)):$("#divnomessages").show("slow")}function i(n,t,i){var u,r,v,k,o,y,c,d;f=0;var a=$("#"+n+"_content .messages"),w=$("#"+n+"_content .no_messages"),p=t.length;if($("#messages--"+n+"__count").text(" ("+p+")"),p==0){w.show();a.hide();return}for(a.show(),a.html(""),w.hide(),u=t,r=p-1;r>=0;r--){if(u[r].ID>f)f=u[r].ID;else continue;s++;var e=$("").attr("id","Message"+u[r].ID),b=$("").attr("href","javascript:y$.chat.deleteMessage("+u[r].ID+", "+u[r].MessageType+")"),h=$("").addClass("sprite-common messages-image sprite-common-btnDelete").attr("alt",i18next.t("Messages.DeleteThisMessage")).attr("title",i18next.t("Messages.DeleteThisMessage"));b.append(h);e.append(b);v=$("");k=u[r].Sender;i?(v.attr("href","javascript:y$.chat.showSendMessage('"+k+"')"),h=$("").addClass("sprite-common messages-image sprite-common-reply").attr("alt",i18next.t("Messages.Reply")).attr("title",i18next.t("Messages.Reply")),v.append(h),e.append(v)):(h=$("").addClass("sprite-common messages-image"),e.append(h));o=$("").attr("href","javascript:y$.chat.hideShowMessage('"+u[r].ID+"')").addClass("MessageTitle");y=$("").addClass("MessageTitle");u[r].SenderID>0&y.append(document.createTextNode(u[r].Rank+" "));y.append(document.createTextNode(u[r].Sender+" ("+u[r].Date+")"));o.append(y);o.append($(""));o.attr("SenderID",u[r].SenderID);u[r].SenderID>0&o.addClass("jPlayerInfo").addClass("jPlayerID"+u[r].SenderID);e.append(o);c=$("").addClass("MessageBody").attr("id","MessageBody"+u[r].ID);u[r].Visible?c.show():c.hide();d=u[r].Text;c.html(l(d));e.append(c);a.prepend(e)}}function k(n){var u=n.d,t;r=!1;var f=[],e=[],o=[],s=[],h=parseInt(ID);for(t=0;t~`}function l(n){return n.replace(emoji_regex,g)}const n={};var r=!1,u=!1,s=0,f=0;n.init=function(){var n,t;y$.base.debug&console.log("y$.chat.init");n=$(".controls_chat_ascx");typeof n.resizable!="undefined"&n.resizable({handles:"s",minHeight:120,resize:function(){y$.chat.chatResizing()},stop:function(){y$.chat.chatResized()}});t=$(".controls_chat_ascx .ui-resizable-s");t.addClass("ui-resizable-s-special");t.css("zIndex",0);e()||(document.documentElement.style.setProperty("--display_emoji","unset"),document.documentElement.style.setProperty("--text_emoji","none"));$("#divChat").on("mouseover",".jDeleteableChatMessage",function(){return $("#aDelete"+this.id).show(),!1});$("#divChat").on("mouseout",".jDeleteableChatMessage",function(){return $("#aDelete"+this.id).hide(),!1});$("#BtnClearChatSkript").click(function(){return y$.chat.requestClearChat(),!1});ServiceGetChatMessages(a,null)};n.chatResized=function(){y$.base.debug&console.log("y$.chat.chatResized");ServiceSetWindowSize(1e3,0,$("#divChat").height())};n.chatResizing=function(){y$.base.debug&console.log("y$.chat.chatResizing");var n=$(".controls_chat_ascx");$("#divChat").height(n.height()-68)};n.requestClearChat=function(){y$.base.debug&console.log("y$.chat.requestClearChat");var n=window.confirm(i18next.t("DeleteConfirmation"));n&ServiceClearChat()};n.removeChatMessage=function(n){y$.base.debug&console.log("y$.chat.removeChatMessage");ServiceDeleteChatMessage(n)};n.mute=function(n,t){y$.base.debug&console.log("y$.chat.mute");ServiceMute(n,t)};n.preparePrivateMessage=function(n){var t=document.getElementById("edtChatMsg");t.focus();t.value="/msg ["+n+"] "};n.sendPM=function(n){var t=document.getElementById("edtChatMsg");t&(t.value="/msg ["+n+"] ",t.focus())};n.addMessage=function(n,t,i,r){var k=n,d=i,b=y(n,i),s=b.insertRow(),v=s.insertCell(),w,c,f,a,e,u;v.className="ChatTimeCell";w=new Date(t.Epoch);c=w.toLocaleTimeString();v.appendChild(document.createTextNode(c.substring(0,c.indexOf(":",c.indexOf(":")+1))));f=$(s.insertCell()).addClass("ChatCell");t.Sender!="Yucata"&(a=i!="ChatSkriptTable"?y$.s.formatOnlineSpan(t.Sender,t.SenderID,null,!0,null,null,!0).addClass("jAction"):y$.s.formatOnlineSpan(t.Sender,t.SenderID,null,!0,null,null,!0),t.Sender!=&&i!="ChatSkriptTable"?$("",{href:"#",SenderName:t.Sender,click:function(){y$.chat.preparePrivateMessage($(this).attr("SenderName"))}}).append(a).appendTo(f):a.appendTo(f),f.attr("chatsender",t.Sender));e=$(s.insertCell()).addClass("ChatMessageCell");t.Sender!="Yucata"&i!="ChatSkriptTable"&&typeof h=="function"&&t.ID!=-1&&(s.id="RowChatMessage"+t.ID,h(e[0],t.ID,t.Message,t.Sender));u=t.Message;try{t.Epoch<15098724e5&(u=decodeURI(u))}catch(g){}u=p(u);u=l(u);t.Recipient.toLowerCase()==.toLowerCase()?t.Sender!="Yucata"?(e.addClass("ChatPrivateMessage"),f.addClass("ChatPrivateMessage"),u="[PM] "+u):e.addClass("ChatSystemMessage"):t.Recipient!==""&(u="[--> "+t.Recipient+"<\/em>] "+u);u.search(/\/me\//)!=-1&(u=""+u.replace(/\/me\//g,"")+"<\/em>",f.find(":first-child").remove());e[0].insertAdjacentHTML("beforeend",u);r&o(n)};n.handleReturn=function(t){if(t||(t=window.event),t.keyCode===13)return n.postChatMessage(),!1};n.postChatMessage=function(){var i,n,f;try{if(i=document.getElementById("edtChatMsg"),i.value.length===0)return;n=i.value;n.search(/\/me/)!=-1&(n=n.replace(/(^|\s)\/me/g,"$1/me/"+));var t=n,r="",u=/^\s*\/msg\s*[\[](.*)[\]]\s*(.*)/;u.test(n)&(u.exec(n),t=RegExp.$2,r=RegExp.$1);t=jQuery.trim(t);ServiceSendChatMessage(t,r,null,null);f={Epoch:(new Date).getTime(),Sender:,SenderID:ID,ID:-1,Message:t,Recipient:r};i.value=u.test(n)?"/msg ["+RegExp.$1+"] ":" "}catch(e){console.error("y$.chat.postChatMessage: "+e)}};n.toggleEmojiDisplay=function(){y$.base.debug&console.log("y$.chat.toggleEmojiDisplay");y$.cookie.create("chatHideEmojis",e()?"false":"true",1e3);e()?(document.documentElement.style.setProperty("--display_emoji","none"),document.documentElement.style.setProperty("--text_emoji","unset")):(document.documentElement.style.setProperty("--display_emoji","unset"),document.documentElement.style.setProperty("--text_emoji","none"))};n.showSendMessage=function(n){n?c(BaseUrlWithLang+"SendMessage/"+n.replace(new RegExp("\\.","g"),"__dot__"),"SendMessage",560,460):c(BaseUrlWithLang+"SendMessage","SendMessage",560,460)};n.updateMessages=function(){r||(r=!0,ServiceGetMessages(0,k))};n.updateUnreessages=function(){u||(u=!0,y$.base.initialized.then(()=>{ServiceGetUnreessages(w)}))};n.hideShowMessage=function(n){var t=document.getElementById("MessageBody"+n);t.style.display=t.style.display=="none"?"":"none";ServiceHideMessage(n,null,null)};n.deleteMessage=function(n,t){var i=document.getElementById("Message"+n);i.style.display="none";s--;ServiceDeleteMessage(n,t)};n.increaseUnreessageCount=function(n){var t=parseInt($("#"+n+"count").html());$("#"+n+"count").hide("slow");$("#"+n+"count").html(t+1);$("#"+n).show("slow");$("#"+n+"count").show("slow");$("#divnomessages").hide()};const d=/?\w+$/;y$.chat=n})(this); function IsOnlineID(n){return y$.s.isOnlineID(n)}(function(){"use strict";function w(n){y$.base.debug&console.log("y$.s: Trueskill loaded");c=!0;u={};for(var t=0;t{o.resolve=n,o.reject=t}),f={},u={},h=!1,c=!1,s={},p=new Promise((n,t)=>{s.resolve=n,s.reject=t});n.init=function(){y$.base.debug&console.log("y$.s.init");ServiceGetOnlines(k,null);setInterval(l,1e4)};n.gamelikesLoaded=function(){return h||ServiceGetGameLikes(ID,b),y};n.trueskillLoaded=function(){return c||ServiceGetTrueSkillForPlayer(ID,w),p};n.getTrueSkill=function(n,t){if(n===null)return 0;var i=n-3*t;return i<0?0:Math.floor(i)};n.getPlayerTrueSkillForGameType=function(n){return n in u?y$.s.getTrueSkill(u[n].Mu,u[n].Sigma):0};n.getGameLikeData=function(n){return f!==null&n in f?f[n]:3};n.updateOnlineData=function(u){for(var f=0;fi&(i=u[f].UTCSeconds)};n.updateOnlineCounts=function(n,t){r=n;e=t;a()};n.isOnlineID=function(n){return n in t};n.isIdle=function(r){return n.isOnlineID(r)?i-t[r].UTCSeconds>1200:!1};n.removeOnlineData=function(i){i.forEach(function(i){i in t&(n.isIdle(i)?--e:--r,delete t[i])})};n.formatOnlinePlayerChat=function(t,i,r,u,f,e,o,s,h){return n.formatOnlinePlayer(t,i,r,u,f,e,o,s,h,!0)};n.formatOnlinePlayer=function(t,i,r,u,f,e,o,s,h,c){var l=$("",{"class":"jOnline"}),a,p,y;return e&(a=new Date,a.setHours(0,0,0,0),e=v(o).valueOf()<=a.valueOf()+6048e5&&a.valueOf()<=v(s).valueOf()),e&&(p=i18next.t("Onlines.AbsentFrom")+" "+o+" "+i18next.t("Onlines.AbsentTo")+" "+s+". "+h,y="netimages/c/holidays.png",n.isOnlineID(i)&&(y="netimages/c/holidaysgreen.png"),l.append($("").append($("",{"class":"onVacation",src:BaseUrl+y,alt:"away",title:p}))),f=!1),l.append(n.formatOnlineSpan(t,i,r,u,f,e,c,l)),l};n.formatOnlineSpan=function(r,u,f,e,o,s,h,c){var l=$("",{"class":"jPlayerInfo jPlayerID"+u}),v,y,k,d,p,w,b;if(h||typeof ID=="undefined"||u!=ID){if(f!=null?l.append(document.createTextNode(f+" "+r)):l.append(document.createTextNode(r)),e!==!0&c!==undefined){if(y="jOnlineImage"+(o===!0?" jKeepSpace":""),n.isOnlineID(u)){if(k=i,l.addClass("online"),d=s?"netimages/c/spacer.gif":n.isIdle(u)?"netimages/c/online_idle.png":"netimages/c/online.png",p="Letzter Klick: ",Lang=="1"&&(p="Last click : "),w=t[u],b="",w!=null){var g=k-w.UTCSeconds,nt=Math.floor(g/60),a=Math.floor(g%60);a<10&(a="0"+a);b=p+nt+":"+a}v=$("",{"class":y+(s?"":" online"),src:BaseUrl+d,alt:"online",title:b})}else v=$("",{"class":y,src:BaseUrl+"netimages/c/spacer.gif",alt:"offline",title:"Offline"});c.append(v)}}else l.append($("",{style:"width: 13px;","class":"jPlayerInfo jPlayerID"+ID,src:"/netimages/c/poeppel_onturn.png"}));return l};n.renderFavoriteOpponents=function(n){$("#tblFavoriteOpponents").html('<\/table>');$("#tblFavoriteOpponentsTable").DataTable({searching:!1,paging:!0,pagingType:"full_numbers",info:!0,language:y$.base.getDataTablesTranslation(i18next.t("Ranking.NoGamesFinished")),ordering:!1,autoWidth:!1,dom:'<"top"fl>rt<"bottom"ip><"clear">',lengthMenu:[[10,25,50,100,-1],[10,25,50,100,i18next.t("All")]],stateDuration:0,stateSave:!0,stateSaveCallback:function(n,t){localStorage.setItem("DataTables_PlayerInfo_Opponents",JSON.stringify(t))},stateLoadCallback:function(){var n=JSON.parse(localStorage.getItem("DataTables_PlayerInfo_Opponents"));return n&(n.start=0),n},processing:!0,serverSide:!0,ajax:BaseUrl+"data.jqdt?dataSource=Opponents&ID="+n,drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#tblFavoriteOpponents .dataTables_paginate").hide(),$("#tblFavoriteOpponents .dataTables_info").hide(),$("#tblFavoriteOpponents .dataTables_length").hide()):($("#tblFavoriteOpponents .dataTables_paginate").show(),$("#tblFavoriteOpponents .dataTables_info").show(),$("#tblFavoriteOpponents .dataTables_length").show())},columns:[{title:i18next.t("Ranking.Player"),width:"100px",data:"",render:function(n,t,i){var r=$("");return y$.s.formatOnlinePlayer(n,i.PID,null).appendTo(r),r.html()}},{title:""+i18next.t("Ranking.NumberOfGames")+"<\/span>",width:"50px",data:"GameCount",render:function(n,t){return t==="display"?''+n+"<\/span>":n}}]})};y$.s=n})(this); (function(n){n.y$=n.y$||{};n.y$.s=n.y$.s||{};n.y$.s.settings=function(){function i(n,i){for(var r=n.split("."),u=t,f=0;f0;)if(i=f.pop(),i.parent[i.key]&Object.keys(i.parent[i.key]).length===0)delete i.parent[i.key];else break}function u(n){for(var u=n.split("."),i=t,r=0;r"+i18next.t("Buddies.YouHaveNoBuddiesDefined")+"<\/p>");try{document.dispatchEvent(r)}catch(p){}return}e.empty();a=$("",{id:"buddylist-filter-div"}).appendTo(e);a.html(''+i18next.t("Buddies.ActiveOnly")).addClass("buddylist-filter");$("#buddy-list-filter-activeonly").on("click",function(){y$.buddies.saveBuddyListDisplayOptions();$("#buddy-list-filter-activeonly").prop("checked")?$("#BuddyList").addClass("activeonly"):$("#BuddyList").removeClass("activeonly")});for(t=[],t.__all__={name:i18next.t("Buddies.All"),buddyList:[]},u=0;u0){c=f[u].Tags.split(/\s+/);for(v in c)h=c[v],typeof t[h]=="undefined"&(t[h]={name:h,buddyList:[]}),t[h].buddyList.push(f[u])}l={__all__:t.__all__};Object.keys(t).sort(function(n,t){return n.toString().localeCompare(t.toString())}).forEach(function(n){n!="__all__"&(l[n]=t[n])});t=l;s()||(n=["__all__"]);for(u in t)y=t[u],o(u,e,y);try{document.dispatchEvent(r)}catch(p){}$(".buddy-tag-header").on("click",function(t){var i=$(t.currentTarget);i.toggleClass("expanded collapsed");n=[];$(".buddy-tag-header.expanded").each(function(t,i){n.push($(i).data("buddy-tag-group-id"))});y$.buddies.saveBuddyListDisplayOptions()})}}function o(t,i,r){var e=$("",{id:"buddy-tag-group-"+t}).addClass("buddy-tag-group").appendTo(i),h=$("",{id:"buddy-tag-header-"+t}).data("buddy-tag-group-id",t).addClass("buddy-tag-header "+($.inArray(t,n)>=0?"expanded":"collapsed")).appendTo(e),o,s,u,f;h.text(r.name);o=$("",{id:"buddy-tag--list-"+t}).addClass("buddy-tag--list").appendTo(e);for(s in r.buddyList)u=r.buddyList[s],f="buddy-tag--"+t+"-"+u.Id,o.append($("",{id:f}).addClass("buddy-tag-")),y$.s.formatOnlinePlayerChat(u.,u.Id,null,!1,!0,u.IsOnVacation,u.VacationStart,u.VacationEnd,u.VacationReason).appendTo($("#"+f)),t=="__online__"&(u.IsOnline?$("#"+f).removeClass("offline"):$("#"+f).addClass("offline"));$("#buddy-list-filter-activeonly").prop("checked")?$("#BuddyList").addClass("activeonly"):$("#BuddyList").removeClass("activeonly")}function s(){try{var t=JSON.parse(y$.cookie.read("buddy-list-display-options"));return n=t.buddyListDisplayState,$("#buddy-list-filter-activeonly").prop("checked",t.buddyListFilterActiveonly),!0}catch(i){n=[]}return!1}var i,n,r;const t={};i=null;n=null;t.init=function(){y$.base.debug&console.log("y$.buddies.init");u()};t.saveBuddyListDisplayOptions=function(){var t=$("#buddy-list-filter-activeonly").prop("checked");y$.cookie.create("buddy-list-display-options",JSON.stringify({buddyListDisplayState:n,buddyListFilterActiveonly:t}),1e3)};t.addToBuddyList=function(n){y$.base.debug&console.log("y$.buddies: Adding "+n);ServiceAddBuddy(n,u,null)};t.removeFromBuddyList=function(n){y$.base.debug&console.log("y$.buddies: Removing "+n);ServiceRemoveBuddy(n,u,null)};t.isBuddy=function(n){if(i===null)return!1;for(var t=0;t "+i18next.t("PlayerInfo.TotalNumberOfScoredGamesPlayed")+c+"\n",r+=" "+i18next.t("PlayerInfo.NumberoOfDifferentScoredGamesPlayed")+l+" / "+numberOfReleasedGames+"\n",r+=" "+i18next.t("PlayerInfo.CurrentlyOpenGames")+OpenGames+"\n",r+=" "+i18next.t("PlayerInfo.HIndex")+": ",u=0,n.playedGames.length>0){for(e=[],i=0;i=u+1;u++);}r+=u+" ";r+="";r+="\n";a=$("").html(r);s.append(a);f=$("").html('<\/table>');s.append(f);h=[];n.playedGames.forEach(function(n){n[0]!=="n/a"&n[0]!=="Transfer"&&h.push([n[0],n[1]+n[2]+n[3],n[1],n[2],n[3],n[4]])});f=$("#PlayerChart__table").DataTable({columns:[{title:i18next.t("InvitationGamesList.Game"),width:"35%",render:function(n,t,i){return t==="display"&aWithdrawnGames.indexOf(n)!==-1?''+n+"<\/span>":''+n+"<\/span>"}},{title:i18next.t("Ranking.Total"),width:"53%",orderSequence:["desc","asc"],render:function(n,t,i){var u=Math.round(340*n/o),f=Math.round(u*i[2]/n),e=Math.round(u*i[3]/n),s=Math.round(u*i[4]/n),r=''+n+"<\/span> ";return r+="",r+="",r+='',r+='<\/td>',r+='',r+="<\/td>",r+='',r+="<\/td>",r+='',r+="<\/td>",r+='<\/td>',r+="<\/tr>",r+="<\/tbody>",r+="<\/table>",t==="display"?r:n}},{title:i18next.t("Ranking.Won"),width:"4%",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:i18next.t("Ranking.Tie"),width:"4%",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:i18next.t("Ranking.Lost"),width:"4%",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}}],data:h,paging:!0,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,i18next.t("All")]],searching:!1,ordering:!0,info:!0,stateSave:!0,stateDuration:0,stateSaveCallback:function(n,t){localStorage.setItem("DataTables_PlayerInfo_PlayerChart",JSON.stringify(t))},stateLoadCallback:function(){var n=JSON.parse(localStorage.getItem("DataTables_PlayerInfo_PlayerChart"));return n&(n.start=0),n},language:y$.base.getDataTablesTranslation(),retrieve:!0,drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#PlayerChart .dataTables_paginate").hide(),$("#PlayerChart .dataTables_length").hide(),$("#PlayerChart .dataTables_info").hide()):($("#PlayerChart .dataTables_paginate").show(),$("#PlayerChart .dataTables_info").show(),$("#PlayerChart .dataTables_length").show())},autoWidth:!1}).on("order",function(){var n=f.order(),t;n[0][0]===1&n[0][1]==="desc"?$("#PlayerChart__table").addClass("is_ordered_by_column_total--descending"):$("#PlayerChart__table").removeClass("is_ordered_by_column_total--descending");$(".is_1st_row_with_total_below_Hindex").removeClass("is_1st_row_with_total_below_Hindex");t=f.row((n,t)=>t[1]"+n[0]+"<\/b>";t+=i18next.t("Ranking.Won")+": "+i+"%";t+=i18next.t("Ranking.Tie")+": "+r+"%";t+=i18next.t("Ranking.Lost")+": "+u+"%";overlib(t,FOLLOWMOUSE,MOUSEOFF,NOCLOSE,OFFSETX,20,OFFSETY,0,HAUTO,VAUTO,DELAY,200,TIMEOUT,5e3)};n.showHindexHelp=function(){overlib(""+i18next.t("Ranking.HIndexHelp")+"<\/div>",WIDTH,400,DELAY,200)};n.hideHindexHelp=function(){return nd(0)};y$.stats=n})(this); (function(){"use strict";function a(){var n=$(""+i18next.t("CurrentGames.OnlineFilter.0")+"<\/option>"+i18next.t("CurrentGames.OnlineFilter.1")+"<\/option>"+i18next.t("CurrentGames.OnlineFilter.3")+"<\/option>"+i18next.t("CurrentGames.OnlineFilter.2")+"<\/option><\/select>");$("#LiveGamesFilter").append(`${i18next.t("CurrentGames.CurrentGamesFilterLabel")}`);$("#LiveGamesFilter").append(n)}function v(){$.fn.dataTable.ext.search.push(y$.games.currentGamesTableCustomFilter);$("#LiveGames").html('<\/table>');r=$("#LiveGamesTable").DataTable({stateSaveParams:function(n,t){t.yFilterValues=[];t.Filter=$("#ddlCurrentGamesFilter").val()},stateLoaded:function(n,t){t.Filter!==undefined&$("#ddlCurrentGamesFilter").val(t.Filter)},data:n,language:y$.base.getDataTablesTranslation(undefined,i18next.t("InvitationGamesList.GameName")),ordering:!0,searching:!0,paging:!0,lengthMenu:[[3,5,10,25,50,100,-1],[3,5,10,25,50,100,i18next.t("All")]],info:!0,autoWidth:!1,stateSave:!0,stateDuration:0,dom:'<"top"l>rt<"bottom"ip><"clear">',deferRender:!0,order:[[1,"asc"]],createdRow:function(n,t){t.ID==i&&$(n).addClass("currentGameOnTurn")},drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<3?($("#LiveGames .dataTables_paginate").hide(),$("#LiveGames .dataTables_length").hide(),$("#LiveGames .dataTables_info").hide()):($("#LiveGames .dataTables_paginate").show(),$("#LiveGames .dataTables_info").show(),$("#LiveGames .dataTables_length").show())},columns:[{title:"ID",orderable:!0,searchable:!1,width:"40px",data:"ID",render:function(n,t){return t==="sort"||t==="filter"?n:""+n+"<\/a>"}},{title:i18next.t("InvitationGamesList.GameName"),width:"30%",orderSequence:["asc","desc"],data:"GameShortName",type:"string",render:function(n,t,i){if(t==="sort"||t==="filter")return n;var r=i.IsOnTurn?"":"notOnTurn";return''+n+"<\/span>"}},{title:i18next.t("Invitation.Opponents"),name:"opponents",orderable:!0,width:"45%",sorting:["asc","desc"],data:"Players",type:"string",searchable:!1,render:function(n,t,i){var e,f,r,o,s,u;if(t==="sort"||t==="filter"){for(e="",r=0;r"),o=!0,r=0;r").appendTo(f),n[r].PlayerID==ID?u.append($("").attr("src",ImagePath+s).css("width","13px").css("height","13px")).addClass("jPlayerInfo jPlayerID"+n[r].PlayerID):((n[r].PlayerID==i.PlayerOnTurn||n[r].Since!=null)&u.addClass("playerOnTurn"),y$.s.formatOnlinePlayer(n[r].,n[r].PlayerID,null,!1,!1,n[r].IsOnVacation,n[r].VacationStart,n[r].VacationEnd,n[r].VacationReason).appendTo(u),u.css("white-space","nowrap"));return f.html()}},{title:"",width:"10px",orderSequence:["asc","desc"],data:"NumPlayers",orderable:!1,searchable:!1,render:function(n,i){return i==="display"?t.getPlayersImageHtml(n,!1):n}},{title:"",width:"10px",orderSequence:["asc","desc"],data:"IsRanking",orderable:!1,searchable:!1,render:function(n,t){return t==="display"?n?"":y$.games.getGameTypeImageHtml(n):n}},{title:"",width:"10px",orderable:!1,data:"HasReturn",searchable:!1,render:function(n,i,r){return i==="display"?!n&!r.isReturn?"":t.getReturnMatchImageHtml(n,r.isReturn):n}},{title:"",width:"10px",orderable:!0,data:"LastMoveOn",searchable:!1,render:function(n,t,i){var r,u;return t==="display"?(r=$(""),r.addClass("sprite-clock"),n?r.attr("title",i18next.t("CurrentGames.LastTurnTaken")+jQuery.timeago(n)):r.attr("title",i18next.t("CurrentGames.NoTurnTaken")+jQuery.timeago(i.StartedOn)),u=$("").append(r),u.html()):n}},{title:"",width:"10px",orderable:!1,data:"IsTournament",searchable:!1,render:function(n,t){var i,r;return t==="display"?n?(i=$("").addClass("sprite-common currentgame-image sprite-common-tunier"),i.attr("title",i18next.t("Invitation.TournamentGame")),r=$("").append(i),r.html()):"":n}}]});$("#ddlCurrentGamesFilter").bind("change",function(){r.draw()})}function y(n){h=n.d;p()}function p(){function n(n,t){var i=prompt("Please provide a reason text for the players:");i!==null&$.ajax({type:"POST",url:BaseUrl+n,data:JSON.stringify({gameId:t,text:i}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){alert(n.d);y$.games.loadQuarantinedGames()},error:function(n,t,i){alert("Error when calling the service: "+i)}})}$("#QuarantinedGames").html('<\/table>');r=$("#LiveGamesTable").DataTable({data:h,language:y$.base.getDataTablesTranslation(undefined,"InvitationGamesList.GameName"),ordering:!0,searching:!0,paging:!1,info:!0,autoWidth:!1,stateSave:!0,stateDuration:0,dom:'<"top"lp>rt<"bottom"ip><"clear">',deferRender:!0,order:[[1,"asc"]],createdRow:function(n,t){t.ID==i&$(n).addClass("currentGameOnTurn")},drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#QuarantinedGames .dataTables_paginate").hide(),$("#QuarantinedGames .dataTables_length").hide(),$("#QuarantinedGames .dataTables_info").hide()):($("#QuarantinedGames .dataTables_paginate").show(),$("#QuarantinedGames .dataTables_info").show(),$("#QuarantinedGames .dataTables_length").show())},columns:[{title:"ID",orderable:!0,searchable:!1,data:"ID",render:function(n,t){return t==="sort"||t==="filter"?n:""+n+"<\/a>"}},{title:i18next.t("InvitationGamesList.GameName"),orderSequence:["desc","asc"],data:"GameShortName",type:"string",render:function(n,t,i){return t==="sort"||t==="filter"?n:''+n+"<\/span>"}},{title:i18next.t("Invitation.Opponents"),name:"opponents",orderable:!0,sorting:["asc","desc"],data:"Players",type:"string",searchable:!1,render:function(n,t){if(t==="sort"||t==="filter")return n[0].;for(var r=$(""),u=!0,i=0;iDequarantine<\/button>Delete<\/button>'}}]});$("#LiveGamesTable tbody").on("click",".dequarantine-btn",function(){var t=$(this).data("gameid");console.log(t);n("Services/Service.svc/DequarantineGame",t)});$("#LiveGamesTable tbody").on("click",".cancelgame-btn",function(){var t=$(this).data("gameid");console.log(t);n("Services/Service.svc/CancelGame",t)})}function w(t){n=t.d.Games;i=e();a();v();var r=$("#StartGame");$("").appendTo(r).addClass("button").attr("value",i18next.t("CurrentGames.ShowGame")).bind("click",{gameID:-1},y$.games.showGame);$("#StartInOwnWindow").prop("checked",y$.cookie.read("open-gameWindow-in-own-window")!="false").change(function(){y$.cookie.create("open-gameWindow-in-own-window",this.checked,9999)});$("#StartGameButton").attr("disabled",i==-1)}function e(){var t=n.filter(function(n){return n.IsOnTurn}),f,r,u,i,e;if(t.length==0)return-1;if(t.some(function(n){return n.LastMoveBy==ID}))return f=find(ID,t,function(n,t){return n.LastMoveBy==t}),t[f].ID;for(r=t[0].ID,u=t[0].Since,i=1,e=t.length;i"),f=!0,e=n.length,u,i,t=0;t"),i=n[t].,i==null&(i=i18next.t("Ranking.formerPlayer")),y$.s.formatOnlinePlayer(i,n[t].PID,null).appendTo(u),f=!1,r.append(u);return $("").append(r)}$(".controls_recentlyfinishedgames_ascx").slideDown(400);$("#divRecentlyFinishedGames").html('<\/table>');s=$("#divRecentlyFinishedGamesTable").DataTable({searching:!1,pagingType:"full_numbers",info:!1,language:y$.base.getDataTablesTranslation(),ordering:!1,autoWidth:!1,stateSave:!0,stateDuration:0,dom:'<"top"fl>rt<"bottom"ip><"clear">',pageLength:10,lengthMenu:[[10,-1],[10,i18next.t("All")]],data:u,drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#divRecentlyFinishedGames .dataTables_paginate").hide(),$("#divRecentlyFinishedGames .dataTables_length").hide(),$("#divRecentlyFinishedGames .dataTables_info").hide()):($("#divRecentlyFinishedGames .dataTables_paginate").show(),$("#divRecentlyFinishedGames .dataTables_info").show(),$("#divRecentlyFinishedGames .dataTables_length").show())},columns:[{title:"",orderable:!1,width:"10px",data:function(){return y$.games.getRecentlyFinishedGamesExpandHtml("divRecentlyFinishedGamesTable")}},{title:i18next.t("Ranking.FinishedOn"),width:"80px",data:"FinishedOnString"},{title:"ID",data:"GameId",render:function(n,t,i){return""+n+"<\/a>"}},{title:i18next.t("Ranking.Game"),width:"39%",data:"CustomGameName",render:function(n,t,i){return''+i.CustomGameName+"<\/span>"}},{title:i18next.t("Ranking.Result"),data:"Result",render:function(n,t,i){return i.Opponents.length==1?`${i18next.t("Ranking.SoloGame")}`:n==0?`${i18next.t("Ranking.ResultTypes."+n)}`:n==1?`${i18next.t("Ranking.ResultTypes."+n)}`:n==2?`${i18next.t("Ranking.ResultTypes."+n)}`:""}},{title:i18next.t("Ranking.Players"),width:"26%",data:"Opponents",render:function(t){return n(t).html()}}]})}function b(n){(u=k(n.d),n.d.Games.length!==0)&c()}function k(n){for(var i,t=0;t"}function g(n){function p(n){for(var i=!1,t=0;t',u,o,a,f,e;for(i+="",i+='',n.d.GameInfo.BaseData.HasCoverImage?i+='<\/div>':n.d.GameInfo.BaseData.HasScreenShotImage&(i+='<\/div>'),i+="",i+=t.getPlayersImageHtml(n.d.Game.NumPlayers,!0),i+=t.getGameTypeImageHtml(!n.d.Game.isTraining),i+=t.getReturnMatchImageHtml(n.d.Game.hasRevanche,n.d.Game.isRevanche),i+="<\/div>",n.d.Game.TotalMoves!=null&&(i+="",i+=i18next.t("Ranking.NumMoves",{moves:n.d.Game.TotalMoves}),i+="<\/div>"),n.d.Game.AverageMoveTimeSeconds!=null&&(i+="",i+=i18next.t("Ranking.TimePerMove",{time:it(n.d.Game.AverageMoveTimeSeconds)}),i+="<\/div>"),i+="<\/td>",i+='',n.d.Game.ExternalId&&(i+="",i+=n.d.Game.ExternalId,i+="<\/div>"),u=-1,r=0;r",i+=sSolo,i+="<\/div>";else{i+="";switch(n.d.GamePlayers[u].BaseData.RankingResult){case 0:i+=i18next.t("Ranking.YouLostTheGame");break;case 1:i+=i18next.t("Ranking.YouTiedTheGame");break;case 2:i+=i18next.t("Ranking.YouWonTheGame")}i+="<\/div>"}var h=-1,c=0,s="";for(r=0;r0&(s+=", "),s+=n.d.GamePlayers[r].BaseData.,c++);if(h!=-1&(i+="",i+=c===1?h==u?i18next.t("Ranking.YouGaveUpTheGame"):s+i18next.t("Ranking.SomeoneGaveUpTheGame"):s+i18next.t("Ranking.SeveralGaveUpTheGame"),i+="<\/div>"),n.d.GamePlayers.length==1)i+="",n.d.GamePlayers[0].GameResultDescription!=""?i+=n.d.GamePlayers[0].GameResultDescription:n.d.GamePlayers[0].BaseData.ResultLevel1!=null&&(i+=n.d.GamePlayers[0].BaseData.ResultLevel1+" "+i18next.t("Ranking.WinPoints")),i+="<\/div>";else if(n.d.GamePlayers[0].BaseData.FinalPosition==1){for(i+="",a=p(n.d.GamePlayers),r=0;r",i+="",i+=n.d.GamePlayers[r].BaseData.FinalPosition+tt(n.d.GamePlayers[r].BaseData.FinalPosition),i+="<\/div>",i+=n.d.GamePlayers[r].BaseData.==null?i18next.t("Ranking.formerPlayer"):y$.s.formatOnlinePlayerChat(n.d.GamePlayers[r].BaseData.,n.d.GamePlayers[r].BaseData.PID,n.d.GamePlayers[r].RankName,!1,!1,n.d.GamePlayers[r].BaseData.IsOnVacation,n.d.GamePlayers[r].BaseData.VacationStart,n.d.GamePlayers[r].BaseData.VacationEnd,n.d.GamePlayers[r].BaseData.VacationReason).html(),n.d.GamePlayers[r].GameResultDescription!=""?(i+="",i+=n.d.GamePlayers[r].GameResultDescription,i+="<\/div>"):n.d.GamePlayers[r].BaseData.ResultLevel1!=null&(i+="",i+=n.d.GamePlayers[r].BaseData.ResultLevel1+" "+i18next.t("Ranking.WinPoints"),i+="<\/div>"),a){i+="";o?(i+="",i+="",i+="<\/a> Trueskill "):i+="TrueSkill ";var v=Math.max(0,Math.floor(n.d.GamePlayers[r].BaseData.NewRating)),b=Math.max(0,Math.floor(n.d.GamePlayers[r].BaseData.OldRating)),k=Math.floor(n.d.GamePlayers[r].BaseData.NewMu*10+.5)/10,d=Math.floor(n.d.GamePlayers[r].BaseData.NewSigma*10+.5)/10,y=v-b;y>=0&(i+="+");i+=y;i+=" (→ TS="+v+" μ="+k+" σ="+d+")";o?i+="<\/span>":(i+=", ",n.d.GamePlayers[r].BaseData.MetaGamePointsChange>=0&(i+="+"),i+=n.d.GamePlayers[r].BaseData.MetaGamePointsChange+" "+i18next.t("Ranking.RankingPoints"));i+="<\/div>"}i+="<\/div>";n.d.GamePlayers[r].BaseData.PromotionType==null||o||(i+="",i+=n.d.GamePlayers[r].NewRankName=="Hermit"||n.d.GamePlayers[r].NewRankName=="Eremit"?i18next.t("Ranking.HermitRank"):n.d.GamePlayers[r].BaseData.PromotionType==1?i18next.t("Ranking.GainedARank"):i18next.t("Ranking.LostARank"),i+=n.d.GamePlayers[r].NewRankName,i+=".<\/div>")}for(i+="",f=-1,r=0;r";i+="<\/div>"}u!=-1&(i+="",i+=i18next.t("Ranking.CurrentGameLike")+" "+nt(n.d.CurrentPlayerGameLike,n.d.Game.GameType),i+="<\/div>");u==-1||n.d.Game.hasRevanche||(i+="",i+='',i+="<\/div>");i+="<\/td>";i+="<\/tr>";i+="<\/table>";w.html(i)}function nt(n,t){for(var u,r=$(''),i=0;i",{value:i,text:i18next.t("GameLikeValues."+i),selected:!0}).appendTo(r):$("",{value:i,text:i18next.t("GameLikeValues."+i)}).appendTo(r);return u=$(""),u.append(r),u.html()}function tt(n){if(Lang==0)return".";switch(n){case 1:return"st<\/sup>";case 2:return"nd<\/sup>";case 3:return"rd<\/sup>";default:return"th<\/sup>"}}function it(n){var t,i,r;return n<99?n+"s":(t=Math.round(n/60,0),t<100)?t+"m":(i=Math.round(n/3600,0),i<100)?i+"h":(r=Math.round(n/86400,0),r+"d")}function rt(n){if(n!==null){var t=$(window).scrollTop();vt(n.d);window.scrollTo(0,t)}}function ut(){var h=i18next.t("InvitationGamesList.ShowGamesWithMyRating"),c=i18next.t("InvitationGamesList.NumberOfPlayers"),l=i18next.t("All"),f=$(""),e=$("").css("padding","5px"),s,n,i,t,r,o,u;for(e.append(h),f.append(e),s=[!1,!1,!0,!0,!0,!0,!0],t=0;t").css("padding-left","10px"),n.append(i18next.t("GameLikeValues."+t)),e.append(n),i=s[t]?$(""):$(""),e.append(i);for(f.append($("")),r=$(""),r.append($("").css("padding","5px").append(c)),o=$(""),o.append($("",{value:0,text:l})),u=1;u<=6;u++)o.append($("",{value:u,text:u}));return r.append(o),n=$("").css("padding-left","10px"),n.append(i18next.t("InvitationGamesList.NotWonSinceLastPromotion")),i=$(""),n.append(i),r.append(n),n=$("").css("padding-left","10px"),n.append(i18next.t("InvitationGamesList.OnlyNewFramework")),i=$(""),n.append(i),r.append(n),f.append(r),f}function ft(n,t,i){var f=new $.fn.dataTable.Api(n),r,u;return f.table().node()!==document.getElementById("GamesListTable")?!0:(r=f.row(i).data(),!$("#cbShowLikeLevel"+r.LikeLevel).prop("checked"))?!1:$("#cbShowWonGames").prop("checked")&r.IsWon?!1:$("#cbFW2").prop("checked")&&!r.IsFramework2?!1:(u=parseInt($("#numPlayers").val()),u===0)?!0:r.edPlayerCounts.indexOf(u)>=0}function et(n){var t="";return n.FirstName!==null&(t+=n.FirstName),n.LastName!==null&&(t.length>0&&(t+=" "),t+=n.LastName),n.Yucata!==null&&(t.length>0&&(t+=" "),t+='('+n.Yucata+"<\/a>)"),t}function o(n){var i,t;if(n==="")return"";for(i="",t=0;t0&(i+=","),i+=et(n[t]);return i}function ot(n){var i,t;if(n==="")return"";for(i="",t=0;t0&(i+=","),i+=n[t].FullName;return i}function st(){return $("",{title:i18next.t("InvitationGamesList.ShowDetails"),"class":"ui-icon ui-icon-circle-triangle-s"}).prop("outerHTML")}function ht(n){var r="",i=n[0],u=i,t;for(n.push(1e3),t=1;t0?u+"-"+i:u,u=n[t]),i=n[t];return n.pop(),r+" "+i18next.t("InvitationGamesList.Players")}function ct(n){var t=window.location.href;return t.replace("CreateGame","/"+n.replace(new RegExp("\\.","g"),"__dot__"))}function l(n){var t=window.location.href;return t.replace("CreateGame","Invite/"+n)+"?numplayers="+$("#numPlayers").val()}function lt(n){var t='';return t+="",n.CoverImagePath!==null&(t+='<\/div>'),t+="<\/td>",t+='',t+='',t+=ht(n.edPlayerCounts),n.MinPlayingTime!==null&&n.MinPlayingTime!==0&&(t+=", "+n.MinPlayingTime,n.MaxPlayingTime!==null&&n.MaxPlayingTime>n.MinPlayingTime&&(t+="-"+n.MaxPlayingTime),t+=" "+i18next.t("InvitationGamesList.Minutes")),n.MinAge!==null&&n.MinAge>0&&(t+=", "+i18next.t("InvitationGamesList.MinimumAge",{minAge:n.MinAge})),t+="<\/td><\/tr>",n.Authors!==null&&n.Authors.length>0&&(t+=''+i18next.t("InvitationGamesList.Author")+'<\/td>'+o(n.Authors)+"<\/td><\/tr>"),n.Illustrators!==null&&n.Illustrators.length>0&&(t+=''+i18next.t("InvitationGamesList.Illustrator")+'<\/td>'+o(n.Illustrators)+"<\/td><\/tr>"),n.Publishers!==null&&n.Publishers.length>0&&(t+=''+i18next.t("InvitationGamesList.PublishedBy")+'<\/td>'+ot(n.Publishers)+"<\/td><\/tr>"),n.Developers!==null&&n.Developers.length>0&&(t+=''+i18next.t("InvitationGamesList.DevelopedBy")+'<\/td>'+o(n.Developers)+"<\/td><\/tr>"),n.PreviousDevelopers!==null&&n.PreviousDevelopers.length>0&&(t+=''+i18next.t("InvitationGamesList.PreviouslyDevelopedBy")+'<\/td>'+o(n.PreviousDevelopers)+"<\/td><\/tr>"),t+="<\/tbody><\/table><\/td>",t+=''+i18next.t("InvitationGamesList.CreateInvitation")+"<\/a><\/li><\/ul><\/td>",t+"<\/tr><\/tbody><\/table>"}function at(n){var t=n.target,u=$("#GamesListTable").DataTable(),r=u.row(u.cell(t.parentNode).index().row),f=r.data(),i=t.parentNode.parentNode;$(t).hasClass("ui-icon-circle-triangle-n")?($(t).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s"),r.child().hide()):($(t).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n"),r.child(lt(f),i.className).show(),$(i).next().addClass(i.className),$(i).next().addClass("DetailRow"))}function vt(n){var t;$.fn.dataTable.ext.search.push(ft);var i=i18next.t("InvitationGamesList.GameName"),r=i18next.t("InvitationGamesList.Rating"),u=i18next.t("InvitationGamesList.Played"),f=i18next.t("InvitationGamesList.Author"),e=i18next.t("InvitationGamesList.OnlineSince"),s=i18next.t("Trueskill"),h=i18next.t("All"),c=ut().html();$("#GamesList").html(c+'<\/table>');t=$("#GamesListTable").DataTable({stateSaveParams:function(n,t){delete t.search;t.yFilterValues=[];for(var i=0;i<7;i++)t.yFilterValues.push($("#cbShowLikeLevel"+i).prop("checked"));t.numPlayers=$("#numPlayers").val();t.ShowWonGames=$("#cbShowWonGames").prop("checked");t.ShowFW2Only=$("#cbFW2").prop("checked")},stateLoaded:function(n,t){if(t.yFilterValues!==undefined)for(var i=0;irt<"bottom"ip><"clear">',pageLength:25,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,h]],order:[[1,"asc"]],drawCallback:function(){var n=this.api().rows({filter:"applied"}).data().length;n<10?($("#GamesList .dataTables_paginate").hide(),$("#GamesList .dataTables_length").hide(),$("#GamesList .dataTables_info").hide()):($("#GamesList .dataTables_paginate").show(),$("#GamesList .dataTables_info").show(),$("#GamesList .dataTables_length").show())},columns:[{title:"",orderable:!1,searchable:!1,width:"10px",data:function(){return st()}},{title:i,orderSequence:["asc","desc"],data:"GameName",type:"string",render:function(n,t,i){return t==="display"?(i.DevStatus===3?n+="BETA<\/span>":i.DevStatus===1?n+="DEV<\/span>":i.DevStatus===2&(n+="TEST<\/span>"),''+n+"<\/a>"):n}},{title:r,orderSequence:["desc","asc"],data:"LikeLevel",type:"string",width:"80px",className:"gameListLikeLevel",render:function(n,t,i,r){var f,u,e;if(t=="sort")return n;for(f='',u=0;u<7;++u)e=u==n?"selected":"",f+='"+i18next.t("GameLikeValues."+u)+"<\/option>";return f+"<\/select>"}},{title:s,orderSequence:["desc","asc"],data:"Trueskill",className:"gameListNumber",searchable:!1,width:"60px",render:function(n){return n<0?0:Math.floor(n)}},{title:u,orderSequence:["desc","asc"],data:"NumPlayed",width:"62px",className:"gameListNumber",searchable:!1},{title:f,orderSequence:["asc","desc"],data:"Authors",width:"185px",searchable:!1,render:function(n){return o(n)}},{title:e,orderSequence:["asc","desc"],data:"PublishDateMillis",width:"80px",className:"gameListDate",searchable:!1,render:function(n,t){return t!=="display"?n:new Date(n).toLocaleDateString()}}]});$("#GamesListTable").on("click",".ui-icon",at);$("#GamesListTable").on("change",".gameListLikeLevelSelect",function(n){var i;ServiceSetGameLike($(n.currentTarget).attr("data-gametypeid"),this.value);var r=$(this).closest("tr"),t=$("#GamesListTable").DataTable(),u=t.cell(r,2);u.data(this.value);i=t.order();i[0][0]==2&(t.order([1,"asc"]),t.draw(),t.order(i[0]),t.draw())});$("input[name='filterboxes']").bind("change",function(){t.draw()});$("select[name='playerCount']").bind("change",function(){t.rows().invalidate();t.draw()})}var h;const t={};var u=null,s=null,f=[],n,i=-1,r;t.loadRecentlyFinishedGames=function(){ServiceGetRecentlyFinishedGames(ID,b)};t.loadCurrentGames=function(){ServiceGetLiveGames(w)};t.loadQuarantinedGames=function(){ServiceGetQuarantinedGames(y)};t.updateInvitationGamesList=function(){ServiceGetGamesList(rt)};t.refresh=function(){typeof r!="undefined"&r.draw()};t.getRecentlyFinishedGamesExpandHtml=function(n){var t="y$.games.getRecentlyFinishedGamesDetails(this,'"+n+"');";return'<\/a>'};t.getRecentlyFinishedGamesDetails=function(n,t){var s=$("#"+t).DataTable(),u=s.row(s.cell(n.parentNode).index().row),i=u.data(),r=n.parentNode.parentNode,e=n.children[0],o;$(e).hasClass("ui-icon-circle-triangle-n")?($(e).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s"),u.child().hide(),o=f.indexOf(i.GameId),o>-1&f.splice(o,1)):($(e).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n"),u.child(d(i.GameId),r.className).show(),$(r).next().addClass(r.className),$(r).next().addClass("DetailRow"),f.indexOf(i.GameId)==-1&&(f=f.concat(i.GameId)))};t.toggleTrueskillLine=function(n,t){var i=n+"_"+t,r=document.getElementById("trueskill_player"+i),u=r.style.display;u=="none"?(r.style.display="inline-block",document.getElementById("trueskill_toggle"+i).src=ImagePath+"c/minus.gif"):(r.style.display="none",document.getElementById("trueskill_toggle"+i).src=ImagePath+"c/plus.gif")};t.getPlayersImageHtml=function(n,t){var i="";return(n>2||t)&(i="sprite-common invitation-image sprite-common-"+n+"players"),""};t.getReturnImageHtml=function(n){return n?"":""};t.getReturnMatchImageHtml=function(n,t){var i=$("").addClass("sprite-common currentgame-image"),r;return n||t?t?(i.addClass("sprite-common-rueckspiel"),i.attr("title",i18next.t("Invitation.ReturnMatch"))):(i.addClass("sprite-common-hinspiel"),i.attr("title",i18next.t("Invitation.FirstLeg"))):(i.addClass("sprite-common-hin"),i.attr("title",i18next.t("Invitation.OnlyFirstLeg"))),r=$("").append(i),r.html()};t.getGameTypeImageHtml=function(n){var i,t;return i=n?i18next.t("Invitation.ScoredGame"):i18next.t("Invitation.TrainingGame"),t="wertung",n||(t="training"),""};t.showGame=function(n){var t,i;t=typeof n=="number"?n:n.data.gameID;$(".hasUnreadChat.yucRecFinID"+t).removeClass("hasUnreadChat");y$.cookie.read("open-gameWindow-in-own-window")!="false"?(i=window.open(BaseUrlWithLang+"game/"+t,"GameWindow","width=819,height=650,scrollbars=no,menubar=no,toolbar=no,status=no,resizable=yes,locationbar=no"),i.resizeTo(819,650)):i=window.open(BaseUrlWithLang+"game/"+t,"GameWindow");i.focus()};t.currentGamesTableCustomFilter=function(n,t,i){var f=new $.fn.dataTable.Api(n),u,r;if(f.table().node()!==document.getElementById("LiveGamesTable")||(u=f.row(i).data(),$("#ddlCurrentGamesFilter").val()==2)||u.IsOnTurn)return!0;if($("#ddlCurrentGamesFilter").val()==1){for(r=0;r",{value:n.Rank,text:(n.Rank<10?"0":"")+n.Rank+" "+n.RankName})))});i.on("change",function(){var t=document.getElementById("global_ranking_table_filter--buddies_only").checked,i=this.value;UpdateRankingListCBLocally(n.d.filter(function(n){return r(n,i,t)}),t)}).prop("disabled",!1);$("#global_ranking_table_filter--buddies_only").on("change",function(){var t=this.checked,i=$("#selFilterRank").val();UpdateRankingListCBLocally(n.d.filter(function(n){return r(n,i,t)}),t)}).prop("disabled",!1)}function UpdateRankingListCBLocally(n,t){var i,f,r,u;for($("#divGlobalRankingList").html('<\/table>'),i=$("#divGlobalRankingListTable").DataTable({processing:!0,searching:!1,pagingType:"full_numbers",info:!1,language:y$.base.getDataTablesTranslation(),ordering:!0,order:[[2,"desc"],[3,"desc"],[4,"desc"]],autoWidth:!1,dom:'<"top"flp>rt<"bottom"ip><"clear">',pageLength:25,lengthMenu:[[10,25,50,100,-1],[10,25,50,100,i18next.t("All")]],data:n,fnRowCallback:function(n,i,r,u){$("td:eq(0)",n).html(''+(u+1)+"<\/span>");typeof ID!="undefined"&ID==i.PlayerId?$(n).addClass("selected is_watching_"):y$.buddies.isBuddy(i.PlayerId)&&!t&&$(n).addClass("selected")},columns:[{title:"#<\/span>",width:"6%",orderable:!1,render:function(){return""}},{title:i18next.t("Ranking.Player"),width:"19%",data:"",render:function(n,t,i){return''+y$.s.formatOnlinePlayer(n,i.PlayerId,null,!1,!1,null,null,!0).html()+"<\/span>"}},{title:i18next.t("Ranking.Rank"),width:"19%",data:"Rank",render:function(n,t,i){return t==="display"?(n<10?"0":"")+n+" "+i.RankName:n}},{title:""+i18next.t("Ranking.Points")+"<\/span>",width:"5%",data:"Points",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:""+i18next.t("Ranking.PercentWon")+"<\/span>",width:"10%",data:"WinRate",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+(Math.round(n*100)/100).toFixed(2)+" %<\/span>":n}},{title:""+i18next.t("Ranking.NumGames")+"<\/span>",width:"11%",data:"NumGames",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:""+i18next.t("Ranking.NumWon")+"<\/span>",width:"10%",data:"NumWins",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:""+i18next.t("Ranking.NumLost")+"<\/span>",width:"9%",data:"NumLosses",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}},{title:""+i18next.t("Ranking.NumTie")+"<\/span>",width:"11%",data:"NumTies",orderSequence:["desc","asc"],render:function(n,t){return t==="display"?''+n+"<\/span>":n}}]}),i.draw(),f=i.page.info().pages,r=!1,u=0;u"),f=!0,e=n.length,u,i,t=0;t"),i=n[t].,i==null&(i=i18next.t("Ranking.formerPlayer")),y$.s.formatOnlinePlayer(i,n[t].PlayerId,null).appendTo(u),f=!1,r.append(u);return $("").append(r)}var f="-1",e="-1",o="-1",s="-1",u,r,i;if(typeof t!="undefined"&t.length>0)for(u=t.substr(1).split("|"),r=0;r<\/table>');$("#divPlayerRankingListTable").DataTable({searching:!1,pagingType:"full_numbers",info:!0,language:y$.base.getDataTablesTranslation(i18next.t("Ranking.NoGamesFinished")),ordering:!1,autoWidth:!1,stateSave:!0,stateDuration:0,stateSaveCallback:function(n,t){localStorage.setItem("DataTables_divPlayerRankingList",JSON.stringify(t))},stateLoadCallback:function(){var n=JSON.parse(localStorage.getItem("DataTables_divPlayerRankingList"));return n&(n.start=0),n},dom:'<"top"flp>rt<"bottom"ip><"clear">',pageLength:25,lengthMenu:[[10,25,50,100],[10,25,50,100]],processing:!0,serverSide:!0,ajax:BaseUrl+"data.jqdt?dataSource=RankingDetails&ID="+n+"&OppID="+f+"&GameType="+e+"&FromDate="+o+"&ToDate="+s,columns:[{title:"",sorting:[],width:"10px",data:function(){return y$.games.getRecentlyFinishedGamesExpandHtml("divPlayerRankingListTable")}},{title:i18next.t("Ranking.FinishedOn"),width:"80px",data:"FinishedOnString"},{title:i18next.t("Ranking.Game"),width:"40%",data:"CustomGameName",render:function(n,t,i){return console.log(i),''+n+"<\/span>"}},{title:i18next.t("Ranking.Players"),width:"25%",data:"Opponents",render:function(n){return h(n).html()}},{title:"ID",data:"GameId",render:function(n,t,i){var r="";return i.IdLastGame!=-1&(r=""+i.IdLastGame+"<\/a>/"),i.HistoryExists?r+""+n+"<\/a>":n},className:"alignRight"},{title:i18next.t("Ranking.Result"),data:"PointResult",className:"alignRight",render:function(n){const t=n>=0?"positivePoints":"negativePoints";return`${n}`}}]})}function ShowFurtherContent(n){$("#"+n).show();$("#"+n+"Outer").hide()}; (function(){"use strict";function d(n){return"<\/a>"}function g(){if(e(i18next.t("Invitation.InvitationCancelled"),!0),typeof invListByGameType!="undefined"){ServiceGetPublicInvitationsByGameTypeId(invListByGameType,r);return}if(typeof invListByOpponent!="undefined"){ServiceGetPublicInvitationsByPlayerId(invListByOpponent,r);return}n.updateReceivedInvitations();n.updateSentInvitations();n.updatePersonalInvitations()}function nt(){e(i18next.t("Invitation.ErrorCancelingInvitation"),!1)}function r(t){var u,i,r,f;if(s=!1,t!==null){for(u=$(window).scrollTop(),i=t.d.length-1;i>=0;i--)if(t.d[i].IsRandomGame){if(r=y$.s.getGameLikeData(t.d[i].GameTypeId),r<=1){t.d.splice(i,1);continue}t.d[i].GameName=i18next.t("Invitation.RandomGame");t.d[i].FullName=i18next.t("Invitation.RandomGame");t.d[i].LikeLevel=r}ft(t.d);t.d.length>0&(f=$("#PublicInvitationsTable").DataTable(),f.rows().every(function(){var t=this.data();l.indexOf(t.ID)>-1&n.getInvitationDetails($(".ui-icon",this.node()).parent().get(0),!0)}));window.scrollTo(0,u)}}function tt(n){(h=!1,n!==null)&(i=n.d,v())}function v(){var t,r;i.length===0?$(".controls_personalinvitations_ascx").first().css("display")!=="none"&$(".controls_personalinvitations_ascx").slideUp(400):$(".controls_personalinvitations_ascx").first().css("display")==="none"&&$(".controls_personalinvitations_ascx").slideDown(400);t=$(window).scrollTop();it(i);i.length>0&(r=$("#ReceivedPersonalInvitationsTable").DataTable(),r.rows().every(function(){var t=this.data();c.indexOf(t.ID)>-1&n.getInvitationDetails($(".ui-icon",this.node()).parent().get(0),!1)}));