Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobile-avatar-crop

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobile-avatar-crop - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

dist/index.js

@@ -1,2 +0,2 @@

!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";function i(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function o(t,e){return t.querySelectorAll('[data-role="'+e+'"]')}function r(t){return new Promise(function(e,n){var i=t.files[0],o=new FileReader;o.readAsDataURL(i),o.onload=function(t){e(t.target.result)}})}function s(t){var e='\n <div id="J-mobile-avatar-crop">\n <div data-role="img-wrap">\n <div data-role="img-cont">\n <img src="'+t.url+'">\n <div data-role="cropper" style="left: 0px;top: 0px;width: '+t.size+"px;height: "+t.size+'px;">\n <div data-role="scal-top-left"></div>\n <div data-role="scal-top-right"></div>\n <div data-role="scal-bottom-left"></div>\n <div data-role="scal-bottom-left"></div>\n </div>\n </div>\n </div>\n <div data-role="select">\n <div data-role="cancel">'+t.txtCancel+'</div>\n <div data-role="ok">'+t.txtOk+"</div>\n </div>\n </div>",n=i(e);document.body.appendChild(n)}function a(t,e){var n=document.createElement("canvas");window.devicePixelRatio;return n.width=t,n.height=e,Object.assign(n.style,{position:"absolute",visibility:"hidden"}),document.body.appendChild(n),n}function d(t){var e=t.domCropper,n=t.domImg,i=n.clientWidth,o=n.naturalWidth,r=e.clientWidth,s=e.clientHeight,d=e.style,c=d.top,u=d.left,h=o/i;r=r*h|0,s=s*h|0,c=parseInt(c)*h|0,u=parseInt(u)*h|0,console.log(i,o,r,s,c,u);var l=a(r,s);return l.getContext("2d").drawImage(n,u,c,r,s,0,0,r,s),l}function c(t,e){var n=t.domCrop,i=t.domCropper,o=(t.domImgWrap,t.domImgCont),r=t.domImg,s=t.domBtnOk,a=t.domBtnCancel,c=(t.isImgOut,function(){document.body.removeChild(n)});s.addEventListener("click",function(){e(d({domCropper:i,domImg:r}).toDataURL()),c()},!1),a.addEventListener("click",function(){e(!1),c()},!1);new p.default(i,{containment:o})}function u(t,e){return new Promise(function(n,i){var o=e.clientHeight,r=t.clientHeight;0===o?e.addEventListener("load",function(){o=e.clientHeight,o>=r&&(t.classList.add("full"),n(!0)),n(!1)},!1):o>=r&&(t.classList.add("full"),n(!0)),n(!1)})}function h(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.size;s({url:t,txtCancel:"取消",txtOk:"确认",size:void 0===i?v:i});var r=document.getElementById("J-mobile-avatar-crop"),a=o(r,"img-wrap")[0],d=o(a,"img-cont")[0],h=a.querySelector("img"),l=o(a,"cropper")[0],f=o(r,"cancel")[0],p=o(r,"ok")[0];u(a,h).then(function(t){c({domCrop:r,domImgWrap:a,domImgCont:d,domImg:h,domCropper:l,domBtnOk:p,domBtnCancel:f,isImgOut:t},e)})}function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.size,o=void 0===i?v:i;t.addEventListener("change",function(){r(t).then(function(n){h(n,e,{size:o}),t.value=""})},!1)}Object.defineProperty(e,"__esModule",{value:!0}),n(1);var f=n(6),p=function(t){return t&&t.__esModule?t:{default:t}}(f),v=100;window.mobileAvatarCrop=l,e.default=l},function(t,e,n){var i=n(2);"string"==typeof i&&(i=[[t.i,i,""]]);var o={};o.transform=void 0;n(4)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(void 0),e.push([t.i,"#J-mobile-avatar-crop{position:absolute;top:0;right:0;bottom:0;left:0;background:#000;z-index:1000;display:flex;flex-direction:column}#J-mobile-avatar-crop div[data-role=cropper]{position:absolute;z-index:1;box-shadow:0 0 0 999em rgba(0,0,0,.4);border:1px solid #fff;background:transparent}#J-mobile-avatar-crop div[data-role=img-wrap]{flex-grow:1;flex-shrink:1;display:flex;flex-direction:row;align-items:center;overflow:scroll}#J-mobile-avatar-crop div[data-role=img-wrap].full{align-items:flex-start}#J-mobile-avatar-crop div[data-role=img-wrap] div[data-role=img-cont]{position:relative}#J-mobile-avatar-crop div[data-role=img-wrap] img{width:100%;display:block;flex:100% 0 0}#J-mobile-avatar-crop div[data-role=select]{flex-grow:0;flex-shrink:0;height:50px;display:flex;flex-direction:row;align-items:stretch;justify-content:space-between}#J-mobile-avatar-crop div[data-role=select] div{font-size:16px;display:flex;justify-content:center;align-items:center;flex:49% 0 0;background:#ffc107;color:#fff}",""])},function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var r=i(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([r]).join("\n")}return[n].join("\n")}function i(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=n(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e,n){function i(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=p[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(u(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(u(i.parts[r],e));p[i.id]={id:i.id,refs:1,parts:s}}}}function o(t,e){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],s=e.base?r[0]+e.base:r[0],a=r[1],d=r[2],c=r[3],u={css:a,media:d,sourceMap:c};i[s]?i[s].parts.push(u):n.push(i[s]={id:s,parts:[u]})}return n}function r(t,e){var n=g(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=y[y.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function a(t){var e=document.createElement("style");return t.attrs.type="text/css",c(e,t.attrs),r(t,e),e}function d(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",c(e,t.attrs),r(t,e),e}function c(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function u(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var c=b++;n=m||(m=a(e)),i=h.bind(null,n,c,!1),o=h.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=d(e),i=f.bind(null,n,e),o=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),i=l.bind(null,n),o=function(){s(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function h(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function l(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function f(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=x(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([i],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var p={},v=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),g=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),m=null,b=0,y=[],x=n(5);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=v()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=o(t,e);return i(n,e),function(t){for(var r=[],s=0;s<n.length;s++){var a=n[s],d=p[a.id];d.refs--,r.push(d)}if(t){i(o(t,e),e)}for(var s=0;s<r.length;s++){var d=r[s];if(0===d.refs){for(var c=0;c<d.parts.length;c++)d.parts[c]();delete p[d.id]}}}};var w=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return t;var r;return r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")"})}},function(t,e,n){var i,o;/*!
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";function i(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function o(t,e){return t.querySelectorAll('[data-role="'+e+'"]')}function r(t){return new Promise(function(e,n){var i=t.files[0],o=new FileReader;o.readAsDataURL(i),o.onload=function(t){e(t.target.result)}})}function s(t){var e='\n <div id="J-mobile-avatar-crop">\n <div data-role="img-wrap">\n <div data-role="img-cont">\n <img src="'+t.url+'">\n <div data-role="cropper" style="left: 0px;top: 0px;width: '+t.size+"px;height: "+t.size+'px;">\n <div data-role="scal-top-left"></div>\n <div data-role="scal-top-right"></div>\n <div data-role="scal-bottom-left"></div>\n <div data-role="scal-bottom-left"></div>\n </div>\n </div>\n </div>\n <div data-role="select">\n <div data-role="cancel">'+t.txtCancel+'</div>\n <div data-role="ok">'+t.txtOk+"</div>\n </div>\n </div>",n=i(e);document.body.appendChild(n)}function a(t,e){var n=document.createElement("canvas");window.devicePixelRatio;return n.width=t,n.height=e,Object.assign(n.style,{position:"absolute",visibility:"hidden"}),document.body.appendChild(n),n}function d(t){var e=t.domCropper,n=t.domImg,i=n.clientWidth,o=n.naturalWidth,r=e.clientWidth,s=e.clientHeight,d=e.style,c=d.top,u=d.left,h=o/i;r=r*h|0,s=s*h|0,c=parseInt(c)*h|0,u=parseInt(u)*h|0,console.log(i,o,r,s,c,u);var l=a(r,s);return l.getContext("2d").drawImage(n,u,c,r,s,0,0,r,s),l}function c(t,e){var n=t.domCrop,i=t.domCropper,o=(t.domImgWrap,t.domImgCont),r=t.domImg,s=t.domBtnOk,a=t.domBtnCancel,c=(t.isImgOut,function(){document.body.removeChild(n)});s.addEventListener("click",function(){e(d({domCropper:i,domImg:r}).toDataURL()),c()},!1),a.addEventListener("click",function(){e(!1),c()},!1);new p.default(i,{containment:o})}function u(t,e){return new Promise(function(n,i){var o=e.clientHeight,r=t.clientHeight;0===o?e.addEventListener("load",function(){o=e.clientHeight,o>=r&&(t.classList.add("full"),n(!0)),n(!1)},!1):o>=r&&(t.classList.add("full"),n(!0)),n(!1)})}function h(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.size;s({url:t,txtCancel:"取消",txtOk:"确认",size:void 0===i?v:i});var r=document.getElementById("J-mobile-avatar-crop"),a=o(r,"img-wrap")[0],d=o(a,"img-cont")[0],h=a.querySelector("img"),l=o(a,"cropper")[0],f=o(r,"cancel")[0],p=o(r,"ok")[0];u(a,h).then(function(t){c({domCrop:r,domImgWrap:a,domImgCont:d,domImg:h,domCropper:l,domBtnOk:p,domBtnCancel:f,isImgOut:t},e)})}function l(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.size,o=void 0===i?v:i;t.addEventListener("change",function(){r(t).then(function(n){h(n,e,{size:o}),t.value=""})},!1)}Object.defineProperty(e,"__esModule",{value:!0}),n(1);var f=n(6),p=function(t){return t&&t.__esModule?t:{default:t}}(f),v=100;window.mobileAvatarCrop=l,e.default=l},function(t,e,n){var i=n(2);"string"==typeof i&&(i=[[t.i,i,""]]);var o={};o.transform=void 0;n(4)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(void 0),e.push([t.i,"#J-mobile-avatar-crop{position:absolute;top:0;right:0;bottom:0;left:0;background:#000;z-index:1000;display:flex;flex-direction:column}#J-mobile-avatar-crop div[data-role=cropper]{position:absolute;z-index:1;box-shadow:0 0 0 999em rgba(0,0,0,.4);border:1px solid #fff;background:transparent}#J-mobile-avatar-crop div[data-role=img-wrap]{flex-grow:1;flex-shrink:1;display:flex;flex-direction:row;align-items:center;overflow:scroll}#J-mobile-avatar-crop div[data-role=img-wrap].full{align-items:flex-start}#J-mobile-avatar-crop div[data-role=img-wrap] div[data-role=img-cont]{position:relative;width:100%}#J-mobile-avatar-crop div[data-role=img-wrap] img{width:100%;display:block;flex:100% 0 0}#J-mobile-avatar-crop div[data-role=select]{flex-grow:0;flex-shrink:0;height:50px;display:flex;flex-direction:row;align-items:stretch;justify-content:space-between}#J-mobile-avatar-crop div[data-role=select] div{font-size:16px;display:flex;justify-content:center;align-items:center;flex:49% 0 0;background:#ffc107;color:#fff}",""])},function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var r=i(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([r]).join("\n")}return[n].join("\n")}function i(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=n(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e,n){function i(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=p[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(u(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(u(i.parts[r],e));p[i.id]={id:i.id,refs:1,parts:s}}}}function o(t,e){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],s=e.base?r[0]+e.base:r[0],a=r[1],d=r[2],c=r[3],u={css:a,media:d,sourceMap:c};i[s]?i[s].parts.push(u):n.push(i[s]={id:s,parts:[u]})}return n}function r(t,e){var n=g(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=y[y.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function a(t){var e=document.createElement("style");return t.attrs.type="text/css",c(e,t.attrs),r(t,e),e}function d(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",c(e,t.attrs),r(t,e),e}function c(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function u(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var c=b++;n=m||(m=a(e)),i=h.bind(null,n,c,!1),o=h.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=d(e),i=f.bind(null,n,e),o=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),i=l.bind(null,n),o=function(){s(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function h(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function l(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function f(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=x(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([i],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var p={},v=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),g=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),m=null,b=0,y=[],x=n(5);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=v()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=o(t,e);return i(n,e),function(t){for(var r=[],s=0;s<n.length;s++){var a=n[s],d=p[a.id];d.refs--,r.push(d)}if(t){i(o(t,e),e)}for(var s=0;s<r.length;s++){var d=r[s];if(0===d.refs){for(var c=0;c<d.parts.length;c++)d.parts[c]();delete p[d.id]}}}};var w=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return t;var r;return r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")"})}},function(t,e,n){var i,o;/*!
* Draggabilly v2.1.1

@@ -3,0 +3,0 @@ * Make that shiz draggable

{
"name": "mobile-avatar-crop",
"version": "1.3.0",
"version": "1.3.1",
"description": "面向移动端的,利用`HTML5`的`File API`和`Canvas`实现本地的图片裁剪",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc