From 99414cc70adf46b498156a741c1a92aa29205ea7 Mon Sep 17 00:00:00 2001 From: i-just Date: Wed, 11 Dec 2024 11:24:28 +0000 Subject: [PATCH 1/3] Load provisional drafts for entries nested in cke field when previewing --- src/data/FieldData.php | 11 ++++++++--- src/web/assets/ckeditor/src/entries/entriesui.js | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/data/FieldData.php b/src/data/FieldData.php index 104e19e6..8513cb81 100644 --- a/src/data/FieldData.php +++ b/src/data/FieldData.php @@ -146,15 +146,20 @@ public function loadEntries(): void $entryIds = $entryChunks->map(fn(Entry $chunk) => $chunk->entryId)->all(); if (!empty($entryIds)) { - $entries = EntryElement::find() + $query = EntryElement::find() ->id($entryIds) ->siteId($this->siteId) ->status(null) ->drafts(null) ->revisions(null) ->trashed(null) - ->indexBy('id') - ->all(); + ->indexBy('id'); + + if (Craft::$app->getRequest()->getIsPreview()) { + $query->withProvisionalDrafts(); + } + + $entries = $query->all(); } else { $entries = []; } diff --git a/src/web/assets/ckeditor/src/entries/entriesui.js b/src/web/assets/ckeditor/src/entries/entriesui.js index 083cf5af..5be4460c 100644 --- a/src/web/assets/ckeditor/src/entries/entriesui.js +++ b/src/web/assets/ckeditor/src/entries/entriesui.js @@ -246,6 +246,11 @@ export default class CraftEntriesUI extends Plugin { params: { siteId: siteId, }, + onLoad: () => { + slideout.elementEditor.on('update', () => { + Craft.Preview.refresh(); + }); + }, onBeforeSubmit: async () => { // If the nested element is primarily owned by the canonical entry being edited, // then ensure we're working with a draft and save the nested entry changes to the draft From b3c583086713dbc9dbf46db5c3a6d24e3e137608 Mon Sep 17 00:00:00 2001 From: i-just Date: Wed, 11 Dec 2024 11:25:09 +0000 Subject: [PATCH 2/3] build --- src/web/assets/ckeditor/dist/ckeditor5-craftcms.js | 2 +- src/web/assets/ckeditor/dist/ckeditor5-craftcms.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js index bb0b2a21..e3db0d90 100644 --- a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js +++ b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js @@ -1,3 +1,3 @@ /*! For license information please see ckeditor5-craftcms.js.LICENSE.txt */ -!function(){var e={474:function(e){window,e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=94)}([function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return s}));var i=n(19);function o(e,t=!0){if(void 0===e)return"undefined";if("function"==typeof e)return"function() {…}";const n=Object(i.stringify)(e,a,null,{maxDepth:2});return t?n:n.replace(/(^"|"$)/g,"")}function r(e){const t={};for(const n in e)t[n]=e[n],t[n].value=o(t[n].value);return t}function s(e,t){return e.length>t?e.substr(0,t)+`… [${e.length-t} characters left]`:e}function a(e,t,n){return"string"==typeof e?`"${e.replace("'",'"')}"`:n(e)}},function(e,t,n){"use strict";function i(e){return e&&e.name}function o(e){return e&&i(e)&&e.is("attributeElement")}function r(e){return e&&i(e)&&e.is("emptyElement")}function s(e){return e&&i(e)&&e.is("uiElement")}function a(e){return e&&i(e)&&e.is("rawElement")}function l(e){return e&&i(e)&&e.is("editableElement")}function c(e){return e&&e.is("rootElement")}function u(e){return{path:[...e.parent.getPath(),e.offset],offset:e.offset,isAtEnd:e.isAtEnd,isAtStart:e.isAtStart,parent:d(e.parent)}}function d(e){return i(e)?o(e)?"attribute:"+e.name:c(e)?"root:"+e.name:"container:"+e.name:e.data}n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return r})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return u}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{static group(...e){console.group(...e)}static groupEnd(...e){console.groupEnd(...e)}static log(...e){console.log(...e)}static warn(...e){console.warn(...e)}}},function(e,t,n){"use strict";function i(e){return e&&e.is("element")}function o(e){return e&&e.is("rootElement")}function r(e){return e.getPath?e.getPath():e.path}function s(e){return{path:r(e),stickiness:e.stickiness,index:e.index,isAtEnd:e.isAtEnd,isAtStart:e.isAtStart,offset:e.offset,textNode:e.textNode&&e.textNode.data}}n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}))},function(e,t,n){(function(e,n){var i="[object Arguments]",o="[object Map]",r="[object Object]",s="[object Set]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[o]=c["[object Number]"]=c[r]=c["[object RegExp]"]=c[s]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")(),h=t&&!t.nodeType&&t,m=h&&"object"==typeof n&&n&&!n.nodeType&&n,f=m&&m.exports===h,g=f&&u.process,b=function(){try{return g&&g.binding&&g.binding("util")}catch(e){}}(),k=b&&b.isTypedArray;function w(e,t){for(var n=-1,i=null==e?0:e.length;++na))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var u=-1,d=!0,p=2&n?new re:void 0;for(r.set(e,t),r.set(t,e);++u-1},ie.prototype.set=function(e,t){var n=this.__data__,i=ae(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(W||ie),string:new ne}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var n=he(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},re.prototype.add=re.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},re.prototype.has=function(e){return this.__data__.has(e)},se.prototype.clear=function(){this.__data__=new ie,this.size=0},se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ie){var i=n.__data__;if(!W||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(i)}return n.set(e,t),this.size=n.size,this};var fe=V?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Se=k?function(e){return function(t){return e(t)}}(k):function(e){return Ee(e)&&_e(e.length)&&!!c[le(e)]};function Te(e){return null!=(t=e)&&_e(t.length)&&!Ae(t)?function(e,t){var n=ve(e),i=!n&&ye(e),o=!n&&!i&&Ce(e),r=!n&&!i&&!o&&Se(e),s=n||i||o||r,a=s?function(e,t){for(var n=-1,i=Array(e);++nFind out why. -->`,l=`<!--The View raw element content has been skipped. Find out why. -->`;function c(e){return e?[...e.editing.view.document.roots]:[]}function u(e,t){if(!e)return[];const n=[],o=e.editing.view.document.selection;for(const e of o.getRanges())e.root.rootName===t&&n.push({type:"selection",start:Object(i.a)(e.start),end:Object(i.a)(e.end)});return n}function d({currentEditor:e,currentRootName:t,ranges:n}){return e&&t?[h(e.editing.view.document.getRoot(t),[...n])]:null}function p(e){const t={editorNode:e,properties:{},attributes:{},customProperties:{}};if(Object(i.d)(e)){Object(i.g)(e)?(t.type="RootEditableElement",t.name=e.rootName,t.url=s+"_rooteditableelement-RootEditableElement.html"):(t.name=e.name,Object(i.b)(e)?(t.type="AttributeElement",t.url=s+"_attributeelement-AttributeElement.html"):Object(i.e)(e)?(t.type="EmptyElement",t.url=s+"_emptyelement-EmptyElement.html"):Object(i.h)(e)?(t.type="UIElement",t.url=s+"_uielement-UIElement.html"):Object(i.f)(e)?(t.type="RawElement",t.url=s+"_rawelement-RawElement.html"):Object(i.c)(e)?(t.type="EditableElement",t.url=s+"_editableelement-EditableElement.html"):(t.type="ContainerElement",t.url=s+"_containerelement-ContainerElement.html")),g(e).forEach((([e,n])=>{t.attributes[e]={value:n}})),t.properties={index:{value:e.index},isEmpty:{value:e.isEmpty},childCount:{value:e.childCount}};for(let[n,i]of e.getCustomProperties())"symbol"==typeof n&&(n=n.toString()),t.customProperties[n]={value:i}}else t.name=e.data,t.type="Text",t.url=s+"_text-Text.html",t.properties={index:{value:e.index}};return t.properties=Object(r.b)(t.properties),t.customProperties=Object(r.b)(t.customProperties),t.attributes=Object(r.b)(t.attributes),t}function h(e,t){const n={};return Object.assign(n,{index:e.index,path:e.getPath(),node:e,positionsBefore:[],positionsAfter:[]}),Object(i.d)(e)?function(e,t){const n=e.node;Object.assign(e,{type:"element",children:[],positions:[]}),e.name=n.name,Object(i.b)(n)?e.elementType="attribute":Object(i.g)(n)?e.elementType="root":Object(i.e)(n)?e.elementType="empty":Object(i.h)(n)?e.elementType="ui":Object(i.f)(n)?e.elementType="raw":e.elementType="container",Object(i.e)(n)?e.presentation={isEmpty:!0}:Object(i.h)(n)?e.children.push({type:"comment",text:a}):Object(i.f)(n)&&e.children.push({type:"comment",text:l});for(const i of n.getChildren())e.children.push(h(i,t));(function(e,t){for(const n of t){const t=m(e,n);for(const n of t){const t=n.offset;if(0===t){const t=e.children[0];t?t.positionsBefore.push(n):e.positions.push(n)}else if(t===e.children.length){const t=e.children[e.children.length-1];t?t.positionsAfter.push(n):e.positions.push(n)}else{let i=n.isEnd?0:e.children.length-1,o=e.children[i];for(;o;){if(o.index===t){o.positionsBefore.push(n);break}if(o.index+1===t){o.positionsAfter.push(n);break}i+=n.isEnd?1:-1,o=e.children[i]}}}}})(e,t),e.attributes=function(e){const t=g(e).map((([e,t])=>[e,Object(r.a)(t,!1)]));return new Map(t)}(n)}(n,t):function(e,t){Object.assign(e,{type:"text",startOffset:0,text:e.node.data,positions:[]});for(const n of t){const t=m(e,n);e.positions.push(...t)}}(n,t),n}function m(e,t){const n=e.path,i=t.start.path,o=t.end.path,r=[];return f(n,i)&&r.push({offset:i[i.length-1],isEnd:!1,presentation:t.presentation||null,type:t.type,name:t.name||null}),f(n,o)&&r.push({offset:o[o.length-1],isEnd:!0,presentation:t.presentation||null,type:t.type,name:t.name||null}),r}function f(e,t){return e.length===t.length-1&&"prefix"===Object(o.a)(e,t)}function g(e){return[...e.getAttributes()].sort((([e],[t])=>e.toUpperCase()"$graveyard"!==e)).concat(t.filter((({rootName:e})=>"$graveyard"===e)))}function c(e,t){if(!e)return[];const n=[],o=e.model;for(const e of o.document.selection.getRanges())e.root.rootName===t&&n.push({type:"selection",start:Object(i.a)(e.start),end:Object(i.a)(e.end)});return n}function u(e,t){if(!e)return[];const n=[],o=e.model;let r=0;for(const e of o.markers){const{name:o,affectsData:s,managedUsingOperations:l}=e,c=e.getStart(),u=e.getEnd();c.root.rootName===t&&n.push({type:"marker",marker:e,name:o,affectsData:s,managedUsingOperations:l,presentation:{color:a[r++%(a.length-1)]},start:Object(i.a)(c),end:Object(i.a)(u)})}return n}function d({currentEditor:e,currentRootName:t,ranges:n,markers:i}){return e?[h(e.model.document.getRoot(t),[...n,...i])]:[]}function p(e,t){const n={editorNode:t,properties:{},attributes:{}};Object(i.c)(t)?(Object(i.d)(t)?(n.type="RootElement",n.name=t.rootName,n.url=s+"rootelement-RootElement.html"):(n.type="Element",n.name=t.name,n.url=s+"element-Element.html"),n.properties={childCount:{value:t.childCount},startOffset:{value:t.startOffset},endOffset:{value:t.endOffset},maxOffset:{value:t.maxOffset}}):(n.name=t.data,n.type="Text",n.url=s+"text-Text.html",n.properties={startOffset:{value:t.startOffset},endOffset:{value:t.endOffset},offsetSize:{value:t.offsetSize}}),n.properties.path={value:Object(i.b)(t)},f(t).forEach((([e,t])=>{n.attributes[e]={value:t}})),n.properties=Object(r.b)(n.properties),n.attributes=Object(r.b)(n.attributes);for(const t in n.attributes){const i={},o=e.model.schema.getAttributeProperties(t);for(const e in o)i[e]={value:o[e]};n.attributes[t].subProperties=Object(r.b)(i)}return n}function h(e,t){const n={},{startOffset:o,endOffset:r}=e;return Object.assign(n,{startOffset:o,endOffset:r,node:e,path:e.getPath(),positionsBefore:[],positionsAfter:[]}),Object(i.c)(e)?function(e,t){const n=e.node;Object.assign(e,{type:"element",name:n.name,children:[],maxOffset:n.maxOffset,positions:[]});for(const i of n.getChildren())e.children.push(h(i,t));(function(e,t){for(const n of t){const t=g(e,n);for(const n of t){const t=n.offset;if(0===t){const t=e.children[0];t?t.positionsBefore.push(n):e.positions.push(n)}else if(t===e.maxOffset){const t=e.children[e.children.length-1];t?t.positionsAfter.push(n):e.positions.push(n)}else{let i=n.isEnd?0:e.children.length-1,o=e.children[i];for(;o;){if(o.startOffset===t){o.positionsBefore.push(n);break}if(o.endOffset===t){const t=e.children[i+1],r="text"===o.type&&t&&"element"===t.type,s="element"===o.type&&t&&"text"===t.type,a="text"===o.type&&t&&"text"===t.type;n.isEnd&&(r||s||a)?t.positionsBefore.push(n):o.positionsAfter.push(n);break}if(o.startOffsett){o.positions.push(n);break}i+=n.isEnd?1:-1,o=e.children[i]}}}}})(e,t),e.attributes=m(n)}(n,t):function(e){const t=e.node;Object.assign(e,{type:"text",text:t.data,positions:[],presentation:{dontRenderAttributeValue:!0}}),e.attributes=m(t)}(n),n}function m(e){const t=f(e).map((([e,t])=>[e,Object(r.a)(t,!1)]));return new Map(t)}function f(e){return[...e.getAttributes()].sort((([e],[t])=>em(e,t,this.props.globalTreeProps)))}get definition(){return this.props.definition}get globalTreeProps(){return this.props.globalTreeProps||{}}get isActive(){return this.definition.node===this.globalTreeProps.activeNode}shouldComponentUpdate(e){return!s()(this.props,e)}}var l=n(1);class c extends i.PureComponent{render(){let e;const t=Object(l.c)(this.props.value,500);return this.props.dontRenderValue||(e=o.a.createElement("span",{className:"ck-inspector-tree-node__attribute__value"},t)),o.a.createElement("span",{className:"ck-inspector-tree-node__attribute"},o.a.createElement("span",{className:"ck-inspector-tree-node__attribute__name",title:t},this.props.name),e)}}class u extends i.Component{render(){const e=this.props.definition,t={className:["ck-inspector-tree__position","selection"===e.type?"ck-inspector-tree__position_selection":"","marker"===e.type?"ck-inspector-tree__position_marker":"",e.isEnd?"ck-inspector-tree__position_end":""].join(" "),style:{}};return e.presentation&&e.presentation.color&&(t.style["--ck-inspector-color-tree-position"]=e.presentation.color),"marker"===e.type&&(t["data-marker-name"]=e.name),o.a.createElement("span",t,"​")}shouldComponentUpdate(e){return!s()(this.props,e)}}class d extends a{render(){const e=this.definition,t=e.presentation,n=t&&t.isEmpty,i=t&&t.cssClass,r=this.getChildren(),s=["ck-inspector-code","ck-inspector-tree-node",this.isActive?"ck-inspector-tree-node_active":"",n?"ck-inspector-tree-node_empty":"",i],a=[],l=[];e.positionsBefore&&e.positionsBefore.forEach(((e,t)=>{a.push(o.a.createElement(u,{key:"position-before:"+t,definition:e}))})),e.positionsAfter&&e.positionsAfter.forEach(((e,t)=>{l.push(o.a.createElement(u,{key:"position-after:"+t,definition:e}))})),e.positions&&e.positions.forEach(((e,t)=>{r.push(o.a.createElement(u,{key:"position"+t,definition:e}))}));let c=e.name;return this.globalTreeProps.showElementTypes&&(c=e.elementType+":"+c),o.a.createElement("div",{className:s.join(" "),onClick:this.handleClick},a,o.a.createElement("span",{className:"ck-inspector-tree-node__name"},o.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_open"}),c,this.getAttributes(),n?"":o.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_close"})),o.a.createElement("div",{className:"ck-inspector-tree-node__content"},r),n?"":o.a.createElement("span",{className:"ck-inspector-tree-node__name ck-inspector-tree-node__name_close"},o.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_open"}),"/",c,o.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_close"}),l))}getAttributes(){const e=[],t=this.definition;for(const[n,i]of t.attributes)e.push(o.a.createElement(c,{key:n,name:n,value:i}));return e}shouldComponentUpdate(e){return!s()(this.props,e)}}class p extends a{render(){const e=this.definition,t=["ck-inspector-tree-text",this.isActive?"ck-inspector-tree-node_active":""].join(" ");let n=this.definition.text;e.positions&&e.positions.length&&(n=n.split(""),Array.from(e.positions).sort(((e,t)=>e.offset{n.splice(t.offset-e.startOffset,0,o.a.createElement(u,{key:"position"+i,definition:t}))})));const i=[n];return e.positionsBefore&&e.positionsBefore.length&&e.positionsBefore.forEach(((e,t)=>{i.unshift(o.a.createElement(u,{key:"position-before:"+t,definition:e}))})),e.positionsAfter&&e.positionsAfter.length&&e.positionsAfter.forEach(((e,t)=>{i.push(o.a.createElement(u,{key:"position-after:"+t,definition:e}))})),o.a.createElement("span",{className:t,onClick:this.handleClick},o.a.createElement("span",{className:"ck-inspector-tree-node__content"},this.globalTreeProps.showCompactText?"":this.getAttributes(),this.globalTreeProps.showCompactText?"":'"',i,this.globalTreeProps.showCompactText?"":'"'))}getAttributes(){const e=[],t=this.definition,n=t.presentation,i=n&&n.dontRenderAttributeValue;for(const[n,r]of t.attributes)e.push(o.a.createElement(c,{key:n,name:n,value:r,dontRenderValue:i}));return o.a.createElement("span",{className:"ck-inspector-tree-text__attributes"},e)}shouldComponentUpdate(e){return!s()(this.props,e)}}class h extends i.Component{render(){return o.a.createElement("span",{className:"ck-inspector-tree-comment",dangerouslySetInnerHTML:{__html:this.props.definition.text}})}}function m(e,t,n){return"element"===e.type?o.a.createElement(d,{key:t,definition:e,globalTreeProps:n}):"text"===e.type?o.a.createElement(p,{key:t,definition:e,globalTreeProps:n}):"comment"===e.type?o.a.createElement(h,{key:t,definition:e}):void 0}n(34);class f extends i.Component{render(){let e;return e=this.props.definition?this.props.definition.map(((e,t)=>m(e,t,{onClick:this.props.onClick,showCompactText:this.props.showCompactText,showElementTypes:this.props.showElementTypes,activeNode:this.props.activeNode}))):"Nothing to show.",o.a.createElement("div",{className:["ck-inspector-tree",...this.props.className||[],this.props.textDirection?"ck-inspector-tree_text-direction_"+this.props.textDirection:"",this.props.showCompactText?"ck-inspector-tree_compact-text":""].join(" ")},e)}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(22)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyPath=t.quoteKey=t.isValidVariableName=t.IS_VALID_IDENTIFIER=t.quoteString=void 0;const i=/[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=new Map([["\b","\\b"],["\t","\\t"],["\n","\\n"],["\f","\\f"],["\r","\\r"],["'","\\'"],['"','\\"'],["\\","\\\\"]]);function r(e){return o.get(e)||"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}t.quoteString=function(e){return`'${e.replace(i,r)}'`};const s=new Set("break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "));function a(e){return"string"==typeof e&&!s.has(e)&&t.IS_VALID_IDENTIFIER.test(e)}t.IS_VALID_IDENTIFIER=/^[A-Za-z_$][A-Za-z0-9_$]*$/,t.isValidVariableName=a,t.quoteKey=function(e,t){return a(e)?e:t(e)},t.stringifyPath=function(e,t){let n="";for(const i of e)a(i)?n+="."+i:n+=`[${t(i)}]`;return n}},function(e,t){function n(e,t,n,i){var o,r=null==(o=i)||"number"==typeof o||"boolean"==typeof o?i:n(i),s=t.get(r);return void 0===s&&(s=e.call(this,i),t.set(r,s)),s}function i(e,t,n){var i=Array.prototype.slice.call(arguments,3),o=n(i),r=t.get(o);return void 0===r&&(r=e.apply(this,i),t.set(o,r)),r}function o(e,t,n,i,o){return n.bind(t,e,i,o)}function r(e,t){return o(e,this,1===e.length?n:i,t.cache.create(),t.serializer)}function s(){return JSON.stringify(arguments)}function a(){this.cache=Object.create(null)}a.prototype.has=function(e){return e in this.cache},a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new a}};e.exports=function(e,t){var n=t&&t.cache?t.cache:l,i=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:i})},e.exports.strategies={variadic:function(e,t){return o(e,this,i,t.cache.create(),t.serializer)},monadic:function(e,t){return o(e,this,n,t.cache.create(),t.serializer)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l ? =".split(" "));function l(e){let t;for(const n of e.split("\n").slice(1)){const i=/^[\s\t]+/.exec(n);if(!i)return e;const[o]=i;(void 0===t||o.length{const r="string"==typeof o?o:void 0;return void 0!==r&&t.USED_METHOD_KEY.add(e),new c(e,n,i,r).stringify()},t.dedentFunction=l;class c{constructor(e,t,n,o){this.fn=e,this.indent=t,this.next=n,this.key=o,this.pos=0,this.hadKeyword=!1,this.fnString=Function.prototype.toString.call(e),this.fnType=e.constructor.name,this.keyQuote=void 0===o?"":i.quoteKey(o,n),this.keyPrefix=void 0===o?"":`${this.keyQuote}:${t?" ":""}`,this.isMethodCandidate=void 0!==o&&(""===this.fn.name||this.fn.name===o)}stringify(){const e=this.tryParse();return e?l(e):`${this.keyPrefix}void ${this.next(this.fnString)}`}getPrefix(){return this.isMethodCandidate&&!this.hadKeyword?s[this.fnType]+this.keyQuote:this.keyPrefix+r[this.fnType]}tryParse(){if("}"!==this.fnString[this.fnString.length-1])return this.keyPrefix+this.fnString;if(this.fn.name){const e=this.tryStrippingName();if(e)return e}const e=this.pos;if("class"===this.consumeSyntax())return this.fnString;if(this.pos=e,this.tryParsePrefixTokens()){const e=this.tryStrippingName();if(e)return e;let t=this.pos;switch(this.consumeSyntax("WORD_LIKE")){case"WORD_LIKE":this.isMethodCandidate&&!this.hadKeyword&&(t=this.pos);case"()":if("=>"===this.fnString.substr(this.pos,2))return this.keyPrefix+this.fnString;this.pos=t;case'"':case"'":case"[]":return this.getPrefix()+this.fnString.substr(this.pos)}}}tryStrippingName(){if(o)return;let e=this.pos;const t=this.fnString.substr(this.pos,this.fn.name.length);if(t===this.fn.name&&(this.pos+=t.length,"()"===this.consumeSyntax()&&"{}"===this.consumeSyntax()&&this.pos===this.fnString.length))return!this.isMethodCandidate&&i.isValidVariableName(t)||(e+=t.length),this.getPrefix()+this.fnString.substr(e);this.pos=e}tryParsePrefixTokens(){let e=this.pos;switch(this.hadKeyword=!1,this.fnType){case"AsyncFunction":if("async"!==this.consumeSyntax())return!1;e=this.pos;case"Function":return"function"===this.consumeSyntax()?this.hadKeyword=!0:this.pos=e,!0;case"AsyncGeneratorFunction":if("async"!==this.consumeSyntax())return!1;case"GeneratorFunction":let t=this.consumeSyntax();return"function"===t&&(t=this.consumeSyntax(),this.hadKeyword=!0),"*"===t}}consumeSyntax(e){const t=this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);if(!t)return;const[n,i]=t;if(this.consumeWhitespace(),i)return e||i;switch(n){case"(":return this.consumeSyntaxUntil("(",")");case"[":return this.consumeSyntaxUntil("[","]");case"{":return this.consumeSyntaxUntil("{","}");case"`":return this.consumeTemplate();case'"':return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/,'"');case"'":return this.consumeRegExp(/^(?:[^\\']|\\.)*'/,"'")}return n}consumeSyntaxUntil(e,t){let n=!0;for(;;){const i=this.consumeSyntax();if(i===t)return e+t;if(!i||")"===i||"]"===i||"}"===i)return;"/"===i&&n&&this.consumeMatch(/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/)?(n=!1,this.consumeWhitespace()):n=a.has(i)}}consumeMatch(e){const t=e.exec(this.fnString.substr(this.pos));return t&&(this.pos+=t[0].length),t}consumeRegExp(e,t){const n=e.exec(this.fnString.substr(this.pos));if(n)return this.pos+=n[0].length,this.consumeWhitespace(),t}consumeTemplate(){for(;;){if(this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/),"`"===this.fnString[this.pos])return this.pos++,this.consumeWhitespace(),"`";if("${"!==this.fnString.substr(this.pos,2)||(this.pos+=2,this.consumeWhitespace(),!this.consumeSyntaxUntil("{","}")))return}}consumeWhitespace(){this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/)}}t.FunctionParser=c},function(e,t,n){e.exports=n(53)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;const i=n(25),o=n(13),r=Symbol("root");t.stringify=function(e,t,n,s={}){const a="string"==typeof n?n:" ".repeat(n||0),l=[],c=new Set,u=new Map,d=new Map;let p=0;const{maxDepth:h=100,references:m=!1,skipUndefinedProperties:f=!1,maxValues:g=1e5}=s,b=function(e){return e?(t,n,o,r)=>e(t,n,(e=>i.toString(e,n,o,r)),r):i.toString}(t),k=(e,t)=>{if(++p>g)return;if(f&&void 0===e)return;if(l.length>h)return;if(void 0===t)return b(e,a,k,t);l.push(t);const n=w(e,t===r?void 0:t);return l.pop(),n},w=m?(e,t)=>{if(null!==e&&("object"==typeof e||"function"==typeof e||"symbol"==typeof e)){if(u.has(e))return d.set(l.slice(1),u.get(e)),b(void 0,a,k,t);u.set(e,l.slice(1))}return b(e,a,k,t)}:(e,t)=>{if(c.has(e))return;c.add(e);const n=b(e,a,k,t);return c.delete(e),n},y=k(e,r);if(d.size){const e=a?" ":"",t=a?"\n":"";let n=`var x${e}=${e}${y};${t}`;for(const[i,r]of d.entries())n+=`x${o.stringifyPath(i,k)}${e}=${e}x${o.stringifyPath(r,k)};${t}`;return`(function${e}()${e}{${t}${n}return x;${t}}())`}return y}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,i=e.length;nI.length&&I.push(e)}function N(e,t,n){return null==e?0:function e(t,n,i,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case r:case s:l=!0}}if(l)return i(o,t,""===n?"."+O(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c