JezK
Edit File: product-editor-utils.js
/*! For license information please see product-editor-utils.js.LICENSE.txt */ (()=>{var e={217(e,t,n){"use strict";n(8446),n(7723),n(790)},228(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var l=new i(r,s||e,o),a=n?n+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],l]:e._events[a].push(l):(e._events[a]=l,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),l.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++)o[i]=r[i].fn;return o},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,i,s,o){var l=n?n+e:e;if(!this._events[l])return!1;var a,c,u=this._events[l],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,s),!0;case 6:return u.fn.call(u.context,t,r,i,s,o),!0}for(c=1,a=new Array(d-1);c<d;c++)a[c-1]=arguments[c];u.fn.apply(u.context,a)}else{var h,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,i);break;default:if(!a)for(h=1,a=new Array(d-1);h<d;h++)a[h-1]=arguments[h];u[c].fn.apply(u[c].context,a)}}return!0},l.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var l=this._events[s];if(l.fn)l.fn!==t||i&&!l.once||r&&l.context!==r||o(this,s);else{for(var a=0,c=[],u=l.length;a<u;a++)(l[a].fn!==t||i&&!l[a].once||r&&l[a].context!==r)&&c.push(l[a]);c.length?this._events[s]=1===c.length?c[0]:c:o(this,s)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l},231(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(6087),i=n(9491),s=n(8446),o=n(790);const l=({value:e="",onChange:t,delay:n=500,component:l="",...a})=>{const[c,u]=(0,r.useState)(e),d=(0,i.useDebounce)(t,n);(0,r.useEffect)(()=>{u(e)},[e]);const h=e=>{const t=e.target.value;u(t),d&&d(t)},f=null!=l?l:"";return f?(0,o.jsx)(f,{...a,value:c,onChange:h}):(0,o.jsx)(s.SimpleInput,{...a,value:c,onChange:h})}},574(e,t,n){"use strict";function r(){}function i(e){return null==e?r:function(){return this.querySelector(e)}}n.d(t,{A:()=>i})},576(e,t,n){"use strict";n.d(t,{MX:()=>i,fX:()=>r,m$:()=>o,zP:()=>s});const r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),o=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0}},655(e,t,n){"use strict";n.d(t,{$g:()=>r,Ih:()=>s,ZV:()=>i});const r=(e="",t="",n=null,r="",i="",s="")=>window.accounting?window?.dokanFrontend?.currency||window?.dokanAdminDashboard?.currency?(t||(t=window?.dokanFrontend?.currency.symbol||window?.dokanAdminDashboard?.currency.symbol),n||(n=window?.dokanFrontend?.currency.precision||window?.dokanAdminDashboard?.currency.precision),r||(r=window?.dokanFrontend?.currency.thousand||window?.dokanAdminDashboard?.currency.thousand),i||(i=window?.dokanFrontend?.currency.decimal||window?.dokanAdminDashboard?.currency.decimal),s||(s=window?.dokanFrontend?.currency.format||window?.dokanAdminDashboard?.currency.format),window.accounting.formatMoney(e,t,n,r,i,s)):(console.warn("Dokan Currency Data Not Found"),e):(console.warn("Woocommerce Accounting Library Not Found"),e),i=e=>""===e?e:window.accounting?window?.dokanFrontend?.currency||window?.dokanAdminDashboard?.currency?window.accounting.formatNumber(e,window?.dokanFrontend?.currency.precision||window?.dokanAdminDashboard?.currency.precision,window?.dokanFrontend?.currency.thousand||window?.dokanAdminDashboard?.currency.thousand,window?.dokanFrontend?.currency.decimal||window?.dokanAdminDashboard?.currency.decimal):(console.warn("Dokan Currency Data Not Found"),e):(console.warn("Woocommerce Accounting Library Not Found"),e),s=e=>""===e?e:window.accounting.unformat(e,window?.dokanFrontend?.currency.decimal||window?.dokanAdminDashboard?.currency.decimal)},747(e,t,n){"use strict";function r(){return[]}function i(e){return null==e?r:function(){return this.querySelectorAll(e)}}n.d(t,{A:()=>i})},790(e){"use strict";e.exports=window.ReactJSXRuntime},856(e,t,n){"use strict";n.d(t,{QP:()=>K});const r=e=>{const t=l(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),i(n,t)||o(e)},getConflictingClassGroupIds:(e,t)=>{const i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},i=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?i(e.slice(1),r):void 0;if(s)return s;if(0===t.validators.length)return;const o=e.join("-");return t.validators.find(({validator:e})=>e(o))?.classGroupId},s=/^\[(.+)\]$/,o=e=>{if(s.test(e)){const t=s.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},l=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return d(Object.entries(e.classGroups),n).forEach(([e,n])=>{a(n,r,e,t)}),r},a=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?u(e)?void a(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,i])=>{a(i,c(t,e),n,r)});(""===e?t:c(t,e)).classGroupId=n})},c=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},u=e=>e.isThemeGetter,d=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,h=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(i(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},f=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,i=t[0],s=t.length,o=e=>{const n=[];let o,l=0,a=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===l){if(u===i&&(r||e.slice(c,c+s)===t)){n.push(e.slice(a,c)),a=c+s;continue}if("/"===u){o=c;continue}}"["===u?l++:"]"===u&&l--}const c=0===n.length?e:e.substring(a),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:o&&o>a?o-a:void 0}};return n?e=>n({className:e,parseClassName:o}):o},p=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},m=/\s+/;function g(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}const b=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=b(e[r]))&&(n&&(n+=" "),n+=t);return n};function y(e,...t){let n,i,s,o=function(a){const c=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:h(e.cacheSize),parseClassName:f(e),...r(e)}))(c),i=n.cache.get,s=n.cache.set,o=l,l(a)};function l(e){const t=i(e);if(t)return t;const r=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(m);let l="";for(let e=o.length-1;e>=0;e-=1){const t=o[e],{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let h=Boolean(d),f=r(h?u.substring(0,d):u);if(!f){if(!h){l=t+(l.length>0?" "+l:l);continue}if(f=r(u),!f){l=t+(l.length>0?" "+l:l);continue}h=!1}const m=p(a).join(":"),g=c?m+"!":m,b=g+f;if(s.includes(b))continue;s.push(b);const y=i(f,h);for(let e=0;e<y.length;++e){const t=y[e];s.push(g+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return s(e,r),r}return function(){return o(g.apply(null,arguments))}}const v=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},x=/^\[(?:([a-z-]+):)?(.+)\]$/i,w=/^\d+\/\d+$/,N=new Set(["px","full","screen"]),k=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,C=e=>L(e)||N.has(e)||w.test(e),T=e=>F(e,"length",H),L=e=>Boolean(e)&&!Number.isNaN(Number(e)),O=e=>F(e,"number",L),q=e=>Boolean(e)&&Number.isInteger(Number(e)),j=e=>e.endsWith("%")&&L(e.slice(0,-1)),R=e=>x.test(e),M=e=>k.test(e),D=new Set(["length","size","percentage"]),I=e=>F(e,D,V),P=e=>F(e,"position",V),B=new Set(["image","url"]),z=e=>F(e,B,G),$=e=>F(e,"",W),U=()=>!0,F=(e,t,n)=>{const r=x.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},H=e=>_.test(e)&&!A.test(e),V=()=>!1,W=e=>E.test(e),G=e=>S.test(e),K=y((Symbol.toStringTag,()=>{const e=v("colors"),t=v("spacing"),n=v("blur"),r=v("brightness"),i=v("borderColor"),s=v("borderRadius"),o=v("borderSpacing"),l=v("borderWidth"),a=v("contrast"),c=v("grayscale"),u=v("hueRotate"),d=v("invert"),h=v("gap"),f=v("gradientColorStops"),p=v("gradientColorStopPositions"),m=v("inset"),g=v("margin"),b=v("opacity"),y=v("padding"),x=v("saturate"),w=v("scale"),N=v("sepia"),k=v("skew"),_=v("space"),A=v("translate"),E=()=>["auto",R,t],S=()=>[R,t],D=()=>["",C,T],B=()=>["auto",L,R],F=()=>["","0",R],H=()=>[L,R];return{cacheSize:500,separator:":",theme:{colors:[U],spacing:[C,T],blur:["none","",M,R],brightness:H(),borderColor:[e],borderRadius:["none","","full",M,R],borderSpacing:S(),borderWidth:D(),contrast:H(),grayscale:F(),hueRotate:H(),invert:F(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[j,T],inset:E(),margin:E(),opacity:H(),padding:S(),saturate:H(),scale:H(),sepia:F(),skew:H(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",R]}],container:["container"],columns:[{columns:[M]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",R]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",q,R]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",R]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",q,R]}],"grid-cols":[{"grid-cols":[U]}],"col-start-end":[{col:["auto",{span:["full",q,R]},R]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[U]}],"row-start-end":[{row:["auto",{span:[q,R]},R]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",R]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",R]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",R,t]}],"min-w":[{"min-w":[R,t,"min","max","fit"]}],"max-w":[{"max-w":[R,t,"none","full","min","max","fit","prose",{screen:[M]},M]}],h:[{h:[R,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[R,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[R,t,"auto","min","max","fit"]}],"font-size":[{text:["base",M,T]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",O]}],"font-family":[{font:[U]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",R]}],"line-clamp":[{"line-clamp":["none",L,O]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",C,R]}],"list-image":[{"list-image":["none",R]}],"list-style-type":[{list:["none","disc","decimal",R]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",C,T]}],"underline-offset":[{"underline-offset":["auto",C,R]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",P]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},z]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[C,R]}],"outline-w":[{outline:[C,T]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[C,T]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",M,$]}],"shadow-color":[{shadow:[U]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",M,R]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",R]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",R]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",R]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[q,R]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",R]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[C,T,O]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}))},891(e,t,n){"use strict";var r=n(8227),i={value:()=>{}};function s(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new o(r)}function o(e){this._=e}function l(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function a(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=i,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}o.prototype=s.prototype={constructor:o,on:function(e,t){var n,r,i=this._,s=(r=i,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),o=-1,c=s.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<c;)if(n=(e=s[o]).type)i[n]=a(i[n],e.name,t);else if(null==t)for(n in i)i[n]=a(i[n],e.name,null);return this}for(;++o<c;)if((n=(e=s[o]).type)&&(n=l(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new o(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),s=0;s<n;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=0,n=(r=this._[e]).length;s<n;++s)r[s].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};const c=s;var u,d,h=0,f=0,p=0,m=0,g=0,b=0,y="object"==typeof performance&&performance.now?performance:Date,v="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function x(){return g||(v(w),g=y.now()+b)}function w(){g=0}function N(){this._call=this._time=this._next=null}function k(e,t,n){var r=new N;return r.restart(e,t,n),r}function _(){g=(m=y.now())+b,h=f=0;try{!function(){x(),++h;for(var e,t=u;t;)(e=g-t._time)>=0&&t._call.call(void 0,e),t=t._next;--h}()}finally{h=0,function(){for(var e,t,n=u,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:u=t);d=e,E(r)}(),g=0}}function A(){var e=y.now(),t=e-m;t>1e3&&(b-=t,m=e)}function E(e){h||(f&&(f=clearTimeout(f)),e-g>24?(e<1/0&&(f=setTimeout(_,e-y.now()-b)),p&&(p=clearInterval(p))):(p||(m=y.now(),p=setInterval(A,1e3)),h=1,v(_)))}function S(e,t,n){var r=new N;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}N.prototype=k.prototype={constructor:N,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?x():+n)+(null==t?0:+t),this._next||d===this||(d?d._next=this:u=this,d=this),this._call=e,this._time=n,E()},stop:function(){this._call&&(this._call=null,this._time=1/0,E())}};var C=c("start","end","cancel","interrupt"),T=[];function L(e,t,n,r,i,s){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function s(a){var c,u,d,h;if(1!==n.state)return l();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return S(s);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(S(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(a))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function o(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),s=-1,o=r.length;++s<o;)r[s].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=k(function(e){n.state=1,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:i,on:C,tween:T,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:0})}function O(e,t){var n=j(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function q(e,t){var n=j(e,t);if(n.state>3)throw new Error("too late; already running");return n}function j(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var R,M=n(8981),D=180/Math.PI,I={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function P(e,t,n,r,i,s){var o,l,a;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*D,skewX:Math.atan(a)*D,scaleX:o,scaleY:l}}function B(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(s,o){var l=[],a=[];return s=e(s),o=e(o),function(e,r,i,s,o,l){if(e!==i||r!==s){var a=o.push("translate(",null,t,null,n);l.push({i:a-4,x:(0,M.A)(e,i)},{i:a-2,x:(0,M.A)(r,s)})}else(i||s)&&o.push("translate("+i+t+s+n)}(s.translateX,s.translateY,o.translateX,o.translateY,l,a),function(e,t,n,s){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),s.push({i:n.push(i(n)+"rotate(",null,r)-2,x:(0,M.A)(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(s.rotate,o.rotate,l,a),function(e,t,n,s){e!==t?s.push({i:n.push(i(n)+"skewX(",null,r)-2,x:(0,M.A)(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(s.skewX,o.skewX,l,a),function(e,t,n,r,s,o){if(e!==n||t!==r){var l=s.push(i(s)+"scale(",null,",",null,")");o.push({i:l-4,x:(0,M.A)(e,n)},{i:l-2,x:(0,M.A)(t,r)})}else 1===n&&1===r||s.push(i(s)+"scale("+n+","+r+")")}(s.scaleX,s.scaleY,o.scaleX,o.scaleY,l,a),s=o=null,function(e){for(var t,n=-1,r=a.length;++n<r;)l[(t=a[n]).i]=t.x(e);return l.join("")}}}var z=B(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?I:P(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),$=B(function(e){return null==e?I:(R||(R=document.createElementNS("http://www.w3.org/2000/svg","g")),R.setAttribute("transform",e),(e=R.transform.baseVal.consolidate())?P((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):I)},", ",")",")"),U=n(7268);function F(e,t){var n,r;return function(){var i=q(this,e),s=i.tween;if(s!==n)for(var o=0,l=(r=n=s).length;o<l;++o)if(r[o].name===t){(r=r.slice()).splice(o,1);break}i.tween=r}}function H(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var s=q(this,e),o=s.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},a=0,c=i.length;a<c;++a)if(i[a].name===t){i[a]=l;break}a===c&&i.push(l)}s.tween=i}}function V(e,t,n){var r=e._id;return e.each(function(){var e=q(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return j(e,r).value[t]}}var W=n(5315),G=n(3377),K=n(7737);function Z(e,t){var n;return("number"==typeof t?M.A:t instanceof W.Ay?G.Ay:(n=(0,W.Ay)(t))?(t=n,G.Ay):K.A)(e,t)}function X(e){return function(){this.removeAttribute(e)}}function Y(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Q(e,t,n){var r,i,s=n+"";return function(){var o=this.getAttribute(e);return o===s?null:o===r?i:i=t(r=o,n)}}function J(e,t,n){var r,i,s=n+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===r?i:i=t(r=o,n)}}function ee(e,t,n){var r,i,s;return function(){var o,l,a=n(this);if(null!=a)return(o=this.getAttribute(e))===(l=a+"")?null:o===r&&l===i?s:(i=l,s=t(r=o,a));this.removeAttribute(e)}}function te(e,t,n){var r,i,s;return function(){var o,l,a=n(this);if(null!=a)return(o=this.getAttributeNS(e.space,e.local))===(l=a+"")?null:o===r&&l===i?s:(i=l,s=t(r=o,a));this.removeAttributeNS(e.space,e.local)}}function ne(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function re(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function ie(e,t){return function(){O(this,e).delay=+t.apply(this,arguments)}}function se(e,t){return t=+t,function(){O(this,e).delay=t}}function oe(e,t){return function(){q(this,e).duration=+t.apply(this,arguments)}}function le(e,t){return t=+t,function(){q(this,e).duration=t}}var ae=n(6541),ce=n(574),ue=n(747),de=r.Ay.prototype.constructor,he=n(3683);function fe(e){return function(){this.style.removeProperty(e)}}var pe=0;function me(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ge(){return++pe}var be=r.Ay.prototype;me.prototype=function(e){return(0,r.Ay)().transition(e)}.prototype={constructor:me,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=(0,ce.A)(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var l,a,c=r[o],u=c.length,d=s[o]=new Array(u),h=0;h<u;++h)(l=c[h])&&(a=e.call(l,l.__data__,h,c))&&("__data__"in l&&(a.__data__=l.__data__),d[h]=a,L(d[h],t,n,h,d,j(l,n)));return new me(s,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=(0,ue.A)(e));for(var r=this._groups,i=r.length,s=[],o=[],l=0;l<i;++l)for(var a,c=r[l],u=c.length,d=0;d<u;++d)if(a=c[d]){for(var h,f=e.call(a,a.__data__,d,c),p=j(a,n),m=0,g=f.length;m<g;++m)(h=f[m])&&L(h,t,n,m,f,p);s.push(f),o.push(a)}return new me(s,o,t,n)},selectChild:be.selectChild,selectChildren:be.selectChildren,filter:function(e){"function"!=typeof e&&(e=(0,ae.A)(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s,o=t[i],l=o.length,a=r[i]=[],c=0;c<l;++c)(s=o[c])&&e.call(s,s.__data__,c,o)&&a.push(s);return new me(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),o=new Array(r),l=0;l<s;++l)for(var a,c=t[l],u=n[l],d=c.length,h=o[l]=new Array(d),f=0;f<d;++f)(a=c[f]||u[f])&&(h[f]=a);for(;l<r;++l)o[l]=t[l];return new me(o,this._parents,this._name,this._id)},selection:function(){return new de(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=ge(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o,l=r[s],a=l.length,c=0;c<a;++c)if(o=l[c]){var u=j(o,t);L(o,e,n,c,l,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new me(r,this._parents,e,n)},call:be.call,nodes:be.nodes,node:be.node,size:be.size,empty:be.empty,each:be.each,on:function(e,t){var n=this._id;return arguments.length<2?j(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,s=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?O:q;return function(){var o=s(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}(n,e,t))},attr:function(e,t){var n=(0,U.A)(e),r="transform"===n?$:Z;return this.attrTween(e,"function"==typeof t?(n.local?te:ee)(n,r,V(this,"attr."+e,t)):null==t?(n.local?Y:X)(n):(n.local?J:Q)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=(0,U.A)(e);return this.tween(n,(r.local?ne:re)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?z:Z;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var s=(0,he.j)(this,e),o=(this.style.removeProperty(e),(0,he.j)(this,e));return s===o?null:s===n&&o===r?i:i=t(n=s,r=o)}}(e,r)).on("end.style."+e,fe(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,s;return function(){var o=(0,he.j)(this,e),l=n(this),a=l+"";return null==l&&(this.style.removeProperty(e),a=l=(0,he.j)(this,e)),o===a?null:o===r&&a===i?s:(i=a,s=t(r=o,l))}}(e,r,V(this,"style."+e,t))).each(function(e,t){var n,r,i,s,o="style."+t,l="end."+o;return function(){var a=q(this,e),c=a.on,u=null==a.value[o]?s||(s=fe(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(l,i=u),a.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,s=n+"";return function(){var o=(0,he.j)(this,e);return o===s?null:o===r?i:i=t(r=o,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function s(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,s,n)),r}return s._value=t,s}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(V(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=j(this.node(),n).tween,s=0,o=i.length;s<o;++s)if((r=i[s]).name===e)return r.value;return null}return this.each((null==t?F:H)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ie:se)(t,e)):j(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?oe:le)(t,e)):j(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){q(this,e).ease=t}}(t,e)):j(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;q(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var l={value:o},a={value:function(){0===--i&&s()}};n.each(function(){var n=q(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),n.on=t}),0===i&&s()})},[Symbol.iterator]:be[Symbol.iterator]};var ye={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function ve(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}r.Ay.prototype.interrupt=function(e){return this.each(function(){!function(e,t){var n,r,i,s=e.__transition,o=!0;if(s){for(i in t=null==t?null:t+"",s)(n=s[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete s[i]):o=!1;o&&delete e.__transition}}(this,e)})},r.Ay.prototype.transition=function(e){var t,n;e instanceof me?(t=e._id,e=e._name):(t=ge(),(n=ye).time=x(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o,l=r[s],a=l.length,c=0;c<a;++c)(o=l[c])&&L(o,e,t,c,l,n||ve(o,t));return new me(r,this._parents,e,t)};const{abs:xe,max:we,min:Ne}=Math;function ke(e){return{type:e}}function _e(e,t,n){this.k=e,this.x=t,this.y=n}["w","e"].map(ke),["n","s"].map(ke),["n","w","e","s","nw","ne","sw","se"].map(ke),_e.prototype={constructor:_e,scale:function(e){return 1===e?this:new _e(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new _e(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new _e(1,0,0),_e.prototype},1455(e){"use strict";e.exports=window.wp.apiFetch},1609(e){"use strict";e.exports=window.React},1635(e,t,n){"use strict";n.d(t,{Cl:()=>r});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},1674(e,t,n){"use strict";n(7723)},2106(e,t,n){"use strict";var r=n(6087),i=n(8443),s=n(7723),o=n(790);function l({date:e,defaultDate:t="-"}){return e?(0,o.jsx)(r.RawHTML,{children:(0,s.sprintf)((0,s.__)("%1$s at %2$s","dokan-lite"),(0,i.dateI18n)((0,i.getSettings)().formats.date,e,(0,i.getSettings)().timezone.string),(0,i.dateI18n)((0,i.getSettings)().formats.time,e,(0,i.getSettings)().timezone.string))}):t}l.Date=({date:e,defaultDate:t="-"})=>e?(0,o.jsx)(r.RawHTML,{children:(0,i.dateI18n)((0,i.getSettings)().formats.date,e,(0,i.getSettings)().timezone.string)}):t,l.Time=({time:e,defaultTime:t="-"})=>e?(0,o.jsx)(r.RawHTML,{children:(0,i.dateI18n)((0,i.getSettings)().formats.time,e,(0,i.getSettings)().timezone.string)}):t},2619(e){"use strict";e.exports=window.wp.hooks},2660(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const r=n(5606),i=n(7193),s=n(8142),o=n(9106);t.AttributeMap=o.default;const l=n(5759);t.Op=l.default;const a=n(8317);t.OpIterator=a.default;const c=String.fromCharCode(0),u=(e,t)=>{if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);const n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]};class d{constructor(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){const t=this.handlers[e];if(!t)throw new Error(`no handlers for embed type "${e}"`);return t}insert(e,t){const n={};return"string"==typeof e&&0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if("number"==typeof e&&e<=0)return this;const n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=i(e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!=typeof n))return this.ops.unshift(e),this;if(s(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){const e=this.ops[this.ops.length-1];return e&&"number"==typeof e.retain&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){const t=[],n=[];return this.forEach(r=>{(e(r)?t:n).push(r)}),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce((e,t)=>t.insert?e+l.default.length(t):t.delete?e-t.delete:e,0)}length(){return this.reduce((e,t)=>e+l.default.length(t),0)}slice(e=0,t=1/0){const n=[],r=new a.default(this.ops);let i=0;for(;i<t&&r.hasNext();){let s;i<e?s=r.next(e-i):(s=r.next(t-i),n.push(s)),i+=l.default.length(s)}return new d(n)}compose(e){const t=new a.default(this.ops),n=new a.default(e.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){let e=i.retain;for(;"insert"===t.peekType()&&t.peekLength()<=e;)e-=t.peekLength(),r.push(t.next());i.retain-e>0&&n.next(i.retain-e)}const l=new d(r);for(;t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{const e=Math.min(t.peekLength(),n.peekLength()),r=t.next(e),i=n.next(e);if(i.retain){const a={};if("number"==typeof r.retain)a.retain="number"==typeof i.retain?e:i.retain;else if("number"==typeof i.retain)null==r.retain?a.insert=r.insert:a.retain=r.retain;else{const e=null==r.retain?"insert":"retain",[t,n,s]=u(r[e],i.retain),o=d.getHandler(t);a[e]={[t]:o.compose(n,s,"retain"===e)}}const c=o.default.compose(r.attributes,i.attributes,"number"==typeof r.retain);if(c&&(a.attributes=c),l.push(a),!n.hasNext()&&s(l.ops[l.ops.length-1],a)){const e=new d(t.rest());return l.concat(e).chop()}}else"number"==typeof i.delete&&("number"==typeof r.retain||"object"==typeof r.retain&&null!==r.retain)&&l.push(i)}return l.chop()}concat(e){const t=new d(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t}diff(e,t){if(this.ops===e.ops)return new d;const n=[this,e].map(t=>t.map(n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:c;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")),i=new d,l=r(n[0],n[1],t,!0),u=new a.default(this.ops),h=new a.default(e.ops);return l.forEach(e=>{let t=e[1].length;for(;t>0;){let n=0;switch(e[0]){case r.INSERT:n=Math.min(h.peekLength(),t),i.push(h.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),h.peekLength(),t);const e=u.next(n),l=h.next(n);s(e.insert,l.insert)?i.retain(n,o.default.diff(e.attributes,l.attributes)):i.push(l).delete(n)}t-=n}}),i.chop()}eachLine(e,t="\n"){const n=new a.default(this.ops);let r=new d,i=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const s=n.peek(),o=l.default.length(s)-n.peekLength(),a="string"==typeof s.insert?s.insert.indexOf(t,o)-o:-1;if(a<0)r.push(n.next());else if(a>0)r.push(n.next(a));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new d}}r.length()>0&&e(r,{},i)}invert(e){const t=new d;return this.reduce((n,r)=>{if(r.insert)t.delete(l.default.length(r));else{if("number"==typeof r.retain&&null==r.attributes)return t.retain(r.retain),n+r.retain;if(r.delete||"number"==typeof r.retain){const i=r.delete||r.retain;return e.slice(n,n+i).forEach(e=>{r.delete?t.push(e):r.retain&&r.attributes&&t.retain(l.default.length(e),o.default.invert(r.attributes,e.attributes))}),n+i}if("object"==typeof r.retain&&null!==r.retain){const i=e.slice(n,n+1),s=new a.default(i.ops).next(),[l,c,h]=u(r.retain,s.insert),f=d.getHandler(l);return t.retain({[l]:f.invert(c,h)},o.default.invert(r.attributes,s.attributes)),n+1}}return n},0),t.chop()}transform(e,t=!1){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);const n=e,r=new a.default(this.ops),i=new a.default(n.ops),s=new d;for(;r.hasNext()||i.hasNext();)if("insert"!==r.peekType()||!t&&"insert"===i.peekType())if("insert"===i.peekType())s.push(i.next());else{const e=Math.min(r.peekLength(),i.peekLength()),n=r.next(e),l=i.next(e);if(n.delete)continue;if(l.delete)s.push(l);else{const r=n.retain,i=l.retain;let a="object"==typeof i&&null!==i?i:e;if("object"==typeof r&&null!==r&&"object"==typeof i&&null!==i){const e=Object.keys(r)[0];if(e===Object.keys(i)[0]){const n=d.getHandler(e);n&&(a={[e]:n.transform(r[e],i[e],t)})}}s.retain(a,o.default.transform(n.attributes,l.attributes,t))}}else s.retain(l.default.length(r.next()));return s.chop()}transformPosition(e,t=!1){t=!!t;const n=new a.default(this.ops);let r=0;for(;n.hasNext()&&r<=e;){const i=n.peekLength(),s=n.peekType();n.next(),"delete"!==s?("insert"===s&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e}}d.Op=l.default,d.OpIterator=a.default,d.AttributeMap=o.default,d.handlers={},t.default=d,e.exports=d,e.exports.default=d},2816(e){"use strict";e.exports=window.dokan.reactHooks},2847(e,t,n){"use strict";n.d(t,{p:()=>se});const{entries:r,setPrototypeOf:i,isFrozen:s,getPrototypeOf:o,getOwnPropertyDescriptor:l}=Object;let{freeze:a,seal:c,create:u}=Object,{apply:d,construct:h}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),h||(h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const f=C(Array.prototype.forEach),p=C(Array.prototype.lastIndexOf),m=C(Array.prototype.pop),g=C(Array.prototype.push),b=C(Array.prototype.splice),y=C(String.prototype.toLowerCase),v=C(String.prototype.toString),x=C(String.prototype.match),w=C(String.prototype.replace),N=C(String.prototype.indexOf),k=C(String.prototype.trim),_=C(Object.prototype.hasOwnProperty),A=C(RegExp.prototype.test),E=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(S,t)});var S;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return d(e,t,r)}}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;i&&i(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(s(t)||(t[r]=e),i=e)}e[i]=!0}return e}function L(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function O(e){const t=u(null);for(const[n,i]of r(e))_(e,n)&&(Array.isArray(i)?t[n]=L(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=O(i):t[n]=i);return t}function q(e,t){for(;null!==e;){const n=l(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=o(e)}return function(){return null}}const j=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=a(["#text"]),z=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$=a(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=c(/<%[\w\W]*|[\w\W]*%>/gm),W=c(/\$\{[\w\W]*/gm),G=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=c(/^aria-[\-\w]+$/),Z=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Y=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:J,DATA_ATTR:G,DOCTYPE_NAME:Q,ERB_EXPR:V,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:H,TMPLIT_EXPR:W});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const s=i,o=s.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:d,Element:h,NodeFilter:S,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:L,DOMParser:H,trustedTypes:V}=t,W=h.prototype,G=q(W,"cloneNode"),K=q(W,"remove"),X=q(W,"nextSibling"),Y=q(W,"childNodes"),J=q(W,"parentNode");if("function"==typeof c){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ne,re="";const{implementation:ie,createNodeIterator:se,createDocumentFragment:oe,getElementsByTagName:le}=i,{importNode:ae}=s;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&ie&&void 0!==ie.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:fe,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ye}=ee,ve=null;const xe=T({},[...j,...R,...M,...I,...B]);let we=null;const Ne=T({},[...z,...$,...U,...F]);let ke=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,Ae=null;const Ee=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Se=!0,Ce=!0,Te=!1,Le=!0,Oe=!1,qe=!0,je=!1,Re=!1,Me=!1,De=!1,Ie=!1,Pe=!1,Be=!0,ze=!1,$e=!0,Ue=!1,Fe={},He=null;const Ve=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=T({},["audio","video","img","source","image","track"]);let Ke=null;const Ze=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Je=Qe,et=!1,tt=null;const nt=T({},[Xe,Ye,Qe],v);let rt=T({},["mi","mo","mn","ms","mtext"]),it=T({},["annotation-xml"]);const st=T({},["title","style","font","a","script"]);let ot=null;const lt=["application/xhtml+xml","text/html"];let at=null,ct=null;const ut=i.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=O(e),ot=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,at="application/xhtml+xml"===ot?v:y,ve=_(e,"ALLOWED_TAGS")?T({},e.ALLOWED_TAGS,at):xe,we=_(e,"ALLOWED_ATTR")?T({},e.ALLOWED_ATTR,at):Ne,tt=_(e,"ALLOWED_NAMESPACES")?T({},e.ALLOWED_NAMESPACES,v):nt,Ke=_(e,"ADD_URI_SAFE_ATTR")?T(O(Ze),e.ADD_URI_SAFE_ATTR,at):Ze,We=_(e,"ADD_DATA_URI_TAGS")?T(O(Ge),e.ADD_DATA_URI_TAGS,at):Ge,He=_(e,"FORBID_CONTENTS")?T({},e.FORBID_CONTENTS,at):Ve,_e=_(e,"FORBID_TAGS")?T({},e.FORBID_TAGS,at):O({}),Ae=_(e,"FORBID_ATTR")?T({},e.FORBID_ATTR,at):O({}),Fe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,qe=!1!==e.SAFE_FOR_XML,je=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,ze=e.SANITIZE_NAMED_PROPS||!1,$e=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||Z,Je=e.NAMESPACE||Qe,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,it=e.HTML_INTEGRATION_POINTS||it,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Ce=!1),Ie&&(De=!0),Fe&&(ve=T({},B),we=[],!0===Fe.html&&(T(ve,j),T(we,z)),!0===Fe.svg&&(T(ve,R),T(we,$),T(we,F)),!0===Fe.svgFilters&&(T(ve,M),T(we,$),T(we,F)),!0===Fe.mathMl&&(T(ve,I),T(we,U),T(we,F))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ee.tagCheck=e.ADD_TAGS:(ve===xe&&(ve=O(ve)),T(ve,e.ADD_TAGS,at))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ee.attributeCheck=e.ADD_ATTR:(we===Ne&&(we=O(we)),T(we,e.ADD_ATTR,at))),e.ADD_URI_SAFE_ATTR&&T(Ke,e.ADD_URI_SAFE_ATTR,at),e.FORBID_CONTENTS&&(He===Ve&&(He=O(He)),T(He,e.FORBID_CONTENTS,at)),e.ADD_FORBID_CONTENTS&&(He===Ve&&(He=O(He)),T(He,e.ADD_FORBID_CONTENTS,at)),$e&&(ve["#text"]=!0),je&&T(ve,["html","head","body"]),ve.table&&(T(ve,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(V,o)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));a&&a(e),ct=e}},ft=T({},[...R,...M,...D]),pt=T({},[...I,...P]),mt=function(e){g(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){K(e)}},gt=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(De||Ie)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ot&&Je===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Qe)try{t=(new H).parseFromString(r,ot)}catch(e){}if(!t||!t.documentElement){t=ie.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?re:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),Je===Qe?le.call(t,je?"html":"body")[0]:je?t.documentElement:s},yt=function(e){return se.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)},vt=function(e){return e instanceof L&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof C)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function wt(e,t,r){f(e,e=>{e.call(n,t,r,ct)})}const Nt=function(e){let t=null;if(wt(ce.beforeSanitizeElements,e,null),vt(e))return mt(e),!0;const r=at(e.nodeName);if(wt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ve}),qe&&e.hasChildNodes()&&!xt(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(qe&&8===e.nodeType&&A(/<[/\w]/g,e.data))return mt(e),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(r))&&(!ve[r]||_e[r])){if(!_e[r]&&_t(r)){if(ke.tagNameCheck instanceof RegExp&&A(ke.tagNameCheck,r))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(r))return!1}if($e&&!He[r]){const t=J(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const i=G(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,X(e))}}return mt(e),!0}return e instanceof h&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=y(e.tagName),r=y(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Xe?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Ye?"math"===n&&it[r]:Boolean(pt[n]):e.namespaceURI===Qe?!(t.namespaceURI===Ye&&!it[r])&&!(t.namespaceURI===Xe&&!rt[r])&&!pt[n]&&(st[n]||!ft[n]):!("application/xhtml+xml"!==ot||!tt[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,f([ue,de,he],e=>{t=w(t,e," ")}),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ce.afterSanitizeElements,e,null),!1):(mt(e),!0)},kt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in i||n in ut))return!1;if(Ce&&!Ae[t]&&A(fe,t));else if(Se&&A(pe,t));else if(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(t,e));else if(!we[t]||Ae[t]){if(!(_t(e)&&(ke.tagNameCheck instanceof RegExp&&A(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&A(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t,e))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&A(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ke[t]);else if(A(ye,w(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==N(n,"data:")||!We[e])if(Te&&!A(me,w(n,ge,"")));else if(n)return!1;return!0},_t=function(e){return"annotation-xml"!==e&&x(e,be)},At=function(e){wt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||vt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let i=t.length;for(;i--;){const s=t[i],{name:o,namespaceURI:l,value:a}=s,c=at(o),u=a;let d="value"===o?u:k(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ce.uponSanitizeAttribute,e,r),d=r.attrValue,!ze||"id"!==c&&"name"!==c||(gt(o,e),d="user-content-"+d),qe&&A(/((--!?|])>)|<\/(style|title|textarea)/i,d)){gt(o,e);continue}if("attributename"===c&&x(d,"href")){gt(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){gt(o,e);continue}if(!Le&&A(/\/>/i,d)){gt(o,e);continue}Oe&&f([ue,de,he],e=>{d=w(d,e," ")});const h=at(e.nodeName);if(kt(h,c,d)){if(ne&&"object"==typeof V&&"function"==typeof V.getAttributeType)if(l);else switch(V.getAttributeType(h,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{l?e.setAttributeNS(l,o,d):e.setAttribute(o,d),vt(e)?mt(e):m(n.removed)}catch(t){gt(o,e)}}else gt(o,e)}wt(ce.afterSanitizeAttributes,e,null)},Et=function e(t){let n=null;const r=yt(t);for(wt(ce.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ce.uponSanitizeShadowNode,n,null),Nt(n),At(n),n.content instanceof l&&e(n.content);wt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,o=null,a=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Re||ht(t),n.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=at(e.nodeName);if(!ve[t]||_e[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)r=bt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!De&&!Oe&&!je&&-1===e.indexOf("<"))return ne&&Pe?ne.createHTML(e):e;if(r=bt(e),!r)return De?null:Pe?re:""}r&&Me&&mt(r.firstChild);const c=yt(Ue?e:r);for(;o=c.nextNode();)Nt(o),At(o),o.content instanceof l&&Et(o.content);if(Ue)return e;if(De){if(Ie)for(a=oe.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(we.shadowroot||we.shadowrootmode)&&(a=ae.call(s,a,!0)),a}let u=je?r.outerHTML:r.innerHTML;return je&&ve["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&A(Q,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Oe&&f([ue,de,he],e=>{u=w(u,e," ")}),ne&&Pe?ne.createHTML(u):u},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Re=!0},n.clearConfig=function(){ct=null,Re=!1},n.isValidAttribute=function(e,t,n){ct||ht({});const r=at(e),i=at(t);return kt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&g(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=p(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return m(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const re=["a","b","em","i","strong","p","br","h1","h2","h3","h4","h5","h6","img","video","ul","li","ol","u","blockquote","span"],ie=["target","href","rel","name","download","class","style","src","alt"],se=(e,t)=>{const n=t?.tags||re,r=t?.attr||ie;return ne.sanitize(e,{ALLOWED_TAGS:n,ALLOWED_ATTR:r})}},2956(e,t,n){"use strict";n.d(t,{formatNumber:()=>i.ZV,formatPrice:()=>i.$g,kebabCase:()=>r.kW,sanitizeHTML:()=>o.p,unformatNumber:()=>i.Ih});var r=n(7710),i=n(655),s=n(7374);n.o(s,"sanitizeHTML")&&n.d(t,{sanitizeHTML:function(){return s.sanitizeHTML}});var o=n(2847);n(3958),n(1674)},3072(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case s:case l:case o:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case a:return e;default:return t}}case i:return t}}}function N(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=a,t.Element=r,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=l,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return N(e)||w(e)===u},t.isConcurrentMode=N,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===d||e===l||e===o||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===a||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===v||e.$$typeof===x||e.$$typeof===b)},t.typeOf=w},3078(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(8446),i=n(790);const s=({children:e,...t})=>(0,i.jsx)(r.Tooltip,{...t,contentClass:"dokan-layout",content:(0,i.jsx)("div",{className:"z-50 select-none rounded-[5px] max-w-[285px] bg-black px-3.5 py-1.5 text-xs text-white break-words",children:t?.content||e}),children:e})},3116(e,t,n){"use strict";n.d(t,{A:()=>r});const r=e=>()=>e},3377(e,t,n){"use strict";n.d(t,{Ay:()=>l});var r=n(5315);function i(e,t,n,r,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*n+(1+3*e+3*s-3*o)*r+o*i)/6}var s=n(3116);function o(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):(0,s.A)(isNaN(e)?t:e)}const l=function e(t){var n=function(e){return 1===(e=+e)?o:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):(0,s.A)(isNaN(t)?n:t)}}(t);function i(e,t){var i=n((e=(0,r.Qh)(e)).r,(t=(0,r.Qh)(t)).r),s=n(e.g,t.g),l=n(e.b,t.b),a=o(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=s(t),e.b=l(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function a(e){return function(t){var n,i,s=t.length,o=new Array(s),l=new Array(s),a=new Array(s);for(n=0;n<s;++n)i=(0,r.Qh)(t[n]),o[n]=i.r||0,l[n]=i.g||0,a[n]=i.b||0;return o=e(o),l=e(l),a=e(a),i.opacity=1,function(e){return i.r=o(e),i.g=l(e),i.b=a(e),i+""}}}a(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),s=e[r],o=e[r+1],l=r>0?e[r-1]:2*s-o,a=r<t-1?e[r+2]:2*o-s;return i((n-r/t)*t,l,s,o,a)}}),a(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),s=e[(r+t-1)%t],o=e[r%t],l=e[(r+1)%t],a=e[(r+2)%t];return i((n-r/t)*t,s,o,l,a)}})},3404(e,t,n){"use strict";e.exports=n(3072)},3552(e,t,n){"use strict";n.d(t,{A:()=>r});var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},3683(e,t,n){"use strict";n.d(t,{A:()=>l,j:()=>a});var r=n(6747);function i(e){return function(){this.style.removeProperty(e)}}function s(e,t,n){return function(){this.style.setProperty(e,t,n)}}function o(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function l(e,t,n){return arguments.length>1?this.each((null==t?i:"function"==typeof t?o:s)(e,t,null==n?"":n)):a(this.node(),e)}function a(e,t){return e.style.getPropertyValue(t)||(0,r.A)(e).getComputedStyle(e,null).getPropertyValue(t)}},3832(e){"use strict";e.exports=window.wp.url},3958(){"use strict";window.wc.csvExport},4146(e,t,n){"use strict";var r=n(3404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function a(e){return r.isMemo(e)?o:l[e.$$typeof]||i}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var l=a(t),m=a(n),g=0;g<o.length;++g){var b=o[g];if(!(s[b]||r&&r[b]||m&&m[b]||l&&l[b])){var y=h(n,b);try{c(t,b,y)}catch(e){}}}}return t}},4460(e,t,n){"use strict";n(6087),n(7723),n(4960),n(6427),n(8446),n(8443),window.wc.components,n(9491),n(790)},4960(e,t,n){"use strict";n.d(t,{AsyncSelect:()=>se,DateTimePicker:()=>le,DokanButton:()=>h.A,DokanModal:()=>m,DokanPriceInput:()=>ce,DokanTooltip:()=>ae.A,MediaUploader:()=>Vr,RichText:()=>Fr,Select:()=>Hr});var r={};n.r(r),n.d(r,{Attributor:()=>he,AttributorStore:()=>xe,BlockBlot:()=>qe,ClassAttributor:()=>be,ContainerBlot:()=>Re,EmbedBlot:()=>Me,InlineBlot:()=>Le,LeafBlot:()=>_e,ParentBlot:()=>Ce,Registry:()=>me,Scope:()=>de,ScrollBlot:()=>Pe,StyleAttributor:()=>ve,TextBlot:()=>ze});var i=n(6427),s=(n(2816),n(8395)),o=n(6087),l=n(7723),a=n(790);n(1674),n(7512);var c=n(2956),u=n(9491);const d=({className:e=""})=>(0,a.jsx)("svg",{className:`w-4 h-4 fill-red-500 stroke-red-500 ${e}`,children:(0,a.jsx)("path",{d:"M2.674 3.323zm.628.284v.005-.005zm0 .005h0zm1.31 1.486h0c-.14.215-.236.49-.182.766a.71.71 0 0 0 .24.411c.139.116.304.162.461.162h.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001.001 0 0 .001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0c.345 0 .631.283.631.64s-.286.64-.631.64H1.67c-.345 0-.631-.283-.631-.64V3.171c0-.357.286-.64.631-.64s.631.283.631.64v.439c0 .087.009.262.121.419a.56.56 0 0 0 .298.212c.126.037.24.023.321 0 .147-.042.256-.131.319-.19a1.8 1.8 0 0 0 .209-.235c1.298-1.714 3.337-2.761 5.524-2.761h0c3.826 0 6.946 3.137 6.946 7s-3.12 7-6.945 7h0c-.434 0-.793-.356-.793-.803s.359-.803.793-.803c2.959 0 5.36-2.423 5.36-5.395s-2.4-5.395-5.36-5.395c-1.821 0-3.502.938-4.482 2.439z"})});var h=n(6650),f=n(856),p=n(8697);const m=e=>{const{isOpen:t,onClose:n,className:r,modalClassName:s,modalBodyClassName:m,modalFooterClassName:g,onConfirm:b,namespace:y,dialogTitle:v,cancelButtonText:x,confirmButtonText:w,confirmationTitle:N,confirmationDescription:k,cancelIcon:_,dialogIcon:A,dialogHeader:E,dialogFooter:S,dialogFooterContent:C,dialogContent:T,loading:L=!1,confirmButtonVariant:O="primary",hideCancelButton:q=!1,confirmButtonDisabled:j=!1,isDismissible:R=!0,shouldCloseOnClickOutside:M=!0,shouldCloseOnEsc:D=!0}=e;if(!y)throw new Error("Namespace is required for the Confirmation Modal component");const I=c.kebabCase?(0,c.kebabCase)(y||""):y,[P,B]=(0,o.useState)(!1),z=(0,o.useCallback)((0,u.debounce)(async()=>{B(!0);try{await b(),n()}catch(e){console.error("Confirmation action failed:",e)}finally{B(!1)}},300),[b,n]);return t?(0,a.jsx)(i.Modal,{...e,onRequestClose:n,className:(0,f.QP)("dokan-custom-modal dokan-layout bg-transparent shadow-none",s),isDismissible:R,shouldCloseOnClickOutside:M,shouldCloseOnEsc:D,__experimentalHideHeader:!0,children:(0,a.jsxs)("div",{className:(0,f.QP)("relative text-left bg-white w-full max-w-xl rounded-lg transition-all transform shadow-xl",r),children:[!1===R?null:_||(0,a.jsx)("button",{onClick:n,className:"absolute top-4 right-4 p-1 rounded-full text-gray-400 hover:text-red-600 hover:bg-red-50 hover:border hover:border-red-600 transition-all duration-200 z-10","aria-label":"Close",children:(0,a.jsx)(p.A,{className:"w-5 h-5"})}),!1===E?null:E||(0,a.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200",children:[(0,a.jsx)(i.Slot,{name:`dokan-before-dialog-header-${I}`,fillProps:{namespace:y}}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900 leading-6 pr-8",children:v||(0,l.__)("Confirmation Dialog","dokan-lite")}),(0,a.jsx)(i.Slot,{name:`dokan-after-dialog-header-${I}`,fillProps:{namespace:y}})]}),(0,a.jsxs)("div",{className:(0,f.QP)("px-6 py-5",m),children:[(0,a.jsx)(i.Slot,{name:`dokan-before-${I}-dialog-content`,fillProps:{namespace:y}}),T||(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[A||(0,a.jsx)("div",{className:"flex items-center justify-center shrink-0 w-12 h-12 bg-red-50 rounded-full",children:(0,a.jsx)(d,{})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",dangerouslySetInnerHTML:{__html:N||(0,l.__)("Delete Confirmation","dokan-lite")}}),(0,a.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed",dangerouslySetInnerHTML:{__html:k||(0,l.sprintf)((0,l.__)("Are you sure you want to proceed with this %1$sdeletion%2$s?","dokan-lite"),"<strong>","</strong>")}})]})]}),(0,a.jsx)(i.Slot,{name:`dokan-after-${I}-dialog-content`,fillProps:{namespace:y}})]}),!1===S?null:S||(0,a.jsx)("div",{className:(0,f.QP)("px-6 py-4 border-t border-gray-200 flex items-center justify-end gap-3",g),children:C||(0,a.jsxs)(a.Fragment,{children:[q||(0,a.jsx)(h.A,{onClick:n,variant:"secondary",disabled:P||L,children:x||(0,l.__)("Cancel","dokan-lite")}),(0,a.jsx)(h.A,{onClick:z,variant:O,loading:P||L,disabled:P||L||j,children:w||(0,l.__)("Yes, Delete","dokan-lite")})]})})]})}):null};n(1609);n(5795);"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;function g(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function b(e){return"nodeType"in e}function y(e){var t,n;return e?g(e)?e:b(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function v(e){const{Document:t}=y(e);return e instanceof t}function x(e){return!g(e)&&e instanceof y(e).HTMLElement}function w(e){return e instanceof y(e).SVGElement}function N(e){return e?g(e)?e.document:b(e)?v(e)?e:x(e)||w(e)?e.ownerDocument:document:document:document}function k(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const _=k(-1);function A(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=y(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}var E;!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(E||(E={}));const S=Object.freeze({x:0,y:0});var C,T,L,O;!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(C||(C={}));class q{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function j(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function R(e){e.preventDefault()}function M(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(T||(T={})),(O=L||(L={})).Space="Space",O.Down="ArrowDown",O.Right="ArrowRight",O.Left="ArrowLeft",O.Up="ArrowUp",O.Esc="Escape",O.Enter="Enter",O.Tab="Tab";L.Space,L.Enter,L.Esc,L.Space,L.Enter,L.Tab;function D(e){return Boolean(e&&"distance"in e)}function I(e){return Boolean(e&&"delay"in e)}class P{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=y(e);return e instanceof t?e:N(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=N(s),this.documentListeners=new q(this.document),this.listeners=new q(n),this.windowListeners=new q(y(s)),this.initialCoordinates=null!=(r=A(i))?r:S,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(T.Resize,this.handleCancel),this.windowListeners.add(T.DragStart,R),this.windowListeners.add(T.VisibilityChange,this.handleCancel),this.windowListeners.add(T.ContextMenu,R),this.documentListeners.add(T.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(I(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(D(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(T.Click,M,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(T.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:o}}=i;if(!r)return;const l=null!=(t=A(e))?t:S,a=_(r,l);if(!n&&o){if(D(o)){if(null!=o.tolerance&&j(a,o.tolerance))return this.handleCancel();if(j(a,o.distance))return this.handleStart()}return I(o)&&j(a,o.tolerance)?this.handleCancel():void this.handlePending(o,a)}e.cancelable&&e.preventDefault(),s(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===L.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const B={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};(class extends P{constructor(e){const{event:t}=e,n=N(t.target);super(e,B,n)}}).activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const z={move:{name:"mousemove"},end:{name:"mouseup"}};var $;!function(e){e[e.RightClick=2]="RightClick"}($||($={})),class extends P{constructor(e){super(e,z,N(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==$.RightClick&&(null==r||r({event:n}),!0)}}];const U={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var F,H,V,W,G;(class extends P{constructor(e){super(e,U)}static setup(){return window.addEventListener(U.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(U.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(F||(F={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(H||(H={})),C.Backward,C.Forward,C.Backward,C.Forward,function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(V||(V={})),function(e){e.Optimized="optimized"}(W||(W={})),V.WhileDragging,W.Optimized,Map,function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(G||(G={})),L.Down,L.Right,L.Up,L.Left,n(9284),n(8448);var K=n(2619),Z=n(8446);const X=e=>{const{components:t}=Z.ReactSelect,{selectProps:n,hasValue:r}=e;if(!Boolean(n?.isMulti))return(0,a.jsx)(t.ValueContainer,{...e});const i=(n?.value||[]).map(e=>{var t;return null!==(t=e?.label)&&void 0!==t?t:""}),s=n?.selectedTitle,o=i.join(", ");return(0,a.jsxs)(t.ValueContainer,{...e,children:[r?(0,a.jsxs)("div",{className:"break-all text-[14px] leading-[22px] text-gray-700",children:[s?(0,a.jsx)("span",{className:"font-normal",children:`${String(s)}: `}):null,(0,a.jsx)("span",{className:"align-middle",title:o,children:o})]}):null,e.children]})};var Y=n(5773);const Q=e=>{const{components:t}=Z.ReactSelect,{isSelected:n,isDisabled:r}=e;return e.isMulti?(0,a.jsx)(t.Option,{...e,children:(0,a.jsx)("div",{className:"dokan-layout",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-flex h-4 w-4 items-center justify-center rounded border "+(n?"bg-dokan-btn border-dokan-btn-border":"bg-white border-gray-300")+(r?" opacity-50":""),children:(0,a.jsx)(Y.A,{size:16,color:"white"})}),(0,a.jsx)("span",{children:e.label})]})})}):(0,a.jsx)(t.Option,{...e})},J=e=>{const{components:t}=Z.ReactSelect;return Boolean(e?.selectProps?.isMulti)?null:(0,a.jsx)(t.MultiValue,{...e})},ee=e=>{const{components:t}=Z.ReactSelect,{selectProps:n,data:r}=e,i=Boolean(n?.isMulti),s=n?.selectedTitle;let o=e.children;if(!i&&s&&r){var l;const e="function"==typeof s?s(r):s,t=null!==(l=r?.label)&&void 0!==l?l:o;o=e?(0,a.jsxs)("span",{title:`${e}: ${t}`,children:[e,": ",t]}):(0,a.jsx)("span",{title:`${t}`,children:t})}return(0,a.jsx)(t.SingleValue,{...e,children:o})},te=e=>{var t;const{children:n,selectProps:r}=e,{components:i}=Z.ReactSelect,s=r.icon,o=null!==(t=r.iconPosition)&&void 0!==t?t:"left";return(0,a.jsxs)(i.Control,{...e,children:[s&&"left"===o?(0,a.jsx)("span",{className:"!flex !items-center !ml-[15px]",children:s}):null,(0,a.jsx)("div",{className:(0,f.QP)("flex flex-1",s&&"left"===o?"ml-1.5":"ml-0",s&&"right"===o?"mr-1.5":"mr-0"),children:n}),s&&"right"===o?(0,a.jsx)("span",{className:"!flex !items-center !mr-[15px]",children:s}):null]})};var ne=n(5107);const re=e=>{const{components:t}=Z.ReactSelect;return(0,a.jsx)(t.DropdownIndicator,{...e,children:(0,a.jsx)("div",{className:"text-gray-400",children:(0,a.jsx)(ne.A,{size:16})})})},ie={control:e=>({...e,borderRadius:"0.40rem",minHeight:"2.5rem",boxShadow:"none",marginTop:0,outline:"none",":focus":{outline:"none"},":focus-within":{outline:"none"},borderColor:e.borderColor}),placeholder:e=>({...e,fontSize:14,lineHeight:"22px"}),singleValue:e=>({...e,fontSize:14,lineHeight:"22px"}),input:e=>({...e,fontSize:14,lineHeight:"22px",marginTop:1,marginBottom:1}),valueContainer:e=>({...e,paddingLeft:4}),indicatorsContainer:e=>({...e,cursor:"pointer"}),menuPortal:e=>({...e,zIndex:999999,wordBreak:"break-all",minWidth:"18.75rem"}),menu:e=>({...e,zIndex:999999,wordBreak:"break-all"}),menuList:e=>({...e,cursor:"default"}),option:(e,t)=>({...e,cursor:t.isDisabled?"not-allowed":"pointer",backgroundColor:t.isSelected?"var(--colors-primary-50)":e.backgroundColor,":active":{...e[":active"],backgroundColor:t.isSelected?"var(--colors-primary-100)":e[":active"]?.backgroundColor},":hover":{...e[":hover"],backgroundColor:t.isSelected?"var(--colors-primary-200)":e[":hover"]?.backgroundColor},color:t.isSelected?"var(--colors-primary-800)":e.color})},se=function(e){var t,n,r,i,s,o;const l=(()=>{if("undefined"==typeof document)return;const e="dokan-select-menu-portal";let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,t.className="dokan-layout",document.body.appendChild(t)),t})();return(0,a.jsx)(Z.AsyncSearchableSelect,{components:{Control:te,DropdownIndicator:re,SingleValue:ee,ValueContainer:X,MultiValue:J,Option:Q,...e?.components?e.components:{}},styles:ie,className:(0,f.QP)("shadow-none",e?.className),classNamePrefix:null!==(t=e.classNamePrefix)&&void 0!==t?t:"react-select",blurInputOnSelect:null===(n=e.blurInputOnSelect)||void 0===n||n,closeMenuOnSelect:null===(r=e.closeMenuOnSelect)||void 0===r||r,hideSelectedOptions:null!==(i=e.hideSelectedOptions)&&void 0!==i&&i,menuPortalTarget:null!==(s=e.menuPortalTarget)&&void 0!==s?s:l,menuPosition:null!==(o=e.menuPosition)&&void 0!==o?o:"fixed",...e})};n(1455),n(3832),n(4460),n(2106);var oe=n(8443);const le=e=>{var t,n,r,s,c,u,d;const[p,m]=(0,o.useState)(),[g,b]=(0,o.useState)(!1),y={...e,onChange:t=>{b(!1),e?.onChange&&e.onChange(t)}};return(0,a.jsxs)("div",{className:null!==(t=e?.wrapperClassName)&&void 0!==t?t:"",children:[(0,a.jsx)("div",{className:null!==(n=e?.pickerToggleClassName)&&void 0!==n?n:"",onClick:()=>b(!g),ref:m,role:"button",children:null!==(r=e.children)&&void 0!==r?r:(0,a.jsx)(Z.SimpleInput,{onChange:()=>{},value:e?.currentDate?(0,oe.dateI18n)((0,oe.getSettings)().formats.date,e?.currentDate,(0,oe.getSettings)().timezone.string):"",input:{id:null!==(s=e?.inputId)&&void 0!==s?s:"dokan-date-time-picker-input",name:null!==(c=e?.inputName)&&void 0!==c?c:"dokan_date_time_picker_input",type:"text",autoComplete:"off",placeholder:(0,l.__)("Enter Date","dokan-lite")}})}),g&&(0,a.jsx)(i.Popover,{animate:!0,anchor:p,focusOnMount:!0,className:(0,f.QP)(null!==(u=e?.wpPopoverClassName)&&void 0!==u?u:"","dokan-layout"),onClose:()=>{b(!1)},onFocusOutside:()=>{b(!1)},children:(0,a.jsxs)("div",{className:(0,f.QP)("p-4 w-auto text-sm/6",null!==(d=e?.popoverBodyClassName)&&void 0!==d?d:""),children:[(0,a.jsx)(i.DateTimePicker,{...y}),(0,a.jsxs)("div",{className:"mt-2 flex flex-row gap-2",children:[(0,a.jsx)(h.A,{size:"sm",onClick:()=>{b(!1),e?.onClear?e.onClear():y.onChange("")},children:(0,l.__)("Clear","dokan-lite")}),e?.onOk?(0,a.jsx)(h.A,{size:"sm",onClick:()=>{b(!1),e.onOk&&e.onOk()},children:(0,l.__)("Ok","dokan-lite")}):null]})]})})]})};n(231);var ae=n(3078);n(217),n(5620);const ce=e=>{var t,n,r,i;if(!e.namespace)throw new Error("Namespace is required for the DokanMaskedInput component");const o=null!==(t=window?.dokanFrontend?.currency?.symbol)&&void 0!==t?t:"",c={label:(0,l.__)("Amount","dokan-lite"),className:"focus:border-none",maskRule:{numeral:!0,numeralPositiveOnly:!0,numeralDecimalMark:null!==(n=window?.dokanFrontend?.currency?.decimal)&&void 0!==n?n:".",delimiter:null!==(r=window?.dokanFrontend?.currency?.thousand)&&void 0!==r?r:",",numeralDecimalScale:null!==(i=window?.dokanFrontend?.currency?.precision)&&void 0!==i?i:2,...e.maskRule},input:{id:"amount",name:"amount",type:"text",placeholder:(0,l.__)("Enter amount","dokan-lite"),required:!0,disabled:!1,...e.input},showAddOn:!0,...e};var u;if(c?.showAddOn)switch(null!==(u=window?.dokanFrontend?.currency?.position)&&void 0!==u?u:"left"){case"left":case"left_space":c.addOnLeft=o,c.className=(0,f.QP)("rounded-l-none",c.className);break;case"right":case"right_space":c.addOnRight=o,c.className=(0,f.QP)("rounded-r-none",c.className)}const d=(0,s.snakeCase)(e.namespace),h=(0,K.applyFilters)(`dokan_${d}_price_input_props`,c,o),p=(0,s.kebabCase)(e.namespace);return(0,a.jsx)("div",{id:`dokan-${p}-price-input`,className:"dokan-price-input",children:(0,a.jsx)(Z.MaskedInput,{...h,onChange:e=>{const t=e.target.value,n=(0,s.unformatNumber)(t);h.onChange(t,n)}})})};var ue=n(8468),de=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(de||{});class he{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const r=de.TYPE&de.ATTRIBUTE;this.scope=null!=n.scope?n.scope&de.LEVEL|r:de.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(e=>e.name)}add(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)}canAdd(e,t){return null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1)}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class fe extends Error{constructor(e){super(e="[Parchment] "+e),this.message=e,this.name=this.constructor.name}}const pe=class e{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(null==e)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(t,n,r){const i=this.query(n);if(null==i)throw new fe(`Unable to create ${n} blot`);const s=i,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),l=new s(t,o,r);return e.blots.set(l.domNode,l),l}find(t,n=!1){return e.find(t,n)}query(e,t=de.ANY){let n;return"string"==typeof e?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof e?e&de.LEVEL&de.BLOCK?n=this.types.block:e&de.LEVEL&de.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(e=>(n=this.classes[e],!!n)),n=n||this.tags[e.tagName]),null==n?null:"scope"in n&&t&de.LEVEL&n.scope&&t&de.TYPE&n.scope?n:null}register(...e){return e.map(e=>{const t="blotName"in e,n="attrName"in e;if(!t&&!n)throw new fe("Invalid definition");if(t&&"abstract"===e.blotName)throw new fe("Cannot register abstract class");const r=t?e.blotName:n?e.attrName:void 0;return this.types[r]=e,n?"string"==typeof e.keyName&&(this.attributes[e.keyName]=e):t&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(e=>e.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(t=>{(null==this.tags[t]||null==e.className)&&(this.tags[t]=e)}))),e})}};pe.blots=new WeakMap;let me=pe;function ge(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(e=>0===e.indexOf(`${t}-`))}const be=class extends he{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0)}remove(e){ge(e,this.keyName).forEach(t=>{e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")}value(e){const t=(ge(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}};function ye(e){const t=e.split("-"),n=t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("");return t[0]+n}const ve=class extends he{static keys(e){return(e.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(e,t){return!!this.canAdd(e,t)&&(e.style[ye(this.keyName)]=t,!0)}remove(e){e.style[ye(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[ye(this.keyName)];return this.canAdd(e,t)?t:""}},xe=class{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=me.find(this.domNode);if(null==e)return;const t=he.keys(this.domNode),n=be.keys(this.domNode),r=ve.keys(this.domNode);t.concat(n).concat(r).forEach(t=>{const n=e.scroll.query(t,de.ATTRIBUTE);n instanceof he&&(this.attributes[n.attrName]=n)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}},we=class{constructor(e,t){this.scroll=e,this.domNode=t,me.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(null==this.tagName)throw new fe("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?("string"==typeof e?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof e&&(n=e),t="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){null!=this.parent&&this.parent.removeChild(this),me.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,r){const i=this.isolate(e,t);if(null!=this.scroll.query(n,de.BLOT)&&r)i.wrap(n,r);else if(null!=this.scroll.query(n,de.ATTRIBUTE)){const e=this.scroll.create(this.statics.scope);i.wrap(e),e.format(n,r)}}insertAt(e,t,n){const r=null==n?this.scroll.create("text",t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(r,i||void 0)}isolate(e,t){const n=this.split(e);if(null==n)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return null==this.parent||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return 0===e?this:this.next}update(e,t){}wrap(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new fe(`Cannot wrap ${e}`);return n.appendChild(this),n}};we.blotName="abstract";let Ne=we;const ke=class extends Ne{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};ke.scope=de.INLINE_BLOT;const _e=ke;class Ae{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),r=0;for(;n;){if(n===e)return r;r+=1,n=t()}return-1}insertBefore(e,t){null!=e&&(this.remove(e),e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return null!=e&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let r=n();for(;r;){const i=r.length();if(e<i||t&&e===i&&(null==r.next||0!==r.next.length()))return[r,e];e-=i,r=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[r,i]=this.find(e);let s=e-i;const o=this.iterator(r);let l=o();for(;l&&s<e+t;){const r=l.length();e>s?n(l,e-s,Math.min(t,s+r-e)):n(l,0,Math.min(r,e+t-s)),s+=r,l=o()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let r=n();for(;r;)t=e(t,r),r=n();return t}}function Ee(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const n=t.create(de.INLINE);return Array.from(e.childNodes).forEach(e=>{n.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}const Se=class e extends Ne{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(t){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Ae,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ee(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(e){if(e instanceof fe)return;throw e}})}deleteAt(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(e,t,n)=>{e.deleteAt(t,n)})}descendant(t,n=0){const[r,i]=this.children.find(n);return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,i]:r instanceof e?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,(n,r,o)=>{(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,s))),s-=o}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(e=>n instanceof e)||(n.statics.scope===de.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof e?n.unwrap():n.remove())})}formatAt(e,t,n,r){this.children.forEachAt(e,t,(e,t,i)=>{e.formatAt(t,i,n,r)})}insertAt(e,t,n){const[r,i]=this.children.find(e);if(r)r.insertAt(i,t,n);else{const e=null==n?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(e)}}insertBefore(e,t){null!=e.parent&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,null!=t&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,n=!1){const[r,i]=this.children.find(t,n),s=[[this,t]];return r instanceof e?s.concat(r.path(i,n)):(null!=r&&s.push([r,i]),s)}removeChild(e){this.children.remove(e)}replaceWith(t,n){const r="string"==typeof t?this.scroll.create(t,n):t;return r instanceof e&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(e,r,i)=>{const s=e.split(r,t);null!=s&&n.appendChild(s)}),n}splitAfter(e){const t=this.clone();for(;null!=e.next;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],r=[];e.forEach(e=>{e.target===this.domNode&&"childList"===e.type&&(n.push(...e.addedNodes),r.push(...e.removedNodes))}),r.forEach(e=>{if(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const t=this.scroll.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===this.domNode)&&t.detach()}),n.filter(e=>e.parentNode===this.domNode&&e!==this.uiNode).sort((e,t)=>e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(e=>{let t=null;null!=e.nextSibling&&(t=this.scroll.find(e.nextSibling));const n=Ee(e,this.scroll);(n.next!==t||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,t||void 0))}),this.enforceAllowedChildren()}};Se.uiClass="";const Ce=Se,Te=class e extends Ce{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new xe(this.domNode)}format(t,n){if(t!==this.statics.blotName||n){const e=this.scroll.query(t,de.INLINE);if(null==e)return;e instanceof he?this.attributes.attribute(e,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}else this.children.forEach(t=>{t instanceof e||(t=t.wrap(e.blotName,!0)),this.attributes.copy(t)}),this.unwrap()}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.formats()[n]||this.scroll.query(n,de.ATTRIBUTE)?this.isolate(e,t).format(n,r):super.formatAt(e,t,n,r)}optimize(t){super.optimize(t);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const r=this.next;r instanceof e&&r.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(e=>e.target===this.domNode&&"attributes"===e.type)&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof e&&this.attributes.move(r),r}};Te.allowedChildren=[Te,_e],Te.blotName="inline",Te.scope=de.INLINE_BLOT,Te.tagName="SPAN";const Le=Te,Oe=class e extends Ce{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new xe(this.domNode)}format(t,n){const r=this.scroll.query(t,de.BLOCK);null!=r&&(r instanceof he?this.attributes.attribute(r,n):t!==this.statics.blotName||n?n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n):this.replaceWith(e.blotName))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.scroll.query(n,de.BLOCK)?this.format(n,r):super.formatAt(e,t,n,r)}insertAt(e,t,n){if(null==n||null!=this.scroll.query(t,de.INLINE))super.insertAt(e,t,n);else{const r=this.split(e);if(null==r)throw new Error("Attempt to insertAt after block boundaries");{const e=this.scroll.create(t,n);r.parent.insertBefore(e,r)}}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(e=>e.target===this.domNode&&"attributes"===e.type)&&this.attributes.build()}};Oe.blotName="block",Oe.scope=de.BLOCK_BLOT,Oe.tagName="P",Oe.allowedChildren=[Le,Oe,_e];const qe=Oe,je=class extends Ce{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};je.blotName="container",je.scope=de.BLOCK_BLOT;const Re=je,Me=class extends _e{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,r){0===e&&t===this.length()?this.format(n,r):super.formatAt(e,t,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}},De={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Ie=class extends Ce{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(e=>{this.update(e)}),this.observer.observe(this.domNode,De),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=de.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),0===e&&t===this.length()?this.children.forEach(e=>{e.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,r){this.update(),super.formatAt(e,t,n,r)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let r=Array.from(this.observer.takeRecords());for(;r.length>0;)e.push(r.pop());const i=(e,t=!0)=>{null==e||e===this||null!=e.domNode.parentNode&&(n.has(e.domNode)||n.set(e.domNode,[]),t&&i(e.parent))},s=e=>{n.has(e.domNode)&&(e instanceof Ce&&e.children.forEach(s),n.delete(e.domNode),e.optimize(t))};let o=e;for(let t=0;o.length>0;t+=1){if(t>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(e=>{const t=this.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(i(this.find(e.previousSibling,!1)),Array.from(e.addedNodes).forEach(e=>{const t=this.find(e,!1);i(t,!1),t instanceof Ce&&t.children.forEach(e=>{i(e,!1)})})):"attributes"===e.type&&i(t.prev)),i(t))}),this.children.forEach(s),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)e.push(r.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(e=>{const t=this.find(e.target,!0);return null==t?null:n.has(t.domNode)?(n.get(t.domNode).push(e),null):(n.set(t.domNode,[e]),t)}).forEach(e=>{null!=e&&e!==this&&n.has(e.domNode)&&e.update(n.get(e.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};Ie.blotName="scroll",Ie.defaultChild=qe,Ie.allowedChildren=[qe,Re],Ie.scope=de.BLOCK_BLOT,Ie.tagName="DIV";const Pe=Ie,Be=class e extends _e{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){null==n?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(e=>"characterData"===e.type&&e.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Be.blotName="text",Be.scope=de.INLINE_BLOT;const ze=Be;var $e=n(2660);class Ue extends Me{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Ue.blotName="break",Ue.tagName="BR";const Fe=Ue;class He extends ze{}const Ve={"&":"&","<":"<",">":">",'"':""","'":"'"};function We(e){return e.replace(/[&<>"']/g,e=>Ve[e])}class Ge extends Le{static allowedChildren=[Ge,Fe,Me,He];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=Ge.order.indexOf(e),r=Ge.order.indexOf(t);return n>=0||r>=0?n-r:e===t?0:e<t?-1:1}formatAt(e,t,n,r){if(Ge.compare(this.statics.blotName,n)<0&&this.scroll.query(n,de.BLOT)){const i=this.isolate(e,t);r&&i.wrap(n,r)}else super.formatAt(e,t,n,r)}optimize(e){if(super.optimize(e),this.parent instanceof Ge&&Ge.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}const Ke=Ge;class Ze extends qe{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=Ye(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,de.BLOCK)?e+t===this.length()&&this.format(n,r):super.formatAt(e,Math.min(t,this.length()-e-1),n,r),this.cache={})}insertAt(e,t,n){if(null!=n)return super.insertAt(e,t,n),void(this.cache={});if(0===t.length)return;const r=t.split("\n"),i=r.shift();i.length>0&&(e<this.length()-1||null==this.children.tail?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;r.reduce((e,t)=>(s=s.split(e,!0),s.insertAt(0,t),t.length),e+i.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Fe&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&(0===e||e>=this.length()-1)){const t=this.clone();return 0===e?(this.parent.insertBefore(t,this),this):(this.parent.insertBefore(t,this.next),t)}const n=super.split(e,t);return this.cache={},n}}Ze.blotName="block",Ze.tagName="P",Ze.defaultChild=Fe,Ze.allowedChildren=[Fe,Ke,Me,He];class Xe extends Me{attach(){super.attach(),this.attributes=new xe(this.domNode)}delta(){return(new $e).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,de.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}formatAt(e,t,n,r){this.format(n,r)}insertAt(e,t,n){if(null!=n)return void super.insertAt(e,t,n);const r=t.split("\n"),i=r.pop(),s=r.map(e=>{const t=this.scroll.create(Ze.blotName);return t.insertAt(0,e),t}),o=this.split(e);s.forEach(e=>{this.parent.insertBefore(e,o)}),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function Ye(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.descendants(_e).reduce((e,n)=>0===n.length()?e:e.insert(n.value(),Qe(n,{},t)),new $e).insert("\n",Qe(e))}function Qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==e?t:("formats"in e&&"function"==typeof e.formats&&(t={...t,...e.formats()},n&&delete t["code-token"]),null==e.parent||"scroll"===e.parent.statics.blotName||e.parent.statics.scope!==e.statics.scope?t:Qe(e.parent,t,n))}Xe.scope=de.BLOCK_BLOT;class Je extends Me{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(Je.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(e,t){if(0!==this.savedLength)return void super.format(e,t);let n=this,r=0;for(;null!=n&&n.statics.scope!==de.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=Je.CONTENTS.length,n.optimize(),n.formatAt(r,Je.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const e=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof He?this.prev:null,n=t?t.length():0,r=this.next instanceof He?this.next:null,i=r?r.text:"",{textNode:s}=this,o=s.data.split(Je.CONTENTS).join("");let l;if(s.data=Je.CONTENTS,t)l=t,(o||r)&&(t.insertAt(t.length(),o+i),r&&r.remove());else if(r)l=r,r.insertAt(0,o);else{const e=document.createTextNode(o);l=this.scroll.create(e),this.parent.insertBefore(l,this)}if(this.remove(),e){const i=(e,i)=>t&&e===t.domNode?i:e===s?n+i-1:r&&e===r.domNode?n+o.length+i:null,a=i(e.start.node,e.start.offset),c=i(e.end.node,e.end.offset);if(null!==a&&null!==c)return{startNode:l.domNode,startOffset:a,endNode:l.domNode,endOffset:c}}return null}update(e,t){if(e.some(e=>"characterData"===e.type&&e.target===this.textNode)){const e=this.restore();e&&(t.range=e)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if("A"===t.domNode.tagName){this.savedLength=Je.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}}const et=Je;var tt=n(228);const nt=new WeakMap,rt=["error","warn","log","info"];let it="warn";function st(e){if(it&&rt.indexOf(e)<=rt.indexOf(it)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function ot(e){return rt.reduce((t,n)=>(t[n]=st.bind(console,n,e),t),{})}ot.level=e=>{it=e},st.level=ot.level;const lt=ot,at=lt("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(e=>{document.addEventListener(e,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(e=>{const n=nt.get(e);n&&n.emitter&&n.emitter.handleDOM(...t)})})});const ct=class extends tt{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",at.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return at.log.call(at,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.domListeners[e.type]||[]).forEach(t=>{let{node:r,handler:i}=t;(e.target===r||r.contains(e.target))&&i(e,...n)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}},ut=lt("quill:selection");class dt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=e,this.length=t}}function ht(e,t){try{t.parentNode}catch(e){return!1}return e.contains(t)}const ft=class{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new dt(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,ct.sources.USER),1)}),this.emitter.on(ct.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const e=this.getNativeRange();null!=e&&e.start.node!==this.cursor.textNode&&this.emitter.once(ct.events.SCROLL_UPDATE,(t,n)=>{try{this.root.contains(e.start.node)&&this.root.contains(e.end.node)&&this.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset);const r=n.some(e=>"characterData"===e.type||"childList"===e.type||"attributes"===e.type&&e.target===this.root);this.update(r?ct.sources.SILENT:t)}catch(e){}})}),this.emitter.on(ct.events.SCROLL_OPTIMIZE,(e,t)=>{if(t.range){const{startNode:e,startOffset:n,endNode:r,endOffset:i}=t.range;this.setNativeRange(e,n,r,i),this.update(ct.sources.SILENT)}}),this.update(ct.sources.SILENT)}handleComposition(){this.emitter.on(ct.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(ct.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(ct.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(e,de.BLOCK)){if(n.start.node!==this.cursor.textNode){const e=this.scroll.find(n.start.node,!1);if(null==e)return;if(e instanceof _e){const t=e.split(n.start.offset);e.parent.insertBefore(this.cursor,t)}else e.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let r;e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let[i,s]=this.scroll.leaf(e);if(null==i)return null;if(t>0&&s===i.length()){const[t]=this.scroll.leaf(e+1);if(t){const[n]=this.scroll.line(e),[r]=this.scroll.line(e+1);n===r&&(i=t,s=0)}}[r,s]=i.position(s,!0);const o=document.createRange();if(t>0)return o.setStart(r,s),[i,s]=this.scroll.leaf(e+t),null==i?null:([r,s]=i.position(s,!0),o.setEnd(r,s),o.getBoundingClientRect());let l,a="left";if(r instanceof Text){if(!r.data.length)return null;s<r.data.length?(o.setStart(r,s),o.setEnd(r,s+1)):(o.setStart(r,s-1),o.setEnd(r,s),a="right"),l=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;l=i.domNode.getBoundingClientRect(),s>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const e=document.getSelection();if(null==e||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(null==t)return null;const n=this.normalizeNative(t);return ut.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&ht(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map(e=>{const[t,n]=e,r=this.scroll.find(t,!0),i=r.offset(this.scroll);return 0===n?i:r instanceof _e?i+r.index(t,n):i+r.length()}),r=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(r,...n);return new dt(i,r-i)}normalizeNative(e){if(!ht(this.root,e.startContainer)||!e.collapsed&&!ht(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(e=>{let{node:t,offset:n}=e;for(;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length>0?t.childNodes.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}rangeToNative(e){const t=this.scroll.length(),n=(e,n)=>{e=Math.min(t-1,e);const[r,i]=this.scroll.leaf(e);return r?r.position(i,n):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(ut.info("setNativeRange",e,t,n,r),null!=e&&(null==this.root.parentNode||null==e.parentNode||null==n.parentNode))return;const s=document.getSelection();if(null!=s)if(null!=e){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||i||e!==o.startContainer||t!==o.startOffset||n!==o.endContainer||r!==o.endOffset){e instanceof Element&&"BR"===e.tagName&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const i=document.createRange();i.setStart(e,t),i.setEnd(n,r),s.removeAllRanges(),s.addRange(i)}}else s.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.sources.API;if("string"==typeof t&&(n=t,t=!1),ut.info("setRange",e),null!=e){const n=this.rangeToNative(e);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct.sources.USER;const t=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,ue.isEqual)(t,this.lastRange)){if(!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const e=this.cursor.restore();e&&this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}const n=[ct.events.SELECTION_CHANGE,(0,ue.cloneDeep)(this.lastRange),(0,ue.cloneDeep)(t),e];this.emitter.emit(ct.events.EDITOR_CHANGE,...n),e!==ct.sources.SILENT&&this.emitter.emit(...n)}}},pt=/^[ -~]*$/;function mt(e,t,n){if(0===e.length){const[e]=yt(n.pop());return t<=0?`</li></${e}>`:`</li></${e}>${mt([],t-1,n)}`}const[{child:r,offset:i,length:s,indent:o,type:l},...a]=e,[c,u]=yt(l);if(o>t)return n.push(l),o===t+1?`<${c}><li${u}>${gt(r,i,s)}${mt(a,o,n)}`:`<${c}><li>${mt(e,t+1,n)}`;const d=n[n.length-1];if(o===t&&l===d)return`</li><li${u}>${gt(r,i,s)}${mt(a,o,n)}`;const[h]=yt(n.pop());return`</li></${h}>${mt(e,t-1,n)}`}function gt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in e&&"function"==typeof e.html)return e.html(t,n);if(e instanceof He)return We(e.value().slice(t,t+n)).replaceAll(" "," ");if(e instanceof Ce){if("list-container"===e.statics.blotName){const r=[];return e.children.forEachAt(t,n,(e,t,n)=>{const i="formats"in e&&"function"==typeof e.formats?e.formats():{};r.push({child:e,offset:t,length:n,indent:i.indent||0,type:i.list})}),mt(r,-1,[])}const i=[];if(e.children.forEachAt(t,n,(e,t,n)=>{i.push(gt(e,t,n))}),r||"list"===e.statics.blotName)return i.join("");const{outerHTML:s,innerHTML:o}=e.domNode,[l,a]=s.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${i.join("")}<${a}`:`${l}>${i.join("")}<${a}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function bt(e,t){return Object.keys(t).reduce((n,r)=>{if(null==e[r])return n;const i=t[r];return i===e[r]?n[r]=i:Array.isArray(i)?i.indexOf(e[r])<0?n[r]=i.concat([e[r]]):n[r]=i:n[r]=[i,e[r]],n},{})}function yt(e){const t="ordered"===e?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function vt(e){return e.reduce((e,t)=>{if("string"==typeof t.insert){const n=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(n,t.attributes)}return e.push(t)},new $e)}function xt(e,t){let{index:n,length:r}=e;return new dt(n+t,r)}const wt=class{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=vt(e),r=new $e;return function(e){const t=[];return e.forEach(e=>{"string"==typeof e.insert?e.insert.split("\n").forEach((n,r)=>{r&&t.push({insert:"\n",attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}(n.ops.slice()).reduce((e,n)=>{const i=$e.Op.length(n);let s=n.attributes||{},o=!1,l=!1;if(null!=n.insert){if(r.retain(i),"string"==typeof n.insert){const r=n.insert;l=!r.endsWith("\n")&&(t<=e||!!this.scroll.descendant(Xe,e)[0]),this.scroll.insertAt(e,r);const[i,o]=this.scroll.line(e);let a=(0,ue.merge)({},Qe(i));if(i instanceof Ze){const[e]=i.descendant(_e,o);e&&(a=(0,ue.merge)(a,Qe(e)))}s=$e.AttributeMap.diff(a,s)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return e;const i=null!=this.scroll.query(r,de.INLINE);if(i)(t<=e||this.scroll.descendant(Xe,e)[0])&&(l=!0);else if(e>0){const[t,n]=this.scroll.descendant(_e,e-1);t instanceof He?"\n"!==t.value()[n]&&(o=!0):t instanceof Me&&t.statics.scope===de.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(e,r,n.insert[r]),i){const[t]=this.scroll.descendant(_e,e);if(t){const e=(0,ue.merge)({},Qe(t));s=$e.AttributeMap.diff(e,s)||{}}}}t+=i}else if(r.push(n),null!==n.retain&&"object"==typeof n.retain){const t=Object.keys(n.retain)[0];if(null==t)return e;this.scroll.updateEmbedAt(e,t,n.retain[t])}Object.keys(s).forEach(t=>{this.scroll.formatAt(e,i,t,s[t])});const a=o?1:0,c=l?1:0;return t+=a+c,r.retain(a),r.delete(c),e+i+a+c},0),r.reduce((e,t)=>"number"==typeof t.delete?(this.scroll.deleteAt(e,t.delete),e):e+$e.Op.length(t),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update((new $e).retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(r=>{this.scroll.lines(e,Math.max(t,1)).forEach(e=>{e.format(r,n[r])})}),this.scroll.optimize();const r=(new $e).retain(e).retain(t,(0,ue.cloneDeep)(n));return this.update(r)}formatText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t,r,n[r])});const r=(new $e).retain(e).retain(t,(0,ue.cloneDeep)(n));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new $e)}getFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(e=>{const[t]=e;t instanceof Ze?n.push(t):t instanceof _e&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(_e,e,t));const[i,s]=[n,r].map(e=>{const t=e.shift();if(null==t)return{};let n=Qe(t);for(;Object.keys(n).length>0;){const t=e.shift();if(null==t)return n;n=bt(Qe(t),n)}return n});return{...i,...s}}getHTML(e,t){const[n,r]=this.scroll.line(e);if(n){const i=n.length();return n.length()>=r+t&&(0!==r||t!==i)?gt(n,r,t,!0):gt(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(e=>"string"==typeof e.insert).map(e=>e.insert).join("")}insertContents(e,t){const n=vt(t),r=(new $e).retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(r)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new $e).retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t.length,r,n[r])}),this.update((new $e).retain(e).insert(t,(0,ue.cloneDeep)(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if(e?.statics.blotName!==Ze.blotName)return!1;const t=e;return!(t.children.length>1)&&t.children.head instanceof Fe}removeFormat(e,t){const n=this.getText(e,t),[r,i]=this.scroll.line(e+t);let s=0,o=new $e;null!=r&&(s=r.length()-i,o=r.delta().slice(i,i+s-1).insert("\n"));const l=this.getContents(e,t+s).diff((new $e).insert(n).concat(o)),a=(new $e).retain(e).concat(l);return this.applyDelta(a)}update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(pt)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),s=Qe(i),o=i.offset(this.scroll),l=t[0].oldValue.replace(et.CONTENTS,""),a=(new $e).insert(l),c=(new $e).insert(i.value()),u=n&&{oldRange:xt(n.oldRange,-o),newRange:xt(n.newRange,-o)};e=(new $e).retain(o).concat(a.diff(c,u)).reduce((e,t)=>t.insert?e.insert(t.insert,s):e.push(t),new $e),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,ue.isEqual)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}},Nt=class{static DEFAULTS={};constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=e,this.options=t}},kt="\ufeff",_t=class extends Me{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(e=>{this.contentNode.appendChild(e)}),this.leftGuard=document.createTextNode(kt),this.rightGuard=document.createTextNode(kt),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t,n=null;const r=e.data.split(kt).join("");if(e===this.leftGuard)if(this.prev instanceof He){const e=this.prev.length();this.prev.insertAt(e,r),n={startNode:this.prev.domNode,startOffset:e+r.length}}else t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this),n={startNode:t,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof He?(this.next.insertAt(0,r),n={startNode:this.next.domNode,startOffset:r.length}):(t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this.next),n={startNode:t,startOffset:r.length}));return e.data=kt,n}update(e,t){e.forEach(e=>{if("characterData"===e.type&&(e.target===this.leftGuard||e.target===this.rightGuard)){const n=this.restore(e.target);n&&(t.range=n)}})}},At=class{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;!t||t instanceof _t||(this.emitter.emit(ct.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(ct.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(ct.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(ct.events.COMPOSITION_END,e),this.isComposing=!1}};class Et{static DEFAULTS={modules:{}};static themes={default:Et};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{null==this.modules[e]&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}const St=Et,Ct=e=>e.parentElement||e.getRootNode().host||null,Tt=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},Lt=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Ot=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,qt=["block","break","cursor","inline","scroll","text"],jt=lt("quill"),Rt=new me;Ce.uiClass="ql-ui";class Mt{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Rt,theme:"default"};static events=ct.events;static sources=ct.sources;static version="2.0.3";static imports={delta:$e,parchment:r,"core/module":Nt,"core/theme":St};static debug(e){!0===e&&(e="log"),lt.level(e)}static find(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return nt.get(e)||Rt.find(e,t)}static import(e){return null==this.imports[e]&&jt.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const e=arguments.length<=0?void 0:arguments[0],t=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in e?e.attrName:e.blotName;"string"==typeof n?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(n=>{this.register(n,e[n],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[e]||n||jt.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&"boolean"!=typeof t&&"abstract"!==t.blotName&&Rt.register(t),"function"==typeof t.register&&t.register(Rt)}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(e,t){const n=Dt(e);if(!n)throw new Error("Invalid Quill container");const r=!t.theme||t.theme===Mt.DEFAULTS.theme?St:Mt.import(`themes/${t.theme}`);if(!r)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:i,...s}=Mt.DEFAULTS,{modules:o,...l}=r.DEFAULTS;let a=It(t.modules);null!=a&&a.toolbar&&a.toolbar.constructor!==Object&&(a={...a,toolbar:{container:a.toolbar}});const c=(0,ue.merge)({},It(i),It(o),a),u={...s,...Pt(l),...Pt(t)};let d=t.registry;return d?t.formats&&jt.warn('Ignoring "formats" option because "registry" is specified'):d=t.formats?((e,t,n)=>{const r=new me;return qt.forEach(e=>{const n=t.query(e);n&&r.register(n)}),e.forEach(e=>{let i=t.query(e);i||n.error(`Cannot register "${e}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,s+=1,s>100){n.error(`Cycle detected in registering blot requiredContainer: "${e}"`);break}}),r})(t.formats,u.registry,jt):u.registry,{...u,registry:d,container:n,theme:r,modules:Object.entries(c).reduce((e,t)=>{let[n,r]=t;if(!r)return e;const i=Mt.import(`modules/${n}`);return null==i?(jt.error(`Cannot load ${n} module. Are you sure you registered it?`),e):{...e,[n]:(0,ue.merge)({},i.DEFAULTS||{},r)}},{}),bounds:Dt(u.bounds)}}(e,t),this.container=this.options.container,null==this.container)return void jt.error("Invalid Quill container",e);this.options.debug&&Mt.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",nt.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new ct;const r=Pe.blotName,i=this.options.registry.query(r);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new wt(this.scroll),this.selection=new ft(this.scroll,this.emitter),this.composition=new At(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(ct.events.EDITOR_CHANGE,e=>{e===ct.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(ct.events.SCROLL_UPDATE,(e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),i=n&&r?{oldRange:n,newRange:r}:void 0;Bt.call(this,()=>this.editor.update(null,t,i),e)}),this.emitter.on(ct.events.SCROLL_EMBED_UPDATE,(e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),i=n&&r?{oldRange:n,newRange:r}:void 0;Bt.call(this,()=>{const n=(new $e).retain(e.offset(this)).retain({[e.statics.blotName]:t});return this.editor.update(n,[],i)},Mt.sources.USER)}),n){const e=this.clipboard.convert({html:`${n}<p><br></p>`,text:"\n"});this.setContents(e)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){const t=e;(e=document.createElement("div")).classList.add(t)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=zt(e,t,n),Bt.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.sources.API;return Bt.call(this,()=>{const n=this.getSelection(!0);let r=new $e;if(null==n)return r;if(this.scroll.query(e,de.BLOCK))r=this.editor.formatLine(n.index,n.length,{[e]:t});else{if(0===n.length)return this.selection.format(e,t),r;r=this.editor.formatText(n.index,n.length,{[e]:t})}return this.setSelection(n,ct.sources.SILENT),r},n)}formatLine(e,t,n,r,i){let s;return[e,t,s,i]=zt(e,t,n,r,i),Bt.call(this,()=>this.editor.formatLine(e,t,s),i,e,0)}formatText(e,t,n,r,i){let s;return[e,t,s,i]=zt(e,t,n,r,i),Bt.call(this,()=>this.editor.formatText(e,t,s),i,e,0)}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length),!n)return null;const r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e;return[e,t]=zt(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=zt(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=zt(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mt.sources.API;return Bt.call(this,()=>this.editor.insertEmbed(e,t,n),r,e)}insertText(e,t,n,r,i){let s;return[e,,s,i]=zt(e,0,n,r,i),Bt.call(this,()=>this.editor.insertText(e,t,s),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=zt(e,t,n),Bt.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){((e,t)=>{const n=e.ownerDocument;let r=t,i=e;for(;i;){const e=i===n.body,t=e?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:Tt(i),s=getComputedStyle(i),o=Ot(r.left,r.right,t.left,t.right,Lt(s.scrollPaddingLeft),Lt(s.scrollPaddingRight)),l=Ot(r.top,r.bottom,t.top,t.bottom,Lt(s.scrollPaddingTop),Lt(s.scrollPaddingBottom));if(o||l)if(e)n.defaultView?.scrollBy(o,l);else{const{scrollLeft:e,scrollTop:t}=i;l&&(i.scrollTop+=l),o&&(i.scrollLeft+=o);const n=i.scrollLeft-e,s=i.scrollTop-t;r={left:r.left-n,top:r.top-s,right:r.right-n,bottom:r.bottom-s}}i=e||"fixed"===s.position?null:Ct(i)}})(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API;return Bt.call(this,()=>{e=new $e(e);const t=this.getLength(),n=this.editor.deleteText(0,t),r=this.editor.insertContents(0,e),i=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(i)},t)}setSelection(e,t,n){null==e?this.selection.setRange(null,t||Mt.sources.API):([e,t,,n]=zt(e,t,n),this.selection.setRange(new dt(Math.max(0,e),t),n),n!==ct.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API;const n=(new $e).insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.sources.API;return Bt.call(this,()=>(e=new $e(e),this.editor.applyDelta(e)),t,!0)}}function Dt(e){return"string"==typeof e?document.querySelector(e):e}function It(e){return Object.entries(e??{}).reduce((e,t)=>{let[n,r]=t;return{...e,[n]:!0===r?{}:r}},{})}function Pt(e){return Object.fromEntries(Object.entries(e).filter(e=>void 0!==e[1]))}function Bt(e,t,n,r){if(!this.isEnabled()&&t===ct.sources.USER&&!this.allowReadOnlyEdits)return new $e;let i=null==n?null:this.getSelection();const s=this.editor.delta,o=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=$t(i,o,t):0!==r&&(i=$t(i,n,r,t)),this.setSelection(i,ct.sources.SILENT)),o.length()>0){const e=[ct.events.TEXT_CHANGE,o,s,t];this.emitter.emit(ct.events.EDITOR_CHANGE,...e),t!==ct.sources.SILENT&&this.emitter.emit(...e)}return o}function zt(e,t,n,r,i){let s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"==typeof n?(s=n,i=r):"string"==typeof n&&(null!=r?s[n]=r:i=n),[e,t,s,i=i||ct.sources.API]}function $t(e,t,n,r){const i="number"==typeof n?n:0;if(null==e)return null;let s,o;return t&&"function"==typeof t.transformPosition?[s,o]=[e.index,e.index+e.length].map(e=>t.transformPosition(e,r!==ct.sources.USER)):[s,o]=[e.index,e.index+e.length].map(e=>e<t||e===t&&r===ct.sources.USER?e:i>=0?e+i:Math.max(t,e+i)),new dt(s,o-s)}const Ut=class extends Re{};function Ft(e){return e instanceof Ze||e instanceof Xe}function Ht(e){return"function"==typeof e.updateContent}function Vt(e,t,n){n.reduce((t,n)=>{const r=$e.Op.length(n);let i=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const r=n.insert;e.insertAt(t,r);const[s]=e.descendant(_e,t),o=Qe(s);i=$e.AttributeMap.diff(o,i)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return t;if(e.insertAt(t,r,n.insert[r]),null!=e.scroll.query(r,de.INLINE)){const[n]=e.descendant(_e,t),r=Qe(n);i=$e.AttributeMap.diff(r,i)||{}}}return Object.keys(i).forEach(n=>{e.formatAt(t,r,n,i[n])}),t+r},t)}const Wt={scope:de.BLOCK,whitelist:["right","center","justify"]},Gt=new he("align","align",Wt),Kt=new be("align","ql-align",Wt),Zt=new ve("align","text-align",Wt);class Xt extends ve{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(e=>`00${parseInt(e,10).toString(16)}`.slice(-2)).join("")}`):t}}const Yt=new be("color","ql-color",{scope:de.INLINE}),Qt=new Xt("color","color",{scope:de.INLINE}),Jt=new be("background","ql-bg",{scope:de.INLINE}),en=new Xt("background","background-color",{scope:de.INLINE});class tn extends Ut{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(e=>e.length()<=1?"":e.domNode.innerText).join("\n").slice(e,e+t)}html(e,t){return`<pre>\n${We(this.code(e,t))}\n</pre>`}}class nn extends Ze{static TAB=" ";static register(){Mt.register(tn)}}class rn extends Ke{}rn.blotName="code",rn.tagName="CODE",nn.blotName="code-block",nn.className="ql-code-block",nn.tagName="DIV",tn.blotName="code-block-container",tn.className="ql-code-block-container",tn.tagName="DIV",tn.allowedChildren=[nn],nn.allowedChildren=[He,Fe,et],nn.requiredContainer=tn;const sn={scope:de.BLOCK,whitelist:["rtl"]},on=new he("direction","dir",sn),ln=new be("direction","ql-direction",sn),an=new ve("direction","direction",sn),cn={scope:de.INLINE,whitelist:["serif","monospace"]},un=new be("font","ql-font",cn),dn=new class extends ve{value(e){return super.value(e).replace(/["']/g,"")}}("font","font-family",cn),hn=new be("size","ql-size",{scope:de.INLINE,whitelist:["small","large","huge"]}),fn=new ve("size","font-size",{scope:de.INLINE,whitelist:["10px","18px","32px"]}),pn=lt("quill:keyboard"),mn=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class gn extends Nt{static match(e,t){return!["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!t[n]!==e[n]&&null!==t[n])&&(t.key===e.key||t.key===e.which)}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(e=>{this.options.bindings[e]&&this.addBinding(this.options.bindings[e])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){if("string"==typeof e||"number"==typeof e)e={key:e};else{if("object"!=typeof e)return null;e=(0,ue.cloneDeep)(e)}return e.shortKey&&(e[mn]=e.shortKey,delete e.shortKey),e}(e);null!=r?("function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),(Array.isArray(r.key)?r.key:[r.key]).forEach(e=>{const i={...r,key:e,...t,...n};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)})):pn.warn("Attempted to add invalid keyboard binding",r)}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing)return;if(229===e.keyCode&&("Enter"===e.key||"Backspace"===e.key))return;const t=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(t=>gn.match(e,t));if(0===t.length)return;const n=Mt.find(e.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const r=this.quill.getSelection();if(null==r||!this.quill.hasFocus())return;const[i,s]=this.quill.getLine(r.index),[o,l]=this.quill.getLeaf(r.index),[a,c]=0===r.length?[o,l]:this.quill.getLeaf(r.index+r.length),u=o instanceof ze?o.value().slice(0,l):"",d=a instanceof ze?a.value().slice(c):"",h={collapsed:0===r.length,empty:0===r.length&&i.length()<=1,format:this.quill.getFormat(r),line:i,offset:s,prefix:u,suffix:d,event:e};t.some(e=>{if(null!=e.collapsed&&e.collapsed!==h.collapsed)return!1;if(null!=e.empty&&e.empty!==h.empty)return!1;if(null!=e.offset&&e.offset!==h.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(e=>null==h.format[e]))return!1}else if("object"==typeof e.format&&!Object.keys(e.format).every(t=>!0===e.format[t]?null!=h.format[t]:!1===e.format[t]?null==h.format[t]:(0,ue.isEqual)(e.format[t],h.format[t])))return!1;return!(null!=e.prefix&&!e.prefix.test(h.prefix)||null!=e.suffix&&!e.suffix.test(h.suffix)||!0===e.handler.call(this,r,h,e))})&&e.preventDefault()})}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(0===e.index||this.quill.getLength()<=1)return;let r={};const[i]=this.quill.getLine(e.index);let s=(new $e).retain(e.index-n).delete(n);if(0===t.offset){const[t]=this.quill.getLine(e.index-1);if(t&&!("block"===t.statics.blotName&&t.length()<=1)){const t=i.formats(),n=this.quill.getFormat(e.index-1,1);if(r=$e.AttributeMap.diff(t,n)||{},Object.keys(r).length>0){const t=(new $e).retain(e.index+i.length()-2).retain(1,r);s=s.compose(t)}}}this.quill.updateContents(s,Mt.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let r={};const[i]=this.quill.getLine(e.index);let s=(new $e).retain(e.index).delete(n);if(t.offset>=i.length()-1){const[t]=this.quill.getLine(e.index+1);if(t){const n=i.formats(),o=this.quill.getFormat(e.index,1);r=$e.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(s=s.retain(t.length()-1).retain(1,r))}}this.quill.updateContents(s,Mt.sources.USER),this.quill.focus()}handleDeleteRange(e){Nn({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce((e,n)=>(this.quill.scroll.query(n,de.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e),{}),r=(new $e).retain(e.index).delete(e.length).insert("\n",n);this.quill.updateContents(r,Mt.sources.USER),this.quill.setSelection(e.index+1,Mt.sources.SILENT),this.quill.focus()}}const bn={bindings:{bold:xn("bold"),italic:xn("italic"),underline:xn("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","+1",Mt.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","-1",Mt.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){null!=t.format.indent?this.quill.format("indent","-1",Mt.sources.USER):null!=t.format.list&&this.quill.format("list",!1,Mt.sources.USER)}},"indent code-block":yn(!0),"outdent code-block":yn(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,Mt.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=(new $e).retain(e.index).delete(e.length).insert("\t");return this.quill.updateContents(n,Mt.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,Mt.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,Mt.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,Mt.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},i=(new $e).retain(e.index).insert("\n",r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,Mt.sources.USER),this.quill.setSelection(e.index+1,Mt.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),i=(new $e).retain(e.index).insert("\n",t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,Mt.sources.USER),this.quill.setSelection(e.index+1,Mt.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,i,s]=t.getTable(e),o=function(e,t,n,r){return null==t.prev&&null==t.next?null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1:null==t.prev?-1:null==t.next?1:null}(0,r,i,s);if(null==o)return;let l=n.offset();if(o<0){const t=(new $e).retain(l).insert("\n");this.quill.updateContents(t,Mt.sources.USER),this.quill.setSelection(e.index+1,e.length,Mt.sources.SILENT)}else if(o>0){l+=n.length();const e=(new $e).retain(l).insert("\n");this.quill.updateContents(e,Mt.sources.USER),this.quill.setSelection(l,Mt.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,Mt.sources.USER):this.quill.setSelection(i+r.length(),Mt.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",Mt.sources.USER),this.quill.history.cutoff();const o=(new $e).retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,Mt.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,Mt.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;null!=i&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const r=(new $e).retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,Mt.sources.USER),this.quill.setSelection(e.index-1,Mt.sources.SILENT),!1}return!0}},"embed left":vn("ArrowLeft",!1),"embed left shift":vn("ArrowLeft",!0),"embed right":vn("ArrowRight",!1),"embed right shift":vn("ArrowRight",!0),"table down":wn(!1),"table up":wn(!0)}};function yn(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(0===t.length&&!r.shiftKey)return this.quill.insertText(t.index,s,Mt.sources.USER),void this.quill.setSelection(t.index+s.length,Mt.sources.SILENT);const o=0===t.length?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:l,length:a}=t;o.forEach((t,n)=>{e?(t.insertAt(0,s),0===n?l+=s.length:a+=s.length):t.domNode.textContent.startsWith(s)&&(t.deleteAt(0,s.length),0===n?l-=s.length:a-=s.length)}),this.quill.update(Mt.sources.USER),this.quill.setSelection(l,a,Mt.sources.SILENT)}}}function vn(e,t){const n="ArrowLeft"===e?"prefix":"suffix";return{key:e,shiftKey:t,altKey:null,[n]:/^$/,handler(n){let{index:r}=n;"ArrowRight"===e&&(r+=n.length+1);const[i]=this.quill.getLeaf(r);return!(i instanceof Me&&("ArrowLeft"===e?t?this.quill.setSelection(n.index-1,n.length+1,Mt.sources.USER):this.quill.setSelection(n.index-1,Mt.sources.USER):t?this.quill.setSelection(n.index,n.length+1,Mt.sources.USER):this.quill.setSelection(n.index+n.length+1,Mt.sources.USER),1))}}}function xn(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],Mt.sources.USER)}}}function wn(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(null!=s){if("table-row"===s.statics.blotName){let e=s.children.head,t=i;for(;null!=t.prev;)t=t.prev,e=e.next;const r=e.offset(this.quill.scroll)+Math.min(n.offset,e.length()-1);this.quill.setSelection(r,0,Mt.sources.USER)}}else{const t=i.table()[r];null!=t&&(e?this.quill.setSelection(t.offset(this.quill.scroll)+t.length()-1,0,Mt.sources.USER):this.quill.setSelection(t.offset(this.quill.scroll),0,Mt.sources.USER))}return!1}}}function Nn(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const e=r[0].formats(),t=r[r.length-1].formats();i=$e.AttributeMap.diff(t,e)||{}}t.deleteText(n,Mt.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,Mt.sources.USER),t.setSelection(n.index,Mt.sources.SILENT)}gn.DEFAULTS=bn;const kn=/font-weight:\s*normal/,_n=["P","OL","UL"],An=e=>e&&_n.includes(e.tagName),En=/\bmso-list:[^;]*ignore/i,Sn=/\bmso-list:[^;]*\bl(\d+)/i,Cn=/\bmso-list:[^;]*\blevel(\d+)/i,Tn=[function(e){"urn:schemas-microsoft-com:office:word"===e.documentElement.getAttribute("xmlns:w")&&(e=>{const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(e=>{(e.getAttribute("style")||"").match(En)?n.push(e):r.push(e)}),n.forEach(e=>e.parentNode?.removeChild(e));const i=e.documentElement.innerHTML,s=r.map(e=>((e,t)=>{const n=e.getAttribute("style"),r=n?.match(Sn);if(!r)return null;const i=Number(r[1]),s=n?.match(Cn),o=s?Number(s[1]):1,l=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=t.match(l);return{id:i,indent:o,type:a&&"bullet"===a[1]?"bullet":"ordered",element:e}})(e,i)).filter(e=>e);for(;s.length;){const e=[];let t=s.shift();for(;t;)e.push(t),t=s.length&&s[0]?.element===t.element.nextElementSibling&&s[0].id===t.id?s.shift():null;const n=document.createElement("ul");e.forEach(e=>{const t=document.createElement("li");t.setAttribute("data-list",e.type),e.indent>1&&t.setAttribute("class","ql-indent-"+(e.indent-1)),t.innerHTML=e.element.innerHTML,n.appendChild(t)});const r=e[0]?.element,{parentNode:i}=r??{};r&&i?.replaceChild(n,r),e.slice(1).forEach(e=>{let{element:t}=e;i?.removeChild(t)})}})(e)},function(e){e.querySelector('[id^="docs-internal-guid-"]')&&((e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(e=>e.getAttribute("style")?.match(kn)).forEach(t=>{const n=e.createDocumentFragment();n.append(...t.childNodes),t.parentNode?.replaceChild(n,t)})})(e),(e=>{Array.from(e.querySelectorAll("br")).filter(e=>An(e.previousElementSibling)&&An(e.nextElementSibling)).forEach(e=>{e.parentNode?.removeChild(e)})})(e))}],Ln=lt("quill:clipboard"),On=[[Node.TEXT_NODE,function(e,t,n){let r=e.data;if("O:P"===e.parentElement?.tagName)return t.insert(r.trim());if(!Pn(e)){if(0===r.trim().length&&r.includes("\n")&&!function(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Dn(e.previousElementSibling,t)&&!Dn(e.nextElementSibling,t)}(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(null==e.previousSibling&&null!=e.parentElement&&Dn(e.parentElement,n)||e.previousSibling instanceof Element&&Dn(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(null==e.nextSibling&&null!=e.parentElement&&Dn(e.parentElement,n)||e.nextSibling instanceof Element&&Dn(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}],[Node.TEXT_NODE,$n],["br",function(e,t){return Mn(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,$n],[Node.ELEMENT_NODE,function(e,t,n){const r=n.query(e);if(null==r)return t;if(r.prototype instanceof Me){const t={},i=r.value(e);if(null!=i)return t[r.blotName]=i,(new $e).insert(t,r.formats(e,n))}else if(r.prototype instanceof qe&&!Mn(t,"\n")&&t.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return Rn(t,r.blotName,r.formats(e,n),n);return t}],[Node.ELEMENT_NODE,function(e,t,n){const r=he.keys(e),i=be.keys(e),s=ve.keys(e),o={};return r.concat(i).concat(s).forEach(t=>{let r=n.query(t,de.ATTRIBUTE);null!=r&&(o[r.attrName]=r.value(e),o[r.attrName])||(r=qn[t],null==r||r.attrName!==t&&r.keyName!==t||(o[r.attrName]=r.value(e)||void 0),r=jn[t],null==r||r.attrName!==t&&r.keyName!==t||(r=jn[t],o[r.attrName]=r.value(e)||void 0))}),Object.entries(o).reduce((e,t)=>{let[r,i]=t;return Rn(e,r,i,n)},t)}],[Node.ELEMENT_NODE,function(e,t,n){const r={},i=e.style||{};return"italic"===i.fontStyle&&(r.italic=!0),"underline"===i.textDecoration&&(r.underline=!0),"line-through"===i.textDecoration&&(r.strike=!0),(i.fontWeight?.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((e,t)=>{let[r,i]=t;return Rn(e,r,i,n)},t),parseFloat(i.textIndent||0)>0?(new $e).insert("\t").concat(t):t}],["li",function(e,t,n){const r=n.query(e);if(null==r||"list"!==r.blotName||!Mn(t,"\n"))return t;let i=-1,s=e.parentNode;for(;null!=s;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?t:t.reduce((e,t)=>t.insert?t.attributes&&"number"==typeof t.attributes.indent?e.push(t):e.insert(t.insert,{indent:i,...t.attributes||{}}):e,new $e)}],["ol, ul",function(e,t,n){const r=e;let i="OL"===r.tagName?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(i="true"===s?"checked":"unchecked"),Rn(t,"list",i,n)}],["pre",function(e,t,n){const r=n.query("code-block");return Rn(t,"code-block",!r||!("formats"in r)||"function"!=typeof r.formats||r.formats(e,n),n)}],["tr",function(e,t,n){const r="TABLE"===e.parentElement?.tagName?e.parentElement:e.parentElement?.parentElement;return null!=r?Rn(t,"table",Array.from(r.querySelectorAll("tr")).indexOf(e)+1,n):t}],["b",zn("bold")],["i",zn("italic")],["strike",zn("strike")],["style",function(){return new $e}]],qn=[Gt,on].reduce((e,t)=>(e[t.keyName]=t,e),{}),jn=[Zt,en,Qt,an,dn,fn].reduce((e,t)=>(e[t.keyName]=t,e),{});function Rn(e,t,n,r){return r.query(t)?e.reduce((e,r)=>{if(!r.insert)return e;if(r.attributes&&r.attributes[t])return e.push(r);const i=n?{[t]:n}:{};return e.insert(r.insert,{...i,...r.attributes})},new $e):e}function Mn(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const t=e.ops[r];if("string"!=typeof t.insert)break;n=t.insert+n}return n.slice(-1*t.length)===t}function Dn(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return!(n&&n.prototype instanceof Me)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}const In=new WeakMap;function Pn(e){return null!=e&&(In.has(e)||("PRE"===e.tagName?In.set(e,!0):In.set(e,Pn(e.parentNode))),In.get(e))}function Bn(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((n,r)=>r(t,n,e),new $e):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,o)=>{let l=Bn(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(l=n.reduce((t,n)=>n(o,t,e),l),l=(i.get(o)||[]).reduce((t,n)=>n(o,t,e),l)),s.concat(l)},new $e):new $e}function zn(e){return(t,n,r)=>Rn(n,e,!0,r)}function $n(e,t,n){if(!Mn(t,"\n")){if(Dn(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert("\n");if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;null!=r;){if(Dn(r,n))return t.insert("\n");const e=n.query(r);if(e&&e.prototype instanceof Xe)return t.insert("\n");r=r.firstChild}}}return t}function Un(e,t){let n=t;for(let t=e.length-1;t>=0;t-=1){const r=e[t];e[t]={delta:n.transform(r.delta,!0),range:r.range&&Fn(r.range,n)},n=r.delta.transform(n),0===e[t].delta.length()&&e.splice(t,1)}}function Fn(e,t){if(!e)return e;const n=t.transformPosition(e.index);return{index:n,length:t.transformPosition(e.index+e.length)-n}}class Hn extends Nt{constructor(e,t){super(e,t),e.root.addEventListener("drop",t=>{t.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(t.clientX,t.clientY);else if(document.caretPositionFromPoint){const e=document.caretPositionFromPoint(t.clientX,t.clientY);n=document.createRange(),n.setStart(e.offsetNode,e.offset),n.setEnd(e.offsetNode,e.offset)}const r=n&&e.selection.normalizeNative(n);if(r){const n=e.selection.normalizedToRange(r);t.dataTransfer?.files&&this.upload(n,t.dataTransfer.files)}})}upload(e,t){const n=[];Array.from(t).forEach(e=>{e&&this.options.mimetypes?.includes(e.type)&&n.push(e)}),n.length>0&&this.options.handler.call(this,e,n)}}Hn.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(e=>new Promise(t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}));Promise.all(n).then(t=>{const n=t.reduce((e,t)=>e.insert({image:t}),(new $e).retain(e.index).delete(e.length));this.quill.updateContents(n,ct.sources.USER),this.quill.setSelection(e.index+t.length,ct.sources.SILENT)})}};const Vn=Hn,Wn=["insertText","insertReplacementText"],Gn=/Mac/i.test(navigator.platform);Mt.register({"blots/block":Ze,"blots/block/embed":Xe,"blots/break":Fe,"blots/container":Ut,"blots/cursor":et,"blots/embed":_t,"blots/inline":Ke,"blots/scroll":class extends Pe{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Ze;static allowedChildren=[Ze,Xe,Ut];constructor(e,t,n){let{emitter:r}=n;super(e,t),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",e=>this.handleDragStart(e))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(ct.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(ct.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(ct.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,r]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),null!=i&&n!==i&&r>0){if(n instanceof Xe||i instanceof Xe)return void this.optimize();const e=i.children.head instanceof Fe?null:i.children.head;n.moveChildren(i,e),n.remove()}this.optimize()}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(null==n||null==this.scroll.query(t,de.BLOCK)){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e),null==n&&t.endsWith("\n")?e.insertAt(0,t.slice(0,-1),n):e.insertAt(0,t,n)}else{const e=this.scroll.create(t,n);this.appendChild(e)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===de.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat((new $e).insert("\n"))),r=n.pop();if(null==r)return;this.batchStart();const i=n.shift();if(i){const t="block"===i.type&&(0===i.delta.length()||!this.descendant(Xe,e)[0]&&e<this.length()),n="block"===i.type?i.delta:(new $e).insert({[i.key]:i.value});Vt(this,e,n);const r="block"===i.type?1:0,s=e+n.length()+r;t&&this.insertAt(s-1,"\n");const o=Qe(this.line(e)[0]),l=$e.AttributeMap.diff(o,i.attributes)||{};Object.keys(l).forEach(e=>{this.formatAt(s-1,1,e,l[e])}),e=s}let[s,o]=this.children.find(e);n.length&&(s&&(s=s.split(o),o=0),n.forEach(e=>{if("block"===e.type)Vt(this.createBlock(e.attributes,s||void 0),0,e.delta);else{const t=this.create(e.key,e.value);this.insertBefore(t,s||void 0),Object.keys(e.attributes).forEach(n=>{t.format(n,e.attributes[n])})}})),"block"===r.type&&r.delta.length()&&Vt(this,s?s.offset(s.scroll)+o:this.length(),r.delta),this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,r]=t;return n instanceof _e?[n,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Ft,e)}lines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(e,t,r)=>{let i=[],s=r;return e.children.forEachAt(t,r,(e,t,r)=>{Ft(e)?i.push(e):e instanceof Re&&(i=i.concat(n(e,t,s))),s-=r}),i};return n(this,e,t)}optimize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(ct.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch)return void(Array.isArray(e)&&(this.batch=this.batch.concat(e)));let t=ct.sources.USER;"string"==typeof e&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),(e=e.filter(e=>{let{target:t}=e;const n=this.find(t,!0);return n&&!Ht(n)})).length>0&&this.emitter.emit(ct.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(ct.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[r]=this.descendant(e=>e instanceof Xe,e);r&&r.statics.blotName===t&&Ht(r)&&r.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new $e;return e.forEach(e=>{const r=e?.insert;if(r)if("string"==typeof r){const i=r.split("\n");i.slice(0,-1).forEach(r=>{n.insert(r,e.attributes),t.push({type:"block",delta:n,attributes:e.attributes??{}}),n=new $e});const s=i[i.length-1];s&&n.insert(s,e.attributes)}else{const i=Object.keys(r)[0];if(!i)return;this.query(i,de.INLINE)?n.push(e):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new $e,t.push({type:"blockEmbed",key:i,value:r[i],attributes:e.attributes??{}}))}}),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const r={};Object.entries(e).forEach(e=>{let[t,i]=e;null!=this.query(t,de.BLOCK&de.BLOT)?n=t:r[t]=i});const i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,t||void 0);const s=i.length();return Object.entries(r).forEach(e=>{let[t,n]=e;i.formatAt(0,s,t,n)}),i}},"blots/text":He,"modules/clipboard":class extends Nt{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",e=>this.onCaptureCopy(e,!1)),this.quill.root.addEventListener("cut",e=>this.onCaptureCopy(e,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],On.concat(this.options.matchers??[]).forEach(e=>{let[t,n]=e;this.addMatcher(t,n)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[nn.blotName])return(new $e).insert(n||"",{[nn.blotName]:r[nn.blotName]});if(!t)return(new $e).insert(n||"",r);const i=this.convertHTML(t);return Mn(i,"\n")&&(null==i.ops[i.ops.length-1].attributes||r.table)?i.compose((new $e).retain(i.length()-1).delete(1)):i}normalizeHTML(e){(e=>{e.documentElement&&Tn.forEach(t=>{t(e)})})(e)}convertHTML(e){const t=(new DOMParser).parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,r=new WeakMap,[i,s]=this.prepareMatching(n,r);return Bn(this.quill.scroll,n,i,s,r)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mt.sources.API;if("string"==typeof e){const n=this.convert({html:e,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,Mt.sources.SILENT)}else{const r=this.convert({html:t,text:""});this.quill.updateContents((new $e).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),Mt.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:r,text:i}=this.onCopy(n,t);e.clipboardData?.setData("text/plain",i),e.clipboardData?.setData("text/html",r),t&&Nn({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(e=>"#"!==e[0]).join("\n")}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(null==t)return;const n=e.clipboardData?.getData("text/html");let r=e.clipboardData?.getData("text/plain");if(!n&&!r){const t=e.clipboardData?.getData("text/uri-list");t&&(r=this.normalizeURIList(t))}const i=Array.from(e.clipboardData?.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(t,i);else{if(n&&i.length>0){const e=(new DOMParser).parseFromString(n,"text/html");if(1===e.body.childElementCount&&"IMG"===e.body.firstElementChild?.tagName)return void this.quill.uploader.upload(t,i)}this.onPaste(t,{html:n,text:r})}}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:r}=t;const i=this.quill.getFormat(e.index),s=this.convert({text:n,html:r},i);Ln.log("onPaste",s,{text:n,html:r});const o=(new $e).retain(e.index).delete(e.length).concat(s);this.quill.updateContents(o,Mt.sources.USER),this.quill.setSelection(o.length()-e.length,Mt.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],r=[];return this.matchers.forEach(i=>{const[s,o]=i;switch(s){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(e.querySelectorAll(s)).forEach(e=>{if(t.has(e)){const n=t.get(e);n?.push(o)}else t.set(e,[o])})}}),[n,r]}},"modules/history":class extends Nt{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on(Mt.events.EDITOR_CHANGE,(e,t,n,r)=>{e===Mt.events.SELECTION_CHANGE?t&&r!==Mt.sources.SILENT&&(this.currentRange=t):e===Mt.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==Mt.sources.USER?this.transform(t):this.record(t,n)),this.currentRange=Fn(this.currentRange,t))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",e=>{"historyUndo"===e.inputType?(this.undo(),e.preventDefault()):"historyRedo"===e.inputType&&(this.redo(),e.preventDefault())})}change(e,t){if(0===this.stack[e].length)return;const n=this.stack[e].pop();if(!n)return;const r=this.quill.getContents(),i=n.delta.invert(r);this.stack[t].push({delta:i,range:Fn(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,Mt.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(0===e.ops.length)return;this.stack.redo=[];let n=e.invert(t),r=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const e=this.stack.undo.pop();e&&(n=n.compose(e.delta),r=e.range)}else this.lastRecorded=i;0!==n.length()&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Un(this.stack.undo,e),Un(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,Mt.sources.USER);else{const t=function(e,t){const n=t.reduce((e,t)=>e+(t.delete||0),0);let r=t.length()-n;return function(e,t){const n=t.ops[t.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some(t=>null!=e.query(t,de.BLOCK)))}(e,t)&&(r-=1),r}(this.quill.scroll,e.delta);this.quill.setSelection(t,Mt.sources.USER)}}},"modules/keyboard":gn,"modules/uploader":Vn,"modules/input":class extends Nt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",e=>{this.handleBeforeInput(e)}),/Android/i.test(navigator.userAgent)||e.on(Mt.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Nn({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.length)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents((new $e).retain(e.index).insert(t,n),Mt.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,Mt.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Wn.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||!0===t.collapsed)return;const n=function(e){return"string"==typeof e.data?e.data:e.dataTransfer?.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}(e);if(null==n)return;const r=this.quill.selection.normalizeNative(t),i=r?this.quill.selection.normalizedToRange(r):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}},"modules/uiNode":class extends Nt{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:n,event:r}=t;if(!(n instanceof Ce&&n.uiNode))return!0;const i="rtl"===getComputedStyle(n.domNode).direction;return!!(i&&"ArrowRight"!==r.key||!i&&"ArrowLeft"!==r.key)||(this.quill.setSelection(e.index-1,e.length+(r.shiftKey?1:0),Mt.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&(e=>"ArrowLeft"===e.key||"ArrowRight"===e.key||"ArrowUp"===e.key||"ArrowDown"===e.key||"Home"===e.key||!(!Gn||"a"!==e.key||!0!==e.ctrlKey))(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,this.isListening||(this.isListening=!0,document.addEventListener("selectionchange",()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()},{once:!0}))}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(!0!==t.collapsed||0!==t.startOffset)return;const n=this.quill.scroll.find(t.startContainer);if(!(n instanceof Ce&&n.uiNode))return;const r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(r)}}});const Kn=Mt,Zn=new class extends be{add(e,t){let n=0;if("+1"===t||"-1"===t){const r=this.value(e)||0;n="+1"===t?r+1:r-1}else"number"==typeof t&&(n=t);return 0===n?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}("indent","ql-indent",{scope:de.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Xn=Zn;class Yn extends Ut{}Yn.blotName="list-container",Yn.tagName="OL";class Qn extends Ze{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){Mt.register(Yn)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),r=n=>{if(!e.isEnabled())return;const r=this.statics.formats(t,e);"checked"===r?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===r&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Qn.blotName="list",Qn.tagName="LI",Yn.allowedChildren=[Qn],Qn.requiredContainer=Yn;const Jn=class extends Ke{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};class er extends Ke{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return tr(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("href",this.constructor.sanitize(t)):super.format(e,t)}}function tr(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}const nr=["alt","height","width"],rr=["height","width"],ir=new be("code-token","hljs",{scope:de.INLINE});class sr extends Ke{static formats(e,t){for(;null!=e&&e!==t.domNode;){if(e.classList&&e.classList.contains(nn.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),ir.add(this.domNode,n)}format(e,t){e!==sr.blotName?super.format(e,t):t?ir.add(this.domNode,t):(ir.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),ir.value(this.domNode)||this.unwrap()}}sr.blotName="code-token",sr.className="ql-token";class or extends nn{static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),sr.blotName,!1),super.replaceWith(e,t)}}class lr extends tn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===or.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,r){n===or.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,r)}highlight(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const n=`${Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).map(e=>e.textContent).join("\n")}\n`,r=or.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||null==this.cachedText){const t=this.children.reduce((e,t)=>e.concat(Ye(t,!1)),new $e),i=e(n,r);t.diff(i).reduce((e,t)=>{let{retain:n,attributes:r}=t;return n?(r&&Object.keys(r).forEach(t=>{[or.blotName,sr.blotName].includes(t)&&this.formatAt(e,n,t,r[t])}),e+n):e},0)}this.cachedText=n,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`<pre data-language="${n?or.formats(n.domNode):"plain"}">\n${We(this.code(e,t))}\n</pre>`}optimize(e){if(super.optimize(e),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const e=or.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}lr.allowedChildren=[or],or.requiredContainer=lr,or.allowedChildren=[sr,et,He,Fe];class ar extends Nt{static register(){Mt.register(sr,!0),Mt.register(or,!0),Mt.register(lr,!0)}constructor(e,t){if(super(e,t),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((e,t)=>{let{key:n}=t;return e[n]=!0,e},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(Mt.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof lr))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(e=>{let{key:n,label:r}=e;const i=t.ownerDocument.createElement("option");i.textContent=r,i.setAttribute("value",n),t.appendChild(i)}),t.addEventListener("change",()=>{e.format(or.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),null==e.uiNode&&(e.attachUI(t),e.children.head&&(t.value=or.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(Mt.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(Mt.sources.USER);const n=this.quill.getSelection();(null==e?this.quill.scroll.descendants(lr):[e]).forEach(e=>{e.highlight(this.highlightBlot,t)}),this.quill.update(Mt.sources.SILENT),null!=n&&this.quill.setSelection(n,Mt.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(t=this.languages[t]?t:"plain","plain"===t)return We(e).split("\n").reduce((e,n,r)=>(0!==r&&e.insert("\n",{[nn.blotName]:t}),e.insert(n)),new $e);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(nn.className),n.innerHTML=((e,t,n)=>{if("string"==typeof e.versionString){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value})(this.options.hljs,t,e),Bn(this.quill.scroll,n,[(e,t)=>{const n=ir.value(e);return n?t.compose((new $e).retain(t.length(),{[sr.blotName]:n})):t}],[(e,n)=>e.data.split("\n").reduce((e,n,r)=>(0!==r&&e.insert("\n",{[nn.blotName]:t}),e.insert(n)),n)],new WeakMap)}}ar.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class cr extends Ze{static blotName="table";static tagName="TD";static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",fr()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===cr.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class ur extends Ut{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach(e=>{if(null==e.next)return;const t=e.formats(),n=e.next.formats();if(t.table!==n.table){const t=this.splitAfter(e);t&&t.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class dr extends Ut{static blotName="table-body";static tagName="TBODY"}class hr extends Ut{static blotName="table-container";static tagName="TABLE";balanceCells(){const e=this.descendants(ur),t=e.reduce((e,t)=>Math.max(t.children.length,e),0);e.forEach(e=>{new Array(t-e.children.length).fill(0).forEach(()=>{let t;null!=e.children.head&&(t=cr.formats(e.children.head.domNode));const n=this.scroll.create(cr.blotName,t);e.appendChild(n),n.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(dr);null!=t&&null!=t.children.head&&t.children.forEach(t=>{const n=t.children.at(e);null!=n&&n.remove()})}insertColumn(e){const[t]=this.descendant(dr);null!=t&&null!=t.children.head&&t.children.forEach(t=>{const n=t.children.at(e),r=cr.formats(t.children.head.domNode),i=this.scroll.create(cr.blotName,r);t.insertBefore(i,n)})}insertRow(e){const[t]=this.descendant(dr);if(null==t||null==t.children.head)return;const n=fr(),r=this.scroll.create(ur.blotName);t.children.head.children.forEach(()=>{const e=this.scroll.create(cr.blotName,n);r.appendChild(e)});const i=t.children.at(e);t.insertBefore(r,i)}rows(){const e=this.children.head;return null==e?[]:e.children.map(e=>e)}}function fr(){return`row-${Math.random().toString(36).slice(2,6)}`}hr.allowedChildren=[dr],dr.requiredContainer=hr,dr.allowedChildren=[ur],ur.requiredContainer=dr,ur.allowedChildren=[cr],cr.requiredContainer=ur;const pr=lt("quill:toolbar");class mr extends Nt{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const t=document.createElement("div");t.setAttribute("role","toolbar"),function(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(e=>{if("string"==typeof e)gr(n,e);else{const t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(e=>{const t=document.createElement("option");!1!==e?t.setAttribute("value",String(e)):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}(n,t,r):gr(n,t,r)}}),e.appendChild(n)})}(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(e=>{const t=this.options.handlers?.[e];t&&this.addHandler(e,t)}),Array.from(this.container.querySelectorAll("button, select")).forEach(e=>{this.attach(e)}),this.quill.on(Mt.events.EDITOR_CHANGE,()=>{const[e]=this.quill.selection.getRange();this.update(e)})):pr.error("Container required for toolbar",this.options)}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(e=>0===e.indexOf("ql-"));if(!t)return;if(t=t.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[t]&&null==this.quill.scroll.query(t))return void pr.warn("ignoring attaching to nonexistent format",t,e);const n="SELECT"===e.tagName?"change":"click";e.addEventListener(n,n=>{let r;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;const t=e.options[e.selectedIndex];r=!t.hasAttribute("selected")&&(t.value||!1)}else r=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),n.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[t])this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof Me){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents((new $e).retain(i.index).delete(i.length).insert({[t]:r}),Mt.sources.USER)}else this.quill.format(t,r,Mt.sources.USER);this.update(i)}),this.controls.push([t,e])}update(e){const t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[r,i]=n;if("SELECT"===i.tagName){let n=null;if(null==e)n=null;else if(null==t[r])n=i.querySelector("option[selected]");else if(!Array.isArray(t[r])){let e=t[r];"string"==typeof e&&(e=e.replace(/"/g,'\\"')),n=i.querySelector(`option[value="${e}"]`)}null==n?(i.value="",i.selectedIndex=-1):n.selected=!0}else if(null==e)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const e=t[r],n=e===i.getAttribute("value")||null!=e&&e.toString()===i.getAttribute("value")||null==e&&!i.getAttribute("value");i.classList.toggle("ql-active",n),i.setAttribute("aria-pressed",n.toString())}else{const e=null!=t[r];i.classList.toggle("ql-active",e),i.setAttribute("aria-pressed",e.toString())}})}}function gr(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),null!=n?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}mr.DEFAULTS={},mr.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(null!=e)if(0===e.length){const e=this.quill.getFormat();Object.keys(e).forEach(e=>{null!=this.quill.scroll.query(e,de.INLINE)&&this.quill.format(e,!1,Mt.sources.USER)})}else this.quill.removeFormat(e.index,e.length,Mt.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();"rtl"===e&&null==t?this.quill.format("align","right",Mt.sources.USER):e||"right"!==t||this.quill.format("align",!1,Mt.sources.USER),this.quill.format("direction",e,Mt.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if("+1"===e||"-1"===e){let t="+1"===e?1:-1;"rtl"===n.direction&&(t*=-1),this.quill.format("indent",r+t,Mt.sources.USER)}},link(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,Mt.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,Mt.sources.USER):this.quill.format("list","unchecked",Mt.sources.USER):this.quill.format("list",e,Mt.sources.USER)}}};const br='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',yr={align:{"":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',center:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',right:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',justify:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>'},background:'<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',blockquote:'<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',bold:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',clean:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',code:br,"code-block":br,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'};let vr=0;function xr(e,t){e.setAttribute(t,`${!("true"===e.getAttribute(t))}`)}const wr=class{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),xr(this.label,"aria-expanded"),xr(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.selectItem(t,!0),e.preventDefault();break;case"Escape":this.escape(),e.preventDefault()}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${vr}`,vr+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),!0===t.selected&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.container.querySelector(".ql-selected");e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);const t=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Nr=class extends wr{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(e=>{e.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),r=e&&e.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}},kr=class extends wr{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(e=>{e.innerHTML=t[e.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(null!=n){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}},_r=class{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(e=>{const{overflowY:t}=getComputedStyle(e,null);return"visible"!==t&&"clip"!==t})(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let s=0;if(i.right>r.right&&(s=r.right-i.right,this.root.style.left=`${t+s}px`),i.left<r.left&&(s=r.left-i.left,this.root.style.left=`${t+s}px`),i.bottom>r.bottom){const t=i.bottom-i.top,r=e.bottom-e.top+t;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},Ar=[!1,"center","right","justify"],Er=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Sr=[!1,"serif","monospace"],Cr=["1","2","3",!1],Tr=["small",!1,"large","huge"];class Lr extends St{constructor(e,t){super(e,t);const n=t=>{document.body.contains(e.root)?(null==this.tooltip||this.tooltip.root.contains(t.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach(e=>{e.container.contains(t.target)||e.close()})):document.body.removeEventListener("click",n)};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return"toolbar"===e&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(e=>{(e.getAttribute("class")||"").split(/\s+/).forEach(n=>{if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{const r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(e=>{if(e.classList.contains("ql-align")&&(null==e.querySelector("option")&&qr(e,Ar),"object"==typeof t.align))return new kr(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){const n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&qr(e,Er,"background"===n?"#ffffff":"#000000"),new Nr(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?qr(e,Sr):e.classList.contains("ql-header")?qr(e,Cr):e.classList.contains("ql-size")&&qr(e,Tr)),new wr(e)}),this.quill.on(ct.events.EDITOR_CHANGE,()=>{this.pickers.forEach(e=>{e.update()})})}}Lr.DEFAULTS=(0,ue.merge)({},St.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");null==e&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Or extends _r{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{"Enter"===e.key?(this.save(),e.preventDefault()):"Escape"===e.key&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ct.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ct.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=function(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(null!=t){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,ct.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",ct.sources.USER),this.quill.setSelection(n+2,ct.sources.USER)}break}}this.textbox.value="",this.hide()}}function qr(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(t=>{const r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(t)),e.appendChild(r)})}const jr=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Rr extends Or{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(e,t){super(e,t),this.quill.on(ct.events.EDITOR_CHANGE,(e,t,n,r)=>{if(e===ct.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===ct.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const e=this.quill.getLines(t.index,t.length);if(1===e.length){const e=this.quill.getBounds(t);null!=e&&this.position(e)}else{const n=e[e.length-1],r=this.quill.getIndex(n),i=Math.min(n.length()-1,t.index+t.length-r),s=this.quill.getBounds(new dt(r,i));null!=s&&this.position(s)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ct.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(null!=e){const t=this.quill.getBounds(e);null!=t&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==t&&(n.style.marginLeft=-1*t-n.offsetWidth/2+"px"),t}}class Mr extends Lr{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=jr),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Rr(this.quill,this.options.bounds),null!=e.container&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),yr),this.buildPickers(e.container.querySelectorAll("select"),yr))}}Mr.DEFAULTS=(0,ue.merge)({},Lr.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,Mt.sources.USER)}}}}});const Dr=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ir extends Or{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(null!=this.linkRange){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,ct.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(ct.events.SELECTION_CHANGE,(e,t,n)=>{if(null!=e){if(0===e.length&&n===ct.sources.USER){const[t,n]=this.quill.scroll.descendant(er,e.index);if(null!=t){this.linkRange=new dt(e.index-n,t.length());const r=er.formats(t.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const i=this.quill.getBounds(this.linkRange);return void(null!=i&&this.position(i))}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class Pr extends Lr{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=Dr),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){null!=e.container&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),yr),this.buildPickers(e.container.querySelectorAll("select"),yr),this.tooltip=new Ir(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}Pr.DEFAULTS=(0,ue.merge)({},Lr.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const e=this.quill.getSelection();if(null==e||0===e.length)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&0!==t.indexOf("mailto:")&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,Mt.sources.USER)}}}}});const Br=Pr;Kn.register({"attributors/attribute/direction":on,"attributors/class/align":Kt,"attributors/class/background":Jt,"attributors/class/color":Yt,"attributors/class/direction":ln,"attributors/class/font":un,"attributors/class/size":hn,"attributors/style/align":Zt,"attributors/style/background":en,"attributors/style/color":Qt,"attributors/style/direction":an,"attributors/style/font":dn,"attributors/style/size":fn},!0),Kn.register({"formats/align":Kt,"formats/direction":ln,"formats/indent":Xn,"formats/background":en,"formats/color":Qt,"formats/font":un,"formats/size":hn,"formats/blockquote":class extends Ze{static blotName="blockquote";static tagName="blockquote"},"formats/code-block":nn,"formats/header":class extends Ze{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}},"formats/list":Qn,"formats/bold":Jn,"formats/code":rn,"formats/italic":class extends Jn{static blotName="italic";static tagName=["EM","I"]},"formats/link":er,"formats/script":class extends Ke{static blotName="script";static tagName=["SUB","SUP"];static create(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):super.create(e)}static formats(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}},"formats/strike":class extends Jn{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":class extends Ke{static blotName="underline";static tagName="U"},"formats/formula":class extends _t{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return"string"==typeof e&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}},"formats/image":class extends Me{static blotName="image";static tagName="IMG";static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return nr.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return tr(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){nr.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},"formats/video":class extends Xe{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return rr.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return er.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){rr.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}},"modules/syntax":ar,"modules/table":class extends Nt{static register(){Mt.register(cr),Mt.register(ur),Mt.register(dr),Mt.register(hr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(hr).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();null!=t&&(e.deleteColumn(t.cellOffset()),this.quill.update(Mt.sources.USER))}deleteRow(){const[,e]=this.getTable();null!=e&&(e.remove(),this.quill.update(Mt.sources.USER))}deleteTable(){const[e]=this.getTable();if(null==e)return;const t=e.offset();e.remove(),this.quill.update(Mt.sources.USER),this.quill.setSelection(t,Mt.sources.SILENT)}getTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==e)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(null==t||t.statics.blotName!==cr.blotName)return[null,null,null,-1];const r=t.parent;return[r.parent.parent,r,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,r,i]=this.getTable(t);if(null==i)return;const s=i.cellOffset();n.insertColumn(s+e),this.quill.update(Mt.sources.USER);let o=r.rowOffset();0===e&&(o+=1),this.quill.setSelection(t.index+o,t.length,Mt.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,r,i]=this.getTable(t);if(null==i)return;const s=r.rowOffset();n.insertRow(s+e),this.quill.update(Mt.sources.USER),e>0?this.quill.setSelection(t,Mt.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,Mt.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(null==n)return;const r=new Array(e).fill(0).reduce(e=>{const n=new Array(t).fill("\n").join("");return e.insert(n,{table:fr()})},(new $e).retain(n.index));this.quill.updateContents(r,Mt.sources.USER),this.quill.setSelection(n.index,Mt.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(Mt.events.SCROLL_OPTIMIZE,e=>{e.some(e=>!!["TD","TR","TBODY","TABLE"].includes(e.target.tagName)&&(this.quill.once(Mt.events.TEXT_CHANGE,(e,t,n)=>{n===Mt.sources.USER&&this.balanceTables()}),!0))})}},"modules/toolbar":mr,"themes/bubble":Mr,"themes/snow":Br,"ui/icons":yr,"ui/picker":wr,"ui/icon-picker":kr,"ui/color-picker":Nr,"ui/tooltip":_r},!0);const zr=Kn,$r=(e,t="image")=>{if("undefined"==typeof wp||!wp.media)return;const n=wp.media({title:(0,l.__)("Select or Upload Media","dokan-lite"),button:{text:(0,l.__)("Use this media","dokan-lite")},library:{type:t},multiple:!1});n.on("select",()=>{const t=n.state().get("selection").first().toJSON();e(t.url,t)}),n.open()},Ur=(0,o.forwardRef)((e,t)=>{const{value:n,onChange:r,readOnly:i=!1,theme:s="snow",modules:l,...u}=e,d=(0,o.useRef)(null),h=(0,o.useRef)(null),f=(0,o.useRef)(r),p=(0,o.useRef)(!1);return(0,o.useImperativeHandle)(t,()=>h.current,[]),(0,o.useEffect)(()=>{f.current=r},[r]),(0,o.useEffect)(()=>{if(!d.current)return;const e=d.current.appendChild(d.current.ownerDocument.createElement("div")),t={toolbar:{container:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{color:[]},{background:[]}],["link","image"],["clean"]],handlers:{image:()=>{const e=h.current;e&&$r((t,n)=>{const r=e.getSelection(!0),i=n.alt||n.title||"";e.clipboard.dangerouslyPasteHTML(r.index,(0,c.sanitizeHTML)(`<img src="${t}" alt="${i}" />`,{tags:["img"],attr:["src","alt"]}),"user"),e.setSelection(r.index+1,"silent")},"image")},video:()=>{const e=h.current;e&&$r(t=>{const n=e.getSelection(!0);e.clipboard.dangerouslyPasteHTML(n.index,(0,c.sanitizeHTML)(`<video class="ql-video" height="280" width="500" controls src="${t}"></video>`,{tags:["video"],attr:["src","height","width","controls","class"]}),"user"),e.setSelection(n.index+1,"silent")},"video")}}}},r={...t,...l,toolbar:{...t.toolbar,...l?.toolbar,handlers:{...t.toolbar?.handlers,...l?.toolbar?.handlers}}},o=new zr(e,{theme:s,modules:r,readOnly:i,...u});return h.current=o,n&&o.clipboard.dangerouslyPasteHTML((0,c.sanitizeHTML)(n)),o.on("text-change",(e,t,n)=>{if("user"===n&&f.current){const e=o.root.innerHTML;p.current=!0,f.current("<p><br></p>"===e?"":e)}}),()=>{h.current=null,d.current&&(d.current.innerHTML="")}},[]),(0,o.useEffect)(()=>{if(p.current)return void(p.current=!1);const e=h.current;if(e&&n!==e.root.innerHTML){const t=e.getSelection();e.clipboard.dangerouslyPasteHTML((0,c.sanitizeHTML)(n||"")),t&&e.setSelection(t.index,t.length,"silent")}},[n]),(0,o.useEffect)(()=>{h.current?.enable(!i)},[i]),(0,a.jsx)("div",{ref:d})});Ur.displayName="Editor";const Fr=Ur,Hr=function(e){var t,n,r,i,s,o;const l=(()=>{if("undefined"==typeof document)return;const e="dokan-select-menu-portal";let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,t.className="dokan-layout",document.body.appendChild(t)),t})();return(0,a.jsx)(Z.SearchableSelect,{components:{Control:te,DropdownIndicator:re,SingleValue:ee,ValueContainer:X,MultiValue:J,Option:Q,...e?.components?e.components:{}},styles:ie,className:"shadow-none",classNamePrefix:null!==(t=e.classNamePrefix)&&void 0!==t?t:"react-select",blurInputOnSelect:null===(n=e.blurInputOnSelect)||void 0===n||n,closeMenuOnSelect:null===(r=e.closeMenuOnSelect)||void 0===r||r,hideSelectedOptions:null!==(i=e.hideSelectedOptions)&&void 0!==i&&i,menuPortalTarget:null!==(s=e.menuPortalTarget)&&void 0!==s?s:l,menuPosition:null!==(o=e.menuPosition)&&void 0!==o?o:"fixed",...e})},Vr=({onSelect:e,children:t,multiple:n=!1,className:r,title:i,buttonText:s,uploaderParams:o,...c})=>{const u=()=>{const t=wp.media({title:i||(0,l.__)("Select or Upload Media","dokan-lite"),button:{text:s||(0,l.__)("Use this media")},multiple:n});o&&t.on("ready",()=>{const e=t.uploader;e&&(e.uploader?e.uploader.param({...o}):e.options.uploader.params={...e.options.uploader.params,...o})}),t.on("select",()=>{const r=t.state().get("selection");if(n)return void e(r.map(e=>e.toJSON()));const i=r.first().toJSON();i&&e(i)}),t.open()};if(c.as){const e=c.as;return(0,a.jsx)(e,{...c,onClick:u,className:r,children:t})}return(0,a.jsx)("div",{role:"button",onClick:u,className:r,children:t})};n(8409),n(8537),n(7046),n(891);const Wr={total_sales:"#7047EB",net_sales:"#4CA772",commissions:"#4EB9FA"};(0,l.__)("Total Sales","dokan-lite"),Wr.total_sales,(0,l.__)("Net Sales","dokan-lite"),Wr.net_sales,(0,l.__)("Commissions","dokan-lite"),Wr.commissions},4991(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(3552),s=n(576);const o=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:l="",children:a,iconNode:c,...u},d)=>(0,r.createElement)("svg",{ref:d,...i.A,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:(0,s.zP)("lucide",l),...!a&&!(0,s.m$)(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(a)?a:[a]]))},5098(e,t,n){"use strict";n.d(t,{a:()=>s});var r=n(1635),i=n(7482);function s(e,t){return void 0===t&&(t={}),(0,i.W)(e,(0,r.Cl)({delimiter:"."},t))}},5107(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(6203).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},5315(e,t,n){"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function s(){}n.d(t,{Ay:()=>w,Qh:()=>_});var o=.7,l=1/o,a="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,h=new RegExp(`^rgb\\(${a},${a},${a}\\)$`),f=new RegExp(`^rgb\\(${u},${u},${u}\\)$`),p=new RegExp(`^rgba\\(${a},${a},${a},${c}\\)$`),m=new RegExp(`^rgba\\(${u},${u},${u},${c}\\)$`),g=new RegExp(`^hsl\\(${c},${u},${u}\\)$`),b=new RegExp(`^hsla\\(${c},${u},${u},${c}\\)$`),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function x(){return this.rgb().formatRgb()}function w(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?N(t):3===n?new A(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?k(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?k(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=h.exec(e))?new A(t[1],t[2],t[3],1):(t=f.exec(e))?new A(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?k(t[1],t[2],t[3],t[4]):(t=m.exec(e))?k(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=b.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?N(y[e]):"transparent"===e?new A(NaN,NaN,NaN,0):null}function N(e){return new A(e>>16&255,e>>8&255,255&e,1)}function k(e,t,n,r){return r<=0&&(e=t=n=NaN),new A(e,t,n,r)}function _(e,t,n,r){return 1===arguments.length?((i=e)instanceof s||(i=w(i)),i?new A((i=i.rgb()).r,i.g,i.b,i.opacity):new A):new A(e,t,n,null==r?1:r);var i}function A(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function E(){return`#${L(this.r)}${L(this.g)}${L(this.b)}`}function S(){const e=C(this.opacity);return`${1===e?"rgb(":"rgba("}${T(this.r)}, ${T(this.g)}, ${T(this.b)}${1===e?")":`, ${e})`}`}function C(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function T(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function L(e){return((e=T(e))<16?"0":"")+e.toString(16)}function O(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new j(e,t,n,r)}function q(e){if(e instanceof j)return new j(e.h,e.s,e.l,e.opacity);if(e instanceof s||(e=w(e)),!e)return new j;if(e instanceof j)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,a=o-i,c=(o+i)/2;return a?(l=t===o?(n-r)/a+6*(n<r):n===o?(r-t)/a+2:(t-n)/a+4,a/=c<.5?o+i:2-o-i,l*=60):a=c>0&&c<1?0:l,new j(l,a,c,e.opacity)}function j(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function R(e){return(e=(e||0)%360)<0?e+360:e}function M(e){return Math.max(0,Math.min(1,e||0))}function D(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}r(s,w,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return q(this).formatHsl()},formatRgb:x,toString:x}),r(A,_,i(s,{brighter(e){return e=null==e?l:Math.pow(l,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?o:Math.pow(o,e),new A(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new A(T(this.r),T(this.g),T(this.b),C(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E,formatHex:E,formatHex8:function(){return`#${L(this.r)}${L(this.g)}${L(this.b)}${L(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:S,toString:S})),r(j,function(e,t,n,r){return 1===arguments.length?q(e):new j(e,t,n,null==r?1:r)},i(s,{brighter(e){return e=null==e?l:Math.pow(l,e),new j(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?o:Math.pow(o,e),new j(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new A(D(e>=240?e-240:e+120,i,r),D(e,i,r),D(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new j(R(this.h),M(this.s),M(this.l),C(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=C(this.opacity);return`${1===e?"hsl(":"hsla("}${R(this.h)}, ${100*M(this.s)}%, ${100*M(this.l)}%${1===e?")":`, ${e})`}`}}))},5606(e){var t=-1;function n(e,f,p,m,g){if(e===f)return e?[[0,e]]:[];if(null!=p){var y=function(e,t,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,i="number"==typeof n?null:n.newRange,s=e.length,o=t.length;if(0===r.length&&(null===i||0===i.length)){var l=r.index,a=e.slice(0,l),c=e.slice(l),u=i?i.index:null,d=l+o-s;if((null===u||u===d)&&!(d<0||d>o)){var h=t.slice(0,d);if((m=t.slice(d))===c){var f=Math.min(l,d);if((y=a.slice(0,f))===(x=h.slice(0,f)))return b(y,a.slice(f),h.slice(f),c)}}if(null===u||u===l){var p=l,m=(h=t.slice(0,p),t.slice(p));if(h===a){var g=Math.min(s-p,o-p);if((v=c.slice(c.length-g))===(w=m.slice(m.length-g)))return b(a,c.slice(0,c.length-g),m.slice(0,m.length-g),v)}}}if(r.length>0&&i&&0===i.length){var y=e.slice(0,r.index),v=e.slice(r.index+r.length);if(!(o<(f=y.length)+(g=v.length))){var x=t.slice(0,f),w=t.slice(o-g);if(y===x&&v===w)return b(y,e.slice(f,s-g),t.slice(f,o-g),v)}}return null}(e,f,p);if(y)return y}var v=i(e,f),x=e.substring(0,v);v=o(e=e.substring(v),f=f.substring(v));var w=e.substring(e.length-v),N=function(e,s){var l;if(!e)return[[1,s]];if(!s)return[[t,e]];var a=e.length>s.length?e:s,c=e.length>s.length?s:e,u=a.indexOf(c);if(-1!==u)return l=[[1,a.substring(0,u)],[0,c],[1,a.substring(u+c.length)]],e.length>s.length&&(l[0][0]=l[2][0]=t),l;if(1===c.length)return[[t,e],[1,s]];var d=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function s(e,t,n){for(var r,s,l,a,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!==(u=t.indexOf(c,u+1));){var h=i(e.substring(n),t.substring(u)),f=o(e.substring(0,n),t.substring(0,u));d.length<f+h&&(d=t.substring(u-f,u)+t.substring(u,u+h),r=e.substring(0,n-f),s=e.substring(n+h),l=t.substring(0,u-f),a=t.substring(u+h))}return 2*d.length>=e.length?[r,s,l,a,d]:null}var l,a,c,u,d,h=s(n,r,Math.ceil(n.length/4)),f=s(n,r,Math.ceil(n.length/2));return h||f?(l=f?h&&h[4].length>f[4].length?h:f:h,e.length>t.length?(a=l[0],c=l[1],u=l[2],d=l[3]):(u=l[0],d=l[1],a=l[2],c=l[3]),[a,c,u,d,l[4]]):null}(e,s);if(d){var h=d[0],f=d[1],p=d[2],m=d[3],g=d[4],b=n(h,p),y=n(f,m);return b.concat([[0,g]],y)}return function(e,n){for(var i=e.length,s=n.length,o=Math.ceil((i+s)/2),l=o,a=2*o,c=new Array(a),u=new Array(a),d=0;d<a;d++)c[d]=-1,u[d]=-1;c[l+1]=0,u[l+1]=0;for(var h=i-s,f=h%2!=0,p=0,m=0,g=0,b=0,y=0;y<o;y++){for(var v=-y+p;v<=y-m;v+=2){for(var x=l+v,w=(E=v===-y||v!==y&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-v;E<i&&w<s&&e.charAt(E)===n.charAt(w);)E++,w++;if(c[x]=E,E>i)m+=2;else if(w>s)p+=2;else if(f&&(_=l+h-v)>=0&&_<a&&-1!==u[_]&&E>=(k=i-u[_]))return r(e,n,E,w)}for(var N=-y+g;N<=y-b;N+=2){for(var k,_=l+N,A=(k=N===-y||N!==y&&u[_-1]<u[_+1]?u[_+1]:u[_-1]+1)-N;k<i&&A<s&&e.charAt(i-k-1)===n.charAt(s-A-1);)k++,A++;if(u[_]=k,k>i)b+=2;else if(A>s)g+=2;else if(!f){var E;if((x=l+h-N)>=0&&x<a&&-1!==c[x])if(w=l+(E=c[x])-x,E>=(k=i-k))return r(e,n,E,w)}}}return[[t,e],[1,n]]}(e,s)}(e=e.substring(0,e.length-v),f=f.substring(0,f.length-v));return x&&N.unshift([0,x]),w&&N.push([0,w]),h(N,g),m&&function(e){for(var n=!1,r=[],i=0,f=null,p=0,m=0,g=0,b=0,y=0;p<e.length;)0==e[p][0]?(r[i++]=p,m=b,g=y,b=0,y=0,f=e[p][1]):(1==e[p][0]?b+=e[p][1].length:y+=e[p][1].length,f&&f.length<=Math.max(m,g)&&f.length<=Math.max(b,y)&&(e.splice(r[i-1],0,[t,f]),e[r[i-1]+1][0]=1,i--,p=--i>0?r[i-1]:-1,m=0,g=0,b=0,y=0,f=null,n=!0)),p++;for(n&&h(e),function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(l),s=r.match(l),o=i&&n.match(a),h=s&&r.match(a),f=o&&n.match(c),p=h&&r.match(c),m=f&&e.match(u),g=p&&t.match(d);return m||g?5:f||p?4:i&&!o&&h?3:o||h?2:i||s?1:0}for(var n=1;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],h=o(r,i);if(h){var f=i.substring(i.length-h);r=r.substring(0,r.length-h),i=f+i.substring(0,i.length-h),s=f+s}for(var p=r,m=i,g=s,b=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var y=t(r,i)+t(i,s);y>=b&&(b=y,p=r,m=i,g=s)}e[n-1][1]!=p&&(p?e[n-1][1]=p:(e.splice(n-1,1),n--),e[n][1]=m,g?e[n+1][1]=g:(e.splice(n+1,1),n--))}n++}}(e),p=1;p<e.length;){if(e[p-1][0]==t&&1==e[p][0]){var v=e[p-1][1],x=e[p][1],w=s(v,x),N=s(x,v);w>=N?(w>=v.length/2||w>=x.length/2)&&(e.splice(p,0,[0,x.substring(0,w)]),e[p-1][1]=v.substring(0,v.length-w),e[p+1][1]=x.substring(w),p++):(N>=v.length/2||N>=x.length/2)&&(e.splice(p,0,[0,v.substring(0,N)]),e[p-1][0]=1,e[p-1][1]=x.substring(0,x.length-N),e[p+1][0]=t,e[p+1][1]=v.substring(N),p++),p++}p++}}(N),N}function r(e,t,r,i){var s=e.substring(0,r),o=t.substring(0,i),l=e.substring(r),a=t.substring(i),c=n(s,o),u=n(l,a);return c.concat(u)}function i(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?s=n=i:r=i,i=Math.floor((r-n)/2+n);return f(e.charCodeAt(i-1))&&i--,i}function s(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var s=0,o=1;;){var l=e.substring(i-o),a=t.indexOf(l);if(-1==a)return s;o+=a,0!=a&&e.substring(i-o)!=t.substring(0,o)||(s=o,o++)}}function o(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?s=n=i:r=i,i=Math.floor((r-n)/2+n);return p(e.charCodeAt(e.length-i))&&i--,i}var l=/[^a-zA-Z0-9]/,a=/\s/,c=/[\r\n]/,u=/\n\r?\n$/,d=/^\r?\n\r?\n/;function h(e,n){e.push([0,""]);for(var r,s=0,l=0,a=0,c="",u="";s<e.length;)if(s<e.length-1&&!e[s][1])e.splice(s,1);else switch(e[s][0]){case 1:a++,u+=e[s][1],s++;break;case t:l++,c+=e[s][1],s++;break;case 0:var d=s-a-l-1;if(n){if(d>=0&&g(e[d][1])){var f=e[d][1].slice(-1);if(e[d][1]=e[d][1].slice(0,-1),c=f+c,u=f+u,!e[d][1]){e.splice(d,1),s--;var p=d-1;e[p]&&1===e[p][0]&&(a++,u=e[p][1]+u,p--),e[p]&&e[p][0]===t&&(l++,c=e[p][1]+c,p--),d=p}}m(e[s][1])&&(f=e[s][1].charAt(0),e[s][1]=e[s][1].slice(1),c+=f,u+=f)}if(s<e.length-1&&!e[s][1]){e.splice(s,1);break}if(c.length>0||u.length>0){c.length>0&&u.length>0&&(0!==(r=i(u,c))&&(d>=0?e[d][1]+=u.substring(0,r):(e.splice(0,0,[0,u.substring(0,r)]),s++),u=u.substring(r),c=c.substring(r)),0!==(r=o(u,c))&&(e[s][1]=u.substring(u.length-r)+e[s][1],u=u.substring(0,u.length-r),c=c.substring(0,c.length-r)));var b=a+l;0===c.length&&0===u.length?(e.splice(s-b,b),s-=b):0===c.length?(e.splice(s-b,b,[1,u]),s=s-b+1):0===u.length?(e.splice(s-b,b,[t,c]),s=s-b+1):(e.splice(s-b,b,[t,c],[1,u]),s=s-b+2)}0!==s&&0===e[s-1][0]?(e[s-1][1]+=e[s][1],e.splice(s,1)):s++,a=0,l=0,c="",u=""}""===e[e.length-1][1]&&e.pop();var y=!1;for(s=1;s<e.length-1;)0===e[s-1][0]&&0===e[s+1][0]&&(e[s][1].substring(e[s][1].length-e[s-1][1].length)===e[s-1][1]?(e[s][1]=e[s-1][1]+e[s][1].substring(0,e[s][1].length-e[s-1][1].length),e[s+1][1]=e[s-1][1]+e[s+1][1],e.splice(s-1,1),y=!0):e[s][1].substring(0,e[s+1][1].length)==e[s+1][1]&&(e[s-1][1]+=e[s+1][1],e[s][1]=e[s][1].substring(e[s+1][1].length)+e[s+1][1],e.splice(s+1,1),y=!0)),s++;y&&h(e,n)}function f(e){return e>=55296&&e<=56319}function p(e){return e>=56320&&e<=57343}function m(e){return p(e.charCodeAt(0))}function g(e){return f(e.charCodeAt(e.length-1))}function b(e,n,r,i){return g(e)||m(i)?null:function(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}([[0,e],[t,n],[1,r],[0,i]])}function y(e,t,r,i){return n(e,t,r,i,!0)}y.INSERT=1,y.DELETE=t,y.EQUAL=0,e.exports=y},5620(e,t,n){"use strict";n(6087),n(8395),n(790)},5654(e,t,n){"use strict";n.d(t,{useWindowDimensions:()=>i});var r=n(6087);function i(){const e=(0,r.useCallback)(()=>({width:"undefined"!=typeof window?window.innerWidth:null,height:"undefined"!=typeof window?window.innerHeight:null}),[]),[t,n]=(0,r.useState)(e());return(0,r.useEffect)(()=>{if("undefined"==typeof window)return;const t=()=>{window.requestAnimationFrame(()=>{n(e())})};return window.addEventListener("resize",t),t(),()=>{window.removeEventListener("resize",t)}},[e]),t}n(7143),n(1455),n(3832),window.dokan.productCategoriesStore,window.dokan.productsStore},5759(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.length=function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"object"==typeof e.retain&&null!==e.retain?1:"string"==typeof e.insert?e.insert.length:1}}(n||(n={})),t.default=n},5773(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(6203).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},5795(e){"use strict";e.exports=window.ReactDOM},6087(e){"use strict";e.exports=window.wp.element},6203(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1609),i=n(576),s=n(4991);const o=(e,t)=>{const n=(0,r.forwardRef)(({className:n,...o},l)=>(0,r.createElement)(s.A,{ref:l,iconNode:t,className:(0,i.zP)(`lucide-${(0,i.fX)((0,i.MX)(e))}`,`lucide-${e}`,n),...o}));return n.displayName=(0,i.MX)(e),n}},6427(e){"use strict";e.exports=window.wp.components},6541(e,t,n){"use strict";function r(e){return function(){return this.matches(e)}}function i(e){return function(t){return t.matches(e)}}n.d(t,{A:()=>r,j:()=>i})},6650(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(856),i=n(8446),s=n(790);const o={primary:{color:"purple",className:"dokan-btn"},secondary:{color:"blue",className:"dokan-btn-secondary"},tertiary:{color:"purple",className:"dokan-btn-tertiary"},info:{color:"blue",className:"dokan-btn-info"},success:{color:"green",className:"dokan-btn-success"},warning:{color:"yellow",className:"dokan-btn-warning"},danger:{color:"red",className:"dokan-btn-danger"},ghost:{color:"gray",className:"dokan-btn-ghost"}},l=({className:e="",variant:t="primary",...n})=>{const l=o[t];return(0,s.jsx)(i.Button,{color:l.color,className:(0,r.QP)(l.className,e),...n})}},6747(e,t,n){"use strict";function r(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}n.d(t,{A:()=>r})},7046(e,t,n){"use strict";n(1455)},7143(e){"use strict";e.exports=window.wp.data},7193(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Boolean]",l="[object Date]",a="[object Function]",c="[object GeneratorFunction]",u="[object Map]",d="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",m="[object Set]",g="[object String]",b="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",N="[object Float64Array]",k="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",C="[object Uint16Array]",T="[object Uint32Array]",L=/\w*$/,O=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,j={};j[s]=j["[object Array]"]=j[v]=j[x]=j[o]=j[l]=j[w]=j[N]=j[k]=j[_]=j[A]=j[u]=j[d]=j[h]=j[p]=j[m]=j[g]=j[b]=j[E]=j[S]=j[C]=j[T]=!0,j["[object Error]"]=j[a]=j[y]=!1;var R="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,M="object"==typeof self&&self&&self.Object===Object&&self,D=R||M||Function("return this")(),I=t&&!t.nodeType&&t,P=I&&e&&!e.nodeType&&e,B=P&&P.exports===I;function z(e,t){return e.set(t[0],t[1]),e}function $(e,t){return e.add(t),e}function U(e,t,n,r){var i=-1,s=e?e.length:0;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function F(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function H(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var G,K=Array.prototype,Z=Function.prototype,X=Object.prototype,Y=D["__core-js_shared__"],Q=(G=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",J=Z.toString,ee=X.hasOwnProperty,te=X.toString,ne=RegExp("^"+J.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=B?D.Buffer:void 0,ie=D.Symbol,se=D.Uint8Array,oe=V(Object.getPrototypeOf,Object),le=Object.create,ae=X.propertyIsEnumerable,ce=K.splice,ue=Object.getOwnPropertySymbols,de=re?re.isBuffer:void 0,he=V(Object.keys,Object),fe=De(D,"DataView"),pe=De(D,"Map"),me=De(D,"Promise"),ge=De(D,"Set"),be=De(D,"WeakMap"),ye=De(Object,"create"),ve=$e(fe),xe=$e(pe),we=$e(me),Ne=$e(ge),ke=$e(be),_e=ie?ie.prototype:void 0,Ae=_e?_e.valueOf:void 0;function Ee(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){this.__data__=new Se(e)}function Le(e,t,n){var r=e[t];ee.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function qe(e,t,n,r,i,f,y){var O;if(r&&(O=f?r(e,i,f,y):r(e)),void 0!==O)return O;if(!Ge(e))return e;var q=Fe(e);if(q){if(O=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,O)}else{var R=Pe(e),M=R==a||R==c;if(Ve(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(R==h||R==s||M&&!f){if(F(e))return f?e:{};if(O=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ge(t=oe(e))?le(t):{};var t}(M?{}:e),!t)return function(e,t){return Re(e,Ie(e),t)}(e,function(e,t){return e&&Re(t,Ke(t),e)}(O,e))}else{if(!j[R])return f?e:{};O=function(e,t,n,r){var i,s=e.constructor;switch(t){case v:return je(e);case o:case l:return new s(+e);case x:return function(e,t){var n=t?je(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case N:case k:case _:case A:case E:case S:case C:case T:return function(e,t){var n=t?je(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){return U(t?n(H(e),!0):H(e),z,new e.constructor)}(e,r,n);case d:case g:return new s(e);case p:return function(e){var t=new e.constructor(e.source,L.exec(e));return t.lastIndex=e.lastIndex,t}(e);case m:return function(e,t,n){return U(t?n(W(e),!0):W(e),$,new e.constructor)}(e,r,n);case b:return i=e,Ae?Object(Ae.call(i)):{}}}(e,R,qe,t)}}y||(y=new Te);var D=y.get(e);if(D)return D;if(y.set(e,O),!q)var I=n?function(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ke,Ie)}(e):Ke(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n););}(I||e,function(i,s){I&&(i=e[s=i]),Le(O,s,qe(i,t,n,r,s,e,y))}),O}function je(e){var t=new e.constructor(e.byteLength);return new se(t).set(new se(e)),t}function Re(e,t,n,r){n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],l=r?r(n[o],e[o],o,n,e):void 0;Le(n,o,void 0===l?e[o]:l)}return n}function Me(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function De(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ge(e)||(t=e,Q&&Q in t))&&(We(e)||F(e)?ne:O).test($e(e));var t}(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=ye?ye(null):{}},Ee.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ee.prototype.get=function(e){var t=this.__data__;if(ye){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:ee.call(t,e)},Ee.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0||(n==t.length-1?t.pop():ce.call(t,n,1),0))},Se.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Oe(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new Ee,map:new(pe||Se),string:new Ee}},Ce.prototype.delete=function(e){return Me(this,e).delete(e)},Ce.prototype.get=function(e){return Me(this,e).get(e)},Ce.prototype.has=function(e){return Me(this,e).has(e)},Ce.prototype.set=function(e,t){return Me(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new Se},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ce(r)}return n.set(e,t),this};var Ie=ue?V(ue,Object):function(){return[]},Pe=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||q.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&Pe(new fe(new ArrayBuffer(1)))!=x||pe&&Pe(new pe)!=u||me&&Pe(me.resolve())!=f||ge&&Pe(new ge)!=m||be&&Pe(new be)!=y)&&(Pe=function(e){var t=te.call(e),n=t==h?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ve:return x;case xe:return u;case we:return f;case Ne:return m;case ke:return y}return t});var Fe=Array.isArray;function He(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!We(e)}var Ve=de||function(){return!1};function We(e){var t=Ge(e)?te.call(e):"";return t==a||t==c}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return He(e)?function(e,t){var n=Fe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&He(e)}(e)&&ee.call(e,"callee")&&(!ae.call(e,"callee")||te.call(e)==s)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!ee.call(e,o)||i&&("length"==o||Be(o,r))||n.push(o);return n}(e):function(e){if(!ze(e))return he(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return qe(e,!0,!0)}},7268(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(7947);function i(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),r.A.hasOwnProperty(t)?{space:r.A[t],local:e}:e}},7374(e){"use strict";e.exports=window.wc.date},7482(e,t,n){"use strict";function r(e){return e.toLowerCase()}n.d(t,{W:()=>o});var i=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],s=/[^A-Z0-9]+/gi;function o(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?i:n,a=t.stripRegexp,c=void 0===a?s:a,u=t.transform,d=void 0===u?r:u,h=t.delimiter,f=void 0===h?" ":h,p=l(l(e,o,"$1\0$2"),c,"\0"),m=0,g=p.length;"\0"===p.charAt(m);)m++;for(;"\0"===p.charAt(g-1);)g--;return p.slice(m,g).split("\0").map(d).join(f)}function l(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce(function(e,t){return e.replace(t,n)},e)}},7512(e){"use strict";e.exports=window.dokan.pluginUI},7710(e,t,n){"use strict";n.d(t,{kW:()=>r.c});var r=n(9728)},7723(e){"use strict";e.exports=window.wp.i18n},7737(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8981),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s=new RegExp(i.source,"g");function o(e,t){var n,o,l,a=i.lastIndex=s.lastIndex=0,c=-1,u=[],d=[];for(e+="",t+="";(n=i.exec(e))&&(o=s.exec(t));)(l=o.index)>a&&(l=t.slice(a,l),u[c]?u[c]+=l:u[++c]=l),(n=n[0])===(o=o[0])?u[c]?u[c]+=o:u[++c]=o:(u[++c]=null,d.push({i:c,x:(0,r.A)(n,o)})),a=s.lastIndex;return a<t.length&&(l=t.slice(a),u[c]?u[c]+=l:u[++c]=l),u.length<2?d[0]?function(e){return function(t){return e(t)+""}}(d[0].x):function(e){return function(){return e}}(t):(t=d.length,function(e){for(var n,r=0;r<t;++r)u[(n=d[r]).i]=n.x(e);return u.join("")})}},7947(e,t,n){"use strict";n.d(t,{A:()=>i,g:()=>r});var r="http://www.w3.org/1999/xhtml";const i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},8142(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",l="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",h="[object Number]",f="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",w=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[o]=k[v]=k[l]=k[x]=k[a]=k[c]=k[u]=k[d]=k[h]=k[f]=k[m]=k[g]=k[b]=k[y]=!1;var _="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,E=_||A||Function("return this")(),S=t&&!t.nodeType&&t,C=S&&e&&!e.nodeType&&e,T=C&&C.exports===S,L=T&&_.process,O=function(){try{return L&&L.binding&&L.binding("util")}catch(e){}}(),q=O&&O.isTypedArray;function j(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function R(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function M(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var D,I,P,B=Array.prototype,z=Function.prototype,$=Object.prototype,U=E["__core-js_shared__"],F=z.toString,H=$.hasOwnProperty,V=(D=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"",W=$.toString,G=RegExp("^"+F.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=T?E.Buffer:void 0,Z=E.Symbol,X=E.Uint8Array,Y=$.propertyIsEnumerable,Q=B.splice,J=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=K?K.isBuffer:void 0,ne=(I=Object.keys,P=Object,function(e){return I(P(e))}),re=Ce(E,"DataView"),ie=Ce(E,"Map"),se=Ce(E,"Promise"),oe=Ce(E,"Set"),le=Ce(E,"WeakMap"),ae=Ce(Object,"create"),ce=qe(re),ue=qe(ie),de=qe(se),he=qe(oe),fe=qe(le),pe=Z?Z.prototype:void 0,me=pe?pe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new be(e);this.size=t.size}function we(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function Ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=H.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(e){}var i=W.call(e);return r&&(t?e[J]=n:delete e[J]),i}(e):function(e){return W.call(e)}(e)}function ke(e){return ze(e)&&Ne(e)==s}function _e(e,t,n,r,i){return e===t||(null==e||null==t||!ze(e)&&!ze(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var p=Me(e),y=Me(t),w=p?o:Le(e),N=y?o:Le(t),k=(w=w==s?f:w)==f,_=(N=N==s?f:N)==f,A=w==N;if(A&&De(e)){if(!De(t))return!1;p=!0,k=!1}if(A&&!k)return u||(u=new xe),p||$e(e)?Ae(e,t,n,r,i,u):function(e,t,n,r,i,s,o){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case l:case a:case h:return je(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case d:var u=R;case g:var f=1&r;if(u||(u=M),e.size!=t.size&&!f)return!1;var p=o.get(e);if(p)return p==t;r|=2,o.set(e,t);var y=Ae(u(e),u(t),r,i,s,o);return o.delete(e),y;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,w,n,r,i,u);if(!(1&n)){var E=k&&H.call(e,"__wrapped__"),S=_&&H.call(t,"__wrapped__");if(E||S){var C=E?e.value():e,T=S?t.value():t;return u||(u=new xe),i(C,T,n,r,u)}}return!!A&&(u||(u=new xe),function(e,t,n,r,i,s){var o=1&n,l=Ee(e),a=l.length;if(a!=Ee(t).length&&!o)return!1;for(var c=a;c--;){var u=l[c];if(!(o?u in t:H.call(t,u)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var f=o;++c<a;){var p=e[u=l[c]],m=t[u];if(r)var g=o?r(m,p,u,t,e,s):r(p,m,u,e,t,s);if(!(void 0===g?p===m||i(p,m,n,r,s):g)){h=!1;break}f||(f="constructor"==u)}if(h&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,r,i,u))}(e,t,n,r,_e,i))}function Ae(e,t,n,r,i,s){var o=1&n,l=e.length,a=t.length;if(l!=a&&!(o&&a>l))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var u=-1,d=!0,h=2&n?new ve:void 0;for(s.set(e,t),s.set(t,e);++u<l;){var f=e[u],p=t[u];if(r)var m=o?r(p,f,u,t,e,s):r(f,p,u,e,t,s);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!j(t,function(e,t){if(o=t,!h.has(o)&&(f===e||i(f,e,n,r,s)))return h.push(t);var o})){d=!1;break}}else if(f!==p&&!i(f,p,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Ee(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ue,Te)}function Se(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Be(e)||function(e){return!!V&&V in e}(e))&&(Ie(e)?G:w).test(qe(e))}(n)?n:void 0}ge.prototype.clear=function(){this.__data__=ae?ae(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(ae){var n=t[e];return n===r?void 0:n}return H.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return ae?void 0!==t[e]:H.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ae&&void 0===t?r:t,this},be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0||(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,0))},be.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},be.prototype.has=function(e){return we(this.__data__,e)>-1},be.prototype.set=function(e,t){var n=this.__data__,r=we(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ie||be),string:new ge}},ye.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Se(this,e).get(e)},ye.prototype.has=function(e){return Se(this,e).has(e)},ye.prototype.set=function(e,t){var n=Se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ve.prototype.add=ve.prototype.push=function(e){return this.__data__.set(e,r),this},ve.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new be,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof be){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(r)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o)&&(s[i++]=o)}return s}(ee(e),function(t){return Y.call(e,t)}))}:function(){return[]},Le=Ne;function Oe(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||N.test(e))&&e>-1&&e%1==0&&e<t}function qe(e){if(null!=e){try{return F.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(re&&Le(new re(new ArrayBuffer(1)))!=x||ie&&Le(new ie)!=d||se&&Le(se.resolve())!=p||oe&&Le(new oe)!=g||le&&Le(new le)!=y)&&(Le=function(e){var t=Ne(e),n=t==f?e.constructor:void 0,r=n?qe(n):"";if(r)switch(r){case ce:return x;case ue:return d;case de:return p;case he:return g;case fe:return y}return t});var Re=ke(function(){return arguments}())?ke:function(e){return ze(e)&&H.call(e,"callee")&&!Y.call(e,"callee")},Me=Array.isArray,De=te||function(){return!1};function Ie(e){if(!Be(e))return!1;var t=Ne(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ze(e){return null!=e&&"object"==typeof e}var $e=q?function(e){return function(t){return e(t)}}(q):function(e){return ze(e)&&Pe(e.length)&&!!k[Ne(e)]};function Ue(e){return null!=(t=e)&&Pe(t.length)&&!Ie(t)?function(e,t){var n=Me(e),r=!n&&Re(e),i=!n&&!r&&De(e),s=!n&&!r&&!i&&$e(e),o=n||r||i||s,l=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=l.length;for(var c in e)!t&&!H.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Oe(c,a))||l.push(c);return l}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||$))return ne(e);var t,n,r=[];for(var i in Object(e))H.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return _e(e,t)}},8227(e,t,n){"use strict";n.d(t,{LN:()=>se,Ay:()=>le});var r=n(574),i=n(747);var s=n(6541),o=Array.prototype.find;function l(){return this.firstElementChild}var a=Array.prototype.filter;function c(){return Array.from(this.children)}function u(e){return new Array(e.length)}function d(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function h(e,t,n,r,i,s){for(var o,l=0,a=t.length,c=s.length;l<c;++l)(o=t[l])?(o.__data__=s[l],r[l]=o):n[l]=new d(e,s[l]);for(;l<a;++l)(o=t[l])&&(i[l]=o)}function f(e,t,n,r,i,s,o){var l,a,c,u=new Map,h=t.length,f=s.length,p=new Array(h);for(l=0;l<h;++l)(a=t[l])&&(p[l]=c=o.call(a,a.__data__,l,t)+"",u.has(c)?i[l]=a:u.set(c,a));for(l=0;l<f;++l)c=o.call(e,s[l],l,s)+"",(a=u.get(c))?(r[l]=a,a.__data__=s[l],u.delete(c)):n[l]=new d(e,s[l]);for(l=0;l<h;++l)(a=t[l])&&u.get(p[l])===a&&(i[l]=a)}function p(e){return e.__data__}function m(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}d.prototype={constructor:d,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var b=n(7268);function y(e){return function(){this.removeAttribute(e)}}function v(e){return function(){this.removeAttributeNS(e.space,e.local)}}function x(e,t){return function(){this.setAttribute(e,t)}}function w(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function N(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function k(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var _=n(3683);function A(e){return function(){delete this[e]}}function E(e,t){return function(){this[e]=t}}function S(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function C(e){return e.trim().split(/^|\s+/)}function T(e){return e.classList||new L(e)}function L(e){this._node=e,this._names=C(e.getAttribute("class")||"")}function O(e,t){for(var n=T(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function q(e,t){for(var n=T(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function j(e){return function(){O(this,e)}}function R(e){return function(){q(this,e)}}function M(e,t){return function(){(t.apply(this,arguments)?O:q)(this,e)}}function D(){this.textContent=""}function I(e){return function(){this.textContent=e}}function P(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function B(){this.innerHTML=""}function z(e){return function(){this.innerHTML=e}}function $(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function U(){this.nextSibling&&this.parentNode.appendChild(this)}function F(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}L.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var H=n(7947);function V(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===H.g&&t.documentElement.namespaceURI===H.g?t.createElement(e):t.createElementNS(n,e)}}function W(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function G(e){var t=(0,b.A)(e);return(t.local?W:V)(t)}function K(){return null}function Z(){var e=this.parentNode;e&&e.removeChild(this)}function X(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Y(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Q(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,s=t.length;r<s;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function J(e,t,n){return function(){var r,i=this.__on,s=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var o=0,l=i.length;o<l;++o)if((r=i[o]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),void(r.value=t);this.addEventListener(e.type,s,n),r={type:e.type,name:e.name,value:t,listener:s,options:n},i?i.push(r):this.__on=[r]}}var ee=n(6747);function te(e,t,n){var r=(0,ee.A)(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ne(e,t){return function(){return te(this,e,t)}}function re(e,t){return function(){return te(this,e,t.apply(this,arguments))}}var ie=[null];function se(e,t){this._groups=e,this._parents=t}function oe(){return new se([[document.documentElement]],ie)}se.prototype=oe.prototype={constructor:se,select:function(e){"function"!=typeof e&&(e=(0,r.A)(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var o,l,a=t[s],c=a.length,u=i[s]=new Array(c),d=0;d<c;++d)(o=a[d])&&(l=e.call(o,o.__data__,d,a))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l);return new se(i,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}(e):(0,i.A)(e);for(var t=this._groups,n=t.length,r=[],s=[],o=0;o<n;++o)for(var l,a=t[o],c=a.length,u=0;u<c;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),s.push(l));return new se(r,s)},selectChild:function(e){return this.select(null==e?l:function(e){return function(){return o.call(this.children,e)}}("function"==typeof e?e:(0,s.j)(e)))},selectChildren:function(e){return this.selectAll(null==e?c:function(e){return function(){return a.call(this.children,e)}}("function"==typeof e?e:(0,s.j)(e)))},filter:function(e){"function"!=typeof e&&(e=(0,s.A)(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,l=t[i],a=l.length,c=r[i]=[],u=0;u<a;++u)(o=l[u])&&e.call(o,o.__data__,u,l)&&c.push(o);return new se(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,p);var n,r=t?f:h,i=this._parents,s=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var o=s.length,l=new Array(o),a=new Array(o),c=new Array(o),u=0;u<o;++u){var d=i[u],g=s[u],b=g.length,y=m(e.call(d,d&&d.__data__,u,i)),v=y.length,x=a[u]=new Array(v),w=l[u]=new Array(v);r(d,g,x,w,c[u]=new Array(b),y,t);for(var N,k,_=0,A=0;_<v;++_)if(N=x[_]){for(_>=A&&(A=_+1);!(k=w[A])&&++A<v;);N._next=k||null}}return(l=new se(l,i))._enter=a,l._exit=c,l},enter:function(){return new se(this._enter||this._groups.map(u),this._parents)},exit:function(){return new se(this._exit||this._groups.map(u),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,s=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?s.remove():n(s),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,o=Math.min(i,s),l=new Array(i),a=0;a<o;++a)for(var c,u=n[a],d=r[a],h=u.length,f=l[a]=new Array(h),p=0;p<h;++p)(c=u[p]||d[p])&&(f[p]=c);for(;a<i;++a)l[a]=n[a];return new se(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],s=i.length-1,o=i[s];--s>=0;)(r=i[s])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=g);for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o,l=n[s],a=l.length,c=i[s]=new Array(a),u=0;u<a;++u)(o=l[u])&&(c[u]=o);c.sort(t)}return new se(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,s=t[n],o=0,l=s.length;o<l;++o)(i=s[o])&&e.call(i,i.__data__,o,s);return this},attr:function(e,t){var n=(0,b.A)(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?v:y:"function"==typeof t?n.local?k:N:n.local?w:x)(n,t))},style:_.A,property:function(e,t){return arguments.length>1?this.each((null==t?A:"function"==typeof t?S:E)(e,t)):this.node()[e]},classed:function(e,t){var n=C(e+"");if(arguments.length<2){for(var r=T(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?M:t?j:R)(n,t))},text:function(e){return arguments.length?this.each(null==e?D:("function"==typeof e?P:I)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?B:("function"==typeof e?$:z)(e)):this.node().innerHTML},raise:function(){return this.each(U)},lower:function(){return this.each(F)},append:function(e){var t="function"==typeof e?e:G(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:G(e),i=null==t?K:"function"==typeof t?t:(0,r.A)(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(Z)},clone:function(e){return this.select(e?Y:X)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,s=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),o=s.length;if(!(arguments.length<2)){for(l=t?J:Q,r=0;r<o;++r)this.each(l(s[r],t,n));return this}var l=this.node().__on;if(l)for(var a,c=0,u=l.length;c<u;++c)for(r=0,a=l[c];r<o;++r)if((i=s[r]).type===a.type&&i.name===a.name)return a.value},dispatch:function(e,t){return this.each(("function"==typeof t?re:ne)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],s=0,o=i.length;s<o;++s)(r=i[s])&&(yield r)}};const le=oe},8317(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5759);t.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const t=this.ops[this.index];if(t){const n=this.offset,i=r.default.length(t);if(e>=i-n?(e=i-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};{const r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"object"==typeof t.retain&&null!==t.retain?r.retain=t.retain:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?"number"==typeof e.delete?"delete":"number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}}return[]}}},8395(e){"use strict";e.exports=window.dokan.utilities},8409(e,t,n){"use strict";n(4960),n(6087),n(2956),n(790)},8443(e){"use strict";e.exports=window.wp.date},8446(e){"use strict";e.exports=window.dokan.dokanUI},8448(e,t,n){"use strict";n(790),n(7723),n(6650),n(6427)},8468(e){"use strict";e.exports=window.lodash},8537(e){"use strict";e.exports=window.wp.htmlEntities},8697(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(6203).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},8981(e,t,n){"use strict";function r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.d(t,{A:()=>r})},9106(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7193),i=n(8142);var s;!function(e){e.compose=function(e={},t={},n=!1){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});let i=r(t);n||(i=Object.keys(i).reduce((e,t)=>(null!=i[t]&&(e[t]=i[t]),e),{}));for(const n in e)void 0!==e[n]&&void 0===t[n]&&(i[n]=e[n]);return Object.keys(i).length>0?i:void 0},e.diff=function(e={},t={}){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});const n=Object.keys(e).concat(Object.keys(t)).reduce((n,r)=>(i(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n),{});return Object.keys(n).length>0?n:void 0},e.invert=function(e={},t={}){e=e||{};const n=Object.keys(t).reduce((n,r)=>(t[r]!==e[r]&&void 0!==e[r]&&(n[r]=t[r]),n),{});return Object.keys(e).reduce((n,r)=>(e[r]!==t[r]&&void 0===t[r]&&(n[r]=null),n),n)},e.transform=function(e,t,n=!1){if("object"!=typeof e)return t;if("object"!=typeof t)return;if(!n)return t;const r=Object.keys(t).reduce((n,r)=>(void 0===e[r]&&(n[r]=t[r]),n),{});return Object.keys(r).length>0?r:void 0}}(s||(s={})),t.default=s},9284(e,t,n){"use strict";n(7723),n(790),n(6427),n(4960)},9491(e){"use strict";e.exports=window.wp.compose},9728(e,t,n){"use strict";n.d(t,{c:()=>s});var r=n(1635),i=n(5098);function s(e,t){return void 0===t&&(t={}),(0,i.a)(e,(0,r.Cl)({delimiter:"-"},t))}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";n.r(r),n.d(r,{CustomField:()=>g,DataForm:()=>e.DataForm,appendToTarget:()=>Kn,buildLayoutTree:()=>Yn,collectUsedFields:()=>Zn,fieldValueForProduct:()=>Fn,getField:()=>Pn,getFieldConfig:()=>ir,getFieldConfigFrom:()=>vr,getFieldHeading:()=>Un,getRemainingFields:()=>Xn,getValidationError:()=>m,injectRemainingFields:()=>Qn,injectSectionHeadings:()=>er,layoutBuilder:()=>Gn,resolveDependency:()=>Wn,resolveLabel:()=>Bn,resolveRequired:()=>$n,resolveResponsiveLayout:()=>Jn,resolveVisibility:()=>zn,useFormValidity:()=>e.useFormValidity,useInitProductEditor:()=>wr,useLayouts:()=>kr,useProductEditor:()=>xr});var e=n(7512),t=n(8446),i=n(7143),s=n(6087),o=n(7723);const l=window.dokan.productEditorStore;var a=n.n(l),c=n(2619),u=n(4960),d=n(8537),h=n(6203);const f=(0,h.A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var p=n(790);const m=e=>{if(e)return"invalid"===e.custom?.type?e.custom.message||(0,o.__)("This field is invalid.","dokan-lite"):"invalid"===e.required?.type?e.required.message||(0,o.__)("Please fill out this field.","dokan-lite"):"invalid"===e.elements?.type?e.elements.message||(0,o.__)("Value must be one of the elements.","dokan-lite"):void 0},g=({label:e,field:t,children:n,error:r,className:i=""})=>{const[l,a]=(0,s.useState)(!1),h=(0,s.useCallback)(()=>{l||a(!0)},[l]),m=`dokan-form-field-${t.id}`,g=`flex flex-col gap-1 ${m} ${i}`,b=l&&r,y=()=>e?(0,p.jsx)("span",{children:e}):"string"==typeof t.rawLabel?(0,p.jsx)(s.RawHTML,{className:"dokan-form-field-label",children:(0,d.decodeEntities)(t.rawLabel)}):t.label;return(0,p.jsxs)("div",{id:m,className:g,children:[(0,p.jsxs)("div",{className:`${m}-label flex gap-1 items-center`,children:[(0,p.jsx)(y,{}),t.required&&(0,p.jsx)("span",{className:"dokan-form-field-label",children:(0,o.__)("(REQUIRED)","dokan-lite")}),t.tooltip&&(0,p.jsx)(u.DokanTooltip,{content:t.tooltip,children:(0,p.jsx)(f,{size:16})})]}),(0,p.jsx)("div",{onBlur:h,children:n}),t.description&&(0,p.jsx)("div",{className:"dokan-form-field-description",children:"string"==typeof t.description?(0,p.jsx)(s.RawHTML,{children:t.description}):t.description}),(0,c.applyFilters)("dokan_product_editor_after_ui_field",null,t),b&&(0,p.jsxs)("p",{className:"components-validated-control__indicator is-invalid",children:[(0,p.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"components-validated-control__indicator-icon","aria-hidden":"true",focusable:"false",children:(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})}),r]})]})};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}var N=n(1609),k=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),_=Math.abs,A=String.fromCharCode,E=Object.assign;function S(e){return e.trim()}function C(e,t,n){return e.replace(t,n)}function T(e,t){return e.indexOf(t)}function L(e,t){return 0|e.charCodeAt(t)}function O(e,t,n){return e.slice(t,n)}function q(e){return e.length}function j(e){return e.length}function R(e,t){return t.push(e),e}var M=1,D=1,I=0,P=0,B=0,z="";function $(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:M,column:D,length:o,return:""}}function U(e,t){return E($("",null,null,"",null,null,0),e,{length:-e.length},t)}function F(){return B=P>0?L(z,--P):0,D--,10===B&&(D=1,M--),B}function H(){return B=P<I?L(z,P++):0,D++,10===B&&(D=1,M++),B}function V(){return L(z,P)}function W(){return P}function G(e,t){return O(z,e,t)}function K(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Z(e){return M=D=1,I=q(z=e),P=0,[]}function X(e){return z="",e}function Y(e){return S(G(P-1,ee(91===e?e+2:40===e?e+1:e)))}function Q(e){for(;(B=V())&&B<33;)H();return K(e)>2||K(B)>3?"":" "}function J(e,t){for(;--t&&H()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return G(e,W()+(t<6&&32==V()&&32==H()))}function ee(e){for(;H();)switch(B){case e:return P;case 34:case 39:34!==e&&39!==e&&ee(B);break;case 40:41===e&&ee(e);break;case 92:H()}return P}function te(e,t){for(;H()&&e+B!==57&&(e+B!==84||47!==V()););return"/*"+G(t,P-1)+"*"+A(47===e?e:H())}function ne(e){for(;!K(V());)H();return G(e,P)}var re="-ms-",ie="-moz-",se="-webkit-",oe="comm",le="rule",ae="decl",ce="@keyframes";function ue(e,t){for(var n="",r=j(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function de(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case ae:return e.return=e.return||e.value;case oe:return"";case ce:return e.return=e.value+"{"+ue(e.children,r)+"}";case le:e.value=e.props.join(",")}return q(n=ue(e.children,r))?e.return=e.value+"{"+n+"}":""}function he(e){return X(fe("",null,null,null,[""],e=Z(e),0,[0],e))}function fe(e,t,n,r,i,s,o,l,a){for(var c=0,u=0,d=o,h=0,f=0,p=0,m=1,g=1,b=1,y=0,v="",x=i,w=s,N=r,k=v;g;)switch(p=y,y=H()){case 40:if(108!=p&&58==L(k,d-1)){-1!=T(k+=C(Y(y),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:k+=Y(y);break;case 9:case 10:case 13:case 32:k+=Q(p);break;case 92:k+=J(W()-1,7);continue;case 47:switch(V()){case 42:case 47:R(me(te(H(),W()),t,n),a);break;default:k+="/"}break;case 123*m:l[c++]=q(k)*b;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==b&&(k=C(k,/\f/g,"")),f>0&&q(k)-d&&R(f>32?ge(k+";",r,n,d-1):ge(C(k," ","")+";",r,n,d-2),a);break;case 59:k+=";";default:if(R(N=pe(k,t,n,c,u,i,l,v,x=[],w=[],d),s),123===y)if(0===u)fe(k,t,N,N,x,s,d,l,w);else switch(99===h&&110===L(k,3)?100:h){case 100:case 108:case 109:case 115:fe(e,N,N,r&&R(pe(e,N,N,0,0,i,l,v,i,x=[],d),w),i,w,d,l,r?x:w);break;default:fe(k,N,N,N,[""],w,0,l,w)}}c=u=f=0,m=b=1,v=k="",d=o;break;case 58:d=1+q(k),f=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==F())continue;switch(k+=A(y),y*m){case 38:b=u>0?1:(k+="\f",-1);break;case 44:l[c++]=(q(k)-1)*b,b=1;break;case 64:45===V()&&(k+=Y(H())),h=V(),u=d=q(v=k+=ne(W())),y++;break;case 45:45===p&&2==q(k)&&(m=0)}}return s}function pe(e,t,n,r,i,s,o,l,a,c,u){for(var d=i-1,h=0===i?s:[""],f=j(h),p=0,m=0,g=0;p<r;++p)for(var b=0,y=O(e,d+1,d=_(m=o[p])),v=e;b<f;++b)(v=S(m>0?h[b]+" "+y:C(y,/&\f/g,h[b])))&&(a[g++]=v);return $(e,t,n,0===i?le:l,a,c,u)}function me(e,t,n){return $(e,t,n,oe,A(B),O(e,2,-2),0)}function ge(e,t,n,r){return $(e,t,n,ae,O(e,0,r),O(e,r+1,-1),r)}var be=function(e,t,n){for(var r=0,i=0;r=i,i=V(),38===r&&12===i&&(t[n]=1),!K(i);)H();return G(e,P)},ye=new WeakMap,ve=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ye.get(n))&&!r){ye.set(e,!0);for(var i=[],s=function(e,t){return X(function(e,t){var n=-1,r=44;do{switch(K(r)){case 0:38===r&&12===V()&&(t[n]=1),e[n]+=be(P-1,t,n);break;case 2:e[n]+=Y(r);break;case 4:if(44===r){e[++n]=58===V()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=A(r)}}while(r=H());return e}(Z(e),t))}(t,i),o=n.props,l=0,a=0;l<s.length;l++)for(var c=0;c<o.length;c++,a++)e.props[a]=i[l]?s[l].replace(/&\f/g,o[c]):o[c]+" "+s[l]}}},xe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function we(e,t){switch(function(e,t){return 45^L(e,0)?(((t<<2^L(e,0))<<2^L(e,1))<<2^L(e,2))<<2^L(e,3):0}(e,t)){case 5103:return se+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return se+e+ie+e+re+e+e;case 6828:case 4268:return se+e+re+e+e;case 6165:return se+e+re+"flex-"+e+e;case 5187:return se+e+C(e,/(\w+).+(:[^]+)/,se+"box-$1$2"+re+"flex-$1$2")+e;case 5443:return se+e+re+"flex-item-"+C(e,/flex-|-self/,"")+e;case 4675:return se+e+re+"flex-line-pack"+C(e,/align-content|flex-|-self/,"")+e;case 5548:return se+e+re+C(e,"shrink","negative")+e;case 5292:return se+e+re+C(e,"basis","preferred-size")+e;case 6060:return se+"box-"+C(e,"-grow","")+se+e+re+C(e,"grow","positive")+e;case 4554:return se+C(e,/([^-])(transform)/g,"$1"+se+"$2")+e;case 6187:return C(C(C(e,/(zoom-|grab)/,se+"$1"),/(image-set)/,se+"$1"),e,"")+e;case 5495:case 3959:return C(e,/(image-set\([^]*)/,se+"$1$`$1");case 4968:return C(C(e,/(.+:)(flex-)?(.*)/,se+"box-pack:$3"+re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+se+e+e;case 4095:case 3583:case 4068:case 2532:return C(e,/(.+)-inline(.+)/,se+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(q(e)-1-t>6)switch(L(e,t+1)){case 109:if(45!==L(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+se+"$2-$3$1"+ie+(108==L(e,t+3)?"$3":"$2-$3"))+e;case 115:return~T(e,"stretch")?we(C(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==L(e,t+1))break;case 6444:switch(L(e,q(e)-3-(~T(e,"!important")&&10))){case 107:return C(e,":",":"+se)+e;case 101:return C(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+se+(45===L(e,14)?"inline-":"")+"box$3$1"+se+"$2$3$1"+re+"$2box$3")+e}break;case 5936:switch(L(e,t+11)){case 114:return se+e+re+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return se+e+re+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return se+e+re+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return se+e+re+e+e}return e}var Ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ae:e.return=we(e.value,e.length);break;case ce:return ue([U(e,{value:C(e.value,"@","@"+se)})],r);case le:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ue([U(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ue([U(e,{props:[C(t,/:(plac\w+)/,":"+se+"input-$1")]}),U(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]}),U(e,{props:[C(t,/:(plac\w+)/,re+"input-$1")]})],r)}return""})}}],ke=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,s=e.stylisPlugins||Ne,o={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;l.push(e)});var a,c,u,d,h=[de,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ve,xe].concat(s,h),u=j(c),function(e,t,n,r){for(var i="",s=0;s<u;s++)i+=c[s](e,t,n,r)||"";return i});i=function(e,t,n,r){a=n,ue(he(e?e+"{"+t.styles+"}":t.styles),f),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new k({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return p.sheet.hydrate(l),p},_e=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ee(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Se=/[A-Z]|^ms/g,Ce=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Te=function(e){return 45===e.charCodeAt(1)},Le=function(e){return null!=e&&"boolean"!=typeof e},Oe=Ee(function(e){return Te(e)?e:e.replace(Se,"-$&").toLowerCase()}),qe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ce,function(e,t,n){return Re={name:t,styles:n,next:Re},t})}return 1===Ae[e]||Te(e)||"number"!=typeof t||0===t?t:t+"px"};function je(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return Re={name:i.name,styles:i.styles,next:Re},i.name;var s=n;if(void 0!==s.styles){var o=s.next;if(void 0!==o)for(;void 0!==o;)Re={name:o.name,styles:o.styles,next:Re},o=o.next;return s.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=je(e,t,n[i])+";";else for(var s in n){var o=n[s];if("object"!=typeof o){var l=o;null!=t&&void 0!==t[l]?r+=s+"{"+t[l]+"}":Le(l)&&(r+=Oe(s)+":"+qe(s,l)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var a=je(e,t,o);switch(s){case"animation":case"animationName":r+=Oe(s)+":"+a+";";break;default:r+=s+"{"+a+"}"}}else for(var c=0;c<o.length;c++)Le(o[c])&&(r+=Oe(s)+":"+qe(s,o[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=Re,a=n(e);return Re=l,je(e,t,a)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Re,Me=/label:\s*([^\s;{]+)\s*(;|$)/g;function De(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";Re=void 0;var s=e[0];null==s||void 0===s.raw?(r=!1,i+=je(n,t,s)):i+=s[0];for(var o=1;o<e.length;o++)i+=je(n,t,e[o]),r&&(i+=s[o]);Me.lastIndex=0;for(var l,a="";null!==(l=Me.exec(i));)a+="-"+l[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+a;return{name:c,styles:i,next:Re}}var Ie,Pe,Be=!!N.useInsertionEffect&&N.useInsertionEffect,ze=Be||function(e){return e()},$e=(Be||N.useLayoutEffect,N.createContext("undefined"!=typeof HTMLElement?ke({key:"css"}):null)),Ue=($e.Provider,function(e){return(0,N.forwardRef)(function(t,n){var r=(0,N.useContext)($e);return e(t,r,n)})}),Fe=N.createContext({}),He={}.hasOwnProperty,Ve="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",We=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return _e(t,n,r),ze(function(){return function(e,t,n){_e(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)}),null},Ge=Ue(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Ve],s=[r],o="";"string"==typeof e.className?o=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,s,e.className):null!=e.className&&(o=e.className+" ");var l=De(s,void 0,N.useContext(Fe));o+=t.key+"-"+l.name;var a={};for(var c in e)He.call(e,c)&&"css"!==c&&c!==Ve&&(a[c]=e[c]);return a.className=o,n&&(a.ref=n),N.createElement(N.Fragment,null,N.createElement(We,{cache:t,serialized:l,isStringTag:"string"==typeof i}),N.createElement(i,a))}),Ke=(n(4146),function(e,t){var n=arguments;if(null==t||!He.call(t,"css"))return N.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Ge,i[1]=function(e,t){var n={};for(var r in t)He.call(t,r)&&(n[r]=t[r]);return n[Ve]=e,n}(e,t);for(var s=2;s<r;s++)i[s]=n[s];return N.createElement.apply(null,i)});function Ze(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return De(t)}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s,o,l=[],a=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);a=!0);}catch(e){c=!0,i=e}finally{try{if(!a&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}Ie=Ke||(Ke={}),Pe||(Pe=Ie.JSX||(Ie.JSX={}));var Je=n(5795);const et=Math.min,tt=Math.max,nt=Math.round,rt=Math.floor,it=e=>({x:e,y:e});function st(){return"undefined"!=typeof window}function ot(e){return ct(e)?(e.nodeName||"").toLowerCase():"#document"}function lt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function at(e){var t;return null==(t=(ct(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ct(e){return!!st()&&(e instanceof Node||e instanceof lt(e).Node)}function ut(e){return!!st()&&(e instanceof Element||e instanceof lt(e).Element)}function dt(e){return!!st()&&(e instanceof HTMLElement||e instanceof lt(e).HTMLElement)}function ht(e){return!(!st()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot)}function ft(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}let pt;function mt(e){return lt(e).getComputedStyle(e)}function gt(e){const t=function(e){if("html"===ot(e))return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||at(e);return ht(t)?t.host:t}(e);return function(e){return/^(html|body|#document)$/.test(ot(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&ft(t)?t:gt(t)}function bt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=gt(e),s=i===(null==(r=e.ownerDocument)?void 0:r.body),o=lt(i);if(s){const e=yt(o);return t.concat(o,o.visualViewport||[],ft(i)?i:[],e&&n?bt(e):[])}return t.concat(i,bt(i,[],n))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vt(e){return ut(e)?e:e.contextElement}function xt(e){const t=vt(e);if(!dt(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=function(e){const t=mt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=dt(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=nt(n)!==s||nt(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}(t);let o=(s?nt(n.width):n.width)/r,l=(s?nt(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}const wt=it(0);function Nt(e){const t=lt(e);return null==pt&&(pt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pt&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wt}function kt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),s=vt(e);let o=it(1);t&&(r?ut(r)&&(o=xt(r)):o=xt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==lt(e))&&t}(s,n,r)?Nt(s):it(0);let a=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const e=lt(s),t=r&&ut(r)?lt(r):r;let n=e,i=yt(n);for(;i&&r&&t!==n;){const e=xt(i),t=i.getBoundingClientRect(),r=mt(i),s=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=s,c+=o,n=lt(i),i=yt(n)}}return function(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}({width:u,height:d,x:a,y:c})}function _t(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var At=N.useLayoutEffect,Et=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],St=function(){},Ct=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,x({},Qe(e,Et))},Tt=function(e,t,n){var r=e.cx,i=e.getStyles,s=e.getClassNames,o=e.className;return{css:i(t,e),className:r(null!=n?n:{},s(t,e),o)}},Lt={get passive(){return!0}},Ot="undefined"!=typeof window?window:{};Ot.addEventListener&&Ot.removeEventListener&&(Ot.addEventListener("p",St,Lt),Ot.removeEventListener("p",St,!1));var qt,jt,Rt,Mt=["children","innerProps"],Dt=["children","innerProps"],It=(0,N.createContext)(null),Pt=["size"],Bt=["innerProps","isRtl","size"],zt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},$t=function(e){var t=e.size,n=Qe(e,Pt);return Ke("svg",w({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:zt},n))},Ut=function(e){return Ke($t,w({size:20},e),Ke("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ft=function(e){return Ke($t,w({size:20},e),Ke("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ht=function(){var e=Ze.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(qt||(jt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Rt||(Rt=jt.slice(0)),qt=Object.freeze(Object.defineProperties(jt,{raw:{value:Object.freeze(Rt)}})))),Vt=function(e){var t=e.delay,n=e.offset;return Ke("span",{css:Ze({animation:"".concat(Ht," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Wt=["data"],Gt=["innerRef","isDisabled","isHidden","inputClassName"],Kt={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Zt=(x({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Kt),function(e){return x({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Kt)}),Xt=function(e){var t=e.children,n=e.innerProps;return Ke("div",n,t)},Yt={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",w({},Tt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ke(Ut,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,s=e.innerProps,o=e.menuIsOpen;return Ke("div",w({ref:i},Tt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":o}),s,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",w({},Tt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ke(Ft,null))},DownChevron:Ft,CrossIcon:Ut,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,s=e.Heading,o=e.headingProps,l=e.innerProps,a=e.label,c=e.theme,u=e.selectProps;return Ke("div",w({},Tt(e,"group",{group:!0}),l),Ke(s,w({},o,{selectProps:u,theme:c,getStyles:r,getClassNames:i,cx:n}),a),Ke("div",null,t))},GroupHeading:function(e){var t=Ct(e);t.data;var n=Qe(t,Wt);return Ke("div",w({},Tt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ke("div",w({},Tt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ke("span",w({},t,Tt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Ct(e),i=r.innerRef,s=r.isDisabled,o=r.isHidden,l=r.inputClassName,a=Qe(r,Gt);return Ke("div",w({},Tt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ke("input",w({className:t({input:!0},l),ref:i,style:Zt(o),disabled:s},a)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=void 0===r?4:r,s=Qe(e,Bt);return Ke("div",w({},Tt(x(x({},s),{},{innerProps:t,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ke(Vt,{delay:0,offset:n}),Ke(Vt,{delay:160,offset:!0}),Ke(Vt,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ke("div",w({},Tt(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,i=e.isMulti;return Ke("div",w({},Tt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),t)},MenuPortal:function(e){var t,n=e.appendTo,r=e.children,i=e.controlElement,s=e.innerProps,o=e.menuPlacement,l=e.menuPosition,a=(0,N.useRef)(null),c=(0,N.useRef)(null),u=Ye((0,N.useState)("auto"===(t=o)?"bottom":t),2),d=u[0],h=u[1],f=(0,N.useMemo)(function(){return{setPortalPlacement:h}},[]),p=Ye((0,N.useState)(null),2),m=p[0],g=p[1],b=(0,N.useCallback)(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||g({offset:n,rect:e})}},[i,l,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);At(function(){b()},[b]);var y=(0,N.useCallback)(function(){"function"==typeof c.current&&(c.current(),c.current=null),i&&a.current&&(c.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=vt(e),u=i||s?[...c?bt(c):[],...t?bt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});const d=c&&l?function(e,t){let n,r=null;const i=at(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function o(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(l||t(),!h||!f)return;const p={rootMargin:-rt(d)+"px "+-rt(i.clientWidth-(u+h))+"px "+-rt(i.clientHeight-(d+f))+"px "+-rt(u)+"px",threshold:tt(0,et(1,a))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==a){if(!m)return o();r?o(!1,r):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==r||_t(c,e.getBoundingClientRect())||o(),m=!1}try{r=new IntersectionObserver(g,{...p,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),s}(c,n):null;let h,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!a&&p.observe(c),t&&p.observe(t));let m=a?kt(e):null;return a&&function t(){const r=kt(e);m&&!_t(m,r)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,a&&cancelAnimationFrame(h)}}(i,a.current,b,{elementResize:"ResizeObserver"in window}))},[i,b]);At(function(){y()},[y]);var v=(0,N.useCallback)(function(e){a.current=e,y()},[y]);if(!n&&"fixed"!==l||!m)return null;var k=Ke("div",w({ref:v},Tt(x(x({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return Ke(It.Provider,{value:f},n?(0,Je.createPortal)(k,n):k)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,i=Qe(e,Dt);return Ke("div",w({},Tt(x(x({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,i=Qe(e,Mt);return Ke("div",w({},Tt(x(x({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,s=e.isDisabled,o=e.removeProps,l=e.selectProps,a=n.Container,c=n.Label,u=n.Remove;return Ke(a,{data:r,innerProps:x(x({},Tt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},Ke(c,{data:r,innerProps:x({},Tt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ke(u,{data:r,innerProps:x(x({},Tt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},o),selectProps:l}))},MultiValueContainer:Xt,MultiValueLabel:Xt,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ke("div",w({role:"button"},n),t||Ke(Ut,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,s=e.innerRef,o=e.innerProps;return Ke("div",w({},Tt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:s,"aria-disabled":n},o),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ke("div",w({},Tt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,i=e.isRtl;return Ke("div",w({},Tt(e,"container",{"--is-disabled":r,"--is-rtl":i}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ke("div",w({},Tt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,i=e.hasValue;return Ke("div",w({},Tt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),t)}};const Qt=(0,h.A)("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),Jt=(0,h.A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var en=n(1455),tn=n.n(en),nn=n(3832),rn=n(9491);const sn=e=>e&&"string"==typeof e.label?{...e,label:(0,d.decodeEntities)(e.label)}:e,on=e=>Array.isArray(e)?e.map(sn):sn(e),ln=async(e,t="")=>{if(!e)return[];try{const n=await tn()({path:(0,nn.addQueryArgs)(e,{search:t,per_page:20})});return Array.isArray(n)?n.map(e=>({value:e.id,label:(0,d.decodeEntities)(e.name)})):[]}catch{return[]}},an=(e,t=0)=>e.reduce((e,n)=>(e.push({...n,level:t}),n.children?.length&&e.push(...an(n.children,t+1)),e),[]),cn=e=>{const{data:t,isSelected:n,children:r}=e;return(0,p.jsx)(Yt.Option,{...e,children:(0,p.jsxs)("div",{style:{paddingLeft:20*(t.level||0)+10+"px"},className:"flex items-center gap-2",children:[n?(0,p.jsx)(Qt,{size:16}):(0,p.jsx)(Jt,{size:16}),r]})})},un=(e,t)=>(n,r,i)=>{const s=n.trim(),o=e=>String(e?.label).trim().toLowerCase()===s.toLowerCase(),l=!!s&&!r.some(o)&&!i.some(o);return(0,c.applyFilters)("dokan_product_editor_is_valid_new_option",l,n,e,t)},dn=e=>(0,rn.debounce)((...t)=>e(...t),300),hn=({data:e,field:t,onChange:n,validity:r})=>{var i;const[o,l]=(0,s.useState)([]);(0,s.useEffect)(()=>{let e=!0;return tn()({path:t.api_endpoint}).then(t=>e&&l(an(Array.isArray(t)?t:[]).map(sn))).catch(()=>{}),()=>{e=!1}},[t.api_endpoint]);const a=Array.isArray(e[t.id])?e[t.id].map(sn):[],c=t.multiple?a:null!==(i=a[0])&&void 0!==i?i:null;return(0,p.jsx)(g,{field:t,error:m(r),children:(0,p.jsx)(u.Select,{isMulti:t.multiple,options:o,value:c,placeholder:t.placeholder,closeMenuOnSelect:!!t.multiple,hideSelectedOptions:!1,components:{Option:cn},onChange:e=>{let r=[];t.multiple?r=null!=e?e:[]:e&&(r=[e]),n({[t.id]:r})}})})},fn=({data:e,field:n,onChange:r,validity:i})=>{var o;const[l,a]=(0,s.useState)([]),c=(0,s.useMemo)(()=>dn(e=>ln(n.api_endpoint,e).then(a)),[n.api_endpoint]);return(0,s.useEffect)(()=>{let e=!0;return ln(n.api_endpoint).then(t=>e&&a(t)),()=>{e=!1,c.cancel()}},[n.api_endpoint,c]),(0,p.jsx)(g,{field:n,error:m(i),children:(0,p.jsx)(t.TaggableSelect,{isMulti:n.multiple,options:l,value:on(null!==(o=e[n.id])&&void 0!==o?o:[]),placeholder:n.placeholder,filterOption:null,isValidNewOption:un(n,e),onInputChange:(e,t)=>{"input-change"===t.action&&c(e)},onChange:e=>r({[n.id]:null!=e?e:[]})})})},pn=({data:e,field:t,onChange:n,validity:r})=>{const i=(0,s.useMemo)(()=>dn((e,n)=>ln(t.api_endpoint,e).then(n)),[t.api_endpoint]);return(0,s.useEffect)(()=>()=>i.cancel(),[i]),(0,p.jsx)(g,{field:t,error:m(r),children:(0,p.jsx)(u.AsyncSelect,{isMulti:t.multiple,cacheOptions:!0,defaultOptions:!0,value:on(e[t.id]),loadOptions:i,onChange:e=>n({[t.id]:e}),placeholder:t.placeholder,components:{MultiValue:Yt.MultiValue,ValueContainer:Yt.ValueContainer}})})},mn=e=>e.field.tree?(0,p.jsx)(hn,{...e}):e.field.creatable?(0,p.jsx)(fn,{...e}):(0,p.jsx)(pn,{...e});var gn=n(231);const bn=(0,h.A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),yn=({attr:e,onUpdate:n,onRemove:r,productType:i,cardExpanded:l,index:a,isDragOver:c,onDragStart:d,onDragEnter:h,onDragOver:f,onDrop:m,onDragEnd:g})=>{var b;const[y,v]=(0,s.useState)(l),[x,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[_,A]=(0,s.useState)(""),[E,S]=(0,s.useState)(!1),[C,T]=(0,s.useState)(!1),L=Boolean(window.dokanProductEditor?.can_add_new_attribute),O=(t,r)=>{n({...e,[t]:r})},q=`/dokan/v1/products/attributes/${e.id}/terms`,j=e=>({value:e.value,label:e.label}),R=(0,s.useCallback)(async t=>{if(!e.is_taxonomy||!e.id)return[];try{const e=await tn()({path:(0,nn.addQueryArgs)(q,{search:t||"",per_page:20})});return Array.isArray(e)?e.map(j):[]}catch{return[]}},[e.id,e.is_taxonomy]),M=(0,s.useMemo)(()=>(0,rn.debounce)((...e)=>{const t=e[0]||"",n=e[1];R(t).then(n)},300),[R]);(0,s.useEffect)(()=>()=>M.cancel(),[M]);const D=t=>{const r=Array.isArray(t)?t:[],i=r.map(e=>e.value);n({...e,options:i,terms:r})},I=()=>{v(!y)};return(0,p.jsxs)("div",{className:"border rounded bg-white overflow-hidden transition-[border-color,opacity] duration-200 "+(c?"border-primary border-dashed":""),draggable:x,onDragStart:()=>d(a),onDragEnter:()=>h(a),onDragOver:f,onDrop:m,onDragEnd:()=>{w(!1),g()},children:[(0,p.jsxs)("div",{role:"button",tabIndex:0,className:"flex justify-between items-center p-3 bg-gray-50 border-b cursor-pointer select-none",onClick:I,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),I())},children:[(0,p.jsxs)("div",{className:"flex items-center gap-2",children:[(0,p.jsx)("button",{type:"button",className:"cursor-grab text-gray-400 hover:text-gray-600 bg-transparent border-none",onMouseDown:e=>{e.stopPropagation(),w(!0)},onMouseUp:()=>w(!1),onClick:e=>e.stopPropagation(),children:(0,p.jsx)(bn,{size:16})}),(0,p.jsx)("span",{className:"font-semibold text-gray-700 text-sm",children:e.name||(0,o.__)("New Attribute","dokan-lite")})]}),(0,p.jsxs)("div",{className:"flex items-center gap-3",children:[(0,p.jsx)("button",{type:"button",onClick:r,className:"text-red-500 hover:text-red-700 text-xs font-medium bg-transparent border-none",children:(0,o.__)("Remove","dokan-lite")}),(0,p.jsx)("span",{className:"transform transition-transform duration-200 "+(y?"rotate-180":""),children:(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,p.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),y&&(0,p.jsxs)("div",{className:"p-4 grid grid-cols-1 md:grid-cols-2 gap-4 bg-white",children:[(0,p.jsx)("div",{children:(0,p.jsx)(gn.A,{label:(0,o.__)("Name","dokan-lite"),value:e.name,onChange:e=>O("name",e),disabled:!!e.is_taxonomy,className:"w-full px-3 py-2 border rounded text-sm disabled:bg-gray-100 disabled:text-gray-500",input:{placeholder:(0,o.__)("e.g. Color or Size","dokan-lite")}})}),(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{className:"block text-xs font-medium text-gray-500 mb-1",htmlFor:`dokan-attr-values-${e.id}`,children:(0,o.__)("Value(s)","dokan-lite")}),e.is_taxonomy?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.AsyncSelect,{isMulti:!0,cacheOptions:!0,defaultOptions:!0,closeMenuOnSelect:!1,value:null!==(b=e.terms)&&void 0!==b?b:[],loadOptions:M,onChange:e=>D(e),placeholder:(0,o.__)("Select terms","dokan-lite")}),(0,p.jsxs)("div",{className:"flex justify-start gap-2 items-center mt-2",children:[(0,p.jsx)(u.DokanButton,{type:"button",variant:"secondary",onClick:async()=>{if(e.is_taxonomy&&e.id){T(!0);try{const e=1e3,t=await tn()({path:(0,nn.addQueryArgs)(q,{per_page:e})});D(Array.isArray(t)?t.map(j):[])}catch{}finally{T(!1)}}},disabled:C,loading:C,children:(0,o.__)("Select all","dokan-lite")}),(0,p.jsx)(u.DokanButton,{type:"button",variant:"secondary",onClick:()=>{D([])},children:(0,o.__)("Select none","dokan-lite")}),L&&(0,p.jsx)(u.DokanButton,{type:"button",variant:"secondary",onClick:()=>k(!0),children:(0,o.__)("Add New","dokan-lite")})]}),L&&(0,p.jsx)(u.DokanModal,{isOpen:N,namespace:"add-attribute-term",dialogTitle:(0,o.__)("Add New Term","dokan-lite"),onClose:()=>{k(!1),A("")},onConfirm:async()=>{if(_.trim()&&e.is_taxonomy){S(!0);try{var t;const n=await tn()({path:`/dokan/v1/products/attributes/${e.id}/terms`,method:"POST",data:{name:_.trim()}}),r={value:n.id,label:n.name},i=null!==(t=e.terms)&&void 0!==t?t:[];D([...i,r]),A(""),k(!1)}catch{}finally{S(!1)}}},loading:E,confirmButtonDisabled:!_.trim(),dialogContent:(0,p.jsx)("div",{children:(0,p.jsx)(t.SimpleInput,{label:(0,o.__)("Term Name","dokan-lite"),value:_,onChange:e=>A(e.target.value),className:"w-full px-3 py-2 border rounded text-sm",input:{id:`dokan-new-term-${e.id}`,placeholder:(0,o.__)("Enter term name","dokan-lite"),autoFocus:!0}})})})]}):(0,p.jsx)(t.TaggableSelect,{isMulti:!0,value:(e.options||[]).map(e=>({value:e,label:e})),onChange:e=>D(e),placeholder:(0,o.__)("Enter values","dokan-lite")})]}),(0,p.jsxs)("div",{className:"col-span-1 md:col-span-2 mt-2 text-sm text-gray-600 flex flex-col md:flex-row gap-4",children:[(0,p.jsxs)("label",{className:"inline-flex items-center",htmlFor:`dokan-attr-visible-${e.id}`,children:[(0,p.jsx)(t.SimpleCheckbox,{checked:e.visible,onChange:e=>O("visible",e.target.checked),input:{id:`dokan-attr-visible-${e.id}`}}),(0,o.__)("Visible on the product page","dokan-lite")]}),i?.includes("variable")&&(0,p.jsxs)("label",{className:"inline-flex items-center",htmlFor:`dokan-attr-variation-${e.id}`,children:[(0,p.jsx)(t.SimpleCheckbox,{checked:e.variation,onChange:e=>O("variation",e.target.checked),input:{id:`dokan-attr-variation-${e.id}`}}),(0,o.__)("Used for variations","dokan-lite")]})]})]})]})},vn=({data:e,field:t,onChange:n,validity:r})=>{const i=(0,s.useMemo)(()=>e[t.id]||[],[e,t.id]),{isLoading:l,submitHandler:a,getDefaultValue:d,handleDefaultChange:h}=xr(e.id),{type:f}=e,[b,y]=(0,s.useState)(!1),v=(0,s.useRef)(null),[x,w]=(0,s.useState)(null),N=(0,s.useCallback)(e=>{v.current=e},[]),k=(0,s.useCallback)(e=>{w(e)},[]),_=(0,s.useCallback)(e=>{e.preventDefault()},[]),A=(0,s.useCallback)(()=>{const e=v.current,r=x;if(null===e||null===r||e===r)return v.current=null,void w(null);const s=[...i],[o]=s.splice(e,1);s.splice(r,0,o);const l=s.map((e,t)=>({...e,position:t}));n({[t.id]:l}),v.current=null,w(null)},[i,x,n,t.id]),E=(0,s.useCallback)(()=>{v.current=null,w(null)},[]),[S,C]=(0,s.useState)(null),T=(0,s.useCallback)(async e=>{const t={label:(0,o.__)("Custom Attribute","dokan-lite"),value:""};let n=[];try{const e=await tn()({path:"/dokan/v1/products/attributes"});n=Array.isArray(e)?e:[]}catch{n=[]}const r=(e||"").toLowerCase(),s=n.map(e=>({label:e.name,value:e.id,slug:e.slug})).filter(e=>!i.some(t=>t.is_taxonomy&&Number(t.id)===Number(e.value))).filter(e=>!r||e.label.toLowerCase().includes(r));return!r||t.label.toLowerCase().includes(r)?[t,...s]:s},[i]),L=(0,s.useMemo)(()=>i.filter(e=>e.variation),[i]),O=(0,s.useCallback)(e=>e.is_taxonomy&&e.terms?e.terms.map(e=>({label:e.label,value:e.label})):(e.options||[]).map(e=>({label:String(e),value:String(e)})),[]);return(0,p.jsx)(g,{field:t,error:m(r),children:(0,p.jsxs)("div",{className:"flex flex-col gap-4",children:[i.map((e,r)=>(0,p.jsx)(yn,{attr:e,productType:f,cardExpanded:b,onUpdate:e=>((e,r)=>{const s=[...i];s[e]=r,n({[t.id]:s})})(r,e),onRemove:e=>{e.stopPropagation(),(e=>{const r=[...i];r.splice(e,1),n({[t.id]:r})})(r)},index:r,isDragOver:x===r,onDragStart:N,onDragEnter:k,onDragOver:_,onDrop:A,onDragEnd:E},e.position)),(0,p.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,p.jsx)("div",{className:"grow",children:(0,p.jsx)(u.AsyncSelect,{cacheOptions:!0,defaultOptions:!0,value:S,loadOptions:T,onChange:e=>C(e),placeholder:(0,o.__)("Add existing attribute or custom","dokan-lite"),isClearable:!1},i.length)}),(0,p.jsx)(u.DokanButton,{type:"button",variant:"secondary",onClick:()=>{const e={id:0,name:"",options:[],visible:!0,variation:!1,position:i.length,is_taxonomy:!1,value:""};S&&""!==S.value?(e.id=parseInt(S.value,10),e.name=S.label,e.is_taxonomy=!0):e.name=(0,o.__)("Custom Attribute","dokan-lite");const r=[...i,e];n({[t.id]:r}),C(null),y(!0)},children:(0,o.__)("Add New","dokan-lite")})]}),f.includes("variable")&&L.length>0&&(0,p.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,p.jsx)("div",{className:"text-sm font-medium text-gray-700",children:(0,o.__)("Default Form Values","dokan-lite")}),(0,p.jsx)("div",{className:"grid md:grid-cols-3 sm:grid-cols-2 gap-4",children:L.map(e=>(0,p.jsx)(u.Select,{options:O(e),placeholder:`${(0,o.__)("No default","dokan-lite")} ${e.name}…`,value:d(e),onChange:t=>h(e,t),isClearable:!0},e.name))})]}),i.length>0&&(0,p.jsx)("div",{children:(0,p.jsx)(u.DokanButton,{type:"button",variant:"secondary",onClick:a,disabled:l,loading:l,label:(0,o.__)("Save Attributes","dokan-lite")})}),(0,c.applyFilters)("dokan_product_editor_after_attributes",null,e,i)]})})},xn=({data:e,field:t,onChange:n,validity:r})=>(0,p.jsx)(g,{field:t,error:m(r),children:(0,p.jsx)(u.DateTimePicker,{placeholder:t.placeholder,currentDate:e[t.id],onChange:e=>{n({[t.id]:e})}})}),wn=(0,h.A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var Nn=n(8697);const kn=({images:e,onRemove:t,children:n,itemClassName:r=""})=>{const i=Array.isArray(e)?e:[e];return 0!==i.length||n?(0,p.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map((e,n)=>(0,p.jsxs)("div",{className:`relative group border border-gray-200 rounded-md overflow-hidden ${r}`,children:[(0,p.jsx)("img",{src:e.url,alt:e.alt||"product",className:"w-full h-full object-cover"}),(0,p.jsx)("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors duration-200 flex items-center justify-center",children:(0,p.jsx)("button",{type:"button",className:"bg-white rounded-full p-1 shadow-sm opacity-0 group-hover:opacity-100 transition-opacity duration-200 hover:text-red-500",onClick:e=>{e.preventDefault(),t(n)},children:(0,p.jsx)(Nn.A,{size:16})})})]},e.url)),n]}):null},_n=({data:e,field:t,onChange:n,validity:r})=>{const[i,l]=(0,s.useState)(e[t.id]),a=e=>{n({[t.id]:e}),l({id:e.id,url:e.url,alt:e.alt})},d="dokan-product-image_id "+(t.is_custom?"is-custom":"");return(0,p.jsxs)(g,{field:t,error:m(r),children:[i?.url?(0,p.jsx)(kn,{itemClassName:d,images:i,onRemove:()=>{n({[t.id]:null}),l(null)}}):(0,p.jsx)(u.MediaUploader,{onSelect:a,className:d,children:(0,p.jsxs)(u.DokanButton,{variant:"secondary",className:"uppercase",children:[(0,p.jsx)(wn,{size:16}),(0,o.__)("Upload","dokan-lite")]})}),(0,c.applyFilters)("dokan_product_editor_after_ui_image_id",null,e,t,a)]})},An=window.dokan.components,En=(0,h.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Sn={type:"downloadable_product"},Cn=({field:e,onChange:n,validity:r})=>{const[i,l]=(0,s.useState)(e.value?.length>0?e.value:[{id:"",name:"",file:""}]);(0,s.useEffect)(()=>{e.value?.length>0&&l(e.value)},[e.value]);const a=Boolean((0,c.applyFilters)("dokan_product_editor_file_field_read_only","downloads"!==e?.id,e)),d=(0,c.applyFilters)("dokan_product_editor_file_field_uploader_params","downloads"===e?.id?Sn:void 0,e),h=(t,r,s)=>{const o=i.map((e,n)=>n===t?{...e,[r]:s}:e);l(o),n({[e.id]:o})};return(0,p.jsx)(g,{field:e,error:m(r),children:(0,p.jsxs)("div",{className:"flex flex-col gap-3",children:[i.map((r,s)=>(0,p.jsx)("div",{className:"flex flex-col gap-2 p-3 border border-gray-200 rounded relative bg-white",children:(0,p.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,p.jsx)("div",{className:"min-w-0 flex-1 basis-0",children:(0,p.jsx)(t.SimpleInput,{value:r.name||"",onChange:e=>h(s,"name",e.target.value),input:{placeholder:(0,o.__)("Enter name","dokan-lite"),readOnly:a,disabled:a}})}),(0,p.jsx)("div",{className:"min-w-0 flex-2 basis-0",children:(0,p.jsx)(t.SimpleInput,{value:r.file||"",onChange:e=>h(s,"file",e.target.value),input:{placeholder:(0,o.__)("Enter URL or select file","dokan-lite"),readOnly:a,disabled:a}})}),(0,p.jsxs)("div",{className:"flex gap-2 shrink-0 items-center",children:[(0,p.jsx)(u.MediaUploader,{uploaderParams:d,onSelect:t=>((t,r)=>{const s=Array.isArray(t)?t[0]:t,o=[...i];o[r]={...o[r],id:String(s.id),file:s.url,name:s.title||s.name},l(o),n({[e.id]:o})})(t,s),children:(0,p.jsx)(An.DokanButton,{icon:wn,variant:"secondary",label:(0,o.__)("Choose","dokan-lite"),className:"whitespace-nowrap"})}),(0,p.jsx)(An.DokanButton,{type:"button",variant:"secondary",onClick:()=>(t=>{const r=i.filter((e,n)=>n!==t);l(r),n({[e.id]:r})})(s),children:(0,p.jsx)(Nn.A,{size:16})})]})]})},s)),(0,p.jsx)(An.DokanButton,{icon:En,variant:"secondary",label:(0,o.__)("Add New","dokan-lite"),onClick:()=>{const t=[...i,{id:"",name:"",file:""}];l(t),n({[e.id]:t})},className:"self-start"})]})})},Tn=({field:e,onChange:t,validity:n})=>{const[r,i]=(0,s.useState)(e.value||[]);return(0,p.jsx)(g,{field:e,error:m(n),children:(0,p.jsx)(kn,{images:r,onRemove:n=>{const s=r.filter((e,t)=>t!==n);t({[e.id]:s.map(e=>e.id)}),i(s)},itemClassName:`dokan-product-${e.id}`,children:(0,p.jsx)(u.MediaUploader,{onSelect:n=>{const s=[...r,...n].filter((e,t,n)=>t===n.findIndex(t=>t.id===e.id));t({[e.id]:s.map(e=>e.id)}),i(s)},className:`dokan-product-${e.id}`,multiple:!0,children:(0,p.jsx)(wn,{size:16})})})})};var Ln=n(2956);const On=({data:e,field:t,onChange:n,validity:r})=>{var i;const[l,a]=(0,s.useState)(Number(e.vendor_earning)),c=null!==(i=e[t.id])&&void 0!==i?i:"",[h,f]=(0,s.useState)(()=>(0,Ln.formatNumber)(c));(0,s.useEffect)(()=>{f(e=>Number((0,Ln.unformatNumber)(e))===Number(c)?e:(0,Ln.formatNumber)(c))},[c,t.id]);const b=()=>"regular_price"===t.id?(0,p.jsxs)("div",{className:"flex gap-1 items-center",children:[t.label," ",l>0&&(0,p.jsxs)("span",{className:"text-xs font-normal text-gray-500",children:["( ",(0,o.__)("Your Earn:","dokan-lite")," ",(0,d.decodeEntities)((0,Ln.formatPrice)(l))," ",")"]})]}):t.label;return(0,p.jsx)(g,{field:t,label:(0,p.jsx)(b,{}),error:m(r),children:(0,p.jsx)(u.DokanPriceInput,{label:"",value:h,namespace:`dokan-field-${t.id}`,className:"product-editor-price-input",input:{id:t.id,placeholder:t.placeholder||""},onChange:(r,i)=>{f(r);const s=i>0?Number(i):"";n({[t.id]:s}),(async n=>{if("regular_price"===t.id)try{const t=await tn()({path:(0,nn.addQueryArgs)("/dokan/v1/commission",{amount:n,product_id:e.id,category_ids:e.category_ids||[],context:"seller"})});a(Number(t))}catch(e){a(0)}})(Number(s))}})})},qn=({data:e,field:t,onChange:n,validity:r})=>(0,p.jsx)(g,{field:t,error:m(r),children:(0,p.jsx)(u.RichText,{placeholder:t.placeholder,value:e[t.id],onChange:e=>{n({[t.id]:e})}})}),jn=({data:e,field:n,onChange:r,validity:i})=>(0,p.jsx)(g,{field:n,error:m(i),children:(0,p.jsx)(t.TextArea,{input:{id:`textarea-${n.id}`,placeholder:n.placeholder,rows:5},value:e[n.id]||"",onChange:e=>{r({[n.id]:e.target.value})}})}),Rn=({children:e,...t})=>{const{data:n,isSelected:r}=t,i=20*(n.level||0)+10;return(0,p.jsx)(Yt.Option,{...t,children:(0,p.jsxs)("div",{style:{paddingLeft:`${i}px`},className:"flex items-center gap-2",children:[r?(0,p.jsx)(Qt,{size:16}):(0,p.jsx)(Jt,{size:16}),e]})})},Mn=(e,t=0)=>e.reduce((e,n)=>{const r={...n,level:t};return e.push(r),n.children&&n.children.length>0&&e.push(...Mn(n.children,t+1)),e},[]),Dn=({data:e,field:n,onChange:r,validity:i})=>{const s=(0,N.useMemo)(()=>{let t=n.elements||[];if(n.options_map&&n.dependencies?.length){const r=n.dependencies.find(e=>"options"===e.type);if(r){const i=e[r.key];i&&n.options_map[i]&&(t=n.options_map[i])}}return(0,c.applyFilters)("dokan_product_editor_select_options",t,n,e)},[n,e]),o=Mn(s),l=e[n.id],a=o.some(e=>e.children&&e.children.length>0),d=n.multiple||Array.isArray(l),h=n.placeholder,f=()=>null==l?d?[]:null:Array.isArray(l)?l.length>0&&"object"==typeof l[0]&&"value"in l[0]?l:l.map(e=>{const t=o.find(t=>t.value===e);if(t)return t;const n="string"==typeof e?e:String(e);return{value:e,label:n}}):o.find(e=>e.value===l)||null,b=a?{Option:Rn}:void 0,y=e=>{if(d){const t=Array.isArray(e)?e.map(e=>e.value):[];r({[n.id]:t})}else{const t=e?e.value:"";r({[n.id]:t})}},v=n.creatable&&d,x=Boolean(n.creatable);return(0,p.jsx)(g,{field:n,error:m(i),children:v?(0,p.jsx)("div",{onKeyDown:e=>{"Enter"!==e.key||x||e.preventDefault()},children:(0,p.jsx)(t.TaggableSelect,{isMulti:!0,options:o,placeholder:h,value:f(),isValidNewOption:(t,r,i)=>{const s=t.trim(),o=e=>String(e?.label).trim().toLowerCase()===s.toLowerCase(),l=x&&!!s&&!r.some(o)&&!i.some(o);return(0,c.applyFilters)("dokan_product_editor_is_valid_new_option",l,t,n,e)},onChange:y})}):(0,p.jsx)(u.Select,{options:o,isMulti:d,placeholder:h,value:f(),components:b,onChange:y})})};var In=n(6427);const Pn=(e,t)=>{var n;return null!==(n=e.find(e=>e.id===t))&&void 0!==n?n:null},Bn=(e,t="simple")=>{var n;return null!==(n=e.labels?.[t])&&void 0!==n?n:e.label},zn=(e,t="simple")=>{var n,r;return null===(n=null!==(r=e.visibilities?.[t])&&void 0!==r?r:e.visibility)||void 0===n||n},$n=(e,t="simple")=>{var n,r;return null!==(n=null!==(r=e.requireds?.[t])&&void 0!==r?r:e.required)&&void 0!==n&&n},Un=(e,t)=>{const n=Pn(e,t);return n?{label:n.label,description:n.description}:{}};function Fn(e){if("field"!==e.type)return;const t=e.value;return"checkbox"===e.variant?"yes"===t||"on"===t||!0===t||1===t||"1"===t:null!=t?t:""}function Hn(e){return null==e||("string"==typeof e?""===e.trim():!!Array.isArray(e)&&0===e.length)}function Vn(e){return"on"===e||"yes"===e||!0===e||1===e||"off"!==e&&"no"!==e&&!1!==e&&e}const Wn=(e,t)=>!e.dependencies?.length||e.dependencies.filter(e=>"options"!==e.type).every(e=>function(e,t){if(!e.key)return!0;const{key:n,comparison:r,value:i}=e,s=t[n];switch(r){case"empty":return Hn(s);case"not_empty":return!Hn(s);case"==":case"equal":return Vn(s)==Vn(i);case"===":return Vn(s)===Vn(i);case"!=":case"not_equal":return Vn(s)!=Vn(i);case"!==":return Vn(s)!==Vn(i);case"contains":return!("string"!=typeof s&&!Array.isArray(s))&&s.includes(i);default:return!0}}(e,t)),Gn=(e,t=[],n)=>{const r=n?.type||"simple";return e.map(e=>{if("string"==typeof e){const s=(i=e,t.find(e=>"field"===e.type&&e.id===i));return s&&zn(s,r)&&Wn(s,n)?e:null}var i;const s={...e};return"card"===s.layout?.type&&s.description&&(s.label=(0,p.jsxs)("div",{className:"dokan-form-card-header-content",children:[(0,p.jsx)("div",{className:"dokan-form-card-title",children:s.label}),(0,p.jsx)("div",{className:"dokan-form-card-description",dangerouslySetInnerHTML:{__html:(0,Ln.sanitizeHTML)(s.description)}})]}),delete s.description),s.children&&(s.children=Gn(s.children,t,n)),s.layout&&!s.children?.length?null:s}).filter(Boolean)},Kn=(e,t,n)=>e.map(e=>"string"!=typeof e&&e.id===n?{...e,children:[...e.children||[],...t]}:"string"!=typeof e&&e.children?{...e,children:Kn(e.children,t,n)}:e),Zn=(e,t=new Set)=>(e.forEach(e=>{"string"!=typeof e?e.children&&Zn(e.children,t):t.add(e)}),t),Xn=(e,t)=>{const n={};return e.forEach(e=>{var r;if("field"!==e.type)return;if(t.has(e.id))return;const i=null!==(r=e.section_id)&&void 0!==r?r:"";i&&(n[i]||(n[i]=[]),n[i].push(e.id))}),n},Yn=(e,t=null)=>e.filter(e=>e.parent_id===t).map(t=>{var n;const r=Yn(e,t.id),i=[...null!==(n=t.children)&&void 0!==n?n:[]],s=[];r.forEach(t=>{const n=e.find(e=>e.id===t.id);if(n?.after){const e=i.findIndex(e=>e===n.after);-1!==e?i.splice(e+1,0,t):s.push(t)}else s.push(t)}),i.push(...s);const o={id:t.id};return t.layout&&(o.layout=t.layout),t.label&&(o.label=t.label),t.description&&(o.description=t.description),i.length>0&&(o.children=i),o}),Qn=(e,t)=>e.map(e=>{if("string"==typeof e)return e;const n={...e};return n.id&&t[n.id]&&(n.children=[...n.children||[],...t[n.id]],delete t[n.id]),n.children&&(n.children=Qn(n.children,t)),n});function Jn(e,t){if(e.responsive?.length&&t){const n=[...e.responsive].sort((e,t)=>e.maxWidth-t.maxWidth);for(const e of n)if(t<=e.maxWidth)return e.layout}return e.layout}function er(e,t){if("string"==typeof e)return e;const n={...e};if(n.layout?.withHeader&&!n.label){const e=Un(t,n.id);e.label&&(n.label=e.label),e.description&&(n.description=e.description)}return n.children&&(n.children=n.children.map(e=>er(e,t))),n}const tr=e=>null==e||("string"==typeof e?0===e.trim().length:!!Array.isArray(e)&&0===e.length),nr=(e,t)=>!e||0===e.length||Wn({dependencies:e},t),rr=(e,t,n)=>{const{rules:r,message:i,params:s}=e;switch(r){case"required":case"not_empty":return tr(t)?i:null;case"empty":return tr(t)?null:i;case"greater_than":case">":{if(tr(t))return null;const e=parseFloat(t);if(isNaN(e))return null;if(s.field){const t=parseFloat(n[s.field]);return!isNaN(t)&&e<=t?i:null}return void 0!==s.value?e>Number(s.value)?null:i:null}case">=":case"greater_than_or_equal":{if(tr(t))return null;const e=parseFloat(t);if(isNaN(e))return null;if(s.field){const t=parseFloat(n[s.field]);return!isNaN(t)&&e<t?i:null}return void 0!==s.value?e>=Number(s.value)?null:i:null}case"less_than":case"<":{if(tr(t))return null;const e=parseFloat(t);if(isNaN(e))return null;if(s.field){const t=parseFloat(n[s.field]);return!isNaN(t)&&e>=t?i:null}return void 0!==s.value?e<Number(s.value)?null:i:null}case"<=":case"less_than_or_equal":{if(tr(t))return null;const e=parseFloat(t);if(isNaN(e))return null;if(s.field){const t=parseFloat(n[s.field]);return!isNaN(t)&&e>t?i:null}return void 0!==s.value?e<=Number(s.value)?null:i:null}default:return null}},ir=e=>{const t={...e,readOnly:e.disabled||!1,label:(0,p.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,p.jsx)(s.RawHTML,{className:"dokan-form-field-label",children:(0,d.decodeEntities)(e.label)}),e.tooltip&&(0,p.jsx)(u.DokanTooltip,{content:e.tooltip,children:(0,p.jsx)(f,{size:16})})]}),type:e.variant,placeholder:e.placeholder,elements:(e=>{const{options:t}=e||{};if(!t)return[];const n=e=>({...e,label:(0,d.decodeEntities)(e.label),...Array.isArray(e.children)?{children:e.children.map(n)}:{}});return Array.isArray(t)?t.map(n):Object.entries(t).map(([e,t])=>({label:(0,d.decodeEntities)(t),value:e}))})(e),isValid:{required:e.required||!1,elements:!1,custom:t=>{const n=!1!==e.visibility&&Wn(e,t);if(e.required&&n&&tr(t?.[e.id]))return(0,o.__)("Please fill out this field.","dokan-lite");if(!n)return null;const r=((e,t)=>{if(!e.validations||0===e.validations.length)return null;const n=t?.[e.id];for(const r of e.validations){if(!nr(r.dependencies,t))continue;const e=rr(r,n,t);if(e)return e}return null})(e,t);return r||null}},isVisible:t=>!1!==e.visibility&&Wn(e,t)},n=vr(e);if(Object.assign(t,n),e.prefix&&!n.Edit){const n=e.prefix,r=()=>(0,p.jsx)(In.__experimentalInputControlPrefixWrapper,{children:(0,p.jsx)("span",{title:n,className:"text-gray-500 whitespace-nowrap",children:n})});t.Edit={control:"text",prefix:r}}e.description&&(t.description=(0,p.jsx)("span",{dangerouslySetInnerHTML:{__html:e.description}}));const r={...e,rawLabel:e.label,multiple:n.multiple||!1},i=t.Edit;return"function"==typeof i?{...t,Edit:e=>(0,p.jsx)(i,{...e,field:{...r,...e.field}})}:t},sr=()=>({Edit:jn,type:"text"}),or=()=>({Edit:qn,type:"text"}),lr=()=>({type:"boolean",Edit:"checkbox",render:()=>null}),ar=()=>({Edit:"radio"}),cr=()=>({type:"integer"}),ur=()=>({type:"datetime",Edit:xn}),dr=e=>{const t={Edit:Dn,multiple:!1};return Array.isArray(e?.value)&&(t.multiple=!0),t},hr=e=>{const t={Edit:mn,multiple:!1};return"boolean"==typeof e?.multiple?t.multiple=e.multiple:Array.isArray(e?.value)&&(t.multiple=!0),t},fr=()=>({Edit:Dn,multiple:!0}),pr=()=>({Edit:_n}),mr=()=>({Edit:Cn}),gr=()=>({Edit:vn}),br=()=>({Edit:Tn}),yr=e=>{const t={};return e?.id.includes("price")&&(t.Edit=On),t},vr=e=>{var t;let n={textarea:sr,editor:or,checkbox:lr,radio:ar,number:cr,datetime:ur,select:dr,async_select:hr,multiselect:fr,image:pr,gallery:br,attribute:gr,file:mr};return n=(0,c.applyFilters)("dokan_product_editor_ui_variant",n,e),(n[null!==(t=e.variant)&&void 0!==t?t:""]||yr)(e)};function xr(e,n=!1){const r=(0,t.useToast)(),{product:l,formItems:u,isLoading:d}=(0,i.useSelect)(t=>({product:t(a()).getProduct(e),formItems:t(a()).getFormItems(e),isLoading:t(a()).isSubmitting(e)}),[e]),{updateProduct:h,saveProduct:f}=(0,i.useDispatch)(a()),p=l?.type||"simple",m=(0,s.useMemo)(()=>u?u.filter(e=>"field"===e.type).map(e=>{const t={...e,label:Bn(e,p),visibility:zn(e,p),required:$n(e,p)};return ir(t)}):[],[u,p]),g=(0,s.useCallback)(t=>{h(e,t),(0,c.doAction)("dokan_product_editor_field_changed",{productId:e,newData:t})},[e,h]),b=(0,s.useMemo)(()=>l?.attributes||[],[l?.attributes]),y=(0,s.useMemo)(()=>b.filter(e=>e.variation),[b]);(0,s.useEffect)(()=>{if(void 0!==l?.default_attributes)return;if(!y.length)return;const e=y.filter(e=>e.default).map(e=>({id:e.id,name:e.name,option:e.default}));g({default_attributes:e})},[l?.default_attributes,y,g]);const v=(0,s.useMemo)(()=>l?.default_attributes||[],[l?.default_attributes]),x=(0,s.useCallback)(e=>{const t=v.find(t=>t.name===e.name);return t&&t.option?{label:t.option,value:t.option}:null},[v]),w=(0,s.useCallback)((e,t)=>{const n=t?"string"==typeof t?t:t.label||t.value||"":"";let r;if(n){const t=v.findIndex(t=>t.name===e.name);t>=0?(r=[...v],r[t]={id:e.id,name:e.name,option:n}):r=[...v,{id:e.id,name:e.name,option:n}]}else r=v.filter(t=>t.name!==e.name);g({default_attributes:r})},[v,g]),N=(0,s.useCallback)(async t=>{t?.preventDefault&&(t.preventDefault(),t.stopPropagation());try{await f(e),(0,c.doAction)("dokan_product_editor_after_save",e),r({type:"success",title:(0,o.__)("Product saved successfully.","dokan-lite")}),n&&(window.location.href=window.dokanProductEditor.products_url)}catch(e){throw r({type:"error",title:e.message||(0,o.__)("Error saving product.","dokan-lite")}),e}},[e,f,r,n]);return{product:l||{},fields:m,formItems:u||[],onChange:g,submitHandler:N,isLoading:d,defaultAttributes:v,getDefaultValue:x,handleDefaultChange:w}}function wr(e,t,n){const{initForm:r}=(0,i.useDispatch)(a());(0,s.useEffect)(()=>{t.length>0&&r(e,t,n)},[e,t,n,r])}var Nr=n(5654);function kr(e,t,n=[]){const{width:r}=(0,Nr.useWindowDimensions)(),i=(0,s.useMemo)(()=>r?n.map(e=>{if(!e.responsive?.length)return e;const t=Jn(e,r);return{...e,layout:t}}):n,[n,r]),o=(0,s.useMemo)(()=>{const t=Yn(i,null).map(t=>er(t,e)),n=Zn(t),r=Xn(e,n);let s=Qn(t,r);const o=Object.keys(r).map(t=>{const n=Un(e,t);return{id:t,layout:{type:"card",withHeader:!0},children:r[t],...n}});return o.length>0&&(s=Kn(s,o,"primary_column")),s},[i,e]);return{formLayouts:(0,s.useMemo)(()=>({fields:Gn(o,e,t)}),[o,e,t]),width:r}}})(),(window.dokan=window.dokan||{}).productEditor=r})();