@cyberskill/shared 1.208.0 → 1.210.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 (401) hide show
  1. package/dist/{src/config → config}/config.type.d.ts +1 -1
  2. package/dist/config/config.type.js +4 -0
  3. package/dist/{src/config → config}/config.util.d.ts +1 -1
  4. package/dist/config/config.util.js +49 -0
  5. package/dist/{src/config → config}/env/env.util.js +7 -7
  6. package/dist/config/eslint/index.js +18 -0
  7. package/dist/config/graphql-codegen/graphql-codegen.util.js +37 -0
  8. package/dist/config/index.js +6 -0
  9. package/dist/config/vitest/vitest.e2e.js +23 -0
  10. package/dist/config/vitest/vitest.unit.js +19 -0
  11. package/dist/constant/common.js +4 -0
  12. package/dist/node/apollo-server/apollo-server.util.js +29 -0
  13. package/dist/node/cli/index.js +110 -0
  14. package/dist/node/command/command.type.js +4 -0
  15. package/dist/node/command/command.util.js +144 -0
  16. package/dist/node/command/index.js +11 -0
  17. package/dist/node/express/express.util.js +48 -0
  18. package/dist/node/express/index.js +13 -0
  19. package/dist/node/fs/fs.util.js +48 -0
  20. package/dist/node/log/index.js +8 -0
  21. package/dist/{log.type-DTOvZHyz.js → node/log/log.type.js} +1 -1
  22. package/dist/node/log/log.util.js +59 -0
  23. package/dist/node/mongo/index.js +17 -0
  24. package/dist/node/mongo/mongo.type.js +16 -0
  25. package/dist/node/mongo/mongo.util.js +488 -0
  26. package/dist/node/package/index.js +10 -0
  27. package/dist/node/package/package.type.js +4 -0
  28. package/dist/node/package/package.util.js +225 -0
  29. package/dist/node/path/index.js +52 -0
  30. package/dist/node/path/path.constant.js +273 -0
  31. package/dist/node/storage/storage.util.js +51 -0
  32. package/dist/node/upload/index.js +7 -0
  33. package/dist/node/upload/upload.type.js +4 -0
  34. package/dist/node/upload/upload.util.js +126 -0
  35. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js +6 -0
  36. package/dist/react/apollo-client/apollo-client.component.js +20 -0
  37. package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
  38. package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +1 -1
  39. package/dist/react/apollo-client/apollo-client.util.js +101 -0
  40. package/dist/react/apollo-client/index.js +29 -0
  41. package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
  42. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +14 -0
  43. package/dist/{src/react → react}/apollo-error/apollo-error.component.js +8 -15
  44. package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
  45. package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
  46. package/dist/react/apollo-error/apollo-error.util.js +11 -0
  47. package/dist/react/loading/loading.component.js +34 -0
  48. package/dist/react/loading/loading.module.scss.js +15 -0
  49. package/dist/{src/react → react}/loading/loading.provider.d.ts +1 -1
  50. package/dist/react/loading/loading.provider.js +17 -0
  51. package/dist/react/log/log.util.js +30 -0
  52. package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +1 -1
  53. package/dist/react/next-intl/next-intl.hoc.js +23 -0
  54. package/dist/react/next-intl/next-intl.provider.js +23 -0
  55. package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +1 -1
  56. package/dist/react/storage/storage.hook.js +61 -0
  57. package/dist/react/storage/storage.util.js +35 -0
  58. package/dist/react/userback/userback.component.js +27 -0
  59. package/dist/style.css +1 -1
  60. package/dist/typescript/index.d.ts +2 -0
  61. package/dist/typescript/index.js +4 -0
  62. package/dist/{src/util → util}/common/common.util.js +14 -25
  63. package/dist/{src/util → util}/object/object.util.d.ts +1 -1
  64. package/dist/util/object/object.util.js +67 -0
  65. package/dist/util/string/string.util.js +51 -0
  66. package/package.json +77 -110
  67. package/dist/config-B7WSlzSh.js +0 -8
  68. package/dist/config-DDQ9k8fw.cjs +0 -1
  69. package/dist/config.util-Ci2CZDut.cjs +0 -1
  70. package/dist/config.util-DKBwEBKR.js +0 -61
  71. package/dist/favicon/android-icon-144x144.png +0 -0
  72. package/dist/favicon/android-icon-192x192.png +0 -0
  73. package/dist/favicon/android-icon-36x36.png +0 -0
  74. package/dist/favicon/android-icon-48x48.png +0 -0
  75. package/dist/favicon/android-icon-72x72.png +0 -0
  76. package/dist/favicon/android-icon-96x96.png +0 -0
  77. package/dist/favicon/apple-icon-114x114.png +0 -0
  78. package/dist/favicon/apple-icon-120x120.png +0 -0
  79. package/dist/favicon/apple-icon-144x144.png +0 -0
  80. package/dist/favicon/apple-icon-152x152.png +0 -0
  81. package/dist/favicon/apple-icon-180x180.png +0 -0
  82. package/dist/favicon/apple-icon-57x57.png +0 -0
  83. package/dist/favicon/apple-icon-60x60.png +0 -0
  84. package/dist/favicon/apple-icon-72x72.png +0 -0
  85. package/dist/favicon/apple-icon-76x76.png +0 -0
  86. package/dist/favicon/apple-icon-precomposed.png +0 -0
  87. package/dist/favicon/apple-icon.png +0 -0
  88. package/dist/favicon/browserconfig.xml +0 -2
  89. package/dist/favicon/favicon-16x16.png +0 -0
  90. package/dist/favicon/favicon-32x32.png +0 -0
  91. package/dist/favicon/favicon-96x96.png +0 -0
  92. package/dist/favicon/favicon.ico +0 -0
  93. package/dist/favicon/manifest.json +0 -41
  94. package/dist/favicon/ms-icon-144x144.png +0 -0
  95. package/dist/favicon/ms-icon-150x150.png +0 -0
  96. package/dist/favicon/ms-icon-310x310.png +0 -0
  97. package/dist/favicon/ms-icon-70x70.png +0 -0
  98. package/dist/log.type-CMvG6Box.cjs +0 -1
  99. package/dist/magic-string.es-C6Zk6wMx.js +0 -671
  100. package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
  101. package/dist/path.constant-CWtb99gS.cjs +0 -2
  102. package/dist/path.constant-CvSr0Rrx.js +0 -682
  103. package/dist/src/config/commitlint/index.cjs +0 -1
  104. package/dist/src/config/config.util.cjs +0 -1
  105. package/dist/src/config/config.util.js +0 -9
  106. package/dist/src/config/env/env.constant.cjs +0 -1
  107. package/dist/src/config/env/env.d.cjs +0 -1
  108. package/dist/src/config/env/env.d.js +0 -1
  109. package/dist/src/config/env/env.util.cjs +0 -1
  110. package/dist/src/config/env/index.cjs +0 -1
  111. package/dist/src/config/eslint/index.cjs +0 -1
  112. package/dist/src/config/eslint/index.js +0 -29
  113. package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  114. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -46
  115. package/dist/src/config/graphql-codegen/index.cjs +0 -1
  116. package/dist/src/config/index.cjs +0 -1
  117. package/dist/src/config/index.js +0 -5
  118. package/dist/src/config/lint-staged/index.cjs +0 -1
  119. package/dist/src/config/vitest/index.cjs +0 -1
  120. package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
  121. package/dist/src/config/vitest/vitest.e2e.js +0 -33
  122. package/dist/src/config/vitest/vitest.unit.cjs +0 -1
  123. package/dist/src/config/vitest/vitest.unit.js +0 -30
  124. package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
  125. package/dist/src/config/vitest/vitest.unit.setup.js +0 -31519
  126. package/dist/src/constant/common.cjs +0 -1
  127. package/dist/src/constant/common.js +0 -4
  128. package/dist/src/constant/index.cjs +0 -1
  129. package/dist/src/constant/response-status.cjs +0 -1
  130. package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
  131. package/dist/src/node/apollo-server/apollo-server.util.js +0 -62
  132. package/dist/src/node/apollo-server/index.cjs +0 -1
  133. package/dist/src/node/cli/cli.util.cjs +0 -6
  134. package/dist/src/node/cli/cli.util.js +0 -171
  135. package/dist/src/node/cli/index.cjs +0 -1
  136. package/dist/src/node/cli/index.d.ts +0 -1
  137. package/dist/src/node/cli/index.js +0 -1
  138. package/dist/src/node/command/command.util.cjs +0 -1
  139. package/dist/src/node/command/command.util.js +0 -17
  140. package/dist/src/node/command/index.cjs +0 -1
  141. package/dist/src/node/command/index.js +0 -10
  142. package/dist/src/node/express/express.util.cjs +0 -1
  143. package/dist/src/node/express/express.util.js +0 -88
  144. package/dist/src/node/express/index.cjs +0 -1
  145. package/dist/src/node/express/index.js +0 -13
  146. package/dist/src/node/fs/fs.util.cjs +0 -1
  147. package/dist/src/node/fs/fs.util.js +0 -67
  148. package/dist/src/node/fs/index.cjs +0 -1
  149. package/dist/src/node/log/index.cjs +0 -1
  150. package/dist/src/node/log/index.js +0 -8
  151. package/dist/src/node/log/log.util.cjs +0 -1
  152. package/dist/src/node/log/log.util.js +0 -60
  153. package/dist/src/node/mongo/index.cjs +0 -1
  154. package/dist/src/node/mongo/index.js +0 -26
  155. package/dist/src/node/mongo/mongo.constant.cjs +0 -1
  156. package/dist/src/node/mongo/mongo.util.cjs +0 -5
  157. package/dist/src/node/mongo/mongo.util.js +0 -564
  158. package/dist/src/node/package/index.cjs +0 -1
  159. package/dist/src/node/package/index.js +0 -9
  160. package/dist/src/node/package/package.util.cjs +0 -1
  161. package/dist/src/node/package/package.util.js +0 -13
  162. package/dist/src/node/path/index.cjs +0 -1
  163. package/dist/src/node/path/index.js +0 -52
  164. package/dist/src/node/path/path.constant.cjs +0 -1
  165. package/dist/src/node/path/path.constant.js +0 -49
  166. package/dist/src/node/path/path.util.cjs +0 -1
  167. package/dist/src/node/storage/index.cjs +0 -1
  168. package/dist/src/node/storage/storage.util.cjs +0 -1
  169. package/dist/src/node/storage/storage.util.js +0 -81
  170. package/dist/src/node/upload/index.cjs +0 -1
  171. package/dist/src/node/upload/index.js +0 -6
  172. package/dist/src/node/upload/upload.util.cjs +0 -1
  173. package/dist/src/node/upload/upload.util.js +0 -8
  174. package/dist/src/node/ws/index.cjs +0 -1
  175. package/dist/src/node/ws/ts.util.cjs +0 -1
  176. package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
  177. package/dist/src/react/apollo-client/apollo-client.component.js +0 -21
  178. package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
  179. package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
  180. package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
  181. package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
  182. package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
  183. package/dist/src/react/apollo-client/apollo-client.util.js +0 -116
  184. package/dist/src/react/apollo-client/index.cjs +0 -1
  185. package/dist/src/react/apollo-client/index.js +0 -30
  186. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
  187. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
  188. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
  189. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -24
  190. package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
  191. package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
  192. package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
  193. package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
  194. package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
  195. package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
  196. package/dist/src/react/apollo-error/apollo-error.util.js +0 -11
  197. package/dist/src/react/apollo-error/index.cjs +0 -1
  198. package/dist/src/react/i18next/i18next.hook.cjs +0 -1
  199. package/dist/src/react/i18next/i18next.util.cjs +0 -1
  200. package/dist/src/react/i18next/index.cjs +0 -1
  201. package/dist/src/react/loading/index.cjs +0 -1
  202. package/dist/src/react/loading/loading.component.cjs +0 -6
  203. package/dist/src/react/loading/loading.component.js +0 -61
  204. package/dist/src/react/loading/loading.context.cjs +0 -1
  205. package/dist/src/react/loading/loading.hook.cjs +0 -1
  206. package/dist/src/react/loading/loading.provider.cjs +0 -1
  207. package/dist/src/react/loading/loading.provider.js +0 -17
  208. package/dist/src/react/log/index.cjs +0 -1
  209. package/dist/src/react/log/log.util.cjs +0 -1
  210. package/dist/src/react/log/log.util.js +0 -30
  211. package/dist/src/react/next-intl/index.cjs +0 -1
  212. package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
  213. package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
  214. package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
  215. package/dist/src/react/next-intl/next-intl.hoc.js +0 -35
  216. package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
  217. package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
  218. package/dist/src/react/next-intl/next-intl.provider.js +0 -25
  219. package/dist/src/react/storage/index.cjs +0 -1
  220. package/dist/src/react/storage/storage.hook.cjs +0 -1
  221. package/dist/src/react/storage/storage.hook.js +0 -77
  222. package/dist/src/react/storage/storage.util.cjs +0 -1
  223. package/dist/src/react/storage/storage.util.js +0 -60
  224. package/dist/src/react/toast/index.cjs +0 -1
  225. package/dist/src/react/userback/index.cjs +0 -1
  226. package/dist/src/react/userback/userback.component.cjs +0 -1
  227. package/dist/src/react/userback/userback.component.js +0 -54
  228. package/dist/src/typescript/common.cjs +0 -1
  229. package/dist/src/typescript/index.cjs +0 -1
  230. package/dist/src/typescript/index.d.ts +0 -2
  231. package/dist/src/typescript/index.js +0 -4
  232. package/dist/src/typescript/react.cjs +0 -1
  233. package/dist/src/typescript/react.js +0 -1
  234. package/dist/src/typescript/style.d.cjs +0 -1
  235. package/dist/src/typescript/style.d.js +0 -1
  236. package/dist/src/util/common/common.util.cjs +0 -1
  237. package/dist/src/util/common/index.cjs +0 -1
  238. package/dist/src/util/index.cjs +0 -1
  239. package/dist/src/util/object/index.cjs +0 -1
  240. package/dist/src/util/object/object.util.cjs +0 -1
  241. package/dist/src/util/object/object.util.js +0 -77
  242. package/dist/src/util/serializer/index.cjs +0 -1
  243. package/dist/src/util/serializer/serializer.util.cjs +0 -1
  244. package/dist/src/util/string/index.cjs +0 -1
  245. package/dist/src/util/string/string.util.cjs +0 -1
  246. package/dist/src/util/string/string.util.js +0 -64
  247. package/dist/src/util/validate/index.cjs +0 -1
  248. package/dist/src/util/validate/validate.util.cjs +0 -1
  249. package/dist/tsconfig.base.json +0 -37
  250. package/dist/upload.util-CE3MjBdh.cjs +0 -1
  251. package/dist/upload.util-D4aUdmPo.js +0 -160
  252. /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
  253. /package/dist/{src/config → config}/commitlint/index.js +0 -0
  254. /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
  255. /package/dist/{src/config → config}/env/env.constant.js +0 -0
  256. /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
  257. /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
  258. /package/dist/{src/config → config}/env/index.d.ts +0 -0
  259. /package/dist/{src/config → config}/env/index.js +0 -0
  260. /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
  261. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
  262. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
  263. /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
  264. /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
  265. /package/dist/{src/config → config}/index.d.ts +0 -0
  266. /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
  267. /package/dist/{src/config → config}/lint-staged/index.js +0 -0
  268. /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
  269. /package/dist/{src/config → config}/vitest/index.js +0 -0
  270. /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
  271. /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
  272. /package/dist/{src/constant → constant}/common.d.ts +0 -0
  273. /package/dist/{src/constant → constant}/index.d.ts +0 -0
  274. /package/dist/{src/constant → constant}/index.js +0 -0
  275. /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
  276. /package/dist/{src/constant → constant}/response-status.js +0 -0
  277. /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
  278. /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
  279. /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
  280. /package/dist/{src/node → node}/apollo-server/index.js +0 -0
  281. /package/dist/{src/node/cli/cli.util.d.ts → node/cli/index.d.ts} +0 -0
  282. /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
  283. /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
  284. /package/dist/{src/node → node}/command/index.d.ts +0 -0
  285. /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
  286. /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
  287. /package/dist/{src/node → node}/express/index.d.ts +0 -0
  288. /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
  289. /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
  290. /package/dist/{src/node → node}/fs/index.d.ts +0 -0
  291. /package/dist/{src/node → node}/fs/index.js +0 -0
  292. /package/dist/{src/node → node}/log/index.d.ts +0 -0
  293. /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
  294. /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
  295. /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
  296. /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
  297. /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
  298. /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
  299. /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
  300. /package/dist/{src/node → node}/package/index.d.ts +0 -0
  301. /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
  302. /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
  303. /package/dist/{src/node → node}/path/index.d.ts +0 -0
  304. /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
  305. /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
  306. /package/dist/{src/node → node}/path/path.util.js +0 -0
  307. /package/dist/{src/node → node}/storage/index.d.ts +0 -0
  308. /package/dist/{src/node → node}/storage/index.js +0 -0
  309. /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
  310. /package/dist/{src/node → node}/upload/index.d.ts +0 -0
  311. /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
  312. /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
  313. /package/dist/{src/node → node}/ws/index.d.ts +0 -0
  314. /package/dist/{src/node → node}/ws/index.js +0 -0
  315. /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
  316. /package/dist/{src/node → node}/ws/ts.util.js +0 -0
  317. /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
  318. /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
  319. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
  320. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
  321. /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
  322. /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
  323. /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
  324. /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
  325. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
  326. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
  327. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
  328. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
  329. /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
  330. /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
  331. /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
  332. /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
  333. /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
  334. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
  335. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
  336. /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
  337. /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
  338. /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
  339. /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
  340. /package/dist/{src/react → react}/apollo-error/index.js +0 -0
  341. /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
  342. /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
  343. /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
  344. /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
  345. /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
  346. /package/dist/{src/react → react}/i18next/index.js +0 -0
  347. /package/dist/{src/react → react}/loading/index.d.ts +0 -0
  348. /package/dist/{src/react → react}/loading/index.js +0 -0
  349. /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
  350. /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
  351. /package/dist/{src/react → react}/loading/loading.context.js +0 -0
  352. /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
  353. /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
  354. /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
  355. /package/dist/{src/react → react}/log/index.d.ts +0 -0
  356. /package/dist/{src/react → react}/log/index.js +0 -0
  357. /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
  358. /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
  359. /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
  360. /package/dist/{src/react → react}/next-intl/index.js +0 -0
  361. /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
  362. /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
  363. /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
  364. /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
  365. /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
  366. /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
  367. /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
  368. /package/dist/{src/react → react}/storage/index.d.ts +0 -0
  369. /package/dist/{src/react → react}/storage/index.js +0 -0
  370. /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
  371. /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
  372. /package/dist/{src/react → react}/toast/index.d.ts +0 -0
  373. /package/dist/{src/react → react}/toast/index.js +0 -0
  374. /package/dist/{src/react → react}/userback/index.d.ts +0 -0
  375. /package/dist/{src/react → react}/userback/index.js +0 -0
  376. /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
  377. /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
  378. /package/dist/{src/typescript/common.d.ts → typescript/common.type.d.ts} +0 -0
  379. /package/dist/{src/typescript/common.js → typescript/common.type.js} +0 -0
  380. /package/dist/{src/typescript/react.d.ts → typescript/react.type.d.ts} +0 -0
  381. /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
  382. /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
  383. /package/dist/{src/util → util}/common/index.d.ts +0 -0
  384. /package/dist/{src/util → util}/common/index.js +0 -0
  385. /package/dist/{src/util → util}/index.d.ts +0 -0
  386. /package/dist/{src/util → util}/index.js +0 -0
  387. /package/dist/{src/util → util}/object/index.d.ts +0 -0
  388. /package/dist/{src/util → util}/object/index.js +0 -0
  389. /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
  390. /package/dist/{src/util → util}/serializer/index.js +0 -0
  391. /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
  392. /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
  393. /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
  394. /package/dist/{src/util → util}/string/index.d.ts +0 -0
  395. /package/dist/{src/util → util}/string/index.js +0 -0
  396. /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
  397. /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
  398. /package/dist/{src/util → util}/validate/index.d.ts +0 -0
  399. /package/dist/{src/util → util}/validate/index.js +0 -0
  400. /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
  401. /package/dist/{src/util → util}/validate/validate.util.js +0 -0
