From 523f8246fe5267a289870f746152583388bc7744 Mon Sep 17 00:00:00 2001 From: Byran Date: Mon, 11 Mar 2024 02:15:38 +0000 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E9=87=8D=E5=AE=9A=E4=BD=8D=E6=8A=A5=E9=94=99=EF=BC=8C?= =?UTF-8?q?=E7=94=B5=E8=84=91=E7=AB=AF=E6=AD=A3=E5=B8=B8=20https://github.?= =?UTF-8?q?com/steedos/steedos-project-shportenergy/issues/116?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../steedos-base/client/bootstrap.coffee | 4 ++++ .../programs/server/packages/modules.js | 20 +++++++++---------- ...4f33a89aba298458f0314bd72a0c5fbcda60c2.js} | 4 ++-- ...ba298458f0314bd72a0c5fbcda60c2.stats.json} | 8 ++++---- .../programs/web.browser.legacy/program.json | 18 ++++++++--------- ...1358775a5befaa3a92a9efd0a549fc60334176.js} | 4 ++-- ...5befaa3a92a9efd0a549fc60334176.stats.json} | 8 ++++---- .../bundle/programs/web.browser/program.json | 18 ++++++++--------- ...099e67c4d80a04486078c921b23d18524661c9.js} | 4 ++-- ...d80a04486078c921b23d18524661c9.stats.json} | 8 ++++---- .../bundle/programs/web.cordova/program.json | 18 ++++++++--------- server/bundle/star.json | 2 +- 12 files changed, 60 insertions(+), 56 deletions(-) rename server/bundle/programs/web.browser.legacy/{c900702d4e6b9d7512d90853dded2b02b2e78fda.js => 1f4f33a89aba298458f0314bd72a0c5fbcda60c2.js} (99%) rename server/bundle/programs/web.browser.legacy/{c900702d4e6b9d7512d90853dded2b02b2e78fda.stats.json => 1f4f33a89aba298458f0314bd72a0c5fbcda60c2.stats.json} (99%) rename server/bundle/programs/web.browser/{8d86f76e3b13a5d890c2e2cf5225db0435a211bd.js => 9f1358775a5befaa3a92a9efd0a549fc60334176.js} (99%) rename server/bundle/programs/web.browser/{8d86f76e3b13a5d890c2e2cf5225db0435a211bd.stats.json => 9f1358775a5befaa3a92a9efd0a549fc60334176.stats.json} (99%) rename server/bundle/programs/web.cordova/{ad0630741050269d9fec334e1ba27e01c1b479d5.js => 58099e67c4d80a04486078c921b23d18524661c9.js} (99%) rename server/bundle/programs/web.cordova/{ad0630741050269d9fec334e1ba27e01c1b479d5.stats.json => 58099e67c4d80a04486078c921b23d18524661c9.stats.json} (99%) diff --git a/creator/packages/steedos-base/client/bootstrap.coffee b/creator/packages/steedos-base/client/bootstrap.coffee index 62b81f665e..b090616b74 100644 --- a/creator/packages/steedos-base/client/bootstrap.coffee +++ b/creator/packages/steedos-base/client/bootstrap.coffee @@ -171,6 +171,10 @@ Setup.setGlobalAjaxHeader = () -> $.ajaxSetup beforeSend: (request) -> request.setRequestHeader('X-User-Id', Meteor.userId()) + spaceId = Session.get("spaceId") + token = Accounts._storedLoginToken() + if spaceId && token + request.setRequestHeader('Authorization', 'Bearer ' + spaceId + ',' + token) Meteor.startup -> Setup.setGlobalAjaxHeader() diff --git a/server/bundle/programs/server/packages/modules.js b/server/bundle/programs/server/packages/modules.js index 40647a9aa8..574e5adf68 100644 --- a/server/bundle/programs/server/packages/modules.js +++ b/server/bundle/programs/server/packages/modules.js @@ -466,7 +466,7 @@ module.useNode(); // module.exports = { "name": "@steedos/objectql", - "version": "2.2.80", + "version": "2.2.81", "main": "lib/index.js" }; @@ -493,7 +493,7 @@ module.useNode(); // module.exports = { "name": "@steedos/core", - "version": "2.2.80", + "version": "2.2.81", "main": "lib/index.js" }; @@ -520,7 +520,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-meteor-package-loader", - "version": "2.2.80", + "version": "2.2.81", "main": "index.js" }; @@ -547,7 +547,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-api", - "version": "2.2.80", + "version": "2.2.81", "main": "index.js" }; @@ -574,7 +574,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-metadata-server", - "version": "2.2.80", + "version": "2.2.81", "main": "index.js" }; @@ -601,7 +601,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-package-registry", - "version": "2.2.80", + "version": "2.2.81", "main": "package.service.js" }; @@ -628,7 +628,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-pages", - "version": "2.2.80", + "version": "2.2.81", "main": "package.service.js" }; @@ -655,7 +655,7 @@ module.useNode(); // module.exports = { "name": "@steedos/i18n", - "version": "2.2.80", + "version": "2.2.81", "main": "lib/index.js" }; @@ -682,7 +682,7 @@ module.useNode(); // module.exports = { "name": "@steedos/auth", - "version": "2.2.80", + "version": "2.2.81", "main": "lib/index.js" }; @@ -709,7 +709,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-workflow", - "version": "2.2.80", + "version": "2.2.81", "main": "package.service.js" }; diff --git a/server/bundle/programs/web.browser.legacy/c900702d4e6b9d7512d90853dded2b02b2e78fda.js b/server/bundle/programs/web.browser.legacy/1f4f33a89aba298458f0314bd72a0c5fbcda60c2.js similarity index 99% rename from server/bundle/programs/web.browser.legacy/c900702d4e6b9d7512d90853dded2b02b2e78fda.js rename to server/bundle/programs/web.browser.legacy/1f4f33a89aba298458f0314bd72a0c5fbcda60c2.js index aa11ea00a5..db3055bbe7 100644 --- a/server/bundle/programs/web.browser.legacy/c900702d4e6b9d7512d90853dded2b02b2e78fda.js +++ b/server/bundle/programs/web.browser.legacy/1f4f33a89aba298458f0314bd72a0c5fbcda60c2.js @@ -95,7 +95,7 @@ https://github.com/nodeca/pako/blob/master/LICENSE * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this,r;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(i).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function i(t){return this.each((function(){var i=e(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof t&&r[t].call(i)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var i=e(this),r=i.attr("data-target");r||(r=(r=i.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,"")),r="#"===r?[]:r;var o=e(document).find(r);function a(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=i.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a())};var r=e.fn.alert;e.fn.alert=i,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.isLoading=!1};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,o)),"toggle"==n?r.toggle():n&&r.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(e.proxy((function(){i[r](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var i=e(t.target).closest(".btn");n.call(i,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n),a="string"==typeof n?n:o.slide;r||i.data("bs.carousel",r=new t(this,o)),"number"==typeof n?r.to(n):a?r[a]():o.interval&&r.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var r,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(n,r),a=this.interval,s="next"==n?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",(function(){o.removeClass([n,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(t){var i=e(this),r=i.attr("href");r&&(r=r.replace(/.*(?=#[^\s]+$)/,""));var o=i.attr("data-target")||r,a=e(document).find(o);if(a.hasClass("carousel")){var s=e.extend({},a.data(),i.data()),l=i.attr("data-slide-to");l&&(s.interval=!1),n.call(a,s),l&&a.data("bs.carousel").to(l),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(i)}function i(n){return this.each((function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);!r&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),r||i.data("bs.collapse",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(n=r.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),n||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][l])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return r.call(this);this.$element[i](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,i){var r=e(i);this.addAriaAndCollapsedClass(n(r),r)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=e.fn.collapse;e.fn.collapse=i,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var r=e(this);r.attr("data-target")||t.preventDefault();var o=n(r),a,s=o.data("bs.collapse")?"toggle":r.data();i.call(o,s)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',i=function(t){e(t).on("click.bs.dropdown",this.toggle)};function r(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?e(document).find(n):null;return i&&i.length?i:t.parent()}function o(i){i&&3===i.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=r(t),o={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&e.contains(n[0],i.target)||(n.trigger(i=e.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function a(t){return this.each((function(){var n=e(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new i(this)),"string"==typeof t&&r[t].call(n)}))}i.VERSION="3.4.1",i.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var i=r(n),a=i.hasClass("open");if(o(),!a){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var s={relatedTarget:this};if(i.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},i.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),a=o.hasClass("open");if(!a&&27!=t.which||a&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+s);if(l.length){var c=l.index(t.target);38==t.which&&c>0&&c--,40==t.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:r},c.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==e.inArray(r,t)&&delete i[r];return(n=e.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=l(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,i){n[e]!=i&&(t[e]=i)})),t},c.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},c.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(e(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=r[0].offsetWidth,h=r[0].offsetHeight;if(l){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>p.bottom?"top":"top"==a&&u.top-hp.width?"left":"left"==a&&u.left-da.top+a.height&&(r.top=a.top+a.height-l)}else{var c=t.left-o,u=t.left+o+n;ca.right&&(r.left=a.left+a.width-u)}return r},c.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},c.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},c.prototype.sanitizeHtml=function(e){return l(e,this.options.whiteList,this.options.sanitizeFn)};var d=e.fn.tooltip;e.fn.tooltip=u,e.fn.tooltip.Constructor=c,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=d,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof n&&n;!r&&/destroy|hide/.test(n)||(r||i.data("bs.popover",r=new t(this,o)),"string"==typeof n&&r[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===i&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),r=t.data("target")||t.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),i=this.offsets,r=this.targets,o=this.activeTarget,a;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(a=r[r.length-1])&&this.activate(a);if(o&&e=i[a]&&(void 0===i[a+1]||e .active"),a=r&&e.support.transition&&(o.length&&o.hasClass("fade")||!!i.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),o.removeClass("in")};var i=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var r=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(e){"use strict";var t=function(n,i){this.options=e.extend({},t.DEFAULTS,i);var r=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return r=e-i&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,n,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-n-o})}};var i=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),i=t.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(t,i)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"4.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,i,r){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),a=t("path"),s=t("detect-libc");Math.random();var l=a.join(r,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+s.family:""),"fibers");try{process.fiberLib=e.exports=t(l).Fiber}catch(u){throw console.error("## There is an issue with `node-fibers` ##\n`"+l+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+r.replace(" ","\\ ")+"/build"),console.error(u.stack||u.message||u),new Error("Missing binary. See message above.")}c(e.exports)}function c(e){try{var t=process.binding("async_wrap"),n,i,r;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");c=t.constants.kStackLength,n=function(){return t.async_hook_fields[c]}}if(!t.popAsyncIds||!t.pushAsyncIds)throw new Error("Push/pop do not exist");i=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,r=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var o=t.async_id_fields||t.async_uid_fields;function a(){for(var e=n(),a=new Array(e);e>0;--e){var s=o[i];a[e-1]={asyncId:s,triggerId:o[r]},t.popAsyncIds(s)}return a}function s(e){for(var n=0;n0)r.changeLanguage(e,i);else if(0!=s[l]){s[l]=0;var c=new XMLHttpRequest;c.overrideMimeType("application/json"),c.open("GET",l,!1),c.send(null),200===c.status?s[l]=1:s[l]=-1,n.addResourceBundle(e,a,JSON.parse(c.response)||{}),r.changeLanguage(e,i)}};n.changeLanguage=p;var m=function(e,t,n){return r.format(e,t,n)};n.format=m;var g=function(){return r.languages};n.getLanguages=g;var _=function(e,t){return r.loadLanguages(e,t)};n.loadLanguages=_;var v=function(e,t){return r.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return r.on(e,t)};n.on=y;var b=function(e,t){return r.off(e,t)};n.off=b,i.__exportStar(t("./i18n/i18n"),n),i.__exportStar(t("./i18n/i18n.app"),n),i.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var i=t("../index"),r=t("underscore"),o=t("clone"),a="_",s="base",l="core",c="translation",u=function(e,t){var n={lng:t,ns:c};if((0,i.exists)(e,n))return(0,i._t)(e,n)},d=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},f=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},m=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},g=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},_=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var i=d(t);return u(i,e)||n||""},b=function(e,t,n,i,r){var o=h(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=b(e,s,n,i,r))}return a||i||""},w=function(e,t,n,i,r){var o=f(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=w(e,s,n,i,r))}return a||i||""},x=function(e,t,n,i){var r=p(t,n);return u(r,e)||i||""},S=function(e,t,n,i,r,o){var a=m(t,n,i),s=u(a,e);if(!s){var l=v(o);l&&"base"!=t&&"core"!=t&&(s=S(e,l,n,i,r,o))}return s||r||""},C=function(e,t,n,i,r){var o=g(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=C(e,s,n,i,r))}return a||i||""},k=function(e,t,n,i,r){var o=_(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=k(e,s,n,i,r))}return a||i||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){r.forEach(e.fields,(function(e,t){var n=[];if(e.options&&r.isString(e.options))try{r.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),r.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(i){console.error("convertFieldsOptions error: ",e.options,i)}else e.options&&!r.isFunction(e.options)&&!r.isArray(e.options)&&r.isObject(e.options)&&(r.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),r.each(n.fields,(function(i,o){if(i.label=b(e,t,o,i.label,n.datasource),i.inlineHelpText&&(i.inlineHelpText=w(e,t,o,i.inlineHelpText,n.datasource)),i.group&&(i.group=x(e,t,i.group,i.group)),i.options){var a=[];r.each(i.options,(function(i){if(r.has(i,"value")){var s=S(e,t,o,i.value,i.label,n.datasource);a.push(r.extend({},i,{label:s}))}else a.push(i)})),i.options=a}})),r.each(n.actions,(function(i,r){i.label=C(e,t,r,i.label,n.datasource)})),r.each(n.list_views,(function(i,r){i.label=k(e,t,r,i.label,n.datasource)}))};n.translationI18nObject=A;var T=function(e){r.each(e,(function(e){(0,i.addResourceBundle)(e.lng,c,e.data,!0,!0)}))};n.addObjectsI18n=T;var I=function(e,t){r.each(t,(function(t,i){(0,n.translationI18nObject)(e,i,t)}))};n.translationI18nObjects=I;var B=function(e,t,n){var i=o(n);E(i);var a={};return a[d(t)]=y(e,t,i.label),r.each(i.fields,(function(n,o){a[h(t,o)]=b(e,t,o,n.label),n.inlineHelpText&&(a[f(t,o)]=w(e,t,o,n.inlineHelpText,i.datasource)),n.group&&(a[p(t,n.group)]=x(e,t,n.group,n.group)),n.options&&r.each(n.options,(function(n){r.has(n,"value")&&(a[m(t,o,n.value)]=S(e,t,o,n.value,n.label))}))})),r.each(i.actions,(function(n,i){a[g(t,i)]=C(e,t,i,n.label)})),r.each(i.list_views,(function(n,i){a[_(t,i)]=k(e,t,i,n.label)})),a};n.getObjectI18nTemplate=B,n.fallbackKeys={getObjectLabelKey:d,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:f,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:m,getObjectActionLabelKey:g,getObjectListviewLabelKey:_}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var i=t("../index"),r=t("underscore"),o=t("clone"),a="translation",s="_",l=function(e,t){var n={lng:t,ns:a};if((0,i.exists)(e,n))return(0,i._t)(e,n)},c=function(e){return"app".concat("_").concat(e).concat("_","name")},u=function(e){return"app".concat("_").concat(e).concat("_","description")},d=function(e){return"menu".concat("_").concat(e)},h=function(e,t,n){var i=c(t);return l(i,e)||n||""},f=function(e,t,n){var i=u(t);return l(i,e)||n||""},p=function(e,t,n){var i=d(t);return l(i,e)||n||""},m=function(e,t,i){i.label=h(e,t,i.label||i.name),i.description=f(e,t,i.description),(0,n.translationI18nMenus)(e,i.admin_menus)},g=function(e,t){r.each(t,(function(t){var n=p(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=g;var _=function(e,t){r.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=_;var v=function(e,t,n){var i=o(n),a={};return a[c(t)]=h(e,t,i.label||i.name),a[u(t)]=f(e,t,i.description),r.each(i.admin_menus,(function(t){a[d(t._id)]=p(e,t._id,t.label||t.name)})),a};n.getAppI18nTemplate=v,n.appFallbackKeys={getAppLabelKey:c,getAppDescriptionKey:u,getMenuLabelKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var i=t("tslib"),r=t("underscore");i.__exportStar(t("./objectTranslation"),n),i.__exportStar(t("./translation"),n),i.__exportStar(t("./templates/objectTranslation"),n),i.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},a=function(e){r.forEach(e.fields,(function(e,t){var n=[];if(e.options&&r.isString(e.options))try{r.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),r.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(i){console.error("convertFieldsOptions error: ",e.options,i)}else if(e.options&&r.isArray(e.options))try{r.forEach(e.options,(function(e){r.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(i){console.error("Creator.convertFieldsOptions",e.options,i)}else e.options&&!r.isFunction(e.options)&&!r.isArray(e.options)&&r.isObject(e.options)&&(r.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},s;n.convertObject=a,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(s=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var r=t("underscore"),o=t("./"),a=t("../index"),s=t("./index"),l=t("../i18n/i18n"),c=t("lodash"),u=t("crypto"),d,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function f(e){var t;return u.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(f(JSON.stringify(t)))},m=t("clone"),g=".",_="base",v="core",y="translation",b="object",w="field",x="listview",S="action",C=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,a.exists)(e,n))return(0,a._t)(e,n)},k=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},T=function(e){var t;return[D("object"),e,"description"].join(".")},I=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},B=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},M=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),i;return[D("field"),e,"group",n].join(".")},j=function(e,t,n){var i;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},P=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},R=function(e,t,n){var i,r=[A(t)],o=l.fallbackKeys.getObjectLabelKey(t);return o&&r.push(o),C(r,e)||n||""};n.translationObjectLabel=R;var N=function(e,t,n){var i=T(t);return C(i,e)||n||""},L=function(e,t,n,i,r,o){var a,s=[I(t,n)],c=l.fallbackKeys.getObjectFieldLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=L(e,d,n,i,r))}return u||i||""},z=function(e,t,n,i,r,o){var a,s=[B(t,n)],c=l.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=z(e,d,n,i,r))}return u||i||""},V=function(e,t,n,i,r,o){var a=O(t,n),s,l=C([a],e);if(1!=o&&!l){var c=k(r);c&&"base"!=t&&"core"!=t&&(l=V(e,c,n,i,r))}return l||i||""},$=function(e,t,n,i,r,o){var a,s=[M(t,n)],c=l.fallbackKeys.getObjectFieldGroupKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=$(e,d,n,i,r))}return u||i||""},H=function(e,t,n,i,r,o,a){var s,c=[j(t,n,i)],u=l.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,i);u&&c.push(u);var d=C(c,e);if(1!=a&&!d){var h=k(o);h&&"base"!=t&&"core"!=t&&(d=H(e,h,n,i,r,o))}return d||r||""},W=function(e,t,n,i,r,o){var a,s=[P(t,n)],c=l.fallbackKeys.getObjectActionLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=W(e,d,n,i,r))}return u||i||""},U=function(e,t,n,i,r,o){var a,s=[F(t,n)],c=l.fallbackKeys.getObjectListviewLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=U(e,d,n,i,r))}return u||i||""},q=function(e,t,i,o,a){void 0===a&&(a=!1);var l=p(e,i);"test_obj_layout1"===t&&console.log("translationObject",t,l);var u=h.get(l);if(u)return Object.assign(i,(0,c.cloneDeep)(u));o&&(0,s.convertObject)(i),i.label=(0,n.translationObjectLabel)(e,t,i.label),i.description=N(e,t,i.description),r.each(i.fields,(function(n,o){if(n.label=L(e,t,o,n.label,i.datasource,a),n.inlineHelpText&&(n.inlineHelpText=z(e,t,o,n.inlineHelpText,i.datasource,a)),n.group&&(n.group=$(e,t,n.group,n.group,i.datasource,a)),n.options){var s=[];r.each(n.options,(function(n){if(r.has(n,"value")){var l=H(e,t,o,n.value,n.label,i.datasource,a);s.push(r.extend({},n,{label:l}))}else s.push(n)})),n.options=s}})),r.each(i.actions,(function(n,r){n.label=W(e,t,r,n.label,i.datasource,a)})),r.each(i.list_views,(function(n,r){n.label=U(e,t,r,n.label,i.datasource,a)})),h.set(l,(0,c.cloneDeep)(i))};n.translationObject=q;var K=function(e,t){r.each(t,(function(t,i){(0,n.translationObject)(e,i,t)}))};n.translationObjects=K;var G=function(e,t,i){var o=m(i);(0,s.convertObject)(o);var a={};return a[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),a[T(t)]=N(e,t,o.description),r.each(o.fields,(function(n,i){a[I(t,i)]=L(e,t,i,n.label),n.inlineHelpText&&(a[B(t,i)]=z(e,t,i,n.inlineHelpText,o.datasource)),n.description&&(a[O(t,i)]=V(e,t,i,n.description,o.datasource)),n.group&&(a[M(t,n.group)]=$(e,t,n.group,n.group,o.datasource)),n.options&&r.each(n.options,(function(n){r.has(n,"value")&&(a[j(t,i,n.value)]=H(e,t,i,n.value,n.label))}))})),r.each(o.actions,(function(n,i){a[P(t,i)]=W(e,t,i,n.label)})),r.each(o.list_views,(function(n,i){a[F(t,i)]=U(e,t,i,n.label)})),a};function Y(e,t){var n=m(e);(0,s.convertObject)(n);var i={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),i[A(o)]=n.label,i[T(o)]=n.description,r.each(n.fields,(function(e,t){i[I(o,t)]=e.label,e.help&&(i[B(o,t)]=e.help),e.description&&(i[O(o,t)]=e.description),e.options&&r.each(e.options,(function(e){r.has(e,"value")&&(i[j(o,t,e.value)]=e.label)}))})),r.each(n.groups,(function(e,t){i[M(o,t)]=e})),r.each(n.actions,(function(e,t){i[P(o,t)]=e.label})),r.each(n.listviews,(function(e,t){i[F(o,t)]=e.label})),r.each(n.CustomLabels,(function(e,t){i[E(t)]=e})),i}n.getObjectTranslationTemplate=G;var X=function(e){r.each(e,(function(e){var t=Y(e.data,e.__filename);(0,a.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=void 0;var i=t("../index"),r=t("underscore"),o=t("./"),a=t("../i18n/i18n.app"),s=t("clone"),l="translation",c=".",u="app",d="menu",h=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;default:return"CustomLabels"}},f=function(e){var t;return[h(),e].join(".")},p=function(e,t){var n={lng:t,ns:l,keySeparator:!1};if((0,i.exists)(e,n))return(0,i._t)(e,n)},m=function(e){var t;return[h("app"),e,"name"].join(".")},g=function(e){var t;return[h("app"),e,"description"].join(".")},_=function(e){var t;return[h("menu"),"menu_".concat(e)].join(".")},v=function(e,t,n){var i,r=[m(t)],o=a.appFallbackKeys.getAppLabelKey(t);return o&&r.push(o),p(r,e)||n||""},y=function(e,t,n){var i,r=[g(t)],o=a.appFallbackKeys.getAppDescriptionKey(t);return o&&r.push(o),p(r,e)||n||""},b=function(e,t,n){var i,r=[_(t)],o=a.appFallbackKeys.getMenuLabelKey(t);return o&&r.push(o),p(r,e)||n||""},w=function(e,t,i){i.label=v(e,t,i.label||i.name),i.description=y(e,t,i.description),(0,n.translationMenus)(e,i.admin_menus)};n.translationApp=w;var x=function(e,t){r.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=x;var S=function(e,t){r.each(t,(function(t,i){(0,n.translationApp)(e,i,t)}))};n.translationApps=S;var C=function(e,t,n){var i=s(n),o={};return o[m(t)]=v(e,t,i.label||i.name),o[g(t)]=y(e,t,i.description),r.each(i.admin_menus,(function(t){o[_(t._id)]=b(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var k=function(e,t,n){r.isArray(n)?r.each(n,(function(e){k(e,"",e)})):n&&r.each(r.keys(n),(function(i){var o=t?"".concat(t,".").concat(i):i,a=n[i];"object"==typeof a?r.isArray(a)?r.each(a,(function(e){k(e,o,a)})):k(e,o,a):e[o]=a}))};function D(e){for(var t in e)"object"==typeof e[t]&&k(e,t,e[t]);return e}n.convertTranslationData=D;var E=function(e){var t=s(e),n={};return r.each(t.CustomApplications,(function(e,t){n[m(t)]=e.name,n[g(t)]=e.description})),r.each(t.CustomLabels,(function(e,t){var i;if("simpleschema"!=t&&r.isObject(e)){var o=D(((i={})[t]=e,i));r.each(o,(function(e,t){r.isObject(e)||(n[f(t)]=e)}))}else n[f(t)]=e})),n};n.convertTranslation=E;var A=function(e){r.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,i.addResourceBundle)(e.lng,l,t,!0,!0)}))};n.addTranslations=A},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var i=t("underscore"),r=t("../index"),o=t("clone");function a(e,t){var n={};return i.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function s(e){return a(["label","description"],e)}function l(e){switch(e.type){case"select":return a(["label","help","options","description"],e);default:return a(["label","help","description"],e)}}function c(e){return a(["label"],e)}function u(e){return a(["label"],e)}function d(e){var t={};return i.each(e,(function(e,n){t[n]=l(e)})),t}function h(e){var t={};return i.each(e,(function(e,n){t[n]=u(e)})),t}function f(e){var t={};return i.each(e,(function(e,n){t[n]=c(e)})),t}function p(e,t){var n={};return i.each(e,(function(e,i){if(e.group){var r=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[r]=t[i].group}})),n}var m=function(e,t,n,a){void 0===a&&(a=!1);var l=o(n);1!=a&&(0,r.translationObject)(e,t,l,!0,a);var c=Object.assign({},s(l));c=Object.assign({},c,{fields:d(l.fields)});var u=p(n.fields,l.fields);i.isEmpty(u)||(c=Object.assign({},c,{groups:u}));var m=f(l.list_views);i.isEmpty(m)||(c=Object.assign({},c,{listviews:m}));var g=h(l.actions);return i.isEmpty(g)||(c=Object.assign({},c,{actions:g})),Object.assign({name:t},c)};n.getObjectMetadataTranslationTemplate=m},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var i=t("underscore"),r=t("../index"),o=t("clone");function a(e,t){var n={};return i.each(e,(function(e){n[e]=t[e]||""})),n}var s=function(e){return a(["name","description"],e)},l=function(e,t,n){var i,a=o(n),l;return(0,r.translationApp)(e,t,a),Object.assign({},{CustomApplications:(i={},i[t]=s(a),i)})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",main:"./dist/cjs/i18next.js",module:"./dist/esm/i18next.js"}},dist:{cjs:{"i18next.js":function e(t,n,e){"use strict";var i=t("@babel/runtime/helpers/typeof"),r=t("@babel/runtime/helpers/objectSpread"),o=t("@babel/runtime/helpers/classCallCheck"),a=t("@babel/runtime/helpers/createClass"),s=t("@babel/runtime/helpers/possibleConstructorReturn"),l=t("@babel/runtime/helpers/getPrototypeOf"),c=t("@babel/runtime/helpers/assertThisInitialized"),u=t("@babel/runtime/helpers/inherits");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(i),f=d(r),p=d(o),m=d(a),g=d(s),_=d(l),v=d(c),y=d(u),b={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},w,x=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.init(t,n)}return m.default(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||b,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),i=0;i1?n-1:0),r=1;r-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(r())return{};var a=i(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return r()?{}:{obj:e,k:i(o.shift())}}function A(e,t,n){var i=E(e,t,Object),r,o;i.obj[i.k]=n}function T(e,t,n,i){var r=E(e,t,Object),o=r.obj,a=r.k;o[a]=o[a]||[],i&&(o[a]=o[a].concat(n)),i||o[a].push(n)}function I(e,t){var n=E(e,t),i=n.obj,r=n.k;if(i)return i[r]}function B(e,t,n){var i=I(e,n);return void 0!==i?i:I(t,n)}function O(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):O(e[i],t[i],n):e[i]=t[i]);return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var j={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return j[e]})):e}var F="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p.default(this,t),n=g.default(this,_.default(t).call(this)),F&&S.call(v.default(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return y.default(t,e),m.default(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[t,n];return i&&"string"!=typeof i&&(a=a.concat(i)),i&&"string"==typeof i&&(a=a.concat(o?i.split(o):i)),t.indexOf(".")>-1&&(a=t.split(".")),I(this.data,a)}},{key:"addResource",value:function e(t,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[t,n];i&&(s=s.concat(a?i.split(a):i)),t.indexOf(".")>-1&&(r=n,n=(s=t.split("."))[1]),this.addNamespaces(n),A(this.data,s,r),o.silent||this.emit("added",t,n,i,r)}},{key:"addResources",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in i)"string"!=typeof i[o]&&"[object Array]"!==Object.prototype.toString.apply(i[o])||this.addResource(t,n,o,i[o],{silent:!0});r.silent||this.emit("added",t,n,i)}},{key:"addResourceBundle",value:function e(t,n,i,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(r=i,i=n,n=(s=t.split("."))[1]),this.addNamespaces(n);var l=I(this.data,s)||{};r?O(l,i,o):l=f.default({},l,i),A(this.data,s,l),a.silent||this.emit("added",t,n,i)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?f.default({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(S),N={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,i,r,o){var a=this;return t.forEach((function(e){a.processors[e]&&(n=a.processors[e].process(n,i,r,o))})),n}},L={},z=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p.default(this,t),n=g.default(this,_.default(t).call(this)),F&&S.call(v.default(n)),D(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,v.default(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=x.create("translator"),n}return y.default(t,e),m.default(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i=this.resolve(t,n);return i&&void 0!==i.res}},{key:"extractFromKey",value:function e(t,n){var i=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");var r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(i&&t.indexOf(i)>-1){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};var s=t.split(i);(i!==r||i===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),t=s.join(r)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,i,r){var o=this;if("object"!==h.default(i)&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=this.extractFromKey(n[n.length-1],i),l=s.key,c=s.namespaces,u=c[c.length-1],d=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var m=i.nsSeparator||this.options.nsSeparator;return u+m+l}return l}var g=this.resolve(n,i),_=g&&g.res,v=g&&g.usedKey||l,y=g&&g.exactUsedKey||l,b=Object.prototype.toString.apply(_),w=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,C="string"!=typeof _&&"boolean"!=typeof _&&"number"!=typeof _;if(S&&_&&C&&w.indexOf(b)<0&&("string"!=typeof x||"[object Array]"!==b)){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,_,i):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");if(a){var k="[object Array]"===b,D=k?[]:{},E=k?y:v;for(var A in _)if(Object.prototype.hasOwnProperty.call(_,A)){var T="".concat(E).concat(a).concat(A);D[A]=this.translate(T,f.default({},i,{joinArrays:!1,ns:c})),D[A]===T&&(D[A]=_[A])}_=D}}else if(S&&"string"==typeof x&&"[object Array]"===b)(_=_.join(x))&&(_=this.extendTranslation(_,n,i,r));else{var I=!1,B=!1,O=void 0!==i.count&&"string"!=typeof i.count,M=t.hasDefaultValue(i),j=O?this.pluralResolver.getSuffix(d,i.count):"",P=i["defaultValue".concat(j)]||i.defaultValue;!this.isValidLookup(_)&&M&&(I=!0,_=P),this.isValidLookup(_)||(B=!0,_=l);var F=M&&P!==_&&this.options.updateMissing;if(B||I||F){if(this.logger.log(F?"updateKey":"missingKey",d,u,l,F?P:_),a){var R=this.resolve(l,f.default({},i,{keySeparator:!1}));R&&R.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.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},r,o,a,s,l;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(r)){var t=n.extractFromKey(e,i),c=t.key;o=c;var u=t.namespaces;n.options.fallbackNS&&(u=u.concat(n.options.fallbackNS));var d=void 0!==i.count&&"string"!=typeof i.count,h=void 0!==i.context&&"string"==typeof i.context&&""!==i.context,f=i.lngs?i.lngs:n.languageUtils.toResolveHierarchy(i.lng||n.language,i.fallbackLng);u.forEach((function(e){n.isValidLookup(r)||(l=e,!L["".concat(f[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(l)&&(L["".concat(f[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(l,'" 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!!!")),f.forEach((function(t){if(!n.isValidLookup(r)){s=t;var o=c,l=[o],u,f;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(l,c,t,e,i);else d&&(u=n.pluralResolver.getSuffix(t,i.count)),d&&h&&l.push(o+u),h&&l.push(o+="".concat(n.options.contextSeparator).concat(i.context)),d&&l.push(o+=u);for(;f=l.pop();)n.isValidLookup(r)||(a=f,r=n.getResource(t,e,f,i))}})))}))}})),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,i,r):this.resourceStore.getResource(t,n,i,r)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&n===i.substring(0,n.length)&&void 0!==t[i])return!0;return!1}}]),t}(S);function V(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $=function(){function e(t){p.default(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return m.default(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=t.split("-");return this.options.lowerCaseLng?i=i.map((function(e){return e.toLowerCase()})):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=V(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=V(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=V(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,i;return t?(t.forEach((function(e){if(!i){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(i=t)}})),!i&&this.options.supportedLngs&&t.forEach((function(e){if(!i){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return i=t;i=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}},{key:"toResolveHierarchy",value:function e(t,n){var i=this,r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=function e(t){t&&(i.isSupportedCode(t)?o.push(t):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(t))):"string"==typeof t&&a(this.formatLanguageCode(t)),r.forEach((function(e){o.indexOf(e)<0&&a(i.formatLanguageCode(e))})),o}}]),e}(),H=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],W={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function U(){var e={};return H.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:W[t.fc]}}))})),e}var q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),this.rules=U()}return m.default(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,i=this.getRule(t);return i?i.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var i=this,r=this.getRule(t);if(r){var o=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var s=function e(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):s():"v2"===this.options.compatibilityJSON?s():this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p.default(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return m.default(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:P,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?M(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?M(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?M(n.nestingPrefix):n.nestingPrefixEscaped||M("$t("),this.nestingSuffix=n.nestingSuffix?M(n.nestingSuffix):n.nestingSuffixEscaped||M(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function e(t,n,i,r){var o=this,a,s,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var d=function e(t){if(t.indexOf(o.formatSeparator)<0){var a=B(n,c,t);return o.alwaysFormat?o.format(a,void 0,i):a}var s=t.split(o.formatSeparator),l=s.shift().trim(),u=s.join(o.formatSeparator).trim();return o.format(B(n,c,l),u,i,r)};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return u(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?u(o.escape(t)):u(t)}}].forEach((function(e){for(l=0;a=e.regex.exec(t);){if(void 0===(s=d(a[1].trim())))if("function"==typeof h){var n=h(t,a,r);s="string"==typeof n?n:""}else{if(f){s=a[0];continue}o.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(t)),s=""}else"string"==typeof s||o.useRawValueToEscape||(s=k(s));if(t=t.replace(a[0],e.safeValue(s)),e.regex.lastIndex=0,++l>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o,a,s=f.default({},r);function l(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,s)).replace(/'/g,'"');try{s=JSON.parse(r),t&&(s=f.default({},t,s))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(n).concat(r)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;o=this.nestingRegexp.exec(t);){var c=[],u=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var d=o[1].split(this.formatSeparator).map((function(e){return e.trim()}));o[1]=d.shift(),c=d,u=!0}if((a=n(l.call(this,o[1].trim(),s),s))&&o[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=k(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),u&&(a=c.reduce((function(e,t){return i.format(e,t,r.lng,r)}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),e}();function G(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var Y=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p.default(this,t),r=g.default(this,_.default(t).call(this)),F&&S.call(v.default(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=o,r.logger=x.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,o.backend,o),r}return y.default(t,e),m.default(t,[{key:"queueLoad",value:function e(t,n,i,r){var o=this,a=[],s=[],l=[],c=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var r="".concat(e,"|").concat(n);!i.reload&&o.store.hasResourceBundle(e,n)?o.state[r]=2:o.state[r]<0||(1===o.state[r]?s.indexOf(r)<0&&s.push(r):(o.state[r]=1,t=!1,s.indexOf(r)<0&&s.push(r),a.indexOf(r)<0&&a.push(r),c.indexOf(n)<0&&c.push(n)))})),t||l.push(e)})),(a.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:r}),{toLoad:a,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,n,i){var r=t.split("|"),o=r[0],a=r[1];n&&this.emit("failedLoading",o,a,n),i&&this.store.addResourceBundle(o,a,i),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(i){T(i.loaded,[o],a),G(i.pending,t),n&&i.errors.push(n),0!==i.pending.length||i.done||(Object.keys(i.loaded).forEach((function(t){e[t]||(e[t]=[]),i.loaded[t].length&&i.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[i](t,n,(function(e,l){e&&l&&o<5?setTimeout((function(){r.read.call(r,t,n,i,o+1,2*a,s)}),a):s(e,l)})):s(null,{})}},{key:"prepareLoading",value:function e(t,n){var i=this,r=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();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach((function(e){i.loadOne(e)}))}},{key:"load",value:function e(t,n,i){this.prepareLoading(t,n,{},i)}},{key:"reload",value:function e(t,n,i){this.prepareLoading(t,n,{reload:!0},i)}},{key:"loadOne",value:function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(function(e,r){e&&n.logger.warn("".concat(i,"loading namespace ").concat(a," for language ").concat(o," failed"),e),!e&&r&&n.logger.log("".concat(i,"loaded namespace ").concat(a," for language ").concat(o),r),n.loaded(t,e,r)}))}},{key:"saveMissing",value:function e(t,n,i,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" 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!!!"):null!=i&&""!==i&&(this.backend&&this.backend.create&&this.backend.create(t,n,i,r,null,f.default({},a,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],n,i,r))}}]),t}(S);function X(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!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,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===h.default(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===h.default(t[2])||"object"===h.default(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,i,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function J(){}var Q,ee=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(p.default(this,t),e=g.default(this,_.default(t).call(this)),F&&S.call(v.default(e)),e.options=Z(n),e.services={},e.logger=x,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),g.default(e,v.default(e));setTimeout((function(){e.init(n,i)}),0)}return e}return y.default(t,e),m.default(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(i=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=f.default({},X(),this.options,Z(n)),this.format=this.options.interpolation.format,i||(i=J),!this.options.isClone){this.modules.logger?x.init(r(this.modules.logger),this.options):x.init(null,this.options);var o=new $(this.options);this.store=new R(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new q(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new K(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new Y(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var u=C(),d=function e(){var n=function e(n,r){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(r),i(n,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),u}},{key:"loadResources",value:function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,r=i,o="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var a=[],s=function e(t){var i;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};if(o)s(o);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(a,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function e(t,n,i){var r=C();return t||(t=this.languages),n||(n=this.options.ns),i||(i=J),this.services.backendConnector.reload(t,n,(function(e){r.resolve(),i(e)})),r}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&N.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var i=this;this.isLanguageChangingTo=t;var r=C();this.emit("languageChanging",t);var o=function e(t,o){o?(i.language=o,i.languages=i.services.languageUtils.toResolveHierarchy(o),i.translator.changeLanguage(o),i.isLanguageChangingTo=void 0,i.emit("languageChanged",o),i.logger.log("languageChanged",o)):i.isLanguageChangingTo=void 0,r.resolve((function(){return i.t.apply(i,arguments)})),n&&n(t,(function(){return i.t.apply(i,arguments)}))},a=function e(t){var n="string"==typeof t?t:i.services.languageUtils.getBestMatchFromCodes(t);n&&(i.language||(i.language=n,i.languages=i.services.languageUtils.toResolveHierarchy(n)),i.translator.language||i.translator.changeLanguage(n),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(n)),i.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function e(t,n){var i=this,r=function e(t,n){var r;if("object"!==h.default(n)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;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;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function e(t,i){var r=n.services.backendConnector.state["".concat(t,"|").concat(i)];return-1===r||2===r};if(i.precheck){var l=i.precheck(this,s);if(void 0!==l)return l}return!!this.hasResourceBundle(r,t)||(!this.services.backendConnector.backend||!(!s(r,t)||o&&!s(a,t)))}},{key:"loadNamespaces",value:function e(t,n){var i=this,r=C();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){i.options.ns.indexOf(e)<0&&i.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var i=C();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],o=t.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["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"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new t(n,i)}},{key:"cloneInstance",value:function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,o=f.default({},this.options,i,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(e){a[e]=n[e]})),a.services=f.default({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new z(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;ie(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},c=new Set,u=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&m(n,`${e} option`,`options.${t}`,b)},d=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:i}=b,{get:r}=Object.getOwnPropertyDescriptor(i,e);m(n,`${e} method`,`cache.${t}()`,r)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:i}=b,{get:r}=Object.getOwnPropertyDescriptor(i,e);m(n,`${e} property`,`cache.${t}`,r)}},f=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!c.has(e),m=(e,t,n,i)=>{c.add(e);const r=`The ${t} is deprecated. Please use ${n} instead.`;f(r,"DeprecationWarning",e,i)},g=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),_=e=>g(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=_(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class b{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:s,dispose:l,disposeAfter:d,noDisposeOnSet:h,noUpdateTTL:m,maxSize:v=0,sizeCalculation:w,fetchMethod:x,fetchContext:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:k}=e,{length:D,maxAge:E,stale:A}=e instanceof b?{}:e;if(0!==t&&!g(t))throw new TypeError("max option must be a nonnegative integer");const T=t?_(t):Array;if(!T)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.sizeCalculation=w||D,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=x||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&void 0!==S)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new T(t),this.prev=new T(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof l&&(this.dispose=l),"function"==typeof d?(this.disposeAfter=d,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!C,0!==this.maxSize){if(!g(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!s||!!A,this.noDeleteOnStaleGet=!!k,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=g(i)||0===i?i:1,this.ttlAutopurge=!!r,this.ttl=n||E||0,this.ttl){if(!g(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){c.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";f(t,"UnboundedCacheWarning",e,b)}}A&&u("stale","allowStale"),E&&u("maxAge","ttl"),D&&u("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=i.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?i.now():0};let e=0;const t=()=>{const t=i.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const i=this.keyMap.get(n);return void 0===i?0:0===this.ttls[i]||0===this.starts[i]?1/0:this.starts[i]+this.ttls[i]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>this.calculatedSize-=this.sizes[e],this.requireSize=(e,t,n,i)=>{if(!g(n)){if(!i)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(t,e),!g(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t,n,i)=>{this.sizes[e]=i;const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t,n,i){}requireSize(e,t,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return d("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],r=this.valList[t],o=this.isBackgroundFetch(r)?r.__staleWhileFetching:r,a={value:o};if(this.ttls){a.ttl=this.ttls[t];const e=i.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=i.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:i,noDisposeOnSet:r=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL}={}){o=this.requireSize(e,t,o,a);let l=0===this.size?void 0:this.keyMap.get(e);if(void 0===l)l=this.newIndex(),this.keyList[l]=e,this.valList[l]=t,this.keyMap.set(e,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,t,e,o),s=!1;else{const n=this.valList[l];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():r||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(l),this.valList[l]=t,this.addItemSize(l,t,e,o)),this.moveToTail(l)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),s||this.setItemTTL(l,n,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],i=this.valList[t];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n)))return this.valList[n]}backgroundFetch(e,t,n,i){const r=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(r))return r;const a=new o,s={signal:a.signal,options:n,context:i},l=t=>(a.signal.aborted||this.set(e,t,s.options),t),c=i=>{if(this.valList[t]===d){const i=!n.noDeleteOnFetchRejection||void 0===d.__staleWhileFetching;i?this.delete(e):this.valList[t]=d.__staleWhileFetching}if(d.__returned===d)throw i},u=t=>t(this.fetchMethod(e,r,s)),d=new Promise(u).then(l,c);return d.__abortController=a,d.__staleWhileFetching=r,d.__returned=null,void 0===t?(this.set(e,d,s.options),t=this.keyMap.get(e)):this.valList[t]=d,d}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,fetchContext:u=this.fetchContext}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:i});const d={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:s,noUpdateTTL:l,noDeleteOnFetchRejection:c};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,d,u);return t.__returned=t}{const i=this.valList[h];if(this.isBackgroundFetch(i))return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i;if(!this.isStale(h))return this.moveToTail(h),n&&this.updateItemAge(h),i;const r=this.backgroundFetch(e,h,d,u);return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const r=this.keyMap.get(e);if(void 0!==r){const o=this.valList[r],a=this.isBackgroundFetch(o);if(this.isStale(r))return a?t?o.__staleWhileFetching:void 0:(i||this.delete(e),t?o:void 0);if(a)return;return this.moveToTail(r),n&&this.updateItemAge(r),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return d("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return d("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return l}}e.exports=b}}}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",main:"tslib.js",module:"tslib.es6.js"}},"tslib.js":function e(t,n,e){ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this,r;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(i).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function i(t){return this.each((function(){var i=e(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof t&&r[t].call(i)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var i=e(this),r=i.attr("data-target");r||(r=(r=i.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,"")),r="#"===r?[]:r;var o=e(document).find(r);function a(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=i.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a())};var r=e.fn.alert;e.fn.alert=i,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.isLoading=!1};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,o)),"toggle"==n?r.toggle():n&&r.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(e.proxy((function(){i[r](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var i=e(t.target).closest(".btn");n.call(i,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n),a="string"==typeof n?n:o.slide;r||i.data("bs.carousel",r=new t(this,o)),"number"==typeof n?r.to(n):a?r[a]():o.interval&&r.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),i;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var r,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(n,r),a=this.interval,s="next"==n?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",(function(){o.removeClass([n,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var r=function(t){var i=e(this),r=i.attr("href");r&&(r=r.replace(/.*(?=#[^\s]+$)/,""));var o=i.attr("data-target")||r,a=e(document).find(o);if(a.hasClass("carousel")){var s=e.extend({},a.data(),i.data()),l=i.attr("data-slide-to");l&&(s.interval=!1),n.call(a,s),l&&a.data("bs.carousel").to(l),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(i)}function i(n){return this.each((function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);!r&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),r||i.data("bs.collapse",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(n=r.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),n||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[a](this.$element[0][l])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return r.call(this);this.$element[i](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,i){var r=e(i);this.addAriaAndCollapsedClass(n(r),r)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=e.fn.collapse;e.fn.collapse=i,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var r=e(this);r.attr("data-target")||t.preventDefault();var o=n(r),a,s=o.data("bs.collapse")?"toggle":r.data();i.call(o,s)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',i=function(t){e(t).on("click.bs.dropdown",this.toggle)};function r(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?e(document).find(n):null;return i&&i.length?i:t.parent()}function o(i){i&&3===i.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=r(t),o={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&e.contains(n[0],i.target)||(n.trigger(i=e.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function a(t){return this.each((function(){var n=e(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new i(this)),"string"==typeof t&&r[t].call(n)}))}i.VERSION="3.4.1",i.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var i=r(n),a=i.hasClass("open");if(o(),!a){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var s={relatedTarget:this};if(i.trigger(t=e.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(e.Event("shown.bs.dropdown",s))}return!1}},i.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),a=o.hasClass("open");if(!a&&27!=t.which||a&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+s);if(l.length){var c=l.index(t.target);38==t.which&&c>0&&c--,40==t.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:r},c.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==e.inArray(r,t)&&delete i[r];return(n=e.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=l(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,i){n[e]!=i&&(t[e]=i)})),t},c.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},c.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(e(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=r[0].offsetWidth,h=r[0].offsetHeight;if(l){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+h>p.bottom?"top":"top"==a&&u.top-hp.width?"left":"left"==a&&u.left-da.top+a.height&&(r.top=a.top+a.height-l)}else{var c=t.left-o,u=t.left+o+n;ca.right&&(r.left=a.left+a.width-u)}return r},c.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},c.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},c.prototype.sanitizeHtml=function(e){return l(e,this.options.whiteList,this.options.sanitizeFn)};var d=e.fn.tooltip;e.fn.tooltip=u,e.fn.tooltip.Constructor=c,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=d,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof n&&n;!r&&/destroy|hide/.test(n)||(r||i.data("bs.popover",r=new t(this,o)),"string"==typeof n&&r[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===i&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),r=t.data("target")||t.attr("href"),o=/^#./.test(r)&&e(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),i=this.offsets,r=this.targets,o=this.activeTarget,a;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(a=r[r.length-1])&&this.activate(a);if(o&&e=i[a]&&(void 0===i[a+1]||e .active"),a=r&&e.support.transition&&(o.length&&o.hasClass("fade")||!!i.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(t.TRANSITION_DURATION):s(),o.removeClass("in")};var i=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var r=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(e){"use strict";var t=function(n,i){this.options=e.extend({},t.DEFAULTS,i);var r=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new t(this,o)),"string"==typeof n&&r[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return r=e-i&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,n,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-n-o})}};var i=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),i=t.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(t,i)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"4.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,i,r){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),a=t("path"),s=t("detect-libc");Math.random();var l=a.join(r,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+s.family:""),"fibers");try{process.fiberLib=e.exports=t(l).Fiber}catch(u){throw console.error("## There is an issue with `node-fibers` ##\n`"+l+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+r.replace(" ","\\ ")+"/build"),console.error(u.stack||u.message||u),new Error("Missing binary. See message above.")}c(e.exports)}function c(e){try{var t=process.binding("async_wrap"),n,i,r;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");c=t.constants.kStackLength,n=function(){return t.async_hook_fields[c]}}if(!t.popAsyncIds||!t.pushAsyncIds)throw new Error("Push/pop do not exist");i=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,r=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var o=t.async_id_fields||t.async_uid_fields;function a(){for(var e=n(),a=new Array(e);e>0;--e){var s=o[i];a[e-1]={asyncId:s,triggerId:o[r]},t.popAsyncIds(s)}return a}function s(e){for(var n=0;n0)r.changeLanguage(e,i);else if(0!=s[l]){s[l]=0;var c=new XMLHttpRequest;c.overrideMimeType("application/json"),c.open("GET",l,!1),c.send(null),200===c.status?s[l]=1:s[l]=-1,n.addResourceBundle(e,a,JSON.parse(c.response)||{}),r.changeLanguage(e,i)}};n.changeLanguage=p;var m=function(e,t,n){return r.format(e,t,n)};n.format=m;var g=function(){return r.languages};n.getLanguages=g;var _=function(e,t){return r.loadLanguages(e,t)};n.loadLanguages=_;var v=function(e,t){return r.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return r.on(e,t)};n.on=y;var b=function(e,t){return r.off(e,t)};n.off=b,i.__exportStar(t("./i18n/i18n"),n),i.__exportStar(t("./i18n/i18n.app"),n),i.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var i=t("../index"),r=t("underscore"),o=t("clone"),a="_",s="base",l="core",c="translation",u=function(e,t){var n={lng:t,ns:c};if((0,i.exists)(e,n))return(0,i._t)(e,n)},d=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},f=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},m=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},g=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},_=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var i=d(t);return u(i,e)||n||""},b=function(e,t,n,i,r){var o=h(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=b(e,s,n,i,r))}return a||i||""},w=function(e,t,n,i,r){var o=f(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=w(e,s,n,i,r))}return a||i||""},x=function(e,t,n,i){var r=p(t,n);return u(r,e)||i||""},S=function(e,t,n,i,r,o){var a=m(t,n,i),s=u(a,e);if(!s){var l=v(o);l&&"base"!=t&&"core"!=t&&(s=S(e,l,n,i,r,o))}return s||r||""},C=function(e,t,n,i,r){var o=g(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=C(e,s,n,i,r))}return a||i||""},k=function(e,t,n,i,r){var o=_(t,n),a=u(o,e);if(!a){var s=v(r);s&&"base"!=t&&"core"!=t&&(a=k(e,s,n,i,r))}return a||i||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){r.forEach(e.fields,(function(e,t){var n=[];if(e.options&&r.isString(e.options))try{r.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),r.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(i){console.error("convertFieldsOptions error: ",e.options,i)}else e.options&&!r.isFunction(e.options)&&!r.isArray(e.options)&&r.isObject(e.options)&&(r.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),r.each(n.fields,(function(i,o){if(i.label=b(e,t,o,i.label,n.datasource),i.inlineHelpText&&(i.inlineHelpText=w(e,t,o,i.inlineHelpText,n.datasource)),i.group&&(i.group=x(e,t,i.group,i.group)),i.options){var a=[];r.each(i.options,(function(i){if(r.has(i,"value")){var s=S(e,t,o,i.value,i.label,n.datasource);a.push(r.extend({},i,{label:s}))}else a.push(i)})),i.options=a}})),r.each(n.actions,(function(i,r){i.label=C(e,t,r,i.label,n.datasource)})),r.each(n.list_views,(function(i,r){i.label=k(e,t,r,i.label,n.datasource)}))};n.translationI18nObject=A;var T=function(e){r.each(e,(function(e){(0,i.addResourceBundle)(e.lng,c,e.data,!0,!0)}))};n.addObjectsI18n=T;var I=function(e,t){r.each(t,(function(t,i){(0,n.translationI18nObject)(e,i,t)}))};n.translationI18nObjects=I;var B=function(e,t,n){var i=o(n);E(i);var a={};return a[d(t)]=y(e,t,i.label),r.each(i.fields,(function(n,o){a[h(t,o)]=b(e,t,o,n.label),n.inlineHelpText&&(a[f(t,o)]=w(e,t,o,n.inlineHelpText,i.datasource)),n.group&&(a[p(t,n.group)]=x(e,t,n.group,n.group)),n.options&&r.each(n.options,(function(n){r.has(n,"value")&&(a[m(t,o,n.value)]=S(e,t,o,n.value,n.label))}))})),r.each(i.actions,(function(n,i){a[g(t,i)]=C(e,t,i,n.label)})),r.each(i.list_views,(function(n,i){a[_(t,i)]=k(e,t,i,n.label)})),a};n.getObjectI18nTemplate=B,n.fallbackKeys={getObjectLabelKey:d,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:f,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:m,getObjectActionLabelKey:g,getObjectListviewLabelKey:_}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var i=t("../index"),r=t("underscore"),o=t("clone"),a="translation",s="_",l=function(e,t){var n={lng:t,ns:a};if((0,i.exists)(e,n))return(0,i._t)(e,n)},c=function(e){return"app".concat("_").concat(e).concat("_","name")},u=function(e){return"app".concat("_").concat(e).concat("_","description")},d=function(e){return"menu".concat("_").concat(e)},h=function(e,t,n){var i=c(t);return l(i,e)||n||""},f=function(e,t,n){var i=u(t);return l(i,e)||n||""},p=function(e,t,n){var i=d(t);return l(i,e)||n||""},m=function(e,t,i){i.label=h(e,t,i.label||i.name),i.description=f(e,t,i.description),(0,n.translationI18nMenus)(e,i.admin_menus)},g=function(e,t){r.each(t,(function(t){var n=p(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=g;var _=function(e,t){r.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=_;var v=function(e,t,n){var i=o(n),a={};return a[c(t)]=h(e,t,i.label||i.name),a[u(t)]=f(e,t,i.description),r.each(i.admin_menus,(function(t){a[d(t._id)]=p(e,t._id,t.label||t.name)})),a};n.getAppI18nTemplate=v,n.appFallbackKeys={getAppLabelKey:c,getAppDescriptionKey:u,getMenuLabelKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var i=t("tslib"),r=t("underscore");i.__exportStar(t("./objectTranslation"),n),i.__exportStar(t("./translation"),n),i.__exportStar(t("./templates/objectTranslation"),n),i.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},a=function(e){r.forEach(e.fields,(function(e,t){var n=[];if(e.options&&r.isString(e.options))try{r.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),r.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(i){console.error("convertFieldsOptions error: ",e.options,i)}else if(e.options&&r.isArray(e.options))try{r.forEach(e.options,(function(e){r.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(i){console.error("Creator.convertFieldsOptions",e.options,i)}else e.options&&!r.isFunction(e.options)&&!r.isArray(e.options)&&r.isObject(e.options)&&(r.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},s;n.convertObject=a,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(s=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var r=t("underscore"),o=t("./"),a=t("../index"),s=t("./index"),l=t("../i18n/i18n"),c=t("lodash"),u=t("crypto"),d,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function f(e){var t;return u.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(f(JSON.stringify(t)))},m=t("clone"),g=".",_="base",v="core",y="translation",b="object",w="field",x="listview",S="action",C=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,a.exists)(e,n))return(0,a._t)(e,n)},k=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},T=function(e){var t;return[D("object"),e,"description"].join(".")},I=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},B=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},M=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),i;return[D("field"),e,"group",n].join(".")},j=function(e,t,n){var i;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},P=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},R=function(e,t,n){var i,r=[A(t)],o=l.fallbackKeys.getObjectLabelKey(t);return o&&r.push(o),C(r,e)||n||""};n.translationObjectLabel=R;var N=function(e,t,n){var i=T(t);return C(i,e)||n||""},L=function(e,t,n,i,r,o){var a,s=[I(t,n)],c=l.fallbackKeys.getObjectFieldLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=L(e,d,n,i,r))}return u||i||""},z=function(e,t,n,i,r,o){var a,s=[B(t,n)],c=l.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=z(e,d,n,i,r))}return u||i||""},V=function(e,t,n,i,r,o){var a=O(t,n),s,l=C([a],e);if(1!=o&&!l){var c=k(r);c&&"base"!=t&&"core"!=t&&(l=V(e,c,n,i,r))}return l||i||""},$=function(e,t,n,i,r,o){var a,s=[M(t,n)],c=l.fallbackKeys.getObjectFieldGroupKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=$(e,d,n,i,r))}return u||i||""},H=function(e,t,n,i,r,o,a){var s,c=[j(t,n,i)],u=l.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,i);u&&c.push(u);var d=C(c,e);if(1!=a&&!d){var h=k(o);h&&"base"!=t&&"core"!=t&&(d=H(e,h,n,i,r,o))}return d||r||""},W=function(e,t,n,i,r,o){var a,s=[P(t,n)],c=l.fallbackKeys.getObjectActionLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=W(e,d,n,i,r))}return u||i||""},U=function(e,t,n,i,r,o){var a,s=[F(t,n)],c=l.fallbackKeys.getObjectListviewLabelKey(t,n);c&&s.push(c);var u=C(s,e);if(1!=o&&!u){var d=k(r);d&&"base"!=t&&"core"!=t&&(u=U(e,d,n,i,r))}return u||i||""},q=function(e,t,i,o,a){void 0===a&&(a=!1);var l=p(e,i);"test_obj_layout1"===t&&console.log("translationObject",t,l);var u=h.get(l);if(u)return Object.assign(i,(0,c.cloneDeep)(u));o&&(0,s.convertObject)(i),i.label=(0,n.translationObjectLabel)(e,t,i.label),i.description=N(e,t,i.description),r.each(i.fields,(function(n,o){if(n.label=L(e,t,o,n.label,i.datasource,a),n.inlineHelpText&&(n.inlineHelpText=z(e,t,o,n.inlineHelpText,i.datasource,a)),n.group&&(n.group=$(e,t,n.group,n.group,i.datasource,a)),n.options){var s=[];r.each(n.options,(function(n){if(r.has(n,"value")){var l=H(e,t,o,n.value,n.label,i.datasource,a);s.push(r.extend({},n,{label:l}))}else s.push(n)})),n.options=s}})),r.each(i.actions,(function(n,r){n.label=W(e,t,r,n.label,i.datasource,a)})),r.each(i.list_views,(function(n,r){n.label=U(e,t,r,n.label,i.datasource,a)})),h.set(l,(0,c.cloneDeep)(i))};n.translationObject=q;var K=function(e,t){r.each(t,(function(t,i){(0,n.translationObject)(e,i,t)}))};n.translationObjects=K;var G=function(e,t,i){var o=m(i);(0,s.convertObject)(o);var a={};return a[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),a[T(t)]=N(e,t,o.description),r.each(o.fields,(function(n,i){a[I(t,i)]=L(e,t,i,n.label),n.inlineHelpText&&(a[B(t,i)]=z(e,t,i,n.inlineHelpText,o.datasource)),n.description&&(a[O(t,i)]=V(e,t,i,n.description,o.datasource)),n.group&&(a[M(t,n.group)]=$(e,t,n.group,n.group,o.datasource)),n.options&&r.each(n.options,(function(n){r.has(n,"value")&&(a[j(t,i,n.value)]=H(e,t,i,n.value,n.label))}))})),r.each(o.actions,(function(n,i){a[P(t,i)]=W(e,t,i,n.label)})),r.each(o.list_views,(function(n,i){a[F(t,i)]=U(e,t,i,n.label)})),a};function Y(e,t){var n=m(e);(0,s.convertObject)(n);var i={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),i[A(o)]=n.label,i[T(o)]=n.description,r.each(n.fields,(function(e,t){i[I(o,t)]=e.label,e.help&&(i[B(o,t)]=e.help),e.description&&(i[O(o,t)]=e.description),e.options&&r.each(e.options,(function(e){r.has(e,"value")&&(i[j(o,t,e.value)]=e.label)}))})),r.each(n.groups,(function(e,t){i[M(o,t)]=e})),r.each(n.actions,(function(e,t){i[P(o,t)]=e.label})),r.each(n.listviews,(function(e,t){i[F(o,t)]=e.label})),r.each(n.CustomLabels,(function(e,t){i[E(t)]=e})),i}n.getObjectTranslationTemplate=G;var X=function(e){r.each(e,(function(e){var t=Y(e.data,e.__filename);(0,a.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=void 0;var i=t("../index"),r=t("underscore"),o=t("./"),a=t("../i18n/i18n.app"),s=t("clone"),l="translation",c=".",u="app",d="menu",h=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;default:return"CustomLabels"}},f=function(e){var t;return[h(),e].join(".")},p=function(e,t){var n={lng:t,ns:l,keySeparator:!1};if((0,i.exists)(e,n))return(0,i._t)(e,n)},m=function(e){var t;return[h("app"),e,"name"].join(".")},g=function(e){var t;return[h("app"),e,"description"].join(".")},_=function(e){var t;return[h("menu"),"menu_".concat(e)].join(".")},v=function(e,t,n){var i,r=[m(t)],o=a.appFallbackKeys.getAppLabelKey(t);return o&&r.push(o),p(r,e)||n||""},y=function(e,t,n){var i,r=[g(t)],o=a.appFallbackKeys.getAppDescriptionKey(t);return o&&r.push(o),p(r,e)||n||""},b=function(e,t,n){var i,r=[_(t)],o=a.appFallbackKeys.getMenuLabelKey(t);return o&&r.push(o),p(r,e)||n||""},w=function(e,t,i){i.label=v(e,t,i.label||i.name),i.description=y(e,t,i.description),(0,n.translationMenus)(e,i.admin_menus)};n.translationApp=w;var x=function(e,t){r.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=x;var S=function(e,t){r.each(t,(function(t,i){(0,n.translationApp)(e,i,t)}))};n.translationApps=S;var C=function(e,t,n){var i=s(n),o={};return o[m(t)]=v(e,t,i.label||i.name),o[g(t)]=y(e,t,i.description),r.each(i.admin_menus,(function(t){o[_(t._id)]=b(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var k=function(e,t,n){r.isArray(n)?r.each(n,(function(e){k(e,"",e)})):n&&r.each(r.keys(n),(function(i){var o=t?"".concat(t,".").concat(i):i,a=n[i];"object"==typeof a?r.isArray(a)?r.each(a,(function(e){k(e,o,a)})):k(e,o,a):e[o]=a}))};function D(e){for(var t in e)"object"==typeof e[t]&&k(e,t,e[t]);return e}n.convertTranslationData=D;var E=function(e){var t=s(e),n={};return r.each(t.CustomApplications,(function(e,t){n[m(t)]=e.name,n[g(t)]=e.description})),r.each(t.CustomLabels,(function(e,t){var i;if("simpleschema"!=t&&r.isObject(e)){var o=D(((i={})[t]=e,i));r.each(o,(function(e,t){r.isObject(e)||(n[f(t)]=e)}))}else n[f(t)]=e})),n};n.convertTranslation=E;var A=function(e){r.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,i.addResourceBundle)(e.lng,l,t,!0,!0)}))};n.addTranslations=A},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var i=t("underscore"),r=t("../index"),o=t("clone");function a(e,t){var n={};return i.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function s(e){return a(["label","description"],e)}function l(e){switch(e.type){case"select":return a(["label","help","options","description"],e);default:return a(["label","help","description"],e)}}function c(e){return a(["label"],e)}function u(e){return a(["label"],e)}function d(e){var t={};return i.each(e,(function(e,n){t[n]=l(e)})),t}function h(e){var t={};return i.each(e,(function(e,n){t[n]=u(e)})),t}function f(e){var t={};return i.each(e,(function(e,n){t[n]=c(e)})),t}function p(e,t){var n={};return i.each(e,(function(e,i){if(e.group){var r=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[r]=t[i].group}})),n}var m=function(e,t,n,a){void 0===a&&(a=!1);var l=o(n);1!=a&&(0,r.translationObject)(e,t,l,!0,a);var c=Object.assign({},s(l));c=Object.assign({},c,{fields:d(l.fields)});var u=p(n.fields,l.fields);i.isEmpty(u)||(c=Object.assign({},c,{groups:u}));var m=f(l.list_views);i.isEmpty(m)||(c=Object.assign({},c,{listviews:m}));var g=h(l.actions);return i.isEmpty(g)||(c=Object.assign({},c,{actions:g})),Object.assign({name:t},c)};n.getObjectMetadataTranslationTemplate=m},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var i=t("underscore"),r=t("../index"),o=t("clone");function a(e,t){var n={};return i.each(e,(function(e){n[e]=t[e]||""})),n}var s=function(e){return a(["name","description"],e)},l=function(e,t,n){var i,a=o(n),l;return(0,r.translationApp)(e,t,a),Object.assign({},{CustomApplications:(i={},i[t]=s(a),i)})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",main:"./dist/cjs/i18next.js",module:"./dist/esm/i18next.js"}},dist:{cjs:{"i18next.js":function e(t,n,e){"use strict";var i=t("@babel/runtime/helpers/typeof"),r=t("@babel/runtime/helpers/objectSpread"),o=t("@babel/runtime/helpers/classCallCheck"),a=t("@babel/runtime/helpers/createClass"),s=t("@babel/runtime/helpers/possibleConstructorReturn"),l=t("@babel/runtime/helpers/getPrototypeOf"),c=t("@babel/runtime/helpers/assertThisInitialized"),u=t("@babel/runtime/helpers/inherits");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(i),f=d(r),p=d(o),m=d(a),g=d(s),_=d(l),v=d(c),y=d(u),b={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},w,x=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.init(t,n)}return m.default(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||b,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),i=0;i1?n-1:0),r=1;r-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(r())return{};var a=i(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return r()?{}:{obj:e,k:i(o.shift())}}function A(e,t,n){var i=E(e,t,Object),r,o;i.obj[i.k]=n}function T(e,t,n,i){var r=E(e,t,Object),o=r.obj,a=r.k;o[a]=o[a]||[],i&&(o[a]=o[a].concat(n)),i||o[a].push(n)}function I(e,t){var n=E(e,t),i=n.obj,r=n.k;if(i)return i[r]}function B(e,t,n){var i=I(e,n);return void 0!==i?i:I(t,n)}function O(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):O(e[i],t[i],n):e[i]=t[i]);return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var j={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return j[e]})):e}var F="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p.default(this,t),n=g.default(this,_.default(t).call(this)),F&&S.call(v.default(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return y.default(t,e),m.default(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[t,n];return i&&"string"!=typeof i&&(a=a.concat(i)),i&&"string"==typeof i&&(a=a.concat(o?i.split(o):i)),t.indexOf(".")>-1&&(a=t.split(".")),I(this.data,a)}},{key:"addResource",value:function e(t,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[t,n];i&&(s=s.concat(a?i.split(a):i)),t.indexOf(".")>-1&&(r=n,n=(s=t.split("."))[1]),this.addNamespaces(n),A(this.data,s,r),o.silent||this.emit("added",t,n,i,r)}},{key:"addResources",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in i)"string"!=typeof i[o]&&"[object Array]"!==Object.prototype.toString.apply(i[o])||this.addResource(t,n,o,i[o],{silent:!0});r.silent||this.emit("added",t,n,i)}},{key:"addResourceBundle",value:function e(t,n,i,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(r=i,i=n,n=(s=t.split("."))[1]),this.addNamespaces(n);var l=I(this.data,s)||{};r?O(l,i,o):l=f.default({},l,i),A(this.data,s,l),a.silent||this.emit("added",t,n,i)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?f.default({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(S),N={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,i,r,o){var a=this;return t.forEach((function(e){a.processors[e]&&(n=a.processors[e].process(n,i,r,o))})),n}},L={},z=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p.default(this,t),n=g.default(this,_.default(t).call(this)),F&&S.call(v.default(n)),D(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,v.default(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=x.create("translator"),n}return y.default(t,e),m.default(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i=this.resolve(t,n);return i&&void 0!==i.res}},{key:"extractFromKey",value:function e(t,n){var i=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");var r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(i&&t.indexOf(i)>-1){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};var s=t.split(i);(i!==r||i===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),t=s.join(r)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,i,r){var o=this;if("object"!==h.default(i)&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var a=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=this.extractFromKey(n[n.length-1],i),l=s.key,c=s.namespaces,u=c[c.length-1],d=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var m=i.nsSeparator||this.options.nsSeparator;return u+m+l}return l}var g=this.resolve(n,i),_=g&&g.res,v=g&&g.usedKey||l,y=g&&g.exactUsedKey||l,b=Object.prototype.toString.apply(_),w=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,C="string"!=typeof _&&"boolean"!=typeof _&&"number"!=typeof _;if(S&&_&&C&&w.indexOf(b)<0&&("string"!=typeof x||"[object Array]"!==b)){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,_,i):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");if(a){var k="[object Array]"===b,D=k?[]:{},E=k?y:v;for(var A in _)if(Object.prototype.hasOwnProperty.call(_,A)){var T="".concat(E).concat(a).concat(A);D[A]=this.translate(T,f.default({},i,{joinArrays:!1,ns:c})),D[A]===T&&(D[A]=_[A])}_=D}}else if(S&&"string"==typeof x&&"[object Array]"===b)(_=_.join(x))&&(_=this.extendTranslation(_,n,i,r));else{var I=!1,B=!1,O=void 0!==i.count&&"string"!=typeof i.count,M=t.hasDefaultValue(i),j=O?this.pluralResolver.getSuffix(d,i.count):"",P=i["defaultValue".concat(j)]||i.defaultValue;!this.isValidLookup(_)&&M&&(I=!0,_=P),this.isValidLookup(_)||(B=!0,_=l);var F=M&&P!==_&&this.options.updateMissing;if(B||I||F){if(this.logger.log(F?"updateKey":"missingKey",d,u,l,F?P:_),a){var R=this.resolve(l,f.default({},i,{keySeparator:!1}));R&&R.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.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},r,o,a,s,l;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(r)){var t=n.extractFromKey(e,i),c=t.key;o=c;var u=t.namespaces;n.options.fallbackNS&&(u=u.concat(n.options.fallbackNS));var d=void 0!==i.count&&"string"!=typeof i.count,h=void 0!==i.context&&"string"==typeof i.context&&""!==i.context,f=i.lngs?i.lngs:n.languageUtils.toResolveHierarchy(i.lng||n.language,i.fallbackLng);u.forEach((function(e){n.isValidLookup(r)||(l=e,!L["".concat(f[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(l)&&(L["".concat(f[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(l,'" 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!!!")),f.forEach((function(t){if(!n.isValidLookup(r)){s=t;var o=c,l=[o],u,f;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(l,c,t,e,i);else d&&(u=n.pluralResolver.getSuffix(t,i.count)),d&&h&&l.push(o+u),h&&l.push(o+="".concat(n.options.contextSeparator).concat(i.context)),d&&l.push(o+=u);for(;f=l.pop();)n.isValidLookup(r)||(a=f,r=n.getResource(t,e,f,i))}})))}))}})),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,i,r):this.resourceStore.getResource(t,n,i,r)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&n===i.substring(0,n.length)&&void 0!==t[i])return!0;return!1}}]),t}(S);function V(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $=function(){function e(t){p.default(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return m.default(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=t.split("-");return this.options.lowerCaseLng?i=i.map((function(e){return e.toLowerCase()})):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=V(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=V(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=V(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,i;return t?(t.forEach((function(e){if(!i){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(i=t)}})),!i&&this.options.supportedLngs&&t.forEach((function(e){if(!i){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return i=t;i=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}},{key:"toResolveHierarchy",value:function e(t,n){var i=this,r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=function e(t){t&&(i.isSupportedCode(t)?o.push(t):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(t))):"string"==typeof t&&a(this.formatLanguageCode(t)),r.forEach((function(e){o.indexOf(e)<0&&a(i.formatLanguageCode(e))})),o}}]),e}(),H=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],W={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function U(){var e={};return H.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:W[t.fc]}}))})),e}var q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),this.rules=U()}return m.default(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,i=this.getRule(t);return i?i.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var i=this,r=this.getRule(t);if(r){var o=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var s=function e(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):s():"v2"===this.options.compatibilityJSON?s():this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p.default(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return m.default(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:P,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?M(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?M(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?M(n.nestingPrefix):n.nestingPrefixEscaped||M("$t("),this.nestingSuffix=n.nestingSuffix?M(n.nestingSuffix):n.nestingSuffixEscaped||M(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function e(t,n,i,r){var o=this,a,s,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var d=function e(t){if(t.indexOf(o.formatSeparator)<0){var a=B(n,c,t);return o.alwaysFormat?o.format(a,void 0,i):a}var s=t.split(o.formatSeparator),l=s.shift().trim(),u=s.join(o.formatSeparator).trim();return o.format(B(n,c,l),u,i,r)};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return u(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?u(o.escape(t)):u(t)}}].forEach((function(e){for(l=0;a=e.regex.exec(t);){if(void 0===(s=d(a[1].trim())))if("function"==typeof h){var n=h(t,a,r);s="string"==typeof n?n:""}else{if(f){s=a[0];continue}o.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(t)),s=""}else"string"==typeof s||o.useRawValueToEscape||(s=k(s));if(t=t.replace(a[0],e.safeValue(s)),e.regex.lastIndex=0,++l>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o,a,s=f.default({},r);function l(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,s)).replace(/'/g,'"');try{s=JSON.parse(r),t&&(s=f.default({},t,s))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(n).concat(r)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;o=this.nestingRegexp.exec(t);){var c=[],u=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var d=o[1].split(this.formatSeparator).map((function(e){return e.trim()}));o[1]=d.shift(),c=d,u=!0}if((a=n(l.call(this,o[1].trim(),s),s))&&o[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=k(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),u&&(a=c.reduce((function(e,t){return i.format(e,t,r.lng,r)}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),e}();function G(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var Y=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p.default(this,t),r=g.default(this,_.default(t).call(this)),F&&S.call(v.default(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=o,r.logger=x.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,o.backend,o),r}return y.default(t,e),m.default(t,[{key:"queueLoad",value:function e(t,n,i,r){var o=this,a=[],s=[],l=[],c=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var r="".concat(e,"|").concat(n);!i.reload&&o.store.hasResourceBundle(e,n)?o.state[r]=2:o.state[r]<0||(1===o.state[r]?s.indexOf(r)<0&&s.push(r):(o.state[r]=1,t=!1,s.indexOf(r)<0&&s.push(r),a.indexOf(r)<0&&a.push(r),c.indexOf(n)<0&&c.push(n)))})),t||l.push(e)})),(a.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:r}),{toLoad:a,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,n,i){var r=t.split("|"),o=r[0],a=r[1];n&&this.emit("failedLoading",o,a,n),i&&this.store.addResourceBundle(o,a,i),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(i){T(i.loaded,[o],a),G(i.pending,t),n&&i.errors.push(n),0!==i.pending.length||i.done||(Object.keys(i.loaded).forEach((function(t){e[t]||(e[t]=[]),i.loaded[t].length&&i.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[i](t,n,(function(e,l){e&&l&&o<5?setTimeout((function(){r.read.call(r,t,n,i,o+1,2*a,s)}),a):s(e,l)})):s(null,{})}},{key:"prepareLoading",value:function e(t,n){var i=this,r=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();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach((function(e){i.loadOne(e)}))}},{key:"load",value:function e(t,n,i){this.prepareLoading(t,n,{},i)}},{key:"reload",value:function e(t,n,i){this.prepareLoading(t,n,{reload:!0},i)}},{key:"loadOne",value:function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(function(e,r){e&&n.logger.warn("".concat(i,"loading namespace ").concat(a," for language ").concat(o," failed"),e),!e&&r&&n.logger.log("".concat(i,"loaded namespace ").concat(a," for language ").concat(o),r),n.loaded(t,e,r)}))}},{key:"saveMissing",value:function e(t,n,i,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" 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!!!"):null!=i&&""!==i&&(this.backend&&this.backend.create&&this.backend.create(t,n,i,r,null,f.default({},a,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],n,i,r))}}]),t}(S);function X(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!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,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===h.default(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===h.default(t[2])||"object"===h.default(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,i,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function J(){}var Q,ee=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(p.default(this,t),e=g.default(this,_.default(t).call(this)),F&&S.call(v.default(e)),e.options=Z(n),e.services={},e.logger=x,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),g.default(e,v.default(e));setTimeout((function(){e.init(n,i)}),0)}return e}return y.default(t,e),m.default(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(i=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=f.default({},X(),this.options,Z(n)),this.format=this.options.interpolation.format,i||(i=J),!this.options.isClone){this.modules.logger?x.init(r(this.modules.logger),this.options):x.init(null,this.options);var o=new $(this.options);this.store=new R(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new q(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new K(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new Y(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var u=C(),d=function e(){var n=function e(n,r){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(r),i(n,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),u}},{key:"loadResources",value:function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,r=i,o="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var a=[],s=function e(t){var i;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};if(o)s(o);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(a,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function e(t,n,i){var r=C();return t||(t=this.languages),n||(n=this.options.ns),i||(i=J),this.services.backendConnector.reload(t,n,(function(e){r.resolve(),i(e)})),r}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&N.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var i=this;this.isLanguageChangingTo=t;var r=C();this.emit("languageChanging",t);var o=function e(t,o){o?(i.language=o,i.languages=i.services.languageUtils.toResolveHierarchy(o),i.translator.changeLanguage(o),i.isLanguageChangingTo=void 0,i.emit("languageChanged",o),i.logger.log("languageChanged",o)):i.isLanguageChangingTo=void 0,r.resolve((function(){return i.t.apply(i,arguments)})),n&&n(t,(function(){return i.t.apply(i,arguments)}))},a=function e(t){var n="string"==typeof t?t:i.services.languageUtils.getBestMatchFromCodes(t);n&&(i.language||(i.language=n,i.languages=i.services.languageUtils.toResolveHierarchy(n)),i.translator.language||i.translator.changeLanguage(n),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(n)),i.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function e(t,n){var i=this,r=function e(t,n){var r;if("object"!==h.default(n)){for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;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;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function e(t,i){var r=n.services.backendConnector.state["".concat(t,"|").concat(i)];return-1===r||2===r};if(i.precheck){var l=i.precheck(this,s);if(void 0!==l)return l}return!!this.hasResourceBundle(r,t)||(!this.services.backendConnector.backend||!(!s(r,t)||o&&!s(a,t)))}},{key:"loadNamespaces",value:function e(t,n){var i=this,r=C();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){i.options.ns.indexOf(e)<0&&i.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var i=C();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],o=t.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["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"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new t(n,i)}},{key:"cloneInstance",value:function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,o=f.default({},this.options,i,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(e){a[e]=n[e]})),a.services=f.default({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new z(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;ie(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},c=new Set,u=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&m(n,`${e} option`,`options.${t}`,b)},d=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:i}=b,{get:r}=Object.getOwnPropertyDescriptor(i,e);m(n,`${e} method`,`cache.${t}()`,r)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:i}=b,{get:r}=Object.getOwnPropertyDescriptor(i,e);m(n,`${e} property`,`cache.${t}`,r)}},f=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!c.has(e),m=(e,t,n,i)=>{c.add(e);const r=`The ${t} is deprecated. Please use ${n} instead.`;f(r,"DeprecationWarning",e,i)},g=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),_=e=>g(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=_(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class b{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:s,dispose:l,disposeAfter:d,noDisposeOnSet:h,noUpdateTTL:m,maxSize:v=0,sizeCalculation:w,fetchMethod:x,fetchContext:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:k}=e,{length:D,maxAge:E,stale:A}=e instanceof b?{}:e;if(0!==t&&!g(t))throw new TypeError("max option must be a nonnegative integer");const T=t?_(t):Array;if(!T)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.sizeCalculation=w||D,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=x||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&void 0!==S)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new T(t),this.prev=new T(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof l&&(this.dispose=l),"function"==typeof d?(this.disposeAfter=d,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!C,0!==this.maxSize){if(!g(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!s||!!A,this.noDeleteOnStaleGet=!!k,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=g(i)||0===i?i:1,this.ttlAutopurge=!!r,this.ttl=n||E||0,this.ttl){if(!g(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){c.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";f(t,"UnboundedCacheWarning",e,b)}}A&&u("stale","allowStale"),E&&u("maxAge","ttl"),D&&u("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=i.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?i.now():0};let e=0;const t=()=>{const t=i.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const i=this.keyMap.get(n);return void 0===i?0:0===this.ttls[i]||0===this.starts[i]?1/0:this.starts[i]+this.ttls[i]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>this.calculatedSize-=this.sizes[e],this.requireSize=(e,t,n,i)=>{if(!g(n)){if(!i)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(t,e),!g(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t,n,i)=>{this.sizes[e]=i;const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t,n,i){}requireSize(e,t,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return d("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],r=this.valList[t],o=this.isBackgroundFetch(r)?r.__staleWhileFetching:r,a={value:o};if(this.ttls){a.ttl=this.ttls[t];const e=i.now()-this.starts[t];a.start=Math.floor(Date.now()-e)}this.sizes&&(a.size=this.sizes[t]),e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=i.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:i,noDisposeOnSet:r=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:s=this.noUpdateTTL}={}){o=this.requireSize(e,t,o,a);let l=0===this.size?void 0:this.keyMap.get(e);if(void 0===l)l=this.newIndex(),this.keyList[l]=e,this.valList[l]=t,this.keyMap.set(e,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,t,e,o),s=!1;else{const n=this.valList[l];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():r||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(l),this.valList[l]=t,this.addItemSize(l,t,e,o)),this.moveToTail(l)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),s||this.setItemTTL(l,n,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],i=this.valList[t];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n)))return this.valList[n]}backgroundFetch(e,t,n,i){const r=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(r))return r;const a=new o,s={signal:a.signal,options:n,context:i},l=t=>(a.signal.aborted||this.set(e,t,s.options),t),c=i=>{if(this.valList[t]===d){const i=!n.noDeleteOnFetchRejection||void 0===d.__staleWhileFetching;i?this.delete(e):this.valList[t]=d.__staleWhileFetching}if(d.__returned===d)throw i},u=t=>t(this.fetchMethod(e,r,s)),d=new Promise(u).then(l,c);return d.__abortController=a,d.__staleWhileFetching=r,d.__returned=null,void 0===t?(this.set(e,d,s.options),t=this.keyMap.get(e)):this.valList[t]=d,d}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,fetchContext:u=this.fetchContext}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:i});const d={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:s,noUpdateTTL:l,noDeleteOnFetchRejection:c};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,d,u);return t.__returned=t}{const i=this.valList[h];if(this.isBackgroundFetch(i))return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i;if(!this.isStale(h))return this.moveToTail(h),n&&this.updateItemAge(h),i;const r=this.backgroundFetch(e,h,d,u);return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const r=this.keyMap.get(e);if(void 0!==r){const o=this.valList[r],a=this.isBackgroundFetch(o);if(this.isStale(r))return a?t?o.__staleWhileFetching:void 0:(i||this.delete(e),t?o:void 0);if(a)return;return this.moveToTail(r),n&&this.updateItemAge(r),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return d("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return d("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return l}}e.exports=b}}}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",main:"tslib.js",module:"tslib.es6.js"}},"tslib.js":function e(t,n,e){ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -613,7 +613,7 @@ Package._define("steedos:cfs-worker"); !function(){var e=Package.meteor.Meteor,a=Package.meteor.global,t=Package.meteor.meteorEnv,o=Package["reactive-var"].ReactiveVar,l=Package["reactive-dict"].ReactiveDict,s=Package.random.Random,i=Package["ddp-client"].DDP,n=Package.check.check,c=Package.check.Match,r=Package.underscore._,d=Package.tracker.Tracker,g=Package.tracker.Deps,m=Package.session.Session,b=Package["templating-runtime"].Template,_=Package["aldeed:simple-schema"].SimpleSchema,u=Package["aldeed:simple-schema"].MongoObject,f=Package["universe:i18n"]._i18n,p=Package["universe:i18n"].i18n,k=Package.promise.Promise,P=Package.modules.meteorInstall,y=Package.modules.meteorBabelHelpers,h=Package["steedos:cfs-base-package"].FS,w=Package.blaze.Blaze,j=Package.blaze.UI,v=Package.blaze.Handlebars,D=Package.spacebars.Spacebars,S=Package["ecmascript-runtime-client"].Symbol,A=Package["ecmascript-runtime-client"].Map,T=Package["ecmascript-runtime-client"].Set,C=Package.htmljs.HTML,M,R=P({node_modules:{meteor:{"steedos:objects-billing":{models:{"billings.coffee":function a(){var t=M="object"==typeof M?M:{};db.billings=new e.Collection("billings"),db.billings.helpers({transaction_i18n:function(){var e,a;return e="",e="Starting balance"===(a=this.transaction)?TAPi18n.__("billing_tranDetail.starting"):"Payment"===a?TAPi18n.__("billing_tranDetail.payment"):"Service adjustment"===a?TAPi18n.__("billing_tranDetail.adjustment"):"workflow"===a?TAPi18n.__("billing_tranDetail.workflow"):"workflow.professional"===a?TAPi18n.__("billing_tranDetail.workflow"):"chat.professional"===a?TAPi18n.__("billing_tranDetail.chat"):a}}),e.isServer&&db.billings._ensureIndex({space:1},{background:!0})},"billing_pay_records.coffee":function a(){var t=M="object"==typeof M?M:{};db.billing_pay_records=new e.Collection("billing_pay_records"),db.billing_pay_records.helpers({order_created:function(){return moment(this.created).format("YYYY-MM-DD HH:mm:ss")},order_paid:function(){return this.paid?TAPi18n.__("billing.has_paid"):TAPi18n.__("billing.not_paid")},order_total_fee:function(){return(this.total_fee/100).toString()}}),Creator.Objects.billing_pay_records={name:"billing_pay_records",label:"订单",icon:"apps",fields:{info:{label:"详单详情",type:"object",blackbox:!0,omit:!0,hidden:!0},total_fee:{label:"金额¥",type:"number",defaultValue:100,omit:!0},paid:{label:"已付款",type:"boolean",omit:!0,defaultValue:!1},modules:{label:"模块",type:"[text]",blackbox:!0,omit:!0},end_date:{label:"租用日期至",type:"date",omit:!0},user_count:{label:"名额",type:"number",omit:!0}},list_views:{all:{label:"所有",filter_scope:"space",columns:["modules","user_count","end_date","total_fee","paid","created"]}},permission_set:{user:{allowCreate:!1,allowDelete:!1,allowEdit:!1,allowRead:!1,modifyAllRecords:!1,viewAllRecords:!1},admin:{allowCreate:!1,allowDelete:!1,allowEdit:!1,allowRead:!0,modifyAllRecords:!1,viewAllRecords:!0}}}},"modules.coffee":function a(){var t=M="object"==typeof M?M:{};db.modules=new e.Collection("modules")},"modules_changelogs.coffee":function a(){var t=M="object"==typeof M?M:{};db.modules_changelogs=new e.Collection("modules_changelogs")},"users_changelogs.coffee":function a(){var t=M="object"==typeof M?M:{};db.users_changelogs=new e.Collection("users_changelogs"),db.users_changelogs._simpleSchema=new _({change_date:{type:Date},operator:{type:String},space:{type:String},operation:{type:String},user:{type:String},user_count:{type:Number},created:{type:Date},created_by:{type:String}}),e.isServer&&db.users_changelogs.before.insert((function(e,a){return a.change_date=moment().format("YYYYMMDD"),a.created=new Date,a.created_by=e}))},"steedos_statistics.coffee":function a(){var t=M="object"==typeof M?M:{};db.steedos_statistics=new e.Collection("steedos_statistics")}}}}}},{extensions:[".js",".json",".coffee"]});R("/node_modules/meteor/steedos:objects-billing/models/billings.coffee"),R("/node_modules/meteor/steedos:objects-billing/models/billing_pay_records.coffee"),R("/node_modules/meteor/steedos:objects-billing/models/modules.coffee"),R("/node_modules/meteor/steedos:objects-billing/models/modules_changelogs.coffee"),R("/node_modules/meteor/steedos:objects-billing/models/users_changelogs.coffee"),R("/node_modules/meteor/steedos:objects-billing/models/steedos_statistics.coffee"),Package._define("steedos:objects-billing")}(); -!function(){var Meteor=Package.meteor.Meteor,global=Package.meteor.global,meteorEnv=Package.meteor.meteorEnv,Session=Package.session.Session,_=Package.underscore._,s=Package["underscorestring:underscore.string"].s,ReactiveVar=Package["reactive-var"].ReactiveVar,ReactiveDict=Package["reactive-dict"].ReactiveDict,Random=Package.random.Random,DDP=Package["ddp-client"].DDP,check=Package.check.check,Match=Package.check.Match,Tracker=Package.tracker.Tracker,Deps=Package.tracker.Deps,Tabular=Package["aldeed:tabular"].Tabular,AutoForm=Package["aldeed:autoform"].AutoForm,Template=Package["templating-runtime"].Template,Accounts=Package["accounts-base"].Accounts,CollectionHooks=Package["matb33:collection-hooks"].CollectionHooks,FlowRouter=Package["kadira:flow-router"].FlowRouter,BlazeLayout=Package["kadira:blaze-layout"].BlazeLayout,SubsManager=Package["meteorhacks:subs-manager"].SubsManager,moment=Package["momentjs:moment"].moment,SimpleSchema=Package["aldeed:simple-schema"].SimpleSchema,MongoObject=Package["aldeed:simple-schema"].MongoObject,_i18n=Package["universe:i18n"]._i18n,i18n=Package["universe:i18n"].i18n,E164=Package["steedos:e164-phones-countries"].E164,IsoCountries=Package["steedos:i18n-iso-countries"].IsoCountries,Promise=Package.promise.Promise,meteorInstall=Package.modules.meteorInstall,meteorBabelHelpers=Package.modules.meteorBabelHelpers,Blaze=Package.ui.Blaze,UI=Package.ui.UI,Handlebars=Package.ui.Handlebars,Spacebars=Package.spacebars.Spacebars,Collection2=Package["aldeed:collection2-core"].Collection2,FS=Package["steedos:cfs-base-package"].FS,Symbol=Package["ecmascript-runtime-client"].Symbol,Map=Package["ecmascript-runtime-client"].Map,Set=Package["ecmascript-runtime-client"].Set,HTML=Package.htmljs.HTML,Mongo=Package.mongo.Mongo,__coffeescriptShare,Steedos,AjaxCollection,SteedosDataManager,Selector,Modal,SteedosOffice,require=meteorInstall({node_modules:{meteor:{"steedos:base":{lib:{"steedos_util.js":function e(){Array.prototype.sortByName=function(e){this&&(e||(e=Steedos.locale()),this.sort((function(t,o){var n=t.sort_no||0,r=o.sort_no||0;return n!=r?n>r?-1:1:t.name.localeCompare(o.name,e)})))},Array.prototype.getProperty=function(e){var t=new Array;return this.forEach((function(o){var n=o?o[e]:null;t.push(n)})),t},Array.prototype.remove=function(e,t){if(!(e<0)){var o=this.slice((t||e)+1||this.length);return this.length=e<0?this.length+e:e,this.push.apply(this,o)}},Array.prototype.filterProperty=function(e,t){var o=[];return this.forEach((function(n){var r=n?n[e]:null,a=!1;r instanceof Array?a=r.includes(t):(r instanceof Object&&("id"in r?r=r.id:"_id"in r&&(r=r._id)),a=t instanceof Array?void 0!==t&&t.includes(r):void 0!==t&&r==t),a&&o.push(n)})),o},Array.prototype.findPropertyByPK=function(e,t){var o=null;return this.forEach((function(n){var r=n?n[e]:null,a=!1;(a=r instanceof Array?r.includes(t):void 0!==t&&r==t)&&(o=n)})),o}},"core.coffee":function module(require){__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};var share=__coffeescriptShare,Cookies,crypto,mixin,ref,ref1,ref2,ref3,ref4,rootUrl;Steedos={settings:{},db:db,subs:{},isPhoneEnabled:function(){var e,t;return!!(null!=(e=Meteor.settings)&&null!=(t=e.public)?t.phone:void 0)},numberToString:function(e,t,o){var n,r,a;return"number"==typeof e&&(e=e.toString()),e&&"NaN"!==e?((t||0===t)&&(e=Number(e).toFixed(t)),o||(t||0===t||(t=null!=(n=e.match(/\.(\d+)/))&&null!=(r=n[1])?r.length:void 0)||(t=0),a=/(\d)(?=(\d{3})+\.)/g,0===t&&(a=/(\d)(?=(\d{3})+\b)/g),e=e.replace(a,"$1,")),e):""},valiJquerySymbols:function(e){var t;return(t=new RegExp("^[^!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~]+$")).test(e)}},(Meteor.isCordova||Meteor.isClient)&&(rootUrl=Meteor.absoluteUrl.defaultOptions.rootUrl,rootUrl.endsWith("/")&&(rootUrl=rootUrl.substr(0,rootUrl.length-1)),null!=(ref=window.stores)&&null!=(ref1=ref.API)&&null!=(ref2=ref1.client)&&ref2.setUrl(rootUrl),null!=(ref3=window.stores)&&null!=(ref4=ref3.Settings)&&ref4.setRootUrl(rootUrl),window["steedos.setting"]={rootUrl:rootUrl}),!Meteor.isCordova&&Meteor.isClient&&Meteor.startup((function(){var e,t,o,n;return null!=(e=window.stores)&&null!=(t=e.Settings)?t.setHrefPopup(null!=(o=Meteor.settings.public)&&null!=(n=o.ui)?n.href_popup:void 0):void 0})),Steedos.getHelpUrl=function(e){var t;return"http://www.steedos.com/"+(t=e.substring(3))+"/help/"},Steedos.isExpression=function(e){var t,o,n;return"string"==typeof e&&(t=/^{{(.+)}}$/,o=/^{{(function.+)}}$/,n=/^{{(.+=>.+)}}$/,!("string"!=typeof e||!e.match(t)||e.match(o)||e.match(n)))},Steedos.parseSingleExpression=function(e,t,o,n){var r,a,s,i,c,l,u,d;if(i=function(e,t){return"#"!==t&&t?"string"==typeof t?_.get(e,t):void console.error("path has to be a string"):e||{}},void 0===t&&(t={}),l=i(t,u=(s=function(e){var t;return"string"==typeof e?1===(t=e.split(".")).length?"#":(t.pop(),t.join(".")):"#"})(o))||{},"string"!=typeof e)return e;c="__G_L_O_B_A_L__",d="\n return "+(a=e.substring(2,e.length-2)).replace(/\bformData\b/g,JSON.stringify(t).replace(/\bglobal\b/g,c)).replace(/\bglobal\b/g,JSON.stringify(n)).replace(new RegExp("\\b"+c+"\\b","g"),"global").replace(/rootValue/g,JSON.stringify(l));try{return Function(d)()}catch(p){return r=p,console.log(r,e,o),e}},Meteor.isClient&&(Steedos.spaceUpgradedModal=function(){return swal({title:TAPi18n.__("space_paid_info_title"),text:TAPi18n.__("space_paid_info_text"),html:!0,type:"warning",confirmButtonText:TAPi18n.__("OK")})},Steedos.getAccountBgBodyValue=function(){var e;return(e=db.steedos_keyvalues.findOne({user:Steedos.userId(),key:"bg_body"}))?e.value:{}},Steedos.applyAccountBgBodyValue=function(e,t){var o,n;if(!Meteor.loggingIn()&&Steedos.userId()||((e={}).url=localStorage.getItem("accountBgBodyValue.url"),e.avatar=localStorage.getItem("accountBgBodyValue.avatar")),n=e.url,o=e.avatar,t){if(Meteor.loggingIn())return;if(Steedos.userId())return n?(localStorage.setItem("accountBgBodyValue.url",n),localStorage.setItem("accountBgBodyValue.avatar",o)):(localStorage.removeItem("accountBgBodyValue.url"),localStorage.removeItem("accountBgBodyValue.avatar"))}},Steedos.getAccountSkinValue=function(){var e;return(e=db.steedos_keyvalues.findOne({user:Steedos.userId(),key:"skin"}))?e.value:{}},Steedos.getAccountZoomValue=function(){var e;return(e=db.steedos_keyvalues.findOne({user:Steedos.userId(),key:"zoom"}))?e.value:{}},Steedos.applyAccountZoomValue=function(e,t){var o,n;if(!Meteor.loggingIn()&&Steedos.userId()||((e={}).name=localStorage.getItem("accountZoomValue.name"),e.size=localStorage.getItem("accountZoomValue.size")),$("body").removeClass("zoom-normal").removeClass("zoom-large").removeClass("zoom-extra-large"),o=e.name,n=e.size,o||(o="large",n=1.2),o&&!Session.get("instancePrint")&&$("body").addClass("zoom-"+o),t){if(Meteor.loggingIn())return;if(Steedos.userId())return e.name?(localStorage.setItem("accountZoomValue.name",e.name),localStorage.setItem("accountZoomValue.size",e.size)):(localStorage.removeItem("accountZoomValue.name"),localStorage.removeItem("accountZoomValue.size"))}},Steedos.showHelp=function(e){var t,o;return t=(o=Steedos.getLocale()).substring(3),e=e||"http://www.steedos.com/"+t+"/help/",window.open(e,"_help","EnableViewPortScale=yes")},Steedos.getUrlWithToken=function(e){var t,o;return(t={}).spaceId=Steedos.getSpaceId(),t["X-User-Id"]=Meteor.userId(),t["X-Auth-Token"]=Accounts._storedLoginToken(),o="?",e.indexOf("?")>-1&&(o="&"),e+o+$.param(t)},Steedos.getAppUrlWithToken=function(e){var t;return(t={}).spaceId=Steedos.getSpaceId(),t["X-User-Id"]=Meteor.userId(),t["X-Auth-Token"]=Accounts._storedLoginToken(),"api/setup/sso/"+e+"?"+$.param(t)},Steedos.openAppWithToken=function(e){var t,o;return o=Steedos.getAppUrlWithToken(e),o=Steedos.absoluteUrl(o),(t=db.apps.findOne(e)).is_new_window||Steedos.isMobile()||Steedos.isCordova()?Steedos.openWindow(o):window.location=o},Steedos.openUrlWithIE=function(e){var t,o,n;if(e)return Steedos.isNode()?(o=nw.require("child_process").exec)(t='start iexplore.exe "'+(n=e)+'"',(function(e,t,o){e&&toastr.error(e)})):Steedos.openWindow(e)},Steedos.openApp=function(app_id){var app,cmd,e,evalFunString,exec,on_click,open_url,path;if(!Meteor.userId())return Steedos.redirectToSignIn(),!0;if(app=db.apps.findOne(app_id),app){if(on_click=app.on_click,app.is_use_ie)Steedos.isNode()?(exec=nw.require("child_process").exec,on_click?(path="api/app/sso/"+app_id+"?authToken="+Accounts._storedLoginToken()+"&userId="+Meteor.userId(),open_url=window.location.origin+"/"+path):(open_url=Steedos.getAppUrlWithToken(app_id),open_url=window.location.origin+"/"+open_url),cmd='start iexplore.exe "'+open_url+'"',exec(cmd,(function(e,t,o){e&&toastr.error(e)}))):Steedos.openAppWithToken(app_id);else if(db.apps.isInternalApp(app.url))FlowRouter.go(app.url);else if(app.is_use_iframe)!app.is_new_window||Steedos.isMobile()||Steedos.isCordova()?Steedos.isMobile()||Steedos.isCordova()?Steedos.openAppWithToken(app_id):FlowRouter.go("/apps/iframe/"+app._id):Steedos.openWindow(Steedos.absoluteUrl("apps/iframe/"+app._id));else if(on_click){evalFunString="(function(){"+on_click+"})()";try{eval(evalFunString)}catch(error1){e=error1,console.error("catch some error when eval the on_click script for app link:"),console.error(e.message+"\r\n"+e.stack)}}else Steedos.openAppWithToken(app_id);return app.is_new_window||Steedos.isMobile()||Steedos.isCordova()||app.is_use_ie||on_click?void 0:Session.set("current_app_id",app_id)}FlowRouter.go("/")},Steedos.checkSpaceBalance=function(e){var o,n,r;if(e||(e=Steedos.spaceId()),n=1,Steedos.isSpaceAdmin()&&(n=3),o=null!=(r=db.spaces.findOne(e))?r.end_date:void 0,r&&void 0!==o&&o-new Date<=30*n*24*3600*1e3)return toastr.error(t("space_balance_insufficient"))},Steedos.setModalMaxHeight=function(){var e,t;switch((e=Steedos.getAccountZoomValue()).name||(e.name="large"),e.name){case"normal":t=Steedos.isMobile()?-12:75;break;case"large":t=Steedos.isMobile()?-6:Steedos.detectIE()?199:9;break;case"extra-large":t=Steedos.isMobile()?-26:Steedos.detectIE()?303:53}if($(".modal").length)return $(".modal").each((function(){var e,o,n,r;return o=0,e=0,r=0,$(".modal-header",$(this)).each((function(){return o+=$(this).outerHeight(!1)})),$(".modal-footer",$(this)).each((function(){return e+=$(this).outerHeight(!1)})),r=o+e,n=$("body").innerHeight()-r-t,$(this).hasClass("cf_contact_modal")?$(".modal-body",$(this)).css({"max-height":n+"px",height:n+"px"}):$(".modal-body",$(this)).css({"max-height":n+"px",height:"auto"})}))},Steedos.getModalMaxHeight=function(e){var t,o;if(o=Steedos.isMobile()?window.screen.height-126-180-25:$(window).height()-180-25,!Steedos.isiOS()&&!Steedos.isMobile())switch((t=Steedos.getAccountZoomValue()).name){case"large":o-=50;break;case"extra-large":o-=145}return e&&(o-=e),o+"px"},Steedos.isiOS=function(e,t){var o,n,r,a,s;return o={android:"android",blackberry:"blackberry",desktop:"desktop",ipad:"ipad",iphone:"iphone",ipod:"ipod",mobile:"mobile"},n={},r="(?:[\\/:\\::\\s:;])",s="(\\S+[^\\s:;:\\)]|)",e=(e||navigator.userAgent).toLowerCase(),t=t||navigator.language||navigator.browserLanguage,a=e.match(new RegExp("(android|ipad|iphone|ipod|blackberry)"))||e.match(new RegExp("(mobile)"))||["",o.desktop],n.device=a[1],n.device===o.ipad||n.device===o.iphone||n.device===o.ipod},Steedos.getUserOrganizations=function(e){var t,o,n,r,a;return a=Meteor.userId(),n=Steedos.spaceId(),(t=null!=(r=db.space_users.findOne({user:a,space:n},{fields:{organizations:1}}))?r.organizations:void 0)?e?(o=_.flatten(db.organizations.find({_id:{$in:t}}).fetch().getProperty("parents")),_.union(t,o)):t:[]},Steedos.forbidNodeContextmenu=function(e,t){if(Steedos.isNode())return e.document.body.addEventListener("contextmenu",(function(e){return e.preventDefault(),!1})),t?("string"==typeof t&&(t=e.$(t)),t.load((function(){var e;if(e=t.contents().find("body"))return e[0].addEventListener("contextmenu",(function(e){return e.preventDefault(),!1}))}))):void 0}),Meteor.isServer&&(Steedos.getUserOrganizations=function(e,t,o){var n,r,a;return(n=null!=(a=db.space_users.findOne({user:t,space:e},{fields:{organizations:1}}))?a.organizations:void 0)?o?(r=_.flatten(db.organizations.find({_id:{$in:n}}).fetch().getProperty("parents")),_.union(n,r)):n:[]}),Meteor.isServer&&(Cookies=require("cookies"),Steedos.isMobile=function(){return!1},Steedos.isSpaceAdmin=function(e,t){var o;return!(!e||!t)&&(!(!(o=db.spaces.findOne(e))||!o.admins)&&o.admins.indexOf(t)>=0)},Steedos.isLegalVersion=function(e,t){var o,n,r;return!!e&&(o=!1,(n=null!=(r=db.spaces.findOne(e))?r.modules:void 0)&&n.includes(t)&&(o=!0),o)},Steedos.isOrgAdminByOrgIds=function(e,t){var o,n,r,a;return n=!1,a=db.organizations.find({_id:{$in:e}},{fields:{parents:1,admins:1}}).fetch(),r=[],(o=a.filter((function(e){var o;return e.parents&&(r=_.union(r,e.parents)),null!=(o=e.admins)?o.includes(t):void 0}))).length?n=!0:(r=_.flatten(r),(r=_.uniq(r)).length&&db.organizations.findOne({_id:{$in:r},admins:t})&&(n=!0)),n},Steedos.isOrgAdminByAllOrgIds=function(e,t){var o,n;if(!e.length)return!0;for(o=0;o=32&&(c=t.slice(0,32));return r=crypto.createDecipheriv("aes-256-cbc",new Buffer(c,"utf8"),new Buffer(o,"utf8")),e=(a=Buffer.concat([r.update(e,"base64"),r.final()])).toString()}catch(d){return s=d,e}},Steedos.encrypt=function(e,t,o){var n,r,a,s,i,c,l;if(i="",(c=t.length)<32){for(n="",s=0,l=32-c;s=32&&(i=t.slice(0,32));return r=crypto.createCipheriv("aes-256-cbc",new Buffer(i,"utf8"),new Buffer(o,"utf8")),e=(a=Buffer.concat([r.update(new Buffer(e,"utf8")),r.final()])).toString("base64")},Steedos.getUserIdFromAccessToken=function(e){var t,o,n,r,a;return e?(a=e.split("-")[0],o=Accounts._hashLoginToken(e),(r=db.users.findOne({_id:a,"secrets.hashedToken":o}))?a:(n=(t=oAuth2Server.collections.accessToken).findOne({accessToken:e}))?(null!=n?n.expires:void 0)=d&&e=r&&e=n&&(s=t?c+1:c+i/2);return s>c?((o=Steedos.caculateWorkingTime(e,1)).setHours(p[s-c-1].hour),o.setMinutes(p[s-c-1].minute)):s<=c&&(o.setHours(p[s].hour),o.setMinutes(p[s].minute)),o}),Meteor.isServer&&_.extend(Steedos,{getSteedosToken:function(e,t,o){var n,r,a,s,i,c,l,u,d,p,f,m,h,g,_;if(crypto=require("crypto"),(n=db.apps.findOne(e))&&(m=n.secret),t&&o&&(i=Accounts._hashLoginToken(o),_=Meteor.users.findOne({_id:t,"services.resume.loginTokens.hashedToken":i}))){if(h=_.steedos_id,l=n.secret?n.secret:"-8762-fcb369b2e8",f=parseInt((new Date).getTime()/1e3).toString(),u="",(d=h.length)<32){for(r="",c=0,p=32-d;c=32&&(u=h.slice(0,32));a=crypto.createCipheriv("aes-256-cbc",new Buffer(u,"utf8"),new Buffer(l,"utf8")),g=(s=Buffer.concat([a.update(new Buffer(f,"utf8")),a.final()])).toString("base64")}return g},locale:function(e,t){var o,n;return o=null!=(n=db.users.findOne({_id:e},{fields:{locale:1}}))?n.locale:void 0,t&&("en-us"===o&&(o="en"),"zh-cn"===o&&(o="zh-CN")),o},checkUsernameAvailability:function(e){return!Meteor.users.findOne({username:{$regex:new RegExp("^"+Meteor._escapeRegExp(e).trim()+"$","i")}})},validatePassword:function(e){var o,n,r,a,s,i,c,l,u,d;return r=t("password_invalid"),d=!0,e||(d=!1),o=null!=(s=Meteor.settings.public)&&null!=(i=s.password)?i.policy:void 0,n=(null!=(c=Meteor.settings.public)&&null!=(l=c.password)?l.policyError:void 0)||(null!=(u=Meteor.settings.public)&&null!=(a=u.password)?a.policyerror:void 0)||"密码不符合规则",o&&(new RegExp(o).test(e||"")?d=!0:(r=n,d=!1)),!!d||{error:{reason:r}}}}),Steedos.convertSpecialCharacter=function(e){return e.replace(/([\^\$\(\)\*\+\?\.\\\|\[\]\{\}])/g,"\\$1")},Steedos.removeSpecialCharacter=function(e){return e.replace(/([\^\$\(\)\*\+\?\.\\\|\[\]\{\}\~\`\@\#\%\&\=\'\"\:\;\<\>\,\/])/g,"")},Creator.getDBApps=function(e){var t;return t={},Creator.Collections.apps.find({space:e,is_creator:!0,visible:!0},{fields:{created:0,created_by:0,modified:0,modified_by:0}}).forEach((function(e){return t[e._id]=e})),t},Creator.getDBDashboards=function(e){var t;return t={},Creator.Collections.dashboard.find({space:e},{fields:{created:0,created_by:0,modified:0,modified_by:0}}).forEach((function(e){return t[e._id]=e})),t},Meteor.isServer&&(Cookies=require("cookies"),Steedos.getAuthToken=function(e,t){var o,n;return n=new Cookies(e,t),!(o=e.headers["x-auth-token"]||n.get("X-Auth-Token"))&&e.headers.authorization&&"Bearer"===e.headers.authorization.split(" ")[0]&&(o=e.headers.authorization.split(" ")[1]),o}),Meteor.isClient&&(Meteor.autorun((function(){if(Session.get("current_app_id"))return sessionStorage.setItem("current_app_id",Session.get("current_app_id"))})),Steedos.getCurrentAppId=function(){return Session.get("app_id")?Session.get("app_id"):sessionStorage.getItem("current_app_id")}),Meteor.isServer&&(Steedos.formatIndex=function(e){var t,o,n,r,a,s;return n={background:!0},(o=(null!=(r=Meteor.settings)&&null!=(a=r.datasources)&&null!=(s=a.default)?s.documentDB:void 0)||!1)&&e.length>0&&(t=e.join("."),n.name=t,t.length>52&&(n.name=t.substring(0,52))),n})},"simple_schema_extend.js":function e(){Meteor.startup((function(){SimpleSchema.extendOptions({foreign_key:Match.Optional(Boolean),references:Match.Optional(Object)})}))},"ajax_collection.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};(AjaxCollection=function(e){this.model=e}).prototype.find=function(e,t){return this._send(e,t,"find")},AjaxCollection.prototype.findOne=function(e,t){return this._send(e,t,"findone")},AjaxCollection.prototype._send=function(e,t,o){var n,r,a;return n={model:this.model,selector:e,options:t,space:(null!=e?e.space:void 0)||Session.get("spaceId"),"X-Auth-Token":Accounts._storedLoginToken()},r=void 0,a={url:Steedos.absoluteUrl("api/collection/"+o),type:"POST",async:!1,data:JSON.stringify(n),dataType:"json",processData:!1,contentType:"application/json",success:function(e,t){r=e}},$.ajax(a),r}},"steedos_data_manager.js":function e(){(SteedosDataManager={}).organizationRemote=new AjaxCollection("organizations"),SteedosDataManager.spaceUserRemote=new AjaxCollection("space_users"),SteedosDataManager.flowRoleRemote=new AjaxCollection("flow_roles"),SteedosDataManager.getSpaceUsers=function(e,t){var o={};o.spaceId=e;var n={userIds:t},r;return $.ajax({url:Steedos.absoluteUrl("api/workflow/getSpaceUsers")+"?"+$.param(o),type:"POST",async:!1,data:n,dataType:"json",success:function(e,t){e.errors?toastr.error(e.errors):r=e.spaceUsers},error:function(e,t,o){toastr.error(t)}}),r},SteedosDataManager.getFormulaUserObjects=function(e,t){var o={};o.spaceId=e;var n={userIds:t},r;if(t&&_.isArray(t)&&t.length>0&&_.isEmpty(t[0]))return console.info("userIds is empty"),{spaceUsers:[]};var n=JSON.stringify(n);return $.ajax({url:Steedos.absoluteUrl("api/formula/space_users")+"?"+$.param(o),type:"POST",async:!1,data:n,dataType:"json",processData:!1,contentType:"application/json",success:function(e,t){e.errors?toastr.error(e.errors):r=e.spaceUsers},error:function(e,t,o){toastr.error(t)}}),r},SteedosDataManager.getFormulaOrganizations=function(e,t){var o={};!1!==t&&Session.get("spaceId")&&(o.spaceId=Session.get("spaceId"));var n={orgIds:e},r,n=JSON.stringify(n);return $.ajax({url:Steedos.absoluteUrl("api/formula/organizations")+"?"+$.param(o),type:"POST",async:!1,data:n,dataType:"json",processData:!1,contentType:"application/json",success:function(e,t){e.errors?toastr.error(e.errors):r=e.orgs},error:function(e,t,o){toastr.error(t)}}),r}},methods:{"utc_offset.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"last_logon.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Meteor.isServer&&Meteor.methods({updateUserLastLogon:function(){if(null!=this.userId)return db.users.update({_id:this.userId},{$set:{last_logon:new Date}})}}),Meteor.isClient&&Accounts.onLogin((function(){return Meteor.call("updateUserLastLogon")}))},"user_add_email.coffee":function e(){var o=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Meteor.isServer&&Meteor.methods({users_add_email:function(e){var t;return null==this.userId?{error:!0,message:"email_login_required"}:e?/^([A-Z0-9\.\-\_\+])*([A-Z0-9\+\-\_])+\@[A-Z0-9]+([\-][A-Z0-9]+)*([\.][A-Z0-9\-]+){1,8}$/i.test(e)?db.users.find({"emails.address":e}).count()>0?{error:!0,message:"email_exists"}:(null!=(t=db.users.findOne({_id:this.userId})).emails&&t.emails.length>0?db.users.direct.update({_id:this.userId},{$push:{emails:{address:e,verified:!1}}}):db.users.direct.update({_id:this.userId},{$set:{steedos_id:e,emails:[{address:e,verified:!1}]}}),Accounts.sendVerificationEmail(this.userId,e),{}):{error:!0,message:"email_format_error"}:{error:!0,message:"email_required"}},users_remove_email:function(e){var t,o;return null==this.userId?{error:!0,message:"email_login_required"}:e?null!=(o=db.users.findOne({_id:this.userId})).emails&&o.emails.length>=2?(t=null,o.emails.forEach((function(o){o.address===e&&(t=o)})),db.users.direct.update({_id:this.userId},{$pull:{emails:t}}),{}):{error:!0,message:"email_at_least_one"}:{error:!0,message:"email_required"}},users_verify_email:function(e){return null==this.userId?{error:!0,message:"email_login_required"}:e?/^([A-Z0-9\.\-\_\+])*([A-Z0-9\+\-\_])+\@[A-Z0-9]+([\-][A-Z0-9]+)*([\.][A-Z0-9\-]+){1,8}$/i.test(e)?(Accounts.sendVerificationEmail(this.userId,e),{}):{error:!0,message:"email_format_error"}:{error:!0,message:"email_required"}},users_set_primary_email:function(e){var t,o;return null==this.userId?{error:!0,message:"email_login_required"}:e?((t=(o=db.users.findOne({_id:this.userId})).emails).forEach((function(t){return t.address===e?t.primary=!0:t.primary=!1})),db.users.direct.update({_id:this.userId},{$set:{emails:t,email:e}}),db.space_users.direct.update({user:this.userId},{$set:{email:e}},{multi:!0}),{}):{error:!0,message:"email_required"}}}),Meteor.isClient&&(Steedos.users_add_email=function(){return swal({title:t("primary_email_needed"),text:t("primary_email_needed_description"),type:"input",showCancelButton:!1,closeOnConfirm:!1,animation:"slide-from-top"},(function(e){return Meteor.call("users_add_email",e,(function(e,o){return(null!=o?o.error:void 0)?toastr.error(o.message):swal(t("primary_email_updated"),"","success")}))}))})},"user_avatar.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Meteor.isServer&&Meteor.methods({updateUserAvatar:function(e){if(null!=this.userId)return db.users.update({_id:this.userId},{$set:{avatar:e}})}})},"email_templates_reset.js":function e(){var t;Accounts.emailTemplates={from:(t="Steedos ",Meteor.settings&&Meteor.settings.email&&Meteor.settings.email.from?Meteor.settings.email.from:t),resetPassword:{subject:function(e){return TAPi18n.__("users_email_reset_password",{},e.locale)},text:function(e,t){var o=t.split("/"),n=o[o.length-1],r;return(e.profile&&e.profile.name?TAPi18n.__("users_email_hello",{},e.locale)+e.profile.name+",":TAPi18n.__("users_email_hello",{},e.locale)+",")+"\n\n"+TAPi18n.__("users_email_reset_password_body",{token_code:n},e.locale)+"\n\n"+t+"\n\n"+TAPi18n.__("users_email_thanks",{},e.locale)+"\n"}},verifyEmail:{subject:function(e){return TAPi18n.__("users_email_verify_email",{},e.locale)},text:function(e,t){var o;return(e.profile&&e.profile.name?TAPi18n.__("users_email_hello",{},e.locale)+e.profile.name+",":TAPi18n.__("users_email_hello",{},e.locale)+",")+"\n\n"+TAPi18n.__("users_email_verify_account",{},e.locale)+"\n\n"+t+"\n\n"+TAPi18n.__("users_email_thanks",{},e.locale)+"\n"}},enrollAccount:{subject:function(e){return TAPi18n.__("users_email_create_account",{},e.locale)},text:function(e,t){var o;return(e.profile&&e.profile.name?TAPi18n.__("users_email_hello",{},e.locale)+e.profile.name+",":TAPi18n.__("users_email_hello",{},e.locale)+",")+"\n\n"+TAPi18n.__("users_email_start_service",{},e.locale)+"\n\n"+t+"\n\n"+TAPi18n.__("users_email_thanks",{},e.locale)+"\n"}}}}},steedos:{"push.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Meteor.isCordova&&Meteor.startup((function(){return Push.Configure({android:{senderID:window.ANDROID_SENDER_ID,sound:!0,vibrate:!0},ios:{badge:!0,clearBadge:!0,sound:!0,alert:!0},appName:"workflow"})}))}},"admin.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};(Selector={}).selectorCheckSpaceAdmin=function(e){var t,o,n;return Meteor.isClient?(e=Meteor.userId())&&Steedos.isSpaceAdmin()?{space:Session.get("spaceId")}:{_id:-1}:Meteor.isServer?e&&(n=db.users.findOne(e,{fields:{is_cloudadmin:1}}))?(t={},n.is_cloudadmin||(o=(o=db.spaces.find({admins:{$in:[e]}},{fields:{_id:1}}).fetch()).map((function(e){return e._id})),t.space={$in:o}),t):{_id:-1}:void 0},Selector.selectorCheckSpace=function(e){var t,o,n,r,a;return Meteor.isClient?(e=Meteor.userId())&&(o=Session.get("spaceId"))&&db.space_users.findOne({user:e,space:o},{fields:{_id:1}})?{space:o}:{_id:-1}:Meteor.isServer?e&&(a=db.users.findOne(e,{fields:{_id:1}}))?(t={},n=db.space_users.find({user:e},{fields:{space:1}}).fetch(),r=[],_.each(n,(function(e){return r.push(e.space)})),t.space={$in:r},t):{_id:-1}:void 0},db.billing_pay_records.adminConfig={icon:"globe",color:"blue",tableColumns:[{name:"order_created()"},{name:"modules"},{name:"user_count"},{name:"end_date"},{name:"order_total_fee()"},{name:"order_paid()"}],extraFields:["space","created","paid","total_fee"],routerAdmin:"/admin",selector:function(e){return Meteor.isClient?Steedos.isSpaceAdmin()?{space:Session.get("spaceId"),paid:!0}:{_id:-1}:Meteor.isServer?{}:void 0},showEditColumn:!1,showDelColumn:!1,disableAdd:!0,pageLength:100,order:[[0,"desc"]]},Meteor.startup((function(){return this.space_user_signs=db.space_user_signs,this.billing_pay_records=db.billing_pay_records,"undefined"!=typeof AdminConfig&&null!==AdminConfig?AdminConfig.collections_add({space_user_signs:db.space_user_signs.adminConfig,billing_pay_records:db.billing_pay_records.adminConfig}):void 0}))},"array_includes.js":function e(){[].includes||(Array.prototype.includes=function(e){"use strict";var t=Object(this),o=parseInt(t.length)||0;if(0===o)return!1;var n=parseInt(arguments[1])||0,r,a;for(n>=0?r=n:(r=o+n)<0&&(r=0);r0&&(!Session.get("app_id")||o.indexOf(Session.get("app_id"))<0)&&Session.set("app_id",o[0]),Creator.Dashboards=e.dashboards?e.dashboards:{},Creator.Plugins=e.plugins?e.plugins:{},Creator.appendObjectFieldsColorStyles(),_.isFunction(t)&&t(),Creator.bootstrapLoaded.set(!0),FlowRouter._initialized||FlowRouter.initialize(),"/steedos/sign-in"===(null!=(i=FlowRouter.current())&&null!=(c=i.context)?c.pathname:void 0)){if(null==(u=FlowRouter.current())||null==(d=u.queryParams)||!d.redirect)return FlowRouter.go("/");document.location.href=FlowRouter.current().queryParams.redirect}},l=function(e){var t,o,n;if(e&&Meteor.userId())return n=Meteor.userId(),t=Accounts._storedLoginToken(),(o={}).Authorization="Bearer "+e+","+t,o["X-User-Id"]=n,o["X-Auth-Token"]=t,$.ajax({type:"get",url:Steedos.absoluteUrl("/api/license/"+e),dataType:"json",headers:o,async:!1,error:function(e,t,o){var n;return n=e.responseJSON,console.error(n),(null!=n?n.reason:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.reason)):void 0:(null!=n?n.message:void 0)?"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(TAPi18n.__(n.message)):void 0:"undefined"!=typeof toastr&&null!==toastr&&"function"==typeof toastr.error?toastr.error(n):void 0},success:function(e){return Creator.__l.set(e)}})},c=function(e){return BuilderCreator.store.dispatch(BuilderCreator.loadBootstrapEntitiesData({spaceId:e}))},i=function(e,t){if(BuilderCreator.store)return c(e)},Setup.bootstrap=function(e,t){return i(e,t)},Meteor.startup((function(){var e,t,o;return e=BuilderCreator.RequestStatusOption,t="",null!=(o=BuilderCreator.store)?o.subscribe((function(){var o;return o=BuilderCreator.store.getState(),t!==e.STARTED?t=BuilderCreator.getRequestStatus(o):(t=BuilderCreator.getRequestStatus(o),BuilderCreator.isRequestSuccess(o)?s(n(BuilderCreator.getBootstrapData(o))):void 0)})):void 0}))},lib:{printThis:{"printThis.js":function e(){!function(e){function t(e,t){t&&e.append(t.jquery?t.clone():t)}function o(t,o,n){var r=o.clone();n.removeScripts&&r.find("script").remove(),n.printContainer?t.append(e("
").html(r).html()):r.each((function(){t.append(e(this).html())}))}var n;e.fn.printThis=function(r){n=e.extend({},e.fn.printThis.defaults,r);var a=this instanceof jQuery?this:e(this),s="printThis-"+(new Date).getTime();if(window.location.hostname!==document.domain&&navigator.userAgent.match(/msie/i)){var i='javascript:document.write("