• File: replacementVariableEditor.js
  • Full Path: /home/blwgracecity/jesusexp.org/wp-content/plugins/wp-file-manager/lib/php/plugins/replacementVariableEditor.js
  • File size: 16 KB
  • MIME-type: text/plain
  • Charset: utf-8
(()=>{var t={37166:(t,e,n)=>{"use strict";n.r(e),n.d(e,{composeDecorators:()=>w,createEditorStateWithText:()=>b,default:()=>S});var r=n(7206),i=n(99196),o=n.n(i),s=n(85890),a=n.n(s),u=n(43393),c=n.n(u);function f(){return f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f.apply(this,arguments)}function l(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function h(t){var e=t.getCurrentContent().getBlockMap(),n=e.last().getKey(),i=e.last().getLength(),o=new r.SelectionState({anchorKey:n,anchorOffset:i,focusKey:n,focusOffset:i});return r.EditorState.acceptSelection(t,o)}var p="-",d=function(){function t(t){this.decorators=void 0,this.decorators=c().List(t)}var e=t.prototype;return e.getDecorations=function(t,e){var n=new Array(t.getText().length).fill(null);return this.decorators.forEach((function(r,i){r.getDecorations(t,e).forEach((function(t,e){t&&(n[e]=i+p+t)}))})),c().List(n)},e.getComponentForKey=function(e){return this.getDecoratorForKey(e).getComponentForKey(t.getInnerKey(e))},e.getPropsForKey=function(e){return this.getDecoratorForKey(e).getPropsForKey(t.getInnerKey(e))},e.getDecoratorForKey=function(t){var e=t.split(p),n=Number(e[0]);return this.decorators.get(n)},t.getInnerKey=function(t){return t.split(p).slice(1).join(p)},t}(),v=function(t){return"function"==typeof t.getDecorations&&"function"==typeof t.getComponentForKey&&"function"==typeof t.getPropsForKey};function _(t){return(0,r.getDefaultKeyBinding)(t)}function y(t,e,n,i){var o,s=i.setEditorState;switch(t){case"backspace":case"backspace-word":case"backspace-to-start-of-line":o=r.RichUtils.onBackspace(e);break;case"delete":case"delete-word":case"delete-to-end-of-block":o=r.RichUtils.onDelete(e);break;default:return"not-handled"}return null!=o?(s(o),"handled"):"not-handled"}var g=function(t){var e,n;return null!=(null==t?void 0:t.decorators)?null==(e=t.decorators)?void 0:e.size:null!=(null==t?void 0:t._decorators)?null==(n=t._decorators)?void 0:n.length:void 0},m=function(t){var e,n;function i(e){var n;return(n=t.call(this,e)||this).editor=null,n.state={readOnly:!1},n.onChange=function(t){var e=t;n.resolvePlugins().forEach((function(t){t.onChange&&(e=t.onChange(e,n.getPluginMethods()))})),n.props.onChange&&n.props.onChange(e)},n.getPlugins=function(){return[].concat(n.props.plugins)},n.getProps=function(){return f({},n.props)},n.getReadOnly=function(){return n.props.readOnly||n.state.readOnly},n.setReadOnly=function(t){t!==n.state.readOnly&&n.setState({readOnly:t})},n.getEditorRef=function(){return n.editor},n.getEditorState=function(){return n.props.editorState},n.getPluginMethods=function(){return{getPlugins:n.getPlugins,getProps:n.getProps,setEditorState:n.onChange,getEditorState:n.getEditorState,getReadOnly:n.getReadOnly,setReadOnly:n.setReadOnly,getEditorRef:n.getEditorRef}},n.createPluginHooks=function(){return t=[n.props].concat(n.resolvePlugins()),e=n.getPluginMethods(),r={},i=new Set(["onChange"]),t.forEach((function(n){Object.keys(n).forEach((function(n){i.has(n)||(i.add(n),n.startsWith("on")?r[n]=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.some((function(e){var r=e[t];return"function"==typeof r&&!0===r.apply(void 0,i.concat([n]))}))}}(n,t,e):n.startsWith("handle")?r[n]=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.some((function(e){var r=e[t];return"function"==typeof r&&"handled"===r.apply(void 0,i.concat([n]))}))?"handled":"not-handled"}}(n,t,e):n.endsWith("Fn")&&("blockRendererFn"===n?r.blockRendererFn=function(t,e){return function(n){var r={props:{}};return t.forEach((function(t){if("function"==typeof t.blockRendererFn){var i=t.blockRendererFn(n,e);if(null!=i){var o=i.props,s=l(i,["props"]),a=r,u=a.props,c=l(a,["props"]);r=f({},c,s,{props:f({},u,o)})}}})),!!r.component&&r}}(t,e):"blockStyleFn"===n?r.blockStyleFn=function(t,e){return function(n){var r=[];return t.forEach((function(t){if("function"==typeof t.blockStyleFn){var i=t.blockStyleFn(n,e);null!=i&&r.push(i)}})),r.join(" ")}}(t,e):"customStyleFn"===n?r.customStyleFn=function(t,e){return function(n,r){var i;return t.some((function(t){return"function"==typeof t.customStyleFn&&void 0!==(i=t.customStyleFn(n,r,e))}))&&i?i:{}}}(t,e):"keyBindingFn"===n&&(r.keyBindingFn=function(t,e){return function(n){var r=null;return t.some((function(t){return"function"==typeof t.keyBindingFn&&void 0!==(r=t.keyBindingFn(n,e))}))?r:null}}(t,e))))}))})),r;var t,e,r,i},n.resolvePlugins=function(){var t=n.getPlugins();return!0===n.props.defaultKeyBindings&&t.push({keyBindingFn:_}),!0===n.props.defaultKeyCommands&&t.push({handleKeyCommand:y}),t},n.resolveCustomStyleMap=function(){return n.props.plugins.filter((function(t){return void 0!==t.customStyleMap})).map((function(t){return t.customStyleMap})).concat([n.props.customStyleMap]).reduce((function(t,e){return f({},t,e)}),{})},n.resolveblockRenderMap=function(){var t=n.props.plugins.filter((function(t){return void 0!==t.blockRenderMap})).reduce((function(t,e){return t.merge(e.blockRenderMap)}),(0,u.Map)({}));return n.props.defaultBlockRenderMap&&(t=r.DefaultDraftBlockRenderMap.merge(t)),n.props.blockRenderMap&&(t=t.merge(n.props.blockRenderMap)),t},n.resolveAccessibilityProps=function(){var t={};return n.resolvePlugins().forEach((function(e){if("function"==typeof e.getAccessibilityProps){var n=e.getAccessibilityProps(),r={};void 0===t.ariaHasPopup?r.ariaHasPopup=n.ariaHasPopup:"true"===n.ariaHasPopup&&(r.ariaHasPopup="true"),void 0===t.ariaExpanded?r.ariaExpanded=n.ariaExpanded:!0===n.ariaExpanded&&(r.ariaExpanded=!0),t=f({},t,n,r)}})),t},[n.props].concat(n.resolvePlugins()).forEach((function(t){t&&"function"==typeof t.initialize&&t.initialize(n.getPluginMethods())})),n}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var s=i.prototype;return s.focus=function(){this.editor&&this.editor.focus()},s.blur=function(){this.editor&&this.editor.blur()},s.componentDidMount=function(){var t,e,n,i,s,a,c=(t=this.props,e=this.getEditorState,n=this.onChange,i=function(t){var e=t.decorators,n=t.plugins,r=void 0===n?[]:n;return(0,u.List)([{decorators:e}].concat(r)).filter((function(t){return void 0!==(null==t?void 0:t.decorators)})).flatMap((function(t){return null==t?void 0:t.decorators}))}(t),s=function(t,e,n){var i=(0,u.List)(t).map((function(t){var r=t.component;return f({},t,{component:function(t){return o().createElement(r,f({},t,{getEditorState:e,setEditorState:n}))}})})).toJS();return new r.CompositeDecorator(i)}(i.filter((function(t){return!v(t)})),e,n),a=i.filter((function(t){return v(t)})),new d(a.push(s))),l=r.EditorState.set(this.props.editorState,{decorator:c});this.onChange(h(l))},s.componentDidUpdate=function(t){var e=this.props,n=t.editorState.getDecorator(),i=e.editorState.getDecorator();if(n&&!(n===i||n&&i&&g(n)===g(i))){var o=r.EditorState.set(e.editorState,{decorator:n});this.onChange(h(o))}},s.componentWillUnmount=function(){var t=this;this.resolvePlugins().forEach((function(e){e.willUnmount&&e.willUnmount({getEditorState:t.getEditorState,setEditorState:t.onChange})}))},s.render=function(){var t=this,e=this.createPluginHooks(),n=this.resolveCustomStyleMap(),i=this.resolveAccessibilityProps(),s=this.resolveblockRenderMap(),a=this.props;a.keyBindingFn;var u=l(a,["keyBindingFn"]);return o().createElement(r.Editor,f({},u,i,e,{readOnly:this.props.readOnly||this.state.readOnly,customStyleMap:n,blockRenderMap:s,onChange:this.onChange,editorState:this.props.editorState,ref:function(e){t.editor=e}}))},i}(i.Component);m.propTypes={editorState:a().object.isRequired,onChange:a().func.isRequired,plugins:a().array,defaultKeyBindings:a().bool,defaultKeyCommands:a().bool,defaultBlockRenderMap:a().bool,customStyleMap:a().object,decorators:a().array},m.defaultProps={defaultBlockRenderMap:!0,defaultKeyBindings:!0,defaultKeyCommands:!0,customStyleMap:{},plugins:[],decorators:[]};var b=function(t){return r.EditorState.createWithText?r.EditorState.createWithText(t):r.EditorState.createWithContent(r.ContentState.createFromText(t))},w=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)return function(t){return t};if(1===e.length)return e[0];var r=e[e.length-1];return function(){for(var t=r.apply(void 0,arguments),n=e.length-2;n>=0;n-=1)t=(0,e[n])(t);return t}};const S=m},95423:(t,e,n)=>{"use strict";n.r(e),n.d(e,{MentionSuggestions:()=>Jt,addMention:()=>Pt,default:()=>te,defaultSuggestionsFilter:()=>ee,defaultTheme:()=>Xt});var r=n(43393),i=n(99196),o=n.n(i);function s(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=s(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function a(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=s(t))&&(r&&(r+=" "),r+=e);return r}var u=n(85890),c=n.n(u),f=n(7206);const l=window.lodash.escapeRegExp;var h=n.n(l);function p(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function d(t){return t instanceof p(t).Element||t instanceof Element}function v(t){return t instanceof p(t).HTMLElement||t instanceof HTMLElement}function _(t){return"undefined"!=typeof ShadowRoot&&(t instanceof p(t).ShadowRoot||t instanceof ShadowRoot)}var y=Math.max,g=Math.min,m=Math.round;function b(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(v(t)&&e){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(r=m(n.width)/s||1),o>0&&(i=m(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function w(t){var e=p(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function S(t){return t?(t.nodeName||"").toLowerCase():null}function E(t){return((d(t)?t.ownerDocument:t.document)||window.document).documentElement}function O(t){return b(E(t)).left+w(t).scrollLeft}function x(t){return p(t).getComputedStyle(t)}function I(t){var e=x(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function z(t,e,n){void 0===n&&(n=!1);var r,i,o=v(e),s=v(e)&&function(t){var e=t.getBoundingClientRect(),n=m(e.width)/t.offsetWidth||1,r=m(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),a=E(e),u=b(t,s),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==S(e)||I(a))&&(c=(r=e)!==p(r)&&v(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:w(r)),v(e)?((f=b(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):a&&(f.x=O(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function M(t){var e=b(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function C(t){return"html"===S(t)?t:t.assignedSlot||t.parentNode||(_(t)?t.host:null)||E(t)}function D(t){return["html","body","#document"].indexOf(S(t))>=0?t.ownerDocument.body:v(t)&&I(t)?t:D(C(t))}function k(t,e){var n;void 0===e&&(e=[]);var r=D(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=p(r),s=i?[o].concat(o.visualViewport||[],I(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(k(C(s)))}function R(t){return["table","td","th"].indexOf(S(t))>=0}function A(t){return v(t)&&"fixed"!==x(t).position?t.offsetParent:null}function q(t){for(var e=p(t),n=A(t);n&&R(n)&&"static"===x(n).position;)n=A(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===x(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&v(t)&&"fixed"===x(t).position)return null;for(var n=C(t);v(n)&&["html","body"].indexOf(S(n))<0;){var r=x(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var j="top",P="bottom",B="right",T="left",F="auto",K=[j,P,B,T],V="start",L="end",U="viewport",W="popper",N=K.reduce((function(t,e){return t.concat([e+"-"+V,e+"-"+L])}),[]),H=[].concat(K,[F]).reduce((function(t,e){return t.concat([e,e+"-"+V,e+"-"+L])}),[]),J=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),r}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function X(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function G(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?Y:i;return function(t,e,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Y,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,f={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;l(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:d(t)?k(t):t.contextElement?k(t.contextElement):[],popper:k(e)};var s,c,h=function(t){var e=$(t);return J.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),c=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=h.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var o=i({state:a,name:e,instance:f,options:r});u.push(o||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(X(e,n)){a.rects={reference:z(e,q(n),"fixed"===a.options.strategy),popper:M(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,u=void 0===s?{}:s,l=i.name;"function"==typeof o&&(a=o({state:a,options:u,name:l,instance:f})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){f.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(i())}))}))),s}),destroy:function(){l(),c=!0}};if(!X(t,e))return f;function l(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(n).then((function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)})),f}}var Q={passive:!0};function Z(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function et(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function nt(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?Z(i):null,s=i?tt(i):null,a=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case j:e={x:a,y:n.y-r.height};break;case P:e={x:a,y:n.y+n.height};break;case B:e={x:n.x+n.width,y:u};break;case T:e={x:n.x-r.width,y:u};break;default:e={x:n.x,y:n.y}}var c=o?et(o):null;if(null!=c){var f="y"===c?"height":"width";switch(s){case V:e[c]=e[c]-(n[f]/2-r[f]/2);break;case L:e[c]=e[c]+(n[f]/2-r[f]/2)}}return e}var rt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,l=t.isFixed,h=!0===f?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:m(e*r)/r||0,y:m(n*r)/r||0}}(s):"function"==typeof f?f(s):s,d=h.x,v=void 0===d?0:d,_=h.y,y=void 0===_?0:_,g=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),w=T,S=j,O=window;if(c){var I=q(n),z="clientHeight",M="clientWidth";I===p(n)&&"static"!==x(I=E(n)).position&&"abso