@kg-ui/kg-ui-plus 0.0.1 → 0.0.3
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/README.md +3 -3
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +16 -0
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +26 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +49 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +94 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +33 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +140 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +131 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +21 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +131 -0
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/mdInCode.mjs +56 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue2.mjs +87 -0
- package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +4 -0
- package/dist/es/KgCopilot/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/index.vue2.mjs +49 -0
- package/dist/es/KgCopilot/index.vue3.mjs +4 -0
- package/dist/es/_virtual/___vite-browser-external.mjs +6 -0
- package/dist/es/_virtual/__vite-browser-external.mjs +4 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +34 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/_virtual/index.mjs +13 -0
- package/dist/es/api/project.mjs +51 -0
- package/dist/es/directives/heighlight/index.mjs +69 -0
- package/dist/es/directives/index.mjs +4 -0
- package/dist/es/home/LFilter/FilterArea.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterArea.vue2.mjs +507 -0
- package/dist/es/home/LFilter/FilterArea.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterHead.vue.mjs +129 -0
- package/dist/es/home/LFilter/FilterHead.vue2.mjs +4 -0
- package/dist/es/home/LFilter/FilterItem.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItem.vue2.mjs +114 -0
- package/dist/es/home/LFilter/FilterItem.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +171 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +4 -0
- package/dist/es/home/LFilter/index.vue.mjs +17 -0
- package/dist/es/home/LFilter/index.vue2.mjs +4 -0
- package/dist/es/home/LProject/index.vue.mjs +7 -0
- package/dist/es/home/LProject/index.vue2.mjs +70 -0
- package/dist/es/home/LProject/index.vue3.mjs +4 -0
- package/dist/es/home/index.vue.mjs +7 -0
- package/dist/es/home/index.vue2.mjs +80 -0
- package/dist/es/home/index.vue3.mjs +4 -0
- package/dist/es/index.mjs +26 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +70 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +16 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +36 -0
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +48 -0
- package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +949 -0
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +22 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +4 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +72 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +6 -0
- package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +320 -0
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +19 -0
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +11 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +21 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +48 -0
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +8 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +5 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +91 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +377 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +221 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +280 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +732 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +247 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +47 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +71 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +160 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +38 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +176 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +135 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +89 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +254 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +698 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +40 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +144 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +589 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +766 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +832 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +788 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +1580 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +4 -0
- package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +2045 -0
- package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +514 -0
- package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +124 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +22 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +199 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +262 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +196 -0
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +54 -0
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +115 -0
- package/dist/es/store/index.mjs +8 -0
- package/dist/es/store/modules/copilot.mjs +111 -0
- package/dist/es/store/modules/filters.mjs +346 -0
- package/dist/es/store/modules/types.mjs +19 -0
- package/dist/es/style/index.scss.mjs +4 -0
- package/dist/es/style/tailwind.css.mjs +4 -0
- package/dist/es/style.css +1 -0
- package/dist/es/utils/home.mjs +129 -0
- package/dist/es/utils/http/index.mjs +90 -0
- package/dist/es/utils/message.mjs +42 -0
- package/package.json +23 -32
@@ -0,0 +1,8 @@
|
|
1
|
+
const data = {
|
2
|
+
"width": 24,
|
3
|
+
"height": 24,
|
4
|
+
"body": '<path fill="currentColor" d="M12 3c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 14c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z"/>'
|
5
|
+
};
|
6
|
+
export {
|
7
|
+
data as default
|
8
|
+
};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import * as __viteBrowserExternal from "../../../../../../../_virtual/__vite-browser-external.mjs";
|
2
|
+
import * as se from "vue";
|
3
|
+
var at = Object.defineProperty;
|
4
|
+
var It = Object.getOwnPropertyDescriptor;
|
5
|
+
var Ut = Object.getOwnPropertyNames;
|
6
|
+
var Pt = Object.prototype.hasOwnProperty;
|
7
|
+
var ct = (t, n) => {
|
8
|
+
for (var e in n)
|
9
|
+
at(t, e, { get: n[e], enumerable: true });
|
10
|
+
}, it = (t, n, e, r) => {
|
11
|
+
if (n && typeof n == "object" || typeof n == "function")
|
12
|
+
for (let o of Ut(n))
|
13
|
+
!Pt.call(t, o) && o !== e && at(t, o, { get: () => n[o], enumerable: !(r = It(n, o)) || r.enumerable });
|
14
|
+
return t;
|
15
|
+
}, D = (t, n, e) => (it(t, n, "default"), e && it(e, n, "default"));
|
16
|
+
var Bt = Object.prototype.toString;
|
17
|
+
function O(t, n) {
|
18
|
+
return Bt.call(t) === `[object ${n}]`;
|
19
|
+
}
|
20
|
+
function H(t) {
|
21
|
+
return t !== null && O(t, "Object");
|
22
|
+
}
|
23
|
+
function R(t) {
|
24
|
+
return typeof t < "u";
|
25
|
+
}
|
26
|
+
function dt(t) {
|
27
|
+
return !R(t);
|
28
|
+
}
|
29
|
+
function gt(t) {
|
30
|
+
return t === null;
|
31
|
+
}
|
32
|
+
function Nt(t) {
|
33
|
+
return gt(t) || dt(t);
|
34
|
+
}
|
35
|
+
function Ft(t) {
|
36
|
+
return Q(t) || S(t) ? t.length === 0 : t instanceof Map || t instanceof Set ? t.size === 0 : H(t) ? Object.keys(t).length === 0 : false;
|
37
|
+
}
|
38
|
+
function B(t) {
|
39
|
+
return !!(Ft(t) || Nt(t));
|
40
|
+
}
|
41
|
+
function S(t) {
|
42
|
+
return O(t, "String");
|
43
|
+
}
|
44
|
+
function mt(t) {
|
45
|
+
return typeof t == "function";
|
46
|
+
}
|
47
|
+
function Q(t) {
|
48
|
+
return t && Array.isArray(t);
|
49
|
+
}
|
50
|
+
var I = (t = 20) => new Promise((n) => setTimeout(n, t));
|
51
|
+
var A = {};
|
52
|
+
ct(A, { Fs: () => __viteBrowserExternal });
|
53
|
+
D(A, __viteBrowserExternal);
|
54
|
+
var i = {};
|
55
|
+
ct(i, { Vue: () => se });
|
56
|
+
D(i, se);
|
57
|
+
export {
|
58
|
+
I as delay,
|
59
|
+
O as is,
|
60
|
+
B as isAllEmpty,
|
61
|
+
Q as isArray,
|
62
|
+
R as isDef,
|
63
|
+
Ft as isEmpty,
|
64
|
+
mt as isFunction,
|
65
|
+
gt as isNull,
|
66
|
+
Nt as isNullOrUnDef,
|
67
|
+
H as isObject,
|
68
|
+
S as isString,
|
69
|
+
dt as isUnDef
|
70
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import getIntrinsic from "../../../get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs";
|
2
|
+
import "./index.mjs";
|
3
|
+
import { exports as callBindExports } from "../../../../../_virtual/index.mjs";
|
4
|
+
var GetIntrinsic = getIntrinsic;
|
5
|
+
var callBind = callBindExports;
|
6
|
+
var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
|
7
|
+
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
8
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
9
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
10
|
+
return callBind(intrinsic);
|
11
|
+
}
|
12
|
+
return intrinsic;
|
13
|
+
};
|
14
|
+
export {
|
15
|
+
callBound as default
|
16
|
+
};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { __module as callBind } from "../../../../../_virtual/index.mjs";
|
2
|
+
import functionBind from "../../../function-bind@1.1.2/node_modules/function-bind/index.mjs";
|
3
|
+
import getIntrinsic from "../../../get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs";
|
4
|
+
import setFunctionLength from "../../../set-function-length@1.2.2/node_modules/set-function-length/index.mjs";
|
5
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
6
|
+
import { __require as requireEsDefineProperty } from "../../../es-define-property@1.0.0/node_modules/es-define-property/index.mjs";
|
7
|
+
(function(module) {
|
8
|
+
var bind = functionBind;
|
9
|
+
var GetIntrinsic = getIntrinsic;
|
10
|
+
var setFunctionLength$1 = setFunctionLength;
|
11
|
+
var $TypeError = type;
|
12
|
+
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
13
|
+
var $call = GetIntrinsic("%Function.prototype.call%");
|
14
|
+
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
15
|
+
var $defineProperty = requireEsDefineProperty();
|
16
|
+
var $max = GetIntrinsic("%Math.max%");
|
17
|
+
module.exports = function callBind2(originalFunction) {
|
18
|
+
if (typeof originalFunction !== "function") {
|
19
|
+
throw new $TypeError("a function is required");
|
20
|
+
}
|
21
|
+
var func = $reflectApply(bind, $call, arguments);
|
22
|
+
return setFunctionLength$1(
|
23
|
+
func,
|
24
|
+
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
25
|
+
true
|
26
|
+
);
|
27
|
+
};
|
28
|
+
var applyBind = function applyBind2() {
|
29
|
+
return $reflectApply(bind, $apply, arguments);
|
30
|
+
};
|
31
|
+
if ($defineProperty) {
|
32
|
+
$defineProperty(module.exports, "apply", { value: applyBind });
|
33
|
+
} else {
|
34
|
+
module.exports.apply = applyBind;
|
35
|
+
}
|
36
|
+
})(callBind);
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { __require as requireEsDefineProperty } from "../../../es-define-property@1.0.0/node_modules/es-define-property/index.mjs";
|
2
|
+
import syntax from "../../../es-errors@1.3.0/node_modules/es-errors/syntax.mjs";
|
3
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
4
|
+
import gopd$1 from "../../../gopd@1.0.1/node_modules/gopd/index.mjs";
|
5
|
+
var $defineProperty = requireEsDefineProperty();
|
6
|
+
var $SyntaxError = syntax;
|
7
|
+
var $TypeError = type;
|
8
|
+
var gopd = gopd$1;
|
9
|
+
var defineDataProperty = function defineDataProperty2(obj, property, value) {
|
10
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
11
|
+
throw new $TypeError("`obj` must be an object or a function`");
|
12
|
+
}
|
13
|
+
if (typeof property !== "string" && typeof property !== "symbol") {
|
14
|
+
throw new $TypeError("`property` must be a string or a symbol`");
|
15
|
+
}
|
16
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
17
|
+
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
18
|
+
}
|
19
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
20
|
+
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
21
|
+
}
|
22
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
23
|
+
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
24
|
+
}
|
25
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
26
|
+
throw new $TypeError("`loose`, if provided, must be a boolean");
|
27
|
+
}
|
28
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
29
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
30
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
31
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
32
|
+
var desc = !!gopd && gopd(obj, property);
|
33
|
+
if ($defineProperty) {
|
34
|
+
$defineProperty(obj, property, {
|
35
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
36
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
37
|
+
value,
|
38
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
39
|
+
});
|
40
|
+
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
41
|
+
obj[property] = value;
|
42
|
+
} else {
|
43
|
+
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
44
|
+
}
|
45
|
+
};
|
46
|
+
export {
|
47
|
+
defineDataProperty as default
|
48
|
+
};
|