UNPKG

decap-cms-editor-component-image

Version:

Image component for Decap CMS editor widget

3 lines 19 kB
/*! For license information please see decap-cms-editor-component-image.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("DecapCmsEditorComponentImage",["react"],t):"object"==typeof exports?exports.DecapCmsEditorComponentImage=t(require("react")):e.DecapCmsEditorComponentImage=t(e.React)}(window,e=>(()=>{"use strict";var t={119:t=>{t.exports=e},320:(e,t)=>{var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,$=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case f:case o:case s:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case p:case h:case y:case i:return e;default:return t}}case a:return t}}}function x(e){return w(e)===f}t.AsyncMode=l,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=i,t.Element=n,t.ForwardRef=p,t.Fragment=o,t.Lazy=h,t.Memo=y,t.Portal=a,t.Profiler=s,t.StrictMode=c,t.Suspense=d,t.isAsyncMode=function(e){return x(e)||w(e)===l},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===i},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===h},t.isMemo=function(e){return w(e)===y},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===s||e===c||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===i||e.$$typeof===u||e.$$typeof===p||e.$$typeof===g||e.$$typeof===b||e.$$typeof===$||e.$$typeof===v)},t.typeOf=w},524:(e,t,r)=>{e.exports=r(320)},985:(e,t,r)=>{var n=r(524),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function i(e){return n.isMemo(e)?c:s[e.$$typeof]||a}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=c;var u=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(m){var a=d(r);a&&a!==m&&e(t,a,n)}var c=l(r);f&&(c=c.concat(f(r)));for(var s=i(t),y=i(r),h=0;h<c.length;++h){var v=c[h];if(!(o[v]||n&&n[v]||y&&y[v]||s&&s[v])){var g=p(r,v);try{u(t,v,g)}catch(e){}}}}return t}}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};n.d(a,{DecapCmsEditorComponentImage:()=>je});var o=n(119),c=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),s=Math.abs,i=String.fromCharCode,u=Object.assign;function l(e){return e.trim()}function f(e,t,r){return e.replace(t,r)}function p(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function m(e,t,r){return e.slice(t,r)}function y(e){return e.length}function h(e){return e.length}function v(e,t){return t.push(e),e}var g=1,b=1,$=0,w=0,x=0,S="";function C(e,t,r,n,a,o,c){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:g,column:b,length:c,return:""}}function k(e,t){return u(C("",null,null,"",null,null,0),e,{length:-e.length},t)}function E(){return x=w>0?d(S,--w):0,b--,10===x&&(b=1,g--),x}function A(){return x=w<$?d(S,w++):0,b++,10===x&&(b=1,g++),x}function O(){return d(S,w)}function P(){return w}function _(e,t){return m(S,e,t)}function j(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function T(e){return g=b=1,$=y(S=e),w=0,[]}function N(e){return S="",e}function M(e){return l(_(w-1,z(91===e?e+2:40===e?e+1:e)))}function I(e){for(;(x=O())&&x<33;)A();return j(e)>2||j(x)>3?"":" "}function R(e,t){for(;--t&&A()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return _(e,P()+(t<6&&32==O()&&32==A()))}function z(e){for(;A();)switch(x){case e:return w;case 34:case 39:34!==e&&39!==e&&z(x);break;case 40:41===e&&z(e);break;case 92:A()}return w}function D(e,t){for(;A()&&e+x!==57&&(e+x!==84||47!==O()););return"/*"+_(t,w-1)+"*"+i(47===e?e:A())}function F(e){for(;!j(O());)A();return _(e,w)}var G="-ms-",L="-moz-",W="-webkit-",q="comm",B="rule",H="decl",J="@keyframes";function X(e,t){for(var r="",n=h(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function U(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case H:return e.return=e.return||e.value;case q:return"";case J:return e.return=e.value+"{"+X(e.children,n)+"}";case B:e.value=e.props.join(",")}return y(r=X(e.children,n))?e.return=e.value+"{"+r+"}":""}function V(e){return N(Y("",null,null,null,[""],e=T(e),0,[0],e))}function Y(e,t,r,n,a,o,c,s,u){for(var l=0,m=0,h=c,g=0,b=0,$=0,w=1,x=1,S=1,C=0,k="",_=a,j=o,T=n,N=k;x;)switch($=C,C=A()){case 40:if(108!=$&&58==d(N,h-1)){-1!=p(N+=f(M(C),"&","&\f"),"&\f")&&(S=-1);break}case 34:case 39:case 91:N+=M(C);break;case 9:case 10:case 13:case 32:N+=I($);break;case 92:N+=R(P()-1,7);continue;case 47:switch(O()){case 42:case 47:v(K(D(A(),P()),t,r),u);break;default:N+="/"}break;case 123*w:s[l++]=y(N)*S;case 125*w:case 59:case 0:switch(C){case 0:case 125:x=0;case 59+m:-1==S&&(N=f(N,/\f/g,"")),b>0&&y(N)-h&&v(b>32?Q(N+";",n,r,h-1):Q(f(N," ","")+";",n,r,h-2),u);break;case 59:N+=";";default:if(v(T=Z(N,t,r,l,m,a,s,k,_=[],j=[],h),o),123===C)if(0===m)Y(N,t,T,T,_,o,h,s,j);else switch(99===g&&110===d(N,3)?100:g){case 100:case 108:case 109:case 115:Y(e,T,T,n&&v(Z(e,T,T,0,0,a,s,k,a,_=[],h),j),a,j,h,s,n?_:j);break;default:Y(N,T,T,T,[""],j,0,s,j)}}l=m=b=0,w=S=1,k=N="",h=c;break;case 58:h=1+y(N),b=$;default:if(w<1)if(123==C)--w;else if(125==C&&0==w++&&125==E())continue;switch(N+=i(C),C*w){case 38:S=m>0?1:(N+="\f",-1);break;case 44:s[l++]=(y(N)-1)*S,S=1;break;case 64:45===O()&&(N+=M(A())),g=O(),m=h=y(k=N+=F(P())),C++;break;case 45:45===$&&2==y(N)&&(w=0)}}return o}function Z(e,t,r,n,a,o,c,i,u,p,d){for(var y=a-1,v=0===a?o:[""],g=h(v),b=0,$=0,w=0;b<n;++b)for(var x=0,S=m(e,y+1,y=s($=c[b])),k=e;x<g;++x)(k=l($>0?v[x]+" "+S:f(S,/&\f/g,v[x])))&&(u[w++]=k);return C(e,t,r,0===a?B:i,u,p,d)}function K(e,t,r){return C(e,t,r,q,i(x),m(e,2,-2),0)}function Q(e,t,r,n){return C(e,t,r,H,m(e,0,n),m(e,n+1,-1),n)}var ee=function(e,t,r){for(var n=0,a=0;n=a,a=O(),38===n&&12===a&&(t[r]=1),!j(a);)A();return _(e,w)},te=new WeakMap,re=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||te.get(r))&&!n){te.set(e,!0);for(var a=[],o=function(e,t){return N(function(e,t){var r=-1,n=44;do{switch(j(n)){case 0:38===n&&12===O()&&(t[r]=1),e[r]+=ee(w-1,t,r);break;case 2:e[r]+=M(n);break;case 4:if(44===n){e[++r]=58===O()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=i(n)}}while(n=A());return e}(T(e),t))}(t,a),c=r.props,s=0,u=0;s<o.length;s++)for(var l=0;l<c.length;l++,u++)e.props[u]=a[s]?o[s].replace(/&\f/g,c[l]):c[l]+" "+o[s]}}},ne=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ae(e,t){switch(function(e,t){return 45^d(e,0)?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}(e,t)){case 5103:return W+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return W+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return W+e+L+e+G+e+e;case 6828:case 4268:return W+e+G+e+e;case 6165:return W+e+G+"flex-"+e+e;case 5187:return W+e+f(e,/(\w+).+(:[^]+)/,W+"box-$1$2"+G+"flex-$1$2")+e;case 5443:return W+e+G+"flex-item-"+f(e,/flex-|-self/,"")+e;case 4675:return W+e+G+"flex-line-pack"+f(e,/align-content|flex-|-self/,"")+e;case 5548:return W+e+G+f(e,"shrink","negative")+e;case 5292:return W+e+G+f(e,"basis","preferred-size")+e;case 6060:return W+"box-"+f(e,"-grow","")+W+e+G+f(e,"grow","positive")+e;case 4554:return W+f(e,/([^-])(transform)/g,"$1"+W+"$2")+e;case 6187:return f(f(f(e,/(zoom-|grab)/,W+"$1"),/(image-set)/,W+"$1"),e,"")+e;case 5495:case 3959:return f(e,/(image-set\([^]*)/,W+"$1$`$1");case 4968:return f(f(e,/(.+:)(flex-)?(.*)/,W+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+W+e+e;case 4095:case 3583:case 4068:case 2532:return f(e,/(.+)-inline(.+)/,W+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(y(e)-1-t>6)switch(d(e,t+1)){case 109:if(45!==d(e,t+4))break;case 102:return f(e,/(.+:)(.+)-([^]+)/,"$1"+W+"$2-$3$1"+L+(108==d(e,t+3)?"$3":"$2-$3"))+e;case 115:return~p(e,"stretch")?ae(f(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==d(e,t+1))break;case 6444:switch(d(e,y(e)-3-(~p(e,"!important")&&10))){case 107:return f(e,":",":"+W)+e;case 101:return f(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(45===d(e,14)?"inline-":"")+"box$3$1"+W+"$2$3$1"+G+"$2box$3")+e}break;case 5936:switch(d(e,t+11)){case 114:return W+e+G+f(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return W+e+G+f(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return W+e+G+f(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return W+e+G+e+e}return e}var oe=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case H:e.return=ae(e.value,e.length);break;case J:return X([k(e,{value:f(e.value,"@","@"+W)})],n);case B:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return X([k(e,{props:[f(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return X([k(e,{props:[f(t,/:(plac\w+)/,":"+W+"input-$1")]}),k(e,{props:[f(t,/:(plac\w+)/,":-moz-$1")]}),k(e,{props:[f(t,/:(plac\w+)/,G+"input-$1")]})],n)}return""})}}],ce=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,a,o=e.stylisPlugins||oe,s={},i=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)s[t[r]]=!0;i.push(e)});var u,l,f,p,d=[U,(p=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],m=(l=[re,ne].concat(o,d),f=h(l),function(e,t,r,n){for(var a="",o=0;o<f;o++)a+=l[o](e,t,r,n)||"";return a});a=function(e,t,r,n){u=r,X(V(e?e+"{"+t.styles+"}":t.styles),m),n&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new c({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return y.sheet.hydrate(i),y},se=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},ie={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ue(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var le=/[A-Z]|^ms/g,fe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pe=function(e){return 45===e.charCodeAt(1)},de=function(e){return null!=e&&"boolean"!=typeof e},me=ue(function(e){return pe(e)?e:e.replace(le,"-$&").toLowerCase()}),ye=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(fe,function(e,t,r){return ve={name:t,styles:r,next:ve},t})}return 1===ie[e]||pe(e)||"number"!=typeof t||0===t?t:t+"px"};function he(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var a=r;if(1===a.anim)return ve={name:a.name,styles:a.styles,next:ve},a.name;var o=r;if(void 0!==o.styles){var c=o.next;if(void 0!==c)for(;void 0!==c;)ve={name:c.name,styles:c.styles,next:ve},c=c.next;return o.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=he(e,t,r[a])+";";else for(var o in r){var c=r[o];if("object"!=typeof c){var s=c;null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":de(s)&&(n+=me(o)+":"+ye(o,s)+";")}else if(!Array.isArray(c)||"string"!=typeof c[0]||null!=t&&void 0!==t[c[0]]){var i=he(e,t,c);switch(o){case"animation":case"animationName":n+=me(o)+":"+i+";";break;default:n+=o+"{"+i+"}"}}else for(var u=0;u<c.length;u++)de(c[u])&&(n+=me(o)+":"+ye(o,c[u])+";")}return n}(e,t,r);case"function":if(void 0!==e){var s=ve,i=r(e);return ve=s,he(e,t,i)}}var u=r;if(null==t)return u;var l=t[u];return void 0!==l?l:u}var ve,ge,be,$e=/label:\s*([^\s;{]+)\s*(;|$)/g,we=!!o.useInsertionEffect&&o.useInsertionEffect,xe=we||function(e){return e()},Se=(we||o.useLayoutEffect,o.createContext("undefined"!=typeof HTMLElement?ce({key:"css"}):null)),Ce=(Se.Provider,function(e){return(0,o.forwardRef)(function(t,r){var n=(0,o.useContext)(Se);return e(t,n,r)})}),ke=o.createContext({}),Ee={}.hasOwnProperty,Ae="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Oe=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return se(t,r,n),xe(function(){return function(e,t,r){se(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+n:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}(t,r,n)}),null},Pe=Ce(function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var a=e[Ae],c=[n],s="";"string"==typeof e.className?s=function(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}(t.registered,c,e.className):null!=e.className&&(s=e.className+" ");var i=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,a="";ve=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,a+=he(r,t,o)):a+=o[0];for(var c=1;c<e.length;c++)a+=he(r,t,e[c]),n&&(a+=o[c]);$e.lastIndex=0;for(var s,i="";null!==(s=$e.exec(a));)i+="-"+s[1];return{name:function(e){for(var t,r=0,n=0,a=e.length;a>=4;++n,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(a){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(a)+i,styles:a,next:ve}}(c,void 0,o.useContext(ke));s+=t.key+"-"+i.name;var u={};for(var l in e)Ee.call(e,l)&&"css"!==l&&l!==Ae&&(u[l]=e[l]);return u.className=s,r&&(u.ref=r),o.createElement(o.Fragment,null,o.createElement(Oe,{cache:t,serialized:i,isStringTag:"string"==typeof a}),o.createElement(a,u))}),_e=(n(985),function(e,t){var r=arguments;if(null==t||!Ee.call(t,"css"))return o.createElement.apply(void 0,r);var n=r.length,a=new Array(n);a[0]=Pe,a[1]=function(e,t){var r={};for(var n in t)Ee.call(t,n)&&(r[n]=t[n]);return r[Ae]=e,r}(e,t);for(var c=2;c<n;c++)a[c]=r[c];return o.createElement.apply(null,a)});ge=_e||(_e={}),be||(be=ge.JSX||(ge.JSX={}));const je={label:"Image",id:"image",fromBlock:e=>e&&{image:e[2],alt:e[1],title:e[4]},toBlock:({alt:e,image:t,title:r})=>`![${e||""}](${t||""}${r?` "${r.replace(/"/g,'\\"')}"`:""})`,toPreview:({alt:e,image:t,title:r},n,a)=>{const o=n(t,null==a?void 0:a.find(e=>"image"===e.get("widget")));return _e("img",{src:o||"",alt:e||"",title:r||""})},pattern:/^!\[(.*)\]\((.*?)(\s"(.*)")?\)$/,fields:[{label:"Image",name:"image",widget:"image",media_library:{allow_multiple:!1}},{label:"Alt Text",name:"alt"},{label:"Title",name:"title"}]};return a.DecapCmsEditorComponentImage})()); //# sourceMappingURL=decap-cms-editor-component-image.js.map