avo 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/javascript/js/controllers/search_controller.js +25 -10
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.js +1 -1
- data/public/avo-assets/avo.js.map +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ed006aa7c57368aa03156290f54f757484daff2434ad0f235fa1cdabd0489e4
|
4
|
+
data.tar.gz: 5596ead68c48c161977b477ad5b689be6228957b56f818d0a2ba015f3bf250be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68a9010fd5eec2c2c45527cc3bb46c751eefbde06894d4e8857f9d86c8417fdc13d835422479efd5361e16c677ecfa57a3ae0a375b4cd84598d5e88bd85dd2bd
|
7
|
+
data.tar.gz: e2adc97bfcac2b881d9780d60bdc323186362f76c3139f03b0282ac1275f64cba2555c46ad6617aab3fff886c12e1322debbd1e7b38cd107f082129a6f392900
|
data/Gemfile.lock
CHANGED
@@ -105,7 +105,7 @@ export default class extends Controller {
|
|
105
105
|
return `${data.header.toUpperCase()} ${data.help}`
|
106
106
|
},
|
107
107
|
item({ item, createElement }) {
|
108
|
-
|
108
|
+
const children = []
|
109
109
|
|
110
110
|
if (item._avatar) {
|
111
111
|
let classes
|
@@ -120,22 +120,37 @@ export default class extends Controller {
|
|
120
120
|
break
|
121
121
|
}
|
122
122
|
|
123
|
-
|
123
|
+
children.push(
|
124
|
+
createElement('img', {
|
125
|
+
src: item._avatar,
|
126
|
+
alt: item._label,
|
127
|
+
class: `flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${classes}`,
|
128
|
+
}),
|
129
|
+
)
|
124
130
|
}
|
125
|
-
element += `<div>${item._label}`
|
126
131
|
|
132
|
+
const labelChildren = [item._label]
|
127
133
|
if (item._description) {
|
128
|
-
|
134
|
+
labelChildren.push(
|
135
|
+
createElement(
|
136
|
+
'div',
|
137
|
+
{
|
138
|
+
class: 'aa-ItemDescription',
|
139
|
+
},
|
140
|
+
item._description,
|
141
|
+
),
|
142
|
+
)
|
129
143
|
}
|
130
144
|
|
131
|
-
|
145
|
+
children.push(createElement('div', null, labelChildren))
|
132
146
|
|
133
|
-
return createElement(
|
134
|
-
|
135
|
-
|
136
|
-
|
147
|
+
return createElement(
|
148
|
+
'div',
|
149
|
+
{
|
150
|
+
class: 'flex',
|
137
151
|
},
|
138
|
-
|
152
|
+
children,
|
153
|
+
)
|
139
154
|
},
|
140
155
|
noResults() {
|
141
156
|
return that.translationKeys.no_item_found.replace(
|
data/lib/avo/version.rb
CHANGED
data/public/avo-assets/avo.js
CHANGED
@@ -123,7 +123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
123
123
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M8e(r,e){if(!!r){if(typeof r=="string")return qI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qI(r,e)}}function I8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function P8e(r){if(Array.isArray(r))return qI(r)}function qI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Une(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(D8e(Bw({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Vne=te(()=>{Bd()});function L8e(r){return N8e(r)||F8e(r)||R8e(r)||q8e()}function q8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
124
124
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R8e(r,e){if(!!r){if(typeof r=="string")return RI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return RI(r,e)}}function F8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function N8e(r){if(Array.isArray(r))return RI(r)}function RI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function $ne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(L8e(Ane({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Yne=te(()=>{Bd()});function B8e(r){return W8e(r)||H8e(r)||z8e(r)||j8e()}function j8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
125
125
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8e(r,e){if(!!r){if(typeof r=="string")return FI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return FI(r,e)}}function H8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function W8e(r){if(Array.isArray(r))return FI(r)}function FI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Kne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(B8e(Dne({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Gne=te(()=>{Bd()});function U8e(r){return K8e(r)||Y8e(r)||$8e(r)||V8e()}function V8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
126
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8e(r,e){if(!!r){if(typeof r=="string")return NI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return NI(r,e)}}function Y8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function K8e(r){if(Array.isArray(r))return NI(r)}function NI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Xne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(U8e(Hw({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Qne=te(()=>{Bd()});var Zne=te(()=>{Vne();Yne();Gne();Qne()});function Jne(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Vw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Jne(Object(t),!0).forEach(function(n){G8e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Jne(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function G8e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function X8e(r,e){if(r==null)return{};var t=Q8e(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function Q8e(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function eie(r){var e,t=r.classNames,n=r.container,i=r.getEnvironmentProps,o=r.getFormProps,a=r.getInputProps,s=r.getItemProps,u=r.getLabelProps,f=r.getListProps,c=r.getPanelProps,h=r.getRootProps,p=r.panelContainer,m=r.panelPlacement,y=r.render,b=r.renderNoResults,k=r.renderer,x=r.detachedMediaQuery,S=r.components,E=X8e(r,["classNames","container","getEnvironmentProps","getFormProps","getInputProps","getItemProps","getLabelProps","getListProps","getPanelProps","getRootProps","panelContainer","panelPlacement","render","renderNoResults","renderer","detachedMediaQuery","components"]),C=hI(n);C.tagName;var D=typeof window<"u"?window:{},T=k??e$e,I={Highlight:Une(T),ReverseHighlight:$ne(T),ReverseSnippet:Kne(T),Snippet:Xne(T)};return{renderer:{classNames:Rre(Z8e,t??{}),container:C,getEnvironmentProps:i??function(q){var z=q.props;return z},getFormProps:o??function(q){var z=q.props;return z},getInputProps:a??function(q){var z=q.props;return z},getItemProps:s??function(q){var z=q.props;return z},getLabelProps:u??function(q){var z=q.props;return z},getListProps:f??function(q){var z=q.props;return z},getPanelProps:c??function(q){var z=q.props;return z},getRootProps:h??function(q){var z=q.props;return z},panelContainer:p?hI(p):document.body,panelPlacement:m??"input-wrapper-width",render:y??J8e,renderNoResults:b,renderer:T,detachedMediaQuery:x??getComputedStyle(D.document.documentElement).getPropertyValue("--aa-detached-media-query"),components:Vw(Vw({},I),S)},core:Vw(Vw({},E),{},{id:(e=E.id)!==null&&e!==void 0?e:kw(),environment:D})}}var Z8e,J8e,e$e,tie=te(()=>{Xu();wne();Zne();Fd();Z8e={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},J8e=function(e,t){var n=e.children;xne(n,t)},e$e={createElement:_I,Fragment:Nd}});function rie(r){var e=r.panelPlacement,t=r.container,n=r.form,i=r.environment,o=t.getBoundingClientRect(),a=o.top+o.height;switch(e){case"start":return{top:a,left:o.left};case"end":return{top:a,right:i.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:a,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":{var s=n.getBoundingClientRect();return{top:a,left:s.left,right:i.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"}}default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(e)," is not valid."))}}var nie=te(()=>{});function $w(){return $w=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},$w.apply(this,arguments)}function iie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Yw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?iie(Object(t),!0).forEach(function(n){t$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):iie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function t$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oie(r){var e=r.autocomplete,t=r.autocompleteScopeApi,n=r.dom,i=r.propGetters,o=r.state;gI(n.root,i.getRootProps(Yw({state:o,props:e.getRootProps({})},t))),gI(n.input,i.getInputProps(Yw({state:o,props:e.getInputProps({inputElement:n.input}),inputElement:n.input},t))),wo(n.label,{hidden:o.status==="stalled"}),wo(n.loadingIndicator,{hidden:o.status!=="stalled"}),wo(n.clearButton,{hidden:!o.query})}function aie(r,e){var t=e.autocomplete,n=e.autocompleteScopeApi,i=e.classNames,o=e.createElement,a=e.dom,s=e.Fragment,u=e.panelContainer,f=e.propGetters,c=e.state,h=e.components;if(!c.isOpen){u.contains(a.panel)&&u.removeChild(a.panel);return}!u.contains(a.panel)&&c.status!=="loading"&&u.appendChild(a.panel),a.panel.classList.toggle("aa-Panel--stalled",c.status==="stalled");var p=c.collections.map(function(b,k){var x=b.source,S=b.items;return o("section",{key:k,className:i.source,"data-autocomplete-source-id":x.sourceId},x.templates.header&&o("div",{className:i.sourceHeader},x.templates.header({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})),S.length===0&&x.templates.noResults&&c.query?o("div",{className:i.sourceNoResults},x.templates.noResults({components:h,createElement:o,Fragment:s,source:x,state:c})):o("ul",$w({className:i.list},f.getListProps(Yw({state:c,props:t.getListProps({})},n))),S.map(function(E){var C=t.getItemProps({item:E,source:x});return o("li",$w({key:C.id,className:i.item},f.getItemProps(Yw({state:c,props:C},n))),x.templates.item({components:h,createElement:o,Fragment:s,item:E,state:c}))})),x.templates.footer&&o("div",{className:i.sourceFooter},x.templates.footer({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})))}),m=o(s,null,o("div",{className:"aa-PanelLayout aa-Panel--scrollable"},p),o("div",{className:"aa-GradientBottom"})),y=p.reduce(function(b,k){return b[k.props["data-autocomplete-source-id"]]=k,b},{});r({children:m,state:c,sections:p,elements:y,createElement:o,Fragment:s,components:h},a.panel)}var sie=te(()=>{Fd()});function lie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Zu(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lie(Object(t),!0).forEach(function(n){uie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function uie(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function cie(r){var e=rne(),t=e.runEffect,n=e.cleanupEffects,i=e.runEffects,o=ine(),a=o.reactive,s=o.runReactives,u=wg(!1),f=wg(r),c=wg(void 0),h=a(function(){return eie(f.current)}),p=a(function(){return h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches}),m=a(function(){return yre(Zu(Zu({},h.value.core),{},{onStateChange:function(I){var q,z,Y;u.current=I.state.collections.some(function(X){return X.source.templates.noResults}),(q=c.current)===null||q===void 0||q.call(c,I),(z=(Y=h.value.core).onStateChange)===null||z===void 0||z.call(Y,I)},shouldPanelOpen:f.current.shouldPanelOpen||function(T){var I=T.state,q=Al(I)>0;if(!h.value.core.openOnFocus&&!I.query)return q;var z=Boolean(u.current||h.value.renderer.renderNoResults);return!q&&z||q}}))}),y=wg(Zu({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},h.value.core.initialState)),b={getEnvironmentProps:h.value.renderer.getEnvironmentProps,getFormProps:h.value.renderer.getFormProps,getInputProps:h.value.renderer.getInputProps,getItemProps:h.value.renderer.getItemProps,getLabelProps:h.value.renderer.getLabelProps,getListProps:h.value.renderer.getListProps,getPanelProps:h.value.renderer.getPanelProps,getRootProps:h.value.renderer.getRootProps},k={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh},x=a(function(){return ene({autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,isDetached:p.value,placeholder:h.value.core.placeholder,propGetters:b,state:y.current})});function S(){wo(x.value.panel,{style:p.value?{}:rie({panelPlacement:h.value.renderer.panelPlacement,container:x.value.root,form:x.value.form,environment:h.value.core.environment})})}function E(T){y.current=T;var I={autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,components:h.value.renderer.components,container:h.value.renderer.container,createElement:h.value.renderer.renderer.createElement,dom:x.value,Fragment:h.value.renderer.renderer.Fragment,panelContainer:p.value?x.value.detachedContainer:h.value.renderer.panelContainer,propGetters:b,state:y.current},q=!Al(T)&&!u.current&&h.value.renderer.renderNoResults||h.value.renderer.render;oie(I),aie(q,I)}t(function(){var T=m.value.getEnvironmentProps({formElement:x.value.form,panelElement:x.value.panel,inputElement:x.value.input});return wo(h.value.core.environment,T),function(){wo(h.value.core.environment,Object.keys(T).reduce(function(I,q){return Zu(Zu({},I),{},uie({},q,void 0))},{}))}}),t(function(){var T=p.value?h.value.core.environment.document.body:h.value.renderer.panelContainer,I=p.value?x.value.detachedOverlay:x.value.panel;return p.value&&y.current.isOpen&&x.value.openDetachedOverlay(),E(y.current),function(){T.contains(I)&&T.removeChild(I)}}),t(function(){var T=h.value.renderer.container;return T.appendChild(x.value.root),function(){T.removeChild(x.value.root)}}),t(function(){var T=oI(function(I){var q=I.state;E(q)},0);return c.current=function(I){var q=I.state,z=I.prevState;if(q.isOpen&&!z.isOpen&&S(),q.query!==z.query){var Y=document.querySelectorAll(".aa-Panel--scrollable");Y.forEach(function(X){X.scrollTop!==0&&(X.scrollTop=0)})}T({state:q})},function(){c.current=void 0}}),t(function(){var T=oI(function(){var I=p.value;p.value=h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches,I!==p.value?D({}):requestAnimationFrame(S)},20);return h.value.core.environment.addEventListener("resize",T),function(){h.value.core.environment.removeEventListener("resize",T)}}),t(function(){if(!p.value)return function(){};function T(z){x.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",z)}function I(z){T(z.matches)}var q=h.value.core.environment.matchMedia(getComputedStyle(h.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));return T(q.matches),q.addEventListener("change",I),function(){q.removeEventListener("change",I)}}),t(function(){return requestAnimationFrame(S),function(){}});function C(){n()}function D(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(),f.current=mI(h.value.renderer,h.value.core,{initialState:y.current},T),s(),i(),m.value.refresh().then(function(){E(y.current)})}return Zu(Zu({},k),{},{update:D,destroy:C})}var fie=te(()=>{Lre();Xu();tne();nne();one();tie();nie();sie();Fd()});var die,hie=te(()=>{die="1.0.0-alpha.46"});function pie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function mie(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pie(Object(t),!0).forEach(function(n){r$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function r$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var gie,vie=te(()=>{Bd();hie();gie=Ww(function(r){return Uw(mie(mie({},r),{},{userAgents:[{segment:"autocomplete-js",version:die}]}))})});var yie=te(()=>{});var Ext,bie=te(()=>{vie();Ext=gie({transformResponse:function(e){return e.hits}})});var xie=te(()=>{yie();bie()});var wie=te(()=>{});var _ie=te(()=>{});var Sie=te(()=>{});var kie=te(()=>{});var Eie=te(()=>{});var Cie=te(()=>{});var Aie=te(()=>{});var Tie=te(()=>{});var Die=te(()=>{});var Oie=te(()=>{});var Mie=te(()=>{});var Iie=te(()=>{});var Pie=te(()=>{});var Lie=te(()=>{wie();_ie();Sie();kie();Eie();Cie();Aie();Tie();Die();Oie();Mie();Iie();Pie()});var qie=te(()=>{fie();xie();Lie()});var Rie,Fie=te(()=>{Rie=(r,e)=>{let t;return(...n)=>(t&&clearTimeout(t),new Promise(i=>{t=setTimeout(()=>i(r(...n)),e)}))}});var Nie,Bie,Kw,jie=te(()=>{Nie=pr(fT());br();MT();qie();Bie=pr(zx());Fie();Kw=class extends ht{constructor(){super(...arguments);dt(this,"debouncedFetch",Rie(fetch,this.searchDebounce))}get dataset(){return this.autocompleteTarget.dataset}get searchDebounce(){return window.Avo.configuration.search_debounce}get translationKeys(){let r;try{r=JSON.parse(this.dataset.translationKeys)}catch(e){r={}}return r}get isBelongsToSearch(){return this.dataset.viaAssociation==="belongs_to"}get isGlobalSearch(){return this.dataset.searchResource==="global"}searchUrl(r){let e=(0,Bie.default)(),t={q:r},n=[window.Avo.configuration.root_path,"avo_api",this.dataset.searchResource,"search"];return this.isGlobalSearch&&(n=[window.Avo.configuration.root_path,"avo_api","search"]),this.isBelongsToSearch&&(t=Mc(Fs({},t),{via_association:this.dataset.viaAssociation})),e.segment(n).search(t).toString()}handleOnSelect({item:r}){this.isBelongsToSearch?(this.hiddenIdTarget.setAttribute("value",r._id),this.buttonTarget.setAttribute("value",r._label),document.querySelector(".aa-DetachedOverlay").remove(),this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")):Su.visit(r._url,{action:"advance"}),document.body.classList.remove("aa-Detached")}addSource(r,e){let t=this;return{sourceId:r,getItems:()=>e.results,onSelect:t.handleOnSelect.bind(t),templates:{header(){return`${e.header.toUpperCase()} ${e.help}`},item({item:n,createElement:i}){let o="";if(n._avatar){let a;switch(n._avatar_type){default:case"circle":a="rounded-full";break;case"rounded":a="rounded";break}o+=`<img src="${n._avatar}" alt="${n._label}" class="flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${a}" />`}return o+=`<div>${n._label}`,n._description&&(o+=`<div class="aa-ItemDescription">${n._description}</div>`),o+="</div>",i("div",{class:"flex",dangerouslySetInnerHTML:{__html:o}})},noResults(){return t.translationKeys.no_item_found.replace("%{item}",r)}}}}showSearchPanel(){this.autocompleteTarget.querySelector("button").click()}clearValue(){this.clearValueTargets.map(r=>r.setAttribute("value","")),this.clearButtonTarget.classList.add("hidden")}connect(){let r=this;this.buttonTarget.onclick=()=>this.showSearchPanel(),this.clearValueTargets.forEach(e=>{e.getAttribute("value")&&this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")}),this.isGlobalSearch&&Nie.bind(["command+k","ctrl+k"],()=>this.showSearchPanel()),cie({container:this.autocompleteTarget,placeholder:this.translationKeys.placeholder,translations:{detachedCancelButtonText:this.translationKeys.cancel_button},openOnFocus:!0,detachedMediaQuery:"",getSources:({query:e})=>{document.body.classList.add("search-loading");let t=r.searchUrl(e);return r.debouncedFetch(t).then(n=>(document.body.classList.remove("search-loading"),n.json())).then(n=>Object.keys(n).map(i=>r.addSource(i,n[i])))}}),this.buttonTarget.dataset.shouldBeDisabled!=="true"&&this.buttonTarget.removeAttribute("disabled")}};dt(Kw,"targets",["autocomplete","button","hiddenId","visibleLabel","clearValue","clearButton"])});var zie,Gw,Hie=te(()=>{br();zie=pr(zx()),Gw=class extends ht{get parentTurboFrame(){return this.context.scope.element.closest("turbo-frame")}onChange(r){if(!this.parentTurboFrame.src)return;let e=new zie.default(this.parentTurboFrame.src);e.search(Mc(Fs({},e.query(!0)),{range:r.currentTarget.value})),this.parentTurboFrame.src=e.toString(),this.parentTurboFrame.reload()}};dt(Gw,"targets",["select"])});var Xw,Wie=te(()=>{bd();Xw=class extends go{getFilterValue(){return this.selectorTarget.value}getFilterClass(){let{filterClass:r}=this.selectorTarget.dataset;return r}};dt(Xw,"targets",["selector"])});var $ie=V((Uie,Vie)=>{(function(r){typeof Uie=="object"&&typeof Vie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";var e=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;r.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return r.Pass;for(var a=o.listSelections(),s=[],u=0;u<a.length;u++){var f=a[u].head,c=o.getStateAfter(f.line),h=r.innerMode(o.getMode(),c);if(h.mode.name!=="markdown"){o.execCommand("newlineAndIndent");return}else c=h.state;var p=c.list!==!1,m=c.quote!==0,y=o.getLine(f.line),b=e.exec(y),k=/^\s*$/.test(y.slice(0,f.ch));if(!a[u].empty()||!p&&!m||!b||k){o.execCommand("newlineAndIndent");return}if(t.test(y)){var x=m&&/>\s*$/.test(y),S=!/>\s*$/.test(y);(x||S)&&o.replaceRange("",{line:f.line,ch:0},{line:f.line,ch:f.ch+1}),s[u]=`
|
126
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8e(r,e){if(!!r){if(typeof r=="string")return NI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return NI(r,e)}}function Y8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function K8e(r){if(Array.isArray(r))return NI(r)}function NI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Xne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(U8e(Hw({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Qne=te(()=>{Bd()});var Zne=te(()=>{Vne();Yne();Gne();Qne()});function Jne(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Vw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Jne(Object(t),!0).forEach(function(n){G8e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Jne(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function G8e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function X8e(r,e){if(r==null)return{};var t=Q8e(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function Q8e(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function eie(r){var e,t=r.classNames,n=r.container,i=r.getEnvironmentProps,o=r.getFormProps,a=r.getInputProps,s=r.getItemProps,u=r.getLabelProps,f=r.getListProps,c=r.getPanelProps,h=r.getRootProps,p=r.panelContainer,m=r.panelPlacement,y=r.render,b=r.renderNoResults,k=r.renderer,x=r.detachedMediaQuery,S=r.components,E=X8e(r,["classNames","container","getEnvironmentProps","getFormProps","getInputProps","getItemProps","getLabelProps","getListProps","getPanelProps","getRootProps","panelContainer","panelPlacement","render","renderNoResults","renderer","detachedMediaQuery","components"]),C=hI(n);C.tagName;var D=typeof window<"u"?window:{},T=k??e$e,I={Highlight:Une(T),ReverseHighlight:$ne(T),ReverseSnippet:Kne(T),Snippet:Xne(T)};return{renderer:{classNames:Rre(Z8e,t??{}),container:C,getEnvironmentProps:i??function(q){var z=q.props;return z},getFormProps:o??function(q){var z=q.props;return z},getInputProps:a??function(q){var z=q.props;return z},getItemProps:s??function(q){var z=q.props;return z},getLabelProps:u??function(q){var z=q.props;return z},getListProps:f??function(q){var z=q.props;return z},getPanelProps:c??function(q){var z=q.props;return z},getRootProps:h??function(q){var z=q.props;return z},panelContainer:p?hI(p):document.body,panelPlacement:m??"input-wrapper-width",render:y??J8e,renderNoResults:b,renderer:T,detachedMediaQuery:x??getComputedStyle(D.document.documentElement).getPropertyValue("--aa-detached-media-query"),components:Vw(Vw({},I),S)},core:Vw(Vw({},E),{},{id:(e=E.id)!==null&&e!==void 0?e:kw(),environment:D})}}var Z8e,J8e,e$e,tie=te(()=>{Xu();wne();Zne();Fd();Z8e={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},J8e=function(e,t){var n=e.children;xne(n,t)},e$e={createElement:_I,Fragment:Nd}});function rie(r){var e=r.panelPlacement,t=r.container,n=r.form,i=r.environment,o=t.getBoundingClientRect(),a=o.top+o.height;switch(e){case"start":return{top:a,left:o.left};case"end":return{top:a,right:i.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:a,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":{var s=n.getBoundingClientRect();return{top:a,left:s.left,right:i.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"}}default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(e)," is not valid."))}}var nie=te(()=>{});function $w(){return $w=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},$w.apply(this,arguments)}function iie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Yw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?iie(Object(t),!0).forEach(function(n){t$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):iie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function t$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function oie(r){var e=r.autocomplete,t=r.autocompleteScopeApi,n=r.dom,i=r.propGetters,o=r.state;gI(n.root,i.getRootProps(Yw({state:o,props:e.getRootProps({})},t))),gI(n.input,i.getInputProps(Yw({state:o,props:e.getInputProps({inputElement:n.input}),inputElement:n.input},t))),wo(n.label,{hidden:o.status==="stalled"}),wo(n.loadingIndicator,{hidden:o.status!=="stalled"}),wo(n.clearButton,{hidden:!o.query})}function aie(r,e){var t=e.autocomplete,n=e.autocompleteScopeApi,i=e.classNames,o=e.createElement,a=e.dom,s=e.Fragment,u=e.panelContainer,f=e.propGetters,c=e.state,h=e.components;if(!c.isOpen){u.contains(a.panel)&&u.removeChild(a.panel);return}!u.contains(a.panel)&&c.status!=="loading"&&u.appendChild(a.panel),a.panel.classList.toggle("aa-Panel--stalled",c.status==="stalled");var p=c.collections.map(function(b,k){var x=b.source,S=b.items;return o("section",{key:k,className:i.source,"data-autocomplete-source-id":x.sourceId},x.templates.header&&o("div",{className:i.sourceHeader},x.templates.header({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})),S.length===0&&x.templates.noResults&&c.query?o("div",{className:i.sourceNoResults},x.templates.noResults({components:h,createElement:o,Fragment:s,source:x,state:c})):o("ul",$w({className:i.list},f.getListProps(Yw({state:c,props:t.getListProps({})},n))),S.map(function(E){var C=t.getItemProps({item:E,source:x});return o("li",$w({key:C.id,className:i.item},f.getItemProps(Yw({state:c,props:C},n))),x.templates.item({components:h,createElement:o,Fragment:s,item:E,state:c}))})),x.templates.footer&&o("div",{className:i.sourceFooter},x.templates.footer({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})))}),m=o(s,null,o("div",{className:"aa-PanelLayout aa-Panel--scrollable"},p),o("div",{className:"aa-GradientBottom"})),y=p.reduce(function(b,k){return b[k.props["data-autocomplete-source-id"]]=k,b},{});r({children:m,state:c,sections:p,elements:y,createElement:o,Fragment:s,components:h},a.panel)}var sie=te(()=>{Fd()});function lie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Zu(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lie(Object(t),!0).forEach(function(n){uie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function uie(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function cie(r){var e=rne(),t=e.runEffect,n=e.cleanupEffects,i=e.runEffects,o=ine(),a=o.reactive,s=o.runReactives,u=wg(!1),f=wg(r),c=wg(void 0),h=a(function(){return eie(f.current)}),p=a(function(){return h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches}),m=a(function(){return yre(Zu(Zu({},h.value.core),{},{onStateChange:function(I){var q,z,Y;u.current=I.state.collections.some(function(X){return X.source.templates.noResults}),(q=c.current)===null||q===void 0||q.call(c,I),(z=(Y=h.value.core).onStateChange)===null||z===void 0||z.call(Y,I)},shouldPanelOpen:f.current.shouldPanelOpen||function(T){var I=T.state,q=Al(I)>0;if(!h.value.core.openOnFocus&&!I.query)return q;var z=Boolean(u.current||h.value.renderer.renderNoResults);return!q&&z||q}}))}),y=wg(Zu({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},h.value.core.initialState)),b={getEnvironmentProps:h.value.renderer.getEnvironmentProps,getFormProps:h.value.renderer.getFormProps,getInputProps:h.value.renderer.getInputProps,getItemProps:h.value.renderer.getItemProps,getLabelProps:h.value.renderer.getLabelProps,getListProps:h.value.renderer.getListProps,getPanelProps:h.value.renderer.getPanelProps,getRootProps:h.value.renderer.getRootProps},k={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh},x=a(function(){return ene({autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,isDetached:p.value,placeholder:h.value.core.placeholder,propGetters:b,state:y.current})});function S(){wo(x.value.panel,{style:p.value?{}:rie({panelPlacement:h.value.renderer.panelPlacement,container:x.value.root,form:x.value.form,environment:h.value.core.environment})})}function E(T){y.current=T;var I={autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,components:h.value.renderer.components,container:h.value.renderer.container,createElement:h.value.renderer.renderer.createElement,dom:x.value,Fragment:h.value.renderer.renderer.Fragment,panelContainer:p.value?x.value.detachedContainer:h.value.renderer.panelContainer,propGetters:b,state:y.current},q=!Al(T)&&!u.current&&h.value.renderer.renderNoResults||h.value.renderer.render;oie(I),aie(q,I)}t(function(){var T=m.value.getEnvironmentProps({formElement:x.value.form,panelElement:x.value.panel,inputElement:x.value.input});return wo(h.value.core.environment,T),function(){wo(h.value.core.environment,Object.keys(T).reduce(function(I,q){return Zu(Zu({},I),{},uie({},q,void 0))},{}))}}),t(function(){var T=p.value?h.value.core.environment.document.body:h.value.renderer.panelContainer,I=p.value?x.value.detachedOverlay:x.value.panel;return p.value&&y.current.isOpen&&x.value.openDetachedOverlay(),E(y.current),function(){T.contains(I)&&T.removeChild(I)}}),t(function(){var T=h.value.renderer.container;return T.appendChild(x.value.root),function(){T.removeChild(x.value.root)}}),t(function(){var T=oI(function(I){var q=I.state;E(q)},0);return c.current=function(I){var q=I.state,z=I.prevState;if(q.isOpen&&!z.isOpen&&S(),q.query!==z.query){var Y=document.querySelectorAll(".aa-Panel--scrollable");Y.forEach(function(X){X.scrollTop!==0&&(X.scrollTop=0)})}T({state:q})},function(){c.current=void 0}}),t(function(){var T=oI(function(){var I=p.value;p.value=h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches,I!==p.value?D({}):requestAnimationFrame(S)},20);return h.value.core.environment.addEventListener("resize",T),function(){h.value.core.environment.removeEventListener("resize",T)}}),t(function(){if(!p.value)return function(){};function T(z){x.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",z)}function I(z){T(z.matches)}var q=h.value.core.environment.matchMedia(getComputedStyle(h.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));return T(q.matches),q.addEventListener("change",I),function(){q.removeEventListener("change",I)}}),t(function(){return requestAnimationFrame(S),function(){}});function C(){n()}function D(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(),f.current=mI(h.value.renderer,h.value.core,{initialState:y.current},T),s(),i(),m.value.refresh().then(function(){E(y.current)})}return Zu(Zu({},k),{},{update:D,destroy:C})}var fie=te(()=>{Lre();Xu();tne();nne();one();tie();nie();sie();Fd()});var die,hie=te(()=>{die="1.0.0-alpha.46"});function pie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function mie(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pie(Object(t),!0).forEach(function(n){r$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function r$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var gie,vie=te(()=>{Bd();hie();gie=Ww(function(r){return Uw(mie(mie({},r),{},{userAgents:[{segment:"autocomplete-js",version:die}]}))})});var yie=te(()=>{});var Ext,bie=te(()=>{vie();Ext=gie({transformResponse:function(e){return e.hits}})});var xie=te(()=>{yie();bie()});var wie=te(()=>{});var _ie=te(()=>{});var Sie=te(()=>{});var kie=te(()=>{});var Eie=te(()=>{});var Cie=te(()=>{});var Aie=te(()=>{});var Tie=te(()=>{});var Die=te(()=>{});var Oie=te(()=>{});var Mie=te(()=>{});var Iie=te(()=>{});var Pie=te(()=>{});var Lie=te(()=>{wie();_ie();Sie();kie();Eie();Cie();Aie();Tie();Die();Oie();Mie();Iie();Pie()});var qie=te(()=>{fie();xie();Lie()});var Rie,Fie=te(()=>{Rie=(r,e)=>{let t;return(...n)=>(t&&clearTimeout(t),new Promise(i=>{t=setTimeout(()=>i(r(...n)),e)}))}});var Nie,Bie,Kw,jie=te(()=>{Nie=pr(fT());br();MT();qie();Bie=pr(zx());Fie();Kw=class extends ht{constructor(){super(...arguments);dt(this,"debouncedFetch",Rie(fetch,this.searchDebounce))}get dataset(){return this.autocompleteTarget.dataset}get searchDebounce(){return window.Avo.configuration.search_debounce}get translationKeys(){let r;try{r=JSON.parse(this.dataset.translationKeys)}catch(e){r={}}return r}get isBelongsToSearch(){return this.dataset.viaAssociation==="belongs_to"}get isGlobalSearch(){return this.dataset.searchResource==="global"}searchUrl(r){let e=(0,Bie.default)(),t={q:r},n=[window.Avo.configuration.root_path,"avo_api",this.dataset.searchResource,"search"];return this.isGlobalSearch&&(n=[window.Avo.configuration.root_path,"avo_api","search"]),this.isBelongsToSearch&&(t=Mc(Fs({},t),{via_association:this.dataset.viaAssociation})),e.segment(n).search(t).toString()}handleOnSelect({item:r}){this.isBelongsToSearch?(this.hiddenIdTarget.setAttribute("value",r._id),this.buttonTarget.setAttribute("value",r._label),document.querySelector(".aa-DetachedOverlay").remove(),this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")):Su.visit(r._url,{action:"advance"}),document.body.classList.remove("aa-Detached")}addSource(r,e){let t=this;return{sourceId:r,getItems:()=>e.results,onSelect:t.handleOnSelect.bind(t),templates:{header(){return`${e.header.toUpperCase()} ${e.help}`},item({item:n,createElement:i}){let o=[];if(n._avatar){let s;switch(n._avatar_type){default:case"circle":s="rounded-full";break;case"rounded":s="rounded";break}o.push(i("img",{src:n._avatar,alt:n._label,class:`flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${s}`}))}let a=[n._label];return n._description&&a.push(i("div",{class:"aa-ItemDescription"},n._description)),o.push(i("div",null,a)),i("div",{class:"flex"},o)},noResults(){return t.translationKeys.no_item_found.replace("%{item}",r)}}}}showSearchPanel(){this.autocompleteTarget.querySelector("button").click()}clearValue(){this.clearValueTargets.map(r=>r.setAttribute("value","")),this.clearButtonTarget.classList.add("hidden")}connect(){let r=this;this.buttonTarget.onclick=()=>this.showSearchPanel(),this.clearValueTargets.forEach(e=>{e.getAttribute("value")&&this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")}),this.isGlobalSearch&&Nie.bind(["command+k","ctrl+k"],()=>this.showSearchPanel()),cie({container:this.autocompleteTarget,placeholder:this.translationKeys.placeholder,translations:{detachedCancelButtonText:this.translationKeys.cancel_button},openOnFocus:!0,detachedMediaQuery:"",getSources:({query:e})=>{document.body.classList.add("search-loading");let t=r.searchUrl(e);return r.debouncedFetch(t).then(n=>(document.body.classList.remove("search-loading"),n.json())).then(n=>Object.keys(n).map(i=>r.addSource(i,n[i])))}}),this.buttonTarget.dataset.shouldBeDisabled!=="true"&&this.buttonTarget.removeAttribute("disabled")}};dt(Kw,"targets",["autocomplete","button","hiddenId","visibleLabel","clearValue","clearButton"])});var zie,Gw,Hie=te(()=>{br();zie=pr(zx()),Gw=class extends ht{get parentTurboFrame(){return this.context.scope.element.closest("turbo-frame")}onChange(r){if(!this.parentTurboFrame.src)return;let e=new zie.default(this.parentTurboFrame.src);e.search(Mc(Fs({},e.query(!0)),{range:r.currentTarget.value})),this.parentTurboFrame.src=e.toString(),this.parentTurboFrame.reload()}};dt(Gw,"targets",["select"])});var Xw,Wie=te(()=>{bd();Xw=class extends go{getFilterValue(){return this.selectorTarget.value}getFilterClass(){let{filterClass:r}=this.selectorTarget.dataset;return r}};dt(Xw,"targets",["selector"])});var $ie=V((Uie,Vie)=>{(function(r){typeof Uie=="object"&&typeof Vie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";var e=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;r.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return r.Pass;for(var a=o.listSelections(),s=[],u=0;u<a.length;u++){var f=a[u].head,c=o.getStateAfter(f.line),h=r.innerMode(o.getMode(),c);if(h.mode.name!=="markdown"){o.execCommand("newlineAndIndent");return}else c=h.state;var p=c.list!==!1,m=c.quote!==0,y=o.getLine(f.line),b=e.exec(y),k=/^\s*$/.test(y.slice(0,f.ch));if(!a[u].empty()||!p&&!m||!b||k){o.execCommand("newlineAndIndent");return}if(t.test(y)){var x=m&&/>\s*$/.test(y),S=!/>\s*$/.test(y);(x||S)&&o.replaceRange("",{line:f.line,ch:0},{line:f.line,ch:f.ch+1}),s[u]=`
|
127
127
|
`}else{var E=b[1],C=b[5],D=!(n.test(b[2])||b[2].indexOf(">")>=0),T=D?parseInt(b[3],10)+1+b[4]:b[2].replace("x"," ");s[u]=`
|
128
128
|
`+E+T+C,D&&i(o,f)}}o.replaceSelections(s)};function i(o,a){var s=a.line,u=0,f=0,c=e.exec(o.getLine(s)),h=c[1];do{u+=1;var p=s+u,m=o.getLine(p),y=e.exec(m);if(y){var b=y[1],k=parseInt(c[3],10)+u-f,x=parseInt(y[3],10),S=x;if(h===b&&!isNaN(x))k===x&&(S=x+1),k>x&&(S=k+1),o.replaceRange(m.replace(e,b+S+y[4]+y[5]),{line:p,ch:0},{line:p,ch:m.length});else{if(h.length>b.length||h.length<b.length&&u===1)return;f+=1}}}while(y)}})});var Kie=V(()=>{var Yie=tr();Yie.commands.tabAndIndentMarkdownList=function(r){var e=r.listSelections(),t=e[0].head,n=r.getStateAfter(t.line),i=n.list!==!1;if(i){r.execCommand("indentMore");return}if(r.options.indentWithTabs)r.execCommand("insertTab");else{var o=Array(r.options.tabSize+1).join(" ");r.replaceSelection(o)}};Yie.commands.shiftTabAndUnindentMarkdownList=function(r){var e=r.listSelections(),t=e[0].head,n=r.getStateAfter(t.line),i=n.list!==!1;if(i){r.execCommand("indentLess");return}if(r.options.indentWithTabs)r.execCommand("insertTab");else{var o=Array(r.options.tabSize+1).join(" ");r.replaceSelection(o)}}});var Qie=V((Gie,Xie)=>{(function(r){typeof Gie=="object"&&typeof Xie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";r.defineOption("fullScreen",!1,function(n,i,o){o==r.Init&&(o=!1),!o!=!i&&(i?e(n):t(n))});function e(n){var i=n.getWrapperElement();n.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:i.style.width,height:i.style.height},i.style.width="",i.style.height="auto",i.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",n.refresh()}function t(n){var i=n.getWrapperElement();i.className=i.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=n.state.fullScreenRestore;i.style.width=o.width,i.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),n.refresh()}})});var eoe=V((Zie,Jie)=>{(function(r){typeof Zie=="object"&&typeof Jie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){r.defineOption("placeholder","",function(s,u,f){var c=f&&f!=r.Init;if(u&&!c)s.on("blur",i),s.on("change",o),s.on("swapDoc",o),r.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){n(s)}),o(s);else if(!u&&c){s.off("blur",i),s.off("change",o),s.off("swapDoc",o),r.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var h=s.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}u&&!s.hasFocus()&&i(s)});function e(s){s.state.placeholder&&(s.state.placeholder.parentNode.removeChild(s.state.placeholder),s.state.placeholder=null)}function t(s){e(s);var u=s.state.placeholder=document.createElement("pre");u.style.cssText="height: 0; overflow: visible",u.style.direction=s.getOption("direction"),u.className="CodeMirror-placeholder CodeMirror-line-like";var f=s.getOption("placeholder");typeof f=="string"&&(f=document.createTextNode(f)),u.appendChild(f),s.display.lineSpace.insertBefore(u,s.display.lineSpace.firstChild)}function n(s){setTimeout(function(){var u=!1;if(s.lineCount()==1){var f=s.getInputField();u=f.nodeName=="TEXTAREA"?!s.getLine(0).length:!/[^\u200b]/.test(f.querySelector(".CodeMirror-line").textContent)}u?t(s):e(s)},20)}function i(s){a(s)&&t(s)}function o(s){var u=s.getWrapperElement(),f=a(s);u.className=u.className.replace(" CodeMirror-empty","")+(f?" CodeMirror-empty":""),f?t(s):e(s)}function a(s){return s.lineCount()===1&&s.getLine(0)===""}})});var noe=V((toe,roe)=>{(function(r){typeof toe=="object"&&typeof roe=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";r.defineOption("styleSelectedText",!1,function(c,h,p){var m=p&&p!=r.Init;h&&!m?(c.state.markedSelection=[],c.state.markedSelectionStyle=typeof h=="string"?h:"CodeMirror-selectedtext",u(c),c.on("cursorActivity",e),c.on("change",t)):!h&&m&&(c.off("cursorActivity",e),c.off("change",t),s(c),c.state.markedSelection=c.state.markedSelectionStyle=null)});function e(c){c.state.markedSelection&&c.operation(function(){f(c)})}function t(c){c.state.markedSelection&&c.state.markedSelection.length&&c.operation(function(){s(c)})}var n=8,i=r.Pos,o=r.cmpPos;function a(c,h,p,m){if(o(h,p)!=0)for(var y=c.state.markedSelection,b=c.state.markedSelectionStyle,k=h.line;;){var x=k==h.line?h:i(k,0),S=k+n,E=S>=p.line,C=E?p:i(S,0),D=c.markText(x,C,{className:b});if(m==null?y.push(D):y.splice(m++,0,D),E)break;k=S}}function s(c){for(var h=c.state.markedSelection,p=0;p<h.length;++p)h[p].clear();h.length=0}function u(c){s(c);for(var h=c.listSelections(),p=0;p<h.length;p++)a(c,h[p].from(),h[p].to())}function f(c){if(!c.somethingSelected())return s(c);if(c.listSelections().length>1)return u(c);var h=c.getCursor("start"),p=c.getCursor("end"),m=c.state.markedSelection;if(!m.length)return a(c,h,p);var y=m[0].find(),b=m[m.length-1].find();if(!y||!b||p.line-h.line<=n||o(h,b.to)>=0||o(p,y.from)<=0)return u(c);for(;o(h,y.from)>0;)m.shift().clear(),y=m[0].find();for(o(h,y.from)<0&&(y.to.line-h.line<n?(m.shift().clear(),a(c,h,y.to,0)):a(c,h,y.from,0));o(p,b.to)<0;)m.pop().clear(),b=m[m.length-1].find();o(p,b.to)>0&&(p.line-b.from.line<n?(m.pop().clear(),a(c,b.from,p)):a(c,b.to,p))}})});var aoe=V((ioe,ooe)=>{(function(r){typeof ioe=="object"&&typeof ooe=="object"?r(tr(),Ux(),Vx()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)})(function(r){"use strict";var e=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;r.defineMode("gfm",function(t,n){var i=0;function o(f){return f.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(f){return{code:f.code,codeBlock:f.codeBlock,ateSpace:f.ateSpace}},token:function(f,c){if(c.combineTokens=null,c.codeBlock)return f.match(/^```+/)?(c.codeBlock=!1,null):(f.skipToEnd(),null);if(f.sol()&&(c.code=!1),f.sol()&&f.match(/^```+/))return f.skipToEnd(),c.codeBlock=!0,null;if(f.peek()==="`"){f.next();var h=f.pos;f.eatWhile("`");var p=1+f.pos-h;return c.code?p===i&&(c.code=!1):(i=p,c.code=!0),null}else if(c.code)return f.next(),null;if(f.eatSpace())return c.ateSpace=!0,null;if((f.sol()||c.ateSpace)&&(c.ateSpace=!1,n.gitHubSpice!==!1)){if(f.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return c.combineTokens=!0,"link";if(f.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return c.combineTokens=!0,"link"}return f.match(e)&&f.string.slice(f.start-2,f.start)!="]("&&(f.start==0||/\W/.test(f.string.charAt(f.start-1)))?(c.combineTokens=!0,"link"):(f.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var u in n)s[u]=n[u];return s.name="markdown",r.overlayMode(r.getMode(t,s),a)},"markdown"),r.defineMIME("text/x-gfm","gfm")})});var soe=V(()=>{});var loe=V((cwt,jI)=>{var BI;(function(){"use strict";BI=function(r,e,t,n){n=n||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=n.flags||{},this.memoized={},this.loaded=!1;var i=this,o,a,s,u,f;r&&(i.dictionary=r,e&&t?m():typeof window<"u"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(n.dictionaryPath?o=n.dictionaryPath:o="typo/dictionaries",e||c(chrome.extension.getURL(o+"/"+r+"/"+r+".aff"),h),t||c(chrome.extension.getURL(o+"/"+r+"/"+r+".dic"),p)):(n.dictionaryPath?o=n.dictionaryPath:typeof __dirname<"u"?o=__dirname+"/dictionaries":o="./dictionaries",e||c(o+"/"+r+"/"+r+".aff",h),t||c(o+"/"+r+"/"+r+".dic",p)));function c(y,b){var k=i._readFile(y,null,n.asyncLoad);n.asyncLoad?k.then(function(x){b(x)}):b(k)}function h(y){e=y,t&&m()}function p(y){t=y,e&&m()}function m(){for(i.rules=i._parseAFF(e),i.compoundRuleCodes={},a=0,u=i.compoundRules.length;a<u;a++){var y=i.compoundRules[a];for(s=0,f=y.length;s<f;s++)i.compoundRuleCodes[y[s]]=[]}"ONLYINCOMPOUND"in i.flags&&(i.compoundRuleCodes[i.flags.ONLYINCOMPOUND]=[]),i.dictionaryTable=i._parseDIC(t);for(a in i.compoundRuleCodes)i.compoundRuleCodes[a].length===0&&delete i.compoundRuleCodes[a];for(a=0,u=i.compoundRules.length;a<u;a++){var b=i.compoundRules[a],k="";for(s=0,f=b.length;s<f;s++){var x=b[s];x in i.compoundRuleCodes?k+="("+i.compoundRuleCodes[x].join("|")+")":k+=x}i.compoundRules[a]=new RegExp(k,"i")}i.loaded=!0,n.asyncLoad&&n.loadedCallback&&n.loadedCallback(i)}return this},BI.prototype={load:function(r){for(var e in r)r.hasOwnProperty(e)&&(this[e]=r[e]);return this},_readFile:function(r,e,t){if(e=e||"utf8",typeof XMLHttpRequest<"u"){var n,i=new XMLHttpRequest;return i.open("GET",r,t),t&&(n=new Promise(function(a,s){i.onload=function(){i.status===200?a(i.responseText):s(i.statusText)},i.onerror=function(){s(i.statusText)}})),i.overrideMimeType&&i.overrideMimeType("text/plain; charset="+e),i.send(null),t?n:i.responseText}else if(typeof BL<"u"){var o=soe();try{if(o.existsSync(r))return o.readFileSync(r,e);console.log("Path "+r+" does not exist.")}catch(a){return console.log(a),""}}},_parseAFF:function(r){var e={},t,n,i,o,a,s,u,f;r=this._removeAffixComments(r);var c=r.split(/\r?\n/);for(a=0,u=c.length;a<u;a++){t=c[a];var h=t.split(/\s+/),p=h[0];if(p=="PFX"||p=="SFX"){var m=h[1],y=h[2];i=parseInt(h[3],10);var b=[];for(s=a+1,f=a+1+i;s<f;s++){n=c[s],o=n.split(/\s+/);var k=o[2],x=o[3].split("/"),S=x[0];S==="0"&&(S="");var E=this.parseRuleCodes(x[1]),C=o[4],D={};D.add=S,E.length>0&&(D.continuationClasses=E),C!=="."&&(p==="SFX"?D.match=new RegExp(C+"$"):D.match=new RegExp("^"+C)),k!="0"&&(p==="SFX"?D.remove=new RegExp(k+"$"):D.remove=k),b.push(D)}e[m]={type:p,combineable:y=="Y",entries:b},a+=i}else if(p==="COMPOUNDRULE"){for(i=parseInt(h[1],10),s=a+1,f=a+1+i;s<f;s++)t=c[s],o=t.split(/\s+/),this.compoundRules.push(o[1]);a+=i}else p==="REP"?(o=t.split(/\s+/),o.length===3&&this.replacementTable.push([o[1],o[2]])):this.flags[p]=h[1]}return e},_removeAffixComments:function(r){return r=r.replace(/^\s*#.*$/mg,""),r=r.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),r=r.replace(/\n{2,}/g,`
|
129
129
|
`),r=r.replace(/^\s\s*/,"").replace(/\s\s*$/,""),r},_parseDIC:function(r){r=this._removeDicComments(r);var e=r.split(/\r?\n/),t={};function n(z,Y){t.hasOwnProperty(z)||(t[z]=null),Y.length>0&&(t[z]===null&&(t[z]=[]),t[z].push(Y))}for(var i=1,o=e.length;i<o;i++){var a=e[i];if(!!a){var s=a.split("/",2),u=s[0];if(s.length>1){var f=this.parseRuleCodes(s[1]);(!("NEEDAFFIX"in this.flags)||f.indexOf(this.flags.NEEDAFFIX)==-1)&&n(u,f);for(var c=0,h=f.length;c<h;c++){var p=f[c],m=this.rules[p];if(m)for(var y=this._applyRule(u,m),b=0,k=y.length;b<k;b++){var x=y[b];if(n(x,[]),m.combineable)for(var S=c+1;S<h;S++){var E=f[S],C=this.rules[E];if(C&&C.combineable&&m.type!=C.type)for(var D=this._applyRule(x,C),T=0,I=D.length;T<I;T++){var q=D[T];n(q,[])}}}p in this.compoundRuleCodes&&this.compoundRuleCodes[p].push(u)}}else n(u.trim(),[])}}return t},_removeDicComments:function(r){return r=r.replace(/^\t.*$/mg,""),r},parseRuleCodes:function(r){if(r)if("FLAG"in this.flags){if(this.flags.FLAG==="long"){for(var e=[],t=0,n=r.length;t<n;t+=2)e.push(r.substr(t,2));return e}else if(this.flags.FLAG==="num")return r.split(",")}else return r.split("");else return[]},_applyRule:function(r,e){for(var t=e.entries,n=[],i=0,o=t.length;i<o;i++){var a=t[i];if(!a.match||r.match(a.match)){var s=r;if(a.remove&&(s=s.replace(a.remove,"")),e.type==="SFX"?s=s+a.add:s=a.add+s,n.push(s),"continuationClasses"in a)for(var u=0,f=a.continuationClasses.length;u<f;u++){var c=this.rules[a.continuationClasses[u]];c&&(n=n.concat(this._applyRule(s,c)))}}}return n},check:function(r){if(!this.loaded)throw"Dictionary not loaded.";var e=r.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(e))return!0;if(e.toUpperCase()===e){var t=e[0]+e.substring(1).toLowerCase();if(this.hasFlag(t,"KEEPCASE"))return!1;if(this.checkExact(t)||this.checkExact(e.toLowerCase()))return!0}var n=e[0].toLowerCase()+e.substring(1);if(n!==e){if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}return!1},checkExact:function(r){if(!this.loaded)throw"Dictionary not loaded.";var e=this.dictionaryTable[r],t,n;if(typeof e>"u"){if("COMPOUNDMIN"in this.flags&&r.length>=this.flags.COMPOUNDMIN){for(t=0,n=this.compoundRules.length;t<n;t++)if(r.match(this.compoundRules[t]))return!0}}else{if(e===null)return!0;if(typeof e=="object"){for(t=0,n=e.length;t<n;t++)if(!this.hasFlag(r,"ONLYINCOMPOUND",e[t]))return!0}}return!1},hasFlag:function(r,e,t){if(!this.loaded)throw"Dictionary not loaded.";return!!(e in this.flags&&(typeof t>"u"&&(t=Array.prototype.concat.apply([],this.dictionaryTable[r])),t&&t.indexOf(this.flags[e])!==-1))},alphabet:"",suggest:function(r,e){if(!this.loaded)throw"Dictionary not loaded.";if(e=e||5,this.memoized.hasOwnProperty(r)){var t=this.memoized[r].limit;if(e<=t||this.memoized[r].suggestions.length<t)return this.memoized[r].suggestions.slice(0,e)}if(this.check(r))return[];for(var n=0,i=this.replacementTable.length;n<i;n++){var o=this.replacementTable[n];if(r.indexOf(o[0])!==-1){var a=r.replace(o[0],o[1]);if(this.check(a))return[a]}}var s=this;s.alphabet="abcdefghijklmnopqrstuvwxyz";function u(c,h){var p={},m,y,b,k,x,S,E=s.alphabet.length;if(typeof c=="string"){var C=c;c={},c[C]=!0}for(var C in c)for(m=0,k=C.length+1;m<k;m++){var D=[C.substring(0,m),C.substring(m)];if(D[1]&&(S=D[0]+D[1].substring(1),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)),D[1].length>1&&D[1][1]!==D[1][0]&&(S=D[0]+D[1][1]+D[1][0]+D[1].substring(2),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)),D[1]){var T=D[1].substring(0,1).toUpperCase()===D[1].substring(0,1)?"uppercase":"lowercase";for(y=0;y<E;y++){var I=s.alphabet[y];T==="uppercase"&&(I=I.toUpperCase()),I!=D[1].substring(0,1)&&(S=D[0]+I+D[1].substring(1),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1))}}if(D[1])for(y=0;y<E;y++){var T=D[0].substring(-1).toUpperCase()===D[0].substring(-1)&&D[1].substring(0,1).toUpperCase()===D[1].substring(0,1)?"uppercase":"lowercase",I=s.alphabet[y];T==="uppercase"&&(I=I.toUpperCase()),S=D[0]+I+D[1],(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)}}return p}function f(c){var h=u(c),p=u(h,!0),m=p;for(var y in h)!s.check(y)||(y in m?m[y]+=h[y]:m[y]=h[y]);var b,k,x=[];for(b in m)m.hasOwnProperty(b)&&x.push([b,m[b]]);function S(T,I){var q=T[1],z=I[1];return q<z?-1:q>z?1:I[0].localeCompare(T[0])}x.sort(S).reverse();var E=[],C="lowercase";c.toUpperCase()===c?C="uppercase":c.substr(0,1).toUpperCase()+c.substr(1).toLowerCase()===c&&(C="capitalized");var D=e;for(b=0;b<Math.min(D,x.length);b++)C==="uppercase"?x[b][0]=x[b][0].toUpperCase():C==="capitalized"&&(x[b][0]=x[b][0].substr(0,1).toUpperCase()+x[b][0].substr(1)),!s.hasFlag(x[b][0],"NOSUGGEST")&&E.indexOf(x[b][0])==-1?E.push(x[b][0]):D++;return E}return this.memoized[r]={suggestions:f(r),limit:e},this.memoized[r].suggestions}}})();typeof jI<"u"&&(jI.exports=BI)});var foe=V((fwt,coe)=>{"use strict";var uoe=loe();function Cr(r){if(r=r||{},typeof r.codeMirrorInstance!="function"||typeof r.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),r.codeMirrorInstance.defineMode("spell-checker",function(e){if(!Cr.aff_loading){Cr.aff_loading=!0;var t=new XMLHttpRequest;t.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),t.onload=function(){t.readyState===4&&t.status===200&&(Cr.aff_data=t.responseText,Cr.num_loaded++,Cr.num_loaded==2&&(Cr.typo=new uoe("en_US",Cr.aff_data,Cr.dic_data,{platform:"any"})))},t.send(null)}if(!Cr.dic_loading){Cr.dic_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),n.onload=function(){n.readyState===4&&n.status===200&&(Cr.dic_data=n.responseText,Cr.num_loaded++,Cr.num_loaded==2&&(Cr.typo=new uoe("en_US",Cr.aff_data,Cr.dic_data,{platform:"any"})))},n.send(null)}var i='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',o={token:function(s){var u=s.peek(),f="";if(i.includes(u))return s.next(),null;for(;(u=s.peek())!=null&&!i.includes(u);)f+=u,s.next();return Cr.typo&&!Cr.typo.check(f)?"spell-error":null}},a=r.codeMirrorInstance.getMode(e,e.backdrop||"text/plain");return r.codeMirrorInstance.overlayMode(a,o,!0)})}Cr.num_loaded=0;Cr.aff_loading=!1;Cr.dic_loading=!1;Cr.aff_data="";Cr.dic_data="";Cr.typo;coe.exports=Cr});var _oe=V(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});function doe(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function n$e(r,e,t){return e&&doe(r.prototype,e),t&&doe(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function i$e(r,e){if(!!r){if(typeof r=="string")return hoe(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hoe(r,e)}}function hoe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Ag(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=i$e(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|