@gkd-kit/inspect 0.0.1737722733437 → 0.0.1739247283442
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/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-CObnTTkk.js → ActionCard.vue_vue_type_script_setup_true_lang-BUQxdkDu.js} +2 -2
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-CObnTTkk.js.map → ActionCard.vue_vue_type_script_setup_true_lang-BUQxdkDu.js.map} +1 -1
- package/dist/assets/{DevicePage-BuhMsBat.js → DevicePage-D3tJmf8m.js} +2 -2
- package/dist/assets/{DevicePage-BuhMsBat.js.map → DevicePage-D3tJmf8m.js.map} +1 -1
- package/dist/assets/{HomePage-tTq-J-Qw.js → HomePage-DSquujyR.js} +2 -2
- package/dist/assets/{HomePage-tTq-J-Qw.js.map → HomePage-DSquujyR.js.map} +1 -1
- package/dist/assets/{ImportPage-C826Ylcc.js → ImportPage-BR8bCWWa.js} +2 -2
- package/dist/assets/{ImportPage-C826Ylcc.js.map → ImportPage-BR8bCWWa.js.map} +1 -1
- package/dist/assets/{Input-zzFFygV-.js → Input-ISG1avIj.js} +2 -2
- package/dist/assets/{Input-zzFFygV-.js.map → Input-ISG1avIj.js.map} +1 -1
- package/dist/assets/{SelectorPage-BfpXwxXu.js → SelectorPage-DBOkSm75.js} +2 -2
- package/dist/assets/{SelectorPage-BfpXwxXu.js.map → SelectorPage-DBOkSm75.js.map} +1 -1
- package/dist/assets/{SnapshotPage-D8ggxw1W.js → SnapshotPage-DDp4nWkb.js} +26 -26
- package/dist/assets/SnapshotPage-DDp4nWkb.js.map +1 -0
- package/dist/assets/{TrackGraph-Dzg6umnG.js → TrackGraph-G0bjCAz-.js} +2 -2
- package/dist/assets/{TrackGraph-Dzg6umnG.js.map → TrackGraph-G0bjCAz-.js.map} +1 -1
- package/dist/assets/{_404Page-eImxk49J.js → _404Page--M_IFpqD.js} +2 -2
- package/dist/assets/{_404Page-eImxk49J.js.map → _404Page--M_IFpqD.js.map} +1 -1
- package/dist/assets/chunk-BCnrTYpw.js +3 -0
- package/dist/assets/{chunk-CVEonGec.js.map → chunk-BCnrTYpw.js.map} +1 -1
- package/dist/assets/{dayjs.min-ljH3fvyS.js → dayjs.min-BdrexUn5.js} +3 -3
- package/dist/assets/{dayjs.min-ljH3fvyS.js.map → dayjs.min-BdrexUn5.js.map} +1 -1
- package/dist/assets/{error-D3V93fcD.js → error-C22X2wZs.js} +2 -2
- package/dist/assets/{error-D3V93fcD.js.map → error-C22X2wZs.js.map} +1 -1
- package/dist/assets/{import-SDkYqU1v.js → import-BURUsfCJ.js} +2 -2
- package/dist/assets/{import-SDkYqU1v.js.map → import-BURUsfCJ.js.map} +1 -1
- package/dist/assets/{index-DfrQxctn.css → index-DSz0dnVv.css} +1 -1
- package/dist/assets/{index-b4d77I7P.js → index-H3SmzK8u.js} +7 -7
- package/dist/assets/{index-b4d77I7P.js.map → index-H3SmzK8u.js.map} +1 -1
- package/dist/assets/{jszip.min-Bxzsk99W.js → jszip.min-DR9wgyrS.js} +2 -2
- package/dist/assets/{jszip.min-Bxzsk99W.js.map → jszip.min-DR9wgyrS.js.map} +1 -1
- package/dist/assets/{snapshot-DvLDZN26.js → snapshot-BmF2lT6l.js} +2 -2
- package/dist/assets/{snapshot-DvLDZN26.js.map → snapshot-BmF2lT6l.js.map} +1 -1
- package/dist/assets/{table-CRSAw6Gx.js → table-BO6I0KkX.js} +2 -2
- package/dist/assets/{table-CRSAw6Gx.js.map → table-BO6I0KkX.js.map} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/SnapshotPage-D8ggxw1W.js.map +0 -1
- package/dist/assets/chunk-CVEonGec.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ag as gt,d as wt,aX as yt,a3 as bt,h as K,j as Je,aa as xt,m as $,q as kt,t as _e,aq as je,v as C,w as Bt,aY as Et,X as le,ad as Pt,aZ as Ct,a as Oe,b as ae,e as Ue,u as Ye,r as Tt,$ as St,a_ as Ft,a$ as Rt,y as Ie,V as Qe,K as w,aR as q,z as et,Q as P,Y as At,b0 as M,aM as _t,aU as ue,aF as J,b1 as jt,b2 as Ot,at as Ut,aE as It,H as S,I as ze,M as x,L as g,J as E,S as N,av as A,aT as zt,W as Le}from"./index-
|
|
1
|
+
import{ag as gt,d as wt,aX as yt,a3 as bt,h as K,j as Je,aa as xt,m as $,q as kt,t as _e,aq as je,v as C,w as Bt,aY as Et,X as le,ad as Pt,aZ as Ct,a as Oe,b as ae,e as Ue,u as Ye,r as Tt,$ as St,a_ as Ft,a$ as Rt,y as Ie,V as Qe,K as w,aR as q,z as et,Q as P,Y as At,b0 as M,aM as _t,aU as ue,aF as J,b1 as jt,b2 as Ot,at as Ut,aE as It,H as S,I as ze,M as x,L as g,J as E,S as N,av as A,aT as zt,W as Le}from"./index-H3SmzK8u.js";import{u as De,_ as Lt}from"./Input-ISG1avIj.js";import{e as Dt,b as Y,p as tt,a as nt}from"./snapshot-BmF2lT6l.js";import{J as pe}from"./chunk-BCnrTYpw.js";import{x as Mt,y as Nt,b as it,u as H,N as Ht,a as Wt,m as $t}from"./dayjs.min-BdrexUn5.js";const Xt={iconSize:"22px"};function Vt(t){const{fontSize:e,warningColor:i}=t;return Object.assign(Object.assign({},Xt),{fontSize:e,iconColor:i})}const qt=gt({name:"Popconfirm",common:wt,peers:{Button:yt,Popover:Mt},self:Vt}),at=bt("n-popconfirm"),ot={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},Me=Et(ot),Gt=K({name:"NPopconfirmPanel",props:ot,setup(t){const{localeRef:e}=De("Popconfirm"),{inlineThemeDisabled:i}=Je(),{mergedClsPrefixRef:n,mergedThemeRef:o,props:s}=xt(at),d=$(()=>{const{common:{cubicBezierEaseInOut:r},self:{fontSize:a,iconSize:u,iconColor:h}}=o.value;return{"--n-bezier":r,"--n-font-size":a,"--n-icon-size":u,"--n-icon-color":h}}),p=i?kt("popconfirm-panel",void 0,d,s):void 0;return Object.assign(Object.assign({},De("Popconfirm")),{mergedClsPrefix:n,cssVars:i?void 0:d,localizedPositiveText:$(()=>t.positiveText||e.value.positiveText),localizedNegativeText:$(()=>t.negativeText||e.value.negativeText),positiveButtonProps:_e(s,"positiveButtonProps"),negativeButtonProps:_e(s,"negativeButtonProps"),handlePositiveClick(r){t.onPositiveClick(r)},handleNegativeClick(r){t.onNegativeClick(r)},themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender})},render(){var t;const{mergedClsPrefix:e,showIcon:i,$slots:n}=this,o=je(n.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&C(le,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&C(le,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(t=this.onRender)===null||t===void 0||t.call(this),C("div",{class:[`${e}-popconfirm__panel`,this.themeClass],style:this.cssVars},Bt(n.default,s=>i||s?C("div",{class:`${e}-popconfirm__body`},i?C("div",{class:`${e}-popconfirm__icon`},je(n.icon,()=>[C(Pt,{clsPrefix:e},{default:()=>C(Ct,null)})])):null,s):null),o?C("div",{class:[`${e}-popconfirm__action`]},o):null)}}),Zt=Oe("popconfirm",[ae("body",`
|
|
2
2
|
font-size: var(--n-font-size);
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -22,4 +22,4 @@ import{ag as gt,d as wt,aX as yt,a3 as bt,h as K,j as Je,aa as xt,m as $,q as kt
|
|
|
22
22
|
*
|
|
23
23
|
* Date: 2023-02-28T14:09:41.732Z
|
|
24
24
|
*/function Xe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),i.push.apply(i,n)}return i}function W(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Xe(Object(i),!0).forEach(function(n){rn(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Xe(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function an(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ve(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,st(n.key),n)}}function on(t,e,i){return e&&Ve(t.prototype,e),i&&Ve(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function rn(t,e,i){return e=st(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function G(){return G=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},G.apply(this,arguments)}function sn(t,e){if(typeof t!="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var n=i.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function st(t){var e=sn(t,"string");return typeof e=="symbol"?e:String(e)}var lt={exports:{}};(function(t){typeof window>"u"||function(e){var i=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,n=e.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=n&&e.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,d=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,p=(n||s)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(r){var a,u,h,l,c,f,m,v,B;if(a=r.match(d),!a)throw new Error("invalid data URI");for(u=a[2]?a[1]:"text/plain"+(a[3]||";charset=US-ASCII"),h=!!a[4],l=r.slice(a[0].length),h?c=atob(l):c=decodeURIComponent(l),f=new ArrayBuffer(c.length),m=new Uint8Array(f),v=0;v<c.length;v+=1)m[v]=c.charCodeAt(v);return n?new Blob([o?m:f],{type:u}):(B=new s,B.append(f),B.getBlob(u))};e.HTMLCanvasElement&&!i.toBlob&&(i.mozGetAsFile?i.toBlob=function(r,a,u){var h=this;setTimeout(function(){u&&i.toDataURL&&p?r(p(h.toDataURL(a,u))):r(h.mozGetAsFile("blob",a))})}:i.toDataURL&&p&&(i.msToBlob?i.toBlob=function(r,a,u){var h=this;setTimeout(function(){(a&&a!=="image/png"||u)&&i.toDataURL&&p?r(p(h.toDataURL(a,u))):r(h.msToBlob(a))})}:i.toBlob=function(r,a,u){var h=this;setTimeout(function(){r(p(h.toDataURL(a,u)))})})),t.exports?t.exports=p:e.dataURLtoBlob=p}(window)})(lt);var qe=lt.exports,ln=function(e){return typeof Blob>"u"?!1:e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]"},Ge={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},cn=typeof window<"u"&&typeof window.document<"u",F=cn?window:{},Z=function(e){return e>0&&e<1/0},un=Array.prototype.slice;function fe(t){return Array.from?Array.from(t):un.call(t)}var pn=/^image\/.+$/;function ce(t){return pn.test(t)}function fn(t){var e=ce(t)?t.substr(6):"";return e==="jpeg"&&(e="jpg"),".".concat(e)}var ct=String.fromCharCode;function dn(t,e,i){var n="",o;for(i+=e,o=e;o<i;o+=1)n+=ct(t.getUint8(o));return n}var hn=F.btoa;function Ze(t,e){for(var i=[],n=8192,o=new Uint8Array(t);o.length>0;)i.push(ct.apply(null,fe(o.subarray(0,n)))),o=o.subarray(n);return"data:".concat(e,";base64,").concat(hn(i.join("")))}function mn(t){var e=new DataView(t),i;try{var n,o,s;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var d=e.byteLength,p=2;p+1<d;){if(e.getUint8(p)===255&&e.getUint8(p+1)===225){o=p;break}p+=1}if(o){var r=o+4,a=o+10;if(dn(e,r,4)==="Exif"){var u=e.getUint16(a);if(n=u===18761,(n||u===19789)&&e.getUint16(a+2,n)===42){var h=e.getUint32(a+4,n);h>=8&&(s=a+h)}}}if(s){var l=e.getUint16(s,n),c,f;for(f=0;f<l;f+=1)if(c=s+f*12+2,e.getUint16(c,n)===274){c+=8,i=e.getUint16(c,n),e.setUint16(c,1,n);break}}}catch{i=1}return i}function vn(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:i,scaleY:n}}var gn=/\.\d*(?:0|9){12}\d*$/;function Ke(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return gn.test(t)?Math.round(t*e)/e:t}function D(t){var e=t.aspectRatio,i=t.height,n=t.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=Z(n),d=Z(i);if(s&&d){var p=i*e;(o==="contain"||o==="none")&&p>n||o==="cover"&&p<n?i=n/e:n=i*e}else s?i=n/e:d&&(n=i*e);return{width:n,height:i}}function wn(t){for(var e=fe(new Uint8Array(t)),i=e.length,n=[],o=0;o+3<i;){var s=e[o],d=e[o+1];if(s===255&&d===218)break;if(s===255&&d===216)o+=2;else{var p=e[o+2]*256+e[o+3],r=o+p+2,a=e.slice(o,r);n.push(a),o=r}}return n.reduce(function(u,h){return h[0]===255&&h[1]===225?u.concat(h):u},[])}function yn(t,e){var i=fe(new Uint8Array(t));if(i[2]!==255||i[3]!==224)return t;var n=i[4]*256+i[5],o=[255,216].concat(e,i.slice(4+n));return new Uint8Array(o)}var bn=F.ArrayBuffer,se=F.FileReader,_=F.URL||F.webkitURL,xn=/\.\w+$/,kn=F.Compressor,Bn=function(){function t(e,i){an(this,t),this.file=e,this.exif=[],this.image=new Image,this.options=W(W({},Ge),i),this.aborted=!1,this.result=null,this.init()}return on(t,[{key:"init",value:function(){var i=this,n=this.file,o=this.options;if(!ln(n)){this.fail(new Error("The first argument must be a File or Blob object."));return}var s=n.type;if(!ce(s)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!_||!se){this.fail(new Error("The current browser does not support image compression."));return}bn||(o.checkOrientation=!1,o.retainExif=!1);var d=s==="image/jpeg",p=d&&o.checkOrientation,r=d&&o.retainExif;if(_&&!p&&!r)this.load({url:_.createObjectURL(n)});else{var a=new se;this.reader=a,a.onload=function(u){var h=u.target,l=h.result,c={},f=1;p&&(f=mn(l),f>1&&G(c,vn(f))),r&&(i.exif=wn(l)),p||r?!_||f>1?c.url=Ze(l,s):c.url=_.createObjectURL(n):c.url=l,i.load(c)},a.onabort=function(){i.fail(new Error("Aborted to read the image with FileReader."))},a.onerror=function(){i.fail(new Error("Failed to read the image with FileReader."))},a.onloadend=function(){i.reader=null},p||r?a.readAsArrayBuffer(n):a.readAsDataURL(n)}}},{key:"load",value:function(i){var n=this,o=this.file,s=this.image;s.onload=function(){n.draw(W(W({},i),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){n.fail(new Error("Aborted to load the image."))},s.onerror=function(){n.fail(new Error("Failed to load the image."))},F.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(F.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=o.name,s.src=i.url}},{key:"draw",value:function(i){var n=this,o=i.naturalWidth,s=i.naturalHeight,d=i.rotate,p=d===void 0?0:d,r=i.scaleX,a=r===void 0?1:r,u=i.scaleY,h=u===void 0?1:u,l=this.file,c=this.image,f=this.options,m=document.createElement("canvas"),v=m.getContext("2d"),B=Math.abs(p)%180===90,T=(f.resize==="contain"||f.resize==="cover")&&Z(f.width)&&Z(f.height),k=Math.max(f.maxWidth,0)||1/0,R=Math.max(f.maxHeight,0)||1/0,U=Math.max(f.minWidth,0)||0,I=Math.max(f.minHeight,0)||0,j=o/s,y=f.width,b=f.height;if(B){var he=[R,k];k=he[0],R=he[1];var me=[I,U];U=me[0],I=me[1];var ve=[b,y];y=ve[0],b=ve[1]}T&&(j=y/b);var ge=D({aspectRatio:j,width:k,height:R},"contain");k=ge.width,R=ge.height;var we=D({aspectRatio:j,width:U,height:I},"cover");if(U=we.width,I=we.height,T){var ye=D({aspectRatio:j,width:y,height:b},f.resize);y=ye.width,b=ye.height}else{var be=D({aspectRatio:j,width:y,height:b}),xe=be.width;y=xe===void 0?o:xe;var ke=be.height;b=ke===void 0?s:ke}y=Math.floor(Ke(Math.min(Math.max(y,U),k))),b=Math.floor(Ke(Math.min(Math.max(b,I),R)));var dt=-y/2,ht=-b/2,mt=y,vt=b,ee=[];if(T){var Be=0,Ee=0,te=o,ne=s,Pe=D({aspectRatio:j,width:o,height:s},{contain:"cover",cover:"contain"}[f.resize]);te=Pe.width,ne=Pe.height,Be=(o-te)/2,Ee=(s-ne)/2,ee.push(Be,Ee,te,ne)}if(ee.push(dt,ht,mt,vt),B){var Ce=[b,y];y=Ce[0],b=Ce[1]}m.width=y,m.height=b,ce(f.mimeType)||(f.mimeType=l.type);var Te="transparent";l.size>f.convertSize&&f.convertTypes.indexOf(f.mimeType)>=0&&(f.mimeType="image/jpeg");var Se=f.mimeType==="image/jpeg";if(Se&&(Te="#fff"),v.fillStyle=Te,v.fillRect(0,0,y,b),f.beforeDraw&&f.beforeDraw.call(this,v,m),!this.aborted&&(v.save(),v.translate(y/2,b/2),v.rotate(p*Math.PI/180),v.scale(a,h),v.drawImage.apply(v,[c].concat(ee)),v.restore(),f.drew&&f.drew.call(this,v,m),!this.aborted)){var Fe=function(z){if(!n.aborted){var Re=function(L){return n.done({naturalWidth:o,naturalHeight:s,result:L})};if(z&&Se&&f.retainExif&&n.exif&&n.exif.length>0){var Ae=function(L){return Re(qe(Ze(yn(L,n.exif),f.mimeType)))};if(z.arrayBuffer)z.arrayBuffer().then(Ae).catch(function(){n.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var O=new se;n.reader=O,O.onload=function(ie){var L=ie.target;Ae(L.result)},O.onabort=function(){n.fail(new Error("Aborted to read the compressed image with FileReader."))},O.onerror=function(){n.fail(new Error("Failed to read the compressed image with FileReader."))},O.onloadend=function(){n.reader=null},O.readAsArrayBuffer(z)}}else Re(z)}};m.toBlob?m.toBlob(Fe,f.mimeType,f.quality):Fe(qe(m.toDataURL(f.mimeType,f.quality)))}}},{key:"done",value:function(i){var n=i.naturalWidth,o=i.naturalHeight,s=i.result,d=this.file,p=this.image,r=this.options;if(_&&p.src.indexOf("blob:")===0&&_.revokeObjectURL(p.src),s)if(r.strict&&!r.retainExif&&s.size>d.size&&r.mimeType===d.type&&!(r.width>n||r.height>o||r.minWidth>n||r.minHeight>o||r.maxWidth<n||r.maxHeight<o))s=d;else{var a=new Date;s.lastModified=a.getTime(),s.lastModifiedDate=a,s.name=d.name,s.name&&s.type!==d.type&&(s.name=s.name.replace(xn,fn(s.type)))}else s=d;this.result=s,r.success&&r.success.call(this,s)}},{key:"fail",value:function(i){var n=this.options;if(n.error)n.error.call(this,i);else throw i}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=kn,t}},{key:"setDefaults",value:function(i){G(Ge,i)}}]),t}();const de=async t=>{t.nodes.length||(t=await nt.getItem(t.id)||t);const e=new(await pe);return e.file("snapshot.json",JSON.stringify(t)).file("screenshot.png",await Y.getItem(t.id)),await e.generateAsync({type:"blob",compression:"STORE"})},En=async t=>{const e=`snapshot-${t.id}.zip`;Q.saveAs(await de(t),e)},Pn=async t=>{const e=`snapshot-${t.id}.png`;Q.saveAs(new Blob([await Y.getItem(t.id)],{type:"image/png"}),e)},Un=async t=>{const e=new(await pe);for(const n of t)await ue(),e.file(n.id+".png",new Blob([await Y.getItem(n.id)],{type:"image/png"}));const i=await e.generateAsync({type:"blob",compression:"STORE"});Q.saveAs(i,`batch-png-${Date.now()}.zip`)},In=async t=>{const e=new(await pe);for(const n of t)await ue(),e.file(n.id+".zip",await de(n));const i=await e.generateAsync({type:"blob",compression:"STORE"});Q.saveAs(i,`batch-zip-${Date.now()}.zip`)},Cn=async t=>new Promise((e,i)=>{new Bn(new Blob([t],{type:"image/png"}),{quality:.75,convertSize:2e5,success(n){e(n)},error(n){i(n)}})}),ut=async t=>{var i;const{snapshotImageId:e}=J();return(i=e[t.id])!=null?i:rt(await Cn(await Y.getItem(t.id)),"file.jpg").then(n=>{const o=jt(n.href);if(!o)throw new Error("imageId not found");return e[t.id]=o,o})},pt=async t=>{const{snapshotImportId:e,importSnapshotId:i}=J();return e[t.id]||rt(await de(t).then(n=>n.arrayBuffer()),"file.zip").then(n=>(e[t.id]=n.id,i[n.id]=t.id,ft(t.id,n.id),n.id))},zn=async t=>{const e=tt(3);return(await Promise.allSettled(t.map(i=>e(()=>ut(i))))).reduce((i,n)=>(n.status=="fulfilled"&&i.push(n.value),i),[])},Ln=async t=>{const e=tt(3);return(await Promise.allSettled(t.map(i=>e(()=>pt(i))))).reduce((i,n)=>(n.status=="fulfilled"&&i.push(n.value),i),[])},ft=async(t,e)=>fetch("https://detect.gkd.li/api/detectSnapshot?"+Ot({id:t,importId:e}).toString()),Dn=async(t,e)=>{if(!e||!Number.isSafeInteger(+e))return;const{importSnapshotId:i,waitInit:n}=J();await n(),!i[e]&&await ft(t,e)},Tn={flex:"","gap-16px":""},Sn=["href"],Mn=K({__name:"ActionCard",props:{snapshot:{},onDelete:{type:Function,default:Ut},showPreview:{type:Boolean,default:!0},showExport:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0}},setup(t){const e=t,i=It(),{snapshotImportId:n,snapshotImageId:o}=J(),s=H(async()=>Pn(e.snapshot)),d=H(async()=>En(e.snapshot)),p=$(()=>i.resolve({name:"snapshot",params:{snapshotId:e.snapshot.id}}).href),r=H(async()=>{await He();const l=await ut(e.snapshot);Ne({title:"分享链接",content:Le(l)})}),a=H(async()=>{await He();const l=await pt(e.snapshot);Ne({title:"分享链接",content:location.origin+`/i/${l}`})}),u=async()=>{await nt.removeItem(e.snapshot.id),await ue(500),e.onDelete()},h=async l=>navigator.clipboard.writeText(l).then(()=>{q.success("复制成功")}).catch(()=>{q.success("复制失败")});return(l,c)=>{const f=Ht,m=le,v=Wt,B=it,T=$t,k=Jt;return S(),ze("div",Tn,[l.showPreview?(S(),ze("a",{key:0,flex:"",target:"_blank",href:x(p)},[w(m,{text:"",title:"查看"},{icon:g(()=>[w(f,{size:""},{default:g(()=>c[2]||(c[2]=[E("svg",{viewBox:"0 0 1024 1024"},[E("path",{d:"M549.973333 128 633.6 145.066667 474.026667 896 390.4 878.933333 549.973333 128M835.84 512 682.666667 358.826667 682.666667 238.08 956.586667 512 682.666667 785.493333 682.666667 664.746667 835.84 512M67.413333 512 341.333333 238.08 341.333333 358.826667 188.16 512 341.333333 664.746667 341.333333 785.493333 67.413333 512Z"})],-1)])),_:1})]),_:1})],8,Sn)):N("",!0),l.showExport?(S(),A(B,{key:1},{trigger:g(()=>[w(m,{text:""},{icon:g(()=>[w(f,null,{default:g(()=>c[3]||(c[3]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[E("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),E("path",{d:"M7 11l5 5l5-5"}),E("path",{d:"M12 4v12"})])],-1)])),_:1})]),_:1})]),default:g(()=>[w(v,{vertical:""},{default:g(()=>[w(m,{onClick:x(d).invoke,loading:x(d).loading},{default:g(()=>c[4]||(c[4]=[P(" 下载-快照 ")])),_:1},8,["onClick","loading"]),w(m,{onClick:x(s).invoke,loading:x(s).loading},{default:g(()=>c[5]||(c[5]=[P(" 下载-图片 ")])),_:1},8,["onClick","loading"])]),_:1})]),_:1})):N("",!0),l.showShare?(S(),A(B,{key:2},{trigger:g(()=>[w(m,{text:""},{icon:g(()=>[w(f,null,{default:g(()=>c[6]||(c[6]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81c1.66 0 3-1.34 3-3s-1.34-3-3-3s-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65c0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",fill:"currentColor"})],-1)])),_:1})]),_:1})]),default:g(()=>[w(v,{vertical:""},{default:g(()=>[x(n)[l.snapshot.id]?(S(),A(m,{key:0,onClick:c[0]||(c[0]=R=>h(x(zt)(x(n)[l.snapshot.id])))},{default:g(()=>c[7]||(c[7]=[P(" 复制链接-快照 ")])),_:1})):(S(),A(m,{key:1,onClick:x(a).invoke,loading:x(a).loading},{default:g(()=>c[8]||(c[8]=[P(" 生成链接-快照 ")])),_:1},8,["onClick","loading"])),x(o)[l.snapshot.id]?(S(),A(m,{key:2,onClick:c[1]||(c[1]=R=>h(x(Le)(x(o)[l.snapshot.id])))},{default:g(()=>c[9]||(c[9]=[P(" 复制链接-图片 ")])),_:1})):(S(),A(m,{key:3,onClick:x(r).invoke,loading:x(r).loading},{default:g(()=>c[10]||(c[10]=[P(" 生成链接-图片 ")])),_:1},8,["onClick","loading"]))]),_:1})]),_:1})):N("",!0),l.showDelete?(S(),A(k,{key:3,onPositiveClick:u},{trigger:g(()=>[w(T,null,{trigger:g(()=>[w(m,{text:""},{icon:g(()=>[w(f,null,{default:g(()=>c[11]||(c[11]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("g",{fill:"none"},[E("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})])],-1)])),_:1})]),_:1})]),default:g(()=>[c[12]||(c[12]=P(" 删除快照 "))]),_:1})]),default:g(()=>[c[13]||(c[13]=P(" 是否删除快照? "))]),_:1})):N("",!0)])}}});export{Mn as _,In as a,Un as b,zn as c,Ln as d,ut as e,pt as f,Dn as g,Ne as s,He as w};
|
|
25
|
-
//# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-
|
|
25
|
+
//# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-BUQxdkDu.js.map
|