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AC,OAAT,CAAiB,KAAK,WAAL,EAAjB,EAA5B,KACK,QAAQ,CAAC,IAAT,CAAc,KAAK,WAAL,EAAd;;AAEL,cAAI,KAAK,OAAL,CAAa,SAAb,IAA0B,WAA9B,EAA2C;AACzC,YAAA,QAAQ,CAAC,IAAT,CAAc,KAAK,cAAL,CAAoB,MAApB,EAA4B;AAAE,cAAA,KAAK,EAAE;AAAT,aAA5B,EAA0E,CAAC,MAAM,CAAC,SAAS,GAAG,CAAb,CAAP,CAA1E,CAAd;AACD;AACF;;AAED,YAAI,KAAK,WAAT,EAAsB;AACpB,UAAA,QAAQ,CAAC,IAAT,CAAc,KAAK,gBAAL,CAAsB,MAAtB,CAAd;AACD;AACF;;AAED,aAAO,KAAK,cAAL,CAAoB,IAApB,EAA0B;AAC/B,QAAA,KAD+B;AAE/B,QAAA,KAAK,EAAE,OAFwB;AAG/B,QAAA,EAAE,EAAE;AAH2B,OAA1B,EAIJ,QAJI,CAAP;AAKD;;AAxEM,GAH0B;;AA8EnC,EAAA,MAAM,GAAA;AACJ,WAAO,KAAK,cAAL,CAAoB,OAApB,EAA6B;AAClC,MAAA,WAAW,EAAE;AADqB,KAA7B,EAEJ,CACD,KAAK,cAAL,CAAoB,IAApB,EAA0B,KAAK,OAAL,CAAa,GAAb,CAAiB,MAAM,IAAI,KAAK,SAAL,CAAe,MAAf,CAA3B,CAA1B,CADC,CAFI,CAAP;AAKD;;AApFkC,CAAtB,CAAf","sourcesContent":["// Helpers\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\nimport header, { TableHeader } from './mixins/header'\nimport { wrapInArray } from '../../util/helpers'\n\nexport default mixins(header).extend({\n name: 'v-data-table-header-desktop',\n\n methods: {\n genGroupByToggle (header: TableHeader) {\n return this.$createElement('span', {\n on: {\n click: () => this.$emit('group', header.value),\n },\n }, ['group'])\n },\n // eslint-disable-next-line max-statements\n genHeader (header: TableHeader) {\n const listeners: any = {}\n const children = []\n const attrs = {\n role: 'columnheader',\n scope: 'col',\n 'aria-label': header.text || '',\n 'aria-sort': 'none',\n width: header.width,\n }\n\n const classes = [\n `text-${header.align || 'start'}`,\n ...wrapInArray(header.class),\n ]\n\n if (header.value === 'data-table-select' && !this.singleSelect) {\n children.push(this.genSelectAll())\n } else {\n children.push(this.$scopedSlots[header.value]\n ? this.$scopedSlots[header.value]!({ header })\n : this.$create
|