@tripetto/block-multi-select
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Multi-select Block 2.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var e={929:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.CounterCondition=void 0;var r=o(954),c=o(948),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Number){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e){return r.L10n.locale.number(e,0,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Counter is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Counter is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Counter is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Counter is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Counter is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Counter is not between"),value:"not-between"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If counter equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If counter not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If counter is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If counter is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If counter is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If counter is not between")}}))]});var t=function(t,o){var i,l=e[t],n=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),c=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(i=e.slot)||void 0===i?void 0:i.id),s=new r.Forms.Dropdown(c,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===c.length}],(0,r.isString)(l)?"variable":"number").on((function(e){n.visible("number"===e.value),s.visible("variable"===e.value),n.isObservable&&n.focus()})),n,s]})},o=t("value",(0,r.pgettext)("block:multi-select","If counter equals")),i=t("to",(0,r.pgettext)("block:multi-select","And"))},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":counter"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify counter")}})],t)}(r.ConditionBlock);t.CounterCondition=s},875:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCondition=void 0;var r=o(954),c=o(489),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":none"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","No options selected")}})],t)}(r.ConditionBlock);t.NoneCondition=s},35:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionCondition=void 0;var r=o(954),c=o(537),s=o(669),a=o(489),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selected=!0,t}return l(t,e),Object.defineProperty(t.prototype,"icon",{get:function(){return this.selected?s.default:a.default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e;return(0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||this.type.label},enumerable:!1,configurable:!0}),t.prototype.defineEditor=function(){var e;this.editor.form({controls:[new r.Forms.Checkbox((0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||(0,r.pgettext)("block:multi-select","Option is selected"),r.Forms.Checkbox.bind(this,"selected",!0))]})},n([(0,r.affects)("#name"),(0,r.collection)("#options")],t.prototype,"option",void 0),n([(0,r.affects)("#icon"),r.definition],t.prototype,"selected",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select",version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Option")}})],t)}(r.ConditionBlock);t.OptionCondition=u},287:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.ScoreCondition=void 0;var r=o(954),c=o(939),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Numeric){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"defined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","calculated"));case"undefined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","not calculated"));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e,t){return r.L10n.locale.number(e,t,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Score is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:multi-select","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:multi-select","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(o.visible("defined"!==e.value&&"undefined"!==e.value),i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If score is not between")}}))]});var t=function(t,o,i){var l,n=e[t],c=e.slot,s=new r.Forms.Numeric((0,r.isNumberFinite)(n)?n:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).precision((null==c?void 0:c.precision)||0).digits((null==c?void 0:c.digits)||0).decimalSign((null==c?void 0:c.decimal)||"").thousands(!!(null==c?void 0:c.separator),(null==c?void 0:c.separator)||"").prefix((null==c?void 0:c.prefix)||"").prefixPlural((null==c?void 0:c.prefixPlural)||void 0).suffix((null==c?void 0:c.suffix)||"").suffixPlural((null==c?void 0:c.suffixPlural)||void 0).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),a=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(n)?n:void 0,!0,null===(l=e.slot)||void 0===l?void 0:l.id),u=new r.Forms.Dropdown(a,(0,r.isString)(n)?n:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===a.length}],(0,r.isString)(n)?"variable":"number").on((function(e){s.visible("number"===e.value),u.visible("variable"===e.value),s.isObservable&&s.focus()})),s,u]}).visible(i)},o=t("value",(0,r.pgettext)("block:multi-select","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=t("to",(0,r.pgettext)("block:multi-select","And"),"between"===this.mode||"not-between"===this.mode)},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":score"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify score")}})],t)}(r.ConditionBlock);t.ScoreCondition=s},110:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0;var r=o(954),c=o(422),s=o(35),a=o(875),u=o(287),d=o(929),p=o(617),b=o(669),g=o(948),m=o(939),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=r.Collection.of(c.Option,t),t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return(0,r.npgettext)("block:multi-select","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)},enumerable:!1,configurable:!0}),t.prototype.defineSlot=function(){this.slots.meta({type:r.Slots.Number,reference:"counter",label:(0,r.pgettext)("block:multi-select","Counter"),exportable:!1}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:r.Slots.Text,reference:"concatenation",label:(0,r.pgettext)("block:multi-select","Text value"),exportable:this.exportable,alias:this.alias}):this.slots.delete("concatenation","feature")},t.prototype.defineEditor=function(){var e=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();var t=this.editor.collection({collection:this.options,title:(0,r.pgettext)("block:multi-select","Options"),icon:b.default,placeholder:(0,r.pgettext)("block:multi-select","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks,indicator:function(e){return e.exclusive&&(0,r.pgettext)("block:multi-select","Exclusive").toUpperCase()||void 0},emptyMessage:(0,r.pgettext)("block:multi-select","Click the + button to add an option...")});this.editor.groups.settings();var o=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible((0,r.isNumber)(this.min)).indent(32).width(75).on((function(){i.min(e.min||1)})),i=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"max",void 0)).min(this.min||1).visible((0,r.isNumber)(this.max)).indent(32).width(75).on((function(){o.max(e.max)}));this.editor.option({name:(0,r.pgettext)("block:multi-select","Limits"),form:{title:(0,r.pgettext)("block:multi-select","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Minimum number of selected options"),(0,r.isNumber)(this.min)).on((function(e){o.visible(e.isChecked)})),o,new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Maximum number of selected options"),(0,r.isNumber)(this.max)).on((function(e){i.visible(e.isChecked)})),i]},activated:(0,r.isNumber)(this.max)||(0,r.isNumber)(this.min)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Randomization"),form:{title:(0,r.pgettext)("block:multi-select","Randomization"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),r.Forms.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:(0,r.isBoolean)(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();var l=(0,r.pgettext)("block:multi-select","Selected"),n=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(l),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(l,"**"),"**".concat(n,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.scores({target:this,collection:t,description:(0,r.pgettext)("block:multi-select","Generates a score based on the selected options. Open the settings panel for each option to set the individual score for that option.")});var c=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),s=new r.Forms.Text("singleline",r.Forms.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label((0,r.pgettext)("block:multi-select","Use this separator:")),a=new r.Forms.Group([new r.Forms.Dropdown([{label:(0,r.pgettext)("block:multi-select","Comma separated"),value:"comma"},{label:(0,r.pgettext)("block:multi-select","Space separated"),value:"space"},{label:(0,r.pgettext)("block:multi-select","List on multiple lines"),value:"list"},{label:(0,r.pgettext)("block:multi-select","Bulleted list"),value:"bullets"},{label:(0,r.pgettext)("block:multi-select","Numbered list"),value:"numbers"},{label:(0,r.pgettext)("block:multi-select","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:(0,r.pgettext)("block:multi-select","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:(0,r.pgettext)("block:multi-select","Custom separator"),value:"custom"}],r.Forms.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label((0,r.pgettext)("block:multi-select","How to separate the selected options:")).on((function(e){s.visible("custom"===e.value)})),s]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:(0,r.pgettext)("block:multi-select","Data format"),form:{title:(0,r.pgettext)("block:multi-select","Data format"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Every option as a separate field"),description:(0,r.pgettext)("block:multi-select","Every option is included in the dataset as a separate value."),value:"fields"},{label:(0,r.pgettext)("block:multi-select","Text field with a list of all selected options"),description:(0,r.pgettext)("block:multi-select","All the selected options are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:(0,r.pgettext)("block:multi-select","Both options above"),description:(0,r.pgettext)("block:multi-select","Includes every option in the dataset together with the concatenated text."),value:"both"}],r.Forms.Radiobutton.bind(this,"format",void 0,"fields")).label((0,r.pgettext)("block:multi-select","This setting determines how the data is stored in the dataset:")).on((function(t){a.visible("concatenate"===t.value||"both"===t.value),c.disabled("concatenate"!==e.format&&"both"!==e.format)})),a]},activated:(0,r.isString)(this.format)}),this.editor.exportable(this)},t.prototype.defineConditions=function(){var e=this;this.options.each((function(t){t.name&&e.conditions.template({condition:s.OptionCondition,markdown:t.name,icon:b.default,burst:!0,props:{slot:e.slots.select(t.id),option:t,selected:!0}})})),this.options.count>0&&this.conditions.template({condition:a.NoneCondition,separator:!0});var t=this.slots.select("counter","meta");if(t&&t.label){var o=this.conditions.group(t.label,g.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Counter is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Counter is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Counter is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Counter is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Counter is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Counter is not between")}],(function(e){o.template({condition:d.CounterCondition,label:e.label,autoOpen:!0,props:{slot:t,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}var i=this.slots.select("score","feature");if(i&&i.label){var l=this.conditions.group(i.label,m.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:multi-select","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:multi-select","Score is not calculated")}],(function(e){l.template({condition:u.ScoreCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:i,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}},n([(0,r.definition)("items"),(0,r.affects)("#name")],t.prototype,"options",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#required"),(0,r.affects)("#collection","options")],t.prototype,"required",void 0),n([(0,r.definition)("number","optional")],t.prototype,"min",void 0),n([(0,r.definition)("number","optional")],t.prototype,"max",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#label"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"alias",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"exportable",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("boolean","optional")],t.prototype,"randomize",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"format",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparator",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparatorCustom",void 0),n([r.slots],t.prototype,"defineSlot",null),n([r.editor],t.prototype,"defineEditor",null),n([r.conditions],t.prototype,"defineConditions",null),t=n([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multi-select",version:"2.0.0",icon:p.default,get label(){return(0,r.pgettext)("block:multi-select","Dropdown (multi-select)")}})],t)}(r.NodeBlock);t.MultiSelect=f},422:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var r=o(954),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="",t}return l(t,e),t.prototype.defineSlot=function(){var e=this.name&&(0,r.markdownifyToString)(this.name,r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:r.Slots.Boolean,reference:this.id,label:(0,r.pgettext)("block:multi-select","Option"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:(0,r.pgettext)("block:multi-select","Option"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Option"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||(0,r.pgettext)("block:multi-select","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||(0,r.pgettext)("block:multi-select","Not selected")},t.prototype.deleteSlot=function(){this.ref.slots.delete(this.id,"dynamic")},t.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:multi-select","Name"),form:{title:(0,r.pgettext)("block:multi-select","Option name"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).action("@",(0,r.insertVariable)(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Description"),form:{title:(0,r.pgettext)("block:multi-select","Description"),controls:[new r.Forms.Text("multiline",r.Forms.Text.bind(this,"description",void 0)).action("@",(0,r.insertVariable)(this))]},activated:(0,r.isString)(this.description)}),this.editor.group((0,r.pgettext)("block:multi-select","Options")),this.editor.option({name:(0,r.pgettext)("block:multi-select","Exclusivity"),form:{title:(0,r.pgettext)("block:multi-select","Exclusivity"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Unselect all other options when selected"),r.Forms.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:(0,r.isBoolean)(this.exclusive)});var e=(0,r.pgettext)("block:multi-select","Selected"),t=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(e,"**"),"**".concat(t,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Identifier"),form:{title:(0,r.pgettext)("block:multi-select","Identifier"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"value",void 0)),new r.Forms.Static((0,r.pgettext)("block:multi-select","If an option identifier is set, this identifier will be used instead of the label."))]},activated:(0,r.isString)(this.value)});var o=this.ref.slots.select("score","feature");this.editor.option({name:(0,r.pgettext)("block:multi-select","Score"),form:{title:(0,r.pgettext)("block:multi-select","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==o?void 0:o.precision)||0).digits((null==o?void 0:o.digits)||0).decimalSign((null==o?void 0:o.decimal)||"").thousands(!!(null==o?void 0:o.separator),(null==o?void 0:o.separator)||"").prefix((null==o?void 0:o.prefix)||"").prefixPlural((null==o?void 0:o.prefixPlural)||void 0).suffix((null==o?void 0:o.suffix)||"").suffixPlural((null==o?void 0:o.suffixPlural)||void 0)]},activated:!0,locked:!!o,disabled:!o})},n([(0,r.definition)("string"),r.name],t.prototype,"name",void 0),n([(0,r.definition)("string","optional")],t.prototype,"description",void 0),n([(0,r.definition)("string","optional"),r.alias],t.prototype,"value",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("number","optional"),r.score],t.prototype,"score",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#name")],t.prototype,"exclusive",void 0),n([r.created,r.reordered,r.renamed,r.refreshed],t.prototype,"defineSlot",null),n([r.deleted],t.prototype,"deleteSlot",null),n([r.editor],t.prototype,"defineEditor",null),t}(r.Collection.Item);t.Option=c},537:function(e,t,o){o.r(t),t.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wIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg=="},954:function(e){e.exports=require("@tripetto/builder")}},t={};function o(i){var l=t[i];if(void 0!==l)return l.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,o),n.exports}o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=o(110);module.exports=i}(); | ||
/*! Tripetto Multi-select Block 2.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var e={929:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.CounterCondition=void 0;var r=o(954),c=o(948),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Number){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e){return r.L10n.locale.number(e,0,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Counter is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Counter is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Counter is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Counter is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Counter is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Counter is not between"),value:"not-between"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If counter equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If counter not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If counter is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If counter is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If counter is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If counter is not between")}}))]});var t=function(t,o){var i,l=e[t],n=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),c=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(i=e.slot)||void 0===i?void 0:i.id),s=new r.Forms.Dropdown(c,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===c.length}],(0,r.isString)(l)?"variable":"number").on((function(e){n.visible("number"===e.value),s.visible("variable"===e.value),n.isObservable&&n.focus()})),n,s]})},o=t("value",(0,r.pgettext)("block:multi-select","If counter equals")),i=t("to",(0,r.pgettext)("block:multi-select","And"))},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":counter"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify counter")}})],t)}(r.ConditionBlock);t.CounterCondition=s},875:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCondition=void 0;var r=o(954),c=o(489),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":none"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","No options selected")}})],t)}(r.ConditionBlock);t.NoneCondition=s},35:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionCondition=void 0;var r=o(954),c=o(537),s=o(669),a=o(489),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selected=!0,t}return l(t,e),Object.defineProperty(t.prototype,"icon",{get:function(){return this.selected?s.default:a.default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e;return(0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||this.type.label},enumerable:!1,configurable:!0}),t.prototype.defineEditor=function(){var e;this.editor.form({controls:[new r.Forms.Checkbox((0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||(0,r.pgettext)("block:multi-select","Option is selected"),r.Forms.Checkbox.bind(this,"selected",!0))]})},n([(0,r.affects)("#name"),(0,r.collection)("#options")],t.prototype,"option",void 0),n([(0,r.affects)("#icon"),r.definition],t.prototype,"selected",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select",version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Option")}})],t)}(r.ConditionBlock);t.OptionCondition=u},287:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.ScoreCondition=void 0;var r=o(954),c=o(939),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Numeric){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"defined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","calculated"));case"undefined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","not calculated"));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e,t){return r.L10n.locale.number(e,t,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Score is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:multi-select","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:multi-select","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(o.visible("defined"!==e.value&&"undefined"!==e.value),i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If score is not between")}}))]});var t=function(t,o,i){var l,n=e[t],c=e.slot,s=new r.Forms.Numeric((0,r.isNumberFinite)(n)?n:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).precision((null==c?void 0:c.precision)||0).digits((null==c?void 0:c.digits)||0).decimalSign((null==c?void 0:c.decimal)||"").thousands(!!(null==c?void 0:c.separator),(null==c?void 0:c.separator)||"").prefix((null==c?void 0:c.prefix)||"").prefixPlural((null==c?void 0:c.prefixPlural)||void 0).suffix((null==c?void 0:c.suffix)||"").suffixPlural((null==c?void 0:c.suffixPlural)||void 0).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),a=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(n)?n:void 0,!0,null===(l=e.slot)||void 0===l?void 0:l.id),u=new r.Forms.Dropdown(a,(0,r.isString)(n)?n:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===a.length}],(0,r.isString)(n)?"variable":"number").on((function(e){s.visible("number"===e.value),u.visible("variable"===e.value),s.isObservable&&s.focus()})),s,u]}).visible(i)},o=t("value",(0,r.pgettext)("block:multi-select","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=t("to",(0,r.pgettext)("block:multi-select","And"),"between"===this.mode||"not-between"===this.mode)},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":score"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify score")}})],t)}(r.ConditionBlock);t.ScoreCondition=s},110:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0;var r=o(954),c=o(422),s=o(35),a=o(875),u=o(287),d=o(929),p=o(617),b=o(669),g=o(948),m=o(939),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=r.Collection.of(c.Option,t),t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return(0,r.npgettext)("block:multi-select","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)},enumerable:!1,configurable:!0}),t.prototype.defineSlot=function(){this.slots.meta({type:r.Slots.Number,reference:"counter",label:(0,r.pgettext)("block:multi-select","Counter"),exportable:!1}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:r.Slots.Text,reference:"concatenation",label:(0,r.pgettext)("block:multi-select","Text value"),exportable:this.exportable,alias:this.alias}):this.slots.delete("concatenation","feature")},t.prototype.defineEditor=function(){var e=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();var t=this.editor.collection({collection:this.options,title:(0,r.pgettext)("block:multi-select","Options"),icon:b.default,placeholder:(0,r.pgettext)("block:multi-select","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks,indicator:function(e){return e.exclusive&&(0,r.pgettext)("block:multi-select","Exclusive").toUpperCase()||void 0},emptyMessage:(0,r.pgettext)("block:multi-select","Click the + button to add an option...")});this.editor.groups.settings();var o=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible((0,r.isNumber)(this.min)).indent(32).width(75).on((function(){i.min(e.min||1)})),i=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"max",void 0)).min(this.min||1).visible((0,r.isNumber)(this.max)).indent(32).width(75).on((function(){o.max(e.max)}));this.editor.option({name:(0,r.pgettext)("block:multi-select","Limits"),form:{title:(0,r.pgettext)("block:multi-select","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Minimum number of selected options"),(0,r.isNumber)(this.min)).on((function(e){o.visible(e.isChecked)})),o,new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Maximum number of selected options"),(0,r.isNumber)(this.max)).on((function(e){i.visible(e.isChecked)})),i]},activated:(0,r.isNumber)(this.max)||(0,r.isNumber)(this.min)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Randomization"),form:{title:(0,r.pgettext)("block:multi-select","Randomization"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),r.Forms.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:(0,r.isBoolean)(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();var l=(0,r.pgettext)("block:multi-select","Selected"),n=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(l),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(l,"**"),"**".concat(n,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.scores({target:this,collection:t,description:(0,r.pgettext)("block:multi-select","Generates a score based on the selected options. Open the settings panel for each option to set the individual score for that option.")});var c=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),s=new r.Forms.Text("singleline",r.Forms.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label((0,r.pgettext)("block:multi-select","Use this separator:")),a=new r.Forms.Group([new r.Forms.Dropdown([{label:(0,r.pgettext)("block:multi-select","Comma separated"),value:"comma"},{label:(0,r.pgettext)("block:multi-select","Space separated"),value:"space"},{label:(0,r.pgettext)("block:multi-select","List on multiple lines"),value:"list"},{label:(0,r.pgettext)("block:multi-select","Bulleted list"),value:"bullets"},{label:(0,r.pgettext)("block:multi-select","Numbered list"),value:"numbers"},{label:(0,r.pgettext)("block:multi-select","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:(0,r.pgettext)("block:multi-select","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:(0,r.pgettext)("block:multi-select","Custom separator"),value:"custom"}],r.Forms.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label((0,r.pgettext)("block:multi-select","How to separate the selected options:")).on((function(e){s.visible("custom"===e.value)})),s]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:(0,r.pgettext)("block:multi-select","Data format"),form:{title:(0,r.pgettext)("block:multi-select","Data format"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Every option as a separate field"),description:(0,r.pgettext)("block:multi-select","Every option is included in the dataset as a separate value."),value:"fields"},{label:(0,r.pgettext)("block:multi-select","Text field with a list of all selected options"),description:(0,r.pgettext)("block:multi-select","All the selected options are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:(0,r.pgettext)("block:multi-select","Both options above"),description:(0,r.pgettext)("block:multi-select","Includes every option in the dataset together with the concatenated text."),value:"both"}],r.Forms.Radiobutton.bind(this,"format",void 0,"fields")).label((0,r.pgettext)("block:multi-select","This setting determines how the data is stored in the dataset:")).on((function(t){a.visible("concatenate"===t.value||"both"===t.value),c.disabled("concatenate"!==e.format&&"both"!==e.format)})),a]},activated:(0,r.isString)(this.format)}),this.editor.exportable(this)},t.prototype.defineConditions=function(){var e=this;this.options.each((function(t){t.name&&e.conditions.template({condition:s.OptionCondition,markdown:t.name,icon:b.default,burst:!0,props:{slot:e.slots.select(t.id),option:t,selected:!0}})})),this.options.count>0&&this.conditions.template({condition:a.NoneCondition,separator:!0});var t=this.slots.select("counter","meta");if(t&&t.label){var o=this.conditions.group(t.label,g.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Counter is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Counter is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Counter is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Counter is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Counter is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Counter is not between")}],(function(e){o.template({condition:d.CounterCondition,label:e.label,autoOpen:!0,props:{slot:t,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}var i=this.slots.select("score","feature");if(i&&i.label){var l=this.conditions.group(i.label,m.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:multi-select","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:multi-select","Score is not calculated")}],(function(e){l.template({condition:u.ScoreCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:i,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}},n([(0,r.definition)("items"),(0,r.affects)("#name")],t.prototype,"options",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#required"),(0,r.affects)("#collection","options")],t.prototype,"required",void 0),n([(0,r.definition)("number","optional")],t.prototype,"min",void 0),n([(0,r.definition)("number","optional")],t.prototype,"max",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#label"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"alias",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"exportable",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("boolean","optional")],t.prototype,"randomize",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"format",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparator",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparatorCustom",void 0),n([r.slots],t.prototype,"defineSlot",null),n([r.editor],t.prototype,"defineEditor",null),n([r.conditions],t.prototype,"defineConditions",null),t=n([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multi-select",version:"2.0.1",icon:p.default,get label(){return(0,r.pgettext)("block:multi-select","Dropdown (multi-select)")}})],t)}(r.NodeBlock);t.MultiSelect=f},422:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var r=o(954),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="",t}return l(t,e),t.prototype.defineSlot=function(){var e=this.name&&(0,r.markdownifyToString)(this.name,r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:r.Slots.Boolean,reference:this.id,label:(0,r.pgettext)("block:multi-select","Option"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:(0,r.pgettext)("block:multi-select","Option"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Option"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||(0,r.pgettext)("block:multi-select","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||(0,r.pgettext)("block:multi-select","Not selected")},t.prototype.deleteSlot=function(){this.ref.slots.delete(this.id,"dynamic")},t.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:multi-select","Name"),form:{title:(0,r.pgettext)("block:multi-select","Option name"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).action("@",(0,r.insertVariable)(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Description"),form:{title:(0,r.pgettext)("block:multi-select","Description"),controls:[new r.Forms.Text("multiline",r.Forms.Text.bind(this,"description",void 0)).action("@",(0,r.insertVariable)(this))]},activated:(0,r.isString)(this.description)}),this.editor.group((0,r.pgettext)("block:multi-select","Options")),this.editor.option({name:(0,r.pgettext)("block:multi-select","Exclusivity"),form:{title:(0,r.pgettext)("block:multi-select","Exclusivity"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Unselect all other options when selected"),r.Forms.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:(0,r.isBoolean)(this.exclusive)});var e=(0,r.pgettext)("block:multi-select","Selected"),t=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(e,"**"),"**".concat(t,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Identifier"),form:{title:(0,r.pgettext)("block:multi-select","Identifier"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"value",void 0)),new r.Forms.Static((0,r.pgettext)("block:multi-select","If an option identifier is set, this identifier will be used instead of the label."))]},activated:(0,r.isString)(this.value)});var o=this.ref.slots.select("score","feature");this.editor.option({name:(0,r.pgettext)("block:multi-select","Score"),form:{title:(0,r.pgettext)("block:multi-select","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==o?void 0:o.precision)||0).digits((null==o?void 0:o.digits)||0).decimalSign((null==o?void 0:o.decimal)||"").thousands(!!(null==o?void 0:o.separator),(null==o?void 0:o.separator)||"").prefix((null==o?void 0:o.prefix)||"").prefixPlural((null==o?void 0:o.prefixPlural)||void 0).suffix((null==o?void 0:o.suffix)||"").suffixPlural((null==o?void 0:o.suffixPlural)||void 0)]},activated:!0,locked:!!o,disabled:!o})},n([(0,r.definition)("string"),r.name],t.prototype,"name",void 0),n([(0,r.definition)("string","optional")],t.prototype,"description",void 0),n([(0,r.definition)("string","optional"),r.alias],t.prototype,"value",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("number","optional"),r.score],t.prototype,"score",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#name")],t.prototype,"exclusive",void 0),n([r.created,r.reordered,r.renamed,r.refreshed],t.prototype,"defineSlot",null),n([r.deleted],t.prototype,"deleteSlot",null),n([r.editor],t.prototype,"defineEditor",null),t}(r.Collection.Item);t.Option=c},537:function(e,t,o){o.r(t),t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEuNjQzLS43MDJDMTMuMjIxIDIuMjE1IDExLjQxNSAyIDkuNSAycy0zLjcyMi4yMTUtNS4wODcuNjA1Yy0uNjk0LjE5OC0xLjI0Ni40MzQtMS42NDMuNzAyLS42MzcuNDMtLjc3Ljg4Ni0uNzcgMS4xOTNWNWMwIC40MjguMzIxIDEuMTMzLjYzOSAxLjYwOWw0Ljg5MSA3LjMzNmMuMjUxLjM3Ni40NzEgMS4xMDMuNDcxIDEuNTU1djNhLjUuNSAwIDAgMCAuNzI0LjQ0N2wyLTFhLjUuNSAwIDAgMCAuMjc2LS40NDd2LTJjMC0uNDUyLjIyLTEuMTc5LjQ3MS0xLjU1NWw0Ljg5MS03LjMzNmMuMzE3LS40NzYuNjM5LTEuMTgyLjYzOS0xLjYwOXYtLjVjMC0uMzA3LS4xMzQtLjc2My0uNzctMS4xOTN6b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TRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},669:function(e,t,o){o.r(t),t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg=="},954:function(e){e.exports=require("@tripetto/builder")}},t={};function o(i){var l=t[i];if(void 0!==l)return l.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,o),n.exports}o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=o(110);module.exports=i}(); |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Multi-select Block 2.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Tripetto")):"function"==typeof define&&define.amd?define("TripettoBlockMultiSelectBuilder",["Tripetto"],t):"object"==typeof exports?exports.TripettoBlockMultiSelectBuilder=t(require("Tripetto")):e.TripettoBlockMultiSelectBuilder=t(e.Tripetto)}(self,(function(e){return function(){"use strict";var t={929:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.CounterCondition=void 0;var r=o(210),c=o(948),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Number){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e){return r.L10n.locale.number(e,0,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Counter is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Counter is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Counter is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Counter is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Counter is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Counter is not between"),value:"not-between"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If counter equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If counter not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If counter is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If counter is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If counter is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If counter is not between")}}))]});var t=function(t,o){var i,l=e[t],n=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),c=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(i=e.slot)||void 0===i?void 0:i.id),s=new r.Forms.Dropdown(c,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===c.length}],(0,r.isString)(l)?"variable":"number").on((function(e){n.visible("number"===e.value),s.visible("variable"===e.value),n.isObservable&&n.focus()})),n,s]})},o=t("value",(0,r.pgettext)("block:multi-select","If counter equals")),i=t("to",(0,r.pgettext)("block:multi-select","And"))},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":counter"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify counter")}})],t)}(r.ConditionBlock);t.CounterCondition=s},875:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCondition=void 0;var r=o(210),c=o(489),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":none"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","No options selected")}})],t)}(r.ConditionBlock);t.NoneCondition=s},35:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionCondition=void 0;var r=o(210),c=o(537),s=o(669),a=o(489),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selected=!0,t}return l(t,e),Object.defineProperty(t.prototype,"icon",{get:function(){return this.selected?s.default:a.default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e;return(0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||this.type.label},enumerable:!1,configurable:!0}),t.prototype.defineEditor=function(){var e;this.editor.form({controls:[new r.Forms.Checkbox((0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||(0,r.pgettext)("block:multi-select","Option is selected"),r.Forms.Checkbox.bind(this,"selected",!0))]})},n([(0,r.affects)("#name"),(0,r.collection)("#options")],t.prototype,"option",void 0),n([(0,r.affects)("#icon"),r.definition],t.prototype,"selected",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select",version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Option")}})],t)}(r.ConditionBlock);t.OptionCondition=u},287:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.ScoreCondition=void 0;var r=o(210),c=o(939),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Numeric){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"defined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","calculated"));case"undefined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","not calculated"));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e,t){return r.L10n.locale.number(e,t,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Score is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:multi-select","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:multi-select","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(o.visible("defined"!==e.value&&"undefined"!==e.value),i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If score is not between")}}))]});var t=function(t,o,i){var l,n=e[t],c=e.slot,s=new r.Forms.Numeric((0,r.isNumberFinite)(n)?n:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).precision((null==c?void 0:c.precision)||0).digits((null==c?void 0:c.digits)||0).decimalSign((null==c?void 0:c.decimal)||"").thousands(!!(null==c?void 0:c.separator),(null==c?void 0:c.separator)||"").prefix((null==c?void 0:c.prefix)||"").prefixPlural((null==c?void 0:c.prefixPlural)||void 0).suffix((null==c?void 0:c.suffix)||"").suffixPlural((null==c?void 0:c.suffixPlural)||void 0).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),a=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(n)?n:void 0,!0,null===(l=e.slot)||void 0===l?void 0:l.id),u=new r.Forms.Dropdown(a,(0,r.isString)(n)?n:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===a.length}],(0,r.isString)(n)?"variable":"number").on((function(e){s.visible("number"===e.value),u.visible("variable"===e.value),s.isObservable&&s.focus()})),s,u]}).visible(i)},o=t("value",(0,r.pgettext)("block:multi-select","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=t("to",(0,r.pgettext)("block:multi-select","And"),"between"===this.mode||"not-between"===this.mode)},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":score"),version:"2.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify score")}})],t)}(r.ConditionBlock);t.ScoreCondition=s},110:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0;var r=o(210),c=o(422),s=o(35),a=o(875),u=o(287),d=o(929),p=o(617),b=o(669),g=o(948),m=o(939),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=r.Collection.of(c.Option,t),t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return(0,r.npgettext)("block:multi-select","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)},enumerable:!1,configurable:!0}),t.prototype.defineSlot=function(){this.slots.meta({type:r.Slots.Number,reference:"counter",label:(0,r.pgettext)("block:multi-select","Counter"),exportable:!1}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:r.Slots.Text,reference:"concatenation",label:(0,r.pgettext)("block:multi-select","Text value"),exportable:this.exportable,alias:this.alias}):this.slots.delete("concatenation","feature")},t.prototype.defineEditor=function(){var e=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();var t=this.editor.collection({collection:this.options,title:(0,r.pgettext)("block:multi-select","Options"),icon:b.default,placeholder:(0,r.pgettext)("block:multi-select","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks,indicator:function(e){return e.exclusive&&(0,r.pgettext)("block:multi-select","Exclusive").toUpperCase()||void 0},emptyMessage:(0,r.pgettext)("block:multi-select","Click the + button to add an option...")});this.editor.groups.settings();var o=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible((0,r.isNumber)(this.min)).indent(32).width(75).on((function(){i.min(e.min||1)})),i=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"max",void 0)).min(this.min||1).visible((0,r.isNumber)(this.max)).indent(32).width(75).on((function(){o.max(e.max)}));this.editor.option({name:(0,r.pgettext)("block:multi-select","Limits"),form:{title:(0,r.pgettext)("block:multi-select","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Minimum number of selected options"),(0,r.isNumber)(this.min)).on((function(e){o.visible(e.isChecked)})),o,new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Maximum number of selected options"),(0,r.isNumber)(this.max)).on((function(e){i.visible(e.isChecked)})),i]},activated:(0,r.isNumber)(this.max)||(0,r.isNumber)(this.min)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Randomization"),form:{title:(0,r.pgettext)("block:multi-select","Randomization"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),r.Forms.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:(0,r.isBoolean)(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();var l=(0,r.pgettext)("block:multi-select","Selected"),n=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(l),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(l,"**"),"**".concat(n,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.scores({target:this,collection:t,description:(0,r.pgettext)("block:multi-select","Generates a score based on the selected options. Open the settings panel for each option to set the individual score for that option.")});var c=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),s=new r.Forms.Text("singleline",r.Forms.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label((0,r.pgettext)("block:multi-select","Use this separator:")),a=new r.Forms.Group([new r.Forms.Dropdown([{label:(0,r.pgettext)("block:multi-select","Comma separated"),value:"comma"},{label:(0,r.pgettext)("block:multi-select","Space separated"),value:"space"},{label:(0,r.pgettext)("block:multi-select","List on multiple lines"),value:"list"},{label:(0,r.pgettext)("block:multi-select","Bulleted list"),value:"bullets"},{label:(0,r.pgettext)("block:multi-select","Numbered list"),value:"numbers"},{label:(0,r.pgettext)("block:multi-select","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:(0,r.pgettext)("block:multi-select","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:(0,r.pgettext)("block:multi-select","Custom separator"),value:"custom"}],r.Forms.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label((0,r.pgettext)("block:multi-select","How to separate the selected options:")).on((function(e){s.visible("custom"===e.value)})),s]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:(0,r.pgettext)("block:multi-select","Data format"),form:{title:(0,r.pgettext)("block:multi-select","Data format"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Every option as a separate field"),description:(0,r.pgettext)("block:multi-select","Every option is included in the dataset as a separate value."),value:"fields"},{label:(0,r.pgettext)("block:multi-select","Text field with a list of all selected options"),description:(0,r.pgettext)("block:multi-select","All the selected options are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:(0,r.pgettext)("block:multi-select","Both options above"),description:(0,r.pgettext)("block:multi-select","Includes every option in the dataset together with the concatenated text."),value:"both"}],r.Forms.Radiobutton.bind(this,"format",void 0,"fields")).label((0,r.pgettext)("block:multi-select","This setting determines how the data is stored in the dataset:")).on((function(t){a.visible("concatenate"===t.value||"both"===t.value),c.disabled("concatenate"!==e.format&&"both"!==e.format)})),a]},activated:(0,r.isString)(this.format)}),this.editor.exportable(this)},t.prototype.defineConditions=function(){var e=this;this.options.each((function(t){t.name&&e.conditions.template({condition:s.OptionCondition,markdown:t.name,icon:b.default,burst:!0,props:{slot:e.slots.select(t.id),option:t,selected:!0}})})),this.options.count>0&&this.conditions.template({condition:a.NoneCondition,separator:!0});var t=this.slots.select("counter","meta");if(t&&t.label){var o=this.conditions.group(t.label,g.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Counter is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Counter is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Counter is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Counter is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Counter is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Counter is not between")}],(function(e){o.template({condition:d.CounterCondition,label:e.label,autoOpen:!0,props:{slot:t,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}var i=this.slots.select("score","feature");if(i&&i.label){var l=this.conditions.group(i.label,m.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:multi-select","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:multi-select","Score is not calculated")}],(function(e){l.template({condition:u.ScoreCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:i,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}},n([(0,r.definition)("items"),(0,r.affects)("#name")],t.prototype,"options",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#required"),(0,r.affects)("#collection","options")],t.prototype,"required",void 0),n([(0,r.definition)("number","optional")],t.prototype,"min",void 0),n([(0,r.definition)("number","optional")],t.prototype,"max",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#label"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"alias",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"exportable",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("boolean","optional")],t.prototype,"randomize",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"format",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparator",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparatorCustom",void 0),n([r.slots],t.prototype,"defineSlot",null),n([r.editor],t.prototype,"defineEditor",null),n([r.conditions],t.prototype,"defineConditions",null),t=n([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multi-select",version:"2.0.0",icon:p.default,get label(){return(0,r.pgettext)("block:multi-select","Dropdown (multi-select)")}})],t)}(r.NodeBlock);t.MultiSelect=f},422:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var r=o(210),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="",t}return l(t,e),t.prototype.defineSlot=function(){var e=this.name&&(0,r.markdownifyToString)(this.name,r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:r.Slots.Boolean,reference:this.id,label:(0,r.pgettext)("block:multi-select","Option"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:(0,r.pgettext)("block:multi-select","Option"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Option"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||(0,r.pgettext)("block:multi-select","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||(0,r.pgettext)("block:multi-select","Not selected")},t.prototype.deleteSlot=function(){this.ref.slots.delete(this.id,"dynamic")},t.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:multi-select","Name"),form:{title:(0,r.pgettext)("block:multi-select","Option name"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).action("@",(0,r.insertVariable)(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Description"),form:{title:(0,r.pgettext)("block:multi-select","Description"),controls:[new r.Forms.Text("multiline",r.Forms.Text.bind(this,"description",void 0)).action("@",(0,r.insertVariable)(this))]},activated:(0,r.isString)(this.description)}),this.editor.group((0,r.pgettext)("block:multi-select","Options")),this.editor.option({name:(0,r.pgettext)("block:multi-select","Exclusivity"),form:{title:(0,r.pgettext)("block:multi-select","Exclusivity"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Unselect all other options when selected"),r.Forms.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:(0,r.isBoolean)(this.exclusive)});var e=(0,r.pgettext)("block:multi-select","Selected"),t=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(e,"**"),"**".concat(t,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Identifier"),form:{title:(0,r.pgettext)("block:multi-select","Identifier"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"value",void 0)),new r.Forms.Static((0,r.pgettext)("block:multi-select","If an option identifier is set, this identifier will be used instead of the label."))]},activated:(0,r.isString)(this.value)});var o=this.ref.slots.select("score","feature");this.editor.option({name:(0,r.pgettext)("block:multi-select","Score"),form:{title:(0,r.pgettext)("block:multi-select","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==o?void 0:o.precision)||0).digits((null==o?void 0:o.digits)||0).decimalSign((null==o?void 0:o.decimal)||"").thousands(!!(null==o?void 0:o.separator),(null==o?void 0:o.separator)||"").prefix((null==o?void 0:o.prefix)||"").prefixPlural((null==o?void 0:o.prefixPlural)||void 0).suffix((null==o?void 0:o.suffix)||"").suffixPlural((null==o?void 0:o.suffixPlural)||void 0)]},activated:!0,locked:!!o,disabled:!o})},n([(0,r.definition)("string"),r.name],t.prototype,"name",void 0),n([(0,r.definition)("string","optional")],t.prototype,"description",void 0),n([(0,r.definition)("string","optional"),r.alias],t.prototype,"value",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("number","optional"),r.score],t.prototype,"score",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#name")],t.prototype,"exclusive",void 0),n([r.created,r.reordered,r.renamed,r.refreshed],t.prototype,"defineSlot",null),n([r.deleted],t.prototype,"deleteSlot",null),n([r.editor],t.prototype,"defineEditor",null),t}(r.Collection.Item);t.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MCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg=="},210:function(t){t.exports=e}},o={};function i(e){var l=o[e];if(void 0!==l)return l.exports;var n=o[e]={exports:{}};return t[e].call(n.exports,n,n.exports,i),n.exports}return i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(110)}()})); | ||
/*! Tripetto Multi-select Block 2.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Tripetto")):"function"==typeof define&&define.amd?define("TripettoBlockMultiSelectBuilder",["Tripetto"],t):"object"==typeof exports?exports.TripettoBlockMultiSelectBuilder=t(require("Tripetto")):e.TripettoBlockMultiSelectBuilder=t(e.Tripetto)}(self,(function(e){return function(){"use strict";var t={929:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.CounterCondition=void 0;var r=o(210),c=o(948),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Number){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e){return r.L10n.locale.number(e,0,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Counter is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Counter is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Counter is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Counter is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Counter is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Counter is not between"),value:"not-between"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If counter equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If counter not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If counter is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If counter is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If counter is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If counter is not between")}}))]});var t=function(t,o){var i,l=e[t],n=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),c=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(i=e.slot)||void 0===i?void 0:i.id),s=new r.Forms.Dropdown(c,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===c.length}],(0,r.isString)(l)?"variable":"number").on((function(e){n.visible("number"===e.value),s.visible("variable"===e.value),n.isObservable&&n.focus()})),n,s]})},o=t("value",(0,r.pgettext)("block:multi-select","If counter equals")),i=t("to",(0,r.pgettext)("block:multi-select","And"))},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":counter"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify counter")}})],t)}(r.ConditionBlock);t.CounterCondition=s},875:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCondition=void 0;var r=o(210),c=o(489),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":none"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","No options selected")}})],t)}(r.ConditionBlock);t.NoneCondition=s},35:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionCondition=void 0;var r=o(210),c=o(537),s=o(669),a=o(489),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selected=!0,t}return l(t,e),Object.defineProperty(t.prototype,"icon",{get:function(){return this.selected?s.default:a.default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e;return(0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||this.type.label},enumerable:!1,configurable:!0}),t.prototype.defineEditor=function(){var e;this.editor.form({controls:[new r.Forms.Checkbox((0,r.markdownifyToString)((null===(e=this.option)||void 0===e?void 0:e.name)||"")||(0,r.pgettext)("block:multi-select","Option is selected"),r.Forms.Checkbox.bind(this,"selected",!0))]})},n([(0,r.affects)("#name"),(0,r.collection)("#options")],t.prototype,"option",void 0),n([(0,r.affects)("#icon"),r.definition],t.prototype,"selected",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select",version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Option")}})],t)}(r.ConditionBlock);t.OptionCondition=u},287:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.ScoreCondition=void 0;var r=o(210),c=o(939),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowMarkdown=!0,t.mode="equal",t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){var e=this.slot;if(e instanceof r.Slots.Numeric){var t=this.parse(e,this.value);switch(this.mode){case"between":return"".concat(t," ≤ @").concat(e.id," ≤ ").concat(this.parse(e,this.to));case"not-between":return"@".concat(e.id," < ").concat(t," ").concat((0,r.pgettext)("block:multi-select","or")," @").concat(e.id," > ").concat(this.parse(e,this.to));case"defined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","calculated"));case"undefined":return"@".concat(e.id," ").concat((0,r.pgettext)("block:multi-select","not calculated"));case"not-equal":return"@".concat(e.id," ≠ ").concat(t);case"above":case"below":case"equal":return"@".concat(e.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(t)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,t){var o;return(0,r.isNumberFinite)(t)?e.toString(t,(function(e,t){return r.L10n.locale.number(e,t,!1)})):(0,r.isString)(t)&&t&&(null===(o=(0,r.lookupVariable)(this,t))||void 0===o?void 0:o.label)?"@".concat(t):"\\_\\_"},t.prototype.defineEditor=function(){var e=this;this.editor.form({title:(0,r.pgettext)("block:multi-select","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:multi-select","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:multi-select","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:multi-select","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:multi-select","Score is between"),value:"between"},{label:(0,r.pgettext)("block:multi-select","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:multi-select","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:multi-select","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(e){switch(o.visible("defined"!==e.value&&"undefined"!==e.value),i.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":o.title=(0,r.pgettext)("block:multi-select","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:multi-select","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:multi-select","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:multi-select","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:multi-select","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:multi-select","If score is not between")}}))]});var t=function(t,o,i){var l,n=e[t],c=e.slot,s=new r.Forms.Numeric((0,r.isNumberFinite)(n)?n:0).label((0,r.pgettext)("block:multi-select","Use fixed number")).precision((null==c?void 0:c.precision)||0).digits((null==c?void 0:c.digits)||0).decimalSign((null==c?void 0:c.decimal)||"").thousands(!!(null==c?void 0:c.separator),(null==c?void 0:c.separator)||"").prefix((null==c?void 0:c.prefix)||"").prefixPlural((null==c?void 0:c.prefixPlural)||void 0).suffix((null==c?void 0:c.suffix)||"").suffixPlural((null==c?void 0:c.suffixPlural)||void 0).autoFocus("value"===t).escape(e.editor.close).enter((function(){return("between"!==e.mode&&"not-between"!==e.mode||"to"===t)&&e.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value)})),a=(0,r.populateVariables)(e,(function(e){return e instanceof r.Slots.Number||e instanceof r.Slots.Numeric}),(0,r.isString)(n)?n:void 0,!0,null===(l=e.slot)||void 0===l?void 0:l.id),u=new r.Forms.Dropdown(a,(0,r.isString)(n)?n:"").label((0,r.pgettext)("block:multi-select","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(e[t]=o.value||"")}));return e.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Number"),value:"number"},{label:(0,r.pgettext)("block:multi-select","Value"),value:"variable",disabled:0===a.length}],(0,r.isString)(n)?"variable":"number").on((function(e){s.visible("number"===e.value),u.visible("variable"===e.value),s.isObservable&&s.focus()})),s,u]}).visible(i)},o=t("value",(0,r.pgettext)("block:multi-select","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=t("to",(0,r.pgettext)("block:multi-select","And"),"between"===this.mode||"not-between"===this.mode)},n([r.definition,(0,r.affects)("#name")],t.prototype,"mode",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"value",void 0),n([r.definition,(0,r.affects)("#name")],t.prototype,"to",void 0),n([r.editor],t.prototype,"defineEditor",null),t=n([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"".concat("@tripetto/block-multi-select",":score"),version:"2.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:multi-select","Verify score")}})],t)}(r.ConditionBlock);t.ScoreCondition=s},110:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0;var r=o(210),c=o(422),s=o(35),a=o(875),u=o(287),d=o(929),p=o(617),b=o(669),g=o(948),m=o(939),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=r.Collection.of(c.Option,t),t}return l(t,e),Object.defineProperty(t.prototype,"label",{get:function(){return(0,r.npgettext)("block:multi-select","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)},enumerable:!1,configurable:!0}),t.prototype.defineSlot=function(){this.slots.meta({type:r.Slots.Number,reference:"counter",label:(0,r.pgettext)("block:multi-select","Counter"),exportable:!1}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:r.Slots.Text,reference:"concatenation",label:(0,r.pgettext)("block:multi-select","Text value"),exportable:this.exportable,alias:this.alias}):this.slots.delete("concatenation","feature")},t.prototype.defineEditor=function(){var e=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();var t=this.editor.collection({collection:this.options,title:(0,r.pgettext)("block:multi-select","Options"),icon:b.default,placeholder:(0,r.pgettext)("block:multi-select","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks,indicator:function(e){return e.exclusive&&(0,r.pgettext)("block:multi-select","Exclusive").toUpperCase()||void 0},emptyMessage:(0,r.pgettext)("block:multi-select","Click the + button to add an option...")});this.editor.groups.settings();var o=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible((0,r.isNumber)(this.min)).indent(32).width(75).on((function(){i.min(e.min||1)})),i=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"max",void 0)).min(this.min||1).visible((0,r.isNumber)(this.max)).indent(32).width(75).on((function(){o.max(e.max)}));this.editor.option({name:(0,r.pgettext)("block:multi-select","Limits"),form:{title:(0,r.pgettext)("block:multi-select","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Minimum number of selected options"),(0,r.isNumber)(this.min)).on((function(e){o.visible(e.isChecked)})),o,new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Maximum number of selected options"),(0,r.isNumber)(this.max)).on((function(e){i.visible(e.isChecked)})),i]},activated:(0,r.isNumber)(this.max)||(0,r.isNumber)(this.min)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Randomization"),form:{title:(0,r.pgettext)("block:multi-select","Randomization"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),r.Forms.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:(0,r.isBoolean)(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();var l=(0,r.pgettext)("block:multi-select","Selected"),n=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(l),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(l,"**"),"**".concat(n,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.scores({target:this,collection:t,description:(0,r.pgettext)("block:multi-select","Generates a score based on the selected options. Open the settings panel for each option to set the individual score for that option.")});var c=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),s=new r.Forms.Text("singleline",r.Forms.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label((0,r.pgettext)("block:multi-select","Use this separator:")),a=new r.Forms.Group([new r.Forms.Dropdown([{label:(0,r.pgettext)("block:multi-select","Comma separated"),value:"comma"},{label:(0,r.pgettext)("block:multi-select","Space separated"),value:"space"},{label:(0,r.pgettext)("block:multi-select","List on multiple lines"),value:"list"},{label:(0,r.pgettext)("block:multi-select","Bulleted list"),value:"bullets"},{label:(0,r.pgettext)("block:multi-select","Numbered list"),value:"numbers"},{label:(0,r.pgettext)("block:multi-select","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:(0,r.pgettext)("block:multi-select","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:(0,r.pgettext)("block:multi-select","Custom separator"),value:"custom"}],r.Forms.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label((0,r.pgettext)("block:multi-select","How to separate the selected options:")).on((function(e){s.visible("custom"===e.value)})),s]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:(0,r.pgettext)("block:multi-select","Data format"),form:{title:(0,r.pgettext)("block:multi-select","Data format"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:multi-select","Every option as a separate field"),description:(0,r.pgettext)("block:multi-select","Every option is included in the dataset as a separate value."),value:"fields"},{label:(0,r.pgettext)("block:multi-select","Text field with a list of all selected options"),description:(0,r.pgettext)("block:multi-select","All the selected options are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:(0,r.pgettext)("block:multi-select","Both options above"),description:(0,r.pgettext)("block:multi-select","Includes every option in the dataset together with the concatenated text."),value:"both"}],r.Forms.Radiobutton.bind(this,"format",void 0,"fields")).label((0,r.pgettext)("block:multi-select","This setting determines how the data is stored in the dataset:")).on((function(t){a.visible("concatenate"===t.value||"both"===t.value),c.disabled("concatenate"!==e.format&&"both"!==e.format)})),a]},activated:(0,r.isString)(this.format)}),this.editor.exportable(this)},t.prototype.defineConditions=function(){var e=this;this.options.each((function(t){t.name&&e.conditions.template({condition:s.OptionCondition,markdown:t.name,icon:b.default,burst:!0,props:{slot:e.slots.select(t.id),option:t,selected:!0}})})),this.options.count>0&&this.conditions.template({condition:a.NoneCondition,separator:!0});var t=this.slots.select("counter","meta");if(t&&t.label){var o=this.conditions.group(t.label,g.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Counter is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Counter is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Counter is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Counter is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Counter is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Counter is not between")}],(function(e){o.template({condition:d.CounterCondition,label:e.label,autoOpen:!0,props:{slot:t,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}var i=this.slots.select("score","feature");if(i&&i.label){var l=this.conditions.group(i.label,m.default);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:multi-select","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:multi-select","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:multi-select","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:multi-select","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:multi-select","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:multi-select","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:multi-select","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:multi-select","Score is not calculated")}],(function(e){l.template({condition:u.ScoreCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:i,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}))}},n([(0,r.definition)("items"),(0,r.affects)("#name")],t.prototype,"options",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#required"),(0,r.affects)("#collection","options")],t.prototype,"required",void 0),n([(0,r.definition)("number","optional")],t.prototype,"min",void 0),n([(0,r.definition)("number","optional")],t.prototype,"max",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#label"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"alias",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"exportable",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#collection","options")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("boolean","optional")],t.prototype,"randomize",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#slots"),(0,r.affects)("#collection","options")],t.prototype,"format",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparator",void 0),n([(0,r.definition)("string","optional")],t.prototype,"formatSeparatorCustom",void 0),n([r.slots],t.prototype,"defineSlot",null),n([r.editor],t.prototype,"defineEditor",null),n([r.conditions],t.prototype,"defineConditions",null),t=n([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multi-select",version:"2.0.1",icon:p.default,get label(){return(0,r.pgettext)("block:multi-select","Dropdown (multi-select)")}})],t)}(r.NodeBlock);t.MultiSelect=f},422:function(e,t,o){var i,l=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),n=this&&this.__decorate||function(e,t,o,i){var l,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var c=e.length-1;c>=0;c--)(l=e[c])&&(r=(n<3?l(r):n>3?l(t,o,r):l(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var r=o(210),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="",t}return l(t,e),t.prototype.defineSlot=function(){var e=this.name&&(0,r.markdownifyToString)(this.name,r.Markdown.MarkdownFeatures.Formatting|r.Markdown.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:r.Slots.Boolean,reference:this.id,label:(0,r.pgettext)("block:multi-select","Option"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:(0,r.pgettext)("block:multi-select","Option"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Option"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||(0,r.pgettext)("block:multi-select","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||(0,r.pgettext)("block:multi-select","Not selected")},t.prototype.deleteSlot=function(){this.ref.slots.delete(this.id,"dynamic")},t.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:multi-select","Name"),form:{title:(0,r.pgettext)("block:multi-select","Option name"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).action("@",(0,r.insertVariable)(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Description"),form:{title:(0,r.pgettext)("block:multi-select","Description"),controls:[new r.Forms.Text("multiline",r.Forms.Text.bind(this,"description",void 0)).action("@",(0,r.insertVariable)(this))]},activated:(0,r.isString)(this.description)}),this.editor.group((0,r.pgettext)("block:multi-select","Options")),this.editor.option({name:(0,r.pgettext)("block:multi-select","Exclusivity"),form:{title:(0,r.pgettext)("block:multi-select","Exclusivity"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:multi-select","Unselect all other options when selected"),r.Forms.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:(0,r.isBoolean)(this.exclusive)});var e=(0,r.pgettext)("block:multi-select","Selected"),t=(0,r.pgettext)("block:multi-select","Not selected");this.editor.option({name:(0,r.pgettext)("block:multi-select","Labels"),form:{title:(0,r.pgettext)("block:multi-select","Labels"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new r.Forms.Text("singleline",r.Forms.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new r.Forms.Static((0,r.pgettext)("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.","**".concat(e,"**"),"**".concat(t,"**"))).markdown()]},activated:(0,r.isString)(this.labelForTrue)||(0,r.isString)(this.labelForFalse)}),this.editor.option({name:(0,r.pgettext)("block:multi-select","Identifier"),form:{title:(0,r.pgettext)("block:multi-select","Identifier"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"value",void 0)),new r.Forms.Static((0,r.pgettext)("block:multi-select","If an option identifier is set, this identifier will be used instead of the label."))]},activated:(0,r.isString)(this.value)});var o=this.ref.slots.select("score","feature");this.editor.option({name:(0,r.pgettext)("block:multi-select","Score"),form:{title:(0,r.pgettext)("block:multi-select","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==o?void 0:o.precision)||0).digits((null==o?void 0:o.digits)||0).decimalSign((null==o?void 0:o.decimal)||"").thousands(!!(null==o?void 0:o.separator),(null==o?void 0:o.separator)||"").prefix((null==o?void 0:o.prefix)||"").prefixPlural((null==o?void 0:o.prefixPlural)||void 0).suffix((null==o?void 0:o.suffix)||"").suffixPlural((null==o?void 0:o.suffixPlural)||void 0)]},activated:!0,locked:!!o,disabled:!o})},n([(0,r.definition)("string"),r.name],t.prototype,"name",void 0),n([(0,r.definition)("string","optional")],t.prototype,"description",void 0),n([(0,r.definition)("string","optional"),r.alias],t.prototype,"value",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForTrue",void 0),n([(0,r.definition)("string","optional"),(0,r.affects)("#refresh")],t.prototype,"labelForFalse",void 0),n([(0,r.definition)("number","optional"),r.score],t.prototype,"score",void 0),n([(0,r.definition)("boolean","optional"),(0,r.affects)("#name")],t.prototype,"exclusive",void 0),n([r.created,r.reordered,r.renamed,r.refreshed],t.prototype,"defineSlot",null),n([r.deleted],t.prototype,"deleteSlot",null),n([r.editor],t.prototype,"defineEditor",null),t}(r.Collection.Item);t.Option=c},537:function(e,t,o){o.r(t),t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEuNjQzLS43MDJDMTMuMjIxIDIuMjE1IDExLjQxNSAyIDkuNSAycy0zLjcyMi4yMTUtNS4wODcuNjA1Yy0uNjk0LjE5OC0xLjI0Ni40MzQtMS42NDMuNzAyLS42MzcuNDMtLjc3Ljg4Ni0uNzcgMS4xOTNWNWMwIC40MjguMzIxIDEuMTMzLjYzOSAxLjYwOWw0Ljg5MSA3LjMzNmMuMjUxLjM3Ni40NzEgMS4xMDMuNDcxIDEuNTU1djNhLjUuNSAwIDAgMCAuNzI0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djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},669:function(e,t,o){o.r(t),t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg=="},210:function(t){t.exports=e}},o={};function i(e){var l=o[e];if(void 0!==l)return l.exports;var n=o[e]={exports:{}};return t[e].call(n.exports,n,n.exports,i),n.exports}return i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(110)}()})); |
{ | ||
"name": "@tripetto/block-multi-select", | ||
"title": "Tripetto Multi-select Block", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Multi-select dropdown block for Tripetto.", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -25,3 +25,3 @@ ## <a href="https://tripetto.com/sdk/"><img src="https://unpkg.com/@tripetto/builder/assets/header.svg" alt="Tripetto FormBuilder SDK"></a> | ||
This block for Tripetto implements a multi-select dropdown list. Use the multi-select dropdown block to let respondents select multiple items from a dropdown list with options that you provide. The block includes a score feature that can be used to automatically calculate a score depending on the selected option(s). It also includes a counter feature that can automatically count the amount of selected option(s). Besides the [builder](https://tripetto.com/sdk/docs/builder/introduction/) part of the block, this package includes a base class with the validation/condition logic for the [runner](https://tripetto.com/sdk/docs/runner/introduction/) part of the block. | ||
This block for Tripetto implements a multi-select dropdown list. Use the multi-select dropdown block to let respondents select multiple items from a dropdown list with options that you provide. The block includes a score feature that can be used to automatically calculate a score depending on the selected option(s). It also includes a counter feature that can automatically count the number of selected option(s). Besides the [builder](https://tripetto.com/sdk/docs/builder/introduction/) part of the block, this package includes a base class with the validation/condition logic for the [runner](https://tripetto.com/sdk/docs/runner/introduction/) part of the block. | ||
@@ -28,0 +28,0 @@ ## 📺 Preview |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Multi-select Block 2.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
/*! Tripetto Multi-select Block 2.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var t={924:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.CounterCondition=void 0;var u=o(226),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,u.isString)(e)&&t instanceof u.Slots.Number){var o=this.variableFor(e);return o&&o.hasValue?t.toValue(o.value):void 0}return(0,u.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var o=this.getValue(t.slot,this.props.to);return(0,u.isNumberFinite)(e)&&(0,u.isNumberFinite)(o)&&(t.hasValue&&t.value>=u.Num.min(e,o)&&t.value<=u.Num.max(e,o))===("between"===this.props.mode)}}return!1},i([u.condition],e.prototype,"verify",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":counter")})],e)}(u.ConditionBlock);e.CounterCondition=a},514:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.NoneCondition=void 0;var u=o(226),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.noneSelected=function(){var t=this,e=this.slots;return!e||!e.each((function(e){var o=t.valueOf(e);return o&&o.value||!1}))},i([u.condition],e.prototype,"noneSelected",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":none")})],e)}(u.ConditionBlock);e.NoneCondition=a},716:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.OptionCondition=void 0;var u=o(226),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isSelected=function(){var t=this.valueOf();return t&&t.value===this.props.selected||!1},i([u.condition],e.prototype,"isSelected",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-multi-select"})],e)}(u.ConditionBlock);e.OptionCondition=a},502:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var u=o(226),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,u.isString)(e)&&t instanceof u.Slots.Numeric){var o=this.variableFor(e);return o&&o.hasValue?t.toValue(o.value):void 0}return(0,u.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var o=this.getValue(t.slot,this.props.to);return(0,u.isNumberFinite)(e)&&(0,u.isNumberFinite)(o)&&(t.hasValue&&t.value>=u.Num.min(e,o)&&t.value<=u.Num.max(e,o))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([u.condition],e.prototype,"verify",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":score")})],e)}(u.ConditionBlock);e.ScoreCondition=a},58:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSelect=void 0;var u=o(226),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.counterSlot=e.valueOf("counter","meta"),e.concatenationSlot=e.valueOf("concatenation","feature"),e.scoreSlot=e.valueOf("score","feature"),e}return n(e,t),Object.defineProperty(e.prototype,"required",{get:function(){return this.props.required||!1},enumerable:!1,configurable:!0}),e.prototype.transform=function(){var t=this,e=(0,u.filter)((0,u.map)(this.props.options,(function(e){return{id:e.id,label:e.value||e.name||"",exclusive:e.exclusive,valueRef:t.valueOf(e.id)}})),(function(t){var e;return!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)})).sort((function(t,e){var o,r;return((null===(o=e.valueRef)||void 0===o?void 0:o.time)||0)-((null===(r=t.valueRef)||void 0===r?void 0:r.time)||0)})),o=e.length&&e[0];if(o&&e.forEach((function(t){t.id!==o.id&&(o.exclusive||t.exclusive)&&(t.valueRef.value=!1)})),this.props.max){var r=this.props.max,n=0;e.forEach((function(t){var e;!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)&&++n>r&&(t.valueRef.value=!1)}))}if(this.counterSlot){var i=(0,u.filter)(e,(function(t){var e;return!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)})).length;this.counterSlot.set(i)}if(this.concatenationSlot){var a=[],l="",c=0;if((0,u.each)(this.props.options,(function(e){var o,r=e.value||e.name||"";if(r&&!0===(null===(o=t.valueOf(e.id))||void 0===o?void 0:o.value))switch(t.props.formatSeparator){case"space":l+=(""===l?"":" ")+r;break;case"list":l+=(""===l?"":"\n")+r;break;case"bullets":l+=(""===l?"":"\n")+"- "+r;break;case"numbers":l+=(""===l?"":"\n")+"".concat(++c,". ").concat(r);break;case"conjunction":case"disjunction":a.push(r);break;case"custom":l+=(""===l?"":t.props.formatSeparatorCustom||"")+r;break;default:l+=(""===l?"":", ")+r}})),"conjunction"===this.props.formatSeparator||"disjunction"===this.props.formatSeparator)try{var s=new Intl.ListFormat(this.context.l10n.current||"en",{type:this.props.formatSeparator});l=s.format(a)}catch(t){l=u.Str.iterateToString(a,", ")}this.concatenationSlot.set(l)}},e.prototype.score=function(t){var e=this;this.scoreSlot&&(0,u.isNumberFinite)(t.score)&&this.scoreSlot.set((0,u.reduce)(this.props.options,(function(t,o){var r;return t+(!0===(null===(r=e.valueOf(o.id))||void 0===r?void 0:r.value)&&o.score||0)}),0))},e.prototype.optionSlot=function(t){var e=this;return this.valueOf(t.id,"dynamic",{confirm:!0,onChange:function(){e.transform(),e.score(t)},onContext:function(o,r){var n;e.scoreSlot&&(null===(n=r.contextualValueOf(e.scoreSlot))||void 0===n||n.set(!0===o.value?t.score||0:void 0))}})},e.prototype.isSelected=function(t){var e=this.optionSlot(t);return!0===(null==e?void 0:e.value)||!1},e.prototype.select=function(t,e){var o=this.optionSlot(t);return!!o&&(o.value=e,o.value)},e.prototype.toggle=function(t){var e=this.optionSlot(t);e&&(e.value=!e.value)},e.prototype.options=function(t){var e,o=this,r=0,n=this,i=(null===(e=this.props.options)||void 0===e?void 0:e.map((function(e){var i=o.optionSlot(e);return o.props.max&&!0===(null==i?void 0:i.value)&&r++,{id:e.id,name:t.markdownifyToString(e.name),label:t.markdownifyToJSX(e.name,!1),description:e.description&&t.markdownifyToJSX(e.description,!0)||void 0,value:i,score:e.score,exclusive:e.exclusive,get disabled(){return n.props.max&&r>=n.props.max&&!0!==(null==i?void 0:i.value)||!1}}})))||[];if(this.props.randomize&&i.length>1){if(!this.randomized||this.randomized.length!==i.length||(0,u.findFirst)(this.randomized,(function(t){var e;return(null===(e=i[t.index])||void 0===e?void 0:e.id)!==t.id}))){this.randomized=i.map((function(t,e){return{index:e,id:t.id}}));for(var a=this.randomized.length;--a;){var l=Math.floor(Math.random()*a),c=this.randomized[a];this.randomized[a]=this.randomized[l],this.randomized[l]=c}}return this.randomized.map((function(t){return i[t.index]}))}return this.randomized&&(this.randomized=void 0),i},e.prototype.validate=function(){var t=this;if(this.props.min||this.props.max){var e=(0,u.filter)(this.props.options,(function(e){var o;return!0===(null===(o=t.optionSlot(e))||void 0===o?void 0:o.value)})).length;if(this.props.min&&e<this.props.min||this.props.max&&e>this.props.max)return!1}return!this.props.required||!!(0,u.findFirst)(this.props.options,(function(e){var o;return!0===(null===(o=t.valueOf(e.id))||void 0===o?void 0:o.value)}))},i([u.validator],e.prototype,"validate",null),e}(u.NodeBlock);e.MultiSelect=a},226:function(t){t.exports=require("@tripetto/runner")}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,o),i.exports}var r={};!function(){var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0,o(716),o(514),o(924),o(502);var e=o(58);Object.defineProperty(t,"MultiSelect",{enumerable:!0,get:function(){return e.MultiSelect}})}(),module.exports=r}(); |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Multi-select Block 2.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
/*! Tripetto Multi-select Block 2.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("TripettoRunner")):"function"==typeof define&&define.amd?define("TripettoBlockMultiSelect",["TripettoRunner"],e):"object"==typeof exports?exports.TripettoBlockMultiSelect=e(require("TripettoRunner")):t.TripettoBlockMultiSelect=e(t.TripettoRunner)}(this,(function(t){return function(){"use strict";var e={924:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.CounterCondition=void 0;var u=o(294),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,u.isString)(e)&&t instanceof u.Slots.Number){var o=this.variableFor(e);return o&&o.hasValue?t.toValue(o.value):void 0}return(0,u.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var o=this.getValue(t.slot,this.props.to);return(0,u.isNumberFinite)(e)&&(0,u.isNumberFinite)(o)&&(t.hasValue&&t.value>=u.Num.min(e,o)&&t.value<=u.Num.max(e,o))===("between"===this.props.mode)}}return!1},i([u.condition],e.prototype,"verify",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":counter")})],e)}(u.ConditionBlock);e.CounterCondition=a},514:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.NoneCondition=void 0;var u=o(294),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.noneSelected=function(){var t=this,e=this.slots;return!e||!e.each((function(e){var o=t.valueOf(e);return o&&o.value||!1}))},i([u.condition],e.prototype,"noneSelected",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":none")})],e)}(u.ConditionBlock);e.NoneCondition=a},716:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.OptionCondition=void 0;var u=o(294),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isSelected=function(){var t=this.valueOf();return t&&t.value===this.props.selected||!1},i([u.condition],e.prototype,"isSelected",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-multi-select"})],e)}(u.ConditionBlock);e.OptionCondition=a},502:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var u=o(294),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,u.isString)(e)&&t instanceof u.Slots.Numeric){var o=this.variableFor(e);return o&&o.hasValue?t.toValue(o.value):void 0}return(0,u.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,u.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var o=this.getValue(t.slot,this.props.to);return(0,u.isNumberFinite)(e)&&(0,u.isNumberFinite)(o)&&(t.hasValue&&t.value>=u.Num.min(e,o)&&t.value<=u.Num.max(e,o))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([u.condition],e.prototype,"verify",null),e=i([(0,u.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-multi-select",":score")})],e)}(u.ConditionBlock);e.ScoreCondition=a},58:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,r){var n,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(u=(i<3?n(u):i>3?n(e,o,u):n(e,o))||u);return i>3&&u&&Object.defineProperty(e,o,u),u};Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSelect=void 0;var u=o(294),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.counterSlot=e.valueOf("counter","meta"),e.concatenationSlot=e.valueOf("concatenation","feature"),e.scoreSlot=e.valueOf("score","feature"),e}return n(e,t),Object.defineProperty(e.prototype,"required",{get:function(){return this.props.required||!1},enumerable:!1,configurable:!0}),e.prototype.transform=function(){var t=this,e=(0,u.filter)((0,u.map)(this.props.options,(function(e){return{id:e.id,label:e.value||e.name||"",exclusive:e.exclusive,valueRef:t.valueOf(e.id)}})),(function(t){var e;return!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)})).sort((function(t,e){var o,r;return((null===(o=e.valueRef)||void 0===o?void 0:o.time)||0)-((null===(r=t.valueRef)||void 0===r?void 0:r.time)||0)})),o=e.length&&e[0];if(o&&e.forEach((function(t){t.id!==o.id&&(o.exclusive||t.exclusive)&&(t.valueRef.value=!1)})),this.props.max){var r=this.props.max,n=0;e.forEach((function(t){var e;!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)&&++n>r&&(t.valueRef.value=!1)}))}if(this.counterSlot){var i=(0,u.filter)(e,(function(t){var e;return!0===(null===(e=t.valueRef)||void 0===e?void 0:e.value)})).length;this.counterSlot.set(i)}if(this.concatenationSlot){var a=[],l="",c=0;if((0,u.each)(this.props.options,(function(e){var o,r=e.value||e.name||"";if(r&&!0===(null===(o=t.valueOf(e.id))||void 0===o?void 0:o.value))switch(t.props.formatSeparator){case"space":l+=(""===l?"":" ")+r;break;case"list":l+=(""===l?"":"\n")+r;break;case"bullets":l+=(""===l?"":"\n")+"- "+r;break;case"numbers":l+=(""===l?"":"\n")+"".concat(++c,". ").concat(r);break;case"conjunction":case"disjunction":a.push(r);break;case"custom":l+=(""===l?"":t.props.formatSeparatorCustom||"")+r;break;default:l+=(""===l?"":", ")+r}})),"conjunction"===this.props.formatSeparator||"disjunction"===this.props.formatSeparator)try{var s=new Intl.ListFormat(this.context.l10n.current||"en",{type:this.props.formatSeparator});l=s.format(a)}catch(t){l=u.Str.iterateToString(a,", ")}this.concatenationSlot.set(l)}},e.prototype.score=function(t){var e=this;this.scoreSlot&&(0,u.isNumberFinite)(t.score)&&this.scoreSlot.set((0,u.reduce)(this.props.options,(function(t,o){var r;return t+(!0===(null===(r=e.valueOf(o.id))||void 0===r?void 0:r.value)&&o.score||0)}),0))},e.prototype.optionSlot=function(t){var e=this;return this.valueOf(t.id,"dynamic",{confirm:!0,onChange:function(){e.transform(),e.score(t)},onContext:function(o,r){var n;e.scoreSlot&&(null===(n=r.contextualValueOf(e.scoreSlot))||void 0===n||n.set(!0===o.value?t.score||0:void 0))}})},e.prototype.isSelected=function(t){var e=this.optionSlot(t);return!0===(null==e?void 0:e.value)||!1},e.prototype.select=function(t,e){var o=this.optionSlot(t);return!!o&&(o.value=e,o.value)},e.prototype.toggle=function(t){var e=this.optionSlot(t);e&&(e.value=!e.value)},e.prototype.options=function(t){var e,o=this,r=0,n=this,i=(null===(e=this.props.options)||void 0===e?void 0:e.map((function(e){var i=o.optionSlot(e);return o.props.max&&!0===(null==i?void 0:i.value)&&r++,{id:e.id,name:t.markdownifyToString(e.name),label:t.markdownifyToJSX(e.name,!1),description:e.description&&t.markdownifyToJSX(e.description,!0)||void 0,value:i,score:e.score,exclusive:e.exclusive,get disabled(){return n.props.max&&r>=n.props.max&&!0!==(null==i?void 0:i.value)||!1}}})))||[];if(this.props.randomize&&i.length>1){if(!this.randomized||this.randomized.length!==i.length||(0,u.findFirst)(this.randomized,(function(t){var e;return(null===(e=i[t.index])||void 0===e?void 0:e.id)!==t.id}))){this.randomized=i.map((function(t,e){return{index:e,id:t.id}}));for(var a=this.randomized.length;--a;){var l=Math.floor(Math.random()*a),c=this.randomized[a];this.randomized[a]=this.randomized[l],this.randomized[l]=c}}return this.randomized.map((function(t){return i[t.index]}))}return this.randomized&&(this.randomized=void 0),i},e.prototype.validate=function(){var t=this;if(this.props.min||this.props.max){var e=(0,u.filter)(this.props.options,(function(e){var o;return!0===(null===(o=t.optionSlot(e))||void 0===o?void 0:o.value)})).length;if(this.props.min&&e<this.props.min||this.props.max&&e>this.props.max)return!1}return!this.props.required||!!(0,u.findFirst)(this.props.options,(function(e){var o;return!0===(null===(o=t.valueOf(e.id))||void 0===o?void 0:o.value)}))},i([u.validator],e.prototype,"validate",null),e}(u.NodeBlock);e.MultiSelect=a},294:function(e){e.exports=t}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return e[t].call(i.exports,i,i.exports,r),i.exports}var n={};return function(){var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelect=void 0,r(716),r(514),r(924),r(502);var e=r(58);Object.defineProperty(t,"MultiSelect",{enumerable:!0,get:function(){return e.MultiSelect}})}(),n}()})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package