diff --git a/creator/packages/steedos-workflow/client/lib/uuflow_api.js b/creator/packages/steedos-workflow/client/lib/uuflow_api.js index 549e721f5a..fe99ae39c6 100644 --- a/creator/packages/steedos-workflow/client/lib/uuflow_api.js +++ b/creator/packages/steedos-workflow/client/lib/uuflow_api.js @@ -124,7 +124,7 @@ UUflow_api.post_submit = function (instance) { dataType: "json", processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + Session.get("spaceId") + ',' + Accounts._storedLoginToken()) }, @@ -146,27 +146,27 @@ UUflow_api.post_submit = function (instance) { } }); - if(instance.distribute_from_instance || instance.distribute_from_instances.length > 0) { + if (instance.distribute_from_instance || (instance.distribute_from_instances && instance.distribute_from_instances.length > 0)) { window.goBack(); - }else{ + } else { FlowRouter.go("/workflow/space/" + Session.get('spaceId') + "/draft/"); } return; } - if(instance.distribute_from_instance || instance.distribute_from_instances.length > 0) { + if (instance.distribute_from_instance || (instance.distribute_from_instances && instance.distribute_from_instances.length > 0)) { window.goBack(); - }else{ + } else { FlowRouter.go("/workflow/space/" + Session.get("spaceId") + "/" + Session.get("box")); } - + toastr.success(TAPi18n.__('Submitted successfully')); Session.set("instance_submitting", false); var scope = SteedosUI.refs["serviceSteedosKeyvaluesSubscribe"]; var button = scope && scope.getComponentByName("serviceSteedosKeyvaluesSubscribe.buttonTriggerDataChange"); - if(button){ + if (button) { button.props.dispatchEvent('click', {}); } }, @@ -206,7 +206,7 @@ UUflow_api.post_engine = function (approve) { dataType: "json", processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + Session.get("spaceId") + ',' + Accounts._storedLoginToken()) }, @@ -262,7 +262,7 @@ UUflow_api.post_terminate = function (instance) { dataType: "json", processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + Session.get("spaceId") + ',' + Accounts._storedLoginToken()) }, @@ -284,7 +284,7 @@ UUflow_api.post_terminate = function (instance) { var scope = SteedosUI.refs["serviceSteedosKeyvaluesSubscribe"]; var button = scope && scope.getComponentByName("serviceSteedosKeyvaluesSubscribe.buttonTriggerDataChange"); - if(button){ + if (button) { button.props.dispatchEvent('click', {}); } }, @@ -324,7 +324,7 @@ UUflow_api.put_reassign = function (instance) { dataType: "json", processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + Session.get("spaceId") + ',' + Accounts._storedLoginToken()) }, @@ -379,7 +379,7 @@ UUflow_api.put_relocate = function (instance) { dataType: "json", processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + Session.get("spaceId") + ',' + Accounts._storedLoginToken()) }, @@ -478,7 +478,7 @@ UUflow_api.caculate_nextstep_users = function (deal_type, spaceId, body, nextSte dataType: 'json', processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + spaceId + ',' + Accounts._storedLoginToken()) }, success: function (responseText, status) { @@ -516,7 +516,7 @@ UUflow_api.caculateNextstepUsers = function (deal_type, spaceId, body, nextStepI dataType: 'json', processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + spaceId + ',' + Accounts._storedLoginToken()) }, success: function (responseText, status) { @@ -556,7 +556,7 @@ UUflow_api.getSpaceUsers = function (spaceId, userIds) { dataType: 'json', processData: false, contentType: "application/json", - beforeSend: function(request) { + beforeSend: function (request) { request.setRequestHeader('Authorization', 'Bearer ' + spaceId + ',' + Accounts._storedLoginToken()) }, success: function (responseText, status) { @@ -569,16 +569,16 @@ UUflow_api.getSpaceUsers = function (spaceId, userIds) { spaceUsers = []; - if(_.isArray(userIds)){ - _.each(userIds, function(uid){ - var stepApprove = _.find(_spaceUsers, function(su){ + if (_.isArray(userIds)) { + _.each(userIds, function (uid) { + var stepApprove = _.find(_spaceUsers, function (su) { return su.id == uid; }) - if(stepApprove){ + if (stepApprove) { spaceUsers.push(stepApprove) } }) - }else{ + } else { spaceUsers = _spaceUsers } @@ -762,7 +762,7 @@ UUflow_api.post_forward = function (instance_id, space_id, flow_id, hasSaveInsta if (action_type == "forward") { toastr.success(TAPi18n.__("forward_instance_success")); var new_ins_id = responseText && responseText.new_ins_ids && responseText.new_ins_ids[0]; - if(new_ins_id && !Steedos.isMobile()){ + if (new_ins_id && !Steedos.isMobile()) { var newInstanceUrl = "/workflow/space/" + Steedos.getSpaceId() + "/inbox/" + new_ins_id; newInstanceUrl = Steedos.absoluteUrl(newInstanceUrl); Steedos.openWindow(newInstanceUrl); diff --git a/server/bundle/programs/server/packages/modules.js b/server/bundle/programs/server/packages/modules.js index a50b02d0c2..73d8ba3dca 100644 --- a/server/bundle/programs/server/packages/modules.js +++ b/server/bundle/programs/server/packages/modules.js @@ -463,7 +463,7 @@ module.useNode(); // module.exports = { "name": "@steedos/objectql", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "lib/index.js" }; @@ -490,7 +490,7 @@ module.useNode(); // module.exports = { "name": "@steedos/i18n", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "lib/index.js" }; @@ -517,7 +517,7 @@ module.useNode(); // module.exports = { "name": "@steedos/core", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "lib/index.js" }; @@ -544,7 +544,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-meteor-package-loader", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "index.js" }; @@ -571,7 +571,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-api", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "index.js" }; @@ -598,7 +598,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-metadata-server", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "index.js" }; @@ -625,7 +625,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-package-registry", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "package.service.js" }; @@ -652,7 +652,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-objectql", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "package.service.js" }; @@ -679,7 +679,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-ui", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "package.service.js" }; @@ -706,7 +706,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-pages", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "package.service.js" }; @@ -733,7 +733,7 @@ module.useNode(); // module.exports = { "name": "@steedos/router", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "lib/index.js" }; @@ -760,7 +760,7 @@ module.useNode(); // module.exports = { "name": "@steedos/auth", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "lib/index.js" }; @@ -787,7 +787,7 @@ module.useNode(); // module.exports = { "name": "@steedos/workflow", - "version": "2.7.4-beta.3", + "version": "2.7.4-beta.5", "main": "index.js" }; diff --git a/server/bundle/programs/web.browser.legacy/a49ab12571e71793224d8b37b7b721e34ca5f36d.js b/server/bundle/programs/web.browser.legacy/9505a92dcbed78459359c3c5eb628b0695147824.js similarity index 87% rename from server/bundle/programs/web.browser.legacy/a49ab12571e71793224d8b37b7b721e34ca5f36d.js rename to server/bundle/programs/web.browser.legacy/9505a92dcbed78459359c3c5eb628b0695147824.js index 453fc82aeb..2e6c99ddf6 100644 --- a/server/bundle/programs/web.browser.legacy/a49ab12571e71793224d8b37b7b721e34ca5f36d.js +++ b/server/bundle/programs/web.browser.legacy/9505a92dcbed78459359c3c5eb628b0695147824.js @@ -68,7 +68,7 @@ object-assign * 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,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).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 r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.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 r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.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 r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.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),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,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,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),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,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),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,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[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,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},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 r=this.dimension();this.$element[r](this.$element[r]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,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,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),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 i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.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:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.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)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.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)}},f.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 r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.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)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.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)},f.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}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,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 r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[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 r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"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 r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),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 r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[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",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||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(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){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),s?(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),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.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 r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[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,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"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(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;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");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__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 r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=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)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=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 r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},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){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.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),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"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 r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__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]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",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"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=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(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.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=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={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)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(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||l,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),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(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,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{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?i({},{},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}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(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:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.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,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{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,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(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"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.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,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):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 r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{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}],R={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 F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(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,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(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:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(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?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),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 r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){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(r,'" 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!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){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"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(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,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(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 $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=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=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.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 l=g(),h=function e(){var n=function e(n,i){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),l.resolve(i),r(n,i)};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?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{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&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.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(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&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 i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(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]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.4-beta.3",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(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))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(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=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)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 M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(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)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("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=r.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]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(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.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize 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 l("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],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),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],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,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))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}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:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),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 l("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 l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); +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,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).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 r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.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 r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.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 r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.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),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,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,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),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,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),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,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[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,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},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 r=this.dimension();this.$element[r](this.$element[r]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,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,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),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 i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.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:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),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 i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.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)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.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)}},f.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 r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.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)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.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},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.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)},f.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}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,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 r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[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 r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"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 r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),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 r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[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",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||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(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){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),s?(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),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.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 r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[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,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"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(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;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");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__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 r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=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)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=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 r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},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){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.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),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"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 r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__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]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",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"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=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(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},W=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},H=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r),c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s),n.description=U(e,t,o,n.description,r.datasource,s),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=W(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=H(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.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=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={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)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(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||l,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),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(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,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{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?i({},{},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}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(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:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.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,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{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,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(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"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.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,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):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 r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{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}],R={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 F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(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,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(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:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(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?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),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 r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){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(r,'" 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!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){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"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(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,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(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 $(){}var W,H=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=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=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.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 l=g(),h=function e(){var n=function e(n,i){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),l.resolve(i),r(n,i)};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?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{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&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.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(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&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 i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(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]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.7.4-beta.5",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(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))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(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=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)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 M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(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)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("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=r.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]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(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.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize 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 l("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],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),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],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,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))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}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:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),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 l("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 l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}},"form-builder":{"package.json":function e(t,n,e){e.exports={name:"@steedos/form-builder",version:"3.6.2-patch.5",private:!1,publishConfig:{access:"public"},main:"dist/form-builder.min.js",homepage:"https://formbuilder.online/",repository:{url:"https://github.com/kevinchappell/formBuilder.git",type:"git"},files:["dist/**/*","docs/**/*","src/**/*"],author:"Kevin Chappell ",contributors:[],bugs:"https://github.com/kevinchappell/formBuilder/issues",description:"A jQuery plugin for drag and drop form building",keywords:["jquery-plugin","forms","drag and drop","form builder","form create"],license:"MIT",ignore:["**/*","node_modules","test"],config:{files:{test:["test/**/*.spec.js"],pluginsDir:"src/js/control_plugins/",fonts:"src/fonts",sass:"src/sass",formBuilder:{js:"src/js/form-builder.js",sass:["src/sass/form-builder.scss"]},formRender:{js:"src/js/form-render.js",sass:["src/sass/form-render.scss"]},site:["demo/assets/sass/site.scss"]},fontServer:"http://fontello.com",fontelloToken:"09d648f01d6c57cb9f9b8cc55043e0c0"},babel:{presets:[["@babel/preset-env",{targets:{browsers:["> 1%"]},loose:!0}]],comments:!1,plugins:["@babel/plugin-proposal-object-rest-spread","@babel/plugin-proposal-class-properties"]},scripts:{"build:analyze":"webpack --mode production -p --progress --config tools/webpack.config --analyze","build:plugins":"webpack --mode production -p --display-entrypoints --progress --config tools/webpack.plugins.config","build:vendor":"babel-node tools/build-vendor",build:"webpack --mode production -p --progress --config tools/webpack.config","build:all":"npm-run-all build:plugins build:vendor build copy",copy:"cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md && npm run copy:lang","copy:lang":"babel-node tools/copy-language-files","deploy:all":"npm-run-all deploy:demo deploy:site","deploy:demo":"node tools/deploy-demo.js","deploy:site":"node tools/deploy-site.js",docs:"mkdocs build",font:"babel-node tools/icon-font",lint:"eslint ./src --ext .js || true","semantic-release":"semantic-release","start:devServer":"webpack-dev-server --mode development --config tools/webpack.config",prestart:"npm-run-all -p build:vendor copy:lang",start:"npm run start:devServer",test:"npm run-script build"},dependencies:{jquery:">=3.4.1","jquery-ui-sortable":"*"},devDependencies:{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-syntax-object-rest-spread":"^7.8.3","@babel/plugin-transform-destructuring":"^7.10.4","@babel/preset-env":"^7.11.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.5",autoprefixer:"^9.8.6","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","clean-webpack-plugin":"^3.0.0",clui:"^0.3.6","compression-webpack-plugin":"^5.0.1","concat-files":"^0.1.1","cross-env":"^7.0.2","css-loader":"^4.2.1",eslint:"^7.7.0","eslint-loader":"^4.0.2","formbuilder-languages":"latest","fs-extra":"^9.0.1","html-webpack-harddisk-plugin":"^1.0.2","html-webpack-plugin":"^4.3.0",inquirer:"^7.3.3",mi18n:"^0.4.8","node-sass":"6.0.1","npm-run-all":"^4.1.5",opener:"^1.5.1","postcss-loader":"^3.0.0","replace-in-file":"^6.1.0",request:"^2.88.2","sass-loader":"10.5.2","semantic-release":"^17.1.1",semver:"^7.3.2","style-loader":"^1.2.1",unzipper:"^0.10.11",webpack:"^4.44.1","webpack-bundle-analyzer":"^3.8.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","wrapper-webpack-plugin":"^2.1.0"},prettier:{singleQuote:!0,trailingComma:"all",printWidth:120,semi:!1,arrowParens:"avoid",spaceAfterFunction:!1},engines:{},release:{branch:"master",verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},browserslist:["> 1%"]}},dist:{"form-builder.min.js":[]}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -770,7 +770,7 @@ window.Slip=function(){"use strict";var t={ariaRole:"listbox",tabIndex:0,focus:! * GPL v3 http://opensource.org/licenses/GPL-3.0 * */ -!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):t.URI=e(t.punycode,t.IPv6,t.SecondLevelDomains,t)}(this,(function(t,e,n,a){"use strict";var o=a&&a.URI;function r(t,e){var n=arguments.length>=1,a=arguments.length>=2;if(!(this instanceof r))return n?a?new r(t,e):new r(t):new r;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}return this.href(t),void 0!==e?this.absoluteTo(e):this}r.version="1.17.0";var s=r.prototype,i=Object.prototype.hasOwnProperty;function l(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function u(t){return"Array"===c(t)}function d(t,e){var n={},a,o;if("RegExp"===c(e))n=null;else if(u(e))for(a=0,o=e.length;a]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/},r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return r.domAttributes[e]}},r.encode=b,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=b,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(t,e){var n=r.encode(t+"");return void 0===e&&(e=r.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},r.decodeQuery=function(t,e){t+="",void 0===e&&(e=r.escapeQuerySpace);try{return r.decode(e?t.replace(/\+/g,"%20"):t)}catch(n){return t}};var g={encode:"encode",decode:"decode"},h,w=function(t,e){return function(n){try{return r[e](n+"").replace(r.characters[t][e].expression,(function(n){return r.characters[t][e].map[n]}))}catch(a){return n}}};for(h in g)r[h+"PathSegment"]=w("pathname",g[h]),r[h+"UrnPathSegment"]=w("urnpath",g[h]);var S=function(t,e,n){return function(a){var o;o=n?function(t){return r[e](r[n](t))}:r[e];for(var s=(a+"").split(t),i=0,l=s.length;i-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=r.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(r.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=r.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},r.parseHost=function(t,e){var n=(t=t.replace(/\\/g,"/")).indexOf("/"),a,o;if(-1===n&&(n=t.length),"["===t.charAt(0))a=t.indexOf("]"),e.hostname=t.substring(1,a)||null,e.port=t.substring(a+2,n)||null,"/"===e.port&&(e.port=null);else{var r=t.indexOf(":"),s=t.indexOf("/"),i=t.indexOf(":",r+1);-1!==i&&(-1===s||i-1?n:t.length-1),o;return a>-1&&(-1===n||a-1||(null!=t?t.indexOf("{signature.traces."):void 0)>-1||(null!=t?t.indexOf("{yijianlan:"):void 0)>-1||(null!=t?t.indexOf('{"yijianlan":'):void 0)>-1||(null!=t?t.indexOf("{'yijianlan':"):void 0)>-1},InstanceSignText.includesOpinionField=function(t,e){var n,a,o;return a=new Array,n={},(o=(null!=(n=Meteor.isServer?uuflowManager.getFormVersion(db.forms.findOne({_id:t}),e):db.form_versions.findOne({_id:e,form:t}))?n.fields:void 0)||[]).forEach((function(t){var e;return"table"===t.type?console.log("ignore opinion field in table"):"section"===t.type?null!=t&&null!=(e=t.fields)?e.forEach((function(t){return a.push(t.formula)})):void 0:a.push(t.formula)})),_.some(a,(function(t){return InstanceformTemplate.helpers.isOpinionField_from_string(t)}))}},models:{"forms.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"flows.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"flow_roles.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"flow_positions.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"instance_tasks.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};db.instance_tasks=new Meteor.Collection("instance_tasks"),db.instance_tasks._simpleSchema=new SimpleSchema({instance:{type:String},trace:{type:String},is_finished:{type:String},user:{type:String},user_name:{type:String},handler:{type:String},handler_name:{type:String},handler_organization:{type:String},handler_organization_name:{type:String},handler_organization_fullname:{type:String},start_date:{type:Date},due_date:{type:Date},is_read:{type:Boolean},is_error:{type:Boolean},values:{type:Object},deadline:{type:Date},remind_date:{type:Date},reminded_count:{type:Number},read_date:{type:Date},description:{type:String},modified:{type:Date},modified_by:{type:String},sign_show:{type:Boolean},judge:{type:String},next_steps:{type:Array},"next_steps.$":{type:Object},"next_steps.$.step":{type:String},"next_steps.$.users":{type:[String]},finish_date:{type:Date},cost_time:{type:Number},space:{type:String},instance_name:{type:String},submitter:{type:String},submitter_name:{type:String},applicant:{type:String},applicant_name:{type:String},applicant_organization_name:{type:String},submit_date:{type:Date},flow:{type:String},flow_name:{type:String},form:{type:String},step:{type:String},step_name:{type:String},category_name:{type:String},instance_state:{type:String},distribute_from_instance:{type:String},forward_from_instance:{type:String},keywords:{type:String},is_archived:{type:Boolean},category:{type:String}})},"instances.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"categories.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"spaces.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"deleted_instances.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"auth_tokens.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};db.auth_tokens=new Meteor.Collection("auth_tokens")},"webhooks.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"space_user_signs.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}},"space_users.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}}},cfs:{"instances.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}}},"admin.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{}}},client:{"api.js":function t(){Workflow.getInstance=function(){var t=WorkflowManager.getInstance();if(t){if("draft"==t.state){var e=InstanceManager.getInstanceFormApplicant();if(t.applicant!=e){var n=t.space,a=SteedosDataManager.spaceUserRemote.findOne({space:n,user:e},{fields:{organization:1,name:1}}),o=a.organization,r=SteedosDataManager.organizationRemote.findOne(o,{fields:{name:1,fullname:1}});t.applicant=e,t.applicant_name=a.name,t.applicant_organization=o,t.applicant_organization_name=r.name,t.applicant_organization_fullname=r.fullname}}return t}},Workflow.getMyApprove=function(){return InstanceManager.getMyApprove()},Workflow.getInstanceAttachments=function(t,e){return e?cfs.instances.find({"metadata.instance":t}).fetch():cfs.instances.find({"metadata.approve":e}).fetch()}},lib:{"traces_manager.coffee":function t(){var e=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};TracesManager.getStepLastHandlers=function(t,e){var n,a,o;return n=[],o=_.clone(e.traces),(a=_.filter(o,(function(e){return e.step===t}))).reverse(),_.some(a,(function(t){var e;if(t.is_finished&&((e=(null!=t?t.approves:void 0)||[]).reverse(),e.forEach((function(t){if((null!=t?t.is_finished:void 0)&&"cc"!==(null!=t?t.type:void 0)&&"distribute"!==(null!=t?t.type:void 0)&&["approved","rejected","submitted","readed"].includes(t.judge))return n.push(t.handler)})),n.length>0))return!0})),n},TracesManager.getHandlerSignShowApproves=function(t,e,n){var a,o,r,s,i,l,c,u,d;if(a=InstanceManager.getCurrentApprove())return c=_.clone(t.traces),o=_.find(c,(function(t){return t._id===(null!=a?a.trace:void 0)})),i=[],o&&null!=(l=(u=_.groupBy(c,"step"))[o.step])&&l.forEach((function(t){return i=i.concat(t.approves)})),r=(d=_.groupBy(i,"handler"))[e],s=_.filter(r,(function(t){return n?t.is_finished&&!1!==t.sign_show&&t.description:t.is_finished&&t.description}))},TracesManager.getTracesListData=function(t){var e;return(null!=(e=db.instance_traces.findOne({_id:t._id}))?e.traces:void 0)||t.traces}},"instance_event.js":function module(){function getFlowEvent(t){var e=WorkflowManager.getFlow(t);if(e)return e.events}InstanceEvent={},InstanceEvent.before={},InstanceEvent.initEvents=function(flowId){$(".instance-form").unbind("instance-before-submit"),$(".instance-form").unbind("instance-before-save"),$("#ins_upload_main_attach").unbind("instance-before-upload"),$("#ins_attach_version").unbind("instance-before-upload"),$("#ins_upload_normal_attach").unbind("instance-before-upload"),$("#ins_attach_version").unbind("instance-before-upload"),$(".instance-forward-modal").unbind("onload"),$(".instance-distribute-modal").unbind("onload"),$("body").unbind("after-save");var eventStr=getFlowEvent(flowId);if(eventStr)try{eval(eventStr)}catch(e){toastr.error(TAPi18n.__("flows_events_error")+e),console.error("flow Event Error: "+e)}},InstanceEvent.run=function(t,e,n){var a=WorkflowManager.getInstance(),o;if(!a)return!0;if(!getFlowEvent(a.flow))return!0;n||(n={});var r=jQuery.Event(e,n);return t.trigger(r),!r.isDefaultPrevented()},InstanceEvent.before.instanceSubmit=function(){var t=WorkflowManager.getInstance(),e;if(!t)return!0;if(!getFlowEvent(t.flow))return!0;var n=jQuery.Event("instance-before-submit",{});return $(".instance-form").trigger(n),!n.isDefaultPrevented()}},"1_form_formula.js":function module(){function sum(t){var e=0;if(!t||0==t.length)return e;for(var n=0;n0?t.sort(sortNumber)[count(t)-1]:void 0}function min(t){if(!t||0==t.length)return"";for(var e=0;e0?t.sort(sortNumber)[0]:void 0}function numToRMB(t){if(isNaN(t))return"无效数值!";var e="";if(t<0&&(e="(负)"),(t=Math.abs(t))>=1e12)return"无效数值!";var n="",a="仟佰拾亿仟佰拾万仟佰拾元角分",o="零壹贰叁肆伍陆柒捌玖",r=(t+="00").indexOf(".");r>=0&&(t=t.substring(0,r)+t.substr(r+1,2)),a=a.substr(a.length-t.length);for(var s=0;s0?eval(form_script):console.log("脚本为空, 退出运算程序")}catch(e){console.log("初始化表单脚本出错,错误信息: \n"+e)}},Form_formula.runFormScripts=function(formKey,eventName){try{form_version=WorkflowManager.getInstanceFormVersion(),form_script=form_version.form_script,form_script&&form_script.replace(/\n/g,"").replace(/\s/g,"").length>0?(CoreForm.form_OnLoad instanceof Function&&eval("CoreForm.form_OnLoad();"),CoreForm[formKey]&&CoreForm[formKey][eventName]instanceof Function&&eval("CoreForm."+formKey+"."+eventName+"();")):console.log("脚本为空, 退出运算程序")}catch(e){console.log("初始化表单脚本出错,错误信息: \n"+e)}},Form_formula.prependPrefixForFormula=function(t,e){var n=1*new Date,a=/(\{[^{}]*\})/g;return rev=e.replace(a,(function(e,n){return t+n.replace(/\{\s*/,'["').replace(/\s*\}/,'"]').replace(/\s*\.\s*/g,'"]["')}))},Form_formula.getFormulaFieldVariable=function(t,e){var n=1*new Date;if(e){for(var a=new Array,o=0;o0;){for(c=0;cn.length)for(var a,o=(a=e.split(n)).length-2;o>=0;o--){var r=e.search(n),s=e.charAt(r-1),i=e.charAt(r+n.length);if(null==s.match(/\w/)&&null==i.match(/\w/))return!0}var l="{"+t+".";if(e.length>l.length)for(var a,o=(a=e.split(l)).length-2;o>=0;o--){var r=e.search(l),s;if(null==(s=e.charAt(r-1)).match(/\w/))return!0}}return!1},Form_formula.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},Form_formula.field_values=null,Form_formula.run=function(code,field_prefix,formula_fields,autoFormDoc,fields){var startTrack=1*new Date,run=!1;if(formula_fields&&!(formula_fields.length<1)){Form_formula.field_values,console.debug("消耗时间s0 :"+(1*new Date-startTrack)+"ms"),Form_formula.field_values=Form_formula.init_formula_values(fields,autoFormDoc),console.debug("消耗时间s1 :"+(1*new Date-startTrack)+"ms");for(var i=0;i==/g,">=").replace(/\<==/g,"<=").replace(/\======/g,"===").replace(/\====/g,"=="),conditionStr=Form_formula.prependPrefixForFormula("Form_formula.field_values",conditionStr);try{eval(conditionStr.replace(/[\r\n]+/g,"\\n"))&&next_steps.push(WorkflowManager.getInstanceStep(line.to_step))}catch(err){console.log("脚本["+conditionStr+"]执行异常:"+err.message)}}})),next_steps},Form_formula.runFormulaScript=function(script,fieldValues){Form_formula.field_values=fieldValues;var conditionStr=script.toString();conditionStr=conditionStr.replace(/\=/g,"==").replace(/\>==/g,">=").replace(/\<==/g,"<=").replace(/\======/g,"===").replace(/\====/g,"=="),conditionStr=Form_formula.prependPrefixForFormula("Form_formula.field_values",conditionStr);try{if(eval(conditionStr.replace(/[\r\n]+/g,"\\n")))return!0}catch(err){console.log("脚本["+conditionStr+"]执行异常:"+err.message)}return!1},Form_formula.init_formula_values=function(t,e){var n=Meteor.userId(),a=InstanceManager.getApplicantUserId(),o;return a?o=Formula_data.getInstanceValues(t,e,n,a,Session.get("spaceId")):{}},Array.prototype.getEach=function(t){for(var e=[],n=0;n0){for(var e="0.",n=0;n0&&(r=o.split("\n"));var s="editable"==n.permission?"editable":"readonly",i=n.is_multiselect;"odata"!=n.type&&n.formula&&(s="readonly");var l={};switch("master_detail"===a&&(a="lookup"),a){case"input":t.type=String,l.disabled="readonly"==s,null!=o&&o.length>0?l.type="typeahead":n.is_textarea?(l.type="coreform-textarea",l.rows=n.rows):l.type="text";break;case"section":t.type=String,l.disabled=!0,l.type="section";break;case"geolocation":t.type=String,l.disabled="readonly"==s,l.type="text";break;case"number":t.type=Number,l.disabled="readonly"==s,l.type="coreform-number",l.step=e(n.digits),n.is_percent&&(l.type="steedos-field",l.fieldType="percent",l.config=JSON.stringify({scale:n.digits||2}));break;case"date":t.type=String,l.disabled="readonly"==s,Steedos.isMobile()||Steedos.isPad()?l.type="date":(l.type="coreform-datepicker",l.outFormat="yyyy-MM-dd",l.dateTimePickerOptions={showClear:!0,format:"YYYY-MM-DD",locale:Session.get("steedos-locale"),widgetPositioning:{}});break;case"dateTime":t.type=Date,l.disabled="readonly"==s,Steedos.isMobile()||Steedos.isPad()?l.type="datetime-local":(l.type="bootstrap-datetimepicker",l.dateTimePickerOptions={showClear:!0,format:"YYYY-MM-DD HH:mm",locale:Session.get("steedos-locale"),keepOpen:!0,widgetPositioning:{}});break;case"checkbox":t.type=Boolean,l.disabled="readonly"==s,l.type="coreform-checkbox";break;case"select":i?(t.type=[String],l.multiple=!0):t.type=String,l.readonly="readonly"==s,l.type="select",l.disabled="readonly"==s;break;case"radio":t.type=[String],l.disabled="readonly"==s,l.type="coreform-radio";break;case"multiSelect":t.type=[String],l.disabled="readonly"==s,l.type="coreform-multiSelect";break;case"user":i?(t.type=[String],l.multiple=!0):t.type=String,l.disabled="readonly"==s,l.type="selectuser";break;case"email":t.type=String,l.type="steedosEmail",l.readonly="readonly"==s,l.disabled="readonly"==s;break;case"url":t.type=String,l.type="steedosUrl",l.readonly="readonly"==s,l.disabled="readonly"==s;break;case"group":i?(t.type=[String],l.multiple=!0):t.type=String,l.disabled="readonly"==s,l.type="selectorg";break;case"odata":i?(t.type=[Object],l.multiple=!0):t.type=Object,t.blackbox=!0,l.type="steedos-selectize",l.readonly="readonly"===s,l.disabled="readonly"===s,l.related_object=n.related_object,l.url=n.url,l.detail_url=n.detail_url,l.filters=n.filters,l.formula=n.formula,l.search_field=n.search_field;break;case"html":t.type=String,l.readonly="readonly"===s,l.disabled="readonly"===s,l.type="steedosHtml";break;case"image":i?(t.type=[String],l.multiple=!0):t.type=String,l.readonly="readonly"==s,l.disabled="readonly"==s,l.type="steedos-field",l.fieldType="image";break;case"file":i?(t.type=[String],l.multiple=!0):t.type=String,l.readonly="readonly"==s,l.disabled="readonly"==s,l.type="steedos-field",l.fieldType="file";break;case"lookup":i?(t.type=[String],l.multiple=!0):t.type=String,l.readonly="readonly"==s,l.disabled="readonly"==s,l.type="steedos-field",l.fieldType="lookup",l.reference_to=n.reference_to,l.reference_to_field=n.reference_to_field,l.filters=n.filters,l.config=n.config;break;case"time":t.type=String,l.readonly="readonly"==s,l.disabled="readonly"==s,l.type="steedos-field",l.fieldType="time";break;default:t.type=String,l.readonly="readonly"==s,l.disabled="readonly"==s,l.type=a}if(null!=r&&r.length>0){for(var c=new Array,u=0;u1?itemSplits[0]:r[u],value:itemSplits.length>1?itemSplits[1]:r[u]});l.options=c}return l},a=function(t,e){var a=e.type,o=e.is_required;return(schema={}).label=t,schema.optional="readonly"==e.permission||!o,"email"==a?schema.regEx=SimpleSchema.RegEx.Email:"url"==a&&(schema.regEx=SimpleSchema.RegEx.Url),schema.autoform=new n(schema,e),0==schema.autoform.disabled&&((!e.default_value||_.isString(e.default_value)&&e.default_value.indexOf("auto_number(")<0)&&(schema.autoform.defaultValue=e.default_value),(InstanceMacro.check(e.default_value)||_.isFunction(e.default_value))&&(schema.autoform.defaultValue=InstanceMacro.run(e.default_value)),e.default_value&&_.isString(e.default_value)&&e.default_value.indexOf("auto_number(")>-1&&(schema.autoform["data-new-number"]=!0,schema.autoform["data-formula"]=e.default_value,schema.autoform.defaultValue="")),"section"===a&&(schema.autoform.description=e.description,schema.autoform.label=e.name),schema.autoform.title=e.description||schema.label,schema};(WorkflowManager_format={}).getTableItemSchema=function(t){var e={};if("table"==t.type){var n=null!=t.name&&t.name.length>0?t.name:t.code;e[t.code]={type:Object,optional:"readonly"==t.permission||!t.is_required,label:n},t.sfields.forEach((function(o){n=null!=o.name&&o.name.length>0?o.name:o.code,(sfields_schema=new a(n,o)).autoform.__formId=t.__formId,e[t.code+"."+o.code]=sfields_schema}))}return console.log("getTableItemSchema fieldSchema",e),e},WorkflowManager_format.getAutoformSchema=function(t){for(var e={},n=t.fields,o=ApproveManager.isReadOnly(),r=0;r0?s.name:s.code;if(o&&(s.permission="readonly"),"table"==s.type){let t=!1,n=s.sfields;if(n)for(let e=0;e0?c.name:c.code,tableField_schema=new a(i,c),e[s.code+".$."+c.code]=tableField_schema}}else e[s.code]=new a(i,s)}return e},WorkflowManager_format.getAutoformSchemaValues=function(){var t=InstanceManager.getCurrentValues();return t||(t={}),t}},"approve_manager.js":function e(n,a,e){let o;e.link("@babel/runtime/helpers/objectSpread2",{default(t){o=t}},0),(ApproveManager={}).error={nextSteps:"",nextStepUsers:""},ApproveManager.isReadOnly=function(){var t=WorkflowManager.getInstance();if(InstanceManager.isCC(t)&&!InstanceManager.ccHasEditPermission())return!0;if(Session.get("instancePrint"))return!0;if(!t)return!0;var e=db.flows.findOne(t.flow);return!e||("completed"==t.state||("draft"!=Session.get("box")||"enabled"!=e.state)&&"inbox"!=Session.get("box"))};var r=function(t,e){return _.contains(t.skip_steps,e._id)};ApproveManager.getNextSteps=function(t,e,n,a,o,s){if(ApproveManager.error.nextSteps="",!e)return;if(!t)return[];var i=new Array,l=e.lines;switch(e.step_type){case"condition":(i=Form_formula.getNextStepsFromCondition(e,a,o)).length||(ApproveManager.error.nextSteps="未能根据条件找到下一步");break;case"end":return i;case"sign":if("approved"==n)l.forEach((function(t){"approved"==t.state&&i.push(WorkflowManager.getInstanceStep(t.to_step))}));else if("rejected"==n){var c;l.forEach((function(t){if("rejected"==t.state){var e=WorkflowManager.getInstanceStep(t.to_step);e&&"condition"!=e.step_type&&i.push(e)}})),(c=t.traces).forEach((function(t){if(1==t.is_finished){var n=WorkflowManager.getInstanceStep(t.step);"condition"!=n.step_type&&e.id!=n.id&&i.push(n)}}));var u,d=(u=WorkflowManager.getInstanceSteps()).findPropertyByPK("step_type","end");i.push(d)}break;default:if("counterSign"===e.step_type&&e.oneClickRejection&&"rejected"===n){var c;l.forEach((function(t){if("rejected"==t.state){var e=WorkflowManager.getInstanceStep(t.to_step);e&&"condition"!=e.step_type&&i.push(e)}})),(c=t.traces).forEach((function(t){if(1==t.is_finished){var n=WorkflowManager.getInstanceStep(t.step);"condition"!=n.step_type&&e.id!=n.id&&i.push(n)}}));var u,d=(u=WorkflowManager.getInstanceSteps()).findPropertyByPK("step_type","end");i.push(d)}else l.forEach((function(t){if("submitted"==t.state){var e=WorkflowManager.getInstanceStep(t.to_step);e&&i.push(e)}}))}i=i.uniqById();var p=new Array;i.forEach((function(e){"condition"==e.step_type&&(n||"sign"!=e.step_type||(n="approved"),p=p.concat(ApproveManager.getNextSteps(t,e,n,a,o,s)))})),i=i.concat(p);var f=new Array;i.forEach((function(i){if("condition"!=i.step_type)if(!s&&r(t,i)){n||"sign"!=i.step_type||(n="approved");let r=ApproveManager.getNextSteps(t,i,n,a,o,s),l=[];for(const t of r)e.id!=t.id&&l.push(t);f=f.concat(l)}else f.push(i)})),f=f.uniqById(),"counterSign"==e.step_type&&f.length>1&&!e.oneClickRejection&&(f=[]);const m={},b={};for(const r of f)ApproveManager.caculateNextStepsByEnterStepCondition(t,r,a,o,m,b);if(!_.isEmpty(m)&&!_.isEmpty(b)){for(const t in b)if(Object.hasOwnProperty.call(b,t)){const e=f.findIndex(e=>e.id==t);-1===e&&f.push(b[t])}for(const t in m)if(Object.hasOwnProperty.call(m,t)){const e=f.findIndex(e=>e.id==t);-1!=e&&f.splice(e,1)}var g=new Array;f.forEach((function(e,r){"condition"==e.step_type&&(n||"sign"!=e.step_type||(n="approved"),g=g.concat(ApproveManager.getNextSteps(t,e,n,a,o,s)),f.splice(r,1))})),f=(f=f.concat(g)).uniqById()}return f},ApproveManager.caculateNextStepsByEnterStepCondition=function(t,e,n,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(!1===e.always_enter_step){const i=e.id,l=ApproveManager.getStepApproveUsers(t,i),c=t.space,u=[];l.forEach(t=>{u.push(Formula_data.getUser(c,t.id))});let d=e.enter_step_condition;const p=Form_formula.init_formula_values(a,n);let f;if(p.step=o({},e,{approvers:u}),!1===Form_formula.runFormulaScript(d,p)){if(r[e.id]=e,e.lines&&e.lines.length>0){const o=e.lines.map((function(t){return t.to_step}));for(const e of o){const o=WorkflowManager.getInstanceStep(e);o&&ApproveManager.caculateNextStepsByEnterStepCondition(t,o,n,a,r,s)}}}else s[e.id]=e}else s[e.id]=e},ApproveManager.getStepApproveUsers=function(e,n){var a=new Array,o=WorkflowManager.getInstanceStep(n);if(o){var r=InstanceManager.getApplicantUserId();switch(o.step_type){case"condition":break;case"start":var s=WorkflowManager.getUser(r);a.push(s);break;default:if(a=[],_.isEmpty(a))switch(o.deal_type){case"pickupAtRuntime":a=[];break;case"specifyUser":var i,l={specifyUserIds:o.approver_users};a=UUflow_api.caculate_nextstep_users("specifyUser",Session.get("spaceId"),l,n);break;case"applicantRole":var c,l={applicantId:r,approveRoleIds:o.approver_roles};(a=UUflow_api.caculate_nextstep_users("applicantRole",Session.get("spaceId"),l,n)).length||console.error("not find step",n,a);break;case"hrRole":var u,l={approveHrRoleIds:o.approver_hr_roles};(a=UUflow_api.caculate_nextstep_users("hrRole",Session.get("spaceId"),l,n)).length||console.error("not find step approve users",n,a);break;case"applicantSuperior":var l={applicantId:r};(a=UUflow_api.caculate_nextstep_users("applicantSuperior",Session.get("spaceId"),l,n))&&0!=a.length||console.error(TAPi18n.__("next_step_users_not_found.aplicant_superior"));break;case"applicant":var l={applicantId:r};a=UUflow_api.caculate_nextstep_users("applicant",Session.get("spaceId"),l,n);break;case"userField":var d=o.approver_user_field,p,f;if(p=InstanceManager.getFormField(d))if(f=InstanceManager.getFormFieldValue(p.code)){var l={userField:p,userFieldValue:f};a=UUflow_api.caculate_nextstep_users("userField",Session.get("spaceId"),l,n)}a.length||console.error("步骤: "+o.name+"fieldId is "+d);break;case"orgField":var m=o.approver_org_field,b=InstanceManager.getFormField(m),g=new Array;if(b){var h=InstanceManager.getFormFieldValue(b.code),w=new Array;if(h)var l={orgField:b,orgFieldValue:h};if(h){var l={orgField:b,orgFieldValue:h};a=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("orgField",Session.get("spaceId"),l,n)).nextStepUsers,caculateNextstepUsers.error&&console.error("caculateNextstepUsers.error",caculateNextstepUsers.error)}}a.length||(g.length?console.error(t("next_step_users_not_found.org_no_members",b.code)):console.error(t("next_step_users_not_found.field_value_empty")));break;case"specifyOrg":var S=o.approver_orgs,l={specifyOrgIds:S};if(!(a=UUflow_api.caculate_nextstep_users("specifyOrg",Session.get("spaceId"),l,n)).length){var v=WorkflowManager.getOrganizations(S),k=WorkflowManager.getOrganizationsChildrens(e.space,S);console.error(TAPi18n.__("next_step_users_not_found.org_no_members",{step_name:o.name,org_name:v.concat(k).getProperty("fullname").toString()}))}break;case"userFieldRole":var T=o.approver_roles,d=o.approver_user_field,p,f;if(p=InstanceManager.getFormField(d)){if(f=InstanceManager.getFormFieldValue(p.code))var l={userField:p,userFieldValue:f,approverRoleIds:T};if(f){var l={userField:p,userFieldValue:f,approverRoleIds:T};a=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("userFieldRole",Session.get("spaceId"),l,n)).nextStepUsers,caculateNextstepUsers.error&&console.error("caculateNextstepUsers.error",caculateNextstepUsers.error)}}if(!a.length)if(f){var M=WorkflowManager.getRoles(T);console.error('"'+M.getProperty("name").toString()+'"审批岗位未指定审批人')}else console.error('"'+p.code+'"字段没有值');break;case"orgFieldRole":var T=o.approver_roles,m=o.approver_org_field,b,h;if(b=InstanceManager.getFormField(m)){if(h=InstanceManager.getFormFieldValue(b.code))var l={orgField:b,orgFieldValue:h,approverRoleIds:T};if(h){var l={orgField:b,orgFieldValue:h,approverRoleIds:T};a=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("orgFieldRole",Session.get("spaceId"),l,n)).nextStepUsers,caculateNextstepUsers.error&&console.error("caculateNextstepUsers.error",caculateNextstepUsers.error)}}if(a<1)if(h){var M=WorkflowManager.getRoles(T);console.error('"'+M.getProperty("name").toString()+'"审批岗位未指定审批人')}else console.error('"'+b.code+'"字段没有值')}}return(a=a.uniqById()).sort((function(t,e){return t.name.localeCompare(e.name)})),a}},ApproveManager.getNextStepUsers=function(e,n,a){ApproveManager.error.nextStepUsers="",ApproveManager.error.type="",ApproveManager.error.code="",InstanceManager._setError_next_step_users("");var o=new Array,r=WorkflowManager.getInstanceStep(n);if(r){if(e.step_approve&&e.step_approve[n]){Session.set("next_step_users_showOrg",!1);var s=e.step_approve[n],i,l;if(_.isArray(s)||(s=[s]),i=InstanceManager.getCurrentApprove())(l=i.next_steps)&&l.length>0&&l[0].step==n&&"start"!=InstanceManager.getCurrentStep().step_type&&(s=_.uniq((l[0].users||[]).concat(s)));return WorkflowManager.getUsers(s)}var c=InstanceManager.getApplicantUserId();Session.set("next_step_users_showOrg",!1);var u="",d=r.name,p={};switch(r.step_type){case"condition":break;case"start":var f=WorkflowManager.getUser(c);o.push(f);break;default:if(o=[],_.isEmpty(o))switch(r.deal_type){case"pickupAtRuntime":var i;if(Session.set("next_step_users_showOrg",!0),!(i=InstanceManager.getCurrentApprove()))break;var l,m=(l=i.next_steps)&&l[0]?l[0].users:[];_.isEmpty(m)||(o=WorkflowManager.getUsers(m));break;case"specifyUser":var b,g={specifyUserIds:r.approver_users};o=UUflow_api.caculate_nextstep_users("specifyUser",Session.get("spaceId"),g,n);break;case"applicantRole":var h=r.approver_roles,g={applicantId:c,approveRoleIds:h};if(!(o=UUflow_api.caculate_nextstep_users("applicantRole",Session.get("spaceId"),g,n)).length){var w=WorkflowManager.remoteFlowRoles.find({_id:{$in:h}},{fields:{name:1}}),S=_.pluck(w,"name").toString();ApproveManager.error.nextStepUsers=TAPi18n.__("next_step_users_not_found.applicant_role",{step_name:r.name,role_name:S})}break;case"hrRole":var v=r.approver_hr_roles,g={approveHrRoleIds:v};if(!(o=UUflow_api.caculate_nextstep_users("hrRole",Session.get("spaceId"),g,n)).length){var w=WorkflowManager.remoteHrRoles.find({_id:{$in:v}},{fields:{name:1}}),k=_.pluck(w,"name").toString();ApproveManager.error.nextStepUsers=TAPi18n.__("next_step_users_not_found.hr_role",{step_name:r.name,role_name:k})}break;case"applicantSuperior":var g={applicantId:c};(o=UUflow_api.caculate_nextstep_users("applicantSuperior",Session.get("spaceId"),g,n))&&0!=o.length||(ApproveManager.error.nextStepUsers=TAPi18n.__("next_step_users_not_found.aplicant_superior"));break;case"applicant":var g={applicantId:c};o=UUflow_api.caculate_nextstep_users("applicant",Session.get("spaceId"),g,n);break;case"userField":var T=r.approver_user_field,M;if(M=InstanceManager.getFormField(T)){var y=null;if(y="relocate"==a?M.is_multiselect?lodash.map(e.values[M.code],"id"):lodash.get(e.values[M.code],"id"):InstanceManager.getFormFieldValue(M.code)){console.log("if ....");var g={userField:M,userFieldValue:y};o=UUflow_api.caculate_nextstep_users("userField",Session.get("spaceId"),g,n)}}o.length||(ApproveManager.error.nextStepUsers='"'+M.code+'"字段没有值',console.error("步骤: "+r.name+"fieldId is "+T));break;case"orgField":var I=r.approver_org_field,x=InstanceManager.getFormField(I),L=new Array;if(x){var H=InstanceManager.getFormFieldValue(x.code),A=new Array;if(H)var g={orgField:x,orgFieldValue:H};if(H){var g={orgField:x,orgFieldValue:H};o=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("orgField",Session.get("spaceId"),g,n)).nextStepUsers,ApproveManager.error.code=caculateNextstepUsers.error}}o.length||(L.length?ApproveManager.error.nextStepUsers=t("next_step_users_not_found.org_no_members",x.code):ApproveManager.error.nextStepUsers=t("next_step_users_not_found.field_value_empty"));break;case"specifyOrg":var B=r.approver_orgs,g={specifyOrgIds:B};if(!(o=UUflow_api.caculate_nextstep_users("specifyOrg",Session.get("spaceId"),g,n)).length){var C=WorkflowManager.getOrganizations(B),V=WorkflowManager.getOrganizationsChildrens(e.space,B);ApproveManager.error.nextStepUsers=TAPi18n.__("next_step_users_not_found.org_no_members",{step_name:r.name,org_name:C.concat(V).getProperty("fullname").toString()})}break;case"userFieldRole":var z=r.approver_roles,T=r.approver_user_field,M,y;if(M=InstanceManager.getFormField(T)){if(y=InstanceManager.getFormFieldValue(M.code))var g={userField:M,userFieldValue:y,approverRoleIds:z};if(y){var g={userField:M,userFieldValue:y,approverRoleIds:z};o=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("userFieldRole",Session.get("spaceId"),g,n)).nextStepUsers,ApproveManager.error.code=caculateNextstepUsers.error}}if(!o.length)if(y){var D=WorkflowManager.getRoles(z);ApproveManager.error.nextStepUsers='"'+D.getProperty("name").toString()+'"审批岗位未指定审批人'}else ApproveManager.error.nextStepUsers='"'+M.code+'"字段没有值';break;case"orgFieldRole":var z=r.approver_roles,I=r.approver_org_field,x,H;if(x=InstanceManager.getFormField(I)){if(H=InstanceManager.getFormFieldValue(x.code))var g={orgField:x,orgFieldValue:H,approverRoleIds:z};if(H){var g={orgField:x,orgFieldValue:H,approverRoleIds:z};o=(caculateNextstepUsers=UUflow_api.caculateNextstepUsers("orgFieldRole",Session.get("spaceId"),g,n)).nextStepUsers,ApproveManager.error.code=caculateNextstepUsers.error}}if(o<1)if(H){var D=WorkflowManager.getRoles(z);ApproveManager.error.nextStepUsers='"'+D.getProperty("name").toString()+'"审批岗位未指定审批人'}else ApproveManager.error.nextStepUsers='"'+x.code+'"字段没有值'}}return(o=o.uniqById()).sort((function(t,e){return t.name.localeCompare(e.name)})),ApproveManager.error.nextStepUsers&&(ApproveManager.error.type=r.deal_type),InstanceManager.handleErrorMessage(),o}},ApproveManager.getNextStepsSelectValue=function(){return $("[name=instance_suggestion_next_step]:checked").val()},ApproveManager.getNextStepUsersSelectValue=function(){var t=$("input[name='nextStepUsers']")[0].dataset.values;return t?t.split(","):[]},ApproveManager.checkAndSetCounterSignNextStepUsers=function(t){var e=new Array,n=InstanceManager.getCurrentStep();if(n&&"counterSign"==n.step_type){var a=WorkflowManager.getInstance(),o=TracesManager.getStepLastHandlers(t,a);e=WorkflowManager.getUsers(o)}return e},ApproveManager.getRelatedInstancesFromDescription=function(t){var e=new Array,n;t&&t.split(")").forEach((function(t){(foo2=t.indexOf(Meteor.absoluteUrl("workflow/space/")))>-1&&(foo3=t.substring(foo2,t.length),2==(foo4=foo3.split("/view/readonly/")).length&&e.push(foo4[1]))}));return e}},"instance_manager.js":function e(){function n(t,e){t.addClass("has-error"),$(".help-block",t).html(e),e&&e.length>0&&toastr.error(e)}function a(t,e){t.addClass("has-error"),$(".help-block",t).html(e)}function o(t){t.removeClass("has-error"),$(".help-block",t).html("")}function r(t,e){if(InstanceManager.isAmisForm()&&t.steedos_field)return e;if(!e&&0!=e)return e;var n;if(["number","multiSelect","radio","checkbox","dateTime","user","group"].includes(t.type))switch(t.type){case"number":case"multiSelect":case"radio":case"checkbox":e=e.toString();break;case"dateTime":e=e;break;case"group":e=CFDataManager.getFormulaOrganizations(e)||"";break;case"user":e=WorkflowManager.getFormulaUserObjects(e)||""}return e}(InstanceManager={}).runFormula=function(t){var e=WorkflowManager.getInstanceFormVersion(),n=[];e&&(n=Form_formula.getFormulaFieldVariable("Form_formula.field_values",e.fields));var a=AutoForm.getFormValues("instanceform",void 0,void 0,!1);Form_formula.run(t,"",n,a,e.fields),Session.set("instance_form_values",{instanceId:Session.get("instanceId"),values:a})},InstanceManager.isTableStyle=function(t){return!Steedos.isMobile()&&!(!(form=WorkflowManager.getForm(t))||"table"!=form.instance_style)},InstanceManager.getFormField=function(t){var e,n=WorkflowManager.getInstanceFields().filterProperty("_id",t);return n.length>0?n[0]:null},InstanceManager.getNextStepOptions=function(){if(ApproveManager.isReadOnly())return[];var t=WorkflowManager.getInstance(),e=InstanceManager.getCurrentApprove(),n;e&&(n=e.next_steps);var a=Session.get("judge"),o=InstanceManager.getCurrentStep(),r=WorkflowManager.getInstanceFormVersion(),s={},i=AutoForm.getFormValues("instanceform",void 0,void 0,!1);i?s=i:Session.get("instance_form_values")&&(s=Session.get("instance_form_values").values);var l=ApproveManager.getNextSteps(t,o,a,s,r&&r.fields),c=function(){return Session.get("next_step_id")},u=Tracker.nonreactive(c),d=[];if(l&&l.length>0){var p=u,f=null;l.forEach((function(t){var e={id:t.id,text:t.name,type:t.step_type};d.push(e)}));var m=_.find(d,(function(t){return t.id===u})),b=!_.isEmpty(m);if(1==d.length)d[0].selected="selected",p=d[0].id,Session.set("next_step_id",p);else if("rejected"!=Session.get("judge")||b){var g=$("[name=instance_suggestion_next_step]:checked"),h;if(g&&g.val()&&(h=d.findPropertyByPK("id",g.val())),_.isObject(h))p=g.val();else if(n&&n.length>0){var w=d.findPropertyByPK("id",n[0].step);_.isObject(w)&&(p=w.id,Session.set("next_step_id",p))}else"rejected"==Session.get("judge")||b||(p=o.lines[0].to_step,Session.set("next_step_id",p))}else start_option=d.findPropertyByPK("type","start"),p=start_option.id,Session.set("next_step_id",p);d.forEach((function(t){t.id==p&&(t.selected="selected",f=t.type)})),Session.set("next_step_multiple",!1),p&&("counterSign"==f?Session.set("next_user_multiple",!0):Session.set("next_user_multiple",!1))}else Session.set("next_step_id",null);return d},InstanceManager.nextStepUsersWillUpdate=function(t,e){"use strict";return!(!t||!e)&&("applicant"===t.name&&("applicant"===e.deal_type||"applicantRole"===e.deal_type||"applicantSuperior"===e.deal_type)||("user"===t.type&&t._id===e.approver_user_field&&("userField"===e.deal_type||"userFieldRole"===e.deal_type)||"group"===t.type&&t._id===e.approver_org_field&&("orgField"===e.deal_type||"orgFieldRole"===e.deal_type)))},InstanceManager.getStepApproveSelectedHandlerIds=function(){var t,e=WorkflowManager.getInstance();if(e){var n=e.step_approve;if(n){var a=InstanceManager.getCurrentStep();_.isEmpty(n[a._id])||(t=n[a._id])}}return t},InstanceManager.getNextUserOptions=function(){var t=[],e=Session.get("next_step_id"),n=Session.get("next_user_multiple"),a=InstanceManager.getStepApproveSelectedHandlerIds();if(e){var o=WorkflowManager.getInstance(),r=InstanceManager.getCurrentApprove();if(!r)return t;var s=r.next_steps,i=[],l=ApproveManager.getNextStepUsers(o,e),c=TracesManager.getStepLastHandlers(e,o);if(l){var u=WorkflowManager.getInstanceStep(e);0==l.length&&"pickupAtRuntime"==u.deal_type&&("counterSign"!=u.step_type?l=WorkflowManager.getUsers(c):a&&(l=a)),l.forEach((function(n){var o={id:n.id,name:n.name};s&&s.length>0?s[0].step==e&&_.contains(s[0].users,n.id)&&(o.selected=!0,i.push(n.id)):l.length>1&&("counterSign"!=u.step_type?c.includes(n.id)&&(o.selected=!0):a&&(o.selected=!0)),t.push(o)}))}}return t},InstanceManager.getFormFieldByCode=function(t){var e,n=WorkflowManager.getInstanceFields().filterProperty("code",t);return n.length>0?n[0]:null},InstanceManager.getApplicantUserId=function(){var t=WorkflowManager.getInstance();if(t){var e=$("#ins_applicant");return"draft"==t.state&&e&&1==e.length&&e[0]&&e[0].dataset.values?e[0].dataset.values:t.applicant}},InstanceManager.checkFormValue=async function(){if(ApproveManager.isReadOnly())return!0;if(!InstanceManager.isCC(WorkflowManager.getInstance())){if(InstanceManager.checkNextStep(),InstanceManager.checkNextStepUser(),InstanceManager.checkSuggestion(),InstanceManager.isAmisForm())return await SteedosUI.refs.instanceAmisView.getComponentById("instanceForm").validate();var t=WorkflowManager.getInstanceFieldPermission();for(var e in t)"editable"==t[e]&&InstanceManager.checkFormFieldValue($("[name='"+e+"']",$("#instanceform"))[0],e)}},InstanceManager.checkNextStep=function(){var t=$("[name=instance_suggestion_next_step]").closest(".form-group");if(""!=ApproveManager.error.nextSteps)return n(t,ApproveManager.error.nextSteps),void(ApproveManager.error.nextSteps="");var e=ApproveManager.getNextStepsSelectValue();e&&"-1"!=e?o(t):n(t,TAPi18n.__("instance_select_next_step"))},InstanceManager._setError_next_step_users=function(t,e,n){var a=$("input[name='nextStepUsers']");a.length>0&&(a[0].dataset.error=t,a[0].dataset.error_type=e,a[0].dataset.error_code=n)},InstanceManager.handleErrorMessage=function(){if(!($("input[name='nextStepUsers']").length<1)){var t=$("#nextStepUsers").closest(".form-group");return InstanceManager._setError_next_step_users("","",""),""!=ApproveManager.error.nextStepUsers?(t.addClass("has-error"),InstanceManager._setError_next_step_users(ApproveManager.error.nextStepUsers,ApproveManager.error.type,ApproveManager.error.code),void(ApproveManager.error.nextStepUsers="")):void 0}},InstanceManager.checkNextStepUser=function(){if(!($("input[name='nextStepUsers']").length<1)){var t=$("#nextStepUsers").closest(".form-group");if(!(t.length<1)){var e=ApproveManager.getNextStepUsersSelectValue(),a=ApproveManager.getNextStepsSelectValue(),r=WorkflowManager.getInstanceStep(a),s;if(e.length>0||r&&"end"==r.step_type)o(t);else"counterSign"==InstanceManager.getCurrentStep().step_type?n(t,TAPi18n.__("instance_next_step_user_countersign")):n(t,TAPi18n.__("instance_next_step_user"))}}},InstanceManager.nextStepUserErrorClass=function(){if(!($("input[name='nextStepUsers']").length<1)){var t=$("#nextStepUsers").closest(".form-group");if(!(t.length<1)){var e=ApproveManager.getNextStepUsersSelectValue(),n=ApproveManager.getNextStepsSelectValue(),r=WorkflowManager.getInstanceStep(n);e.length>0||r&&"end"==r.step_type?o(t):a(t,TAPi18n.__("instance_next_step_user"))}}},InstanceManager.checkSuggestion=function(t){var e=$("[name='judge']").filter(":checked").val(),r=$("#suggestion").parent();e&&"rejected"==e?$("#suggestion").val()?o(r):0==t?a(r,TAPi18n.__("instance_reasons_reject")):n(r,TAPi18n.__("instance_reasons_reject")):o(r)},InstanceManager.checkFormFieldValue=function(t,e,a){if(t){!t.name&&e&&(t.name=e);var r=/^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/,s=$("#"+t.id).parent(),i="",l=$("[name='"+t.dataset.schemaKey+"']"),c=l.closest(".form-group");if(s.hasClass("twitter-typeahead")&&(s=s.parent().parent()),"table"!=l.attr("type")&&"true"==t.parentNode.dataset.required||("checkbox"==t.type||"radio"==t.type)&&"true"==t.parentNode.parentNode.parentNode.dataset.required||1==c.length&&"true"==c[0].dataset.required){var u="";if(!(u="checkbox"==t.type||"radio"==t.type?$("[name='"+t.name+"']:checked").val():t.value)&&e&&(u=a||InstanceManager.getInstanceValuesByAutoForm()[e]),!u||""==u||u.length<1){var d=InstanceManager.getFormFieldByCode(t.name),p=t.name;d&&(p=d.name?d.name:d.code),"rejected"!=Session.get("judge")&&(i=n(s,TAPi18n.__("instance_field")+"‘"+p+"’"+TAPi18n.__("instance_is_required")))}}if("table"==l.attr("type")&&"true"==t.parentNode.parentNode.parentNode.parentNode.dataset.required){var f=AutoForm.getFieldValue(t.dataset.schemaKey,"instanceform");s=l.parent().parent().parent().parent(),(!f||f.length<1)&&"rejected"!=Session.get("judge")&&(i=n(s,TAPi18n.__("instance_field")+"‘"+t.dataset.label+"’"+TAPi18n.__("instance_is_required")))}if("email"==t.type&&""!=t.value&&(r.test(t.value)||(i=TAPi18n.__("instance_email_format_error"))),"url"==t.type&&""!=t.value){var _=t.value,m;0!=t.value.indexOf("http")&&(_="http://"+encodeURI(_)),new URI(_).username()&&(i=TAPi18n.__("url_invalid"))}return""==i?(o(s),!0):(n(s,i),!1)}},InstanceManager.getFormFieldValue=function(t){if(InstanceManager.isAmisForm()){const e=InstanceManager.getInstanceFormValue()||{};return e[t]}return AutoForm.getFieldValue(t,"instanceform")},InstanceManager.getInstanceFormValue=function(){var t={};if(InstanceManager.isAmisForm()&&SteedosUI.refs.instanceAmisView)t=SteedosUI.refs.instanceAmisView.getComponentById("instanceForm")?SteedosUI.refs.instanceAmisView.getComponentById("instanceForm").props.data:SteedosUI.refs.instanceAmisView.parent.getComponentById("instanceForm").props.data;else{var e=AutoForm.getFormValues("instanceform");if(!e)return;t=_.extend(e.insertDoc,e.updateDoc.$unset);const n=WorkflowManager.getInstance();if(n&&"draft"==Session.get("box")&&"draft"!=n.state&&!t["文件标题"]&&("4c0acf34-aaa2-4834-a189-dd742e987382"==n.flow||"fd456ae72001cb119a7a9076"==n.flow)){const e=InstanceManager.getCurrentApprove();Sentry.captureMessage("申请单值丢失",{contexts:{flowId:n.flow,instanceId:n._id,userId:Meteor.userId(),box:Session.get("box"),currentApprove:e,autoFormValue:t,instanceValues:n.values},user:{id:Meteor.userId()},level:"error"})}}return t},InstanceManager.getInstanceValuesByAutoForm=function(){var t=WorkflowManager.getInstanceFields(),e=InstanceManager.getInstanceFormValue(),n={};return t.forEach((function(t){if("table"==t.type){if(t_values=new Array,t.sfields){if(!e[t.code])return void(n[t.code]=t_values);e[t.code].forEach((function(e){t.sfields.forEach((function(t){e[t.code]=r(t,e[t.code])})),t_values.push(e)}))}n[t.code]=t_values}else"section"!=t.type&&(n[t.code]=r(t,e[t.code]))})),n},InstanceManager.getCurrentStep=function(){var t=WorkflowManager.getInstance();if(t&&t.traces){var e,n=t.traces[t.traces.length-1].step;return WorkflowManager.getInstanceStep(n)}},InstanceManager.getCurrentTrace=function(){var t=WorkflowManager.getInstance();if(t&&t.traces)return t.traces[t.traces.length-1]},InstanceManager.getStartStep=function(){var t=WorkflowManager.getInstance();if(t&&t.traces)return WorkflowManager.getInstanceStep(t.traces[0].step)},InstanceManager.getCurrentValues=function(){var t=Session.get("box"),e,n,a=WorkflowManager.getInstance();if(InstanceManager.isCC(a))n=a.values;else if("draft"==t){if((e=InstanceManager.getCurrentApprove())&&e.values)return e.values}else if("inbox"==t){var o=InstanceManager.getCurrentStep();if(e=InstanceManager.getCurrentApprove(),o&&"counterSign"==o.step_type||InstanceManager.ccHasEditPermission())return e.values=InstanceManager.clone(a.values),e.values;if(e&&e.values)return _.isEmpty(e.values)&&(e.values=InstanceManager.clone(WorkflowManager.getInstance().values)),e.values}else n=a.values;return n},InstanceManager.clone=function(t){if(t)return JSON.parse(JSON.stringify(t))},InstanceManager.getCurrentApprove=function(){var t=WorkflowManager.getInstance();if(t&&t.traces&&!(t.traces.length<1)){var e=t.traces.filterProperty("is_finished",!1);if(e.length){var n=e[0].approves.filterProperty("is_finished",!1).filterProperty("handler",Meteor.userId()),a=n.length>0?n[0]:null;if(Session.get("instanceTaskId")){var o=_.find(n,t=>t._id===Session.get("instanceTaskId"));o&&(a=o)}}if(a&&"cc"!=a.type||(_.each(t.traces,(function(t){_.each(t.approves,(function(t){"cc"==t.type&&t.handler==Meteor.userId()&&0==t.is_finished&&(a=t)}))})),Session.get("instanceTaskId")&&_.each(t.traces,(function(t){_.each(t.approves,(function(t){t._id===Session.get("instanceTaskId")&&(a=t)}))}))),a)return a._id&&(a.id=a._id),a}},InstanceManager.getMyApprove=function(){var t=InstanceManager.getCurrentApprove();if(t){t.description=$("#suggestion").val();var e=$("[name='judge']").filter(":checked").val();e&&(t.judge=e);var n=ApproveManager.getNextStepsSelectValue();if(n){var a=ApproveManager.getNextStepUsersSelectValue(),o=new Array;a instanceof Array?a.forEach((function(t){o.push(t)})):a&&o.push(a),t.next_steps=[{step:n,users:o}]}return InstanceManager.isAmisForm()?t.values=InstanceManager.getInstanceFormValue():t.values=InstanceManager.getInstanceValuesByAutoForm(),t}return{}},InstanceManager.isAmisForm=function(){var t=WorkflowManager.getInstance();if(t){var e=db.flows.findOne({_id:t.flow},{fields:{enable_amisform:1}});return e&&e.enable_amisform}},InstanceManager.getInstanceFormApplicant=function(){var t;return InstanceManager.isAmisForm()?WorkflowManager.getInstance().applicant:$("input[name='ins_applicant']")[0].dataset.values},InstanceManager.setInstanceFormApplicant=function(t,e){$("input[name='ins_applicant']")[0].dataset.values=t,$("input[name='ins_applicant']").val(e)},InstanceManager.saveIns=function(t){t||$("body").addClass("loading");var e=WorkflowManager.getInstance(),n;if(e&&(n=InstanceManager.getInstanceValuesByAutoForm(),"draft"!=e.state&&InstanceManager.updateApproveSign("",$("#suggestion").val(),"update",InstanceSignText.helpers.getLastSignApprove()),InstanceManager.isCC(e))){var a=$("#suggestion").val(),o=InstanceManager.ccHasEditPermission(),r=InstanceManager.getMyApprove();Meteor.call("cc_save",e._id,a,r,o,(function(e,n){$("body").removeClass("loading"),!t&&e&&toastr.error(e),1==n&&(WorkflowManager.instanceModified.set(!1),t||toastr.success(TAPi18n.__("Saved successfully")))}))}else if(InstanceManager.getInstanceFormValue())if(e){var s=e.state;if("draft"==s){e.traces[0].approves[0]=InstanceManager.getMyApprove();var i=InstanceManager.getInstanceFormApplicant();if(e.applicant!=i){var l=e.space,c=SteedosDataManager.spaceUserRemote.findOne({space:l,user:i},{fields:{organization:1,name:1}}),u=c.organization,d=SteedosDataManager.organizationRemote.findOne(u,{fields:{name:1,fullname:1}});e.applicant=i,e.applicant_name=c.name,e.applicant_organization=u,e.applicant_organization_name=d.name,e.applicant_organization_fullname=d.fullname}Meteor.call("draft_save_instance",e,(function(e,n){$("body").removeClass("loading"),WorkflowManager.instanceModified.set(!1),1==n?t||toastr.success(TAPi18n.__("Saved successfully")):"upgraded"==n?(toastr.info(TAPi18n.__("Flow upgraded")),setTimeout((function(){FlowRouter.reload()}),2e3),console.log("upgraded")):(toastr.error(e.reason),FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/draft/"))}))}else if("pending"==s){var r;(r=InstanceManager.getMyApprove()).values=n,_.isEmpty(r)||_.isEmpty(r._id)?$("body").removeClass("loading"):Meteor.call("inbox_save_instance",r,(function(e,n){$("body").removeClass("loading"),WorkflowManager.instanceModified.set(!1),1==n?t||toastr.success(TAPi18n.__("Saved successfully")):(toastr.error(e.reason),FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/inbox/"))}))}}else $("body").removeClass("loading")},InstanceManager.newIns=function(t){UUflow_api.post_draft(t)},InstanceManager.deleteIns=function(){var t=WorkflowManager.getInstance();t&&UUflow_api.delete_draft(t._id)},InstanceManager.submitIns=function(){if(InstanceEvent.before.instanceSubmit()&&InstanceManager.isCCMustFinished()){var t=WorkflowManager.getInstance();if(t)if("draft"!=t.state&&InstanceManager.updateApproveSign("",$("#suggestion").val(),"update",InstanceSignText.helpers.getLastSignApprove()),InstanceManager.isCC(t)){if(Session.get("instance_submitting"))return;Session.set("instance_submitting",!0);var e=$("#suggestion").val(),n=InstanceManager.ccHasEditPermission(),a=InstanceManager.getMyApprove();$(document.body).addClass("loading"),Meteor.call("cc_submit",t._id,e,a,n,(function(t,e){$(document.body).removeClass("loading"),t&&(toastr.error(t),Session.set("instance_submitting",!1)),1==e&&(WorkflowManager.instanceModified.set(!1),toastr.success(TAPi18n.__("Submitted successfully")),Session.set("instance_submitting",!1),window.goBack(),Session.set("instanceId",null))}))}else{var o=t.state;if("draft"==o){var r=InstanceManager.getInstanceFormApplicant();if(t.applicant!=r){var s=t.space,i=SteedosDataManager.spaceUserRemote.findOne({space:s,user:r},{fields:{organization:1,name:1}}),l=i.organization,c=SteedosDataManager.organizationRemote.findOne(l,{fields:{name:1,fullname:1}});t.applicant=r,t.applicant_name=i.name,t.applicant_organization=l,t.applicant_organization_name=c.name,t.applicant_organization_fullname=c.fullname}t.traces[0].approves[0]=InstanceManager.getMyApprove(),UUflow_api.post_submit(t)}else if("pending"==o){var a;(a=InstanceManager.getMyApprove()).values=InstanceManager.getInstanceValuesByAutoForm(),UUflow_api.post_engine(a)}}}},InstanceManager.terminateIns=function(t){var e=WorkflowManager.getInstance();e&&UUflow_api.post_terminate({_id:e._id,terminate_reason:t})},InstanceManager.exportIns=function(t){spaceId=Session.get("spaceId"),flowId=Session.get("flowId"),spaceId&&flowId&&UUflow_api.get_export(spaceId,flowId,t)},InstanceManager.reassignIns=function(t,e){var n=WorkflowManager.getInstance();n&&(n.inbox_users=t,n.reassign_reason=e,UUflow_api.put_reassign(n))},InstanceManager.relocateIns=function(t,e,n){var a=WorkflowManager.getInstance();a&&UUflow_api.put_relocate({_id:a._id,relocate_next_step:t,relocate_inbox_users:e,relocate_comment:n})},InstanceManager.archiveIns=function(t){var e=WorkflowManager.getInstance();if(e){if(1==e.is_archived)return;UUflow_api.post_archive(t)}},InstanceManager.addAttach=function(t,e){var n=WorkflowManager.getInstance();if(n){var a=n.state,o=new Date,r=Meteor.userId(),s=t.name;s||(s=Session.get("filename"));var i=n.attachments||[],l=!1,c=Session.get("attach_id");if(i.forEach((function(n){if(n.filename==s||1==e&&n._id==c){l=!0;var a=n.historys;a instanceof Array||(a=[]);var i=InstanceManager.getMyApprove().id;n.current.approve!=i&&a.unshift(n.current),n.historys=a,n.current={_id:(new Mongo.ObjectID)._str,_rev:t._id,length:t.size,approve:i,created:o,created_by:r,created_by_name:Meteor.user().name,filename:s},n.filename=s}})),!l){var u={_id:(new Mongo.ObjectID)._str,filename:s,contentType:t.type,modified:o,modified_by:r,created:o,created_by:r,current:{_id:(new Mongo.ObjectID)._str,_rev:t._id,length:t.size,approve:InstanceManager.getMyApprove().id,created:o,created_by:r,created_by_name:Meteor.user().name,filename:s}};i?i.push(u):i=[u]}if(WorkflowManager.instanceModified.set(!0),"draft"==a)n.attachments=i,n.traces[0].approves[0]=InstanceManager.getMyApprove(),Meteor.call("draft_save_instance",n,(function(t,e){Session.set("change_date",new Date),WorkflowManager.instanceModified.set(!1),1==e?toastr.success(TAPi18n.__("Attachment was added successfully")):toastr.error(t)}));else if("pending"==a)if(InstanceManager.isCC(n))toastr.success(TAPi18n.__("Attachment was added successfully"));else{var d={};$.extend(d,InstanceManager.getMyApprove()),d.attachments=i,d.values=InstanceManager.getInstanceValuesByAutoForm(),Meteor.call("inbox_save_instance",d,(function(t,e){Session.set("change_date",new Date),WorkflowManager.instanceModified.set(!1),1==e?toastr.success(TAPi18n.__("Attachment was added successfully")):toastr.error(t)}))}}},InstanceManager.removeAttach=function(){var t=WorkflowManager.getInstance();if(t){var e=t.state,n=t.attachments,a=Session.get("file_id"),o=n.filter((function(t){if(t.current._rev!=a)return t;var e=t.historys;return e&&e.length>0?(t.current=t.historys.shift(),t.filename=t.current.filename,t):void 0}));if(WorkflowManager.instanceModified.set(!0),"draft"==e)t.attachments=o,t.traces[0].approves[0]=InstanceManager.getMyApprove(),Meteor.call("draft_save_instance",t,(function(t,e){Session.set("change_date",new Date),WorkflowManager.instanceModified.set(!1),1==e?toastr.success(TAPi18n.__("Attachment deleted successfully")):toastr.error(t)}));else if("pending"==e)if(InstanceManager.isCC(t))toastr.success(TAPi18n.__("Attachment deleted successfully"));else{t.attachments=o;var r={};$.extend(r,InstanceManager.getMyApprove()),r.attachments=o,r.values=InstanceManager.getInstanceValuesByAutoForm(),Meteor.call("inbox_save_instance",r,(function(t,e){Session.set("change_date",new Date),WorkflowManager.instanceModified.set(!1),1==e?toastr.success(TAPi18n.__("Attachment deleted successfully")):toastr.error(t)}))}}},InstanceManager.uploadAttach=function(e,n,a){var o,r;check(n,Boolean),check(a,Boolean),$(document.body).addClass("loading"),$(".loading-text").text(TAPi18n.__("workflow_attachment_uploading"));var s=100,i,l,c,u;for(Meteor.settings.public&&Meteor.settings.public.cfs&&Meteor.settings.public.cfs.size_limit&&(s=Meteor.settings.public.cfs.size_limit),o=1024*s*1024,r=t("workflow_attachment_paid_size_limit")+s+"MB",u=0;uo)return $("body").removeClass("loading"),$(".loading-text").text(""),void swal({title:r,type:"warning",confirmButtonText:t("OK"),closeOnConfirm:!0},(function(){$(document.body).removeClass("loading"),$(".loading-text").text("")}));l.name&&(c=l.name,["image.jpg","image.gif","image.jpeg","image.png"].includes(c.toLowerCase())&&(c="image-"+moment(new Date).format("YYYYMMDDHHmmss")+"."+c.split(".").pop()),Session.set("filename",c),$(".loading-text").text(TAPi18n.__("workflow_attachment_uploading")+c+"..."),(i=new FormData).append("Content-Type",cfs.getContentType(c)),i.append("file",l),i.append("instance",Session.get("instanceId")),i.append("space",Session.get("spaceId")),i.append("approve",InstanceManager.getMyApprove().id),i.append("owner",Meteor.userId()),i.append("owner_name",Meteor.user().name),i.append("is_private",l.is_private||!1),n&&(i.append("isAddVersion",n),i.append("parent",Session.get("attach_parent_id"))),a&&i.append("main",a),$.ajax({url:Steedos.absoluteUrl("api/v4/instances/s3/"),type:"POST",async:!0,data:i,dataType:"json",processData:!1,contentType:!1,beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+Session.get("spaceId")+","+Accounts._storedLoginToken())},success:function(t,e){var n;$(document.body).removeClass("loading"),$(".loading-text").text(""),t.errors?t.errors.forEach((function(t){toastr.error(t.errorMessage)})):toastr.success(TAPi18n.__("Attachment was added successfully"))},error:function(t,e,n){$(document.body).removeClass("loading"),$(".loading-text").text(""),toastr.error(e)}}),u++)}},InstanceManager.lockAttach=function(t){Meteor.call("cfs_instances_lock",t,Meteor.userId(),Meteor.user().name)},InstanceManager.isInbox=function(){var t=WorkflowManager.getInstance(),e=Meteor.userId();if(t&&e&&"inbox"==Session.get("box")){if(t.inbox_users&&t.inbox_users.includes(e))return!0;if(InstanceManager.isCC(t))return!0}return!1},InstanceManager.isCC=function(t){if(!t)return!1;var e=Meteor.userId(),n=InstanceManager.getCurrentApprove();return(!n||"cc"==n.type)&&!(!t.cc_users||!t.cc_users.includes(e))},InstanceManager.getCCApprove=function(t,e){var n=WorkflowManager.getInstance(),a=n.traces,o={};return a.forEach((function(n){n.approves&&n.approves.forEach((function(n){n.handler==t&&"cc"==n.type&&n.is_finished==e&&(o=n)}))})),Session.get("instanceTaskId")&&_.each(n.traces,(function(t){_.each(t.approves,(function(t){t._id===Session.get("instanceTaskId")&&(o=t)}))})),o},InstanceManager.unlockAttach=function(t){Meteor.call("cfs_instances_unlock",t)},InstanceManager.forwardIns=function(t,e,n,a,o,r,s,i,l){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0),$("body").addClass("loading");var c=WorkflowManager.getInstance(),u=null;InstanceManager.isInbox()&&"pending"==c.state?InstanceManager.getCurrentApprove()&&(u=InstanceManager.getCurrentApprove()._id):"outbox"==Session.get("box")&&"pending"==c.state&&InstanceManager.getLastCCApprove(c.traces)&&(u=InstanceManager.getLastCCApprove(c.traces)._id),Meteor.call("forward_instance",t,e,n,a,o,r,s,i,l,u,(function(t,e){$("body").removeClass("loading"),Session.set("instance_submitting",!1),t&&("no_permission"==t.error?"forward"==i?toastr.error(TAPi18n.__("instance_no_add_permission",{actiontype:TAPi18n.__("instance_forward_title"),usernames:t.details})):"distribute"==i&&toastr.error(TAPi18n.__("instance_no_add_permission",{actiontype:TAPi18n.__("instance_distribute_title"),usernames:t.details})):toastr.error(t.message)),_.isEmpty(e)||("forward"==i?toastr.success(TAPi18n.__("forward_instance_success")):"distribute"==i&&toastr.success(TAPi18n.__("instance_distribute_success")))}))}},InstanceManager.getUserInboxInstances=function(){var t={};return t.$or=[{inbox_users:Meteor.userId()},{cc_users:Meteor.userId()}],db.instances.find(t).fetch()},InstanceManager.retrieveIns=function(t){var e=WorkflowManager.getInstance();e&&(e.retrieve_comment=t,UUflow_api.post_retrieve(e))},InstanceManager.fixInstancePosition=function(t){if($(".instance-wrapper .instance-view").hasClass("suggestion-active")){var e=$(".instance-wrapper .instance-suggestion").height();$(".instance-wrapper .instance").css("bottom",e+2)}else $(".instance-wrapper .instance").css("bottom",0);t&&setTimeout((function(){$(".instance").scrollTop($(".instance .instance-form").height()+$(".instance-traces").height())}),1)},InstanceManager.setApproveHaveRead=function(t){var e=WorkflowManager.getInstance(),n=InstanceManager.getCurrentApprove();if(n&&!n.is_read)Meteor.call("set_approve_have_read",e._id,n.trace,n.id,(function(t,e){}));else{var a=InstanceManager.getCCApprove(Meteor.userId(),!1);_.isEmpty(a)||a.is_read||Meteor.call("cc_read",a,(function(t,e){console.log("set read")}))}},InstanceManager.instanceformChangeEvent=function(t){var e,n,a,o,r;if(!ApproveManager.isReadOnly()){if(e=t.target.name,"number"===(o=t.target.type)){r=t.target.value;try{r||(r=0),"string"==typeof r&&(r=parseFloat(r)),r=(a=t.target.step)?r.toFixed(a.length-2):r.toFixed(0),t.target.value=r}catch(l){n=l,console.log(r+n)}}if(InstanceManager.checkFormFieldValue(t.target),InstanceManager.runFormula(e),"ins_applicant"===e)Session.set("ins_applicant",InstanceManager.getApplicantUserId()),InstanceManager.nextStepUsersWillUpdate({name:"applicant"},WorkflowManager.getInstanceStep(Session.get("next_step_id")))&&Session.set("instance_next_user_recalculate",Random.id());else{var s,i=WorkflowManager.getInstanceFields().filterProperty("code",e);i.length>0&&InstanceManager.nextStepUsersWillUpdate(i[0],WorkflowManager.getInstanceStep(Session.get("next_step_id")))&&Session.set("instance_next_user_recalculate",Random.id())}}},InstanceManager.isCCMustFinished=function(){var t=InstanceManager.getCurrentStep();if(t&&1==t.cc_must_finished){var e=WorkflowManager.getInstance();if(e){var n=_.find(e.traces,(function(e){return e.step==t._id})),a=new Array,o=Meteor.userId();if(InstanceManager.isCC(e)?_.each(n.approves,(function(t){"cc"==t.type&&t.from_user==o&&1!=t.is_finished&&t.handler!=o&&a.push(t.handler_name)})):_.each(n.approves,(function(t){"cc"==t.type&&t.from_user==o&&1!=t.is_finished&&a.push(t.handler_name)})),!_.isEmpty(a))return toastr.error(TAPi18n.__("instance_cc_must_finished",{not_finished_users_name:a.toString()})),!1}}return!0},InstanceManager.getLastApprove=function(t){var e,n,a;for(a=Meteor.userId(),e=null,n=t.length-1;n>=0;)!e&&t[n].is_finished&&_.each(t[n].approves,(function(t){e||!t.is_finished||t.user!==a||t.type&&"reassign"!=t.type||!["approved","submitted","rejected"].includes(t.judge)||(e=t)})),n--;return e},InstanceManager.getLastTraceStepId=function(t){var e,n,a,o;for(o=Meteor.userId(),a=null,n=null,e=t.length-1;e>=0;)!a&&t[e].is_finished&&_.each(t[e].approves,(function(r){a||(!r.is_finished||r.user!==o||r.type&&"reassign"!=r.type||!["approved","submitted","rejected"].includes(r.judge)||(a=r.trace),a&&(n=t[e].step))})),e--;return n},InstanceManager.getLastCCTraceStepId=function(t){var e,n,a,o;for(o=Meteor.userId(),a=null,n=null,e=t.length-1;e>=0;)!a&&t[e].is_finished&&_.each(t[e].approves,(function(r){a||(!r.is_finished||r.user!==o||r.type&&"cc"!=r.type||!["approved","submitted","rejected"].includes(r.judge)||(a=r.trace),a&&(n=t[e].step))})),e--;return n},InstanceManager.getLastCCApprove=function(t){var e,n,a;for(a=Meteor.userId(),e=null,n=t.length-1;n>=0;)!e&&t[n].is_finished&&_.each(t[n].approves,(function(t){e||!t.is_finished||t.handler!==a||t.type&&"cc"!=t.type||!["approved","submitted","rejected"].includes(t.judge)||(e=t)})),n--;return e},InstanceManager.isAttachLocked=function(t,e){return!!cfs.instances.find({"metadata.instance":t,"metadata.current":!0,"metadata.locked_by":e}).count()},InstanceManager.getCCStep=function(){var t=InstanceManager.getCurrentApprove();if(!t)return!1;var e=WorkflowManager.getInstance(),n;if(!e)return!1;var a=_.find(e.traces,(function(e){return e._id==t.trace}));return a&&(n=WorkflowManager.getInstanceStep(a.step)),n},InstanceManager.updateApproveSign=function(t,e,n,a){!(myApprove=InstanceManager.getCurrentApprove())||1==myApprove.sign_show&&e||Meteor.call("update_approve_sign",myApprove.instance,myApprove.trace,myApprove._id,t,e,n||"update",a)},InstanceManager.getDistributeStep=function(){var t;if(InstanceManager.isInbox())t=InstanceManager.getCurrentStep();else if("outbox"==Session.get("box")){var e=WorkflowManager.getInstance();if(e&&"pending"==e.state){var n=InstanceManager.getLastTraceStepId(e.traces);n&&(t=WorkflowManager.getInstanceStep(n))}}return t};var s=function(t,e){var n=Session.get("instance_form_values");t||(t=InstanceManager.getStartStep()),e||(e=[]);var a=[],o="approved",r=WorkflowManager.getInstanceFormVersion(),i={},l=AutoForm.getFormValues("instanceform",void 0,void 0,!1);l?i=l:n&&(i=n.values),a.push(t);var c=ApproveManager.getNextSteps(WorkflowManager.getInstance(),t,o,i,r.fields,!0);return _.each(c,(function(t){_.contains(e,t._id)||(a=a.concat(s(t,e.concat(_.pluck(a,"_id")))))})),a=a.uniqById()};InstanceManager.pickApproveSteps=function(){return s()},InstanceManager.ccHasEditPermission=function(){var t=InstanceManager.getCCStep(),e=InstanceManager.getCurrentApprove();if(!e)return!1;var n=WorkflowManager.getInstance();if(!n)return!1;var a=_.find(n.traces,(function(t){return t._id==e.trace}));return t&&t.cc_has_edit_permission&&!a.is_finished},InstanceManager.getOpinionFieldsCode=function(){let t="",e=$("[name=opinion_fields_code]");if(e&&e.length>0){let n=0,a=e.length;for(;n0)return _.each(e.result,(function(t){t.alerts&&toastr.info(t.alerts)})),void(t.distribute_from_instance||t.distribute_from_instances.length>0?window.goBack():FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/draft/"));t.distribute_from_instance||t.distribute_from_instances.length>0?window.goBack():FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/"+Session.get("box")),toastr.success(TAPi18n.__("Submitted successfully")),Session.set("instance_submitting",!1);var a=SteedosUI.refs.serviceSteedosKeyvaluesSubscribe,o=a&&a.getComponentByName("serviceSteedosKeyvaluesSubscribe.buttonTriggerDataChange");o&&o.props.dispatchEvent("click",{})}},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.post_engine=function(t){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0);var e={methodOverride:"POST"};e["X-User-Id"]=Meteor.userId(),e["X-Auth-Token"]=Accounts._storedLoginToken(),e.insId=t.instance;var n=Steedos.absoluteUrl()+"api/workflow/engine?"+$.param(e),a={Approvals:[t]};a=JSON.stringify(a),$(document.body).addClass("loading"),$.ajax({url:n,type:"POST",async:!0,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+Session.get("spaceId")+","+Accounts._storedLoginToken())},success:function(t,e){$(document.body).removeClass("loading"),t.errors?t.errors.forEach((function(t){toastr.error(t.errorMessage)})):(Session.set("instance_change",!1),window.goBack(),toastr.success(TAPi18n.__("Submitted successfully")),Session.set("instance_submitting",!1))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.post_terminate=function(t){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0);var e={methodOverride:"POST"};e["X-User-Id"]=Meteor.userId(),e["X-Auth-Token"]=Accounts._storedLoginToken();var n=Steedos.absoluteUrl()+"api/workflow/terminate?"+$.param(e),a={Instances:[t]};a=JSON.stringify(a),$(document.body).addClass("loading"),$.ajax({url:n,type:"POST",async:!0,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+Session.get("spaceId")+","+Accounts._storedLoginToken())},success:function(t,e){if($(document.body).removeClass("loading"),t.errors)t.errors.forEach((function(t){toastr.error(t.errorMessage)}));else{FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/"+Session.get("box")),toastr.success(TAPi18n.__("Canceled successfully")),Session.set("instance_submitting",!1);var n=SteedosUI.refs.serviceSteedosKeyvaluesSubscribe,a=n&&n.getComponentByName("serviceSteedosKeyvaluesSubscribe.buttonTriggerDataChange");a&&a.props.dispatchEvent("click",{})}},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.put_reassign=function(t){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0);var e={methodOverride:"PUT"};e["X-User-Id"]=Meteor.userId(),e["X-Auth-Token"]=Accounts._storedLoginToken();var n=Steedos.absoluteUrl()+"api/workflow/reassign?"+$.param(e),a={Instances:[t]};a=JSON.stringify(a),$(document.body).addClass("loading"),$.ajax({url:n,type:"POST",async:!0,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+Session.get("spaceId")+","+Accounts._storedLoginToken())},success:function(t,e){$(document.body).removeClass("loading"),t.errors?t.errors.forEach((function(t){toastr.error(t.errorMessage)})):(toastr.success(TAPi18n.__("Reasigned successfully")),Session.set("instance_submitting",!1))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.put_relocate=function(t){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0);var e={methodOverride:"PUT"};e["X-User-Id"]=Meteor.userId(),e["X-Auth-Token"]=Accounts._storedLoginToken();var n=Steedos.absoluteUrl()+"api/workflow/relocate?"+$.param(e),a={Instances:[t]};a=JSON.stringify(a),$(document.body).addClass("loading"),$.ajax({url:n,type:"POST",async:!0,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+Session.get("spaceId")+","+Accounts._storedLoginToken())},success:function(t,e){$(document.body).removeClass("loading"),t.errors?t.errors.forEach((function(t){toastr.error(t.errorMessage)})):(toastr.success(TAPi18n.__("Relocated successfully")),Session.set("instance_submitting",!1))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.post_archive=function(t){var n={methodOverride:"POST"};n["X-User-Id"]=Meteor.userId(),n["X-Auth-Token"]=Accounts._storedLoginToken();var a=Steedos.absoluteUrl()+"api/workflow/archive?"+$.param(n),o={Instances:[{id:t}]};o=JSON.stringify(o),$(document.body).addClass("loading"),$.ajax({url:a,type:"POST",async:!0,data:o,dataType:"json",processData:!1,contentType:"application/json",beforeSend:e,success:function(t,e){$(document.body).removeClass("loading"),t.errors&&t.errors.forEach((function(t){toastr.error(t.errorMessage)}))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e)}})},UUflow_api.get_export=function(t,e,n){var a={};a["X-User-Id"]=Meteor.userId(),a["X-Auth-Token"]=Accounts._storedLoginToken(),a.space_id=t,a.flow_id=e,a.timezoneoffset=(new Date).getTimezoneOffset(),a.type=n;var o=Steedos.absoluteUrl()+"api/workflow/export/instances?"+$.param(a);window.open(o,"_parent","EnableViewPortScale=yes")},UUflow_api.caculate_nextstep_users=function(t,e,n,a){var o={};o.deal_type=t,o.spaceId=e,o.insId=Session.get("instanceId"),o.nextStepId=a;var r=[],s=JSON.stringify(n);return $.ajax({url:Steedos.absoluteUrl("api/workflow/nextStepUsers")+"?"+$.param(o),type:"POST",async:!1,data:s,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+e+","+Accounts._storedLoginToken())},success:function(t,e){t.errors?toastr.error(t.errors):r=t.nextStepUsers},error:function(t,e,n){toastr.error(e)}}),r},UUflow_api.caculateNextstepUsers=function(t,e,n,a){var o={};o.deal_type=t,o.spaceId=e,o.insId=Session.get("instanceId"),o.nextStepId=a;var r=[],s="",i=JSON.stringify(n);return $.ajax({url:Steedos.absoluteUrl("api/workflow/nextStepUsers")+"?"+$.param(o),type:"POST",async:!1,data:i,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(t){t.setRequestHeader("Authorization","Bearer "+e+","+Accounts._storedLoginToken())},success:function(t,e){t.errors?toastr.error(t.errors):(r=t.nextStepUsers,s=t.error)},error:function(t,e,n){toastr.error(e)}}),{nextStepUsers:r,error:s}},UUflow_api.getSpaceUsers=function(t,e){var n={};n.spaceId=t;var a={userIds:e},o;return a=JSON.stringify(a),$.ajax({url:Steedos.absoluteUrl("api/workflow/getSpaceUsers")+"?"+$.param(n),type:"POST",async:!1,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+t+","+Accounts._storedLoginToken())},success:function(t,n){t.errors?toastr.error(t.errors):(_spaceUsers=t.spaceUsers,o=[],_.isArray(e)?_.each(e,(function(t){var e=_.find(_spaceUsers,(function(e){return e.id==t}));e&&o.push(e)})):o=_spaceUsers)},error:function(t,e,n){toastr.error(e)}}),o},UUflow_api.post_retrieve=function(t){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0);var n={methodOverride:"POST"};n["X-User-Id"]=Meteor.userId(),n["X-Auth-Token"]=Accounts._storedLoginToken();var a=Steedos.absoluteUrl()+"api/workflow/retrieve?"+$.param(n),o={Instances:[{_id:t._id,retrieve_comment:t.retrieve_comment}]};o=JSON.stringify(o),$(document.body).addClass("loading"),$.ajax({url:a,type:"POST",async:!0,data:o,dataType:"json",processData:!1,contentType:"application/json",beforeSend:e,success:function(t,e){$(document.body).removeClass("loading"),t.errors?t.errors.forEach((function(t){toastr.error(t.errorMessage)})):(FlowRouter.go("/workflow/space/"+Session.get("spaceId")+"/inbox"),toastr.success(TAPi18n.__("Retrieved successfully")),Session.set("instance_submitting",!1))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(e),Session.set("instance_submitting",!1)}})}},UUflow_api.getNameForUser=function(t){var n={},a={userId:t},o;return a=JSON.stringify(a),$.ajax({url:Steedos.absoluteUrl("api/workflow/getNameForUser")+"?"+$.param(n),type:"POST",async:!1,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:e,success:function(t,e){t.errors?toastr.error(t.errors):o=t.user},error:function(t,e,n){toastr.error(e)}}),o},UUflow_api.post_forward=function(t,n,a,o,r,s,i,l,c){if(!Session.get("instance_submitting")){Session.set("instance_submitting",!0),$("body").addClass("loading");var u=WorkflowManager.getInstance(),d=null;InstanceManager.isInbox()&&"pending"==u.state?InstanceManager.getCurrentApprove()&&(d=InstanceManager.getCurrentApprove()._id):"outbox"==Session.get("box")&&"pending"==u.state&&InstanceManager.getLastCCApprove(u.traces)&&(d=InstanceManager.getLastCCApprove(u.traces)._id);var p={methodOverride:"POST"};p["X-User-Id"]=Meteor.userId(),p["X-Auth-Token"]=Accounts._storedLoginToken();var f=Steedos.absoluteUrl()+"api/workflow/forward?"+$.param(p),_={instance_id:t,space_id:n,flow_id:a,hasSaveInstanceToAttachment:o,description:r,isForwardAttachments:s,selectedUsers:i,action_type:l,related:c,from_approve_id:d};_=JSON.stringify(_),$.ajax({url:f,type:"POST",async:!0,data:_,dataType:"json",processData:!1,contentType:"application/json",beforeSend:e,success:function(t,e){if(Session.set("instance_submitting",!1),$(document.body).removeClass("loading"),t.errors)t.errors.forEach((function(t){"no_permission"==t.error?"forward"==l?toastr.error(TAPi18n.__("instance_no_add_permission",{actiontype:TAPi18n.__("instance_forward_title"),usernames:t.details})):"distribute"==l&&toastr.error(TAPi18n.__("instance_no_add_permission",{actiontype:TAPi18n.__("instance_distribute_title"),usernames:t.details})):toastr.error(t.reason)}));else if("forward"==l){toastr.success(TAPi18n.__("forward_instance_success"));var n=t&&t.new_ins_ids&&t.new_ins_ids[0];if(n&&!Steedos.isMobile()){var a="/workflow/space/"+Steedos.getSpaceId()+"/inbox/"+n;a=Steedos.absoluteUrl(a),Steedos.openWindow(a)}}else"distribute"==l&&toastr.success(TAPi18n.__("instance_distribute_success"))},error:function(t,e,n){Session.set("instance_submitting",!1),$(document.body).removeClass("loading"),toastr.error(e)}})}},UUflow_api.getPDFData=function(t,e){$(document.body).addClass("loading");var n={attachmentId:t};n=JSON.stringify(n),$.ajax({url:Steedos.absoluteUrl("api/workflow/office_convert_to_pdf"),type:"POST",async:!0,data:n,dataType:"json",processData:!1,contentType:"application/json",success:function(n,a){n.errors?toastr.error(n.errors):($(document.body).removeClass("loading"),e(t,n.result.data))},error:function(t,e,n){$(document.body).removeClass("loading"),toastr.error(t.responseJSON.error)}})},UUflow_api.getContactInfoForUser=function(t,n){var a={userId:t,spaceId:n},o;return a=JSON.stringify(a),$.ajax({url:Steedos.absoluteUrl("api/workflow/getContactInfoForUser"),type:"POST",async:!1,data:a,dataType:"json",processData:!1,contentType:"application/json",beforeSend:e,success:function(t,e){t.errors?toastr.error(t.errors):o=t.user},error:function(t,e,n){toastr.error(e)}}),o}},"workflow_manager.js":function t(){WorkflowManager={instanceModified:new ReactiveVar(!1)},Meteor.isClient&&(WorkflowManager.remoteSpaceUsers=new AjaxCollection("space_users"),WorkflowManager.remoteOrganizations=new AjaxCollection("organizations"),WorkflowManager.remoteFlowRoles=new AjaxCollection("flow_roles"),WorkflowManager.remoteHrRoles=new AjaxCollection("roles")),WorkflowManager.getUrlForServiceName=function(t){var e;return{s3:"https://s3ws.steedos.com",workflow:"http://192.168.0.23"}[t]},WorkflowManager.getForm=function(t){return db.forms.findOne(t)},WorkflowManager.getFlow=function(t){return db.flows.findOne(t)},WorkflowManager.getSpaceOrganizations=function(t){var e=new Array,n;return db.organizations.find().forEach((function(t){t.id=t._id,e.push(t)})),e},WorkflowManager.getSpaceUsers=function(t){var e=new Array,n;return db.space_users.find({user_accepted:!0},{sort:{name:1}}).forEach((function(n){n.id=n.user,n.organization=WorkflowManager.getOrganization(n.organization),n.organization&&(n.roles=WorkflowManager.getUserRoles(t,n.organization.id,n.id),e.push(n))})),e},WorkflowManager.getSpacePositions=function(t){var e=new Array,n;return db.flow_positions.find().forEach((function(t){e.push(t)})),e},WorkflowManager.getSpaceRoles=function(t){var e=new Array,n;return db.flow_roles.find().forEach((function(t){t.id=t._id,e.push(t)})),e},WorkflowManager.getInstance=function(){return db.instances.findOne({_id:Session.get("instanceId")})},WorkflowManager.getInstanceFormVersion=function(){var t=[],e=null,n=WorkflowManager.getInstance();if(n){var e;if(!(e=db.form_versions.findOne({_id:n.form_version,form:n.form})))return;field_permission=WorkflowManager.getInstanceFieldPermission(),e.fields&&e.fields.forEach((function(e){e.permission="editable"==field_permission[e.code]?"editable":"readonly","table"==e.type&&(e.sfields=e.fields,e.sfields?(e.sfields.forEach((function(t){t.permission="editable"==field_permission[t.code]?"editable":"readonly"})),e.sfields.push({code:"_id",permission:"editable",type:"hidden",default_value:db.instances._makeNewID})):console.error("子表:"+e.code+" 没有字段"),delete e.fields),"section"==e.type?(t.push(e),e.fields&&e.fields.forEach((function(e){e.permission="editable"==field_permission[e.code]?"editable":"readonly",t.push(e)}))):t.push(e)})),e.fields=t}return e},WorkflowManager.getInstanceFlowVersion=function(){var t=WorkflowManager.getInstance();if(t)return db.flow_versions.findOne({_id:t.flow_version,flow:t.flow})},WorkflowManager.getInstanceFields=function(){var t;return WorkflowManager.getInstanceFormVersion().fields},WorkflowManager.getInstanceStep=function(t){var e=WorkflowManager.getInstanceFlowVersion(),n;return e?(e.steps.forEach((function(e){e._id!=t||((n=e).id=e._id)})),n):null},WorkflowManager.getInstanceSteps=function(){var t=WorkflowManager.getInstanceFlowVersion();if(!t)return null;var e=[];return t.steps.forEach((function(t){t.id=t._id,e.push(t)})),e},WorkflowManager.getInstanceFieldPermission=function(){var t=WorkflowManager.getInstance();if(!t)return{};if(InstanceManager.isCC(t)&&!InstanceManager.ccHasEditPermission())return{};var e="";t.traces&&t.traces.forEach((function(t){0!=t.is_finished||(e=t.step)}));var n=WorkflowManager.getInstanceStep(e);return n&&n.permissions||{}},WorkflowManager.getOrganizationChildrens=function(t,e){var n,a;return WorkflowManager.getSpaceOrganizations(t).filterProperty("parents",e)},WorkflowManager.getOrganizationsChildrens=function(t,e){var n=new Array;return e.forEach((function(e){n=n.concat(WorkflowManager.getOrganizationChildrens(t,e))})),n},WorkflowManager.getOrganizationsUsers=function(t,e){var n=WorkflowManager.getSpaceUsers(t),a=new Array;return e.forEach((function(t){a=a.concat(WorkflowManager.getUsers(t.users))})),a},WorkflowManager.getOrganization=function(t){if(t){var e=WorkflowManager.remoteOrganizations.findOne(t);if(e)return e.id=e._id,e}},WorkflowManager.getOrganizations=function(t){return t?"string"==typeof t?[WorkflowManager.getOrganization(t)]:WorkflowManager.remoteOrganizations.find({_id:{$in:t}}):[]},WorkflowManager.getRoles=function(t){if(!(t&&t instanceof Array))return[];var e=new Array;return t.forEach((function(t){e.push(WorkflowManager.getRole(t))})),e},WorkflowManager.getRole=function(t){if(t){var e=WorkflowManager.getSpaceRoles(),n={};return e.forEach((function(e){e.id!=t||(n=e)})),n}},WorkflowManager.getUser=function(t,e){if(t){if("string"!=typeof t)return WorkflowManager.getUsers(t,e);var n=UUflow_api.getSpaceUsers(e||Session.get("spaceId"),t);if(n){var a=n[0];if(a)return a}}},WorkflowManager.getUsers=function(t,e){if("string"==typeof t)return[WorkflowManager.getUser(t,e)];var n=new Array;return t&&(n=UUflow_api.getSpaceUsers(e||Session.get("spaceId"),t)),n},WorkflowManager.getUserRoles=function(t,e,n){var a=new Array,o,r;return WorkflowManager.getSpacePositions(t).filterProperty("users",n).forEach((function(t){a.push(WorkflowManager.getRole(t.role))})),a},WorkflowManager.getRoleUsersbyOrgAndRole=function(t,e,n){var a=new Array,o=WorkflowManager.getSpaceRoles(t),r,s,i=WorkflowManager.getSpacePositions(t).filterProperty("role",n).filterProperty("org",e);if(i.forEach((function(t){var e=t.users;a=a.concat(WorkflowManager.getUsers(e))})),0==i.length){var l=WorkflowManager.getOrganization(e);l&&""!=l.parent&&(a=a.concat(WorkflowManager.getRoleUsersbyOrgAndRole(t,l.parent,n)))}return a},WorkflowManager.getRoleUsersByOrgAndRoles=function(t,e,n){var a=new Array;return n.forEach((function(n){a=a.concat(WorkflowManager.getRoleUsersbyOrgAndRole(t,e,n))})),a},WorkflowManager.getRoleUsersByOrgsAndRoles=function(t,e,n){var a=new Array;return e&&n?(e.forEach((function(e){a=a.concat(WorkflowManager.getRoleUsersByOrgAndRoles(t,e,n))})),a):a},WorkflowManager.getRoleUsersByUsersAndRoles=function(t,e,n){var a=new Array,o;return e&&n?(WorkflowManager.getUsers(e).forEach((function(e){a=a.concat(WorkflowManager.getRoleUsersByOrgAndRoles(t,e.organization.id,n))})),a):a},WorkflowManager.getFormulaUserObjects=function(t){if(t)return CFDataManager.getFormulaSpaceUser(t)},WorkflowManager.getFormulaUserObject=function(t){return t instanceof Array?SteedosDataManager.getFormulaUserObjects(Session.get("spaceId"),t):SteedosDataManager.getFormulaUserObjects(Session.get("spaceId"),[t])[0]},WorkflowManager.getFormulaOrgObjects=function(t){if(t)return WorkflowManager.getFormulaOrgObject(t)},WorkflowManager.getFormulaOrgObject=function(t){if(t instanceof Array){var e=new Array,n;return WorkflowManager.getOrganizations(t).forEach((function(t){var n={};n.id=t._id,n.name=t.name,n.fullname=t.fullname,e.push(n)})),e}var a={},o=WorkflowManager.getOrganization(t);return o?(a.id=t,a.name=o.name,a.fullname=o.fullname,a):null},WorkflowManager.getSpaceCategories=function(t,e){var n={space:t};return _.isEmpty(e)||(n._id={$in:e}),db.categories.find(n,{sort:{sort_no:-1}}).fetch()},WorkflowManager.getCategoriesForms=function(t){return db.forms.find({category:t,state:"enabled"}).fetch()},WorkflowManager.getUnCategoriesForms=function(){return _.isEmpty(Session.get("workflow_categories"))?forms=db.forms.find({category:{$in:[null,""]},state:"enabled"}).fetch():[]},WorkflowManager.getFormFlows=function(t){return db.flows.find({form:t,state:"enabled"}).fetch()},WorkflowManager.getCompanyFlows=function(t,e){var n=e||Session.get("spaceId");return db.flows.find({space:n,company_id:t,state:"enabled"}).fetch()},WorkflowManager.getSpaceFlows=function(t){return db.flows.find({space:t}).fetch()},WorkflowManager.canAdd=function(t,e,n){var a=t.perms,o=!1;return a&&(a.users_can_add&&a.users_can_add.includes(Meteor.userId())?o=!0:a.orgs_can_add&&a.orgs_can_add.length>0&&(e&&e.organizations&&_.intersection(e.organizations,a.orgs_can_add).length>0?o=!0:n&&(o=_.some(n,(function(t){return t.parents&&_.intersection(t.parents,a.orgs_can_add).length>0}))))),o},WorkflowManager.canAdmin=function(t,e,n){var a=t.perms,o=!1;return a&&(a.users_can_admin&&a.users_can_admin.includes(Meteor.userId())?o=!0:a.orgs_can_admin&&a.orgs_can_admin.length>0&&(e&&e.organizations&&_.intersection(e.organizations,a.orgs_can_admin).length>0?o=!0:n&&(o=_.some(n,(function(t){return t.parents&&_.intersection(t.parents,a.orgs_can_admin).length>0}))))),o},WorkflowManager.canMonitor=function(t,e,n){var a=t.perms,o=!1;return a&&(a.users_can_monitor&&a.users_can_monitor.includes(Meteor.userId())?o=!0:a.orgs_can_monitor&&a.orgs_can_monitor.length>0&&(e&&e.organizations&&_.intersection(e.organizations,a.orgs_can_monitor).length>0?o=!0:n&&(o=_.some(n,(function(t){return t.parents&&_.intersection(t.parents,a.orgs_can_monitor).length>0}))))),o},WorkflowManager.getMyAdminOrMonitorFlows=function(){var t,e=[],n,a;return(n=db.space_users.findOne({space:Session.get("spaceId"),user:Meteor.userId()}))&&(organizations=db.organizations.find({_id:{$in:n.organizations}}).fetch(),(t=db.flows.find()).forEach((function(t){(WorkflowManager.canMonitor(t,n,organizations)||WorkflowManager.canAdmin(t,n,organizations))&&e.push(t._id)}))),e},WorkflowManager.getMyCanAddFlows=function(){var t,e=[],n,a;return n=db.space_users.findOne({space:Session.get("spaceId"),user:Meteor.userId()}),organizations=db.organizations.find({_id:{$in:n.organizations}}).fetch(),(t=db.flows.find()).forEach((function(t){WorkflowManager.canAdd(t,n,organizations)&&e.push(t._id)})),e},WorkflowManager.getCompanyFlowListData=function(t,e,n){if(!t)return console.error("WorkflowManager.getCompanyFlowListData 未传入company_id"),[];var a=n||Session.get("spaceId"),o=Meteor.userId(),r=db.space_users.findOne({space:a,user:o}),s=db.organizations.find({_id:{$in:r.organizations}}).fetch(),i={},l=[];if("distribute"==e){var c=InstanceManager.getDistributeStep();c&&1==c.allowDistribute&&(l=c.distribute_optional_flows||[])}if(l.length>0)i.distribute_optional_flows=db.flows.find({_id:{$in:l},company_id:t,state:"enabled"}).fetch();else{var u=Steedos.isSpaceAdmin(),d=WorkflowManager.getCompanyFlows(t,n);d.sortByName(),i.flows=new Array,d.forEach((function(t){WorkflowManager.canAdd(t,r,s)?i.flows.push(t):"show"==e&&(u?i.flows.push(t):WorkflowManager.canMonitor(t,r,s)?i.flows.push(t):WorkflowManager.canAdmin(t,r,s)&&i.flows.push(t))}))}return i},WorkflowManager.getFlowListData=function(t,e){var n=e||Session.get("spaceId"),a=Meteor.userId(),o=db.space_users.findOne({space:n,user:a}),r=db.organizations.find({_id:{$in:o.organizations}}).fetch(),s={},i=[];if("distribute"==t){var l=InstanceManager.getDistributeStep();l&&1==l.allowDistribute&&(i=l.distribute_optional_flows||[])}if(i.length>0)s.distribute_optional_flows=db.flows.find({_id:{$in:i},state:"enabled"}).fetch();else{s.categories=new Array;var c=WorkflowManager.getSpaceCategories(n,Session.get("workflow_categories")),u=Steedos.isSpaceAdmin();c.forEach((function(e){var n=WorkflowManager.getCategoriesForms(e._id);n.forEach((function(e){var n=WorkflowManager.getFormFlows(e._id);n.sortByName(),e.flows=new Array,n.forEach((function(n){e.sort_no=n.sort_no,e.name=n.name,WorkflowManager.canAdd(n,o,r)?e.flows.push(n):"show"==t&&(u?e.flows.push(n):WorkflowManager.canMonitor(n,o,r)?e.flows.push(n):WorkflowManager.canAdmin(n,o,r)&&e.flows.push(n))}))})),n.sortByName(),e.forms=n}));var d=WorkflowManager.getUnCategoriesForms();d.sortByName(),d.forEach((function(e){var n=WorkflowManager.getFormFlows(e._id);n.sortByName(),e.flows=new Array,n.forEach((function(n){WorkflowManager.canAdd(n,o,r)?e.flows.push(n):"show"==t&&(u?e.flows.push(n):WorkflowManager.canMonitor(n,o,r)?e.flows.push(n):WorkflowManager.canAdmin(n,o,r)&&e.flows.push(n))}))})),c=_.filter(c,(function(t){var e=0;return t.forms.forEach((function(t){e+=t.flows.length})),e>0})),s.categories=c;var p=0;d.forEach((function(t){p+=t.flows.length})),p>0&&s.categories.push({name:TAPi18n.__("workflow_no_category"),_id:"",forms:d})}return s},WorkflowManager.getSpaceForms=function(t){var e=new Array,n;return db.forms.find().forEach((function(t){e.push(t)})),e},WorkflowManager.isPaidSpace=function(t){var e=!1,n;return db.spaces.findOne({_id:t})&&(e=!0),e},WorkflowManager.isArrearageSpace=function(){var t=Session.get("spaceId"),e;return!db.spaces.findOne({_id:t})},Meteor.isClient&&(WorkflowManager.getStepDealTypeName=function(t){var e="";switch(t.deal_type){case"pickupAtRuntime":e="审批时指定人员";break;case"specifyUser":e="指定人员";break;case"applicantRole":e="指定审批岗位";break;case"applicantSuperior":e="提交人上级";break;case"applicant":e="提交人";break;case"orgField":e="指定部门"}return e}),WorkflowManager.hasFlowAdminPermission=function(t,e,n){var a=db.spaces.findOne(e);if(!a)return!1;if(a.admins&&a.admins.includes(n))return!0;var o=!1,r=db.space_users.findOne({space:e,user:n},{fields:{organizations:1,user:1}});if(r){var s=db.organizations.find({_id:{$in:r.organizations}},{fields:{parents:1}}).fetch(),i=db.flows.findOne({_id:t},{fields:{perms:1}});i&&s&&(o=WorkflowManager.canAdmin(i,r,s))}return o},WorkflowManager.alertFlowListModel=function(t){var e="flow_list_box_modal";Meteor.settings.public&&Meteor.settings.public.is_group_company&&(e="flow_list_box_modal"),Modal.show(e,t)}},"node_manager.js":function e(n){var a,o,r,s,i,l;NodeManager={},Steedos.isNode()&&(o=nw.require("path"),r=nw.require("fs"),s=nw.require("crypto"),a=nw.Window.get(),(l=nw.require("child_process"))&&(i=l.exec),a.disableClose=!1),NodeManager.uploadAttach=function(t,e,n){for(var a=Math.random().toString(16),s="\r\n----"+a+"--",i=t,l=e,c=0,u=new Array,d=0;d0||1==n)&&o.push({urlKey:"main",urlValue:!0});var s=[{urlKey:"file",urlValue:t}];OfficeOnline.uploadFile(o,s),Modal.hide("attachments_upload_modal")},NodeManager.signPdf=function(t,e){$(document.body).addClass("loading"),$(".loading-text").text(TAPi18n.__("workflow_attachment_uploading")+e+"...");var n=[{urlKey:"Content-Type",urlValue:cfs.getContentType(e)},{urlKey:"instance",urlValue:Session.get("attach_instance_id")},{urlKey:"space",urlValue:Session.get("attach_space_id")},{urlKey:"approve",urlValue:InstanceManager.getMyApprove().id},{urlKey:"owner",urlValue:Meteor.userId()},{urlKey:"owner_name",urlValue:Meteor.user().name},{urlKey:"upload_from",urlValue:"node"},{urlKey:"is_private",urlValue:!0}],a=[{urlKey:"file",urlValue:t}];OfficeOnline.uploadFile(n,a),Modal.hide("attachments_upload_modal")},NodeManager.getFileSHA1=function(t,e,n){var a=r.createReadStream(t),o=s.createHash("sha1");o.setEncoding("hex"),a.pipe(o),a.on("end",(function(){o.end();var t=o.read();n(t)}))},NodeManager.vbsEditFile=function(e,n,o){var s=e+n,l,c='"'+process.cwd()+'"\\vbs\\edit.vbs "'+s+'" '+Meteor.users.findOne().name;"Steedos.User.isSignature"==o?(c='start "" /wait "'+s+'"',Modal.show("attachments_sign_modal",{filePath:s})):Modal.show("attachments_upload_modal",{filePath:s});var u=100,d,p,f;Meteor.settings.public&&Meteor.settings.public.cfs&&Meteor.settings.public.cfs.size_limit&&(u=Meteor.settings.public.cfs.size_limit);var _=(null!=(d=Meteor.settings)&&null!=(p=d.public)&&null!=(f=p.workflow)?f.attachment_size_limit:void 0)||100,m,b;_&&(u=1024*_*1024),m=1024*u*1024,b=t("workflow_attachment_paid_size_limit")+u+"MB";var g=i(c);a.disableClose=!0,g.on("error",(function(t){toastr.error(t)})),g.on("close",(function(){"Steedos.User.isSignature"==o&&(s=e+(n="签章:"+n),r.exists(s,(function(e){0==e&&(Modal.hide("attachments_sign_modal"),InstanceManager.unlockAttach(Session.get("cfs_file_id")),toastr.warning(t("node_pdf_error")))}))),Modal.hide("attachments_upload_modal");var i=r.statSync(s);a.disableClose=!1,NodeManager.getFileSHA1(s,n,(function(a){if(NodeManager.fileSHA1!=a){var l={title:t("node_office_warning"),text:s,type:"warning",showCancelButton:!0,confirmButtonText:t("node_office_confirm"),cancelButtonText:t("node_office_cancel")};i.size>m&&(l.closeOnConfirm=!1),swal(l,(function(a){a?i.size>m?swal({title:b,type:"warning",confirmButtonText:t("node_office_confirm"),closeOnConfirm:!0},(function(){NodeManager.vbsEditFile(e,n)})):"Steedos.User.isNewFile"==o?NodeManager.setUploadRequests(s,n,!0,!0):InstanceManager.isAttachLocked(Session.get("attach_instance_id"),Meteor.userId())?"Steedos.User.isSignature"==o?r.exists(s,(function(e){1==e?NodeManager.signPdf(s,n):(Modal.hide("attachments_sign_modal"),InstanceManager.unlockAttach(Session.get("cfs_file_id")),toastr.error(t("node_pdf_error")))})):NodeManager.setUploadRequests(s,n,!1,!0):toastr.warning(t("steedos_desktop_edit_warning")):InstanceManager.unlockAttach(Session.get("cfs_file_id"))}))}else InstanceManager.unlockAttach(Session.get("cfs_file_id"))}))}))},NodeManager.downloadFile=function(t,e,n){var a=process.env.USERPROFILE+"\\Steedos\\";r.exists(a,(function(o){1==o?OfficeOnline.downloadFile(t,a,e,n):r.mkdir(a,(function(o){o?toastr.error(o):OfficeOnline.downloadFile(t,a,e,n)}))}))},NodeManager.isViewType=function(t){return!!(Steedos.isOfficeFile(t)||Steedos.isPdfFile(t)||Steedos.isExcelFile(t)||Steedos.isTiffFile(t)||Steedos.isPPTFile(t)||Steedos.isTextFile(t))}},"instance_readonly_template.coffee":function module(require){__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};var share=__coffeescriptShare,_getLocale,_getRequiredFields,_getStartStepEditableFields,_getStartStepRequiredFields,_getTemplateData,_getViewHtml,getLinkText,marked;marked=require("marked"),InstanceReadOnlyTemplate={},InstanceReadOnlyTemplate.instance_attachment='\n\t\n\t\t{{this.name}}\n\t\n',InstanceReadOnlyTemplate.afSelectUserRead="
{{value}}
",InstanceReadOnlyTemplate.afFormGroupRead='
\n\t{{#with getField this.name}}\n\t\t{{#if equals type \'section\'}}\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

{{{description}}}

\n\t\t\t\t
\n\t\t{{else}}\n\t\t\t{{#if equals type \'table\'}}\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{{description}}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{{getTableThead this}}}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{{getTableBody this}}}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{{else}}\n\t\t\t\t{{#if showLabel}}\n\t\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{#if isTextarea this}}\n\t\t\t\t\t

{{{getValue code}}}

\n\t\t\t\t{{else}}\n\t\t\t\t\t
{{{getValue code}}}
\n\t\t\t\t{{/if}}\n\t\t\t{{/if}}\n\t\t{{/if}}\n\t{{/with}}\n
',InstanceReadOnlyTemplate.afFormGroup='\n{{#with getField this.name}}\n\t\t{{#if equals type \'section\'}}\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

{{{description}}}

\n\t\t\t\t
\n \t\t\t\t
\n\t\t{{else}}\n\t\t\t{{#if equals type \'table\'}}\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{{description}}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{{getTableThead this}}}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{{{getTableBody this}}}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{{else}}\n\t\t\t\t{{#if equals type \'input\'}}\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t{{#if is_textarea}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t{{#unless is_textarea}}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{{/unless}}\n\t\t\t\t\t
\n\t\t\t\t{{else}}\n\t\t\t\t\t{{#if equals type \'number\'}}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t{{else}}\n\t\t\t\t\t\t{{#if equals type \'date\'}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t{{#if equals type \'dateTime\'}}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t{{#if equals type \'password\'}}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t{{#if equals type \'select\'}}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t{{#if equals type \'radio\'}}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{#each options this}}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t{{/each}}\n \t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t\t{{#if equals type \'multiSelect\'}}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{#each options this}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{/each}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t\t\t{{#if equals type \'url\'}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{#if equals type \'email\'}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{#if equals type \'checkbox\'}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{else}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
{{{getValue code}}}
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t\t{{/if}}\n\t\t\t\t\t{{/if}}\n\t\t\t\t{{/if}}\n\t\t\t{{/if}}\n\t\t{{/if}}\n\t{{/with}}',InstanceReadOnlyTemplate.create=function(tempalteName,steedosData){var template,templateCompiled,templateRenderFunction;return template=InstanceReadOnlyTemplate[tempalteName],templateCompiled=SpacebarsCompiler.compile(template,{isBody:!0}),templateRenderFunction=eval(templateCompiled),Template[tempalteName]=new Blaze.Template(tempalteName,templateRenderFunction),Template[tempalteName].steedosData=steedosData,Template[tempalteName].helpers(InstanceformTemplate.helpers)},InstanceReadOnlyTemplate.createInstanceSignText=function(steedosData){var instanceSignTextCompiled,instanceSignTextHtml,instanceSignTextRenderFunction;return instanceSignTextHtml=_getViewHtml("client/views/instance/instance_sign_text.html"),instanceSignTextCompiled=SpacebarsCompiler.compile(instanceSignTextHtml,{isBody:!0}),instanceSignTextRenderFunction=eval(instanceSignTextCompiled),Template.instanceSignText=new Blaze.Template("instanceSignText",instanceSignTextRenderFunction),Template.instanceSignText.steedosData=steedosData,Template.instanceSignText.helpers(InstanceSignText.helpers)},InstanceReadOnlyTemplate.createImageSign=function(steedosData){var imageSignCompiled,imageSignHtml,imageSignRenderFunction;return imageSignHtml=_getViewHtml("client/views/instance/image_sign.html"),imageSignCompiled=SpacebarsCompiler.compile(imageSignHtml,{isBody:!0}),imageSignRenderFunction=eval(imageSignCompiled),Template.imageSign=new Blaze.Template("imageSign",imageSignRenderFunction),Template.imageSign.steedosData=steedosData,Template.imageSign.helpers(ImageSign.helpers)},InstanceReadOnlyTemplate.createTracesHanlder=function(steedosData){var tracesHanlderCompiled,tracesHanlderHtml,tracesHanlderRenderFunction;return tracesHanlderHtml=_getViewHtml("client/views/instance/traces_handler.html"),tracesHanlderCompiled=SpacebarsCompiler.compile(tracesHanlderHtml,{isBody:!0}),tracesHanlderRenderFunction=eval(tracesHanlderCompiled),Template.instance_traces_handler=new Blaze.Template("instance_traces_handler",tracesHanlderRenderFunction),Template.instance_traces_handler.steedosData=steedosData,Template.instance_traces_handler.helpers(TracesHandler.helpers)},InstanceReadOnlyTemplate.init=function(t){if(InstanceReadOnlyTemplate.create("afSelectUserRead",t),Meteor.isServer&&InstanceReadOnlyTemplate.create("afFormGroup",t),InstanceReadOnlyTemplate.create("afFormGroupRead",t),Meteor.isServer)return InstanceReadOnlyTemplate.create("instance_attachment",{absolute:t.absolute}),InstanceReadOnlyTemplate.createImageSign(t),InstanceReadOnlyTemplate.createTracesHanlder(t),InstanceReadOnlyTemplate.createInstanceSignText(t)},getLinkText=function(t,e,n){return n?(n=n.replace("{_id}",t._id),/^http(s?):\/\//.test(n)||(n=Steedos.absoluteUrl(n)),''+e+""):e},InstanceReadOnlyTemplate.getValue=function(t,e,n,a){var o,r,s,i,l,c,u,d,p,f,m,b,g,h,w,S,v,k;if(!t&&!1!==t)return"";switch(["select","multiSelect","radio"].indexOf(e.type)>-1&&(i=e.options.split("\n").map((function(t){var e;return{label:(e=t.split(":"))[0],value:e[1]||t}}))),e.type){case"email":t=t?""+t+"":"";break;case"url":if(t)if(0===t.indexOf("http"))try{t=""+t+""}catch(T){s=T,t=""+t+""}else t=""+t+"";else t="";break;case"group":t=e.is_multiselect?null!=t?t.getProperty("fullname").toString():void 0:null!=t?t.fullname:void 0;break;case"user":t=e.is_multiselect?null!=t?t.getProperty("name").toString():void 0:null!=t?t.name:void 0;break;case"password":t="******";break;case"checkbox":t=t&&"false"!==t?TAPi18n.__("form_field_checkbox_yes",{},n):TAPi18n.__("form_field_checkbox_no",{},n);break;case"dateTime":t&&16===t.length?(w=(h=t.split("T"))[0].split("-"),S=h[1].split(":"),k=w[0],c=w[1],o=w[2],l=S[0],f=S[1],t=new Date(k,c-1,o,l,f)):t=new Date(t),t=InstanceReadOnlyTemplate.formatDate(t,a);break;case"time":t&&16===t.length?(w=(h=t.split("T"))[0].split("-"),S=h[1].split(":"),k=w[0],c=w[1],o=w[2],l=S[0],f=S[1],t=new Date(k,c-1,o,l,f)):t=new Date(t),t=InstanceReadOnlyTemplate.formatTime(t);break;case"input":e.is_textarea&&(t=t);break;case"select":case"radio":(m=i.find((function(e){return e.value===t})))&&(t=m.label);break;case"multiSelect":g=t.split(","),(b=i.filter((function(t){return g.indexOf(t.value)>-1}))).length&&(t=b.map((function(t){return t.label})).join(","));break;case"number":(t||0===t)&&(t=e.is_percent?Steedos.numberToPercentString(t,e.digits):Steedos.numberToString(t,e.digits));break;case"odata":r=e.detail_url,t=e.is_multiselect?_.map(t,(function(t){return getLinkText(t,t["@label"],r)})):getLinkText(t,t["@label"],r);break;case"image":t=e.is_multiselect?(t=_.map(t,(function(t){return'
'}))).join(""):'
';break;case"file":t&&(e.is_multiselect||(t=[t]),Meteor.isClient?d=(p=Steedos.authRequest('/api/v1/cfs_files_filerecord?filters=[["_id","in", '+JSON.stringify(t)+']]&fields=["_id","original"]',{async:!1})).data.items:Meteor.isServer&&(d=Steedos.objectFind("cfs_files_filerecord",{filters:[["_id","in",t]],fields:["_id","original"]})),t=(t=_.map(d,(function(t){var e,n,a,o,r;return e=t.original.name,o=Steedos.absoluteUrl("/api/files/files/"+t._id),a=(r=e.match(/\.([^\.]+)$/))[0]||"",n="",[".pdf",".jpg",".jpeg",".png",".gif"].indexOf(a)>-1&&(n=" 预览"),"
"+e+" "+(null!=n?n:{filePreviewHtml:""})+"
"}))).join(""));break;case"lookup":t&&(e.is_multiselect||(t=[t]),Meteor.isClient?(v=Creator.getObject(e.reference_to),u=(null!=v?v.NAME_FIELD_KEY:void 0)||"name",d=(p=Steedos.authRequest("/api/v1/"+e.reference_to+'?filters=[["'+(e.reference_to_field||"_id")+'","in", '+JSON.stringify(t)+']]&fields=["_id","'+u+'"]',{async:!1})).data.items):Meteor.isServer&&(u=Steedos.getObjectNameFieldKey(e.reference_to),d=Steedos.objectFind(e.reference_to,{filters:[[e.reference_to_field||"_id","in",t]],fields:["_id",u]})),t=(t=_.map(d,(function(t){return""+t[u]+""}))).join(" , "));break;case"html":t=t?'
'+t+"
":""}return t},InstanceReadOnlyTemplate.getLabel=function(t,e){var n;if(n=t.findPropertyByPK("code",e))return n.name?n.name:n.code},InstanceReadOnlyTemplate.getInstanceFormVersion=function(t){var e,n,a;return e=db.forms.findOne(t.form),a={},n=[],(a=e.current._id===t.form_version?e.current:_.where(e.historys,{_id:t.form_version})[0]).fields.forEach((function(t){return"section"!==t.type?"table"===t.type?(t.sfields=t.fields,delete t.fields,n.push(t)):n.push(t):(n.push(t),t.fields?t.fields.forEach((function(t){return n.push(t)})):void 0)})),a.fields=n,a},InstanceReadOnlyTemplate.getFlowVersion=function(t){var e,n;return n={},n=(e=db.flows.findOne(t.flow)).current._id===t.flow_version?e.current:_.where(e.historys,{_id:t.flow_version})[0]},_getViewHtml=function(t){var e;return(e=Assets.getText(t))&&(e=e.replace(//i,"").replace(/<\/template>/i,"")),e},_getLocale=function(t){var e,n,a;return e="zh-cn"===(null!=t&&null!=(n=t.locale)?n.toLocaleLowerCase():void 0)?"zh-CN":"en-us"===(null!=t&&null!=(a=t.locale)?a.toLocaleLowerCase():void 0)?"en":"zh-CN"},_getRequiredFields=function(t,e){return e||(e=[]),t.forEach((function(t){if("section"===t.type)return _getRequiredFields(t.fields,e);if("table"===t.type);else if(t.is_required)return e.push(t.code)})),e},_getStartStepEditableFields=function(t,e){var n,a;return a=e.findPropertyByPK("step_type","start"),n=[],_.keys(a.permissions).forEach((function(t){if("editable"===a.permissions[t])return n.push(t)})),n},_getStartStepRequiredFields=function(t,e){var n,a;return a=_getRequiredFields(t),n=_getStartStepEditableFields(t,e),_.intersection(a,n)},_getTemplateData=function(t,e,n,a){var o,r,s,i,l;return s=Meteor.isServer?InstanceReadOnlyTemplate.getInstanceFormVersion(n):WorkflowManager.getInstanceFormVersion(n),i=_getLocale(t),l={},Meteor.isClient&&((l=_.clone(WorkflowManager_format.getAutoformSchemaValues())).insname=n.name,l.ins_state=n.state,l.ins_final_decision=n.ins_final_decision,l.ins_code=n.code,l.ins_is_archived=n.is_archived,l.ins_is_deleted=n.ins_is_deleted,l.applicant_name=n.applicant_name,l.applicantContext=n.applicant_name),l.instance=n,l.form_version=s,l.locale=i,l.utcOffset=t.utcOffset,l.space=n.space,l.sessionUserId=t._id,Meteor.isServer&&(null!=a?a.editable:void 0)&&(r=db.forms.findOne({_id:n.form}),o=db.flows.findOne({_id:n.flow}),l.startStepEditableFields=_getStartStepEditableFields(r.current.fields,o.current.steps)),l},InstanceReadOnlyTemplate.formatDate=function(t,e){var n;return n=!Meteor.isServer,e||0===e||(e=8),moment(t).utcOffset(e,n).format("YYYY-MM-DD HH:mm")},InstanceReadOnlyTemplate.formatTime=function(t){var e;return e=0,moment(t).utcOffset(0).format("HH:mm")},InstanceReadOnlyTemplate.getInstanceView=function(user,space,instance,options){var body,instanceCompiled,instanceRenderFunction,instanceTemplate,steedosData;return steedosData=_getTemplateData(user,space,instance,options),steedosData.absolute=!1,(null!=options?options.absolute:void 0)&&(steedosData.absolute=!0),instanceTemplate=TemplateManager.getTemplate(instance,null!=options?options.templateName:void 0),instanceTemplate=instanceTemplate.replace(/afSelectUser/g,"afSelectUserRead"),(null!=options?options.editable:void 0)||(instanceTemplate=instanceTemplate.replace(/afFormGroup/g,"afFormGroupRead")),instanceCompiled=SpacebarsCompiler.compile(instanceTemplate,{isBody:!0}),instanceRenderFunction=eval(instanceCompiled),Template.instance_readonly_view=new Blaze.Template("instance_readonly_view",instanceRenderFunction),Template.instance_readonly_view.steedosData=steedosData,Template.instance_readonly_view.helpers(InstanceformTemplate.helpers),InstanceReadOnlyTemplate.init(steedosData),body=Blaze.toHTMLWithData(Template.instance_readonly_view,steedosData),"
\n\t"+body+"\n
"},InstanceReadOnlyTemplate.getTracesView=function(user,space,instance,options){var body,form,steedosData,traceCompiled,traceRenderFunction,tracesHtml;return steedosData=_getTemplateData(user,space,instance),form=db.forms.findOne(instance.form),tracesHtml="table"===form.instance_style||"table"===(null!=options?options.templateName:void 0)?_getViewHtml("client/views/instance/traces_table.html"):_getViewHtml("client/views/instance/traces.html"),traceCompiled=SpacebarsCompiler.compile(tracesHtml,{isBody:!0}),traceRenderFunction=eval(traceCompiled),Template.trace_readonly_view=new Blaze.Template("trace_readonly_view",traceRenderFunction),Template.trace_readonly_view.steedosData=steedosData,Template.trace_readonly_view.helpers(TracesTemplate.helpers),body=Blaze.toHTMLWithData(Template.trace_readonly_view,instance.traces),body},InstanceReadOnlyTemplate.getAttachmentView=function(user,space,instance){var attachmentCompiled,attachmentHtml,attachmentRenderFunction,body,steedosData;return steedosData=_getTemplateData(user,space,instance),attachmentHtml=_getViewHtml("client/views/instance/instance_attachments.html"),attachmentCompiled=SpacebarsCompiler.compile(attachmentHtml,{isBody:!0}),attachmentRenderFunction=eval(attachmentCompiled),Template.attachments_readonly_view=new Blaze.Template("attachments_readonly_view",attachmentRenderFunction),Template.attachments_readonly_view.steedosData=steedosData,Template.attachments_readonly_view.helpers(InstanceAttachmentTemplate.helpers),body=Blaze.toHTMLWithData(Template.attachments_readonly_view),body},InstanceReadOnlyTemplate.getRelatedInstancesView=function(user,space,instance,options){var body,relatedInstancesCompiled,relatedInstancesHtml,relatedInstancesRenderFunction,steedosData;return steedosData=_getTemplateData(user,space,instance),steedosData.absolute=!1,(null!=options?options.absolute:void 0)&&(steedosData.absolute=!0),relatedInstancesHtml=_getViewHtml("client/views/instance/related_instances.html"),relatedInstancesCompiled=SpacebarsCompiler.compile(relatedInstancesHtml,{isBody:!0}),relatedInstancesRenderFunction=eval(relatedInstancesCompiled),Template.related_instances_view=new Blaze.Template("related_instances_view",relatedInstancesRenderFunction),Template.related_instances_view.steedosData=steedosData,Template.related_instances_view.helpers(RelatedInstances.helpers),body=Blaze.toHTMLWithData(Template.related_instances_view,steedosData),body},InstanceReadOnlyTemplate.getRelatedRecordsView=function(user,space,instance,options){var body,relatedRecordsCompiled,relatedRecordsHtml,relatedRecordsRenderFunction,steedosData;return steedosData=_getTemplateData(user,space,instance),steedosData.absolute=!1,(null!=options?options.absolute:void 0)&&(steedosData.absolute=!0),relatedRecordsHtml=_getViewHtml("client/views/instance/related_records.html"),relatedRecordsCompiled=SpacebarsCompiler.compile(relatedRecordsHtml,{isBody:!0}),relatedRecordsRenderFunction=eval(relatedRecordsCompiled),Template.related_records_view=new Blaze.Template("related_records_view",relatedRecordsRenderFunction),Template.related_records_view.steedosData=steedosData,Template.related_records_view.helpers(RelatedRecords.helpers),body=Blaze.toHTMLWithData(Template.related_records_view,steedosData),body},InstanceReadOnlyTemplate.getOnLoadScript=function(t){var e,n;return(e=(n=WorkflowManager.getFormVersion(t.form,t.form_version)).form_script)&&e.replace(/\n/g,"").replace(/\s/g,"").length>0?(e="CoreForm = {};CoreForm.instanceform = {};"+e)+";if(CoreForm.form_OnLoad){window.onload = CoreForm.form_OnLoad();}":""},InstanceReadOnlyTemplate.getInstanceHtml=function(t,e,n,a){var o,r,s,i,l,c,u,d,p,f,m,b,g,h,w,S,v,k,T,M,y,I,x,L,H;return s=InstanceReadOnlyTemplate.getInstanceView(t,e,n,a),w=InstanceReadOnlyTemplate.getOnLoadScript(n),i=null!=(v=Meteor.settings.public.webservices)&&null!=(k=v.creator)?k.url:void 0,f=n.record_ids,h=_getLocale(t),S='if(window.isNode && isNode()){\n\tattachs = document.getElementsByClassName("ins_attach_href");\n\tfor(var i = 0; i < attachs.length; i++){\n\t\tattach = attachs[i];\n\t\tattach.addEventListener("click", function(e){\n\t\t\tif(isImage(this.dataset.type) || isHtml(this.dataset.type)){\n\t\t\t\te.preventDefault();\n\t\t\t\topenWindow("/api/files/instances/" + this.dataset.id);\n\t\t\t}else if(nw_core.canOpenFile(this.dataset.name)){\n\t\t\t\te.preventDefault();\n\t\t\t\tnw_core.openFile(this.href, this.dataset.name)\n\t\t\t}\n\t\t});\n\t}\n}\n\nvar flow = "'+n.flow+'";\nvar space = "'+n.space+'";\n\nfunction getCookie(name){\n\tlet pattern = RegExp(name + "=.[^;]*")\n\tlet matched = document.cookie.match(pattern)\n\tif(matched){\n\t\tlet cookie = matched[0].split(\'=\')\n\t\treturn cookie[1]\n\t}\n\treturn \'\'\n}\n\nvar records = document.getElementsByClassName("ins-related-records");\nfor(var i = 0; i < records.length; i++){\n\t\tvar record = records[i];\n\t\trecord.addEventListener("click", function(e){\n\t\t\tvar creatorService = "'+i+'"\n\t\t\tvar ins_record_ids = '+JSON.stringify(f)+'\n\t\t\tif(creatorService && ins_record_ids && ins_record_ids.length > 0){\n\t\t\t\tvar objcetName = ins_record_ids[0].o\n\t\t\t\tvar id = ins_record_ids[0].ids[0]\n\t\t\t\tvar uobj = {};\n\t\t\t\tuobj["X-User-Id"] = getCookie("X-User-Id");\n\t\t\t\tuobj["X-Auth-Token"] = getCookie("X-Auth-Token");\n\t\t\t\tredirectUrl = creatorService + "app/-/" + objcetName + "/view/" + id + "?" + $.param(uobj);\n\t\t\t\topenWindow(redirectUrl);\n\t\t\t}\n\t\t});\n\t}\n',Steedos.isMobile()||"table"===(null!=(c=db.forms.findOne(n.form))?c.instance_style:void 0)&&(b="instance-table"),"table"===(null!=a?a.templateName:void 0)&&(b="instance-table"),(null!=a?a.instance_style:void 0)&&(b=a.instance_style),x=a&&!0!==a.showTrace?"":InstanceReadOnlyTemplate.getTracesView(t,e,n),m="",n&&n.final_decision&&("approved"===n.final_decision?m="box-success":"rejected"===n.final_decision&&(m="box-danger")),a&&!0!==a.showAttachments?(r="",T="",M=""):(r=InstanceReadOnlyTemplate.getAttachmentView(t,e,n),T=InstanceReadOnlyTemplate.getRelatedInstancesView(t,e,n,a),M=InstanceReadOnlyTemplate.getRelatedRecordsView(t,e,n,a)),H="960px",(null!=a?a.width:void 0)&&(H=""),l=Meteor.absoluteUrl("steedos-css"),g=Meteor.absoluteUrl("website/libs/jquery.min.js"),o='',L="",_.isEmpty(x)||(L="checked"),y="email"===(null!=a?a.tagger:void 0)||(null!=a?a.editable:void 0)?"":'",I="$( document ).ready(function(){\n\tvar b = document.getElementById('cbx-print-traces');\n\tvar t = document.getElementsByClassName('instance-traces')[0];\n\tif (b && b.checked && t){\n\t\tt.style = 'display: block;'\n\t} else if(t){\n\t\tt.style = 'display: none;'\n\t}\n\tif(b){\n\t\tb.addEventListener('change', function(e){\n\t\t\tif (e.target.checked){\n\t\t\t\tt.style = 'display: block;'\n\t\t\t} else {\n\t\t\t\tt.style = 'display: none;'\n\t\t\t}\n\t\t});\n\t}\n\n\n\tvar attachmentsCheckbox = document.getElementById('cbx-print-attachments');\n\tvar attachmentsView = document.getElementsByClassName('attachments-section')[0];\n\tif (attachmentsCheckbox && attachmentsCheckbox.checked && attachmentsView){\n\t\tattachmentsView.style = 'display: block;'\n\t} else if(attachmentsView){\n\t\tattachmentsView.style = 'display: none;'\n\t}\n\tif(attachmentsCheckbox){\n\t\tattachmentsCheckbox.addEventListener('change', function(e){\n\t\t\tif (e.target.checked){\n\t\t\t\tattachmentsView.style = 'display: block;'\n\t\t\t} else {\n\t\t\t\tattachmentsView.style = 'display: none;'\n\t\t\t}\n\t\t});\n\t}\n});\n",(null!=a?a.styles:void 0)&&(o=""),d="",(c=db.forms.findOne({_id:n.form}))&&(u=c.description)&&(d='
\n\t
\n\t\t'+(u=u.replace(/\n/g,"
"))+"\n\t
\n
"),p='\n\n\t\n\t\t\n\t\t'+o+'\n\t\t