@tanstack/react-table 0.0.1-alpha.8 → 8.0.0-alpha.2
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.
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +112 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/build/cjs/aggregationTypes.js +130 -0
- package/build/cjs/aggregationTypes.js.map +1 -0
- package/build/cjs/core.js +519 -0
- package/build/cjs/core.js.map +1 -0
- package/build/cjs/createTable.js +103 -0
- package/build/cjs/createTable.js.map +1 -0
- package/build/cjs/features/ColumnSizing.js +331 -0
- package/build/cjs/features/ColumnSizing.js.map +1 -0
- package/build/cjs/features/Expanding.js +234 -0
- package/build/cjs/features/Expanding.js.map +1 -0
- package/build/cjs/features/Filters.js +396 -0
- package/build/cjs/features/Filters.js.map +1 -0
- package/build/cjs/features/Grouping.js +228 -0
- package/build/cjs/features/Grouping.js.map +1 -0
- package/build/cjs/features/Headers.js +486 -0
- package/build/cjs/features/Headers.js.map +1 -0
- package/build/cjs/features/Ordering.js +83 -0
- package/build/cjs/features/Ordering.js.map +1 -0
- package/build/cjs/features/Pinning.js +163 -0
- package/build/cjs/features/Pinning.js.map +1 -0
- package/build/cjs/features/Sorting.js +269 -0
- package/build/cjs/features/Sorting.js.map +1 -0
- package/build/cjs/features/Visibility.js +160 -0
- package/build/cjs/features/Visibility.js.map +1 -0
- package/build/cjs/filterTypes.js +172 -0
- package/build/cjs/filterTypes.js.map +1 -0
- package/build/cjs/index.js +30 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/sortTypes.js +121 -0
- package/build/cjs/sortTypes.js.map +1 -0
- package/build/cjs/utils/columnFilterRowsFn.js +130 -0
- package/build/cjs/utils/columnFilterRowsFn.js.map +1 -0
- package/build/cjs/utils/expandRowsFn.js +38 -0
- package/build/cjs/utils/expandRowsFn.js.map +1 -0
- package/build/cjs/utils/globalFilterRowsFn.js +100 -0
- package/build/cjs/utils/globalFilterRowsFn.js.map +1 -0
- package/build/cjs/utils/groupRowsFn.js +154 -0
- package/build/cjs/utils/groupRowsFn.js.map +1 -0
- package/build/cjs/utils/sortRowsFn.js +93 -0
- package/build/cjs/utils/sortRowsFn.js.map +1 -0
- package/build/cjs/utils.js +143 -0
- package/build/cjs/utils.js.map +1 -0
- package/build/esm/index.js +3722 -0
- package/build/esm/index.js.map +1 -0
- package/build/stats-html.html +2689 -0
- package/build/stats-react.json +747 -0
- package/build/types/aggregationTypes.d.ts +22 -0
- package/build/types/core.d.ts +126 -0
- package/build/types/createTable.d.ts +35 -0
- package/build/types/features/ColumnSizing.d.ts +73 -0
- package/build/types/features/Expanding.d.ts +52 -0
- package/build/types/features/Filters.d.ts +93 -0
- package/build/types/features/Grouping.d.ts +82 -0
- package/build/types/features/Headers.d.ts +41 -0
- package/build/types/features/Ordering.d.ts +19 -0
- package/build/types/features/Pinning.d.ts +39 -0
- package/build/types/features/Sorting.d.ts +75 -0
- package/build/types/features/Visibility.d.ts +47 -0
- package/build/types/filterTypes.d.ts +50 -0
- package/build/types/index.d.ts +7 -0
- package/build/types/sortTypes.d.ts +17 -0
- package/build/types/types.d.ts +124 -0
- package/build/types/utils/columnFilterRowsFn.d.ts +2 -0
- package/build/types/utils/expandRowsFn.d.ts +2 -0
- package/build/types/utils/globalFilterRowsFn.d.ts +2 -0
- package/build/types/utils/groupRowsFn.d.ts +2 -0
- package/build/types/utils/sortRowsFn.d.ts +2 -0
- package/build/types/utils.d.ts +24 -0
- package/{dist/react-table.development.js → build/umd/index.development.js} +372 -29
- package/build/umd/index.development.js.map +1 -0
- package/build/umd/index.production.js +12 -0
- package/build/umd/index.production.js.map +1 -0
- package/package.json +9 -94
- package/src/core.tsx +43 -5
- package/src/createTable.tsx +1 -1
- package/src/features/ColumnSizing.ts +482 -0
- package/src/features/Filters.ts +1 -1
- package/src/features/Headers.ts +43 -6
- package/src/features/{withPagination.ts → withPagination.oldts} +0 -0
- package/src/features/{withRowSelection.ts → withRowSelection.oldts} +0 -0
- package/src/types.ts +35 -6
- package/src/utils.tsx +8 -2
- package/dist/react-table.development.js.map +0 -1
- package/dist/react-table.production.min.js +0 -2
- package/dist/react-table.production.min.js.map +0 -1
- package/lib/index.js +0 -65
- package/src/features/notest/useAbsoluteLayout.test.js +0 -152
- package/src/features/notest/useBlockLayout.test.js +0 -158
- package/src/features/notest/useColumnOrder.test.js +0 -186
- package/src/features/notest/useExpanded.test.js +0 -125
- package/src/features/notest/useFilters.test.js +0 -393
- package/src/features/notest/useFiltersAndRowSelect.test.js +0 -256
- package/src/features/notest/useFlexLayout.test.js +0 -152
- package/src/features/notest/useGroupBy.test.js +0 -259
- package/src/features/notest/usePagination.test.js +0 -231
- package/src/features/notest/useResizeColumns.test.js +0 -229
- package/src/features/notest/useRowSelect.test.js +0 -250
- package/src/features/notest/useRowState.test.js +0 -178
- package/src/features/tests/Visibility.test.tsx +0 -225
- package/src/features/tests/__snapshots__/Visibility.test.tsx.snap +0 -390
- package/src/features/tests/withSorting.notest.tsx +0 -341
- package/src/features/withColumnResizing.ts +0 -281
- package/src/test-utils/makeTestData.ts +0 -41
- package/src/tests/__snapshots__/core.test.tsx.snap +0 -148
- package/src/tests/core.test.tsx +0 -241
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-table
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) TanStack
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14
|
+
|
|
15
|
+
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
|
|
16
|
+
var React = require('react');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
+
|
|
22
|
+
function functionalUpdate(updater, input) {
|
|
23
|
+
return typeof updater === 'function' ? updater(input) : updater;
|
|
24
|
+
}
|
|
25
|
+
function makeStateUpdater(key, instance) {
|
|
26
|
+
return function (updater) {
|
|
27
|
+
instance.setState(function (old) {
|
|
28
|
+
var _extends2;
|
|
29
|
+
|
|
30
|
+
return _rollupPluginBabelHelpers["extends"]({}, old, (_extends2 = {}, _extends2[key] = functionalUpdate(updater, old[key]), _extends2));
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
} // SSR has issues with useLayoutEffect still, so use useEffect during SSR
|
|
34
|
+
|
|
35
|
+
typeof document !== 'undefined' ? React__default["default"].useLayoutEffect : React__default["default"].useEffect;
|
|
36
|
+
function isFunction(d) {
|
|
37
|
+
return d instanceof Function;
|
|
38
|
+
}
|
|
39
|
+
function flattenBy(arr, getChildren) {
|
|
40
|
+
var flat = [];
|
|
41
|
+
|
|
42
|
+
var recurse = function recurse(subArr) {
|
|
43
|
+
subArr.forEach(function (item) {
|
|
44
|
+
flat.push(item);
|
|
45
|
+
var children = getChildren(item);
|
|
46
|
+
|
|
47
|
+
if (children != null && children.length) {
|
|
48
|
+
recurse(children);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
recurse(arr);
|
|
54
|
+
return flat;
|
|
55
|
+
}
|
|
56
|
+
// @ts-ignore // Just rely on the type, not the implementation
|
|
57
|
+
var propGetter = function propGetter(initial, getter) {
|
|
58
|
+
if (isFunction(getter)) {
|
|
59
|
+
return getter(initial);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return _rollupPluginBabelHelpers["extends"]({}, initial, getter != null ? getter : {});
|
|
63
|
+
};
|
|
64
|
+
function memo(getDeps, fn, key, debug) {
|
|
65
|
+
var deps = [];
|
|
66
|
+
var result;
|
|
67
|
+
return function () {
|
|
68
|
+
var newDeps = getDeps();
|
|
69
|
+
var newSerializedDeps = newDeps;
|
|
70
|
+
var oldSerializedDeps = deps;
|
|
71
|
+
var depsChanged = newSerializedDeps.length !== oldSerializedDeps.length || newSerializedDeps.some(function (dep, index) {
|
|
72
|
+
return oldSerializedDeps[index] !== dep;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
if (depsChanged) {
|
|
76
|
+
if (debug) {
|
|
77
|
+
console.info(key, _rollupPluginBabelHelpers["extends"]({
|
|
78
|
+
length: oldSerializedDeps.length + " -> " + newSerializedDeps.length
|
|
79
|
+
}, newSerializedDeps.map(function (_, index) {
|
|
80
|
+
if (oldSerializedDeps[index] !== newSerializedDeps[index]) {
|
|
81
|
+
return [index, oldSerializedDeps[index], newSerializedDeps[index]];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return false;
|
|
85
|
+
}).filter(Boolean).reduce(function (accu, curr) {
|
|
86
|
+
var _extends3;
|
|
87
|
+
|
|
88
|
+
return _rollupPluginBabelHelpers["extends"]({}, accu, (_extends3 = {}, _extends3[curr[0]] = curr.slice(1), _extends3));
|
|
89
|
+
}, {}), {
|
|
90
|
+
parent: parent
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
result = fn.apply(void 0, newDeps);
|
|
95
|
+
deps = newSerializedDeps;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return result;
|
|
99
|
+
};
|
|
100
|
+
} // Copied from: https://github.com/jonschlinkert/is-plain-object
|
|
101
|
+
|
|
102
|
+
function flexRender(Comp, props) {
|
|
103
|
+
return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React__default["default"].createElement(Comp, props) : Comp;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function isReactComponent(component) {
|
|
107
|
+
return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function isClassComponent(component) {
|
|
111
|
+
return typeof component === 'function' && function () {
|
|
112
|
+
var proto = Object.getPrototypeOf(component);
|
|
113
|
+
return proto.prototype && proto.prototype.isReactComponent;
|
|
114
|
+
}();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function isExoticComponent(component) {
|
|
118
|
+
return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);
|
|
119
|
+
} // export function hashString(str: string, seed = 0): string {
|
|
120
|
+
// let h1 = 0xdeadbeef ^ seed,
|
|
121
|
+
// h2 = 0x41c6ce57 ^ seed
|
|
122
|
+
// for (let i = 0, ch; i < str.length; i++) {
|
|
123
|
+
// ch = str.charCodeAt(i)
|
|
124
|
+
// h1 = Math.imul(h1 ^ ch, 2654435761)
|
|
125
|
+
// h2 = Math.imul(h2 ^ ch, 1597334677)
|
|
126
|
+
// }
|
|
127
|
+
// h1 =
|
|
128
|
+
// Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^
|
|
129
|
+
// Math.imul(h2 ^ (h2 >>> 13), 3266489909)
|
|
130
|
+
// h2 =
|
|
131
|
+
// Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^
|
|
132
|
+
// Math.imul(h1 ^ (h1 >>> 13), 3266489909)
|
|
133
|
+
// return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString()
|
|
134
|
+
// }
|
|
135
|
+
|
|
136
|
+
exports.flattenBy = flattenBy;
|
|
137
|
+
exports.flexRender = flexRender;
|
|
138
|
+
exports.functionalUpdate = functionalUpdate;
|
|
139
|
+
exports.isFunction = isFunction;
|
|
140
|
+
exports.makeStateUpdater = makeStateUpdater;
|
|
141
|
+
exports.memo = memo;
|
|
142
|
+
exports.propGetter = propGetter;
|
|
143
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils.tsx"],"sourcesContent":["import React from 'react'\nimport {\n Getter,\n NoInfer,\n PropGetterValue,\n Renderable,\n TableState,\n} from './types'\n\nexport type IsAny<T> = 0 extends 1 & T ? true : false\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\nexport type RequiredKeys<T, K extends keyof T> = Omit<T, K> &\n Required<Pick<T, K>>\nexport type Overwrite<T, U> = Omit<T, keyof U> & U\n\nexport type DataUpdateFunction<TInput, TOutput> = (input: TInput) => TOutput\n\nexport type Updater<TInput, TOutput> =\n | TOutput\n | DataUpdateFunction<TInput, TOutput>\n\nexport function functionalUpdate<TInput, TOutput = TInput>(\n updater: Updater<TInput, TOutput>,\n input: TInput\n): TOutput {\n return typeof updater === 'function'\n ? (updater as DataUpdateFunction<TInput, TOutput>)(input)\n : updater\n}\n\nexport function noop() {\n //\n}\n\nexport function makeStateUpdater(key: keyof TableState, instance: unknown) {\n return (updater: Updater<any, any>) => {\n ;(instance as any).setState(<TTableState,>(old: TTableState) => {\n return {\n ...old,\n [key]: functionalUpdate(updater, (old as any)[key]),\n }\n })\n }\n}\n\n// SSR has issues with useLayoutEffect still, so use useEffect during SSR\nexport const safeUseLayoutEffect =\n typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect\n\nexport function useMountedLayoutEffect(fn: any, deps: any[]) {\n const mountedRef = React.useRef(false)\n\n safeUseLayoutEffect(() => {\n if (mountedRef.current) {\n fn()\n }\n mountedRef.current = true\n // eslint-disable-next-line\n }, deps)\n}\n\nexport function useGetLatest<T>(obj: T): () => T {\n const ref = React.useRef<T>()\n ref.current = obj\n\n return React.useCallback(() => ref.current!, [])\n}\n\ntype AnyFunction = (...args: any) => any\n\nexport function isFunction<T extends AnyFunction>(d: any): d is T {\n return d instanceof Function\n}\n\nexport function flattenBy<TNode>(\n arr: TNode[],\n getChildren: (item: TNode) => TNode[]\n) {\n const flat: TNode[] = []\n\n const recurse = (subArr: TNode[]) => {\n subArr.forEach(item => {\n flat.push(item)\n const children = getChildren(item)\n if (children?.length) {\n recurse(children)\n }\n })\n }\n\n recurse(arr)\n\n return flat\n}\n\ntype PropGetterImpl = <TBaseProps, TGetter extends Getter<TBaseProps>>(\n initial: TBaseProps,\n userProps?: TGetter\n) => PropGetterValue<TBaseProps, TGetter>\n\n// @ts-ignore // Just rely on the type, not the implementation\nexport const propGetter: PropGetterImpl = (initial, getter) => {\n if (isFunction(getter)) {\n return getter(initial)\n }\n\n return {\n ...initial,\n ...(getter ?? {}),\n }\n}\n\nexport function memo<TDeps extends readonly any[], TResult>(\n getDeps: () => [...TDeps],\n fn: (...args: NoInfer<[...TDeps]>) => TResult,\n key?: string,\n debug?: boolean\n): () => TResult {\n let deps: any[] = []\n let result: TResult | undefined\n\n return () => {\n const newDeps = getDeps()\n const newSerializedDeps = newDeps\n const oldSerializedDeps = deps\n\n const depsChanged =\n newSerializedDeps.length !== oldSerializedDeps.length ||\n newSerializedDeps.some(\n (dep: any, index: number) => oldSerializedDeps[index] !== dep\n )\n\n if (depsChanged) {\n if (debug) {\n console.info(key, {\n length: `${oldSerializedDeps.length} -> ${newSerializedDeps.length}`,\n ...newSerializedDeps\n .map((_, index) => {\n if (oldSerializedDeps[index] !== newSerializedDeps[index]) {\n return [\n index,\n oldSerializedDeps[index],\n newSerializedDeps[index],\n ]\n }\n\n return false\n })\n .filter(Boolean)\n .reduce(\n (accu, curr: any) => ({\n ...accu,\n [curr[0]]: curr.slice(1),\n }),\n {}\n ),\n parent,\n })\n }\n result = fn(...newDeps)\n deps = newSerializedDeps\n }\n\n return result!\n }\n}\n\n// Copied from: https://github.com/jonschlinkert/is-plain-object\nexport function isPlainObject(o: any): o is Object {\n if (!hasObjectPrototype(o)) {\n return false\n }\n\n // If has modified constructor\n const ctor = o.constructor\n if (typeof ctor === 'undefined') {\n return true\n }\n\n // If has modified prototype\n const prot = ctor.prototype\n if (!hasObjectPrototype(prot)) {\n return false\n }\n\n // If constructor does not have an Object-specific method\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false\n }\n\n // Most likely a plain Object\n return true\n}\n\nfunction hasObjectPrototype(o: any): boolean {\n return Object.prototype.toString.call(o) === '[object Object]'\n}\n\nexport type Render = typeof flexRender\n\nexport function flexRender<TProps extends {}>(\n Comp: Renderable<TProps>,\n props: TProps\n): React.ReactNode {\n return !Comp ? null : isReactComponent(Comp) ? <Comp {...props} /> : Comp\n}\n\nfunction isReactComponent(component: unknown): component is React.FC {\n return (\n isClassComponent(component) ||\n typeof component === 'function' ||\n isExoticComponent(component)\n )\n}\n\nfunction isClassComponent(component: any) {\n return (\n typeof component === 'function' &&\n (() => {\n const proto = Object.getPrototypeOf(component)\n return proto.prototype && proto.prototype.isReactComponent\n })()\n )\n}\n\nfunction isExoticComponent(component: any) {\n return (\n typeof component === 'object' &&\n typeof component.$$typeof === 'symbol' &&\n ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n )\n}\n\n// export function hashString(str: string, seed = 0): string {\n// let h1 = 0xdeadbeef ^ seed,\n// h2 = 0x41c6ce57 ^ seed\n// for (let i = 0, ch; i < str.length; i++) {\n// ch = str.charCodeAt(i)\n// h1 = Math.imul(h1 ^ ch, 2654435761)\n// h2 = Math.imul(h2 ^ ch, 1597334677)\n// }\n// h1 =\n// Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^\n// Math.imul(h2 ^ (h2 >>> 13), 3266489909)\n// h2 =\n// Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^\n// Math.imul(h1 ^ (h1 >>> 13), 3266489909)\n// return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString()\n// }\n"],"names":["functionalUpdate","updater","input","makeStateUpdater","key","instance","setState","old","document","React","useLayoutEffect","useEffect","isFunction","d","Function","flattenBy","arr","getChildren","flat","recurse","subArr","forEach","item","push","children","length","propGetter","initial","getter","memo","getDeps","fn","debug","deps","result","newDeps","newSerializedDeps","oldSerializedDeps","depsChanged","some","dep","index","console","info","map","_","filter","Boolean","reduce","accu","curr","slice","parent","flexRender","Comp","props","isReactComponent","component","isClassComponent","isExoticComponent","proto","Object","getPrototypeOf","prototype","$$typeof","includes","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBO,SAASA,gBAAT,CACLC,OADK,EAELC,KAFK,EAGI;AACT,SAAO,OAAOD,OAAP,KAAmB,UAAnB,GACFA,OAAD,CAAiDC,KAAjD,CADG,GAEHD,OAFJ;AAGD;AAMM,SAASE,gBAAT,CAA0BC,GAA1B,EAAiDC,QAAjD,EAAoE;AACzE,SAAO,UAACJ,OAAD,EAAgC;AACnCI,IAAAA,QAAD,CAAkBC,QAAlB,CAA2B,UAAeC,GAAf,EAAoC;AAAA;;AAC9D,sDACKA,GADL,6BAEGH,GAFH,IAESJ,gBAAgB,CAACC,OAAD,EAAWM,GAAD,CAAaH,GAAb,CAAV,CAFzB;AAID,KALA;AAMF,GAPD;AAQD;;AAIC,OAAOI,QAAP,KAAoB,WAApB,GAAkCC,yBAAK,CAACC,eAAxC,GAA0DD,yBAAK,CAACE;AAuB3D,SAASC,UAAT,CAA2CC,CAA3C,EAA2D;AAChE,SAAOA,CAAC,YAAYC,QAApB;AACD;AAEM,SAASC,SAAT,CACLC,GADK,EAELC,WAFK,EAGL;AACA,MAAMC,IAAa,GAAG,EAAtB;;AAEA,MAAMC,OAAO,GAAG,SAAVA,OAAU,CAACC,MAAD,EAAqB;AACnCA,IAAAA,MAAM,CAACC,OAAP,CAAe,UAAAC,IAAI,EAAI;AACrBJ,MAAAA,IAAI,CAACK,IAAL,CAAUD,IAAV;AACA,UAAME,QAAQ,GAAGP,WAAW,CAACK,IAAD,CAA5B;;AACA,UAAIE,QAAJ,YAAIA,QAAQ,CAAEC,MAAd,EAAsB;AACpBN,QAAAA,OAAO,CAACK,QAAD,CAAP;AACD;AACF,KAND;AAOD,GARD;;AAUAL,EAAAA,OAAO,CAACH,GAAD,CAAP;AAEA,SAAOE,IAAP;AACD;AAOD;IACaQ,UAA0B,GAAG,SAA7BA,UAA6B,CAACC,OAAD,EAAUC,MAAV,EAAqB;AAC7D,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