|
|
|
|
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"iUPs":[function(require,module,exports) {
|
|
|
|
|
var define;
|
|
|
|
|
var global = arguments[3];
|
|
|
|
|
var t,e=arguments[3];!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof t&&t.amd?t(i):(e="undefined"!=typeof globalThis?globalThis:e||self).Cropper=i()}(this,function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var h="undefined"!=typeof window&&void 0!==window.document,s=h?window:{},c=!(!h||!s.document.documentElement)&&"ontouchstart"in s.document.documentElement,l=!!h&&"PointerEvent"in s,p="".concat("cropper","-crop"),d="".concat("cropper","-disabled"),m="".concat("cropper","-hidden"),u="".concat("cropper","-hide"),g="".concat("cropper","-invisible"),f="".concat("cropper","-modal"),v="".concat("cropper","-move"),w="".concat("cropper","Action"),b="".concat("cropper","Preview"),y=l?"pointerdown":c?"touchstart":"mousedown",x=l?"pointermove":c?"touchmove":"mousemove",M=l?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",C=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,D=/^data:/,B=/^data:image\/jpeg;base64,/,k=/^img|canvas$/i,O={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},T=Number.isNaN||s.isNaN;function E(t){return"number"==typeof t&&!T(t)}var W=function(t){return t>0&&t<1/0};function H(t){return void 0===t}function N(e){return"object"===t(e)&&null!==e}var z=Object.prototype.hasOwnProperty;function L(t){if(!N(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&z.call(i,"isPrototypeOf")}catch(a){return!1}}function Y(t){return"function"==typeof t}var X=Array.prototype.slice;function R(t){return Array.from?Array.from(t):X.call(t)}function S(t,e){return t&&Y(e)&&(Array.isArray(t)||E(t.length)?R(t).forEach(function(i,a){e.call(t,i,a,t)}):N(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var j=Object.assign||function(t){for(var e=arguments.l
|
|
|
|
|
},{}],"gzqx":[function(require,module,exports) {
|
|
|
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("cropperjs"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}var n="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];exports.default={render:function(e){var t=this.crossorigin||void 0;return e("div",{style:this.containerStyle},[e("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%",crossorigin:t},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:n,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var e=this.$options.props,r=(e.containerStyle,e.src,e.alt,e.imgStyle,o(e,["containerStyle","src","alt","imgStyle"])),n={};for(var a in r)void 0!==this[a]&&(n[a]=this[a]);this.cropper=new t.default(this.$refs.img,n)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(e,t)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(e,t){return this.cropper.move(e,t)},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.cropper.moveTo(e,t)},relativeZoom:function(e,t){return this.cropper.zoom(e,t)},zoomTo:function(e,t){return this.cropper.zoomTo(e,t)},rotate:function(e){return this.cropper.rotate(e)},rotateTo:function(e){return this.cropper.rotateTo(e)},scaleX:function(e){return this.cropper.scaleX(e)},scaleY:function(e){return this.cropper.scaleY(e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.cropper.scale(e,t)},getData:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(e)},setData:function(e){return this.cropper.setData(e)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(e){return this.cropper.setCanvasData(e)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(e){return this.cropper.setCropBoxData(e)},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(e)},setAspectRatio:function(e){return this.cropper.setAspectRatio(e)},setDragMode:function(e){return this.cropper.setDragMode(e)}}};
|
|
|
|
|
},{"cropperjs":"iUPs"}],"c7uD":[function(require,module,exports) {
|
|
|
|
|
|
|
|
|
|
},{}],"Amhf":[function(require,module,exports) {
|
|
|
|
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("vue-cropperjs"));function t(e){return e&&e.__esModule?e:{default:e}}require("cropperjs/dist/cropper.css");var i={components:{VueCropper:e.default},props:{label:String,image:String,value:Object,minSize:Object,preserveAspectRatio:Boolean,isCropping:Boolean},computed:{data:function(){return this.value},aspectRatio:function(){return this.preserveAspectRatio?this.minSize.width/this.minSize.height:NaN}},watch:{value:function(){this.isCropping||this.$refs.cropper.setData(this.value)}},methods:{cropmove:function(e){var t=!1,i=this.$refs.cropper.getData(!0);this.isCropping=!0,i.width<this.minSize.width&&(i.width=this.minSize.width,t=!0),i.height<this.minSize.height&&(i.height=this.minSize.height,t=!0),this.value=i,t&&this.$refs.cropper.setData(i)},cropend:function(e){this.ready&&(this.value=this.$refs.cropper.getData(!0),this.isCropping=!1,this.$emit("input",this.value))},ready:function(){this.ready=!0,this.isCropping=!1}}};exports.default=i;
|
|
|
|
|
(function(){var e=exports.default||module.exports;"function"==typeof e&&(e=e.options),Object.assign(e,{render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("k-field",e._b({staticClass:"kirby-imagecrop-field",attrs:{input:e._uid}},"k-field",e.$props,!1),[e.image?a("div",{staticClass:"image"},[a("k-grid",[a("k-column",{attrs:{width:"5/6"}},[a("vue-cropper",{ref:"cropper",attrs:{"view-mode":1,dragMode:e.crop,autoCrop:!0,zoomable:!1,movable:!1,data:e.value,aspectRatio:e.aspectRatio,src:e.image,alt:"Source Image",ready:e.ready,crop:e.cropmove,cropend:e.cropend}})],1),e._v(" "),a("k-column",{attrs:{width:"1/6"}},[a("k-headline",[e._v("Crop Properties")]),e._v(" "),a("k-list",[a("k-list-item",{attrs:{image:!0,icon:{type:"→",back:"black",emoji:!0},text:e.value.x}}),e._v(" "),a("k-list-item",{attrs:{image:!0,icon:{type:"↓",back:"black",emoji:!0},text:e.value.y}}),e._v(" "),a("k-list-item",{attrs:{image:!0,icon:{type:"↔️",back:"black",emoji:!0},text:e.value.width}}),e._v(" "),a("k-list-item",{attrs:{image:!0,icon:{type:"↕️",back:"black",emoji:!0},text:e.value.height}})],1)],1)],1)],1):a("k-box",[e._v(" That's not an image! ")])],1)},staticRenderFns:[],_compiled:!0,_scopeId:null,functional:void 0});})();
|
|
|
|
|
},{"vue-cropperjs":"gzqx","cropperjs/dist/cropper.css":"c7uD"}],"epB2":[function(require,module,exports) {
|
|
|
|
|
"use strict";var e=i(require("./fields/ImageCrop.vue"));function i(e){return e&&e.__esModule?e:{default:e}}panel.plugin("steirico/kirby-plugin-image-crop-field",{fields:{imagecrop:e.default}});
|
|
|
|
|
},{"./fields/ImageCrop.vue":"Amhf"}]},{},["epB2"], null)
|