@ohbug/extension-feedback 0.4.0 → 0.6.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 +6 -6
- package/README.md +22 -25
- package/dist/Box.d.ts.map +1 -1
- package/dist/Selector.d.ts.map +1 -1
- package/dist/index.js +36 -36
- package/dist/index.mjs +243 -227
- package/dist/store.d.ts +2 -2
- package/dist/store.d.ts.map +1 -1
- package/package.json +12 -30
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
MIT License
|
|
1
|
+
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022
|
|
3
|
+
Copyright (c) 2022 chenyueban
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
copies or substantial portions of the Software.
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
SOFTWARE.
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -6,28 +6,25 @@
|
|
|
6
6
|
<p>An open source application information monitoring platform.</p>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```shell
|
|
32
|
-
pnpm run build
|
|
33
|
-
```
|
|
9
|
+
# `@ohbug/extension-feedback`
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/@ohbug/extension-feedback)
|
|
12
|
+
[](https://bundlephobia.com/result?p=@ohbug/extension-feedback)
|
|
13
|
+
|
|
14
|
+
Ohbug extension to collect user feedback
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
pnpm i @ohbug/extension-feedback
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
import Ohbug from '@ohbug/browser'
|
|
26
|
+
import OhbugExtensionFeedback from '@ohbug/extension-feedback'
|
|
27
|
+
|
|
28
|
+
const client = Ohbug.setup({ apiKey: 'YOUR_API_KEY' })
|
|
29
|
+
client.use(OhbugExtensionFeedback)
|
|
30
|
+
```
|
package/dist/Box.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAOzC,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AAEvB,QAAA,MAAM,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAOzC,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AAEvB,QAAA,MAAM,GAAG,EAAE,SAwJV,CAAA;AAED,eAAe,GAAG,CAAA"}
|
package/dist/Selector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.d.ts","sourceRoot":"","sources":["Selector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAUzC,OAAO,YAAY,CAAA;AACnB,OAAO,gBAAgB,CAAA;AAEvB,QAAA,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"Selector.d.ts","sourceRoot":"","sources":["Selector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAUzC,OAAO,YAAY,CAAA;AACnB,OAAO,gBAAgB,CAAA;AAEvB,QAAA,MAAM,QAAQ,EAAE,SAmQf,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";const E={};function ze(e){E.context=e}const Le=(e,t)=>e===t,L=Symbol("solid-proxy"),De=Symbol("solid-track"),W={equals:Le};let be=me;const D={},O=1,X=2,pe={owned:null,cleanups:null,context:null,owner:null};var y=null;let G=null,b=null,M=null,v=null,_=null,le=0;function je(e,t){const n=b,o=y,l=e.length===0,s=l?pe:{owned:null,cleanups:null,context:null,owner:t||o},i=l?e:()=>e(()=>ue(s));y=s,b=null;try{return ce(i,!0)}finally{b=n,y=o}}function F(e,t){t=t?Object.assign({},W,t):W;const n={value:e,observers:null,observerSlots:null,pending:D,comparator:t.equals||void 0},o=l=>(typeof l=="function"&&(l=l(n.pending!==D?n.pending:n.value)),ie(n,l));return[$e.bind(n),o]}function j(e,t,n){const o=re(e,t,!1,O);I(o)}function we(e,t,n){be=Fe;const o=re(e,t,!1,O);o.user=!0,_?_.push(o):I(o)}function de(e,t,n){n=n?Object.assign({},W,n):W;const o=re(e,t,!0,0);return o.pending=D,o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,I(o),$e.bind(o)}function ye(e){if(M)return e();let t;const n=M=[];try{t=e()}finally{M=null}return ce(()=>{for(let o=0;o<n.length;o+=1){const l=n[o];if(l.pending!==D){const s=l.pending;l.pending=D,ie(l,s)}}},!1),t}function se(e){let t,n=b;return b=null,t=e(),b=n,t}function He(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function ve(){return b}function $e(){const e=G;if(this.sources&&(this.state||e)){const t=v;v=null,this.state===O||e?I(this):Y(this),v=t}if(b){const t=this.observers?this.observers.length:0;b.sources?(b.sources.push(this),b.sourceSlots.push(t)):(b.sources=[this],b.sourceSlots=[t]),this.observers?(this.observers.push(b),this.observerSlots.push(b.sources.length-1)):(this.observers=[b],this.observerSlots=[b.sources.length-1])}return this.value}function ie(e,t,n){if(M)return e.pending===D&&M.push(e),e.pending=t,t;if(e.comparator&&e.comparator(e.value,t))return t;let o=!1;return e.value=t,e.observers&&e.observers.length&&ce(()=>{for(let l=0;l<e.observers.length;l+=1){const s=e.observers[l];o&&G.disposed.has(s),(o&&!s.tState||!o&&!s.state)&&(s.pure?v.push(s):_.push(s),s.observers&&xe(s)),o||(s.state=O)}if(v.length>1e6)throw v=[],new Error},!1),t}function I(e){if(!e.fn)return;ue(e);const t=y,n=b,o=le;b=y=e,Be(e,e.value,o),b=n,y=t}function Be(e,t,n){let o;try{o=e.fn(t)}catch(l){Se(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?ie(e,o):e.value=o,e.updatedAt=n)}function re(e,t,n,o=O,l){const s={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:null,pure:n};return y===null||y!==pe&&(y.owned?y.owned.push(s):y.owned=[s]),s}function R(e){const t=G;if(e.state===0||t)return;if(e.state===X||t)return Y(e);if(e.suspense&&se(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<le);)(e.state||t)&&n.push(e);for(let o=n.length-1;o>=0;o--)if(e=n[o],e.state===O||t)I(e);else if(e.state===X||t){const l=v;v=null,Y(e,n[0]),v=l}}function ce(e,t){if(v)return e();let n=!1;t||(v=[]),_?n=!0:_=[],le++;try{const o=e();return Me(n),o}catch(o){v||(_=null),Se(o)}}function Me(e){v&&(me(v),v=null),!e&&(_.length?ye(()=>{be(_),_=null}):_=null)}function me(e){for(let t=0;t<e.length;t++)R(e[t])}function Fe(e){let t,n=0;for(t=0;t<e.length;t++){const l=e[t];l.user?e[n++]=l:R(l)}E.context&&ze();const o=e.length;for(t=0;t<n;t++)R(e[t]);for(t=o;t<e.length;t++)R(e[t])}function Y(e,t){const n=G;e.state=0;for(let o=0;o<e.sources.length;o+=1){const l=e.sources[o];l.sources&&(l.state===O||n?l!==t&&R(l):(l.state===X||n)&&Y(l,t))}}function xe(e){const t=G;for(let n=0;n<e.observers.length;n+=1){const o=e.observers[n];(!o.state||t)&&(o.state=X,o.pure?v.push(o):_.push(o),o.observers&&xe(o))}}function ue(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),o=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const s=l.pop(),i=n.observerSlots.pop();o<l.length&&(s.sourceSlots[i]=o,l[o]=s,n.observerSlots[o]=i)}}if(e.owned){for(t=0;t<e.owned.length;t++)ue(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 Se(e){throw e}function S(e,t){return se(()=>e(t||{}))}function V(e){let t=!1;const n=de(()=>e.when,void 0,{equals:(o,l)=>t?o===l:!o==!l});return de(()=>{const o=n();if(o){const l=e.children;return(t=typeof l=="function"&&l.length>0)?se(()=>l(o)):l}return e.fallback})}function Re(e,t,n){let o=n.length,l=t.length,s=o,i=0,r=0,c=t[l-1].nextSibling,u=null;for(;i<l||r<s;){if(t[i]===n[r]){i++,r++;continue}for(;t[l-1]===n[s-1];)l--,s--;if(l===i){const a=s<o?r?n[r-1].nextSibling:n[s-r]:c;for(;r<s;)e.insertBefore(n[r++],a)}else if(s===r)for(;i<l;)(!u||!u.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[s-1]&&n[r]===t[l-1]){const a=t[--l].nextSibling;e.insertBefore(n[r++],t[i++].nextSibling),e.insertBefore(n[--s],a),t[l]=n[s]}else{if(!u){u=new Map;let g=r;for(;g<s;)u.set(n[g],g++)}const a=u.get(t[i]);if(a!=null)if(r<a&&a<s){let g=i,$=1,x;for(;++g<l&&g<s&&!((x=u.get(t[g]))==null||x!==a+$);)$++;if($>a-r){const C=t[i];for(;r<a;)e.insertBefore(n[r++],C)}else e.replaceChild(n[r++],t[i++])}else i++;else t[i++].remove()}}}const he="_$DX_DELEGATE";function Ve(e,t,n){let o;return je(l=>{o=l,t===document?e():m(t,e(),t.firstChild?null:void 0,n)}),()=>{o(),t.textContent=""}}function N(e,t,n){const o=document.createElement("template");o.innerHTML=e;let l=o.content.firstChild;return n&&(l=l.firstChild),l}function _e(e,t=window.document){const n=t[he]||(t[he]=new Set);for(let o=0,l=e.length;o<l;o++){const s=e[o];n.has(s)||(n.add(s),t.addEventListener(s,Ge))}}function Ue(e,t){t==null?e.removeAttribute("class"):e.className=t}function m(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return J(e,t,o,n);j(l=>J(e,t(),l,n),o)}function Ge(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(){return n||document}}),E.registry&&!E.done&&(E.done=!0,document.querySelectorAll("[id^=pl-]").forEach(o=>o.remove()));n!==null;){const o=n[t];if(o&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?o.call(n,l,e):o.call(n,e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function J(e,t,n,o,l){for(E.context&&!n&&(n=[...e.childNodes]);typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,i=o!==void 0;if(e=i&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(E.context)return n;if(s==="number"&&(t=t.toString()),i){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=P(e,n,o,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(E.context)return n;n=P(e,n,o)}else{if(s==="function")return j(()=>{let r=t();for(;typeof r=="function";)r=r();n=J(e,r,n,o)}),()=>n;if(Array.isArray(t)){const r=[],c=n&&Array.isArray(n);if(te(r,t,n,l))return j(()=>n=J(e,r,n,o,!0)),()=>n;if(E.context){for(let u=0;u<r.length;u++)if(r[u].parentNode)return n=r}if(r.length===0){if(n=P(e,n,o),i)return n}else c?n.length===0?ge(e,r,o):Re(e,n,r):(n&&P(e),ge(e,r));n=r}else if(t instanceof Node){if(E.context&&t.parentNode)return n=i?[t]:t;if(Array.isArray(n)){if(i)return n=P(e,n,o,t);P(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function te(e,t,n,o){let l=!1;for(let s=0,i=t.length;s<i;s++){let r=t[s],c=n&&n[s];if(r instanceof Node)e.push(r);else if(!(r==null||r===!0||r===!1))if(Array.isArray(r))l=te(e,r,c)||l;else if(typeof r=="function")if(o){for(;typeof r=="function";)r=r();l=te(e,Array.isArray(r)?r:[r],c)||l}else e.push(r),l=!0;else{const u=String(r);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return l}function ge(e,t,n){for(let o=0,l=t.length;o<l;o++)e.insertBefore(t[o],n)}function P(e,t,n,o){if(n===void 0)return e.textContent="";const l=o||document.createTextNode("");if(t.length){let s=!1;for(let i=t.length-1;i>=0;i--){const r=t[i];if(l!==r){const c=r.parentNode===e;!s&&!i?c?e.replaceChild(l,r):e.insertBefore(l,n):c&&r.remove()}else s=!0}}else e.insertBefore(l,n);return[l]}function Ie(e,t,...n){if(t===void 0)throw new Error("`Ohbug warning(condition, format, ...args)` requires a warning message argument");if(!e){let o=0,l=t.replace(/%s/g,()=>n[o++]);throw new Error(`Ohbug ${l}`)}}var qe={};function Ke(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:qe}function We(){let e=Ke();return Ie(Boolean(e.__OHBUG__),"Failed to get `OhbugObject`, please confirm if `Ohbug.setup`"),e.__OHBUG__}function Ee(e,t){e.parentNode&&(t.push(e.parentNode),Ee(e.parentNode,t))}function Xe(e){let t=[];return t.push(e),Ee(e,t),t}var Ye=e=>{let t=e.target||e.srcElement,n=e.target||e.srcElement,o=[];for(let i=0;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_TYPE_NODE;n=n.previousSibling)i&&o.push(n),i+=1;let l=typeof e.path>"u"?Xe(e.target):e.path,{outerHTML:s}=t;return l.reverse().map(i=>(i.localName||"")+(i.id?`#${i.id}`:"")+(i.className?`.${i.className}`:"")+(i.outerHTML===s?`:nth-child(${o.length})`:"")).filter(i=>Boolean(i)).join(" > ")};const Ae=Symbol("store-raw"),Q=Symbol("store-node"),Je=Symbol("store-name");function Ne(e,t){let n=e[L];if(!n){Object.defineProperty(e,L,{value:n=new Proxy(e,et)});const o=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let s=0,i=o.length;s<i;s++){const r=o[s];if(l[r].get){const c=l[r].get.bind(n);Object.defineProperty(e,r,{get:c})}}}return n}function Z(e){let t;return e!=null&&typeof e=="object"&&(e[L]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function U(e,t=new Set){let n,o,l,s;if(n=e!=null&&e[Ae])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 i=0,r=e.length;i<r;i++)l=e[i],(o=U(l,t))!==l&&(e[i]=o)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const i=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let c=0,u=i.length;c<u;c++)s=i[c],!r[s].get&&(l=e[s],(o=U(l,t))!==l&&(e[s]=o))}return e}function fe(e){let t=e[Q];return t||Object.defineProperty(e,Q,{value:t={}}),t}function ne(e,t,n){return e[t]||(e[t]=Oe(n,!0))}function Qe(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===L||t===Q||t===Je||(delete n.value,delete n.writable,n.get=()=>e[L][t]),n}function ke(e){if(ve()){const t=fe(e);(t._||(t._=Oe()))()}}function Ze(e){return ke(e),Reflect.ownKeys(e)}function Oe(e,t){const[n,o]=F(e,t?{internal:!0}:{equals:!1,internal:!0});return n.$=o,n}const et={get(e,t,n){if(t===Ae)return e;if(t===L)return n;if(t===De)return ke(e);const o=fe(e),l=o[t];let s=l?o[t]():e[t];if(t===Q||t==="__proto__")return s;if(!l){const i=Object.getOwnPropertyDescriptor(e,t);ve()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(s=ne(o,t,s)())}return Z(s)?Ne(s):s},set(){return!0},deleteProperty(){return!0},ownKeys:Ze,getOwnPropertyDescriptor:Qe};function ee(e,t,n){if(e[t]===n)return;const o=e[t],l=e.length;n===void 0?delete e[t]:e[t]=n;let s=fe(e),i;(i=ne(s,t,o))&&i.$(()=>n),Array.isArray(e)&&e.length!==l&&(i=ne(s,"length",l))&&i.$(e.length),(i=s._)&&i.$()}function Ce(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const l=n[o];ee(e,l,t[l])}}function tt(e,t){if(typeof t=="function"&&(t=t(e)),t=U(t),Array.isArray(t)){if(e===t)return;let n=0,o=t.length;for(;n<o;n++){const l=t[n];e[n]!==l&&ee(e,n,l)}ee(e,"length",o)}else Ce(e,t)}function B(e,t,n=[]){let o,l=e;if(t.length>1){o=t.shift();const i=typeof o,r=Array.isArray(e);if(Array.isArray(o)){for(let c=0;c<o.length;c++)B(e,[o[c]].concat(t),n);return}else if(r&&i==="function"){for(let c=0;c<e.length;c++)o(e[c],c)&&B(e,[c].concat(t),n);return}else if(r&&i==="object"){const{from:c=0,to:u=e.length-1,by:a=1}=o;for(let g=c;g<=u;g+=a)B(e,[g].concat(t),n);return}else if(t.length>1){B(e[o],t,[o].concat(n));return}l=e[o],n=[o].concat(n)}let s=t[0];typeof s=="function"&&(s=s(l,n),s===l)||o===void 0&&s==null||(s=U(s),o===void 0||Z(l)&&Z(s)&&!Array.isArray(s)?Ce(l,s):ee(e,o,s))}function nt(...[e,t]){const n=U(e||{}),o=Array.isArray(n),l=Ne(n);function s(...i){ye(()=>{o&&i.length===1?tt(n,i[0]):B(n,i)})}return[l,s]}const[p,z]=nt({working:!1,selectedElement:null}),ot=N('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></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" data-ohbug-selector fill="rgba(255,255,255,1)"></path></svg>'),lt=N('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></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" data-ohbug-selector></path></svg>'),oe=()=>ot.cloneNode(!0),st=()=>(()=>{const e=lt.cloneNode(!0);return e.firstChild.nextSibling.style.setProperty("fill","var(--color)"),e})();const it=N('<div class="bg-none border-solid border-4 border-blue-500 transition top-0 right-0 bottom-0 left-0 z-10 fixed pointer-events-none" data-ohbug-selector><div class="tips" data-ohbug-selector>Select element on the page<button class="stop-btn" type="button"></button></div></div>'),rt=N('<button class="rounded-full cursor-pointer flex bg-red-500 h-6 -top-3 -right-3 w-6 z-10 items-center justify-center absolute pointer-events-auto" data-ohbug-selector type="button"></button>'),ct=N('<button class="border-solid cursor-pointer font-semibold bg-red-500 border-4 border-red-500 -bottom-full text-white right-0 absolute pointer-events-auto" data-ohbug-selector type="button">Change</button>'),ut=N('<div class="-z-1 fixed" data-ohbug-selector><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div data-ohbug-selector></div></div>'),ft=()=>{const[e,t]=F();let n,o,l,s,i;const r=2;function c(f){if(!f)return;const{width:h,height:w,top:A,right:T,bottom:H,left:d}=f.getBoundingClientRect();i==null||i.setAttribute("style",`
|
|
2
|
-
width: ${
|
|
1
|
+
"use strict";const S={};function Le(e){S.context=e}const ze=(e,t)=>e===t,z=Symbol("solid-proxy"),He=Symbol("solid-track"),W={equals:ze};let be=me;const H={},O=1,X=2,pe={owned:null,cleanups:null,context:null,owner:null};var y=null;let G=null,b=null,B=null,$=null,E=null,le=0;function je(e,t){const n=b,o=y,l=e.length===0,s=l?pe:{owned:null,cleanups:null,context:null,owner:t||o},i=l?e:()=>e(()=>ue(s));y=s,b=null;try{return ce(i,!0)}finally{b=n,y=o}}function F(e,t){t=t?Object.assign({},W,t):W;const n={value:e,observers:null,observerSlots:null,pending:H,comparator:t.equals||void 0},o=l=>(typeof l=="function"&&(l=l(n.pending!==H?n.pending:n.value)),ie(n,l));return[ve.bind(n),o]}function j(e,t,n){const o=re(e,t,!1,O);I(o)}function we(e,t,n){be=Fe;const o=re(e,t,!1,O);o.user=!0,E?E.push(o):I(o)}function de(e,t,n){n=n?Object.assign({},W,n):W;const o=re(e,t,!0,0);return o.pending=H,o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,I(o),ve.bind(o)}function ye(e){if(B)return e();let t;const n=B=[];try{t=e()}finally{B=null}return ce(()=>{for(let o=0;o<n.length;o+=1){const l=n[o];if(l.pending!==H){const s=l.pending;l.pending=H,ie(l,s)}}},!1),t}function se(e){let t,n=b;return b=null,t=e(),b=n,t}function Me(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function $e(){return b}function ve(){const e=G;if(this.sources&&(this.state||e)){const t=$;$=null,this.state===O||e?I(this):Y(this),$=t}if(b){const t=this.observers?this.observers.length:0;b.sources?(b.sources.push(this),b.sourceSlots.push(t)):(b.sources=[this],b.sourceSlots=[t]),this.observers?(this.observers.push(b),this.observerSlots.push(b.sources.length-1)):(this.observers=[b],this.observerSlots=[b.sources.length-1])}return this.value}function ie(e,t,n){if(B)return e.pending===H&&B.push(e),e.pending=t,t;if(e.comparator&&e.comparator(e.value,t))return t;let o=!1;return e.value=t,e.observers&&e.observers.length&&ce(()=>{for(let l=0;l<e.observers.length;l+=1){const s=e.observers[l];o&&G.disposed.has(s),(o&&!s.tState||!o&&!s.state)&&(s.pure?$.push(s):E.push(s),s.observers&&xe(s)),o||(s.state=O)}if($.length>1e6)throw $=[],new Error},!1),t}function I(e){if(!e.fn)return;ue(e);const t=y,n=b,o=le;b=y=e,De(e,e.value,o),b=n,y=t}function De(e,t,n){let o;try{o=e.fn(t)}catch(l){Ee(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?ie(e,o):e.value=o,e.updatedAt=n)}function re(e,t,n,o=O,l){const s={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:null,pure:n};return y===null||y!==pe&&(y.owned?y.owned.push(s):y.owned=[s]),s}function R(e){const t=G;if(e.state===0||t)return;if(e.state===X||t)return Y(e);if(e.suspense&&se(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<le);)(e.state||t)&&n.push(e);for(let o=n.length-1;o>=0;o--)if(e=n[o],e.state===O||t)I(e);else if(e.state===X||t){const l=$;$=null,Y(e,n[0]),$=l}}function ce(e,t){if($)return e();let n=!1;t||($=[]),E?n=!0:E=[],le++;try{const o=e();return Be(n),o}catch(o){$||(E=null),Ee(o)}}function Be(e){$&&(me($),$=null),!e&&(E.length?ye(()=>{be(E),E=null}):E=null)}function me(e){for(let t=0;t<e.length;t++)R(e[t])}function Fe(e){let t,n=0;for(t=0;t<e.length;t++){const l=e[t];l.user?e[n++]=l:R(l)}S.context&&Le();const o=e.length;for(t=0;t<n;t++)R(e[t]);for(t=o;t<e.length;t++)R(e[t])}function Y(e,t){const n=G;e.state=0;for(let o=0;o<e.sources.length;o+=1){const l=e.sources[o];l.sources&&(l.state===O||n?l!==t&&R(l):(l.state===X||n)&&Y(l,t))}}function xe(e){const t=G;for(let n=0;n<e.observers.length;n+=1){const o=e.observers[n];(!o.state||t)&&(o.state=X,o.pure?$.push(o):E.push(o),o.observers&&xe(o))}}function ue(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),o=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const s=l.pop(),i=n.observerSlots.pop();o<l.length&&(s.sourceSlots[i]=o,l[o]=s,n.observerSlots[o]=i)}}if(e.owned){for(t=0;t<e.owned.length;t++)ue(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 Ee(e){throw e}function x(e,t){return se(()=>e(t||{}))}function V(e){let t=!1;const n=de(()=>e.when,void 0,{equals:(o,l)=>t?o===l:!o==!l});return de(()=>{const o=n();if(o){const l=e.children;return(t=typeof l=="function"&&l.length>0)?se(()=>l(o)):l}return e.fallback})}function Re(e,t,n){let o=n.length,l=t.length,s=o,i=0,r=0,c=t[l-1].nextSibling,f=null;for(;i<l||r<s;){if(t[i]===n[r]){i++,r++;continue}for(;t[l-1]===n[s-1];)l--,s--;if(l===i){const a=s<o?r?n[r-1].nextSibling:n[s-r]:c;for(;r<s;)e.insertBefore(n[r++],a)}else if(s===r)for(;i<l;)(!f||!f.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[s-1]&&n[r]===t[l-1]){const a=t[--l].nextSibling;e.insertBefore(n[r++],t[i++].nextSibling),e.insertBefore(n[--s],a),t[l]=n[s]}else{if(!f){f=new Map;let h=r;for(;h<s;)f.set(n[h],h++)}const a=f.get(t[i]);if(a!=null)if(r<a&&a<s){let h=i,v=1,_;for(;++h<l&&h<s&&!((_=f.get(t[h]))==null||_!==a+v);)v++;if(v>a-r){const C=t[i];for(;r<a;)e.insertBefore(n[r++],C)}else e.replaceChild(n[r++],t[i++])}else i++;else t[i++].remove()}}}const he="_$DX_DELEGATE";function Ve(e,t,n){let o;return je(l=>{o=l,t===document?e():m(t,e(),t.firstChild?null:void 0,n)}),()=>{o(),t.textContent=""}}function N(e,t,n){const o=document.createElement("template");o.innerHTML=e;let l=o.content.firstChild;return n&&(l=l.firstChild),l}function Se(e,t=window.document){const n=t[he]||(t[he]=new Set);for(let o=0,l=e.length;o<l;o++){const s=e[o];n.has(s)||(n.add(s),t.addEventListener(s,Ue))}}function m(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return J(e,t,o,n);j(l=>J(e,t(),l,n),o)}function Ue(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(){return n||document}}),S.registry&&!S.done&&(S.done=!0,document.querySelectorAll("[id^=pl-]").forEach(o=>o.remove()));n!==null;){const o=n[t];if(o&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?o.call(n,l,e):o.call(n,e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function J(e,t,n,o,l){for(S.context&&!n&&(n=[...e.childNodes]);typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,i=o!==void 0;if(e=i&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(S.context)return n;if(s==="number"&&(t=t.toString()),i){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=P(e,n,o,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(S.context)return n;n=P(e,n,o)}else{if(s==="function")return j(()=>{let r=t();for(;typeof r=="function";)r=r();n=J(e,r,n,o)}),()=>n;if(Array.isArray(t)){const r=[],c=n&&Array.isArray(n);if(te(r,t,n,l))return j(()=>n=J(e,r,n,o,!0)),()=>n;if(S.context){for(let f=0;f<r.length;f++)if(r[f].parentNode)return n=r}if(r.length===0){if(n=P(e,n,o),i)return n}else c?n.length===0?ge(e,r,o):Re(e,n,r):(n&&P(e),ge(e,r));n=r}else if(t instanceof Node){if(S.context&&t.parentNode)return n=i?[t]:t;if(Array.isArray(n)){if(i)return n=P(e,n,o,t);P(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function te(e,t,n,o){let l=!1;for(let s=0,i=t.length;s<i;s++){let r=t[s],c=n&&n[s];if(r instanceof Node)e.push(r);else if(!(r==null||r===!0||r===!1))if(Array.isArray(r))l=te(e,r,c)||l;else if(typeof r=="function")if(o){for(;typeof r=="function";)r=r();l=te(e,Array.isArray(r)?r:[r],c)||l}else e.push(r),l=!0;else{const f=String(r);c&&c.nodeType===3&&c.data===f?e.push(c):e.push(document.createTextNode(f))}}return l}function ge(e,t,n){for(let o=0,l=t.length;o<l;o++)e.insertBefore(t[o],n)}function P(e,t,n,o){if(n===void 0)return e.textContent="";const l=o||document.createTextNode("");if(t.length){let s=!1;for(let i=t.length-1;i>=0;i--){const r=t[i];if(l!==r){const c=r.parentNode===e;!s&&!i?c?e.replaceChild(l,r):e.insertBefore(l,n):c&&r.remove()}else s=!0}}else e.insertBefore(l,n);return[l]}function Ge(e,t,...n){if(t===void 0)throw new Error("`Ohbug warning(condition, format, ...args)` requires a warning message argument");if(!e){let o=0;const l=t.replace(/%s/g,()=>n[o++]);throw new Error(`Ohbug ${l}`)}}var Ie={};function qe(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:Ie}function Ke(){const e=qe();return Ge(Boolean(e.__OHBUG__),"Failed to get `OhbugObject`, please confirm if `Ohbug.setup`"),e.__OHBUG__}function _e(e,t){e.parentNode&&(t.push(e.parentNode),_e(e.parentNode,t))}function We(e){const t=[];return t.push(e),_e(e,t),t}var Xe=e=>{const t=e.target||e.srcElement;let n=e.target||e.srcElement;const o=[];for(let i=0;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_TYPE_NODE;n=n.previousSibling)i&&o.push(n),i+=1;const l=typeof e.path>"u"?We(e.target):e.path,{outerHTML:s}=t;return l.reverse().map(i=>(i.localName||"")+(i.id?`#${i.id}`:"")+(i.className?`.${i.className}`:"")+(i.outerHTML===s?`:nth-child(${o.length})`:"")).filter(i=>Boolean(i)).join(" > ")};const Ae=Symbol("store-raw"),Q=Symbol("store-node"),Ye=Symbol("store-name");function Ne(e,t){let n=e[z];if(!n){Object.defineProperty(e,z,{value:n=new Proxy(e,Ze)});const o=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let s=0,i=o.length;s<i;s++){const r=o[s];if(l[r].get){const c=l[r].get.bind(n);Object.defineProperty(e,r,{get:c})}}}return n}function Z(e){let t;return e!=null&&typeof e=="object"&&(e[z]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function U(e,t=new Set){let n,o,l,s;if(n=e!=null&&e[Ae])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 i=0,r=e.length;i<r;i++)l=e[i],(o=U(l,t))!==l&&(e[i]=o)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const i=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let c=0,f=i.length;c<f;c++)s=i[c],!r[s].get&&(l=e[s],(o=U(l,t))!==l&&(e[s]=o))}return e}function fe(e){let t=e[Q];return t||Object.defineProperty(e,Q,{value:t={}}),t}function ne(e,t,n){return e[t]||(e[t]=Oe(n,!0))}function Je(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===z||t===Q||t===Ye||(delete n.value,delete n.writable,n.get=()=>e[z][t]),n}function ke(e){if($e()){const t=fe(e);(t._||(t._=Oe()))()}}function Qe(e){return ke(e),Reflect.ownKeys(e)}function Oe(e,t){const[n,o]=F(e,t?{internal:!0}:{equals:!1,internal:!0});return n.$=o,n}const Ze={get(e,t,n){if(t===Ae)return e;if(t===z)return n;if(t===He)return ke(e);const o=fe(e),l=o[t];let s=l?o[t]():e[t];if(t===Q||t==="__proto__")return s;if(!l){const i=Object.getOwnPropertyDescriptor(e,t);$e()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(s=ne(o,t,s)())}return Z(s)?Ne(s):s},set(){return!0},deleteProperty(){return!0},ownKeys:Qe,getOwnPropertyDescriptor:Je};function ee(e,t,n){if(e[t]===n)return;const o=e[t],l=e.length;n===void 0?delete e[t]:e[t]=n;let s=fe(e),i;(i=ne(s,t,o))&&i.$(()=>n),Array.isArray(e)&&e.length!==l&&(i=ne(s,"length",l))&&i.$(e.length),(i=s._)&&i.$()}function Ce(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const l=n[o];ee(e,l,t[l])}}function et(e,t){if(typeof t=="function"&&(t=t(e)),t=U(t),Array.isArray(t)){if(e===t)return;let n=0,o=t.length;for(;n<o;n++){const l=t[n];e[n]!==l&&ee(e,n,l)}ee(e,"length",o)}else Ce(e,t)}function D(e,t,n=[]){let o,l=e;if(t.length>1){o=t.shift();const i=typeof o,r=Array.isArray(e);if(Array.isArray(o)){for(let c=0;c<o.length;c++)D(e,[o[c]].concat(t),n);return}else if(r&&i==="function"){for(let c=0;c<e.length;c++)o(e[c],c)&&D(e,[c].concat(t),n);return}else if(r&&i==="object"){const{from:c=0,to:f=e.length-1,by:a=1}=o;for(let h=c;h<=f;h+=a)D(e,[h].concat(t),n);return}else if(t.length>1){D(e[o],t,[o].concat(n));return}l=e[o],n=[o].concat(n)}let s=t[0];typeof s=="function"&&(s=s(l,n),s===l)||o===void 0&&s==null||(s=U(s),o===void 0||Z(l)&&Z(s)&&!Array.isArray(s)?Ce(l,s):ee(e,o,s))}function tt(...[e,t]){const n=U(e||{}),o=Array.isArray(n),l=Ne(n);function s(...i){ye(()=>{o&&i.length===1?et(n,i[0]):D(n,i)})}return[l,s]}const[p,L]=tt({working:!1,selectedElement:null}),nt=N('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></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" data-ohbug-selector fill="rgba(255,255,255,1)"></path></svg>'),ot=N('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></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" data-ohbug-selector></path></svg>'),oe=()=>nt.cloneNode(!0),lt=()=>(()=>{const e=ot.cloneNode(!0);return e.firstChild.nextSibling.style.setProperty("fill","var(--color)"),e})();const st=N('<div class="bg-none border-solid border-4 border-blue-500 transition top-0 right-0 bottom-0 left-0 z-10 fixed pointer-events-none" data-ohbug-selector><div class="tips" data-ohbug-selector>Select element on the page<button class="stop-btn" type="button"></button></div></div>'),it=N('<button class="rounded-full cursor-pointer flex bg-red-500 h-6 -top-3 -right-3 w-6 z-10 items-center justify-center absolute pointer-events-auto" data-ohbug-selector type="button"></button>'),rt=N('<button class="border-solid cursor-pointer font-semibold bg-red-500 border-4 border-red-500 -bottom-full text-white right-0 absolute pointer-events-auto" data-ohbug-selector type="button">Change</button>'),ct=N('<div class="-z-1 fixed" data-ohbug-selector><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div data-ohbug-selector></div></div>'),ut=()=>{const[e,t]=F();let n,o,l,s,i;const r=2;function c(u){if(!u||u.tagName==="HTML")return;const{width:g,height:w,top:A,right:T,bottom:M,left:d}=u.getBoundingClientRect();i==null||i.setAttribute("style",`
|
|
2
|
+
width: ${g+r*2}px;
|
|
3
3
|
height: ${w+r*2}px;
|
|
4
4
|
top: ${A-r}px;
|
|
5
5
|
left: ${d-r}px;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
bottom: 0;
|
|
15
15
|
left: ${T}px;
|
|
16
16
|
`),l==null||l.setAttribute("style",`
|
|
17
|
-
width: ${
|
|
18
|
-
top: ${
|
|
17
|
+
width: ${g+d}px;
|
|
18
|
+
top: ${M}px;
|
|
19
19
|
bottom: 0;
|
|
20
20
|
left: 0;
|
|
21
21
|
`),s==null||s.setAttribute("style",`
|
|
@@ -23,38 +23,12 @@
|
|
|
23
23
|
height: ${w}px;
|
|
24
24
|
top: ${A}px;
|
|
25
25
|
left: 0;
|
|
26
|
-
`)}function u
|
|
27
|
-
width: ${
|
|
26
|
+
`)}function f(u){if(!u||u.tagName==="HTML")return;const{width:g,height:w,top:A,left:T}=u.getBoundingClientRect();L({selectedElement:u}),i==null||i.setAttribute("style",`
|
|
27
|
+
width: ${g+r*2}px;
|
|
28
28
|
height: ${w+r*2}px;
|
|
29
29
|
top: ${A-r}px;
|
|
30
30
|
left: ${T-r}px;
|
|
31
|
-
`)}function a(
|
|
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 {
|
|
31
|
+
`)}function a(u){var w;L({working:!0});const g=document.elementFromPoint(u.clientX,u.clientY);if(((w=g==null?void 0:g.dataset)==null?void 0:w.ohbugSelector)!==void 0||g.tagName==="HTML")return!1;c(g)}function h(){document.addEventListener("mousemove",a)}function v(){document.removeEventListener("mousemove",a)}function _(u){var w;const g=document.elementFromPoint(u.clientX,u.clientY);if(((w=g==null?void 0:g.dataset)==null?void 0:w.ohbugSelector)!==void 0||g.tagName==="HTML"||p.selectedElement&&p.working)return!1;t(g),f(e()),v()}function C(){document.addEventListener("mousedown",_)}function q(){document.removeEventListener("mousedown",_)}function k(){t(null),v(),q(),L({working:!1,selectedElement:null})}function K(){L({working:!0,selectedElement:null}),t(null),h()}return we(()=>{p.working?(h(),C()):(v(),q())}),Me(k),(()=>{const u=ct.cloneNode(!0),g=u.firstChild,w=g.nextSibling,A=w.nextSibling,T=A.nextSibling,M=T.nextSibling;return m(u,x(V,{get when(){return!p.selectedElement&&p.working},get children(){const d=st.cloneNode(!0),Te=d.firstChild,Pe=Te.firstChild,ae=Pe.nextSibling;return ae.$$click=k,m(ae,x(oe,{})),d}}),g),(d=>{n=d})(g),(d=>{o=d})(w),(d=>{l=d})(A),(d=>{s=d})(T),(d=>{i=d})(M),m(M,x(V,{get when(){return p.selectedElement&&p.working},get children(){return[(()=>{const d=it.cloneNode(!0);return d.$$click=k,m(d,x(oe,{})),d})(),(()=>{const d=rt.cloneNode(!0);return d.$$click=K,d.style.setProperty("transform","translate(4px, -8px)"),d})()]}})),j(()=>M.className=`fixed -z-1 bg-black bg-opacity-20 border-4 rounded-sm transition cursor-pointer box-border pointer-events-none ${e()?"border-red-500 border-solid":"border-blue-500 border-dashed"}`),u})()};Se(["click"]);const ft=N('<button class="main-btn" data-ohbug-selector type="button"></button>'),at=N('<div class="bg-white flex flex-col h-60 shadow z-max right-8 bottom-20 w-80 fixed" data-ohbug-selector><div class="bg-gray-300 p-4" data-ohbug-selector><textarea autofocus class="bg-transparent outline-none w-full resize-none" data-ohbug-selector maxlength="1000" placeholder="Tell me how you feel..." rows="4"></textarea><button class="cursor-pointer" data-ohbug-selector type="button"></button></div><div class="flex flex-1 p-4 justify-between items-center" data-ohbug-selector><span class="text-sm" data-ohbug-selector>Try<a class="ml-1 underline" data-ohbug-selector href="https://ohbug.net" rel="noreferrer" target="_blank">Ohbug</a>?</span><button class="send-btn" data-ohbug-selector type="button"></button></div><button class="rounded-full cursor-pointer flex bg-blue-500 h-6 -top-2 -right-2 w-6 z-10 items-center justify-center absolute" data-ohbug-selector type="button"></button></div>'),dt=N('<div class="z-max relative" data-ohbug-selector><div></div></div>'),ht=()=>{const[e,t]=F(!1),[n,o]=F("");function l(){L({working:!0})}const[s,i]=F(!1);async function r(){i(!0);let c,f;const a=Ke().client;if(p.selectedElement){const h={target:p.selectedElement};c=Xe(h),f=p.selectedElement.outerHTML;const v=a.createEvent({category:"feedback",type:"feedback",detail:{selector:c,outerHTML:f,feedback:n()}});await a.notify(v)}else{const h=a.createEvent({category:"feedback",type:"feedback",detail:{feedback:n()}});await a.notify(h)}t(!1),o(""),L({working:!1,selectedElement:null}),i(!1)}return we(()=>{p.working===!1&&p.selectedElement===null||p.working&&!p.selectedElement?t(!1):t(!0)}),(()=>{const c=dt.cloneNode(!0),f=c.firstChild;return m(c,x(V,{get when(){return p.working},get children(){return x(ut,{})}}),f),m(f,x(V,{get when(){return!(p.working&&!p.selectedElement)},get children(){const a=ft.cloneNode(!0);return a.$$click=()=>t(h=>!h),m(a,()=>e()?"\u{1F606}":"\u{1F642}"),a}}),null),m(f,x(V,{get when(){return e()},get children(){const a=at.cloneNode(!0),h=a.firstChild,v=h.firstChild,_=v.nextSibling,C=h.nextSibling,q=C.firstChild,k=q.nextSibling,K=C.nextSibling;return v.$$input=u=>o(u.currentTarget.value),_.$$click=l,m(_,x(lt,{})),k.$$click=r,m(k,()=>s()?"Sending...":"Send"),K.$$click=()=>t(u=>!u),m(K,x(oe,{})),j(u=>{const g=p.selectedElement?"blue":"gray",w=!n()||s();return g!==u._v$&&_.style.setProperty("--color",u._v$=g),w!==u._v$2&&(k.disabled=u._v$2=w),u},{_v$:void 0,_v$2:void 0}),j(()=>v.value=n()),a}}),null),c})()};Se(["click","input"]);const gt={name:"OhbugExtensionFeedback",onSetup:()=>{const e=document.createElement("div");e.id="OhbugExtensionFeedback-ROOT",document.body.appendChild(e),Ve(()=>x(ht,{}),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(`.main-btn {
|
|
58
32
|
--tw-bg-opacity: 1;
|
|
59
33
|
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
60
34
|
border-radius: 0.25rem;
|
|
@@ -105,6 +79,32 @@
|
|
|
105
79
|
-webkit-box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);
|
|
106
80
|
box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);
|
|
107
81
|
}
|
|
82
|
+
.send-btn {
|
|
83
|
+
--tw-bg-opacity: 1;
|
|
84
|
+
background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
|
|
85
|
+
border-radius: 0.125rem;
|
|
86
|
+
font-size: 0.875rem;
|
|
87
|
+
line-height: 1.25rem;
|
|
88
|
+
padding-left: 0.75rem;
|
|
89
|
+
padding-right: 0.75rem;
|
|
90
|
+
padding-top: 0.25rem;
|
|
91
|
+
padding-bottom: 0.25rem;
|
|
92
|
+
--tw-text-opacity: 1;
|
|
93
|
+
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
|
94
|
+
-webkit-transition-property: background-color, border-color, color, fill, stroke, opacity, -webkit-box-shadow, -webkit-transform, filter, backdrop-filter;
|
|
95
|
+
-o-transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
96
|
+
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, -webkit-box-shadow, transform, -webkit-transform, filter, backdrop-filter;
|
|
97
|
+
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
98
|
+
-o-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
99
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
100
|
+
-webkit-transition-duration: 150ms;
|
|
101
|
+
-o-transition-duration: 150ms;
|
|
102
|
+
transition-duration: 150ms;
|
|
103
|
+
}
|
|
104
|
+
.send-btn:disabled {
|
|
105
|
+
cursor: not-allowed;
|
|
106
|
+
opacity: 0.5;
|
|
107
|
+
}
|
|
108
108
|
/* windicss layer base */
|
|
109
109
|
*, ::before, ::after {
|
|
110
110
|
-webkit-box-sizing: border-box;
|
|
@@ -331,8 +331,8 @@ textarea::-ms-input-placeholder {
|
|
|
331
331
|
font-size: 0.875rem;
|
|
332
332
|
line-height: 1.25rem;
|
|
333
333
|
}
|
|
334
|
-
.ml-
|
|
335
|
-
margin-left: 0.
|
|
334
|
+
.ml-1 {
|
|
335
|
+
margin-left: 0.25rem;
|
|
336
336
|
}
|
|
337
337
|
.outline-none {
|
|
338
338
|
outline: 2px solid transparent;
|
|
@@ -495,4 +495,4 @@ textarea::-ms-input-placeholder {
|
|
|
495
495
|
-webkit-transition-duration: 150ms;
|
|
496
496
|
-o-transition-duration: 150ms;
|
|
497
497
|
transition-duration: 150ms;
|
|
498
|
-
}`);module.exports=
|
|
498
|
+
}`);module.exports=gt;
|