From aa319e2132155d679330b7a81e9b993d21555155 Mon Sep 17 00:00:00 2001 From: ajayadav09 Date: Tue, 15 Oct 2024 19:39:19 +0530 Subject: [PATCH] adding the build files --- build/index.asset.php | 2 +- build/index.css | 2 +- build/index.js | 84 +------------------------------------------ 3 files changed, 3 insertions(+), 85 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 68ebf45..11257c6 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '97f9cfd4e293ed413729'); + array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '6013081a7796d223a271'); diff --git a/build/index.css b/build/index.css index 8acd1b6..d7953dc 100644 --- a/build/index.css +++ b/build/index.css @@ -1 +1 @@ -#nfd-help-center .modal{padding-bottom:32px}#nfd-help-center .modal h3,#nfd-help-center .modal h4{margin:0}#nfd-help-center .modal .modal-header{display:flex;justify-content:space-between;padding:16px}#nfd-help-center .modal .modal-header .heading{align-items:center;color:#394150;display:flex;font-size:20px;font-weight:400;line-height:24px}#nfd-help-center .modal .modal-header .heading .icon{margin-right:10px;padding-top:3px}#nfd-help-center .modal .modal-header .close-button{background:none;border:0}.nfd-plugin-sidebar .nfd-help-center .feedback-container .feedback-button{padding-left:6px;padding-right:6px}.nfd-plugin-sidebar .nfd-help-center .feedback-container .feedback-question{padding-top:8px}.nfd-help-center{padding:0 16px;z-index:10}.nfd-help-center p{font-size:14px}.nfd-help-center p br{content:"";display:block;margin-bottom:5px}.nfd-help-center h3,.nfd-help-center h4{margin:0}.nfd-help-center .launch-help-center{text-align:center}.nfd-help-center .launch-help-center .launch-description{margin:24px 0}.nfd-help-center .launch-help-center .launch-action{align-items:center;display:flex;justify-content:center}.nfd-help-center .launch-help-center button{background-color:#196bde;border:1px solid #196bde;color:#fff;cursor:grab;height:36px;width:146px}.nfd-help-center .launch-help-center p{font-size:18px}.nfd-help-center .launch-help-center a{cursor:grab;display:block;margin-top:16px}.nfd-help-center .suggestions-container .section-header{margin-bottom:8px!important}.nfd-help-center .suggestions-container .article .description,.nfd-help-center .suggestions-container .video .description{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;line-height:1.2em;margin:8px 0;overflow:hidden;text-overflow:ellipsis}.nfd-help-center .suggestions-container .article:hover,.nfd-help-center .suggestions-container .video:hover{background:rgba(57,172,229,.1)}.nfd-help-center .suggestion[data-variant=video] iframe{height:146px;width:248px}.nfd-help-center .search-container{background-color:#f0f3f5;border-radius:8px;display:flex;height:42px;margin:16px 0 0;padding-right:5px}.nfd-help-center .search-container input{background-color:#f0f3f5;border:none;color:#1d1d1f;font-size:15px;padding-left:0}.nfd-help-center .search-container input:focus{box-shadow:none;outline:none}.nfd-help-center .search-container button{background-color:#f0f3f5;background:transparent;border:none;box-shadow:none;cursor:text;padding-top:3px}.nfd-help-center .attribute{color:#394150;display:flex;justify-content:flex-end;margin-top:0;padding-left:2px;padding-right:2px}.nfd-help-center .attribute span{color:#394150;font-size:12px;font-weight:500;line-height:14px;text-align:right}.nfd-help-center .algoliaResult{border-radius:24px;box-shadow:0 0 0 1px #dddfe0;box-sizing:border-box;color:#394150;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:8px;padding:12px 16px;position:relative;transition:box-shadow .2s ease}.nfd-help-center .algoliaResult p{margin:0}.nfd-help-center .algoliaResult .svg{align-items:center;display:flex;justify-content:center;transform:translateX(0);transition:transform .2s ease}.nfd-help-center .algoliaResult:hover{box-shadow:0 0 0 2px #3575d3}.nfd-help-center .algoliaResult:hover .svg{transform:translateX(2px)}.nfd-help-center .feedback-container{background-color:#f0f3f5;border-radius:4px;display:flex;justify-content:space-between;margin-bottom:8%;margin-top:6%;padding-left:4%;padding-right:4%}.nfd-help-center .feedback-container button{border-color:#b2bcc2;border-radius:20px;border-width:1px;box-shadow:none;cursor:pointer;padding-bottom:5%;padding-top:5%}.nfd-help-center .feedback-container .feedback-button{flex-shrink:0;padding:6px 13px;white-space:nowrap}.nfd-help-center .feedback-container .feedback-button .feedback-button-emoji{margin-right:5px}.nfd-help-center .feedback-container .button-icon{height:20px;margin-right:4px;width:20px}.nfd-help-center .feedback-container .yes{border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.nfd-help-center .feedback-container .no{border-bottom-left-radius:0;border-top-left-radius:0}.nfd-help-center .feedback-container .selected-yes{background:#e6fff4;padding-bottom:4.4px;padding-top:5.8px}.nfd-help-center .feedback-container .selected-no{background-color:#ffdcdc;padding-bottom:4.4px;padding-top:5.8px}.nfd-help-center .feedback-container .icon{align-items:center;cursor:pointer;display:flex}.help-container{background:#fff;border:1px solid #dcdcdc;box-shadow:-5px 0 36px rgba(0,0,0,.25);display:block!important;height:100vh;overflow:auto;position:fixed;right:0;width:350px;z-index:100}.wpcontent-container{display:flex}@media screen and (min-width:1814px){.toplevel_page_bluehost .wpcontent-container{display:flex}.toplevel_page_bluehost .wpcontent-container #wpbody{flex:1}.toplevel_page_bluehost .wpcontent-container #wpbody #bwa-app{margin-left:20px!important}.toplevel_page_bluehost .wpcontent-container #wpbody #bwa-app #bluehost-logo-wrap{padding:14px 0 0 12px}}body:is(.page,.post-php,.post-new-php) #wp-admin-bar-help-center{display:none}.mobile #wpadminbar ul#wp-admin-bar-root-default li{width:40px!important}.mobile #wpadminbar li#wp-admin-bar-help-center{display:block}.icon-button{cursor:pointer} +#nfd-help-center{box-sizing:border-box}#nfd-help-center .nfd-hc-modal{padding-bottom:32px}#nfd-help-center .nfd-hc-modal h3,#nfd-help-center .nfd-hc-modal h4{margin:0}#nfd-help-center .nfd-hc-modal__header{align-items:center;background-color:#fff;border-bottom:1px solid #dddfe0;display:flex;height:48px;justify-content:space-between;left:0;position:sticky;top:0;width:350px}#nfd-help-center .nfd-hc-modal__header__heading{color:#394150;font-size:20px;font-weight:400;line-height:24px;padding-top:4px}#nfd-help-center .nfd-hc-modal__header__heading__icon{margin-left:12px;margin-right:12px;vertical-align:middle}#nfd-help-center .nfd-hc-modal__header__close-button{background:none;border:0;margin-right:1px}#nfd-help-center .helpcenter-intro{align-items:stretch;display:flex;justify-content:flex-start;padding:12px}#nfd-help-center .helpcenter-intro__text{padding:0 8px}#nfd-help-center *{box-sizing:border-box}.nfd-plugin-sidebar .nfd-help-center .feedback-container .feedback-button{padding-left:6px;padding-right:6px}.nfd-plugin-sidebar .nfd-help-center .feedback-container .feedback-question{padding-top:8px}.nfd-help-center{height:calc(100vh - 332px);overflow-y:auto;position:relative;z-index:10}.nfd-help-center p{font-size:14px}.nfd-help-center p br{content:"";display:block;margin-bottom:5px}.nfd-help-center h3,.nfd-help-center h4{margin:0}.nfd-help-center .launch-help-center{text-align:center}.nfd-help-center .launch-help-center .launch-description{margin:24px 0}.nfd-help-center .launch-help-center .launch-action{align-items:center;display:flex;justify-content:center}.nfd-help-center .launch-help-center button{background-color:#196bde;border:1px solid #196bde;color:#fff;cursor:grab;height:36px;width:146px}.nfd-help-center .launch-help-center p{font-size:18px}.nfd-help-center .launch-help-center a{cursor:grab;display:block;margin-top:16px}.nfd-help-center .suggestions-container .section-header{margin-bottom:8px!important}.nfd-help-center .suggestions-container .article .description,.nfd-help-center .suggestions-container .video .description{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;line-height:1.2em;margin:8px 0;overflow:hidden;text-overflow:ellipsis}.nfd-help-center .suggestions-container .article:hover,.nfd-help-center .suggestions-container .video:hover{background:rgba(57,172,229,.1)}.nfd-help-center .suggestion[data-variant=video] iframe{height:146px;width:248px}.nfd-help-center .helpcenter-input-wrapper{background:#fff;border-top:1px solid #e2e8f0;bottom:0;height:254px;position:fixed;width:356px;z-index:1}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper{padding:0 12px}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .search-container{background-color:#f0f3f5;border-radius:8px;display:flex;height:42px;margin:16px 0 0;padding-right:5px}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .search-container input{background-color:#f0f3f5;border:none;color:#7a889d;font-size:13px;line-height:19px;padding-left:10px;padding-right:30px;width:100%}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .search-container input:focus{box-shadow:none;outline:none}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .search-container button{background-color:#f0f3f5;background:transparent;border:none;box-shadow:none;cursor:pointer;padding-top:3px;position:absolute;right:15px;top:25px}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .attribute{color:#394150;display:flex;justify-content:flex-end;margin-top:0;padding-left:2px;padding-right:2px}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .attribute .hc-input-counter{margin:5px 0}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .attribute span{color:#394150;font-size:12px;font-weight:500;line-height:14px;text-align:right}.nfd-help-center .helpcenter-input-wrapper .search-container__wrapper .multisearch-loader{display:flex;justify-content:center}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper{padding:8px 12px}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__text{padding:8px 0}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__telephone{margin-bottom:12px}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__telephone span{margin-right:8px;vertical-align:text-top}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__telephone span a{color:#196cdf;text-decoration:none}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__chat{margin-bottom:12px}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__chat span{margin-right:8px;vertical-align:text-top}.nfd-help-center .helpcenter-input-wrapper .helpcenter-supportinfo__wrapper .helpcenter-supportinfo__chat span a{color:#196cdf;text-decoration:none}.nfd-help-center .suggestions-wrapper{background:#fff;bottom:254px;padding:0 12px;position:fixed;width:356px}.nfd-help-center .suggestions-wrapper .algoliaResult{border-radius:24px;box-shadow:0 0 0 1px #dddfe0;box-sizing:border-box;color:#394150;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:8px;padding:10px 16px;position:relative;transition:box-shadow .2s ease}.nfd-help-center .suggestions-wrapper .algoliaResult p{margin:0}.nfd-help-center .suggestions-wrapper .algoliaResult .svg{align-items:center;display:flex;justify-content:center;transform:translateX(0);transition:transform .2s ease}.nfd-help-center .suggestions-wrapper .algoliaResult:hover{box-shadow:0 0 0 2px #3575d3}.nfd-help-center .suggestions-wrapper .algoliaResult:hover .svg{transform:translateX(2px)}.nfd-help-center .feedback-container{display:flex;justify-content:space-between;padding:15px 12px}.nfd-help-center .feedback-container button{border-color:#b2bcc2;border-radius:20px;border-width:1px;box-shadow:none;cursor:pointer;padding-bottom:5%;padding-top:5%}.nfd-help-center .feedback-container .feedback-button{flex-shrink:0;padding:6px 13px;white-space:nowrap}.nfd-help-center .feedback-container .feedback-button .feedback-button-emoji{margin-right:5px}.nfd-help-center .feedback-container .button-icon{height:20px;margin-right:4px;width:20px}.nfd-help-center .feedback-container .yes{border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.nfd-help-center .feedback-container .no{border-bottom-left-radius:0;border-top-left-radius:0}.nfd-help-center .feedback-container .selected-yes{background:#e6fff4;padding-bottom:4.4px;padding-top:5.8px}.nfd-help-center .feedback-container .selected-no{background-color:#ffdcdc;padding-bottom:4.4px;padding-top:5.8px}.nfd-help-center .feedback-container .icon{align-items:center;cursor:pointer;display:flex}.nfd-help-center .hc-results-container .helpcenter-results{padding:0 12px}.nfd-help-center .hc-results-container .helpcenter-question-block{align-items:center;background:#f4f8fc;display:flex;font-size:13px;gap:8px;line-height:19px;padding:8px 12px}.nfd-help-center .hc-results-container .helpcenter-question-block .helpcenter-question__user-avatar{height:24px}.nfd-help-center .hc-results-container .helpcenter-result-block{align-items:stretch;display:flex;gap:8px;padding:12px}.nfd-help-center .hc-results-container .helpcenter-result-block ol,.nfd-help-center .hc-results-container .helpcenter-result-block ul{list-style-position:inside;margin:0;padding:0}.nfd-help-center .hc-results-container .helpcenter-result-block li{margin:0;padding:0}.nfd-help-center .hc-results-container .helpcenter-result-block__aistars{padding-top:12px}.help-container{background:#fff;border:1px solid #dcdcdc;box-shadow:-5px 0 36px rgba(0,0,0,.25);display:block!important;height:100vh;overflow:hidden;position:fixed;right:0;width:356px;z-index:100}.wpcontent-container{display:flex}@media screen and (min-width:1814px){.toplevel_page_bluehost .wpcontent-container{display:flex}.toplevel_page_bluehost .wpcontent-container #wpbody{flex:1}.toplevel_page_bluehost .wpcontent-container #wpbody #bwa-app{margin-left:20px!important}.toplevel_page_bluehost .wpcontent-container #wpbody #bwa-app #bluehost-logo-wrap{padding:14px 0 0 12px}}body:is(.page,.post-php,.post-new-php) #wp-admin-bar-help-center{display:none}.mobile #wpadminbar ul#wp-admin-bar-root-default li{width:40px!important}.mobile #wpadminbar li#wp-admin-bar-help-center{display:block}.icon-button{cursor:pointer}.loading-cursor{animation:blip 1s infinite;background-color:#000;display:inline-block;height:2px;margin-left:5px;margin-top:30px;width:10px}@keyframes blip{0%{opacity:1}50%{opacity:0}to{opacity:1}}.hc-input-error-message{color:#ff7e7e;font-size:12px;margin:5px 0 0} diff --git a/build/index.js b/build/index.js index 9073aed..d3cc53b 100644 --- a/build/index.js +++ b/build/index.js @@ -1,83 +1 @@ -!function(){var e={251:function(e,t,n){"use strict";var r=n(196),i=Symbol.for("react.element"),s=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,a={},o=null,p=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(p=t.ref),t)s.call(t,r)&&!c.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:o,ref:p,props:a,_owner:l.current}}t.jsx=a,t.jsxs=a},893:function(e,t,n){"use strict";e.exports=n(251)},666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",a=s.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var s=t&&t.prototype instanceof g?t:g,l=Object.create(s.prototype),c=new H(r||[]);return i(l,"_invoke",{value:E(e,n,c)}),l}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var h="suspendedStart",A="suspendedYield",d="executing",I="completed",m={};function g(){}function b(){}function f(){}var w={};o(w,l,(function(){return this}));var k=Object.getPrototypeOf,y=k&&k(k(z([])));y&&y!==n&&r.call(y,l)&&(w=y);var S=f.prototype=g.prototype=Object.create(w);function v(e){["next","throw","return"].forEach((function(t){o(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,s,l,c){var a=u(e[i],e,s);if("throw"!==a.type){var o=a.arg,p=o.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(p).then((function(e){o.value=e,l(o)}),(function(e){return n("throw",e,l,c)}))}c(a.arg)}var s;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return s=s?s.then(i,i):i()}})}function E(e,n,r){var i=h;return function(s,l){if(i===d)throw new Error("Generator is already running");if(i===I){if("throw"===s)throw l;return{value:t,done:!0}}for(r.method=s,r.arg=l;;){var c=r.delegate;if(c){var a=x(c,r);if(a){if(a===m)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=I,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var o=u(e,n,r);if("normal"===o.type){if(i=r.done?I:A,o.arg===m)continue;return{value:o.arg,done:r.done}}"throw"===o.type&&(i=I,r.method="throw",r.arg=o.arg)}}}function x(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var s=u(i,e.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,m;var l=s.arg;return l?l.done?(n[e.resultName]=l.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):l:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Z(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function z(e){if(null!=e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function n(){for(;++i=0;--s){var l=this.tryEntries[s],c=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var a=r.call(l,"catchLoc"),o=r.call(l,"finallyLoc");if(a&&o){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),Z(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;Z(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:z(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},774:function(e){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),a=0;a{switch(t.type){case"INITIALIZE_NAMESPACE":return{...e,[t.namespace]:u};case"UPDATE_HIIVE_URLS":return{...e,[t.namespace]:{...e[t.namespace],urls:{single:t.urls.single,batch:t.urls.batch}}};case"UPDATE_HIIVE_EVENTS_QUEUE":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:t.events,threshold:e[t.namespace].queue.threshold}}};case"UPDATE_HIIVE_EVENTS_QUEUE_THRESHOLD":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:e[t.namespace].queue.events,threshold:t.threshold}}};case"UPDATE_HIIVE_DEBOUNCE_TIME":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:t.debounceTime,instance:e[t.namespace].debounce.instance}}};case"UPDATE_HIIVE_DEBOUNCE_INSTANCE":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:e[t.namespace].debounce.time,instance:t.instance}}}}return e}}),actions:e,selectors:t},v=(0,c.createReduxStore)("newfold/ui-analytics",S);(0,c.register)(v);var T=window.wp.apiFetch,E=n.n(T);const x=e=>!!window?.nfdUIAnalytics?.hiive&&e in window.nfdUIAnalytics.hiive,M=async e=>{if(!(e=>e instanceof p)(e)||!x(e.namespace))return!1;const t=e.namespace;delete e.namespace;const n=(0,c.select)(v).getHiiveSingleUrl(t);if(!n)return!1;try{await E()({url:n,method:"POST",data:e})}catch(e){return console.error(e),!1}};var Z,H,z=window.wp.i18n;function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;tE()({path:O+"/search",method:"POST",data:{user_prompt:e,identifier:t,extra:n}}),getDefaultSearchResult:()=>E()({path:O+"/search/default",method:"POST"})};var D,X,W=N;function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"algoliaResult",onClick:t},(0,i.createElement)("p",null,e),(0,i.createElement)("div",{className:"svg"},(0,i.createElement)(V,null)))),L=()=>{const e=window.NewfoldRuntime?.plugin?.brand||"wordpress";return e.includes("hostgator")&&window.NewfoldRuntime?.plugin?.region?e+"-"+window.NewfoldRuntime?.plugin?.region:e},F={updateHelpVisible:e=>{localStorage.setItem("helpVisible",e?"true":"false")},getHelpVisible:()=>"true"===localStorage.getItem("helpVisible"),persistResult:(e,t)=>{localStorage.setItem("helpResultContent",e),localStorage.setItem("helpPostId",t)},persistSearchInput:e=>{localStorage.setItem("searchInput",e)},clear:()=>{localStorage.removeItem("helpResultContent"),localStorage.removeItem("helpPostId"),localStorage.removeItem("searchInput")},getResultInfo:()=>({content:localStorage.getItem("helpResultContent"),postId:localStorage.getItem("helpPostId")}),getSearchInput:()=>localStorage.getItem("searchInput"),getFeatureFlag(e){return localStorage.getItem(e)},setFeatureFlag(e,t){localStorage.setItem(e,t)}},q=(e,t)=>{const n=new p("wonder_help",e,t,"wonder_help");M(n)};var K,_,$=({postId:e,source:t})=>{const[n,r]=(0,l.useState)(""),s=(0,l.useRef)(null),c=(0,l.useRef)(null);return(0,l.useEffect)((()=>{r(""),c.current.className="feedback-button no",s.current.className="feedback-button yes"}),[e]),(0,l.useEffect)((()=>{(async()=>{"helpful"!==n&&"notHelpful"!==n||(((e,t)=>{E()({path:"nfd-help-center/v1/feedback",method:"POST",data:{post_id:e,status:t}})})(e,n),q("help_feedback_submitted",{label_key:"type",type:"helpful"===n?"positive":"negative",source:t,post_id:e,page:window.location.href.toString()}))})(),"helpful"===n&&(s.current.className="feedback-button yes selected-yes",c.current.className="feedback-button no"),"notHelpful"===n&&(c.current.className="feedback-button no selected-no",s.current.className="feedback-button yes")}),[n]),(0,i.createElement)("div",{className:"feedback-container"},(0,i.createElement)("div",{className:"feedback-question"},(0,i.createElement)("p",null,(0,i.createElement)("b",null,(0,z.__)("Did this result help you?","wp-module-help-center")))),(0,i.createElement)("div",{className:"icon"},(0,i.createElement)("button",{ref:s,onClick:()=>{r("helpful")},className:"feedback-button yes"},"helpful"===n&&(0,i.createElement)("span",{className:"feedback-button-emoji",role:"img","aria-label":"helpful"},"🥳"),(0,z.__)("Yes","wp-module-help-center")),(0,i.createElement)("button",{onClick:()=>{r("notHelpful")},ref:c,className:"feedback-button no"},"notHelpful"===n&&(0,i.createElement)("span",{className:"feedback-button-emoji",role:"img","aria-label":"not helpful"},"😭"),(0,z.__)("No","wp-module-help-center"))))};function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(window?.nfdHelpCenter?.resourceLink)return(0,i.createElement)("p",null,(0,z.__)("In the meantime, try searching our","wp-module-help-center")," ",(0,i.createElement)("a",{href:window?.nfdHelpCenter?.resourceLink},(0,z.__)("Resource center.","wp-module-help-center")))},re=()=>(0,i.createElement)("div",null,(0,i.createElement)("p",null,(0,z.__)("Result based on your search:","wp-module-help-center")),(0,i.createElement)("h4",null,(0,z.__)("Sorry, we don't have any content for that yet.","wp-module-help-center")),(0,i.createElement)("hr",null),(0,i.createElement)(te,null),(0,i.createElement)("p",null,(0,z.__)("This tool is being built and doesn't always have a match.","wp-module-help-center")),(0,i.createElement)(ne,null),(0,i.createElement)("hr",null));let ie={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function se(e){ie=e}const le=/[&<>"']/,ce=new RegExp(le.source,"g"),ae=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oe=new RegExp(ae.source,"g"),pe={"&":"&","<":"<",">":">",'"':""","'":"'"},ue=e=>pe[e];function he(e,t){if(t){if(le.test(e))return e.replace(ce,ue)}else if(ae.test(e))return e.replace(oe,ue);return e}const Ae=/(^|[^\[])\^/g;function de(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(Ae,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function Ie(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const me={exec:()=>null};function ge(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:be(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=be(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:be(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=be(t[0],"\n").split("\n"),n="",r="";const i=[];for(;e.length>0;){let t=!1;const s=[];let l;for(l=0;l/.test(e[l]))s.push(e[l]),t=!0;else{if(t)break;s.push(e[l])}e=e.slice(l);const c=s.join("\n"),a=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${c}`:c,r=r?`${r}\n${a}`:a;const o=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,i,!0),this.lexer.state.top=o,0===e.length)break;const p=i[i.length-1];if("code"===p?.type)break;if("blockquote"===p?.type){const t=p,s=t.raw+"\n"+e.join("\n"),l=this.blockquote(s);i[i.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,r=r.substring(0,r.length-t.text.length)+l.text;break}if("list"!==p?.type);else{const t=p,s=t.raw+"\n"+e.join("\n"),l=this.list(s);i[i.length-1]=l,n=n.substring(0,n.length-p.raw.length)+l.raw,r=r.substring(0,r.length-t.raw.length)+l.raw,e=s.substring(i[i.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let l=!1;for(;e;){let n=!1,r="",c="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let a=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),o=e.split("\n",1)[0],p=!a.trim(),u=0;if(this.options.pedantic?(u=2,c=a.trimStart()):p?u=t[1].length+1:(u=t[2].search(/[^ ]/),u=u>4?1:u,c=a.slice(u),u+=t[1].length),p&&/^ *$/.test(o)&&(r+=o+"\n",e=e.substring(o.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(o=l,this.options.pedantic&&(o=o.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(o))break;if(s.test(o))break;if(t.test(o))break;if(n.test(e))break;if(o.search(/[^ ]/)>=u||!o.trim())c+="\n"+o.slice(u);else{if(p)break;if(a.search(/[^ ]/)>=4)break;if(i.test(a))break;if(s.test(a))break;if(n.test(a))break;c+="\n"+o}p||o.trim()||(p=!0),r+=l+"\n",e=e.substring(l.length+1),a=o.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(r)&&(l=!0));let h,A=null;this.options.gfm&&(A=/^\[[ xX]\] /.exec(c),A&&(h="[ ] "!==A[0],c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:r,task:!!A,checked:h,loose:!1,text:c,tokens:[]}),i.raw+=r}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=ge(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:he(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=be(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),fe(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return fe(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let i,s,l=n,c=0;const a="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(s=[...i].length,r[3]||r[4]){l+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);const t=[...r[0]][0].length,a=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const o=a.slice(2,-2);return{type:"strong",raw:a,text:o,tokens:this.lexer.inlineTokens(o)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=he(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=he(t[1]),n="mailto:"+e):(e=he(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=he(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=he(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:he(t[0]),{type:"text",raw:t[0],text:e}}}}const ke=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ye=/(?:[*+-]|\d{1,9}[.)])/,Se=de(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ye).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ve=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Te=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ee=de(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xe=de(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ye).getRegex(),Me="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ze=/|$))/,He=de("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Ze).replace("tag",Me).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ze=de(ve).replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Me).getRegex(),Re={blockquote:de(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ze).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Ee,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:ke,html:He,lheading:Se,list:xe,newline:/^(?: *(?:\n|$))+/,paragraph:ze,table:me,text:/^[^\n]+/},Pe=de("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Me).getRegex(),Be={...Re,table:Pe,paragraph:de(ve).replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Me).getRegex()},Ge={...Re,html:de("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ze).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:me,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:de(ve).replace("hr",ke).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Se).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},je=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ue=/^( {2,}|\\)\n(?!\s*$)/,Oe="\\p{P}\\p{S}",Ne=de(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Oe).getRegex(),De=de(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Oe).getRegex(),Xe=de("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Oe).getRegex(),We=de("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Oe).getRegex(),Qe=de(/\\([punct])/,"gu").replace(/punct/g,Oe).getRegex(),Je=de(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ce=de(Ze).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ve=de("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ce).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ye=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Le=de(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ye).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fe=de(/^!?\[(label)\]\[(ref)\]/).replace("label",Ye).replace("ref",Te).getRegex(),qe=de(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Ke={_backpedal:me,anyPunctuation:Qe,autolink:Je,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Ue,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:me,emStrongLDelim:De,emStrongRDelimAst:Xe,emStrongRDelimUnd:We,escape:je,link:Le,nolink:qe,punctuation:Ne,reflink:Fe,reflinkSearch:de("reflink|nolink(?!\\()","g").replace("reflink",Fe).replace("nolink",qe).getRegex(),tag:Ve,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?t.push(r):(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(i.raw+="\n"+r.raw,i.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s)))i=t[t.length-1],n&&"paragraph"===i?.type?(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(r),n=s.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),i=t[t.length-1],i&&"text"===i.type?(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,s,l,c,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,c))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(c=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class it{options;parser;constructor(e){this.options=e||ie}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(/^\S*/)?.[0],i=e.replace(/\n$/,"")+"\n";return r?'
'+(n?i:he(i,!0))+"
\n":"
"+(n?i:he(i,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=Ie(e);if(null===i)return r;let s='
    ",s}image({href:e,title:t,text:n}){const r=Ie(e);if(null===r)return n;let i=`${n}{const i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new it(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,i=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new we(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ct;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.hooks[r],s=t[r];ct.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>s.call(t,e)));const n=i.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return rt.lex(e,t??this.defaults)}parser(e,t){return lt.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,r)=>{const i={...r},s={...this.defaults,...i},l=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===i.async)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==n)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(l);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let i=t(r,s);return s.hooks&&(i=s.hooks.postprocess(i)),i}catch(e){return l(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+he(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ot(e,t){return at.parse(e,t)}ot.options=ot.setOptions=function(e){return at.setOptions(e),ot.defaults=at.defaults,se(ot.defaults),ot},ot.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ot.defaults=ie,ot.use=function(...e){return at.use(...e),ot.defaults=at.defaults,se(ot.defaults),ot},ot.walkTokens=function(e,t){return at.walkTokens(e,t)},ot.parseInline=at.parseInline,ot.Parser=lt,ot.parser=lt.parse,ot.Renderer=it,ot.TextRenderer=st,ot.Lexer=rt,ot.lexer=rt.lex,ot.Tokenizer=we,ot.Hooks=ct,ot.parse=ot,ot.options,ot.setOptions,ot.use,ot.walkTokens,ot.parseInline,lt.parse,rt.lex;const pt=({content:e,noResult:t,postId:n,source:r,showFeedbackSection:s})=>{if(t)return(0,i.createElement)(re,null);return e&&e.length>0?(0,i.createElement)(i.Fragment,null,(0,i.createElement)((({markdownText:e})=>{const[t,n]=(0,i.useState)("");return(0,i.useEffect)((()=>{const t=ot(e);n(t)}),[e]),(0,i.createElement)("p",{dangerouslySetInnerHTML:{__html:t}})}),{markdownText:e}),s&&e&&e.length>0&&(0,i.createElement)($,{postId:n,source:r})):(0,i.createElement)(i.Fragment,null)};var ut,ht,At,dt,It,mt;function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bt,null)," ",(0,i.createElement)(bt,null)," ",(0,i.createElement)(bt,null)),wt=n(893),kt=function(){return kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?Xt(_t,--qt):0,Lt--,10===Kt&&(Lt=1,Yt--),Kt}function rn(){return Kt=qt2||an(Kt)>3?"":" "}function un(e,t){for(;--t&&rn()&&!(Kt<48||Kt>102||Kt>57&&Kt<65||Kt>70&&Kt<97););return cn(e,ln()+(t<6&&32==sn()&&32==rn()))}function hn(e){for(;rn();)switch(Kt){case e:return qt;case 34:case 39:34!==e&&39!==e&&hn(Kt);break;case 40:41===e&&hn(e);break;case 92:rn()}return qt}function An(e,t){for(;rn()&&e+Kt!==57&&(e+Kt!==84||47!==sn()););return"/*"+cn(t,qt-1)+"*"+Gt(47===e?e:rn())}function dn(e){for(;!an(sn());)rn();return cn(e,qt)}function In(e,t){for(var n="",r=0;r6)switch(Xt(e,t+1)){case 109:if(45!==Xt(e,t+4))break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+xt+"$2-$3$1"+Et+(108==Xt(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Dt(e,"stretch",0)?gn(Nt(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,i,s,l,c){return Tt+n+":"+r+c+(i?Tt+n+"-span:"+(s?l:+l-+r)+c:"")+e}));case 4949:if(121===Xt(e,t+6))return Nt(e,":",":"+xt)+e;break;case 6444:switch(Xt(e,45===Xt(e,14)?18:11)){case 120:return Nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+xt+(45===Xt(e,14)?"inline-":"")+"box$3$1"+xt+"$2$3$1"+Tt+"$2box$3")+e;case 100:return Nt(e,":",":"+Tt)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Nt(e,"scroll-","scroll-snap-")+e}return e}function bn(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Ht:return void(e.return=gn(e.value,e.length,n));case Rt:return In([en(e,{value:Nt(e.value,"@","@"+xt)})],r);case Zt:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(Ot(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":tn(en(e,{props:[Nt(t,/:(read-\w+)/,":"+Et+"$1")]})),tn(en(e,{props:[t]})),jt(e,{props:Vt(n,r)});break;case"::placeholder":tn(en(e,{props:[Nt(t,/:(plac\w+)/,":"+xt+"input-$1")]})),tn(en(e,{props:[Nt(t,/:(plac\w+)/,":"+Et+"$1")]})),tn(en(e,{props:[Nt(t,/:(plac\w+)/,Tt+"input-$1")]})),tn(en(e,{props:[t]})),jt(e,{props:Vt(n,r)})}return""}))}}function fn(e){return function(e){return _t="",e}(wn("",null,null,null,[""],e=function(e){return Yt=Lt=1,Ft=Qt(_t=e),qt=0,[]}(e),0,[0],e))}function wn(e,t,n,r,i,s,l,c,a){for(var o=0,p=0,u=l,h=0,A=0,d=0,I=1,m=1,g=1,b=0,f="",w=i,k=s,y=r,S=f;m;)switch(d=b,b=rn()){case 40:if(108!=d&&58==Xt(S,u-1)){-1!=Dt(S+=Nt(on(b),"&","&\f"),"&\f",Bt(o?c[o-1]:0))&&(g=-1);break}case 34:case 39:case 91:S+=on(b);break;case 9:case 10:case 13:case 32:S+=pn(d);break;case 92:S+=un(ln()-1,7);continue;case 47:switch(sn()){case 42:case 47:Ct(yn(An(rn(),ln()),t,n,a),a);break;default:S+="/"}break;case 123*I:c[o++]=Qt(S)*g;case 125*I:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+p:-1==g&&(S=Nt(S,/\f/g,"")),A>0&&Qt(S)-u&&Ct(A>32?Sn(S+";",r,n,u-1,a):Sn(Nt(S," ","")+";",r,n,u-2,a),a);break;case 59:S+=";";default:if(Ct(y=kn(S,t,n,o,p,i,c,f,w=[],k=[],u,s),s),123===b)if(0===p)wn(S,t,y,y,w,s,u,c,k);else switch(99===h&&110===Xt(S,3)?100:h){case 100:case 108:case 109:case 115:wn(e,y,y,r&&Ct(kn(e,y,y,0,0,i,c,f,i,w=[],u,k),k),i,k,u,c,r?w:k);break;default:wn(S,y,y,y,[""],k,0,c,k)}}o=p=A=0,I=g=1,f=S="",u=l;break;case 58:u=1+Qt(S),A=d;default:if(I<1)if(123==b)--I;else if(125==b&&0==I++&&125==nn())continue;switch(S+=Gt(b),b*I){case 38:g=p>0?1:(S+="\f",-1);break;case 44:c[o++]=(Qt(S)-1)*g,g=1;break;case 64:45===sn()&&(S+=on(rn())),h=sn(),p=u=Qt(f=S+=dn(ln())),b++;break;case 45:45===d&&2==Qt(S)&&(I=0)}}return s}function kn(e,t,n,r,i,s,l,c,a,o,p,u){for(var h=i-1,A=0===i?s:[""],d=Jt(A),I=0,m=0,g=0;I0?A[b]+" "+f:Nt(f,/&\f/g,A[b])))&&(a[g++]=w);return $t(e,t,n,0===i?Zt:c,a,o,p,u)}function yn(e,t,n,r){return $t(e,t,n,Mt,Gt(Kt),Wt(e,2,-2),0,r)}function Sn(e,t,n,r,i){return $t(e,t,n,Ht,Wt(e,0,r),Wt(e,r+1,-1),r,i)}var vn={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,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},Tn="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",En="active",xn="data-styled-version",Mn="6.1.12",Zn="/*!sc*/\n",Hn="undefined"!=typeof window&&"HTMLElement"in window,zn=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),Rn=(new Set,Object.freeze([])),Pn=Object.freeze({});var Bn=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Gn=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,jn=/(^-|-$)/g;function Un(e){return e.replace(Gn,"-").replace(jn,"")}var On=/(a)(d)/gi,Nn=52,Dn=function(e){return String.fromCharCode(e+(e>25?39:97))};function Xn(e){var t,n="";for(t=Math.abs(e);t>Nn;t=t/Nn|0)n=Dn(t%Nn)+n;return(Dn(t%Nn)+n).replace(On,"$1-$2")}var Wn,Qn=5381,Jn=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Cn=function(e){return Jn(Qn,e)};function Vn(e){return Xn(Cn(e)>>>0)}function Yn(e){return"string"==typeof e&&!0}var Ln="function"==typeof Symbol&&Symbol.for,Fn=Ln?Symbol.for("react.memo"):60115,qn=Ln?Symbol.for("react.forward_ref"):60112,Kn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},er={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tr=((Wn={})[qn]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Wn[Fn]=er,Wn);function nr(e){return("type"in(t=e)&&t.type.$$typeof)===Fn?er:"$$typeof"in e?tr[e.$$typeof]:Kn;var t}var rr=Object.defineProperty,ir=Object.getOwnPropertyNames,sr=Object.getOwnPropertySymbols,lr=Object.getOwnPropertyDescriptor,cr=Object.getPrototypeOf,ar=Object.prototype;function or(e,t,n){if("string"!=typeof t){if(ar){var r=cr(t);r&&r!==ar&&or(e,r,n)}var i=ir(t);sr&&(i=i.concat(sr(t)));for(var s=nr(e),l=nr(t),c=0;c0?" Args: ".concat(t.join(", ")):""))}var br=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw gr(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,s=r;s=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(a+="".concat(e,","))})),r+="".concat(l).concat(c,'{content:"').concat(a,'"}').concat(Zn)},s=0;s0?".".concat(t):e},p=a.slice();p.push((function(e){e.type===Zt&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Ur,n).replace(r,o))})),l.prefix&&p.push(bn),p.push(mn);var u=function(e,i,s,c){void 0===i&&(i=""),void 0===s&&(s=""),void 0===c&&(c="&"),t=c,n=i,r=new RegExp("\\".concat(n,"\\b"),"g");var a=e.replace(Or,""),o=fn(s||i?"".concat(s," ").concat(i," { ").concat(a," }"):a);l.namespace&&(o=Nr(o,l.namespace));var u,h,A,d=[];return In(o,(u=p.concat((A=function(e){return d.push(e)},function(e){e.root||(e=e.return)&&A(e)})),h=Jt(u),function(e,t,n,r){for(var i="",s=0;s="A"&&e<="Z"};function Fr(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var l=n(i,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,l)}r=hr(r,s),this.staticRulesId=s}else{for(var c=Jn(this.baseHash,n.hash),a="",o=0;o>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(a,".".concat(h),void 0,this.componentId)),r=hr(r,h)}}return r},e}(),ni=s().createContext(void 0);ni.Consumer;var ri={};function ii(e,t,n){var r=ur(e),l=e,c=!Yn(e),a=t.attrs,o=void 0===a?Rn:a,p=t.componentId,u=void 0===p?function(e,t){var n="string"!=typeof e?"sc":Un(e);ri[n]=(ri[n]||0)+1;var r="".concat(n,"-").concat(Vn(Mn+n+ri[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,h=t.displayName,A=void 0===h?function(e){return Yn(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):h,d=t.displayName&&t.componentId?"".concat(Un(t.displayName),"-").concat(t.componentId):t.componentId||u,I=r&&l.attrs?l.attrs.concat(o).filter(Boolean):o,m=t.shouldForwardProp;if(r&&l.shouldForwardProp){var g=l.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;m=function(e,t){return g(e,t)&&b(e,t)}}else m=g}var f=new ti(n,d,r?l.componentStyle:void 0);function w(e,t){return function(e,t,n){var r=e.attrs,l=e.componentStyle,c=e.defaultProps,a=e.foldedComponentIds,o=e.styledComponentId,p=e.target,u=s().useContext(ni),h=Cr(),A=e.shouldForwardProp||h.shouldForwardProp,d=function(e,t,n){return void 0===n&&(n=Pn),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,c)||Pn,I=function(e,t,n){for(var r,i=kt(kt({},t),{className:void 0,theme:n}),s=0;s2&&jr.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=Zr(),r=Ar([n&&'nonce="'.concat(n,'"'),"".concat(Tn,'="true"'),"".concat(xn,'="').concat(Mn,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw gr(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw gr(2);var n=e.instance.toString();if(!n)return[];var r=((t={})[Tn]="",t[xn]=Mn,t.dangerouslySetInnerHTML={__html:n},t),i=Zr();return i&&(r.nonce=i),[s().createElement("style",kt({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new jr({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw gr(2);return s().createElement(Vr,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw gr(3)}}(),"__sc-".concat(Tn,"__");const hi={"aria-busy":!0,role:"progressbar"},Ai=pi.div` - display: ${e=>e.$visible?"flex":"none"}; -`,di=242.776657104492,Ii=ui` -12.5% { - stroke-dasharray: ${33.98873199462888}px, ${di}px; - stroke-dashoffset: -${26.70543228149412}px; -} -43.75% { - stroke-dasharray: ${84.97182998657219}px, ${di}px; - stroke-dashoffset: -${84.97182998657219}px; -} -100% { - stroke-dasharray: ${2.42776657104492}px, ${di}px; - stroke-dashoffset: -${240.34889053344708}px; -} -`,mi=(pi.path` - stroke-dasharray: ${2.42776657104492}px, ${di}; - stroke-dashoffset: 0; - animation: ${Ii} ${1.6}s linear infinite; -`,ui` -to { - transform: rotate(360deg); - } -`),gi=(pi.svg` - animation: ${mi} 0.75s steps(12, end) infinite; - animation-duration: 0.75s; -`,pi.polyline` - stroke-width: ${e=>e.width}px; - stroke-linecap: round; - - &:nth-child(12n + 0) { - stroke-opacity: 0.08; - } - - &:nth-child(12n + 1) { - stroke-opacity: 0.17; - } - - &:nth-child(12n + 2) { - stroke-opacity: 0.25; - } - - &:nth-child(12n + 3) { - stroke-opacity: 0.33; - } - - &:nth-child(12n + 4) { - stroke-opacity: 0.42; - } - - &:nth-child(12n + 5) { - stroke-opacity: 0.5; - } - - &:nth-child(12n + 6) { - stroke-opacity: 0.58; - } - - &:nth-child(12n + 7) { - stroke-opacity: 0.66; - } - - &:nth-child(12n + 8) { - stroke-opacity: 0.75; - } - - &:nth-child(12n + 9) { - stroke-opacity: 0.83; - } - - &:nth-child(12n + 11) { - stroke-opacity: 0.92; - } -`,({height:e=80,width:t=80,radius:n=9,color:r="#4fa94d",ariaLabel:i="three-dots-loading",wrapperStyle:s,wrapperClass:l,visible:c=!0})=>(0,wt.jsx)(Ai,{style:s,$visible:c,className:l,"data-testid":"three-dots-loading","aria-label":i,...hi,children:(0,wt.jsxs)("svg",{width:t,height:e,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,"data-testid":"three-dots-svg",children:[(0,wt.jsxs)("circle",{cx:"15",cy:"15",r:Number(n)+6,children:[(0,wt.jsx)("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),(0,wt.jsx)("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]}),(0,wt.jsxs)("circle",{cx:"60",cy:"15",r:n,attributeName:"fill-opacity",from:"1",to:"0.3",children:[(0,wt.jsx)("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),(0,wt.jsx)("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]}),(0,wt.jsxs)("circle",{cx:"105",cy:"15",r:Number(n)+6,children:[(0,wt.jsx)("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),(0,wt.jsx)("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]})]})})),bi=ui` -to { - stroke-dashoffset: 136; - } -`;pi.polygon` - stroke-dasharray: 17; - animation: ${bi} 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite; -`,pi.svg` - transform-origin: 50% 65%; -`;var fi,wi=e=>{const[t,n]=(0,l.useState)(!1),[r,s]=(0,l.useState)(!1),[c,a]=(0,l.useState)(""),[o,p]=(0,l.useState)(""),[u,h]=(0,l.useState)(),[A,d]=(0,l.useState)("kb"),[I,m]=(0,l.useState)({}),[g,b]=(0,l.useState)(!1),f=(e,t,n)=>{const r=e.replace(/\n/g,"
    ");p(r),h(t),F.persistResult(r,t),F.persistSearchInput(n),t&&q("help_search",{label_key:"term",term:n,page:window.location.href.toString()})},w=async(e,t)=>{try{return await E()({path:"/newfold-multi-search/v1/multi_search",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,brand:t})})}catch(e){return console.error("Error fetching multi-search results:",e),{}}};(0,l.useEffect)((()=>{a(""),p("")}),[e.refresh]),(0,l.useEffect)((()=>{(async()=>{try{const{content:e,postId:t}=F.getResultInfo();e&&p(e),t&&h(t);const n=F.getSearchInput()||"";a(n);const r=await L(),i=await w(n,r);m({hits:i?.results?.[0]?.grouped_hits})}catch(e){console.error("Error fetching initial data:",e)}})()}),[]);const k=(0,l.useMemo)((()=>(0,U.debounce)((async e=>{if(e&&0!==e.length){b(!0);try{const t=await L(),n=await w(e,t);n?.results?.[0]?.grouped_hits&&m({hits:n?.results?.[0]?.grouped_hits})}catch(e){console.error("Error fetching debounced results:",e)}finally{b(!1)}}else m({})}),500)),[]);return(0,l.useEffect)((()=>{k.cancel()}),[]),t?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(ft,null)):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"search-container"},(0,i.createElement)("button",{onClick:()=>{document.getElementById("search-input-box").focus()}},(0,i.createElement)(J,null)),(0,i.createElement)("input",{type:"text",id:"search-input-box",style:{flexGrow:2},value:c,maxLength:"144",placeholder:(0,z.__)("Ask me anything…","wp-module-help-center"),onChange:e=>{a(e.target.value),f("",void 0,e.target.value),s(!1),k(e.target.value)},onKeyDown:async e=>{"Enter"===e.key&&await(async()=>{n(!0);try{const e=I.hits[0].hits;if(e.length>0&&((e,t,n)=>{const r=t/e.split(/\s+/).length;return n>=1&&r>=.99})(c,e[0].text_match_info?.tokens_matched,e[0].text_match_info?.fields_matched))return void f(e[0].document.post_content,e[0].document.post_id,c);d("ai");const t=await W.getSearchResult(c,"helpcenter");f(t.result[0].text,t.post_id,c)}catch(e){s(!0)}finally{n(!1)}})()}})),(0,i.createElement)("div",{className:"attribute"},(0,i.createElement)("p",null,(0,i.createElement)("span",null,c?c.length:0,"/144"))),g?(0,i.createElement)(gi,{height:"40",width:"40",radius:"4",color:"#196BDE",ariaLabel:"three-dots-loading",wrapperStyle:{},visible:!0}):(0,i.createElement)(pt,{content:o,noResult:r,postId:u,source:A,showFeedbackSection:!o.includes("do not possess the answer")}),I?.hits?.length>0&&(0,i.createElement)("p",null,(0,i.createElement)("b",null,o?.length>0?(0,z.__)("Other Resources","wp-module-help-center"):(0,z.__)("Search Suggestions","wp-module-help-center"))),I?.hits?.map(((e,t)=>{const n=document.createElement("span");n.setAttribute("display","none"),n.innerHTML=e?.group_key;const r=n.textContent||n.innerText;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Y,{key:t,searchTitle:r,onGo:()=>{a(r),f(e?.hits[0]?.document?.post_content,e?.hits[0]?.document?.id,r)}}))})))},ki=e=>{const[t,n]=(0,l.useState)(!1),[r,s]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{(async()=>{try{const e=await(window.NewfoldRuntime?.capabilities?.canAccessHelpCenter||!1);s(e)}catch(e){s(!1)}})()}),[]),(0,l.useEffect)((()=>{const e=()=>{n(F.getHelpVisible())};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}),[]),r&&t?(0,i.createElement)("div",{className:"nfd-help-center"},(0,i.createElement)(wi,{refresh:e.refresh})):(0,i.createElement)(i.Fragment,null)},yi=({onClose:e})=>{const[t,n]=(0,l.useState)("");(0,l.useEffect)((()=>{const e=F.getHelpVisible();Ei(e),(async()=>{const e=await L();n(e.toLowerCase())})()}),[]);const[r,s]=(0,l.useState)(!1);return(0,i.createElement)("div",{className:"modal"},(0,i.createElement)("div",{className:"modal-header"},(0,i.createElement)("h3",{className:"heading"},(0,i.createElement)("span",{className:"icon"},(0,i.createElement)(j,null)),(0,z.__)("Help Center","wp-module-help-center")),(0,i.createElement)("button",{className:"close-button",onClick:()=>{e(),s(!r)}},(0,i.createElement)("div",{className:"icon-button"},(0,i.createElement)(B,null)))),(0,i.createElement)(ki,{closeHelp:()=>{e(),s(!r)},refresh:r,brand:t}))};function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t{window?.nfdHelpCenter?.restUrl&&(async({namespace:e,urls:{single:t,batch:n}={},settings:{debounce:{time:r}={},queue:{threshold:i=100}={}}={}})=>{!e||!x(e)&&(!t&&!n||((0,c.dispatch)(v).initializeNamespace(e),(0,c.dispatch)(v).updateHiiveUrls({single:t,batch:n},e),(0,c.dispatch)(v).updateHiiveDebounceTime(r,e),(0,c.dispatch)(v).updateHiiveEventsQueueThreshold(i,e),window.nfdUIAnalytics?.hiive?window.nfdUIAnalytics.hiive[e]=!0:window.nfdUIAnalytics={hiive:{[e]:!0}}))})({namespace:"wonder_help",urls:{single:window.nfdHelpCenter.restUrl+"/newfold-data/v1/events"}})}));const Ti=document.getElementById("wpcontent"),Ei=e=>{Ti.classList.toggle("wpcontent-container",e),document.getElementById("nfd-help-center").classList.toggle("help-container",e),F.updateHelpVisible(e),window.dispatchEvent(new Event("storage"))};window.newfoldEmbeddedHelp={toggleNFDLaunchedEmbeddedHelp:()=>{(()=>{const e=F.getHelpVisible();if(Object.is(e,void 0))return Ei(!0),void q("help_sidebar_opened",{page:window.location.href.toString()});e||q("help_sidebar_opened",{page:window.location.href.toString()}),Ei(!e)})()},renderEmbeddedHelp:()=>{const e=document.createElement("div");e.id="nfd-help-center",e.style.display="none",Ti.appendChild(e);const t=document.getElementById("nfd-help-center");null!==t&&("undefined"!==l.createRoot?(0,l.createRoot)(t).render((0,i.createElement)(yi,{onClose:()=>{Ei(!1),F.clear()}})):"undefined"!==l.render&&(0,l.render)((0,i.createElement)(yi,{onClose:()=>{Ei(!1),F.clear()}}),t))}};const xi=(0,c.subscribe)((()=>{document.getElementById("nfd-help-menu-button-wrapper")?xi():o()((()=>{const e=document.querySelector(".edit-post-header__settings");if(!e)return;const t=document.createElement("div");t.id="nfd-help-menu-button-wrapper",t.classList.add("nfd-help-menu-button-wrapper");const n=e.querySelector(".components-dropdown-menu.interface-more-menu-dropdown");n?e.insertBefore(t,n):e.appendChild(t);const r=(0,i.createElement)("button",{className:"components-button has-icon",onClick:()=>{window.newfoldEmbeddedHelp.toggleNFDLaunchedEmbeddedHelp()}},(0,i.createElement)(vi,null));(0,l.render)(r,document.getElementById("nfd-help-menu-button-wrapper"))}))}));window.newfoldEmbeddedHelp.renderEmbeddedHelp(),window.newfoldEmbeddedHelp.launchNFDEmbeddedHelpQuery=function(e,t){const n=F.getHelpVisible();F.persistSearchInput(e),"true"!==n&&t&&(window.newfoldEmbeddedHelp.renderEmbeddedHelp(),Ei(!0));const r=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13}),i=document.getElementById("nfd-help-center");let s=0;const l=setInterval((()=>{if(s++,i&&(e=>{const t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility})(i)){const t=document.getElementById("search-input-box");t.value=e,t.focus(),t.setSelectionRange(t.value.length,t.value.length),t.dispatchEvent(r),clearInterval(l)}else s>=5&&clearInterval(l)}),500)},document.addEventListener("click",(e=>{try{e.target?.dataset?.nfdhelpcenterquery&&""!==e.target.dataset.nfdhelpcenterquery.trim()&&window.newfoldEmbeddedHelp.launchNFDEmbeddedHelpQuery(e.target.dataset.nfdhelpcenterquery,!0)}catch(e){console.error("Error launching help center via query:",e)}}))}()}(); \ No newline at end of file +!function(){var e={666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",o=l.asyncIterator||"@@asyncIterator",a=l.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var l=t&&t.prototype instanceof k?t:k,i=Object.create(l.prototype),o=new N(r||[]);return s(i,"_invoke",{value:I(e,n,o)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p="suspendedStart",d="suspendedYield",g="executing",f="completed",m={};function k(){}function w(){}function b(){}var x={};c(x,i,(function(){return this}));var y=Object.getPrototypeOf,E=y&&y(y(L([])));E&&E!==n&&r.call(E,i)&&(x=E);var v=b.prototype=k.prototype=Object.create(x);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(s,l,i,o){var a=h(e[s],e,l);if("throw"!==a.type){var c=a.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,o)}))}o(a.arg)}var l;s(this,"_invoke",{value:function(e,r){function s(){return new t((function(t,s){n(e,r,t,s)}))}return l=l?l.then(s,s):s()}})}function I(e,n,r){var s=p;return function(l,i){if(s===g)throw new Error("Generator is already running");if(s===f){if("throw"===l)throw i;return{value:t,done:!0}}for(r.method=l,r.arg=i;;){var o=r.delegate;if(o){var a=R(o,r);if(a){if(a===m)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(s===p)throw s=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);s=g;var c=h(e,n,r);if("normal"===c.type){if(s=r.done?f:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(s=f,r.method="throw",r.arg=c.arg)}}}function R(e,n){var r=n.method,s=e.iterator[r];if(s===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var l=h(s,e.iterator,n.arg);if("throw"===l.type)return n.method="throw",n.arg=l.arg,n.delegate=null,m;var i=l.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function z(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(null!=e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var s=-1,l=function n(){for(;++s=0;--l){var i=this.tryEntries[l],o=i.completion;if("root"===i.tryLoc)return s("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&r.call(s,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),z(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var s=r.arg;z(n)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.d(r,{z:function(){return Rt}});var e={};n.r(e),n.d(e,{initializeNamespace:function(){return h},updateHiiveDebounceInstance:function(){return m},updateHiiveDebounceTime:function(){return f},updateHiiveEventsQueue:function(){return d},updateHiiveEventsQueueThreshold:function(){return g},updateHiiveUrls:function(){return p}});var t={};n.r(t),n.d(t,{getHiiveBatchUrl:function(){return x},getHiiveDebounce:function(){return y},getHiiveEventsQueue:function(){return k},getHiiveEventsQueueThreshold:function(){return w},getHiiveSingleUrl:function(){return b}});var s=window.React,l=(n(666),window.wp.element),i=window.wp.data,o=window.wp.domReady,a=n.n(o);class c{constructor(e,t,n,r){this.category=e,this.action=t,this.data=n,this.namespace=r}}const u={urls:{single:void 0,batch:void 0},queue:{events:[],threshold:100},debounce:{time:void 0,instance:void 0}};function h(e){return{type:"INITIALIZE_NAMESPACE",namespace:e}}function p(e,t){return{type:"UPDATE_HIIVE_URLS",urls:e,namespace:t}}function d(e,t){return{type:"UPDATE_HIIVE_EVENTS_QUEUE",events:e,namespace:t}}function g(e,t){return{type:"UPDATE_HIIVE_EVENTS_QUEUE_THRESHOLD",threshold:e,namespace:t}}function f(e,t){return{type:"UPDATE_HIIVE_DEBOUNCE_TIME",debounceTime:e,namespace:t}}function m(e,t){return{type:"UPDATE_HIIVE_DEBOUNCE_INSTANCE",instance:e,namespace:t}}function k(e,t){return e.hiive[t]?.queue.events}function w(e,t){return e.hiive[t]?.queue.threshold}function b(e,t){return e.hiive[t]?.urls.single}function x(e,t){return e.hiive[t]?.urls.batch}function y(e,t){return e.hiive[t]?.debounce}const E={reducer:(0,i.combineReducers)({hiive:(e,t)=>{switch(t.type){case"INITIALIZE_NAMESPACE":return{...e,[t.namespace]:u};case"UPDATE_HIIVE_URLS":return{...e,[t.namespace]:{...e[t.namespace],urls:{single:t.urls.single,batch:t.urls.batch}}};case"UPDATE_HIIVE_EVENTS_QUEUE":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:t.events,threshold:e[t.namespace].queue.threshold}}};case"UPDATE_HIIVE_EVENTS_QUEUE_THRESHOLD":return{...e,[t.namespace]:{...e[t.namespace],queue:{events:e[t.namespace].queue.events,threshold:t.threshold}}};case"UPDATE_HIIVE_DEBOUNCE_TIME":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:t.debounceTime,instance:e[t.namespace].debounce.instance}}};case"UPDATE_HIIVE_DEBOUNCE_INSTANCE":return{...e,[t.namespace]:{...e[t.namespace],debounce:{time:e[t.namespace].debounce.time,instance:t.instance}}}}return e}}),actions:e,selectors:t},v=(0,i.createReduxStore)("newfold/ui-analytics",E);(0,i.register)(v);var A=window.wp.apiFetch,S=n.n(A);const I=e=>!!window?.nfdUIAnalytics?.hiive&&e in window.nfdUIAnalytics.hiive,R=async e=>{if(!(e=>e instanceof c)(e)||!I(e.namespace))return!1;const t=e.namespace;delete e.namespace;const n=(0,i.select)(v).getHiiveSingleUrl(t);if(!n)return!1;try{await S()({url:n,method:"POST",data:e})}catch(e){return console.error(e),!1}};var T,z,N=window.wp.i18n;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;tS()({path:U+"/search",method:"POST",data:{user_prompt:e,identifier:t,extra:n}}),getDefaultSearchResult:()=>S()({path:U+"/search/default",method:"POST"})};function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"algoliaResult",onClick:t},(0,s.createElement)("p",null,e),(0,s.createElement)("div",{className:"svg"},(0,s.createElement)(B,null)))),D=()=>{const e=window.NewfoldRuntime?.plugin?.brand||"wordpress";return e.includes("hostgator")&&window.NewfoldRuntime?.plugin?.region?e+"-"+window.NewfoldRuntime?.plugin?.region:e},F={updateHelpVisible:e=>{localStorage.setItem("helpVisible",e?"true":"false")},getHelpVisible:()=>"true"===localStorage.getItem("helpVisible"),persistResult:(e,t,n)=>{if(!e||""===e.trim())return;const r=JSON.parse(localStorage.getItem("helpResultContent"))||[],s={searchInput:n,resultContent:e,postId:t};r.push(s),localStorage.setItem("helpResultContent",JSON.stringify(r))},persistSearchInput:e=>{localStorage.setItem("searchInput",e)},clear:()=>{localStorage.removeItem("helpResultContent"),localStorage.removeItem("helpPostId"),localStorage.removeItem("searchInput")},getResultInfo:()=>{const e=localStorage.getItem("helpResultContent");return e?JSON.parse(e):[]},getSearchInput:()=>localStorage.getItem("searchInput"),getFeatureFlag(e){return localStorage.getItem(e)},setFeatureFlag(e,t){localStorage.setItem(e,t)}},M=(e,t)=>{const n=new c("wonder_help",e,t,"wonder_help");R(n)},Z=(e,t=100,n=!1)=>{const[r,s]=(0,l.useState)(""),[i,o]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{if(!e)return s(""),void o(!1);if(n){const n=e.trim().split(" ").filter(Boolean);let r=0;s(n[0]),o(!1);const l=setInterval((()=>{re+" "+n[r]))):(clearInterval(l),o(!0))}),t);return()=>clearInterval(l)}s(e),o(!0)}),[e,t,n]),{displayedText:r,isComplete:i}};var G,Y,W=({postId:e,source:t})=>{const[n,r]=(0,l.useState)(""),[i,o]=(0,l.useState)(!1),[a,c]=(0,l.useState)(!1),u=(0,l.useRef)(null),h=(0,l.useRef)(null);return(0,l.useEffect)((()=>{r(""),h.current.className="feedback-button no",u.current.className="feedback-button yes"}),[e]),(0,l.useEffect)((()=>{if((async()=>{"helpful"!==n&&"notHelpful"!==n||(((e,t)=>{S()({path:"nfd-help-center/v1/feedback",method:"POST",data:{post_id:e,status:t}})})(e,n),M("help_feedback_submitted",{label_key:"type",type:"helpful"===n?"positive":"negative",source:t,post_id:e,page:window.location.href.toString()}))})(),"helpful"===n||"notHelpful"===n){o(!0),c(!0);const e=setTimeout((()=>{c(!1)}),3e3);return()=>clearTimeout(e)}}),[n]),(0,s.createElement)("div",{className:"feedback-container"},!i&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"feedback-question"},(0,s.createElement)("p",null,(0,N.__)("Did this result help you?","wp-module-help-center"))),(0,s.createElement)("div",{className:"icon"},(0,s.createElement)("button",{ref:u,onClick:()=>{r("helpful")},className:"feedback-button yes"},(0,N.__)("Yes","wp-module-help-center")),(0,s.createElement)("button",{onClick:()=>{r("notHelpful")},ref:h,className:"feedback-button no"},(0,N.__)("No","wp-module-help-center")))),i&&a&&(0,s.createElement)("div",{className:"thanks-message"},(0,N.__)("Thanks for the feedback!","wp-module-help-center")))},J=()=>{const e=window?.nfdHelpCenter?.resourceLink||"#",t=(0,N.__)('You can try searching our
    Resource center. though to see if there’s a helpful article or video on that subject.',"wp-module-help-center").replace("{link}",e);return(0,s.createElement)("div",null,(0,s.createElement)("p",null,(0,N.__)("Sorry, I don’t have any information on that topic yet.","wp-module-help-center")),(0,s.createElement)("p",{dangerouslySetInnerHTML:{__html:t}}))};function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t"']/,le=new RegExp(se.source,"g"),ie=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oe=new RegExp(ie.source,"g"),ae={"&":"&","<":"<",">":">",'"':""","'":"'"},ce=e=>ae[e];function ue(e,t){if(t){if(se.test(e))return e.replace(le,ce)}else if(ie.test(e))return e.replace(oe,ce);return e}const he=/(^|[^\[])\^/g;function pe(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(he,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}function de(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ge={exec:()=>null};function fe(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:me(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=me(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:me(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=me(t[0],"\n").split("\n"),n="",r="";const s=[];for(;e.length>0;){let t=!1;const l=[];let i;for(i=0;i/.test(e[i]))l.push(e[i]),t=!0;else{if(t)break;l.push(e[i])}e=e.slice(i);const o=l.join("\n"),a=o.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${o}`:o,r=r?`${r}\n${a}`:a;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,s,!0),this.lexer.state.top=c,0===e.length)break;const u=s[s.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,l=t.raw+"\n"+e.join("\n"),i=this.blockquote(l);s[s.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{const t=u,l=t.raw+"\n"+e.join("\n"),i=this.list(l);s[s.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=l.substring(s[s.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const l=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i=!1;for(;e;){let n=!1,r="",o="";if(!(t=l.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let a=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!a.trim(),h=0;if(this.options.pedantic?(h=2,o=a.trimStart()):u?h=t[1].length+1:(h=t[2].search(/[^ ]/),h=h>4?1:h,o=a.slice(h),h+=t[1].length),u&&/^ *$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),l=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const i=e.split("\n",1)[0];if(c=i,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),s.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(e))break;if(c.search(/[^ ]/)>=h||!c.trim())o+="\n"+c.slice(h);else{if(u)break;if(a.search(/[^ ]/)>=4)break;if(s.test(a))break;if(l.test(a))break;if(n.test(a))break;o+="\n"+c}u||c.trim()||(u=!0),r+=i+"\n",e=e.substring(i.length+1),a=c.slice(h)}}s.loose||(i?s.loose=!0:/\n *\n *$/.test(r)&&(i=!0));let p,d=null;this.options.gfm&&(d=/^\[[ xX]\] /.exec(o),d&&(p="[ ] "!==d[0],o=o.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:r,task:!!d,checked:p,loose:!1,text:o,tokens:[]}),s.raw+=r}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=n}if(s.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=fe(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?l.align.push("right"):/^ *:-+: *$/.test(e)?l.align.push("center"):/^ *:-+ *$/.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]}))));return l}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ue(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=me(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),ke(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ke(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let s,l,i=n,o=0;const a="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(l=[...s].length,r[3]||r[4]){i+=l;continue}if((r[5]||r[6])&&n%3&&!((n+l)%3)){o+=l;continue}if(i-=l,i>0)continue;l=Math.min(l,l+i+o);const t=[...r[0]][0].length,a=e.slice(0,n+r.index+t+l);if(Math.min(n,l)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=ue(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=ue(t[1]),n="mailto:"+e):(e=ue(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=ue(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=ue(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:ue(t[0]),{type:"text",raw:t[0],text:e}}}}const be=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xe=/(?:[*+-]|\d{1,9}[.)])/,ye=pe(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,xe).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ve=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ae=pe(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ve).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Se=pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),Ie="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Re=/|$))/,Te=pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Re).replace("tag",Ie).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ze=pe(Ee).replace("hr",be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ie).getRegex(),Ne={blockquote:pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ze).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Ae,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:be,html:Te,lheading:ye,list:Se,newline:/^(?: *(?:\n|$))+/,paragraph:ze,table:ge,text:/^[^\n]+/},Le=pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ie).getRegex(),je={...Ne,table:Le,paragraph:pe(Ee).replace("hr",be).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Le).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ie).getRegex()},Ce={...Ne,html:pe("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Re).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ge,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pe(Ee).replace("hr",be).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ye).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,He=/^( {2,}|\\)\n(?!\s*$)/,Pe="\\p{P}\\p{S}",Oe=pe(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Pe).getRegex(),Ue=pe(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Pe).getRegex(),Qe=pe("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Pe).getRegex(),Ve=pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Pe).getRegex(),Be=pe(/\\([punct])/,"gu").replace(/punct/g,Pe).getRegex(),qe=pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),De=pe(Re).replace("(?:--\x3e|$)","--\x3e").getRegex(),Fe=pe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",De).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Me=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ze=pe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Me).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ge=pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Me).replace("ref",ve).getRegex(),Ye=pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ve).getRegex(),We={_backpedal:ge,anyPunctuation:Be,autolink:qe,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:He,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ge,emStrongLDelim:Ue,emStrongRDelimAst:Qe,emStrongRDelimUnd:Ve,escape:_e,link:Ze,nolink:Ye,punctuation:Oe,reflink:Ge,reflinkSearch:pe("reflink|nolink(?!\\()","g").replace("reflink",Ge).replace("nolink",Ye).getRegex(),tag:Fe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(r):(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(s.raw+="\n"+r.raw,s.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(l=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(l)))s=t[t.length-1],n&&"paragraph"===s?.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r),n=l.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,s,l,i,o,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(l=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(o=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class nt{options;parser;constructor(e){this.options=e||ne}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return r?'
    '+(n?s:ue(s,!0))+"
    \n":"
    "+(n?s:ue(s,!0))+"
    \n"}blockquote({tokens:e}){return`
    \n${this.parser.parse(e)}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),s=de(e);if(null===s)return r;let l='
    ",l}image({href:e,title:t,text:n}){const r=de(e);if(null===r)return n;let s=`${n}{const s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new nt(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,s=e.renderer[r],l=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=l.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new we(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,s=e.tokenizer[r],l=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=l.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new lt;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.hooks[r],l=t[r];lt.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(s.call(t,e)).then((e=>l.call(t,e)));const n=s.call(t,e);return l.call(t,n)}:t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=l.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return tt.lex(e,t??this.defaults)}parser(e,t){return st.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,r)=>{const s={...r},l={...this.defaults,...s},i=this.onError(!!l.silent,!!l.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(n):n).then((t=>e(t,l))).then((e=>l.hooks?l.hooks.processAllTokens(e):e)).then((e=>l.walkTokens?Promise.all(this.walkTokens(e,l.walkTokens)).then((()=>e)):e)).then((e=>t(e,l))).then((e=>l.hooks?l.hooks.postprocess(e):e)).catch(i);try{l.hooks&&(n=l.hooks.preprocess(n));let r=e(n,l);l.hooks&&(r=l.hooks.processAllTokens(r)),l.walkTokens&&this.walkTokens(r,l.walkTokens);let s=t(r,l);return l.hooks&&(s=l.hooks.postprocess(s)),s}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+ue(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ot(e,t){return it.parse(e,t)}ot.options=ot.setOptions=function(e){return it.setOptions(e),ot.defaults=it.defaults,re(ot.defaults),ot},ot.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ot.defaults=ne,ot.use=function(...e){return it.use(...e),ot.defaults=it.defaults,re(ot.defaults),ot},ot.walkTokens=function(e,t){return it.walkTokens(e,t)},ot.parseInline=it.parseInline,ot.Parser=st,ot.parser=st.parse,ot.Renderer=nt,ot.TextRenderer=rt,ot.Lexer=tt,ot.lexer=tt.lex,ot.Tokenizer=we,ot.Hooks=lt,ot.parse=ot,ot.options,ot.setOptions,ot.use,ot.walkTokens,ot.parseInline,st.parse,tt.lex;const at=({content:e,noResult:t,postId:n,source:r,showFeedbackSection:i,questionBlock:o,isLoading:a,loadingQuery:c,loadingIndex:u,index:h,isNewResult:p,searchInput:d})=>{const g=p&&h===F.getResultInfo().length-1,f=(0,l.useRef)(null),[m,k]=(0,l.useState)(!1);(0,l.useEffect)((()=>{(g&&f.current||a)&&w()}),[g,a]);const w=()=>{const e=window.innerHeight-332;f.current.style.minHeight=`${e}px`;const t=document.getElementById("helpcenterResultsWrapper"),n=t.scrollHeight;t.scrollBy({top:n,left:0,behavior:"smooth"}),k(!0)},{displayedText:b,isComplete:x}=Z(e||"",50,m),y=(0,l.useMemo)((()=>{const e=(e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll("p").forEach((e=>{const t=document.createDocumentFragment();for(;e.firstChild;)t.appendChild(e.firstChild);const n=document.createElement("br"),r=document.createElement("br");t.appendChild(n),t.appendChild(r),e.parentNode.replaceChild(t,e)})),t.body.innerHTML}return""})(b);return e?ot(e):""}),[b]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{ref:f,className:"helpcenter-response-block"},(0,s.createElement)("div",{className:"helpcenter-question-block"},(0,s.createElement)("div",{className:"helpcenter-question__user-avatar"},(0,s.createElement)($,null)),(0,s.createElement)("div",null,t&&g?d:o)),(0,s.createElement)("div",{className:"helpcenter-result-block"},(0,s.createElement)("div",{className:"helpcenter-result-block__aistars"},(0,s.createElement)(te,null)),(0,s.createElement)("div",null,t&&g?(0,s.createElement)(J,null):a&&c===o&&u===h&&"ai"===r?(0,s.createElement)("div",{className:"loading-cursor"}):e&&e.length>0?(0,s.createElement)("p",{className:"helpcenter-results",dangerouslySetInnerHTML:{__html:y}}):null)),!t&&i&&e&&x&&e.length>0&&(0,s.createElement)(W,{postId:n,source:r})))};var ct;function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[a,c]=(0,l.useState)(""),u=()=>e.trim()?(c(""),!0):(c((0,N.__)("Please enter a specific search term to get results.","wp-module-help-center")),!1);return(0,s.createElement)("div",{className:"helpcenter-input-wrapper"},(0,s.createElement)("div",{className:"search-container__wrapper"},(0,s.createElement)("div",{className:"search-container"},(0,s.createElement)("input",{type:"text",id:"search-input-box",value:e,maxLength:"144",placeholder:(0,N.__)("Ask about WordPress","wp-module-help-center"),onChange:e=>{c(""),t(e.target.value),n("",void 0,e.target.value),i(!1),r(e.target.value)},onKeyDown:async e=>{"Enter"===e.key&&u()&&await o()}}),(0,s.createElement)("button",{onClick:async()=>{u()&&await o()}},(0,s.createElement)(pt,null))),a&&(0,s.createElement)("p",{className:"hc-input-error-message"},a),(0,s.createElement)("div",{className:"attribute"},(0,s.createElement)("p",{className:"hc-input-counter"},(0,s.createElement)("span",null,e?e.length:0,"/144")))),(0,s.createElement)("div",{className:"helpcenter-supportinfo__wrapper"},(0,s.createElement)("div",null,(0,s.createElement)("h4",null,(0,N.__)("Account Support","wp-module-help-center")),(0,s.createElement)("div",{className:"helpcenter-supportinfo__text"},(0,N.__)("If you need help with your Bluehost account, contact our support team:","wp-module-help-center")),(0,s.createElement)("div",{className:"helpcenter-supportinfo__telephone"},(0,s.createElement)("span",null,(0,s.createElement)(ft,null)),(0,s.createElement)("span",null,(0,s.createElement)("a",{href:"tel:8884014678","aria-label":"Call 888-401-4678"},"888-401-4678"))),(0,s.createElement)("div",{className:"helpcenter-supportinfo__chat"},(0,s.createElement)("span",null,(0,s.createElement)(wt,null)),(0,s.createElement)("span",null,(0,s.createElement)("a",{href:"https://www.bluehost.com/contact","aria-label":(0,N.__)("Chat with support","wp-module-help-center"),target:"_blank",rel:"noreferrer"},(0,N.__)("Chat with support","wp-module-help-center")))))))},xt=e=>{const[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)(!1),[o,a]=(0,l.useState)(""),[c,u]=(0,l.useState)([]),[h,p]=(0,l.useState)(),[d,g]=(0,l.useState)("kb"),[f,m]=(0,l.useState)({}),[k,w]=(0,l.useState)(!0),[b,x]=(0,l.useState)(null),[y,E]=(0,l.useState)(null),[v,A]=(0,l.useState)(!1),I=(e,t,n)=>{const r=e.replace(/\n/g,"
    ");F.persistResult(r,t,n);const s=F.getResultInfo();u(s),p(t),F.persistSearchInput(n),t&&A(!0),t&&M("help_search",{label_key:"term",term:n,page:window.location.href.toString()})},R=async(e,t)=>{try{return await S()({path:"/newfold-multi-search/v1/multi_search",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,brand:t})})}catch(e){return console.error("Error fetching multi-search results:",e),{}}};(0,l.useEffect)((()=>{a("")}),[e.refresh]),(0,l.useEffect)((()=>{(async()=>{try{const e=F.getResultInfo();e&&(u(e),A(!1));const t=F.getSearchInput()||"";a(t);const n=await D(),r=await R(t,n);m({hits:r?.results?.[0]?.grouped_hits})}catch(e){console.error("Error fetching initial data:",e)}})()}),[]);const T=(e,t)=>!!(e?.length>0&&((e,t,n)=>{const r=t/e.split(/\s+/).length;return n>=1&&r>=.99})(t,e[0]?.text_match_info?.tokens_matched,e[0]?.text_match_info?.fields_matched))&&(I(e[0].document.post_content,e[0].document.post_id||e[0].document.id,t),!0),z=(0,l.useMemo)((()=>(0,O.debounce)((async e=>{if(e&&0!==e.length){w(!0);try{const t=await D(),n=await R(e,t);n?.results?.[0]?.grouped_hits&&m({hits:n?.results?.[0]?.grouped_hits})}catch(e){console.error("Error fetching debounced results:",e)}}else m({})}),500)),[]);return(0,l.useEffect)((()=>{z.cancel()}),[]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"hc-results-container"},c?.length>0&&c.map(((e,n)=>(0,s.createElement)(at,{key:n,content:e.resultContent,noResult:r,postId:e.postId,source:d,showFeedbackSection:!e.resultContent.includes("do not possess the answer"),questionBlock:e.searchInput,isLoading:t,loadingQuery:b,loadingIndex:y,index:n,isNewResult:v,searchInput:o}))),t&&(0,s.createElement)(at,{key:"loading",content:null,noResult:!1,postId:null,source:"ai",showFeedbackSection:!1,questionBlock:b,isLoading:t,loadingQuery:b,loadingIndex:y,index:c.length,isNewResult:v,searchInput:o})),k&&(0,s.createElement)("div",{className:"suggestions-wrapper"},f?.hits?.length>0&&(0,s.createElement)("p",null,(0,s.createElement)("b",null,(0,N.__)("Common Topics","wp-module-help-center"))),f?.hits?.map(((e,t)=>{const n=document.createElement("span");n.setAttribute("display","none"),n.innerHTML=e?.group_key;const r=n.textContent||n.innerText;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(q,{key:t,searchTitle:r,onGo:()=>{((e,t)=>{a(t),w(!1),I(e?.hits[0]?.document?.post_content,e?.hits[0]?.document?.id,t)})(e,r)}}))}))),(0,s.createElement)(bt,{searchInput:o,setSearchInput:a,populateSearchResult:I,debouncedResults:z,setNoResult:i,getAIResult:async()=>{n(!0),w(!1),x(o),E(c.length);try{let e=f?.hits?.[0]?.hits;if(T(e,o))return;const t=await D(),n=await R(o,t);if(e=n?.results?.[0]?.grouped_hits?.[0]?.hits,T(e,o))return;g("ai");const r=await Q.getSearchResult(o,"helpcenter");r.result[0]?I(r.result[0].text,r.post_id,o):i(!0)}catch(e){console.error("An error occurred:",e),i(!0),A(!0)}finally{x(null),n(!1),E(null),w(!1)}}}))},yt=()=>{const[e,t]=(0,l.useState)(!1);(0,l.useEffect)((()=>{F.getResultInfo().length<=0?t(!0):t(!1)}),[]);const n=(0,N.__)("Hi! I’m your WordPress AI assistant.

    Ask me how to do things in WordPress and I’ll provide step by step instructions.

    I’m still learning so I don’t have all the answers just yet.","wp-module-help-center"),{displayedText:r}=Z(n||"",50,e);return(0,s.createElement)("div",{className:"helpcenter-intro"},(0,s.createElement)("div",null,(0,s.createElement)(te,null)),(0,s.createElement)("div",{className:"helpcenter-intro__text",dangerouslySetInnerHTML:{__html:r}}))},Et=e=>{const[t,n]=(0,l.useState)(!1),[r,i]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{(async()=>{try{const e=await(window.NewfoldRuntime?.capabilities?.canAccessHelpCenter||!1);i(e)}catch(e){i(!1)}})()}),[]),(0,l.useEffect)((()=>{const e=()=>{n(F.getHelpVisible())};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}),[]),r&&t?(0,s.createElement)("div",{className:"nfd-help-center",id:"helpcenterResultsWrapper"},(0,s.createElement)(yt,null),(0,s.createElement)(xt,{refresh:e.refresh})):(0,s.createElement)(s.Fragment,null)},vt=({onClose:e})=>{const[t,n]=(0,l.useState)(""),[r,i]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const e=F.getHelpVisible();Rt(e),(async()=>{const e=await D();n(e.toLowerCase())})()}),[]),(0,s.createElement)("div",{className:"nfd-hc-modal"},(0,s.createElement)("div",{className:"nfd-hc-modal__header"},(0,s.createElement)("h3",{className:"nfd-hc-modal__header__heading"},(0,s.createElement)("span",{className:"nfd-hc-modal__header__heading__icon"},(0,s.createElement)(P,null)),(0,s.createElement)("span",null,(0,N.__)("Help with WordPress","wp-module-help-center"))),(0,s.createElement)("button",{className:"nfd-hc-modal__header__close-button",onClick:()=>{e(),i(!r)}},(0,s.createElement)("div",{className:"nfd-hc-modal__header__close-button__icon-button"},(0,s.createElement)(_,null)))),(0,s.createElement)(Et,{closeHelp:()=>{e(),i(!r)},refresh:r,brand:t}))};function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t{window?.nfdHelpCenter?.restUrl&&(async({namespace:e,urls:{single:t,batch:n}={},settings:{debounce:{time:r}={},queue:{threshold:s=100}={}}={}})=>{!e||!I(e)&&(!t&&!n||((0,i.dispatch)(v).initializeNamespace(e),(0,i.dispatch)(v).updateHiiveUrls({single:t,batch:n},e),(0,i.dispatch)(v).updateHiiveDebounceTime(r,e),(0,i.dispatch)(v).updateHiiveEventsQueueThreshold(s,e),window.nfdUIAnalytics?.hiive?window.nfdUIAnalytics.hiive[e]=!0:window.nfdUIAnalytics={hiive:{[e]:!0}}))})({namespace:"wonder_help",urls:{single:window.nfdHelpCenter.restUrl+"/newfold-data/v1/events"}})}));const It=document.getElementById("wpcontent"),Rt=e=>{It.classList.toggle("wpcontent-container",e),document.getElementById("nfd-help-center").classList.toggle("help-container",e),F.updateHelpVisible(e),window.dispatchEvent(new Event("storage"))};window.newfoldEmbeddedHelp={toggleNFDLaunchedEmbeddedHelp:()=>{(()=>{const e=F.getHelpVisible();if(Object.is(e,void 0))return Rt(!0),void M("help_sidebar_opened",{page:window.location.href.toString()});e||M("help_sidebar_opened",{page:window.location.href.toString()}),Rt(!e)})()},renderEmbeddedHelp:()=>{const e=document.createElement("div");e.id="nfd-help-center",e.style.display="none",It.appendChild(e);const t=document.getElementById("nfd-help-center");null!==t&&("undefined"!==l.createRoot?(0,l.createRoot)(t).render((0,s.createElement)(vt,{onClose:()=>{Rt(!1)}})):"undefined"!==l.render&&(0,l.render)((0,s.createElement)(vt,{onClose:()=>{Rt(!1)}}),t))}};const Tt=(0,i.subscribe)((()=>{document.getElementById("nfd-help-menu-button-wrapper")?Tt():a()((()=>{const e=document.querySelector(".edit-post-header__settings");if(!e)return;const t=document.createElement("div");t.id="nfd-help-menu-button-wrapper",t.classList.add("nfd-help-menu-button-wrapper");const n=e.querySelector(".components-dropdown-menu.interface-more-menu-dropdown");n?e.insertBefore(t,n):e.appendChild(t);const r=(0,s.createElement)("button",{className:"components-button has-icon",onClick:()=>{window.newfoldEmbeddedHelp.toggleNFDLaunchedEmbeddedHelp()}},(0,s.createElement)(St,null));(0,l.render)(r,document.getElementById("nfd-help-menu-button-wrapper"))}))}));window.newfoldEmbeddedHelp.renderEmbeddedHelp(),window.newfoldEmbeddedHelp.launchNFDEmbeddedHelpQuery=function(e,t){const n=F.getHelpVisible();F.persistSearchInput(e),"true"!==n&&t&&(window.newfoldEmbeddedHelp.renderEmbeddedHelp(),Rt(!0));const r=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13}),s=document.getElementById("nfd-help-center");let l=0;const i=setInterval((()=>{if(l++,s&&(e=>{const t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility})(s)){const t=document.getElementById("search-input-box");t.value=e,t.focus(),t.setSelectionRange(t.value.length,t.value.length),t.dispatchEvent(r),clearInterval(i)}else l>=5&&clearInterval(i)}),500)},document.addEventListener("click",(e=>{try{e.target?.dataset?.nfdhelpcenterquery&&""!==e.target.dataset.nfdhelpcenterquery.trim()&&window.newfoldEmbeddedHelp.launchNFDEmbeddedHelpQuery(e.target.dataset.nfdhelpcenterquery,!0)}catch(e){console.error("Error launching help center via query:",e)}}))}()}(); \ No newline at end of file