{"version":3,"file":"IconTables-ZnUgNLa6.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcCounterBubble-oxV8oMlX.mjs","../node_modules/vue-material-design-icons/Text.vue","../src/shared/assets/icons/IconTables.vue"],"sourcesContent":["import '../assets/NcCounterBubble-sz81L2Mt.css';\nimport { getCanonicalLocale } from \"@nextcloud/l10n\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = {\n  name: \"NcCounterBubble\",\n  props: {\n    /**\n     * Visual appearence of the counter bubble\n     */\n    type: {\n      type: String,\n      default: \"\",\n      validator(value) {\n        return [\"highlighted\", \"outlined\", \"\"].includes(value);\n      }\n    },\n    /**\n     * Specifies whether the component is used within a component that is\n     * active and therefore has a primary background. Inverts the color of\n     * this component when that is the case.\n     */\n    active: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * The count to display in the counter bubble.\n     * Alternatively, you can pass any value to the default slot.\n     */\n    count: {\n      type: Number,\n      required: false,\n      default: void 0\n    },\n    /**\n     * Disables humanization to display count or content as it is\n     */\n    raw: {\n      type: Boolean,\n      required: false,\n      default: false\n    }\n  },\n  computed: {\n    counterClassObject() {\n      return {\n        \"counter-bubble__counter--highlighted\": this.type === \"highlighted\",\n        \"counter-bubble__counter--outlined\": this.type === \"outlined\",\n        active: this.active\n      };\n    },\n    humanizedCount() {\n      return this.humanizeCount(this.count);\n    }\n  },\n  methods: {\n    humanizeCount(count) {\n      if (this.raw) {\n        return count.toString();\n      }\n      const formatter = new Intl.NumberFormat(getCanonicalLocale(), {\n        notation: \"compact\",\n        compactDisplay: \"short\"\n      });\n      return formatter.format(count);\n    },\n    /**\n     * Get the humanized count from `count` prop\n     *\n     * @return {{ humanized: string, original: string} | undefined}\n     */\n    getHumanizedCount() {\n      if (this.count !== void 0) {\n        return {\n          humanized: this.humanizedCount,\n          original: this.count.toString()\n        };\n      }\n      if (this.raw) {\n        return void 0;\n      }\n      if (this.$slots.default?.length === 1) {\n        const slotContent = this.$slots.default[0].text?.trim();\n        if (slotContent && /^\\d+$/.test(slotContent)) {\n          const count = parseInt(slotContent, 10);\n          return {\n            humanized: this.humanizeCount(count),\n            original: slotContent\n          };\n        }\n      }\n    }\n  },\n  render(h) {\n    const count = this.getHumanizedCount();\n    return h(\"div\", {\n      staticClass: \"counter-bubble__counter\",\n      class: this.counterClassObject,\n      attrs: {\n        // Show original count in title if humanized\n        title: count && count.original !== count.humanized ? count.original : void 0\n      }\n    }, [count?.humanized ?? this.$slots.default]);\n  }\n};\nconst _sfc_render = null;\nconst _sfc_staticRenderFns = null;\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n  _sfc_main,\n  _sfc_render,\n  _sfc_staticRenderFns,\n  false,\n  null,\n  \"7d9795d6\"\n);\nconst NcCounterBubble = __component__.exports;\nexport {\n  NcCounterBubble as N\n};\n//# sourceMappingURL=NcCounterBubble-oxV8oMlX.mjs.map\n","<template>\n  <span v-bind=\"$attrs\"\n        :aria-hidden=\"title ? null : 'true'\"\n        :aria-label=\"title\"\n        class=\"material-design-icon text-icon\"\n        role=\"img\"\n        @click=\"$emit('click', $event)\">\n    <svg :fill=\"fillColor\"\n         class=\"material-design-icon__svg\"\n         :width=\"size\"\n         :height=\"size\"\n         viewBox=\"0 0 24 24\">\n      <path d=\"M21,6V8H3V6H21M3,18H12V16H3V18M3,13H21V11H3V13Z\">\n        <title v-if=\"title\">{{ title }}</title>\n      </path>\n    </svg>\n  </span>\n</template>\n\n<script>\nexport default {\n  name: \"TextIcon\",\n  emits: ['click'],\n  props: {\n    title: {\n      type: String,\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n}\n</script>","<!--\n  - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<span :aria-hidden=\"!title\"\n\t\t:aria-label=\"title\"\n\t\tclass=\"material-design-icon tables-icon\"\n\t\trole=\"img\"\n\t\tv-bind=\"$attrs\"\n\t\t@click=\"$emit('click', $event)\">\n\t\t<svg\n\t\t\t:fill=\"fillColor\"\n\t\t\t:width=\"size\"\n\t\t\t:height=\"size\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 24 24\">\n\t\t\t<path d=\"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z\" />\n\t\t</svg>\n\t</span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'IconTables',\n\tprops: {\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tfillColor: {\n\t\t\ttype: String,\n\t\t\tdefault: 'currentColor',\n\t\t},\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: 24,\n\t\t},\n\t},\n})\n</script>\n"],"names":["_sfc_main","value","count","getCanonicalLocale","slotContent","h","_sfc_render","_sfc_staticRenderFns","__component__","normalizeComponent","NcCounterBubble","defineComponent"],"mappings":";2KAGA,MAAMA,EAAY,CAChB,KAAM,kBACN,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,GACT,UAAUC,EAAO,CACf,MAAO,CAAC,cAAe,WAAY,EAAE,EAAE,SAASA,CAAK,CACvD,CACN,EAMI,OAAQ,CACN,KAAM,QACN,QAAS,EACf,EAKI,MAAO,CACL,KAAM,OACN,SAAU,GACV,QAAS,MACf,EAII,IAAK,CACH,KAAM,QACN,SAAU,GACV,QAAS,EACf,CACA,EACE,SAAU,CACR,oBAAqB,CACnB,MAAO,CACL,uCAAwC,KAAK,OAAS,cACtD,oC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