@@ -1,671 +0,0 @@
1
- var R = Object.defineProperty, _ = Object.defineProperties;
2
- var O = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var N = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
- var b = (h, t, e) => t in h ? R(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e, C = (h, t) => {
6
- for (var e in t || (t = {}))
7
- N.call(t, e) && b(h, e, t[e]);
8
- if (m)
9
- for (var e of m(t))
10
- I.call(t, e) && b(h, e, t[e]);
11
- return h;
12
- }, y = (h, t) => _(h, O(t));
13
- var A = 44, T = 59, S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", k = new Uint8Array(64), j = new Uint8Array(128);
14
- for (let h = 0; h < S.length; h++) {
15
- const t = S.charCodeAt(h);
16
- k[h] = t, j[t] = h;
17
- }
18
- function c(h, t, e) {
19
- let i = t - e;
20
- i = i < 0 ? -i << 1 | 1 : i << 1;
21
- do {
22
- let n = i & 31;
23
- i >>>= 5, i > 0 && (n |= 32), h.write(k[n]);
24
- } while (i > 0);
25
- return t;
26
- }
27
- var v = 1024 * 16, x = typeof TextDecoder != "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer != "undefined" ? {
28
- decode(h) {
29
- return Buffer.from(h.buffer, h.byteOffset, h.byteLength).toString();
30
- }
31
- } : {
32
- decode(h) {
33
- let t = "";
34
- for (let e = 0; e < h.length; e++)
35
- t += String.fromCharCode(h[e]);
36
- return t;
37
- }
38
- }, $ = class {
39
- constructor() {
40
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(v);
41
- }
42
- write(h) {
43
- const { buffer: t } = this;
44
- t[this.pos++] = h, this.pos === v && (this.out += x.decode(t), this.pos = 0);
45
- }
46
- flush() {
47
- const { buffer: h, out: t, pos: e } = this;
48
- return e > 0 ? t + x.decode(h.subarray(0, e)) : t;
49
- }
50
- };
51
- function U(h) {
52
- const t = new $();
53
- let e = 0, i = 0, n = 0, r = 0;
54
- for (let s = 0; s < h.length; s++) {
55
- const l = h[s];
56
- if (s > 0 && t.write(T), l.length === 0) continue;
57
- let o = 0;
58
- for (let u = 0; u < l.length; u++) {
59
- const a = l[u];
60
- u > 0 && t.write(A), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
61
- }
62
- }
63
- return t.flush();
64
- }
65
- class p {
66
- constructor(t) {
67
- this.bits = t instanceof p ? t.bits.slice() : [];
68
- }
69
- add(t) {
70
- this.bits[t >> 5] |= 1 << (t & 31);
71
- }
72
- has(t) {
73
- return !!(this.bits[t >> 5] & 1 << (t & 31));
74
- }
75
- }
76
- class g {
77
- constructor(t, e, i) {
78
- this.start = t, this.end = e, this.original = i, this.intro = "", this.outro = "", this.content = i, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
79
- }
80
- appendLeft(t) {
81
- this.outro += t;
82
- }
83
- appendRight(t) {
84
- this.intro = this.intro + t;
85
- }
86
- clone() {
87
- const t = new g(this.start, this.end, this.original);
88
- return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
89
- }
90
- contains(t) {
91
- return this.start < t && t < this.end;
92
- }
93
- eachNext(t) {
94
- let e = this;
95
- for (; e; )
96
- t(e), e = e.next;
97
- }
98
- eachPrevious(t) {
99
- let e = this;
100
- for (; e; )
101
- t(e), e = e.previous;
102
- }
103
- edit(t, e, i) {
104
- return this.content = t, i || (this.intro = "", this.outro = ""), this.storeName = e, this.edited = !0, this;
105
- }
106
- prependLeft(t) {
107
- this.outro = t + this.outro;
108
- }
109
- prependRight(t) {
110
- this.intro = t + this.intro;
111
- }
112
- reset() {
113
- this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
114
- }
115
- split(t) {
116
- const e = t - this.start, i = this.original.slice(0, e), n = this.original.slice(e);
117
- this.original = i;
118
- const r = new g(t, this.end, n);
119
- return r.outro = this.outro, this.outro = "", this.end = t, this.edited ? (r.edit("", !1), this.content = "") : this.content = i, r.next = this.next, r.next && (r.next.previous = r), r.previous = this, this.next = r, r;
120
- }
121
- toString() {
122
- return this.intro + this.content + this.outro;
123
- }
124
- trimEnd(t) {
125
- if (this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
126
- const e = this.content.replace(t, "");
127
- if (e.length)
128
- return e !== this.content && (this.split(this.start + e.length).edit("", void 0, !0), this.edited && this.edit(e, this.storeName, !0)), !0;
129
- if (this.edit("", void 0, !0), this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
130
- }
131
- trimStart(t) {
132
- if (this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
133
- const e = this.content.replace(t, "");
134
- if (e.length) {
135
- if (e !== this.content) {
136
- const i = this.split(this.end - e.length);
137
- this.edited && i.edit(e, this.storeName, !0), this.edit("", void 0, !0);
138
- }
139
- return !0;
140
- } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
141
- }
142
- }
143
- function B() {
144
- return typeof globalThis != "undefined" && typeof globalThis.btoa == "function" ? (h) => globalThis.btoa(unescape(encodeURIComponent(h))) : typeof Buffer == "function" ? (h) => Buffer.from(h, "utf-8").toString("base64") : () => {
145
- throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
146
- };
147
- }
148
- const M = /* @__PURE__ */ B();
149
- class P {
150
- constructor(t) {
151
- this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = U(t.mappings), typeof t.x_google_ignoreList != "undefined" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId != "undefined" && (this.debugId = t.debugId);
152
- }
153
- toString() {
154
- return JSON.stringify(this);
155
- }
156
- toUrl() {
157
- return "data:application/json;charset=utf-8;base64," + M(this.toString());
158
- }
159
- }
160
- function D(h) {
161
- const t = h.split(`
162
- `), e = t.filter((r) => /^\t+/.test(r)), i = t.filter((r) => /^ {2,}/.test(r));
163
- if (e.length === 0 && i.length === 0)
164
- return null;
165
- if (e.length >= i.length)
166
- return " ";
167
- const n = i.reduce((r, s) => {
168
- const l = /^ +/.exec(s)[0].length;
169
- return Math.min(l, r);
170
- }, 1 / 0);
171
- return new Array(n + 1).join(" ");
172
- }
173
- function z(h, t) {
174
- const e = h.split(/[/\\]/), i = t.split(/[/\\]/);
175
- for (e.pop(); e[0] === i[0]; )
176
- e.shift(), i.shift();
177
- if (e.length) {
178
- let n = e.length;
179
- for (; n--; ) e[n] = "..";
180
- }
181
- return e.concat(i).join("/");
182
- }
183
- const F = Object.prototype.toString;
184
- function H(h) {
185
- return F.call(h) === "[object Object]";
186
- }
187
- function E(h) {
188
- const t = h.split(`
189
- `), e = [];
190
- for (let i = 0, n = 0; i < t.length; i++)
191
- e.push(n), n += t[i].length + 1;
192
- return function(n) {
193
- let r = 0, s = e.length;
194
- for (; r < s; ) {
195
- const u = r + s >> 1;
196
- n < e[u] ? s = u : r = u + 1;
197
- }
198
- const l = r - 1, o = n - e[l];
199
- return { line: l, column: o };
200
- };
201
- }
202
- const J = /\w/;
203
- class W {
204
- constructor(t) {
205
- this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
206
- }
207
- addEdit(t, e, i, n) {
208
- if (e.length) {
209
- const r = e.length - 1;
210
- let s = e.indexOf(`
211
- `, 0), l = -1;
212
- for (; s >= 0 && r > s; ) {
213
- const u = [this.generatedCodeColumn, t, i.line, i.column];
214
- n >= 0 && u.push(n), this.rawSegments.push(u), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, l = s, s = e.indexOf(`
215
- `, s + 1);
216
- }
217
- const o = [this.generatedCodeColumn, t, i.line, i.column];
218
- n >= 0 && o.push(n), this.rawSegments.push(o), this.advance(e.slice(l + 1));
219
- } else this.pending && (this.rawSegments.push(this.pending), this.advance(e));
220
- this.pending = null;
221
- }
222
- addUneditedChunk(t, e, i, n, r) {
223
- let s = e.start, l = !0, o = !1;
224
- for (; s < e.end; ) {
225
- if (i[s] === `
226
- `)
227
- n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, l = !0, o = !1;
228
- else {
229
- if (this.hires || l || r.has(s)) {
230
- const u = [this.generatedCodeColumn, t, n.line, n.column];
231
- this.hires === "boundary" ? J.test(i[s]) ? o || (this.rawSegments.push(u), o = !0) : (this.rawSegments.push(u), o = !1) : this.rawSegments.push(u);
232
- }
233
- n.column += 1, this.generatedCodeColumn += 1, l = !1;
234
- }
235
- s += 1;
236
- }
237
- this.pending = null;
238
- }
239
- advance(t) {
240
- if (!t) return;
241
- const e = t.split(`
242
- `);
243
- if (e.length > 1) {
244
- for (let i = 0; i < e.length - 1; i++)
245
- this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
246
- this.generatedCodeColumn = 0;
247
- }
248
- this.generatedCodeColumn += e[e.length - 1].length;
249
- }
250
- }
251
- const d = `
252
- `, f = {
253
- insertLeft: !1,
254
- insertRight: !1,
255
- storeName: !1
256
- };
257
- class L {
258
- constructor(t, e = {}) {
259
- const i = new g(0, t.length, t);
260
- Object.defineProperties(this, {
261
- original: { writable: !0, value: t },
262
- outro: { writable: !0, value: "" },
263
- intro: { writable: !0, value: "" },
264
- firstChunk: { writable: !0, value: i },
265
- lastChunk: { writable: !0, value: i },
266
- lastSearchedChunk: { writable: !0, value: i },
267
- byStart: { writable: !0, value: {} },
268
- byEnd: { writable: !0, value: {} },
269
- filename: { writable: !0, value: e.filename },
270
- indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
271
- sourcemapLocations: { writable: !0, value: new p() },
272
- storedNames: { writable: !0, value: {} },
273
- indentStr: { writable: !0, value: void 0 },
274
- ignoreList: { writable: !0, value: e.ignoreList },
275
- offset: { writable: !0, value: e.offset || 0 }
276
- }), this.byStart[0] = i, this.byEnd[t.length] = i;
277
- }
278
- addSourcemapLocation(t) {
279
- this.sourcemapLocations.add(t);
280
- }
281
- append(t) {
282
- if (typeof t != "string") throw new TypeError("outro content must be a string");
283
- return this.outro += t, this;
284
- }
285
- appendLeft(t, e) {
286
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
287
- this._split(t);
288
- const i = this.byEnd[t];
289
- return i ? i.appendLeft(e) : this.intro += e, this;
290
- }
291
- appendRight(t, e) {
292
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
293
- this._split(t);
294
- const i = this.byStart[t];
295
- return i ? i.appendRight(e) : this.outro += e, this;
296
- }
297
- clone() {
298
- const t = new L(this.original, { filename: this.filename, offset: this.offset });
299
- let e = this.firstChunk, i = t.firstChunk = t.lastSearchedChunk = e.clone();
300
- for (; e; ) {
301
- t.byStart[i.start] = i, t.byEnd[i.end] = i;
302
- const n = e.next, r = n && n.clone();
303
- r && (i.next = r, r.previous = i, i = r), e = n;
304
- }
305
- return t.lastChunk = i, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new p(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
306
- }
307
- generateDecodedMap(t) {
308
- t = t || {};
309
- const e = 0, i = Object.keys(this.storedNames), n = new W(t.hires), r = E(this.original);
310
- return this.intro && n.advance(this.intro), this.firstChunk.eachNext((s) => {
311
- const l = r(s.start);
312
- s.intro.length && n.advance(s.intro), s.edited ? n.addEdit(
313
- e,
314
- s.content,
315
- l,
316
- s.storeName ? i.indexOf(s.original) : -1
317
- ) : n.addUneditedChunk(e, s, this.original, l, this.sourcemapLocations), s.outro.length && n.advance(s.outro);
318
- }), {
319
- file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
320
- sources: [
321
- t.source ? z(t.file || "", t.source) : t.file || ""
322
- ],
323
- sourcesContent: t.includeContent ? [this.original] : void 0,
324
- names: i,
325
- mappings: n.raw,
326
- x_google_ignoreList: this.ignoreList ? [e] : void 0
327
- };
328
- }
329
- generateMap(t) {
330
- return new P(this.generateDecodedMap(t));
331
- }
332
- _ensureindentStr() {
333
- this.indentStr === void 0 && (this.indentStr = D(this.original));
334
- }
335
- _getRawIndentString() {
336
- return this._ensureindentStr(), this.indentStr;
337
- }
338
- getIndentString() {
339
- return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
340
- }
341
- indent(t, e) {
342
- const i = /^[^\r\n]/gm;
343
- if (H(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
344
- e = e || {};
345
- const n = {};
346
- e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((a) => {
347
- for (let w = a[0]; w < a[1]; w += 1)
348
- n[w] = !0;
349
- });
350
- let r = e.indentStart !== !1;
351
- const s = (u) => r ? `${t}${u}` : (r = !0, u);
352
- this.intro = this.intro.replace(i, s);
353
- let l = 0, o = this.firstChunk;
354
- for (; o; ) {
355
- const u = o.end;
356
- if (o.edited)
357
- n[l] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
358
- `));
359
- else
360
- for (l = o.start; l < u; ) {
361
- if (!n[l]) {
362
- const a = this.original[l];
363
- a === `
364
- ` ? r = !0 : a !== "\r" && r && (r = !1, l === o.start || (this._splitChunk(o, l), o = o.next), o.prependRight(t));
365
- }
366
- l += 1;
367
- }
368
- l = o.end, o = o.next;
369
- }
370
- return this.outro = this.outro.replace(i, s), this;
371
- }
372
- insert() {
373
- throw new Error(
374
- "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
375
- );
376
- }
377
- insertLeft(t, e) {
378
- return f.insertLeft || (console.warn(
379
- "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
380
- ), f.insertLeft = !0), this.appendLeft(t, e);
381
- }
382
- insertRight(t, e) {
383
- return f.insertRight || (console.warn(
384
- "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
385
- ), f.insertRight = !0), this.prependRight(t, e);
386
- }
387
- move(t, e, i) {
388
- if (t = t + this.offset, e = e + this.offset, i = i + this.offset, i >= t && i <= e) throw new Error("Cannot move a selection inside itself");
389
- this._split(t), this._split(e), this._split(i);
390
- const n = this.byStart[t], r = this.byEnd[e], s = n.previous, l = r.next, o = this.byStart[i];
391
- if (!o && r === this.lastChunk) return this;
392
- const u = o ? o.previous : this.lastChunk;
393
- return s && (s.next = l), l && (l.previous = s), u && (u.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = u, r.next = o || null, u || (this.firstChunk = n), o || (this.lastChunk = r), this;
394
- }
395
- overwrite(t, e, i, n) {
396
- return n = n || {}, this.update(t, e, i, y(C({}, n), { overwrite: !n.contentOnly }));
397
- }
398
- update(t, e, i, n) {
399
- if (t = t + this.offset, e = e + this.offset, typeof i != "string") throw new TypeError("replacement content must be a string");
400
- if (this.original.length !== 0) {
401
- for (; t < 0; ) t += this.original.length;
402
- for (; e < 0; ) e += this.original.length;
403
- }
404
- if (e > this.original.length) throw new Error("end is out of bounds");
405
- if (t === e)
406
- throw new Error(
407
- "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
408
- );
409
- this._split(t), this._split(e), n === !0 && (f.storeName || (console.warn(
410
- "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
411
- ), f.storeName = !0), n = { storeName: !0 });
412
- const r = n !== void 0 ? n.storeName : !1, s = n !== void 0 ? n.overwrite : !1;
413
- if (r) {
414
- const u = this.original.slice(t, e);
415
- Object.defineProperty(this.storedNames, u, {
416
- writable: !0,
417
- value: !0,
418
- enumerable: !0
419
- });
420
- }
421
- const l = this.byStart[t], o = this.byEnd[e];
422
- if (l) {
423
- let u = l;
424
- for (; u !== o; ) {
425
- if (u.next !== this.byStart[u.end])
426
- throw new Error("Cannot overwrite across a split point");
427
- u = u.next, u.edit("", !1);
428
- }
429
- l.edit(i, r, !s);
430
- } else {
431
- const u = new g(t, e, "").edit(i, r);
432
- o.next = u, u.previous = o;
433
- }
434
- return this;
435
- }
436
- prepend(t) {
437
- if (typeof t != "string") throw new TypeError("outro content must be a string");
438
- return this.intro = t + this.intro, this;
439
- }
440
- prependLeft(t, e) {
441
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
442
- this._split(t);
443
- const i = this.byEnd[t];
444
- return i ? i.prependLeft(e) : this.intro = e + this.intro, this;
445
- }
446
- prependRight(t, e) {
447
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
448
- this._split(t);
449
- const i = this.byStart[t];
450
- return i ? i.prependRight(e) : this.outro = e + this.outro, this;
451
- }
452
- remove(t, e) {
453
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
454
- for (; t < 0; ) t += this.original.length;
455
- for (; e < 0; ) e += this.original.length;
456
- }
457
- if (t === e) return this;
458
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
459
- if (t > e) throw new Error("end must be greater than start");
460
- this._split(t), this._split(e);
461
- let i = this.byStart[t];
462
- for (; i; )
463
- i.intro = "", i.outro = "", i.edit(""), i = e > i.end ? this.byStart[i.end] : null;
464
- return this;
465
- }
466
- reset(t, e) {
467
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
468
- for (; t < 0; ) t += this.original.length;
469
- for (; e < 0; ) e += this.original.length;
470
- }
471
- if (t === e) return this;
472
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
473
- if (t > e) throw new Error("end must be greater than start");
474
- this._split(t), this._split(e);
475
- let i = this.byStart[t];
476
- for (; i; )
477
- i.reset(), i = e > i.end ? this.byStart[i.end] : null;
478
- return this;
479
- }
480
- lastChar() {
481
- if (this.outro.length) return this.outro[this.outro.length - 1];
482
- let t = this.lastChunk;
483
- do {
484
- if (t.outro.length) return t.outro[t.outro.length - 1];
485
- if (t.content.length) return t.content[t.content.length - 1];
486
- if (t.intro.length) return t.intro[t.intro.length - 1];
487
- } while (t = t.previous);
488
- return this.intro.length ? this.intro[this.intro.length - 1] : "";
489
- }
490
- lastLine() {
491
- let t = this.outro.lastIndexOf(d);
492
- if (t !== -1) return this.outro.substr(t + 1);
493
- let e = this.outro, i = this.lastChunk;
494
- do {
495
- if (i.outro.length > 0) {
496
- if (t = i.outro.lastIndexOf(d), t !== -1) return i.outro.substr(t + 1) + e;
497
- e = i.outro + e;
498
- }
499
- if (i.content.length > 0) {
500
- if (t = i.content.lastIndexOf(d), t !== -1) return i.content.substr(t + 1) + e;
501
- e = i.content + e;
502
- }
503
- if (i.intro.length > 0) {
504
- if (t = i.intro.lastIndexOf(d), t !== -1) return i.intro.substr(t + 1) + e;
505
- e = i.intro + e;
506
- }
507
- } while (i = i.previous);
508
- return t = this.intro.lastIndexOf(d), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
509
- }
510
- slice(t = 0, e = this.original.length - this.offset) {
511
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
512
- for (; t < 0; ) t += this.original.length;
513
- for (; e < 0; ) e += this.original.length;
514
- }
515
- let i = "", n = this.firstChunk;
516
- for (; n && (n.start > t || n.end <= t); ) {
517
- if (n.start < e && n.end >= e)
518
- return i;
519
- n = n.next;
520
- }
521
- if (n && n.edited && n.start !== t)
522
- throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);
523
- const r = n;
524
- for (; n; ) {
525
- n.intro && (r !== n || n.start === t) && (i += n.intro);
526
- const s = n.start < e && n.end >= e;
527
- if (s && n.edited && n.end !== e)
528
- throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);
529
- const l = r === n ? t - n.start : 0, o = s ? n.content.length + e - n.end : n.content.length;
530
- if (i += n.content.slice(l, o), n.outro && (!s || n.end === e) && (i += n.outro), s)
531
- break;
532
- n = n.next;
533
- }
534
- return i;
535
- }
536
- // TODO deprecate this? not really very useful
537
- snip(t, e) {
538
- const i = this.clone();
539
- return i.remove(0, t), i.remove(e, i.original.length), i;
540
- }
541
- _split(t) {
542
- if (this.byStart[t] || this.byEnd[t]) return;
543
- let e = this.lastSearchedChunk;
544
- const i = t > e.end;
545
- for (; e; ) {
546
- if (e.contains(t)) return this._splitChunk(e, t);
547
- e = i ? this.byStart[e.end] : this.byEnd[e.start];
548
- }
549
- }
550
- _splitChunk(t, e) {
551
- if (t.edited && t.content.length) {
552
- const n = E(this.original)(e);
553
- throw new Error(
554
- `Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`
555
- );
556
- }
557
- const i = t.split(e);
558
- return this.byEnd[e] = t, this.byStart[e] = i, this.byEnd[i.end] = i, t === this.lastChunk && (this.lastChunk = i), this.lastSearchedChunk = t, !0;
559
- }
560
- toString() {
561
- let t = this.intro, e = this.firstChunk;
562
- for (; e; )
563
- t += e.toString(), e = e.next;
564
- return t + this.outro;
565
- }
566
- isEmpty() {
567
- let t = this.firstChunk;
568
- do
569
- if (t.intro.length && t.intro.trim() || t.content.length && t.content.trim() || t.outro.length && t.outro.trim())
570
- return !1;
571
- while (t = t.next);
572
- return !0;
573
- }
574
- length() {
575
- let t = this.firstChunk, e = 0;
576
- do
577
- e += t.intro.length + t.content.length + t.outro.length;
578
- while (t = t.next);
579
- return e;
580
- }
581
- trimLines() {
582
- return this.trim("[\\r\\n]");
583
- }
584
- trim(t) {
585
- return this.trimStart(t).trimEnd(t);
586
- }
587
- trimEndAborted(t) {
588
- const e = new RegExp((t || "\\s") + "+$");
589
- if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
590
- let i = this.lastChunk;
591
- do {
592
- const n = i.end, r = i.trimEnd(e);
593
- if (i.end !== n && (this.lastChunk === i && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
594
- i = i.previous;
595
- } while (i);
596
- return !1;
597
- }
598
- trimEnd(t) {
599
- return this.trimEndAborted(t), this;
600
- }
601
- trimStartAborted(t) {
602
- const e = new RegExp("^" + (t || "\\s") + "+");
603
- if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
604
- let i = this.firstChunk;
605
- do {
606
- const n = i.end, r = i.trimStart(e);
607
- if (i.end !== n && (i === this.lastChunk && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
608
- i = i.next;
609
- } while (i);
610
- return !1;
611
- }
612
- trimStart(t) {
613
- return this.trimStartAborted(t), this;
614
- }
615
- hasChanged() {
616
- return this.original !== this.toString();
617
- }
618
- _replaceRegexp(t, e) {
619
- function i(r, s) {
620
- return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (l, o) => o === "$" ? "$" : o === "&" ? r[0] : +o < r.length ? r[+o] : `$${o}`) : e(...r, r.index, s, r.groups);
621
- }
622
- function n(r, s) {
623
- let l;
624
- const o = [];
625
- for (; l = r.exec(s); )
626
- o.push(l);
627
- return o;
628
- }
629
- if (t.global)
630
- n(t, this.original).forEach((s) => {
631
- if (s.index != null) {
632
- const l = i(s, this.original);
633
- l !== s[0] && this.overwrite(s.index, s.index + s[0].length, l);
634
- }
635
- });
636
- else {
637
- const r = this.original.match(t);
638
- if (r && r.index != null) {
639
- const s = i(r, this.original);
640
- s !== r[0] && this.overwrite(r.index, r.index + r[0].length, s);
641
- }
642
- }
643
- return this;
644
- }
645
- _replaceString(t, e) {
646
- const { original: i } = this, n = i.indexOf(t);
647
- return n !== -1 && this.overwrite(n, n + t.length, e), this;
648
- }
649
- replace(t, e) {
650
- return typeof t == "string" ? this._replaceString(t, e) : this._replaceRegexp(t, e);
651
- }
652
- _replaceAllString(t, e) {
653
- const { original: i } = this, n = t.length;
654
- for (let r = i.indexOf(t); r !== -1; r = i.indexOf(t, r + n))
655
- i.slice(r, r + n) !== e && this.overwrite(r, r + n, e);
656
- return this;
657
- }
658
- replaceAll(t, e) {
659
- if (typeof t == "string")
660
- return this._replaceAllString(t, e);
661
- if (!t.global)
662
- throw new TypeError(
663
- "MagicString.prototype.replaceAll called with a non-global RegExp argument"
664
- );
665
- return this._replaceRegexp(t, e);
666
- }
667
- }
668
- export {
669
- P as SourceMap,
670
- L as default
671
- };