@limetech/lime-crm-building-blocks 1.120.0 → 1.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/{_MapCache-De1Fwe0H.js → _MapCache-DHOVMBKi.js} +341 -3
  3. package/dist/cjs/{_getTag-CdUodI28.js → _Uint8Array-CXHKqIsu.js} +375 -30
  4. package/dist/cjs/{_baseIsEqual-BtwicGmu.js → _baseIsEqual-Ba8g_ag_.js} +11 -13
  5. package/dist/cjs/{_defineProperty-eImBwVFM.js → _defineProperty-Bl_qu8Vn.js} +2 -2
  6. package/dist/cjs/{get-BRGtX379.js → get-D1lIKhWp.js} +6 -7
  7. package/dist/cjs/{isSymbol-D8S28StA.js → isSymbol-BJj6FNl6.js} +2 -2
  8. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -4
  9. package/dist/cjs/limebb-info-tile.cjs.entry.js +134 -135
  10. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +5 -7
  11. package/dist/cjs/limebb-locale-picker.cjs.entry.js +18 -20
  12. package/dist/cjs/limebb-object-chip.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +3 -3
  14. package/dist/cjs/limebb-property-selector.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-text-editor.cjs.entry.js +23 -25
  16. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +2 -2
  17. package/dist/cjs/{limetype-TVwQ2eby.js → limetype-C7_hrzhN.js} +46 -0
  18. package/dist/collection/components/info-tile/info-tile.js +30 -67
  19. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +3 -3
  20. package/dist/collection/components/text-editor/text-editor.js +1 -1
  21. package/dist/collection/components/trend-indicator/trend-indicator.js +2 -2
  22. package/dist/collection/util/explorer-link.js +68 -0
  23. package/dist/collection/util/find-filter.js +16 -0
  24. package/dist/collection/util/limetype.js +45 -0
  25. package/dist/collection/util/localize-record.js +21 -0
  26. package/dist/components/_MapCache.js +1 -1
  27. package/dist/components/_Uint8Array.js +1 -1
  28. package/dist/components/_baseIsEqual.js +1 -1
  29. package/dist/components/_defineProperty.js +1 -1
  30. package/dist/components/get.js +1 -1
  31. package/dist/components/isSymbol.js +1 -1
  32. package/dist/components/limebb-info-tile.js +1 -1
  33. package/dist/components/limebb-locale-picker.js +1 -1
  34. package/dist/components/limebb-text-editor.js +1 -1
  35. package/dist/components/limebb-trend-indicator.js +1 -1
  36. package/dist/components/limetype-field.js +1 -1
  37. package/dist/components/limetype.js +1 -1
  38. package/dist/components/percentage-visualizer.js +1 -1
  39. package/dist/esm/{_MapCache-C_kVhYUl.js → _MapCache-BgAfMcRA.js} +329 -2
  40. package/dist/esm/{_getTag-DZlkp9mJ.js → _Uint8Array-CUI8uY-p.js} +351 -11
  41. package/dist/esm/{_baseIsEqual-DB13O4pD.js → _baseIsEqual-C-Mrg4RA.js} +2 -4
  42. package/dist/esm/{_defineProperty-DSmG08hO.js → _defineProperty-DZ483KPn.js} +1 -1
  43. package/dist/esm/{get-Bo260bSC.js → get-Cq4rshNg.js} +2 -3
  44. package/dist/esm/{isSymbol-Ci8cASb6.js → isSymbol-_IkM6xCs.js} +1 -1
  45. package/dist/esm/limebb-component-config.entry.js +3 -4
  46. package/dist/esm/limebb-info-tile.entry.js +135 -136
  47. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +4 -6
  48. package/dist/esm/limebb-locale-picker.entry.js +6 -8
  49. package/dist/esm/limebb-object-chip.entry.js +1 -1
  50. package/dist/esm/limebb-percentage-visualizer.entry.js +3 -3
  51. package/dist/esm/limebb-property-selector.entry.js +1 -1
  52. package/dist/esm/limebb-text-editor.entry.js +5 -7
  53. package/dist/esm/limebb-trend-indicator.entry.js +2 -2
  54. package/dist/esm/{limetype-BCEsb4WT.js → limetype-C4AY5lRw.js} +46 -1
  55. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  56. package/dist/lime-crm-building-blocks/p--IuhN2yx.js +1 -0
  57. package/dist/lime-crm-building-blocks/{p-c663afd2.entry.js → p-0cac0e56.entry.js} +1 -1
  58. package/dist/lime-crm-building-blocks/{p-5f1a4341.entry.js → p-34ad8e75.entry.js} +1 -1
  59. package/dist/lime-crm-building-blocks/p-37bab931.entry.js +1 -0
  60. package/dist/lime-crm-building-blocks/p-4163a0c0.entry.js +1 -0
  61. package/dist/lime-crm-building-blocks/p-49edd4fe.entry.js +1 -0
  62. package/dist/lime-crm-building-blocks/p-6PYziigk.js +1 -0
  63. package/dist/lime-crm-building-blocks/p-7a983aca.entry.js +1 -0
  64. package/dist/lime-crm-building-blocks/p-9019ca6f.entry.js +1 -0
  65. package/dist/lime-crm-building-blocks/p-BgAfMcRA.js +1 -0
  66. package/dist/lime-crm-building-blocks/p-BsH0YW6Z.js +1 -0
  67. package/dist/lime-crm-building-blocks/p-CKEnwX6j.js +1 -0
  68. package/dist/lime-crm-building-blocks/p-Ceen0vzd.js +1 -0
  69. package/dist/lime-crm-building-blocks/p-CtcTT7BK.js +1 -0
  70. package/dist/lime-crm-building-blocks/p-aa9b7af3.entry.js +1 -0
  71. package/dist/lime-crm-building-blocks/p-f397b288.entry.js +1 -0
  72. package/dist/types/components/info-tile/info-tile.d.ts +0 -3
  73. package/dist/types/util/explorer-link.d.ts +52 -0
  74. package/dist/types/util/find-filter.d.ts +13 -0
  75. package/dist/types/util/limetype.d.ts +35 -0
  76. package/dist/types/util/localize-record.d.ts +17 -0
  77. package/package.json +2 -2
  78. package/dist/cjs/_Map-BlpAtLvq.js +0 -342
  79. package/dist/cjs/_Uint8Array-C_lvn5HO.js +0 -352
  80. package/dist/components/_Map.js +0 -1
  81. package/dist/components/_getTag.js +0 -1
  82. package/dist/esm/_Map-ByjZfyP_.js +0 -330
  83. package/dist/esm/_Uint8Array-DVXPnoWk.js +0 -345
  84. package/dist/lime-crm-building-blocks/p-25700afb.entry.js +0 -1
  85. package/dist/lime-crm-building-blocks/p-3622d9b7.entry.js +0 -1
  86. package/dist/lime-crm-building-blocks/p-44347a69.entry.js +0 -1
  87. package/dist/lime-crm-building-blocks/p-60a09d6b.entry.js +0 -1
  88. package/dist/lime-crm-building-blocks/p-7cbec456.entry.js +0 -1
  89. package/dist/lime-crm-building-blocks/p-B8RiYkLS.js +0 -1
  90. package/dist/lime-crm-building-blocks/p-BJ8HvfgI.js +0 -1
  91. package/dist/lime-crm-building-blocks/p-BoVsXNfL.js +0 -1
  92. package/dist/lime-crm-building-blocks/p-ByjZfyP_.js +0 -1
  93. package/dist/lime-crm-building-blocks/p-CQ-z_HTt.js +0 -1
  94. package/dist/lime-crm-building-blocks/p-V3xfp9dg.js +0 -1
  95. package/dist/lime-crm-building-blocks/p-e2a6b9d2.entry.js +0 -1
  96. package/dist/lime-crm-building-blocks/p-e70a5298.entry.js +0 -1
  97. package/dist/lime-crm-building-blocks/p-mljVfXwO.js +0 -1
  98. package/dist/lime-crm-building-blocks/p-wbuFLk-j.js +0 -1
  99. package/dist/lime-crm-building-blocks/p-yc--7_7T.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-BIwHMk6j.js";import{n as r,Z as n,Q as o,j as a}from"./p-B3U_Lxk4.js";import{A as h,a as c,b as u,E as l,T as d}from"./p-CwMJvF_Z.js";import{U as f,S as v,g as m}from"./p-B8RiYkLS.js";import{d as p}from"./p-V3xfp9dg.js";import{e as b}from"./p-yc--7_7T.js";import{o as g,d as j,g as y,f as w,n as O,a as k}from"./p-wbuFLk-j.js";import{d as x,S,i as C,a as I,r as T}from"./p-ByjZfyP_.js";import{c as F}from"./p-C2JP2nLw.js";import{h as A,a as _,b as E}from"./p-BoVsXNfL.js";import{i as M}from"./p-CkTg5UPD.js";import{i as P}from"./p-CQ-z_HTt.js";var L=/\s/,N=/^\s+/;var $=/^[-+]0x[0-9a-f]+$/i,D=/^0b[01]+$/i,U=/^0o[0-7]+$/i,B=parseInt;function R(t){if("number"==typeof t)return t;if(P(t))return NaN;if(x(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=x(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&L.test(t.charAt(i)););return i}(e)+1).replace(N,""):e;var s=D.test(t);return s||U.test(t)?B(t.slice(2),s?2:8):$.test(t)?NaN:+t}var z=Object.create,G=function(){function t(){}return function(i){if(!x(i))return{};if(z)return z(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),Q=Object.prototype.hasOwnProperty;var H=g(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var V=Object.prototype.hasOwnProperty;function W(t){var i=new t.constructor(t.byteLength);return new f(i).set(new f(t)),i}var Z=/\w*$/,q=S?S.prototype:void 0,J=q?q.valueOf:void 0;var K=O&&O.isMap,X=K?w(K):function(t){return C(t)&&"[object Map]"==y(t)},Y=O&&O.isSet,tt=Y?w(Y):function(t){return C(t)&&"[object Set]"==y(t)},it="[object Arguments]",et="[object Function]",st="[object Object]",rt={};function nt(t,i,e,s,r,n){var o;if(void 0!==o)return o;if(!x(t))return t;var a=I(t);if(a)o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&V.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t);else{var h=y(t),c=h==et||"[object GeneratorFunction]"==h;if(k(t))return t.slice();if(h==st||h==it||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||j(t)?{}:G(H(t))}(t);else{if(!rt[h])return r?t:{};o=function(t,i){var e,s,r,n,o=t.constructor;switch(i){case"[object ArrayBuffer]":return W(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return n=W((r=t).buffer),new r.constructor(n,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var i=W(t.buffer);return new t.constructor(i,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(s=new(e=t).constructor(e.source,Z.exec(e))).lastIndex=e.lastIndex,s;case"[object Symbol]":return J?Object(J.call(t)):{}}}(t,h)}}n||(n=new v);var u=n.get(t);if(u)return u;n.set(t,o),tt(t)?t.forEach((function(s){o.add(nt(s,i,e,0,t,n))})):X(t)&&t.forEach((function(s,r){o.set(r,nt(s,i,e,0,t,n))}));var l=a?void 0:m(t);return function(t,i){for(var e=-1,s=null==t?0:t.length;++e<s&&!1!==i(t[e],e););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,i,e){var s=t[i];Q.call(t,i)&&b(s,e)&&(void 0!==e||i in t)||function(t,i,e){"__proto__"==i&&p?p(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}(t,i,e)}(o,r,nt(s,i,e,0,t,n))})),o}rt[it]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object DataView]"]=rt["[object Boolean]"]=rt["[object Date]"]=rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Map]"]=rt["[object Number]"]=rt[st]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object Symbol]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Error]"]=rt[et]=rt["[object WeakMap]"]=!1;var ot=function(){return T.Date.now()},at=Math.max,ht=Math.min;class ct{get limeObjectService(){return this.platform.get(r.LimeObjectRepository)}get queryService(){return this.platform.get(r.Query)}get viewFactoryRegistry(){return this.platform.get(r.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e){this.platform=t,this.context=i,this.searchableLimetypes=e,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!_(t,"user")&&A(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=E(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:n.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[s]:{}};const r=this.createGroupCount(t.objects,e.name);return{[s]:r}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[s]:{}}}}createGroupCount(t,i){const e={};for(const s of t){const{_id:t,[i]:r}=s;e[t]=r.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(M)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const s=i(e,this.context),r=this.getGroupCountComponent(e);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),s=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],r=E(e,"user");if(void 0!==s&&r)return{name:"limebb-mention-group-counter",props:{count:s,limetype:r.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class ut{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(o.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class lt{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),s=null==e?void 0:e.href;return s&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(s):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ut(t.fileContent,this.http);await e.initialize();const s=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===s.progress&&(s.state="uploading"),s.progress=t,100===t&&(s.state="finalizing")};const r=await e.upload();return s.fileId=r.id,s.filename=r.filename,s.extension=r.extension,s.contentType=r.contentType,s.size=r.size,s.state="done",s.href=null===(i=r._links)||void 0===i?void 0:i.contents.href,s}get http(){return this.platform.get(r.Http)}}const dt=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change"),this.metadataChange=i(this,"metadataChange"),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,h,l,d].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[c]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[d]:this.handleEnterOrTabKey,[h]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const s=((t,i,e)=>(i+(t===h?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,e+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),s=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(s)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger||(null==e?void 0:e.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=F(),this.debouncedSearchFn=function(t,i,e){var s,r,n,o,a,h,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(i){var e=s,n=r;return s=r=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-h;return void 0===h||e>=i||e<0||l&&t-c>=n}function m(){var t=ot();if(v(t))return p(t);a=setTimeout(m,function(t){var e=i-(t-h);return l?ht(e,n-(t-c)):e}(t))}function p(t){return a=void 0,d&&s?f(t):(s=r=void 0,o)}function b(){var t=ot(),e=v(t);if(s=arguments,r=this,h=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(m,i),u?f(t):o}(h);if(l)return clearTimeout(a),a=setTimeout(m,i),f(h)}return void 0===a&&(a=setTimeout(m,i)),o}return i=R(i)||0,x(e)&&(u=!!e.leading,n=(l="maxWait"in e)?at(R(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,s=h=r=a=void 0},b.flush=function(){return void 0===a?o:p(ot())},b}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,s;if(this.draftIdentifier){const r=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(s=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==s?s:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,r,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new lt(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new ct(this.platform,this.context,this.searchableLimetypes),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"b6f068be2046b26d182b50020ae74d4f220b465d",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const s=nt(t,5);return Object.assign(Object.assign({},s),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);r&&r!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,r):!r&&n&&(null===(s=this.userDataService)||void 0===s||s.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(r.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return s(this)}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}};(function(t,i,e,s){var r,n=arguments.length,o=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(i,e,o):r(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)})([a({map:[function(t){return Object.values(t).filter((t=>_(t,"user")||A(t,"user")))}]})],dt.prototype,"searchableLimetypes",void 0),dt.style=":host(limebb-text-editor){display:block;width:100%;min-width:5rem;min-height:5rem;height:100%;max-height:var(--text-editor-max-height, calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)) - 4rem))}";export{dt as limebb_text_editor}
