@ohbug/extension-feedback 0.1.1 → 0.4.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.
- package/LICENSE +1 -1
- package/README.md +25 -23
- package/dist/Box.d.ts +4 -0
- package/dist/Box.d.ts.map +1 -0
- package/dist/Selector.d.ts +4 -0
- package/dist/Selector.d.ts.map +1 -0
- package/dist/assets.d.ts +4 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/env.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +498 -0
- package/dist/index.mjs +1336 -0
- package/dist/store.d.ts +9 -0
- package/dist/store.d.ts.map +1 -0
- package/package.json +38 -45
- package/dist/extension.es.js +0 -142
- package/dist/extension.umd.js +0 -142
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const store: {
|
|
2
|
+
working: boolean;
|
|
3
|
+
selectedElement: Element | null;
|
|
4
|
+
}, setStore: import("solid-js/store").SetStoreFunction<{
|
|
5
|
+
working: boolean;
|
|
6
|
+
selectedElement: Element | null;
|
|
7
|
+
}>;
|
|
8
|
+
export { store, setStore };
|
|
9
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["store.ts"],"names":[],"mappings":"AAEA,QAAA,MAAO,KAAK;aACD,OAAO;qBACC,OAAO,GAAG,IAAI;GAFnB,QAAQ;aACX,OAAO;qBACC,OAAO,GAAG,IAAI;EACY,CAAA;AAE7C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ohbug": {
|
|
3
|
-
"name": "OhbugExtensionFeedback",
|
|
4
|
-
"key": "feedback"
|
|
5
|
-
},
|
|
6
2
|
"name": "@ohbug/extension-feedback",
|
|
7
|
-
"version": "0.
|
|
8
|
-
"description": "
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Ohbug extension to collect user feedback",
|
|
5
|
+
"license": "MIT",
|
|
9
6
|
"author": "chenyueban <jasonchan0527@gmail.com>",
|
|
10
7
|
"homepage": "https://github.com/ohbug-org/ohbug-extension-feedback",
|
|
11
8
|
"bugs": {
|
|
@@ -15,59 +12,55 @@
|
|
|
15
12
|
"type": "git",
|
|
16
13
|
"url": "https://github.com/ohbug-org/ohbug-extension-feedback"
|
|
17
14
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"unpkg": "./dist/extension.es.js",
|
|
22
|
-
"jsdelivr": "./dist/extension.es.js",
|
|
23
|
-
"types": "./src/index.ts",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"module": "dist/index.mjs",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
24
18
|
"exports": {
|
|
25
19
|
".": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
20
|
+
"require": "./dist/index.js",
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
28
23
|
}
|
|
29
24
|
},
|
|
30
25
|
"files": [
|
|
31
26
|
"dist"
|
|
32
27
|
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"prebuild": "rimraf dist",
|
|
30
|
+
"dev": "vite build -w",
|
|
31
|
+
"build": "vite build",
|
|
32
|
+
"release": "release-it",
|
|
33
|
+
"preinstall": "npx only-allow pnpm",
|
|
34
|
+
"update:deps": "pnpm update -i -r --latest",
|
|
35
|
+
"lint": "tsc && eslint . --fix",
|
|
36
|
+
"prepare": "husky install"
|
|
37
|
+
},
|
|
33
38
|
"dependencies": {
|
|
34
|
-
"@ohbug/
|
|
35
|
-
"@ohbug/utils": "^
|
|
36
|
-
"solid-js": "^1.
|
|
39
|
+
"@ohbug/types": "^2.1.0",
|
|
40
|
+
"@ohbug/utils": "^2.0.5",
|
|
41
|
+
"solid-js": "^1.4.8"
|
|
37
42
|
},
|
|
38
43
|
"devDependencies": {
|
|
39
|
-
"@chenyueban/
|
|
40
|
-
"@chenyueban/tsconfig": "^
|
|
41
|
-
"@commitlint/cli": "^
|
|
42
|
-
"@
|
|
43
|
-
"
|
|
44
|
-
"commitizen": "^4.2.
|
|
45
|
-
"cssnano": "^5.0.8",
|
|
44
|
+
"@chenyueban/eslint-config": "^1.0.12",
|
|
45
|
+
"@chenyueban/tsconfig": "^2.1.0",
|
|
46
|
+
"@commitlint/cli": "^17.0.3",
|
|
47
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
48
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
49
|
+
"commitizen": "^4.2.5",
|
|
46
50
|
"cz-conventional-changelog": "3.3.0",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
51
|
+
"eslint": "^8.20.0",
|
|
52
|
+
"husky": "^8.0.1",
|
|
53
|
+
"lint-staged": "^13.0.3",
|
|
54
|
+
"release-it": "^15.1.4",
|
|
49
55
|
"rimraf": "^3.0.2",
|
|
50
|
-
"typescript": "^4.4
|
|
51
|
-
"vite": "^
|
|
52
|
-
"vite-plugin-
|
|
53
|
-
"vite-plugin-
|
|
54
|
-
"windicss": "^
|
|
56
|
+
"typescript": "^4.7.4",
|
|
57
|
+
"vite": "^3.0.4",
|
|
58
|
+
"vite-plugin-dts": "^1.4.1",
|
|
59
|
+
"vite-plugin-solid": "^2.3.0",
|
|
60
|
+
"vite-plugin-windicss": "^1.8.7",
|
|
61
|
+
"windicss": "^3.5.6"
|
|
55
62
|
},
|
|
56
63
|
"publishConfig": {
|
|
57
64
|
"access": "public"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"prebuild": "rimraf dist",
|
|
61
|
-
"dev": "vite build -w",
|
|
62
|
-
"build": "vite build",
|
|
63
|
-
"update:deps": "yarn upgrade-interactive --latest",
|
|
64
|
-
"play": "npm -C playground run dev",
|
|
65
|
-
"release": "release-it",
|
|
66
|
-
"commit": "cz"
|
|
67
|
-
},
|
|
68
|
-
"config": {
|
|
69
|
-
"commitizen": {
|
|
70
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
71
|
-
}
|
|
72
65
|
}
|
|
73
66
|
}
|
package/dist/extension.es.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
const e=Symbol("solid-proxy"),t={equals:(e,t)=>e===t};let n=E;const o={},r={owned:null,cleanups:null,context:null,owner:null};var i=null;let s=null,l=null,u=null,c=null,a=0;function f(e,n){n=n?Object.assign({},t,n):t;const r={value:e,observers:null,observerSlots:null,pending:o,comparator:n.equals||void 0};return[y.bind(r),e=>("function"==typeof e&&(e=e(r.pending!==o?r.pending:r.value)),m(r,e))]}function d(e,t,n){w(x(e,t,!1,1))}function h(e,t,o){n=S;const r=x(e,t,!1,1);r.user=!0,c&&c.push(r)}function p(e,n,r){r=r?Object.assign({},t,r):t;const i=x(e,n,!0,0);return i.pending=o,i.observers=null,i.observerSlots=null,i.comparator=r.equals||void 0,w(i),y.bind(i)}function g(e){if(l)return e();let t;const n=l=[];try{t=e()}finally{l=null}return O((()=>{for(let e=0;e<n.length;e+=1){const t=n[e];if(t.pending!==o){const e=t.pending;t.pending=o,m(t,e)}}}),!1),t}function b(e){let t,n=s;return s=null,t=e(),s=n,t}function v(){return s}function y(){if(this.state&&this.sources){const e=u;u=null,1===this.state?w(this):$(this),u=e}if(s){const e=this.observers?this.observers.length:0;s.sources?(s.sources.push(this),s.sourceSlots.push(e)):(s.sources=[this],s.sourceSlots=[e]),this.observers?(this.observers.push(s),this.observerSlots.push(s.sources.length-1)):(this.observers=[s],this.observerSlots=[s.sources.length-1])}return this.value}function m(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(l)return e.pending===o&&l.push(e),e.pending=t,t;let r=!1;return e.value=t,e.observers&&e.observers.length&&O((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];r,n.pure?u.push(n):c.push(n),n.observers&&!n.state&&A(n),n.state=1}if(u.length>1e6)throw u=[],new Error}),!1),t}function w(e){if(!e.fn)return;k(e);const t=i,n=s,o=a;s=i=e,function(e,t,n){let o;try{o=e.fn(t)}catch(r){N(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?m(e,o):e.value=o,e.updatedAt=n)}(e,e.value,o),s=n,i=t}function x(e,t,n,o=1,s){const l={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:i,context:null,pure:n};return null===i||i!==r&&(i.owned?i.owned.push(l):i.owned=[l]),l}function _(e){if(1!==e.state)return e.state=0;if(e.suspense&&b(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<a);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(1===(e=t[n]).state)w(e);else if(2===e.state){const t=u;u=null,$(e),u=t}}function O(e,t){if(u)return e();let o=!1;t||(u=[]),c?o=!0:c=[],a++;try{e()}catch(r){N(r)}finally{!function(e){u&&(E(u),u=null);if(e)return;c.length?g((()=>{n(c),c=null})):c=null}(o)}}function E(e){for(let t=0;t<e.length;t++)_(e[t])}function S(e){let t,n=0;for(t=0;t<e.length;t++){const o=e[t];o.user?e[n++]=o:_(o)}const o=e.length;for(t=0;t<n;t++)_(e[t]);for(t=o;t<e.length;t++)_(e[t])}function $(e){e.state=0;for(let t=0;t<e.sources.length;t+=1){const n=e.sources[t];n.sources&&(1===n.state?_(n):2===n.state&&$(n))}}function A(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=2,n.pure?u.push(n):c.push(n),n.observers&&A(n))}}function k(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),o=t.observers;if(o&&o.length){const e=o.pop(),r=t.observerSlots.pop();n<o.length&&(e.sourceSlots[r]=n,o[n]=e,t.observerSlots[n]=r)}}if(e.owned){for(t=0;t<e.owned.length;t++)k(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function N(e){throw e}function j(e,t){return b((()=>e(t)))}function z(e){let t=!1;const n=p((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return p((()=>{const o=n();if(o){const n=e.children;return(t="function"==typeof n&&n.length>0)?b((()=>n(o))):n}return e.fallback}))}function C(e,t,n){let o=n.length,r=t.length,i=o,s=0,l=0,u=t[r-1].nextSibling,c=null;for(;s<r||l<i;)if(t[s]!==n[l]){for(;t[r-1]===n[i-1];)r--,i--;if(r===s){const t=i<o?l?n[l-1].nextSibling:n[i-l]:u;for(;l<i;)e.insertBefore(n[l++],t)}else if(i===l)for(;s<r;)c&&c.has(t[s])||e.removeChild(t[s]),s++;else if(t[s]===n[i-1]&&n[l]===t[r-1]){const o=t[--r].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],o),t[r]=n[i]}else{if(!c){c=new Map;let e=l;for(;e<i;)c.set(n[e],e++)}const o=c.get(t[s]);if(null!=o)if(l<o&&o<i){let u,a=s,f=1;for(;++a<r&&a<i&&null!=(u=c.get(t[a]))&&u===o+f;)f++;if(f>o-l){const r=t[s];for(;l<o;)e.insertBefore(n[l++],r)}else e.replaceChild(n[l++],t[s++])}else s++;else e.removeChild(t[s++])}}else s++,l++}function T(e,t,n){let o;return function(e,t){t&&(i=t);const n=s,o=i,l=0===e.length?r:{owned:null,cleanups:null,context:null,owner:o};let u;i=l,s=null;try{O((()=>u=e((()=>k(l)))),!0)}finally{s=n,i=o}}((r=>{o=r,H(t,e(),t.firstChild?null:void 0,n)})),()=>{o(),t.textContent=""}}function D(e,t,n){const o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;return n&&(r=r.firstChild),r}function P(e,t=window.document){const n=t._$DX_DELEGATE||(t._$DX_DELEGATE=new Set);for(let o=0,r=e.length;o<r;o++){const r=e[o];n.has(r)||(n.add(r),t.addEventListener(r,L))}}function H(e,t,n,o){if(void 0===n||o||(o=[]),"function"!=typeof t)return M(e,t,o,n);d((o=>M(e,t(),o,n)),o)}function L(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const o=n[t];if(o&&!n.disabled){const r=n[`${t}Data`];if(void 0!==r?o(r,e):o(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function M(e,t,n,o,r){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==o;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let r=n[0];r&&3===r.nodeType?r.data=t:r=document.createTextNode(t),n=F(e,n,o,r)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=F(e,n,o);else{if("function"===i)return d((()=>{let r=t();for(;"function"==typeof r;)r=r();n=M(e,r,n,o)})),()=>n;if(Array.isArray(t)){const i=[];if(B(i,t,r))return d((()=>n=M(e,i,n,o,!0))),()=>n;if(0===i.length){if(n=F(e,n,o),s)return n}else Array.isArray(n)?0===n.length?V(e,i,o):C(e,n,i):null==n||""===n?V(e,i):C(e,s&&n||[e.firstChild],i);n=i}else if(t instanceof Node){if(Array.isArray(n)){if(s)return n=F(e,n,o,t);F(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function B(e,t,n){let o=!1;for(let r=0,i=t.length;r<i;r++){let i,s=t[r];if(s instanceof Node)e.push(s);else if(null==s||!0===s||!1===s);else if(Array.isArray(s))o=B(e,s)||o;else if("string"==(i=typeof s))e.push(document.createTextNode(s));else if("function"===i)if(n){for(;"function"==typeof s;)s=s();o=B(e,Array.isArray(s)?s:[s])||o}else e.push(s),o=!0;else e.push(document.createTextNode(s.toString()))}return o}function V(e,t,n){for(let o=0,r=t.length;o<r;o++)e.insertBefore(t[o],n)}function F(e,t,n,o){if(void 0===n)return e.textContent="";const r=o||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(r!==s){const t=s.parentNode===e;o||i?t&&e.removeChild(s):t?e.replaceChild(r,s):e.insertBefore(r,n)}else o=!0}}else e.insertBefore(r,n);return[r]}var U=function(){return(U=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function q(e){return"string"==typeof e}var K=function(e,t,n,o){this.type=n,this.timestamp=o||(new Date).toISOString(),this.message=e,this.data=t};!function(){function e(e,t){var n=e.apiKey,o=e.appVersion,r=e.appType,i=e.releaseStage,s=e.timestamp,l=e.category,u=e.type,c=e.sdk,a=e.detail,f=e.device,d=e.user,h=e.actions,p=e.metaData;this.apiKey=n,this.appVersion=o,this.appType=r,this.releaseStage=i,this.timestamp=s,this.category=l,this.type=u,this.sdk=c,this.detail=a,this.device=f,this.user=d,this.actions=h,this.metaData=p,this._client=t}Object.defineProperty(e.prototype,"_isOhbugEvent",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.addAction=function(e,t,n,o){var r,i,s=this.actions,l=q(e)?e:"",u=t||{},c=q(n)?n:"",a=new K(l,u,c,o);s.length>=(null!==(i=null===(r=this._client)||void 0===r?void 0:r._config.maxActions)&&void 0!==i?i:30)&&s.shift(),s.push(a)},e.prototype.getUser=function(){return this.user},e.prototype.setUser=function(e){var t,n,o;if(n=e,"[object Object]"===Object.prototype.toString.call(n)&&Object.keys(e).length<=6)return this.user=U(U({},this.user),e),this.getUser();null===(t=this._client)||void 0===t||t._logger.warn((o=e,new Error("Invalid data\n- "+"setUser should be an object and have up to 6 attributes"+", got "+JSON.stringify(o))))},e.prototype.addMetaData=function(e,t){return function(e,t,n){t&&(e[t]=n)}(this.metaData,e,t)},e.prototype.getMetaData=function(e){return function(e,t){if(e[t])return e[t]}(this.metaData,e)},e.prototype.deleteMetaData=function(e){return function(e,t){if(e[t])return delete e[t]}(this.metaData,e)},e.prototype.toJSON=function(){var e=this;return{apiKey:e.apiKey,appVersion:e.appVersion,appType:e.appType,timestamp:e.timestamp,category:e.category,type:e.type,sdk:e.sdk,device:e.device,detail:e.detail,user:e.user,actions:e.actions,metaData:e.metaData,releaseStage:e.releaseStage}}}();var R={};function G(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:R;
|
|
16
|
-
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */
|
|
30
|
-
return function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`Ohbug warning(condition, format, ...args)` requires a warning message argument");if(!e){var r=0,i=t.replace(/%s/g,(function(){return n[r++]}));throw new Error("Ohbug "+i)}}(Boolean(e.__OHBUG__),"Failed to get `OhbugObject`, please confirm if `Ohbug.init`"),e.__OHBUG__}function X(e,t){e.parentNode&&(t.push(e.parentNode),X(e.parentNode,t))}function I(e){var t=[];return t.push(e),X(e,t),t}const J=Symbol("store-raw"),Y=Symbol("store-node"),Q=Symbol("store-name");function W(t,n){let o=t[e];if(!o){Object.defineProperty(t,e,{value:o=new Proxy(t,oe)});const n=Object.keys(t),r=Object.getOwnPropertyDescriptors(t);for(let e=0,i=n.length;e<i;e++){const i=n[e];if(r[i].get){const e=r[i].get.bind(o);Object.defineProperty(t,i,{get:e})}}}return o}function Z(e){return null!=e&&"object"==typeof e&&(!e.__proto__||e.__proto__===Object.prototype||Array.isArray(e))}function ee(e,t=new Set){let n,o,r,i;if(n=null!=e&&e[J])return n;if(!Z(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)r=e[n],(o=ee(r,t))!==r&&(e[n]=o)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let l=0,u=n.length;l<u;l++)i=n[l],s[i].get||(r=e[i],(o=ee(r,t))!==r&&(e[i]=o))}return e}function te(e){let t=e[Y];return t||Object.defineProperty(e,Y,{value:t={}}),t}function ne(){const[e,t]=f(void 0,{equals:!1,internal:!0});return e.$=t,e}const oe={get(t,n,o){if(n===J)return t;if(n===e)return o;const r=t[n];if(n===Y||"__proto__"===n)return r;const i=Z(r);if(v()&&("function"!=typeof r||t.hasOwnProperty(n))){let e,o;i&&(e=te(r))&&(o=e._||(e._=ne()),o()),e=te(t),o=e[n]||(e[n]=ne()),o()}return i?W(r):r},set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){if(v()){const t=te(e);(t._||(t._=ne()))()}return Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(t,n){const o=Reflect.getOwnPropertyDescriptor(t,n);return!o||o.get||n===e||n===Y||n===Q||(delete o.value,delete o.writable,o.get=()=>t[e][n]),o}};function re(e,t,n){if(e[t]===n)return;const o=Array.isArray(e),r=e.length,i=void 0===n,s=o||i===t in e;i?delete e[t]:e[t]=n;let l,u=te(e);(l=u[t])&&l.$(),o&&e.length!==r&&(l=u.length)&&l.$(l,void 0),s&&(l=u._)&&l.$(l,void 0)}function ie(e,t,n=[]){let o,r=e;if(t.length>1){o=t.shift();const i=typeof o,s=Array.isArray(e);if(Array.isArray(o)){for(let r=0;r<o.length;r++)ie(e,[o[r]].concat(t),[o[r]].concat(n));return}if(s&&"function"===i){for(let r=0;r<e.length;r++)o(e[r],r)&&ie(e,[r].concat(t),[r].concat(n));return}if(s&&"object"===i){const{from:r=0,to:i=e.length-1,by:s=1}=o;for(let o=r;o<=i;o+=s)ie(e,[o].concat(t),[o].concat(n));return}if(t.length>1)return void ie(e[o],t,[o].concat(n));r=e[o],n=[o].concat(n)}let i=t[0];"function"==typeof i&&(i=i(r,n),i===r)||void 0===o&&null==i||(i=ee(i),void 0===o||Z(r)&&Z(i)&&!Array.isArray(i)?function(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];re(e,r,t[r])}}(r,i):re(e,o,i))}const[se,le]=function(e,t){const n=ee(e||{});return[W(n),function(...e){g((()=>ie(n,e)))}]}({working:!1,selectedElement:null}),ue=D('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" data-ohbug-selector><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" fill="rgba(255,255,255,1)"></path></svg>'),ce=D('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" data-ohbug-selector><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 3h2v2H3V3zm4 0h2v2H7V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm0 4h2v2h-2V7zM3 19h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V7zm7.667 4l1.036-1.555A1 1 0 0 1 12.535 9h2.93a1 1 0 0 1 .832.445L17.333 11H20a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h2.667zM9 19h10v-6h-2.737l-1.333-2h-1.86l-1.333 2H9v6zm5-1a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"></path></svg>'),ae=()=>ue.cloneNode(!0),fe=()=>(()=>{const e=ce.cloneNode(!0);return e.firstChild.nextSibling.style.setProperty("fill","var(--color)"),e})();const de=D('<div class="tips" data-ohbug-selector>在页面中选取元素</div>'),he=D('<div class="fixed -z-1" data-ohbug-selector><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div data-ohbug-selector><button class="bg-red-500 cursor-pointer rounded-full w-6 h-6 flex items-center justify-center absolute -top-3 -right-3 z-10" type="button" data-ohbug-selector></button></div></div>'),pe=()=>{let e,t,n,o,r,s=null,l=null;function u(i){var l;le({working:!0});const u=document.elementFromPoint(i.clientX,i.clientY);if(void 0!==(null==(l=null==u?void 0:u.dataset)?void 0:l.ohbugSelector))return!1;s=u,s&&function(i){if(!i)return;const{width:s,height:l,top:u,right:c,bottom:a,left:f}=i.getBoundingClientRect();null==r||r.setAttribute("style",`\n width: ${s+4}px;\n height: ${l+4}px;\n top: ${u-2}px;\n left: ${f-2}px;\n `),null==e||e.setAttribute("style",`\n height: ${u}px;\n top: 0;\n right: 0;\n left: 0;\n `),null==t||t.setAttribute("style",`\n top: ${u}px;\n right: 0;\n bottom: 0;\n left: ${c}px;\n `),null==n||n.setAttribute("style",`\n width: ${s+f}px;\n top: ${a}px;\n bottom: 0;\n left: 0;\n `),null==o||o.setAttribute("style",`\n width: ${f}px;\n height: ${l}px;\n top: ${u}px;\n left: 0;\n `)}(s)}function c(e){l=s||document.elementFromPoint(e.clientX,e.clientY),function(e){if(!e)return;const{width:t,height:n,top:o,left:i}=e.getBoundingClientRect();le({selectedElement:e}),null==r||r.setAttribute("style",`\n width: ${t+4}px;\n height: ${n+4}px;\n top: ${o-2}px;\n left: ${i-2}px;\n `)}(l),document.removeEventListener("mousemove",u)}function a(){s=null,l=null,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",c),le({working:!1,selectedElement:null})}var f;return h((()=>{se.working?(document.addEventListener("mousemove",u),document.addEventListener("mousedown",c)):(document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",c))})),f=a,null===i||(null===i.cleanups?i.cleanups=[f]:i.cleanups.push(f)),[de.cloneNode(!0),(()=>{const i=he.cloneNode(!0),s=i.firstChild,u=s.nextSibling,c=u.nextSibling,f=c.nextSibling,d=f.nextSibling,h=d.firstChild;return e=s,(e=>{t=e})(u),(e=>{n=e})(c),(e=>{o=e})(f),(e=>{r=e})(d),d.className="fixed -z-1 border-4 rounded-sm transition cursor-pointer pointer-events-auto box-border "+(l?"border-red-500 border-solid cursor-pointer":"border-blue-500 border-dashed"),h.$$click=a,H(h,j(ae,{})),i})()]};P(["click"]);const ge=D('<button class="main-btn" type="button" data-ohbug-selector></button>'),be=D('<div class="w-80 h-60 fixed z-max right-8 bottom-20 shadow bg-white flex flex-col" data-ohbug-selector><div class="bg-gray-300 p-4" data-ohbug-selector><textarea class="bg-transparent outline-none resize-none w-full" placeholder="告诉我你的感受..." rows="4" maxlength="1000" autofocus data-ohbug-selector></textarea><button class="cursor-pointer" type="button" data-ohbug-selector></button></div><div class="flex justify-between items-center flex-1 p-4" data-ohbug-selector><span class="text-sm" data-ohbug-selector>试试<a class="underline" href="https://ohbug.net" target="_blank" rel="noreferrer" data-ohbug-selector>Ohbug</a>?</span><button class="send-btn" type="button" data-ohbug-selector></button></div><button class="bg-blue-500 cursor-pointer rounded-full w-6 h-6 flex items-center justify-center absolute -top-2 -right-2 z-10" type="button" data-ohbug-selector></button></div>'),ve=D("<div data-ohbug-selector></div>"),ye=()=>{const[e,t]=f(!1),[n,o]=f("");function r(){le({working:!0})}const[i,s]=f(!1);async function l(){s(!0);const e={target:se.selectedElement};let r,i;se.selectedElement&&(r=function(e){for(var t=e.target||e.srcElement,n=e.target||e.srcElement,o=[],r=0;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_TYPE_NODE;n=n.previousSibling)r&&o.push(n),r+=1;var i=void 0===e.path?I(e.target):e.path,s=t.outerHTML;return i.reverse().map((function(e){return(e.localName||"")+(e.id?"#"+e.id:"")+(e.className?"."+e.className:"")+(e.outerHTML===s?":nth-child("+o.length+")":"")})).filter((function(e){return Boolean(e)})).join(" > ")}(e),i=se.selectedElement.outerHTML);const l=G().client,u=l.createEvent({category:"feedback",type:"feedback",detail:{selector:r,outerHTML:i,feedback:n()}});await l.notify(u),t(!1),o(""),le({working:!1,selectedElement:null}),s(!1)}return h((()=>{!1===se.working&&null===se.selectedElement||se.working&&!se.selectedElement?t(!1):t(!0)})),(()=>{const s=ve.cloneNode(!0);return H(s,j(z,{get when(){return se.working},get children(){return j(pe,{})}}),null),H(s,j(z,{get when(){return!(se.working&&!se.selectedElement)},get children(){const n=ge.cloneNode(!0);return n.$$click=()=>t((e=>!e)),H(n,(()=>e()?"😆":"🙂")),n}}),null),H(s,j(z,{get when(){return e()},get children(){const e=be.cloneNode(!0),s=e.firstChild,u=s.firstChild,c=u.nextSibling,a=s.nextSibling,f=a.firstChild.nextSibling,h=a.nextSibling;return u.$$input=e=>o(e.target.value),c.$$click=r,H(c,j(fe,{})),f.$$click=l,H(f,(()=>i()?"Sending...":"Send")),h.$$click=()=>t((e=>!e)),H(h,j(ae,{})),d((e=>{const t=n(),o=!n()||i();return t!==e._v$&&(u.value=e._v$=t),o!==e._v$2&&(f.disabled=e._v$2=o),e}),{_v$:void 0,_v$2:void 0}),e}}),null),d((()=>s.className="relative "+(se.selectedElement?"z-max":"z-auto"))),s})()};P(["click","input"]);const me={name:"OhbugExtensionFeedback",init:()=>{const e=document.createElement("div");e.id="OhbugExtensionFeedback-ROOT",document.body.appendChild(e),T((()=>j(ye,{})),e)}};function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}*{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}::moz-focus-inner{border-style:none;padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}body{line-height:inherit}body,button,textarea{font-family:inherit;margin:0}button,textarea{color:inherit;font-size:100%;line-height:1.15;line-height:inherit;padding:0}button{background-color:transparent;background-image:none;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}[role=button],button{cursor:pointer}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}svg{display:block;vertical-align:middle}textarea{resize:vertical}textarea::placeholder{color:#9ca3af;opacity:1}textarea::webkit-input-placeholder{color:#9ca3af;opacity:1}textarea::-moz-placeholder{color:#9ca3af;opacity:1}textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}textarea::-ms-input-placeholder{color:#9ca3af;opacity:1}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-blue-500{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgba(239,68,68,var(--tw-bg-opacity))}.bg-opacity-40{--tw-bg-opacity:0.4}.border-red-500{--tw-border-opacity:1;border-color:rgba(239,68,68,var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgba(59,130,246,var(--tw-border-opacity))}.rounded-full{border-radius:9999px}.rounded-sm{border-radius:.125rem}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-4{border-width:4px}.box-border{box-sizing:border-box}.cursor-pointer{cursor:pointer}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.h-60{height:15rem}.h-6{height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.outline-none{outline:2px solid transparent;outline-offset:2px}.p-4{padding:1rem}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.right-8{right:2rem}.bottom-20{bottom:5rem}.-top-2{top:-.5rem}.-right-2{right:-.5rem}.-top-3{top:-.75rem}.-right-3{right:-.75rem}.resize-none{resize:none}.shadow{--tw-shadow-color:0,0,0;--tw-shadow:0 1px 3px 0 rgba(var(--tw-shadow-color),0.1),0 1px 2px 0 rgba(var(--tw-shadow-color),0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.w-80{width:20rem}.w-full{width:100%}.w-6{width:1.5rem}.z-max{z-index:999999999}.z-auto{z-index:auto}.z-10{z-index:10}.-z-1{z-index:-1}.transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}
|
|
31
|
-
.send-btn {
|
|
32
|
-
--tw-bg-opacity: 1;
|
|
33
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
34
|
-
border-radius: 0.125rem;
|
|
35
|
-
font-size: 0.875rem;
|
|
36
|
-
line-height: 1.25rem;
|
|
37
|
-
padding-left: 0.75rem;
|
|
38
|
-
padding-right: 0.75rem;
|
|
39
|
-
padding-top: 0.25rem;
|
|
40
|
-
padding-bottom: 0.25rem;
|
|
41
|
-
--tw-text-opacity: 1;
|
|
42
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
43
|
-
-webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
|
|
44
|
-
-o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
45
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
|
|
46
|
-
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
47
|
-
-o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
49
|
-
-webkit-transition-duration: 150ms;
|
|
50
|
-
-o-transition-duration: 150ms;
|
|
51
|
-
transition-duration: 150ms;
|
|
52
|
-
}
|
|
53
|
-
.send-btn:disabled {
|
|
54
|
-
cursor: not-allowed;
|
|
55
|
-
opacity: 0.5;
|
|
56
|
-
}
|
|
57
|
-
.main-btn {
|
|
58
|
-
--tw-bg-opacity: 1;
|
|
59
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
60
|
-
border-radius: 0.25rem;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
display: -webkit-box;
|
|
63
|
-
display: -ms-flexbox;
|
|
64
|
-
display: -webkit-flex;
|
|
65
|
-
display: flex;
|
|
66
|
-
-webkit-box-align: center;
|
|
67
|
-
-ms-flex-align: center;
|
|
68
|
-
-webkit-align-items: center;
|
|
69
|
-
align-items: center;
|
|
70
|
-
-webkit-box-pack: center;
|
|
71
|
-
-ms-flex-pack: center;
|
|
72
|
-
-webkit-justify-content: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
height: 2rem;
|
|
75
|
-
position: fixed;
|
|
76
|
-
right: 2rem;
|
|
77
|
-
bottom: 2rem;
|
|
78
|
-
--tw-shadow-color: 0, 0, 0;
|
|
79
|
-
--tw-shadow: 0 1px 3px 0 rgba(var(--tw-shadow-color), 0.1), 0 1px 2px 0 rgba(var(--tw-shadow-color), 0.06);
|
|
80
|
-
-webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
81
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
82
|
-
--tw-text-opacity: 1;
|
|
83
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
84
|
-
-webkit-user-select: none;
|
|
85
|
-
-moz-user-select: none;
|
|
86
|
-
-ms-user-select: none;
|
|
87
|
-
user-select: none;
|
|
88
|
-
width: 2.5rem;
|
|
89
|
-
z-index: 999999999;
|
|
90
|
-
-webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
|
|
91
|
-
-o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
92
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
|
|
93
|
-
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
94
|
-
-o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
95
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
-
-webkit-transition-duration: 150ms;
|
|
97
|
-
-o-transition-duration: 150ms;
|
|
98
|
-
transition-duration: 150ms;
|
|
99
|
-
}
|
|
100
|
-
.main-btn:hover {
|
|
101
|
-
--tw-bg-opacity: 1;
|
|
102
|
-
background-color: rgba(37, 99, 235, var(--tw-bg-opacity));
|
|
103
|
-
--tw-shadow-color: 0, 0, 0;
|
|
104
|
-
--tw-shadow: 0 20px 25px -5px rgba(var(--tw-shadow-color), 0.1), 0 10px 10px -5px rgba(var(--tw-shadow-color), 0.04);
|
|
105
|
-
-webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
106
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
107
|
-
}
|
|
108
|
-
.tips {
|
|
109
|
-
--tw-bg-opacity: 1;
|
|
110
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
111
|
-
border-bottom-right-radius: 0.5rem;
|
|
112
|
-
border-bottom-left-radius: 0.5rem;
|
|
113
|
-
font-size: 0.875rem;
|
|
114
|
-
line-height: 1.25rem;
|
|
115
|
-
padding: 0.75rem;
|
|
116
|
-
position: fixed;
|
|
117
|
-
top: 0px;
|
|
118
|
-
left: 50%;
|
|
119
|
-
--tw-text-opacity: 1;
|
|
120
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
121
|
-
-webkit-user-select: none;
|
|
122
|
-
-moz-user-select: none;
|
|
123
|
-
-ms-user-select: none;
|
|
124
|
-
user-select: none;
|
|
125
|
-
z-index: 999999999;
|
|
126
|
-
--tw-rotate: 0;
|
|
127
|
-
--tw-rotate-x: 0;
|
|
128
|
-
--tw-rotate-y: 0;
|
|
129
|
-
--tw-rotate-z: 0;
|
|
130
|
-
--tw-scale-x: 1;
|
|
131
|
-
--tw-scale-y: 1;
|
|
132
|
-
--tw-scale-z: 1;
|
|
133
|
-
--tw-skew-x: 0;
|
|
134
|
-
--tw-skew-y: 0;
|
|
135
|
-
--tw-translate-x: 0;
|
|
136
|
-
--tw-translate-y: 0;
|
|
137
|
-
--tw-translate-z: 0;
|
|
138
|
-
-webkit-transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
139
|
-
-ms-transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
140
|
-
transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
141
|
-
--tw-translate-x: -50%;
|
|
142
|
-
}`);export{me as default};
|
package/dist/extension.umd.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).OhbugExtensionFeedback=t()}(this,(function(){"use strict";const e=Symbol("solid-proxy"),t={equals:(e,t)=>e===t};let n=S;const o={},r={owned:null,cleanups:null,context:null,owner:null};var i=null;let s=null,l=null,u=null,c=null,a=0;function f(e,n){n=n?Object.assign({},t,n):t;const r={value:e,observers:null,observerSlots:null,pending:o,comparator:n.equals||void 0};return[y.bind(r),e=>("function"==typeof e&&(e=e(r.pending!==o?r.pending:r.value)),m(r,e))]}function d(e,t,n){w(x(e,t,!1,1))}function h(e,t,o){n=E;const r=x(e,t,!1,1);r.user=!0,c&&c.push(r)}function p(e,n,r){r=r?Object.assign({},t,r):t;const i=x(e,n,!0,0);return i.pending=o,i.observers=null,i.observerSlots=null,i.comparator=r.equals||void 0,w(i),y.bind(i)}function g(e){if(l)return e();let t;const n=l=[];try{t=e()}finally{l=null}return _((()=>{for(let e=0;e<n.length;e+=1){const t=n[e];if(t.pending!==o){const e=t.pending;t.pending=o,m(t,e)}}}),!1),t}function b(e){let t,n=s;return s=null,t=e(),s=n,t}function v(){return s}function y(){if(this.state&&this.sources){const e=u;u=null,1===this.state?w(this):$(this),u=e}if(s){const e=this.observers?this.observers.length:0;s.sources?(s.sources.push(this),s.sourceSlots.push(e)):(s.sources=[this],s.sourceSlots=[e]),this.observers?(this.observers.push(s),this.observerSlots.push(s.sources.length-1)):(this.observers=[s],this.observerSlots=[s.sources.length-1])}return this.value}function m(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(l)return e.pending===o&&l.push(e),e.pending=t,t;let r=!1;return e.value=t,e.observers&&e.observers.length&&_((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];r,n.pure?u.push(n):c.push(n),n.observers&&!n.state&&k(n),n.state=1}if(u.length>1e6)throw u=[],new Error}),!1),t}function w(e){if(!e.fn)return;A(e);const t=i,n=s,o=a;s=i=e,function(e,t,n){let o;try{o=e.fn(t)}catch(r){N(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?m(e,o):e.value=o,e.updatedAt=n)}(e,e.value,o),s=n,i=t}function x(e,t,n,o=1,s){const l={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:i,context:null,pure:n};return null===i||i!==r&&(i.owned?i.owned.push(l):i.owned=[l]),l}function O(e){if(1!==e.state)return e.state=0;if(e.suspense&&b(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<a);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(1===(e=t[n]).state)w(e);else if(2===e.state){const t=u;u=null,$(e),u=t}}function _(e,t){if(u)return e();let o=!1;t||(u=[]),c?o=!0:c=[],a++;try{e()}catch(r){N(r)}finally{!function(e){u&&(S(u),u=null);if(e)return;c.length?g((()=>{n(c),c=null})):c=null}(o)}}function S(e){for(let t=0;t<e.length;t++)O(e[t])}function E(e){let t,n=0;for(t=0;t<e.length;t++){const o=e[t];o.user?e[n++]=o:O(o)}const o=e.length;for(t=0;t<n;t++)O(e[t]);for(t=o;t<e.length;t++)O(e[t])}function $(e){e.state=0;for(let t=0;t<e.sources.length;t+=1){const n=e.sources[t];n.sources&&(1===n.state?O(n):2===n.state&&$(n))}}function k(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=2,n.pure?u.push(n):c.push(n),n.observers&&k(n))}}function A(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),o=t.observers;if(o&&o.length){const e=o.pop(),r=t.observerSlots.pop();n<o.length&&(e.sourceSlots[r]=n,o[n]=e,t.observerSlots[n]=r)}}if(e.owned){for(t=0;t<e.owned.length;t++)A(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function N(e){throw e}function j(e,t){return b((()=>e(t)))}function z(e){let t=!1;const n=p((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return p((()=>{const o=n();if(o){const n=e.children;return(t="function"==typeof n&&n.length>0)?b((()=>n(o))):n}return e.fallback}))}function C(e,t,n){let o=n.length,r=t.length,i=o,s=0,l=0,u=t[r-1].nextSibling,c=null;for(;s<r||l<i;)if(t[s]!==n[l]){for(;t[r-1]===n[i-1];)r--,i--;if(r===s){const t=i<o?l?n[l-1].nextSibling:n[i-l]:u;for(;l<i;)e.insertBefore(n[l++],t)}else if(i===l)for(;s<r;)c&&c.has(t[s])||e.removeChild(t[s]),s++;else if(t[s]===n[i-1]&&n[l]===t[r-1]){const o=t[--r].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],o),t[r]=n[i]}else{if(!c){c=new Map;let e=l;for(;e<i;)c.set(n[e],e++)}const o=c.get(t[s]);if(null!=o)if(l<o&&o<i){let u,a=s,f=1;for(;++a<r&&a<i&&null!=(u=c.get(t[a]))&&u===o+f;)f++;if(f>o-l){const r=t[s];for(;l<o;)e.insertBefore(n[l++],r)}else e.replaceChild(n[l++],t[s++])}else s++;else e.removeChild(t[s++])}}else s++,l++}const T="_$DX_DELEGATE";function D(e,t,n){let o;return function(e,t){t&&(i=t);const n=s,o=i,l=0===e.length?r:{owned:null,cleanups:null,context:null,owner:o};let u;i=l,s=null;try{_((()=>u=e((()=>A(l)))),!0)}finally{s=n,i=o}}((r=>{o=r,L(t,e(),t.firstChild?null:void 0,n)})),()=>{o(),t.textContent=""}}function P(e,t,n){const o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;return n&&(r=r.firstChild),r}function H(e,t=window.document){const n=t[T]||(t[T]=new Set);for(let o=0,r=e.length;o<r;o++){const r=e[o];n.has(r)||(n.add(r),t.addEventListener(r,M))}}function L(e,t,n,o){if(void 0===n||o||(o=[]),"function"!=typeof t)return B(e,t,o,n);d((o=>B(e,t(),o,n)),o)}function M(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const o=n[t];if(o&&!n.disabled){const r=n[`${t}Data`];if(void 0!==r?o(r,e):o(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function B(e,t,n,o,r){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==o;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let r=n[0];r&&3===r.nodeType?r.data=t:r=document.createTextNode(t),n=U(e,n,o,r)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=U(e,n,o);else{if("function"===i)return d((()=>{let r=t();for(;"function"==typeof r;)r=r();n=B(e,r,n,o)})),()=>n;if(Array.isArray(t)){const i=[];if(V(i,t,r))return d((()=>n=B(e,i,n,o,!0))),()=>n;if(0===i.length){if(n=U(e,n,o),s)return n}else Array.isArray(n)?0===n.length?F(e,i,o):C(e,n,i):null==n||""===n?F(e,i):C(e,s&&n||[e.firstChild],i);n=i}else if(t instanceof Node){if(Array.isArray(n)){if(s)return n=U(e,n,o,t);U(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function V(e,t,n){let o=!1;for(let r=0,i=t.length;r<i;r++){let i,s=t[r];if(s instanceof Node)e.push(s);else if(null==s||!0===s||!1===s);else if(Array.isArray(s))o=V(e,s)||o;else if("string"==(i=typeof s))e.push(document.createTextNode(s));else if("function"===i)if(n){for(;"function"==typeof s;)s=s();o=V(e,Array.isArray(s)?s:[s])||o}else e.push(s),o=!0;else e.push(document.createTextNode(s.toString()))}return o}function F(e,t,n){for(let o=0,r=t.length;o<r;o++)e.insertBefore(t[o],n)}function U(e,t,n,o){if(void 0===n)return e.textContent="";const r=o||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(r!==s){const t=s.parentNode===e;o||i?t&&e.removeChild(s):t?e.replaceChild(r,s):e.insertBefore(r,n)}else o=!0}}else e.insertBefore(r,n);return[r]}var q=function(){return(q=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function K(e){return"string"==typeof e}var R=function(e,t,n,o){this.type=n,this.timestamp=o||(new Date).toISOString(),this.message=e,this.data=t};!function(){function e(e,t){var n=e.apiKey,o=e.appVersion,r=e.appType,i=e.releaseStage,s=e.timestamp,l=e.category,u=e.type,c=e.sdk,a=e.detail,f=e.device,d=e.user,h=e.actions,p=e.metaData;this.apiKey=n,this.appVersion=o,this.appType=r,this.releaseStage=i,this.timestamp=s,this.category=l,this.type=u,this.sdk=c,this.detail=a,this.device=f,this.user=d,this.actions=h,this.metaData=p,this._client=t}Object.defineProperty(e.prototype,"_isOhbugEvent",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.addAction=function(e,t,n,o){var r,i,s=this.actions,l=K(e)?e:"",u=t||{},c=K(n)?n:"",a=new R(l,u,c,o);s.length>=(null!==(i=null===(r=this._client)||void 0===r?void 0:r._config.maxActions)&&void 0!==i?i:30)&&s.shift(),s.push(a)},e.prototype.getUser=function(){return this.user},e.prototype.setUser=function(e){var t,n,o;if(n=e,"[object Object]"===Object.prototype.toString.call(n)&&Object.keys(e).length<=6)return this.user=q(q({},this.user),e),this.getUser();null===(t=this._client)||void 0===t||t._logger.warn((o=e,new Error("Invalid data\n- "+"setUser should be an object and have up to 6 attributes"+", got "+JSON.stringify(o))))},e.prototype.addMetaData=function(e,t){return function(e,t,n){t&&(e[t]=n)}(this.metaData,e,t)},e.prototype.getMetaData=function(e){return function(e,t){if(e[t])return e[t]}(this.metaData,e)},e.prototype.deleteMetaData=function(e){return function(e,t){if(e[t])return delete e[t]}(this.metaData,e)},e.prototype.toJSON=function(){var e=this;return{apiKey:e.apiKey,appVersion:e.appVersion,appType:e.appType,timestamp:e.timestamp,category:e.category,type:e.type,sdk:e.sdk,device:e.device,detail:e.detail,user:e.user,actions:e.actions,metaData:e.metaData,releaseStage:e.releaseStage}}}();var G={};function I(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:G;
|
|
16
|
-
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */
|
|
30
|
-
return function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`Ohbug warning(condition, format, ...args)` requires a warning message argument");if(!e){var r=0,i=t.replace(/%s/g,(function(){return n[r++]}));throw new Error("Ohbug "+i)}}(Boolean(e.__OHBUG__),"Failed to get `OhbugObject`, please confirm if `Ohbug.init`"),e.__OHBUG__}function J(e,t){e.parentNode&&(t.push(e.parentNode),J(e.parentNode,t))}function X(e){var t=[];return t.push(e),J(e,t),t}const Y=Symbol("store-raw"),Q=Symbol("store-node"),W=Symbol("store-name");function Z(t,n){let o=t[e];if(!o){Object.defineProperty(t,e,{value:o=new Proxy(t,re)});const n=Object.keys(t),r=Object.getOwnPropertyDescriptors(t);for(let e=0,i=n.length;e<i;e++){const i=n[e];if(r[i].get){const e=r[i].get.bind(o);Object.defineProperty(t,i,{get:e})}}}return o}function ee(e){return null!=e&&"object"==typeof e&&(!e.__proto__||e.__proto__===Object.prototype||Array.isArray(e))}function te(e,t=new Set){let n,o,r,i;if(n=null!=e&&e[Y])return n;if(!ee(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)r=e[n],(o=te(r,t))!==r&&(e[n]=o)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let l=0,u=n.length;l<u;l++)i=n[l],s[i].get||(r=e[i],(o=te(r,t))!==r&&(e[i]=o))}return e}function ne(e){let t=e[Q];return t||Object.defineProperty(e,Q,{value:t={}}),t}function oe(){const[e,t]=f(void 0,{equals:!1,internal:!0});return e.$=t,e}const re={get(t,n,o){if(n===Y)return t;if(n===e)return o;const r=t[n];if(n===Q||"__proto__"===n)return r;const i=ee(r);if(v()&&("function"!=typeof r||t.hasOwnProperty(n))){let e,o;i&&(e=ne(r))&&(o=e._||(e._=oe()),o()),e=ne(t),o=e[n]||(e[n]=oe()),o()}return i?Z(r):r},set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){if(v()){const t=ne(e);(t._||(t._=oe()))()}return Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(t,n){const o=Reflect.getOwnPropertyDescriptor(t,n);return!o||o.get||n===e||n===Q||n===W||(delete o.value,delete o.writable,o.get=()=>t[e][n]),o}};function ie(e,t,n){if(e[t]===n)return;const o=Array.isArray(e),r=e.length,i=void 0===n,s=o||i===t in e;i?delete e[t]:e[t]=n;let l,u=ne(e);(l=u[t])&&l.$(),o&&e.length!==r&&(l=u.length)&&l.$(l,void 0),s&&(l=u._)&&l.$(l,void 0)}function se(e,t,n=[]){let o,r=e;if(t.length>1){o=t.shift();const i=typeof o,s=Array.isArray(e);if(Array.isArray(o)){for(let r=0;r<o.length;r++)se(e,[o[r]].concat(t),[o[r]].concat(n));return}if(s&&"function"===i){for(let r=0;r<e.length;r++)o(e[r],r)&&se(e,[r].concat(t),[r].concat(n));return}if(s&&"object"===i){const{from:r=0,to:i=e.length-1,by:s=1}=o;for(let o=r;o<=i;o+=s)se(e,[o].concat(t),[o].concat(n));return}if(t.length>1)return void se(e[o],t,[o].concat(n));r=e[o],n=[o].concat(n)}let i=t[0];"function"==typeof i&&(i=i(r,n),i===r)||void 0===o&&null==i||(i=te(i),void 0===o||ee(r)&&ee(i)&&!Array.isArray(i)?function(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];ie(e,r,t[r])}}(r,i):ie(e,o,i))}const[le,ue]=function(e,t){const n=te(e||{});return[Z(n),function(...e){g((()=>se(n,e)))}]}({working:!1,selectedElement:null}),ce=P('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" data-ohbug-selector><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" fill="rgba(255,255,255,1)"></path></svg>'),ae=P('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" data-ohbug-selector><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 3h2v2H3V3zm4 0h2v2H7V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm0 4h2v2h-2V7zM3 19h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V7zm7.667 4l1.036-1.555A1 1 0 0 1 12.535 9h2.93a1 1 0 0 1 .832.445L17.333 11H20a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h2.667zM9 19h10v-6h-2.737l-1.333-2h-1.86l-1.333 2H9v6zm5-1a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"></path></svg>'),fe=()=>ce.cloneNode(!0),de=()=>(()=>{const e=ae.cloneNode(!0);return e.firstChild.nextSibling.style.setProperty("fill","var(--color)"),e})();const he=P('<div class="tips" data-ohbug-selector>在页面中选取元素</div>'),pe=P('<div class="fixed -z-1" data-ohbug-selector><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div class="fixed -z-1 bg-black bg-opacity-40 transition pointer-events-auto" data-ohbug-selector></div><div data-ohbug-selector><button class="bg-red-500 cursor-pointer rounded-full w-6 h-6 flex items-center justify-center absolute -top-3 -right-3 z-10" type="button" data-ohbug-selector></button></div></div>'),ge=()=>{let e,t,n,o,r,s=null,l=null;function u(i){var l;ue({working:!0});const u=document.elementFromPoint(i.clientX,i.clientY);if(void 0!==(null==(l=null==u?void 0:u.dataset)?void 0:l.ohbugSelector))return!1;s=u,s&&function(i){if(!i)return;const{width:s,height:l,top:u,right:c,bottom:a,left:f}=i.getBoundingClientRect();null==r||r.setAttribute("style",`\n width: ${s+4}px;\n height: ${l+4}px;\n top: ${u-2}px;\n left: ${f-2}px;\n `),null==e||e.setAttribute("style",`\n height: ${u}px;\n top: 0;\n right: 0;\n left: 0;\n `),null==t||t.setAttribute("style",`\n top: ${u}px;\n right: 0;\n bottom: 0;\n left: ${c}px;\n `),null==n||n.setAttribute("style",`\n width: ${s+f}px;\n top: ${a}px;\n bottom: 0;\n left: 0;\n `),null==o||o.setAttribute("style",`\n width: ${f}px;\n height: ${l}px;\n top: ${u}px;\n left: 0;\n `)}(s)}function c(e){l=s||document.elementFromPoint(e.clientX,e.clientY),function(e){if(!e)return;const{width:t,height:n,top:o,left:i}=e.getBoundingClientRect();ue({selectedElement:e}),null==r||r.setAttribute("style",`\n width: ${t+4}px;\n height: ${n+4}px;\n top: ${o-2}px;\n left: ${i-2}px;\n `)}(l),document.removeEventListener("mousemove",u)}function a(){s=null,l=null,document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",c),ue({working:!1,selectedElement:null})}var f;return h((()=>{le.working?(document.addEventListener("mousemove",u),document.addEventListener("mousedown",c)):(document.removeEventListener("mousemove",u),document.removeEventListener("mousedown",c))})),f=a,null===i||(null===i.cleanups?i.cleanups=[f]:i.cleanups.push(f)),[he.cloneNode(!0),(()=>{const i=pe.cloneNode(!0),s=i.firstChild,u=s.nextSibling,c=u.nextSibling,f=c.nextSibling,d=f.nextSibling,h=d.firstChild;return e=s,(e=>{t=e})(u),(e=>{n=e})(c),(e=>{o=e})(f),(e=>{r=e})(d),d.className="fixed -z-1 border-4 rounded-sm transition cursor-pointer pointer-events-auto box-border "+(l?"border-red-500 border-solid cursor-pointer":"border-blue-500 border-dashed"),h.$$click=a,L(h,j(fe,{})),i})()]};H(["click"]);const be=P('<button class="main-btn" type="button" data-ohbug-selector></button>'),ve=P('<div class="w-80 h-60 fixed z-max right-8 bottom-20 shadow bg-white flex flex-col" data-ohbug-selector><div class="bg-gray-300 p-4" data-ohbug-selector><textarea class="bg-transparent outline-none resize-none w-full" placeholder="告诉我你的感受..." rows="4" maxlength="1000" autofocus data-ohbug-selector></textarea><button class="cursor-pointer" type="button" data-ohbug-selector></button></div><div class="flex justify-between items-center flex-1 p-4" data-ohbug-selector><span class="text-sm" data-ohbug-selector>试试<a class="underline" href="https://ohbug.net" target="_blank" rel="noreferrer" data-ohbug-selector>Ohbug</a>?</span><button class="send-btn" type="button" data-ohbug-selector></button></div><button class="bg-blue-500 cursor-pointer rounded-full w-6 h-6 flex items-center justify-center absolute -top-2 -right-2 z-10" type="button" data-ohbug-selector></button></div>'),ye=P("<div data-ohbug-selector></div>"),me=()=>{const[e,t]=f(!1),[n,o]=f("");function r(){ue({working:!0})}const[i,s]=f(!1);async function l(){s(!0);const e={target:le.selectedElement};let r,i;le.selectedElement&&(r=function(e){for(var t=e.target||e.srcElement,n=e.target||e.srcElement,o=[],r=0;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_TYPE_NODE;n=n.previousSibling)r&&o.push(n),r+=1;var i=void 0===e.path?X(e.target):e.path,s=t.outerHTML;return i.reverse().map((function(e){return(e.localName||"")+(e.id?"#"+e.id:"")+(e.className?"."+e.className:"")+(e.outerHTML===s?":nth-child("+o.length+")":"")})).filter((function(e){return Boolean(e)})).join(" > ")}(e),i=le.selectedElement.outerHTML);const l=I().client,u=l.createEvent({category:"feedback",type:"feedback",detail:{selector:r,outerHTML:i,feedback:n()}});await l.notify(u),t(!1),o(""),ue({working:!1,selectedElement:null}),s(!1)}return h((()=>{!1===le.working&&null===le.selectedElement||le.working&&!le.selectedElement?t(!1):t(!0)})),(()=>{const s=ye.cloneNode(!0);return L(s,j(z,{get when(){return le.working},get children(){return j(ge,{})}}),null),L(s,j(z,{get when(){return!(le.working&&!le.selectedElement)},get children(){const n=be.cloneNode(!0);return n.$$click=()=>t((e=>!e)),L(n,(()=>e()?"😆":"🙂")),n}}),null),L(s,j(z,{get when(){return e()},get children(){const e=ve.cloneNode(!0),s=e.firstChild,u=s.firstChild,c=u.nextSibling,a=s.nextSibling,f=a.firstChild.nextSibling,h=a.nextSibling;return u.$$input=e=>o(e.target.value),c.$$click=r,L(c,j(de,{})),f.$$click=l,L(f,(()=>i()?"Sending...":"Send")),h.$$click=()=>t((e=>!e)),L(h,j(fe,{})),d((e=>{const t=n(),o=!n()||i();return t!==e._v$&&(u.value=e._v$=t),o!==e._v$2&&(f.disabled=e._v$2=o),e}),{_v$:void 0,_v$2:void 0}),e}}),null),d((()=>s.className="relative "+(le.selectedElement?"z-max":"z-auto"))),s})()};H(["click","input"]);const we={name:"OhbugExtensionFeedback",init:()=>{const e=document.createElement("div");e.id="OhbugExtensionFeedback-ROOT",document.body.appendChild(e),D((()=>j(me,{})),e)}};return function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}*{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}::moz-focus-inner{border-style:none;padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}body{line-height:inherit}body,button,textarea{font-family:inherit;margin:0}button,textarea{color:inherit;font-size:100%;line-height:1.15;line-height:inherit;padding:0}button{background-color:transparent;background-image:none;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}[role=button],button{cursor:pointer}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}svg{display:block;vertical-align:middle}textarea{resize:vertical}textarea::placeholder{color:#9ca3af;opacity:1}textarea::webkit-input-placeholder{color:#9ca3af;opacity:1}textarea::-moz-placeholder{color:#9ca3af;opacity:1}textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}textarea::-ms-input-placeholder{color:#9ca3af;opacity:1}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-blue-500{--tw-bg-opacity:1;background-color:rgba(59,130,246,var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgba(239,68,68,var(--tw-bg-opacity))}.bg-opacity-40{--tw-bg-opacity:0.4}.border-red-500{--tw-border-opacity:1;border-color:rgba(239,68,68,var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgba(59,130,246,var(--tw-border-opacity))}.rounded-full{border-radius:9999px}.rounded-sm{border-radius:.125rem}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-4{border-width:4px}.box-border{box-sizing:border-box}.cursor-pointer{cursor:pointer}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.h-60{height:15rem}.h-6{height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.outline-none{outline:2px solid transparent;outline-offset:2px}.p-4{padding:1rem}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.right-8{right:2rem}.bottom-20{bottom:5rem}.-top-2{top:-.5rem}.-right-2{right:-.5rem}.-top-3{top:-.75rem}.-right-3{right:-.75rem}.resize-none{resize:none}.shadow{--tw-shadow-color:0,0,0;--tw-shadow:0 1px 3px 0 rgba(var(--tw-shadow-color),0.1),0 1px 2px 0 rgba(var(--tw-shadow-color),0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.w-80{width:20rem}.w-full{width:100%}.w-6{width:1.5rem}.z-max{z-index:999999999}.z-auto{z-index:auto}.z-10{z-index:10}.-z-1{z-index:-1}.transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}
|
|
31
|
-
.send-btn {
|
|
32
|
-
--tw-bg-opacity: 1;
|
|
33
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
34
|
-
border-radius: 0.125rem;
|
|
35
|
-
font-size: 0.875rem;
|
|
36
|
-
line-height: 1.25rem;
|
|
37
|
-
padding-left: 0.75rem;
|
|
38
|
-
padding-right: 0.75rem;
|
|
39
|
-
padding-top: 0.25rem;
|
|
40
|
-
padding-bottom: 0.25rem;
|
|
41
|
-
--tw-text-opacity: 1;
|
|
42
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
43
|
-
-webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
|
|
44
|
-
-o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
45
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
|
|
46
|
-
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
47
|
-
-o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
49
|
-
-webkit-transition-duration: 150ms;
|
|
50
|
-
-o-transition-duration: 150ms;
|
|
51
|
-
transition-duration: 150ms;
|
|
52
|
-
}
|
|
53
|
-
.send-btn:disabled {
|
|
54
|
-
cursor: not-allowed;
|
|
55
|
-
opacity: 0.5;
|
|
56
|
-
}
|
|
57
|
-
.main-btn {
|
|
58
|
-
--tw-bg-opacity: 1;
|
|
59
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
60
|
-
border-radius: 0.25rem;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
display: -webkit-box;
|
|
63
|
-
display: -ms-flexbox;
|
|
64
|
-
display: -webkit-flex;
|
|
65
|
-
display: flex;
|
|
66
|
-
-webkit-box-align: center;
|
|
67
|
-
-ms-flex-align: center;
|
|
68
|
-
-webkit-align-items: center;
|
|
69
|
-
align-items: center;
|
|
70
|
-
-webkit-box-pack: center;
|
|
71
|
-
-ms-flex-pack: center;
|
|
72
|
-
-webkit-justify-content: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
height: 2rem;
|
|
75
|
-
position: fixed;
|
|
76
|
-
right: 2rem;
|
|
77
|
-
bottom: 2rem;
|
|
78
|
-
--tw-shadow-color: 0, 0, 0;
|
|
79
|
-
--tw-shadow: 0 1px 3px 0 rgba(var(--tw-shadow-color), 0.1), 0 1px 2px 0 rgba(var(--tw-shadow-color), 0.06);
|
|
80
|
-
-webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
81
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
82
|
-
--tw-text-opacity: 1;
|
|
83
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
84
|
-
-webkit-user-select: none;
|
|
85
|
-
-moz-user-select: none;
|
|
86
|
-
-ms-user-select: none;
|
|
87
|
-
user-select: none;
|
|
88
|
-
width: 2.5rem;
|
|
89
|
-
z-index: 999999999;
|
|
90
|
-
-webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
|
|
91
|
-
-o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
92
|
-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
|
|
93
|
-
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
94
|
-
-o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
95
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
-
-webkit-transition-duration: 150ms;
|
|
97
|
-
-o-transition-duration: 150ms;
|
|
98
|
-
transition-duration: 150ms;
|
|
99
|
-
}
|
|
100
|
-
.main-btn:hover {
|
|
101
|
-
--tw-bg-opacity: 1;
|
|
102
|
-
background-color: rgba(37, 99, 235, var(--tw-bg-opacity));
|
|
103
|
-
--tw-shadow-color: 0, 0, 0;
|
|
104
|
-
--tw-shadow: 0 20px 25px -5px rgba(var(--tw-shadow-color), 0.1), 0 10px 10px -5px rgba(var(--tw-shadow-color), 0.04);
|
|
105
|
-
-webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
106
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
107
|
-
}
|
|
108
|
-
.tips {
|
|
109
|
-
--tw-bg-opacity: 1;
|
|
110
|
-
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
111
|
-
border-bottom-right-radius: 0.5rem;
|
|
112
|
-
border-bottom-left-radius: 0.5rem;
|
|
113
|
-
font-size: 0.875rem;
|
|
114
|
-
line-height: 1.25rem;
|
|
115
|
-
padding: 0.75rem;
|
|
116
|
-
position: fixed;
|
|
117
|
-
top: 0px;
|
|
118
|
-
left: 50%;
|
|
119
|
-
--tw-text-opacity: 1;
|
|
120
|
-
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
121
|
-
-webkit-user-select: none;
|
|
122
|
-
-moz-user-select: none;
|
|
123
|
-
-ms-user-select: none;
|
|
124
|
-
user-select: none;
|
|
125
|
-
z-index: 999999999;
|
|
126
|
-
--tw-rotate: 0;
|
|
127
|
-
--tw-rotate-x: 0;
|
|
128
|
-
--tw-rotate-y: 0;
|
|
129
|
-
--tw-rotate-z: 0;
|
|
130
|
-
--tw-scale-x: 1;
|
|
131
|
-
--tw-scale-y: 1;
|
|
132
|
-
--tw-scale-z: 1;
|
|
133
|
-
--tw-skew-x: 0;
|
|
134
|
-
--tw-skew-y: 0;
|
|
135
|
-
--tw-translate-x: 0;
|
|
136
|
-
--tw-translate-y: 0;
|
|
137
|
-
--tw-translate-z: 0;
|
|
138
|
-
-webkit-transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
139
|
-
-ms-transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
140
|
-
transform: rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z));
|
|
141
|
-
--tw-translate-x: -50%;
|
|
142
|
-
}`),we}));
|