@@ -1 +0,0 @@
1
- import{r as o,h as r,H as t}from"./p-BIwHMk6j.js";import{n as e}from"./p-B3U_Lxk4.js";import{g as a,n as i}from"./p-Cg1DC15C.js";const s=class{constructor(t){o(this,t),this.suffix="%",this.reducePresence=!0,this.locale="en",this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(o){this.numValue=this.parseValue(o)}componentWillLoad(){try{this.locale=this.platform.get(e.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(o){console.error(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}render(){return r(t,{key:"c1d0e3cbfbfe0da3d821817b3986773ea7af13de",class:this.getContainerClassList()},r("limel-notched-outline",{key:"d32675f77f9a6bc700d566acc9f59b3575f03ff1",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},r("div",{key:"558eac3631f2daced6d6e4f246912140ceb65268",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),r("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:r("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=`${this.value} - ${this.formerValue>0?this.formerValue:"("+this.formerValue+")"} = ${this.calculateGrowth()} ${this.suffix} `,t=this.calculatePercentage();return r("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:t+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return r("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=a(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){if(0===this.formerValue)return null;const o=((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2);return Number.parseFloat(o)}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(i(this.unifyMinusSign(o),this.locale)):o}formatValue(o,r){const t=`${this.numberFormat.format(o)} ${r}`;return o>0?"+"+t:this.convertToUnicodeMinus(t)}getArrowIcon(){return r("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}';export{s as limebb_trend_indicator}
@@ -1 +0,0 @@
1
- import{r as t,h as e,g as i}from"./p-BIwHMk6j.js";import{n as r,r as o,b as s,j as n,Z as l,X as a}from"./p-B3U_Lxk4.js";import{i as h,a as u,b as c,c as f,g as d,d as v,e as p}from"./p-wbuFLk-j.js";import{a as g}from"./p-ByjZfyP_.js";var b=Object.prototype.hasOwnProperty;class m{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:o,value:s,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const l={widgetType:"info-tile",limetype:t,filterId:e};return i&&(l.filterName=i),l.aggregateOperator=r,o&&(l.propertyName=o),void 0!==s&&(l.value=s),n&&(l.label=n),{data:l,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class w{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class y{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class j{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class x{constructor(t){this.locale=t}format(t,e){var i,r;const o=new Intl.NumberFormat(this.locale,e.options),s=o.formatToParts(t);let n="",l="",a="";for(const t of s)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?a+=t.value:l+=t.value;return l||(l=o.format(t),n="",a=""),{prefix:n,value:l,suffix:a}}}class O{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:o}=this.getRelativeTime(t),s=i.formatToParts(r,o);let n="",l="",a="";for(const t of s)"literal"!==t.type||l?"literal"===t.type&&l?a+=t.value:l+=t.value:n+=t.value;return l||(l=n||a,n="",a=""),{prefix:n,value:l,suffix:a}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),o=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of o){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class I{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new x(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new j(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new O(this.locale):new y(this.locale)}}var k=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const F=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),o=this.getFormattedValue(),s={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==o?void 0:o.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==o?void 0:o.suffix)||void 0===i?void 0:i.trim())||this.suffix},n=Object.assign(Object.assign({},s),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),l=Object.assign(Object.assign({},s),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==o?void 0:o.value.trim()});return e("limel-info-tile",Object.assign({key:"163c9aa74b485cb28ae56735a9643dd7e6579465",class:{error:!r||this.error}},!r||this.error?n:l))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new y(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(h(t)&&(g(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||f(t)))return!t.length;var e=d(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(v(t))return!p(t).length;for(var i in t)if(b.call(t,i))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){if(!t)return{href:"#"};const e=["explorer",t.limetype,t.id].join("/"),i=this.getRelationPropertyName(this.limetypes[t.limetype]),r=this.buildContextAwareFilter(t.filter,i);return r?{href:`${e}?filter=${encodeURIComponent(JSON.stringify(r))}`}:{href:e}}buildContextAwareFilter(t,e){if(!e)return t;const i={key:e,op:a.EQUALS,exp:this.context.id};return t?{op:a.AND,exp:[i,t]}:{relationFilter:i}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new I(this.language).createFormatter(this.format,t)}getRelationPropertyName(t){var e,i,r;if(t&&this.context.limetype&&this.context.id){if(this.propertyName){const t=this.limetypes[this.context.limetype],r=null===(i=null===(e=null==t?void 0:t.getProperty(this.propertyName))||void 0===e?void 0:e.relation)||void 0===i?void 0:i.getBackreference();if(r)return r.name}return null===(r=Object.values(t.properties).find((t=>{var e;return(null===(e=t.relation)||void 0===e?void 0:e.getLimetype().name)===this.context.limetype})))||void 0===r?void 0:r.name}}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new w(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new m((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?this.getLocalizedString(t.name):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.host)}get host(){return i(this)}static get watchers(){return{filterId:[{watchFilterId:0}],propertyName:[{watchPropertyName:0}],aggregateOperator:[{watchAggregateOperator:0}]}}};k([o({})],F.prototype,"config",void 0),k([s()],F.prototype,"filters",void 0),k([n()],F.prototype,"limetypes",void 0),F.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{F as limebb_info_tile}
@@ -1 +0,0 @@
1
- import{h as t,r as o,c as e}from"./p-BIwHMk6j.js";import{n as i}from"./p-B3U_Lxk4.js";import{g as n}from"./p-BJ8HvfgI.js";import"./p-ByjZfyP_.js";import"./p-CQ-z_HTt.js";import"./p-yc--7_7T.js";const r=(o,e)=>t(o.name,Object.assign({class:o.class},function(t){let o={};return t.props&&(o=Object.assign({},t.props)),Object.assign({context:t.context,platform:t.platform},o)}(o),{key:o.key}),e),s=class{constructor(t){o(this,t),this.change=e(this,"change"),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,e;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(e=this.commandbus.getAll().find((o=>o.id===t)))||void 0===e?void 0:e.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,e){return"formInfo"!==e}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,e;const i=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],r=n(null===(e=this.formInfo)||void 0===e?void 0:e.rootValue,i),s=this.findConfigComponent(r);if(s&&customElements.get(s.name))return s}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let o=[];return this.configComponent&&(o=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),t("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},t("limel-button-group",{slot:"actions",value:o,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return t("limel-code-editor",{value:JSON.stringify(this.value,null,"\t"),language:"json",readonly:this.readonly,lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeEditorChange})}renderConfigComponent(){var o,e;return t(r,{class:"config-component",platform:this.platform,context:this.context,name:null===(o=this.configComponent)||void 0===o?void 0:o.name,props:Object.assign(Object.assign({},null===(e=this.configComponent)||void 0===e?void 0:e.props),{value:this.value,required:this.required,readonly:this.readonly,disabled:this.disabled,label:this.label,helperText:this.helperText,formInfo:this.formInfo})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(i.WebComponentRegistry)}get commandbus(){return this.platform.get(i.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}};s.style=":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}";export{s as limebb_component_config}
@@ -1 +0,0 @@
1
- import{r as e,h as r,H as a}from"./p-BIwHMk6j.js";import{n as l}from"./p-B3U_Lxk4.js";import{g as t,n as o}from"./p-Cg1DC15C.js";const i=1e-4,s=class{constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.locale="en",this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(e){this.numValue=this.parseValue(e)}componentWillLoad(){try{this.locale=this.platform.get(l.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(e){console.error(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"e3ff49b03b4703e06dbe85edc26421d95ed3974d",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"308a71d2427118515f5a7bfbb3dbe20a7b310461",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"80bdd6e8423cc62ba4298d1f3af48cc77e662e72",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=t(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,i)*(100-a):e/Math.max(Math.abs(this.rangeMin),i)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(o(this.unifyMinusSign(e),this.locale)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=this.numberFormat.format(r);return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{s as limebb_percentage_visualizer}
@@ -1 +0,0 @@
1
- import{L as r,M as t}from"./p-yc--7_7T.js";import{a as n,M as i,r as a}from"./p-ByjZfyP_.js";import{c as s,a as u,b as e,e as f,i as o}from"./p-wbuFLk-j.js";var c=/^(?:0|[1-9]\d*)$/;function h(r,t){var n=typeof r;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&c.test(r))&&r>-1&&r%1==0&&r<t}var v=Object.prototype.hasOwnProperty;function b(r){return o(r)?function(r){var t=n(r),i=!t&&s(r),a=!t&&!i&&u(r),f=!t&&!i&&!a&&e(r),o=t||i||a||f,c=o?function(r,t){for(var n=-1,i=Array(r);++n<r;)i[n]=t(n);return i}(r.length,String):[],b=c.length;for(var j in r)!v.call(r,j)||o&&("length"==j||a&&("offset"==j||"parent"==j)||f&&("buffer"==j||"byteLength"==j||"byteOffset"==j)||h(j,b))||c.push(j);return c}(r):f(r)}function j(r,t){for(var n=-1,i=t.length,a=r.length;++n<i;)r[a+n]=t[n];return r}function p(t){var n=this.__data__=new r(t);this.size=n.size}p.prototype.clear=function(){this.__data__=new r,this.size=0},p.prototype.delete=function(r){var t=this.__data__,n=t.delete(r);return this.size=t.size,n},p.prototype.get=function(r){return this.__data__.get(r)},p.prototype.has=function(r){return this.__data__.has(r)},p.prototype.set=function(n,a){var s=this.__data__;if(s instanceof r){var u=s.__data__;if(!i||u.length<199)return u.push([n,a]),this.size=++s.size,this;s=this.__data__=new t(u)}return s.set(n,a),this.size=s.size,this};var l=Object.prototype.propertyIsEnumerable,m=Object.getOwnPropertySymbols,y=m?function(r){return null==r?[]:(r=Object(r),function(t){for(var n=-1,i=null==t?0:t.length,a=0,s=[];++n<i;){var u=t[n];l.call(r,u)&&(s[a++]=u)}return s}(m(r)))}:function(){return[]};function O(r){return function(r,t,i){var a=b(r);return n(r)?a:j(a,i(r))}(r,0,y)}var g=a.Uint8Array;export{p as S,g as U,j as a,O as g,h as i,b as k}
@@ -1 +0,0 @@
1
- import{a as r,S as n}from"./p-ByjZfyP_.js";import{i as t}from"./p-CQ-z_HTt.js";import{M as u}from"./p-yc--7_7T.js";function o(r,n){for(var t=-1,u=null==r?0:r.length,o=Array(u);++t<u;)o[t]=n(r[t],t,r);return o}var i=n?n.prototype:void 0,f=i?i.toString:void 0;function e(n){if("string"==typeof n)return n;if(r(n))return o(n,e)+"";if(t(n))return f?f.call(n):"";var u=n+"";return"0"==u&&1/n==-1/0?"-0":u}var a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;function s(n,u){if(r(n))return!1;var o=typeof n;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=n&&!t(n))||c.test(n)||!a.test(n)||null!=u&&n in Object(u)}function v(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var t=function(){var u=arguments,o=n?n.apply(this,u):u[0],i=t.cache;if(i.has(o))return i.get(o);var f=r.apply(this,u);return t.cache=i.set(o,f)||i,f};return t.cache=new(v.Cache||u),t}v.Cache=u;var l,p,y,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,b=(l=function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(d,(function(r,t,u,o){n.push(u?o.replace(m,"$1"):t||r)})),n},p=v(l,(function(r){return 500===y.size&&y.clear(),r})),y=p.cache,p);function g(r){return null==r?"":e(r)}function j(n,t){return r(n)?n:s(n,t)?[n]:b(g(n))}function w(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function h(r,n){for(var t=0,u=(n=j(n,r)).length;null!=r&&t<u;)r=r[w(n[t++])];return t&&t==u?r:void 0}function T(r,n,t){var u=null==r?void 0:h(r,n);return void 0===u?t:u}export{w as a,h as b,j as c,o as d,T as g,s as i,g as t}
@@ -1 +0,0 @@
1
- import{i as n,a as r}from"./p-B3U_Lxk4.js";function o(n){var r;return(o=(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${o})`:o;var o}function t(n){var r;return{name:(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.icon)||"decision",color:o(n)}}function u(n,r){return n.label===r}function i(n,r){return Object.values(n.properties).find((n=>n&&n.relation&&u(n.relation.getLimetype(),r)))}function a(o,t){const u=i(o,t);return!!u&&function(o){return n(o)&&!r(o)}(u)}export{u as a,i as b,t as g,a as h}
@@ -1 +0,0 @@
1
- var t="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,r=t||n||Function("return this")(),o=r.Symbol,e=Object.prototype,c=e.hasOwnProperty,u=e.toString,a=o?o.toStringTag:void 0,i=Object.prototype.toString,l=o?o.toStringTag:void 0;function f(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l&&l in Object(t)?function(t){var n=c.call(t,a),r=t[a];try{t[a]=void 0;var o=!0}catch(t){}var e=u.call(t);return o&&(n?t[a]=r:delete t[a]),e}(t):function(t){return i.call(t)}(t)}function b(t){return null!=t&&"object"==typeof t}var s=Array.isArray;function v(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function j(t){if(!v(t))return!1;var n=f(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var y,d=r["__core-js_shared__"],g=(y=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",p=Function.prototype.toString;function O(t){if(null!=t){try{return p.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var F=/^\[object .+?Constructor\]$/,$=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!v(t)||(n=t,g&&g in n))&&(j(t)?$:F).test(O(t));var n}(r)?r:void 0}var x=h(r,"Map");export{x as M,o as S,s as a,f as b,j as c,v as d,t as f,h as g,b as i,r,O as t}
@@ -1 +0,0 @@
1
- import{i as o,b as t}from"./p-ByjZfyP_.js";function r(r){return"symbol"==typeof r||o(r)&&"[object Symbol]"==t(r)}export{r as i}
@@ -1 +0,0 @@
1
- import{g as r}from"./p-ByjZfyP_.js";var t=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(r){}}();export{t as d}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,H as r}from"./p-BIwHMk6j.js";import{X as s,n as o}from"./p-B3U_Lxk4.js";import{g as n}from"./p-BoVsXNfL.js";import{i as l}from"./p-CkTg5UPD.js";import{b as a}from"./p-mljVfXwO.js";import{i as h,a as d,b as m}from"./p-ByjZfyP_.js";import"./p-B8RiYkLS.js";import"./p-yc--7_7T.js";import"./p-wbuFLk-j.js";function c(t){return"string"==typeof t||!d(t)&&h(t)&&"[object String]"==m(t)}const p=class{constructor(i){t(this,i),this.expressionChange=e(this,"expressionChange"),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=t=>{var e;t.stopPropagation(),this.expressionChange.emit(null!==(e=t.detail)&&void 0!==e?e:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&("key"in this.expression||this.expression.op===s.NOT)}renderEmptyState(){return i("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return i("div",{class:"expression-with-promotion"},i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),i("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};p.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";const u=class{constructor(i){t(this,i),this.change=e(this,"change"),this.label="Sort Order",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(t){t&&(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];if(!i)return!1;const r=Object.keys(t)[0],s=Object.keys(i)[0];return r===s&&t[r]===i[s]})))&&(this.items=t.length>0?[...t]:[])}render(){return i(r,{key:"40d74376a6da4019e65a58203bf9f20bbde1c262"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((t,e)=>this.renderItem(t,e))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(t,e){const r=Object.keys(t)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${e}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:[{handleValueChange:0}]}}};u.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const b=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],y=b.filter((t=>"system"!==t));y.push("belongsto","hasone","hasmany","hasandbelongstomany");const g=class{constructor(i){t(this,i),this.change=e(this,"change"),this.propertyFields=[],this.fieldName="limetype",this.handleChange=t=>{t.stopPropagation();let e="";t.detail&&"value"in t.detail&&(e=t.detail.value),this.change.emit(e||void 0)}}componentWillLoad(){const t=this.platform.get(o.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(t,e,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==t?void 0:t.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==e?void 0:e.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var t;const e=this.getLimeTypes().map(f);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let r=e.find((t=>t.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),r=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"19975839fb107b1ffe7b87490698b3864323b973",label:this.label,options:e,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var t,e;let i=this.limetypes;return(null===(e=null===(t=this.formInfo)||void 0===t?void 0:t.schema)||void 0===e?void 0:e.oneOf)&&(i=this.formInfo.schema.oneOf.map((t=>t.const)).filter(c)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(l):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===b&&(e.allowedPropertyTypes=y)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},f=t=>({text:t.localname.singular,value:t.name,icon:n(t)});export{p as limebb_lime_query_filter_builder,u as limebb_lime_query_order_by_editor,g as limebb_limetype_field}
@@ -1 +0,0 @@
1
- import{r,c as n,h as t}from"./p-BIwHMk6j.js";import{n as u}from"./p-B3U_Lxk4.js";import{t as e,c as i,a as f,i as o,g as a,b as c,d as s}from"./p-BJ8HvfgI.js";import{i as l,a as v,S as d,k as p}from"./p-B8RiYkLS.js";import{d as h,a as m,S as b}from"./p-ByjZfyP_.js";import{i as j,c as y,h as g,f as k}from"./p-wbuFLk-j.js";import{b as w}from"./p-mljVfXwO.js";import{i as x}from"./p-CQ-z_HTt.js";import{d as _}from"./p-V3xfp9dg.js";import{e as O}from"./p-yc--7_7T.js";function S(r){return r}var A,B,L,H=Date.now,I=_?function(r,n){return _(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:S,R=(A=I,B=0,L=0,function(){var r=H(),n=16-(r-L);if(L=r,n>0){if(++B>=800)return arguments[0]}else B=0;return A.apply(void 0,arguments)}),T=Math.max;function U(r,n,t){if(!h(t))return!1;var u=typeof n;return!!("number"==u?j(t)&&l(n,t.length):"string"==u&&n in t)&&O(t[n],r)}var C=b?b.isConcatSpreadable:void 0;function E(r){return m(r)||y(r)||!!(C&&r&&r[C])}var M=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function V(r){return M.test(r)}var q="\\ud800-\\udfff",z="["+q+"]",D="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",F="\\ud83c[\\udffb-\\udfff]",J="[^"+q+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",Q="[\\ud800-\\udbff][\\udc00-\\udfff]",W="(?:"+D+"|"+F+")?",X="[\\ufe0e\\ufe0f]?",Y=X+W+"(?:\\u200d(?:"+[J,P,Q].join("|")+")"+X+W+")*",Z="(?:"+[J+D+"?",D,P,Q,z].join("|")+")",G=RegExp(F+"(?="+F+")|"+Z+Y,"g");var K=function(r){var n,t,u,i,f=V(r=e(r))?function(r){return V(r)?function(r){return r.match(G)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=f?f[0]:r.charAt(0),a=f?(n=f,t=1,i=n.length,u=void 0===u?i:u,!t&&u>=i?n:function(r,n,t){var u=-1,e=r.length;n<0&&(n=-n>e?0:e+n),(t=t>e?e:t)<0&&(t+=e),e=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(e);++u<e;)i[u]=r[u+n];return i}(n,t,u)).join(""):r.slice(1);return o.toUpperCase()+a};function N(r){return r==r&&!h(r)}function $(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function rr(r,n){return null!=r&&n in Object(r)}function nr(r){return"function"==typeof r?r:null==r?S:"object"==typeof r?m(r)?(e=r[1],o(u=r[0])&&N(e)?$(f(u),e):function(r){var n=a(r,u);return void 0===n&&n===e?function(r,n){return null!=r&&function(r,n,t){for(var u=-1,e=(n=i(n,r)).length,o=!1;++u<e;){var a=f(n[u]);if(!(o=null!=r&&t(r,a)))break;r=r[a]}return o||++u!=e?o:!!(e=null==r?0:r.length)&&g(e)&&l(a,e)&&(m(r)||y(r))}(r,n,rr)}(r,u):w(e,n,3)}):(t=function(r){for(var n=p(r),t=n.length;t--;){var u=n[t],e=r[u];n[t]=[u,e,N(e)]}return n}(n=r),1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t){var u=t.length,e=u;if(null==r)return!e;for(r=Object(r);u--;){var i=t[u];if(i[2]?i[1]!==r[i[0]]:!(i[0]in r))return!1}for(;++u<e;){var f=(i=t[u])[0],o=r[f],a=i[1];if(i[2]){if(void 0===o&&!(f in r))return!1}else{var c=new d;if(!w(a,o,3,void 0,c))return!1}}return!0}(r,0,t)}):function(r){return o(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,u,e}var tr,ur=(tr=function(r,n){return r&&function(r,n,t){for(var u=-1,e=Object(r),i=t(r),f=i.length;f--;){var o=i[++u];if(!1===n(e[o],o,e))break}return r}(r,n,p)},function(r,n){if(null==r)return r;if(!j(r))return tr(r,n);for(var t=r.length,u=-1,e=Object(r);++u<t&&!1!==n(e[u],u,e););return r});function er(r,n){if(r!==n){var t=void 0!==r,u=null===r,e=r==r,i=x(r),f=void 0!==n,o=null===n,a=n==n,c=x(n);if(!o&&!c&&!i&&r>n||i&&f&&a&&!o&&!c||u&&f&&a||!t&&a||!e)return 1;if(!u&&!i&&!c&&r<n||c&&t&&e&&!u&&!i||o&&t&&e||!f&&e||!a)return-1}return 0}function ir(r,n,t){n=n.length?s(n,(function(r){return m(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[S];var u=-1;n=s(n,k(nr));var e=function(r,n){var t=-1,u=j(r)?Array(r.length):[];return ur(r,(function(r){u[++t]=n(r)})),u}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++u,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var u=-1,e=r.criteria,i=n.criteria,f=e.length,o=t.length;++u<f;){var a=er(e[u],i[u]);if(a)return u>=o?a:a*("desc"==t[u]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(e)}var fr=function(r){return R(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var u=arguments,e=-1,i=T(u.length-n,0),f=Array(i);++e<i;)f[e]=u[n+e];e=-1;for(var o=Array(n+1);++e<n;)o[e]=u[e];return o[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,o)}}(r,void 0,S),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&U(r,n[0],n[1])?n=[]:t>2&&U(n[0],n[1],n[2])&&(n=[n[0]]),ir(r,function(r,n,t,u,e){var i=-1,f=r.length;for(t||(t=E),e||(e=[]);++i<f;){var o=r[i];t(o)?v(e,o):e[e.length]=o}return e}(n),[])}));function or(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=K(e(t[0]).toLowerCase()),t.join(" ")}const ar=class{constructor(t){r(this,t),this.change=n(this,"change"),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(u.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:or(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"7972ffc360dfaf406045b496749dd912acca9e5b",value:n,options:fr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{ar as limebb_locale_picker}
@@ -1 +0,0 @@
1
- import{U as r,g as e,S as n}from"./p-B8RiYkLS.js";import{M as t,e as a}from"./p-yc--7_7T.js";import{S as i,a as o,i as f}from"./p-ByjZfyP_.js";import{g as u,a as c,b as s}from"./p-wbuFLk-j.js";function v(r){var e=-1,n=null==r?0:r.length;for(this.__data__=new t;++e<n;)this.add(r[e])}function b(r,e){for(var n=-1,t=null==r?0:r.length;++n<t;)if(e(r[n],n,r))return!0;return!1}function j(r,e,n,t,a,i){var o=1&n,f=r.length,u=e.length;if(f!=u&&!(o&&u>f))return!1;var c=i.get(r),s=i.get(e);if(c&&s)return c==e&&s==r;var j=-1,p=!0,_=2&n?new v:void 0;for(i.set(r,e),i.set(e,r);++j<f;){var l=r[j],w=e[j];if(t)var m=o?t(w,l,j,e,r,i):t(l,w,j,r,e,i);if(void 0!==m){if(m)continue;p=!1;break}if(_){if(!b(e,(function(r,e){if(!_.has(e)&&(l===r||a(l,r,n,t,i)))return _.push(e)}))){p=!1;break}}else if(l!==w&&!a(l,w,n,t,i)){p=!1;break}}return i.delete(r),i.delete(e),p}function p(r){var e=-1,n=Array(r.size);return r.forEach((function(r,t){n[++e]=[t,r]})),n}function _(r){var e=-1,n=Array(r.size);return r.forEach((function(r){n[++e]=r})),n}v.prototype.add=v.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},v.prototype.has=function(r){return this.__data__.has(r)};var l=i?i.prototype:void 0,w=l?l.valueOf:void 0,m=Object.prototype.hasOwnProperty,d="[object Arguments]",y="[object Array]",h="[object Object]",k=Object.prototype.hasOwnProperty;function S(t,i,v,b,l){return t===i||(null==t||null==i||!f(t)&&!f(i)?t!=t&&i!=i:function(t,i,f,v,b,l){var S=o(t),g=o(i),A=S?y:u(t),B=g?y:u(i),O=(A=A==d?h:A)==h,x=(B=B==d?h:B)==h,D=A==B;if(D&&c(t)){if(!c(i))return!1;S=!0,O=!1}if(D&&!O)return l||(l=new n),S||s(t)?j(t,i,f,v,b,l):function(e,n,t,i,o,f,u){switch(t){case"[object DataView]":if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=n.byteLength||!f(new r(e),new r(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+n);case"[object Error]":return e.name==n.name&&e.message==n.message;case"[object RegExp]":case"[object String]":return e==n+"";case"[object Map]":var c=p;case"[object Set]":if(c||(c=_),e.size!=n.size&&!(1&i))return!1;var s=u.get(e);if(s)return s==n;i|=2,u.set(e,n);var v=j(c(e),c(n),i,o,f,u);return u.delete(e),v;case"[object Symbol]":if(w)return w.call(e)==w.call(n)}return!1}(t,i,A,f,v,b,l);if(!(1&f)){var E=O&&k.call(t,"__wrapped__"),L=x&&k.call(i,"__wrapped__");if(E||L){var M=E?t.value():t,R=L?i.value():i;return l||(l=new n),b(M,R,f,v,l)}}return!!D&&(l||(l=new n),function(r,n,t,a,i,o){var f=1&t,u=e(r),c=u.length;if(c!=e(n).length&&!f)return!1;for(var s=c;s--;){var v=u[s];if(!(f?v in n:m.call(n,v)))return!1}var b=o.get(r),j=o.get(n);if(b&&j)return b==n&&j==r;var p=!0;o.set(r,n),o.set(n,r);for(var _=f;++s<c;){var l=r[v=u[s]],w=n[v];if(a)var d=f?a(w,l,v,n,r,o):a(l,w,v,r,n,o);if(!(void 0===d?l===w||i(l,w,t,a,o):d)){p=!1;break}_||(_="constructor"==v)}if(p&&!_){var y=r.constructor,h=n.constructor;y==h||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof h&&h instanceof h||(p=!1)}return o.delete(r),o.delete(n),p}(t,i,f,v,b,l))}(t,i,v,b,S,l))}export{S as b}
@@ -1 +0,0 @@
1
- import{g as e,r as t,c as r,i as n,b as o,f as u,t as a,M as c}from"./p-ByjZfyP_.js";var s=e(t,"WeakMap");function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function f(e){return null!=e&&i(e.length)&&!r(e)}var b=Object.prototype;function j(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}function p(e){return n(e)&&"[object Arguments]"==o(e)}var l=Object.prototype,m=l.hasOwnProperty,v=l.propertyIsEnumerable,d=p(function(){return arguments}())?p:function(e){return n(e)&&m.call(e,"callee")&&!v.call(e,"callee")},y="object"==typeof exports&&exports&&!exports.nodeType&&exports,x=y&&"object"==typeof module&&module&&!module.nodeType&&module,w=x&&x.exports===y?t.Buffer:void 0,O=(w?w.isBuffer:void 0)||function(){return!1},M={};function g(e){return function(t){return e(t)}}M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Arguments]"]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object Boolean]"]=M["[object DataView]"]=M["[object Date]"]=M["[object Error]"]=M["[object Function]"]=M["[object Map]"]=M["[object Number]"]=M["[object Object]"]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object WeakMap]"]=!1;var h="object"==typeof exports&&exports&&!exports.nodeType&&exports,P=h&&"object"==typeof module&&module&&!module.nodeType&&module,k=P&&P.exports===h&&u.process,A=function(){try{return P&&P.require&&P.require("util").types||k&&k.binding&&k.binding("util")}catch(e){}}(),B=A&&A.isTypedArray,D=B?g(B):function(e){return n(e)&&i(e.length)&&!!M[o(e)]};function S(e,t){return function(r){return e(t(r))}}var V=S(Object.keys,Object),W=Object.prototype.hasOwnProperty;function Z(e){if(!j(e))return V(e);var t=[];for(var r in Object(e))W.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _=e(t,"DataView"),q=e(t,"Promise"),z=e(t,"Set"),C="[object Map]",E="[object Promise]",F="[object Set]",G="[object WeakMap]",H="[object DataView]",I=a(_),J=a(c),K=a(q),L=a(z),N=a(s),Q=o;(_&&Q(new _(new ArrayBuffer(1)))!=H||c&&Q(new c)!=C||q&&Q(q.resolve())!=E||z&&Q(new z)!=F||s&&Q(new s)!=G)&&(Q=function(e){var t=o(e),r="[object Object]"==t?e.constructor:void 0,n=r?a(r):"";if(n)switch(n){case I:return H;case J:return C;case K:return E;case L:return F;case N:return G}return t});export{O as a,D as b,d as c,j as d,Z as e,g as f,Q as g,i as h,f as i,A as n,S as o}
@@ -1 +0,0 @@
1
- import{g as t,M as n}from"./p-ByjZfyP_.js";function i(t,n){return t===n||t!=t&&n!=n}var r=t(Object,"create"),s=Object.prototype.hasOwnProperty,u=Object.prototype.hasOwnProperty;function h(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var r=t[n];this.set(r[0],r[1])}}function o(t,n){for(var r=t.length;r--;)if(i(t[r][0],n))return r;return-1}h.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},h.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},h.prototype.get=function(t){var n=this.__data__;if(r){var i=n[t];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(n,t)?n[t]:void 0},h.prototype.has=function(t){var n=this.__data__;return r?void 0!==n[t]:u.call(n,t)},h.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this};var e=Array.prototype.splice;function a(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var r=t[n];this.set(r[0],r[1])}}function f(t,n){var i,r,s=t.__data__;return("string"==(r=typeof(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?s["string"==typeof n?"string":"hash"]:s.map}function c(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var r=t[n];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var n=this.__data__,i=o(n,t);return!(i<0||(i==n.length-1?n.pop():e.call(n,i,1),--this.size,0))},a.prototype.get=function(t){var n=this.__data__,i=o(n,t);return i<0?void 0:n[i][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,n){var i=this.__data__,r=o(i,t);return r<0?(++this.size,i.push([t,n])):i[r][1]=n,this},c.prototype.clear=function(){this.size=0,this.__data__={hash:new h,map:new(n||a),string:new h}},c.prototype.delete=function(t){var n=f(this,t).delete(t);return this.size-=n?1:0,n},c.prototype.get=function(t){return f(this,t).get(t)},c.prototype.has=function(t){return f(this,t).has(t)},c.prototype.set=function(t,n){var i=f(this,t),r=i.size;return i.set(t,n),this.size+=i.size==r?0:1,this};export{a as L,c as M,i as e}