django-content-studio 1.0.0b2.post2__py3-none-any.whl → 1.0.0b2.post3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -225,4 +225,4 @@ ${y.slice(d+2)}`,p+=1;else break}t.push({indent:d,number:parseInt(l,10),content:
225
225
  `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{const t=e.match(/^(\s*)(\d+)\.\s+/),n=t?.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;const i=e.split(`
226
226
  `),[o,a]=fve(i);if(o.length===0)return;const l=Q3(o,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=o[0])==null?void 0:r.number)||1,items:l,raw:i.slice(0,a).join(`
227
227
  `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(pve,this.editor.getAttributes(y2)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=ju({find:v2,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=ju({find:v2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(y2)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),mve=/^\s*(\[([( |x])?\])\s$/,gve=ci.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Un(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{const n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){const r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;const i=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return rE(e,t,i)},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const i=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),u=document.createElement("div"),d=h=>{var p,g;l.ariaLabel=((g=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:g.call(p,h,l.checked))||`Task item checkbox for ${h.textContent||"empty task item"}`};return d(e),o.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",h=>h.preventDefault()),l.addEventListener("change",h=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:p}=h.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:g})=>{const y=n();if(typeof y!="number")return!1;const b=g.doc.nodeAt(y);return g.setNodeMarkup(y,void 0,{...b?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,p)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([h,p])=>{i.setAttribute(h,p)}),i.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,o.append(l,a),i.append(o,u),Object.entries(t).forEach(([h,p])=>{i.setAttribute(h,p)}),{dom:i,contentDOM:u,update:h=>h.type!==this.type?!1:(i.dataset.checked=h.attrs.checked,l.checked=h.attrs.checked,d(h),!0)}}},addInputRules(){return[ju({find:mve,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),yve=ci.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Un(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
228
- `):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;const n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){const r=o=>{const a=N1(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,u)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:u}),customNestedParser:r},n);return a?[{type:"taskList",raw:a.raw,items:a.items}]:n.blockTokens(o)},i=N1(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,a)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:a}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});qn.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(V3.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(q3.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(X3.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(J3.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(gve.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(yve.configure(this.options.taskList)),e}});var vve=ci.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Un(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{const n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),bve=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,xve=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wve=ac.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Un(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[_u({find:bve,type:this.type})]},addPasteRules(){return[Yl({find:xve,type:this.type})]}}),Sve=ci.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});function Cve(e={}){return new In({view(t){return new Eve(t,e)}})}class Eve{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=a=>{this[i](a)};return t.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,i=this.editorView.dom,o=i.getBoundingClientRect(),a=o.width/i.offsetWidth,l=o.height/i.offsetHeight;if(n){let p=t.nodeBefore,g=t.nodeAfter;if(p||g){let y=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(y){let b=y.getBoundingClientRect(),C=p?b.bottom:b.top;p&&g&&(C=(C+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let E=this.width/2*l;r={left:b.left,right:b.right,top:C-E,bottom:C+E}}}}if(!r){let p=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*a;r={left:p.left-g,right:p.left+g,top:p.top,bottom:p.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let d,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")d=-pageXOffset,h=-pageYOffset;else{let p=u.getBoundingClientRect(),g=p.width/u.offsetWidth,y=p.height/u.offsetHeight;d=p.left-u.scrollLeft*g,h=p.top-u.scrollTop*y}this.element.style.left=(r.left-d)/a+"px",this.element.style.top=(r.top-h)/l+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!o){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=e$(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class jn extends gt{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return jn.valid(r)?new jn(r):gt.near(r)}content(){return Le.empty}eq(t){return t instanceof jn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new jn(t.resolve(n.pos))}getBookmark(){return new pE(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!kve(t)||!Mve(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&jn.valid(t))return t;let i=t.pos,o=null;for(let a=t.depth;;a--){let l=t.node(a);if(n>0?t.indexAfter(a)<l.childCount:t.index(a)>0){o=l.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;i+=n;let u=t.doc.resolve(i);if(jn.valid(u))return u}for(;;){let a=n>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!Je.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=a,i+=n;let l=t.doc.resolve(i);if(jn.valid(l))return l}return null}}}jn.prototype.visible=!1;jn.findFrom=jn.findGapCursorFrom;gt.jsonID("gapcursor",jn);class pE{constructor(t){this.pos=t}map(t){return new pE(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return jn.valid(n)?new jn(n):gt.near(n)}}function kve(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Mve(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Ove(){return new In({props:{decorations:Rve,createSelectionBetween(e,t,n){return t.pos==n.pos&&jn.valid(n)?new jn(n):null},handleClick:Ave,handleKeyDown:Tve,handleDOMEvents:{beforeinput:Dve}}})}const Tve=e3({ArrowLeft:Tm("horiz",-1),ArrowRight:Tm("horiz",1),ArrowUp:Tm("vert",-1),ArrowDown:Tm("vert",1)});function Tm(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,o){let a=r.selection,l=t>0?a.$to:a.$from,u=a.empty;if(a instanceof st){if(!o.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(t>0?l.after():l.before())}let d=jn.findGapCursorFrom(l,t,u);return d?(i&&i(r.tr.setSelection(new jn(d))),!0):!1}}function Ave(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!jn.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Je.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new jn(r))),!0)}function Dve(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof jn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=Me.empty;for(let a=r.length-1;a>=0;a--)i=Me.from(r[a].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Le(i,0,0));return o.setSelection(st.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Rve(e){if(!(e.selection instanceof jn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Mn.create(e.doc,[zr.widget(e.selection.head,t,{key:"gapcursor"})])}var my=200,mr=function(){};mr.prototype.append=function(t){return t.length?(t=mr.from(t),!this.length&&t||t.length<my&&this.leafAppend(t)||this.length<my&&t.leafPrepend(this)||this.appendInner(t)):this};mr.prototype.prepend=function(t){return t.length?mr.from(t).append(this):this};mr.prototype.appendInner=function(t){return new Nve(this,t)};mr.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?mr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};mr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};mr.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};mr.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(t(o,a))},n,r),i};mr.from=function(t){return t instanceof mr?t:t&&t.length?new eF(t):mr.empty};var eF=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,a,l){for(var u=o;u<a;u++)if(i(this.values[u],l+u)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,a,l){for(var u=o-1;u>=a;u--)if(i(this.values[u],l+u)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=my)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=my)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(mr);mr.empty=new eF([]);var Nve=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,a){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(o,l),a)===!1||o>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,a){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,a+l)===!1||o<l&&this.left.forEachInvertedInner(r,Math.min(i,l),o,a)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(mr);const _ve=500;class fo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=t.tr,l,u,d=[],h=[];return this.items.forEach((p,g)=>{if(!p.step){i||(i=this.remapping(r,g+1),o=i.maps.length),o--,h.push(p);return}if(i){h.push(new hs(p.map));let y=p.step.map(i.slice(o)),b;y&&a.maybeStep(y).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],d.push(new hs(b,void 0,void 0,d.length+h.length))),o--,b&&i.appendMap(b,o)}else a.maybeStep(p.step);if(p.selection)return l=i?p.selection.map(i.slice(o)):p.selection,u=new fo(this.items.slice(0,r).append(h.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(t,n,r,i){let o=[],a=this.eventCount,l=this.items,u=!i&&l.length?l.get(l.length-1):null;for(let h=0;h<t.steps.length;h++){let p=t.steps[h].invert(t.docs[h]),g=new hs(t.mapping.maps[h],p,n),y;(y=u&&u.merge(g))&&(g=y,h?o.pop():l=l.slice(0,l.length-1)),o.push(g),n&&(a++,n=void 0),i||(u=g)}let d=a-r.depth;return d>Pve&&(l=jve(l,d),a-=d),new fo(l.append(o),a)}remapping(t,n){let r=new Zf;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new fo(this.items.append(t.map(n=>new hs(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,a=t.steps.length,l=this.eventCount;this.items.forEach(g=>{g.selection&&l--},i);let u=n;this.items.forEach(g=>{let y=o.getMirror(--u);if(y==null)return;a=Math.min(a,y);let b=o.maps[y];if(g.step){let C=t.steps[y].invert(t.docs[y]),E=g.selection&&g.selection.map(o.slice(u+1,y));E&&l++,r.push(new hs(b,C,E))}else r.push(new hs(b))},i);let d=[];for(let g=n;g<a;g++)d.push(new hs(o.maps[g]));let h=this.items.slice(0,i).append(d).append(r),p=new fo(h,l);return p.emptyItemCount()>_ve&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((a,l)=>{if(l>=t)i.push(a),a.selection&&o++;else if(a.step){let u=a.step.map(n.slice(r)),d=u&&u.getMap();if(r--,d&&n.appendMap(d,r),u){let h=a.selection&&a.selection.map(n.slice(r));h&&o++;let p=new hs(d.invert(),u,h),g,y=i.length-1;(g=i.length&&i[y].merge(p))?i[y]=g:i.push(p)}}else a.map&&r--},this.items.length,0),new fo(mr.from(i.reverse()),o)}}fo.empty=new fo(mr.empty,0);function jve(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}let hs=class tF{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new tF(n.getMap().invert(),n,this.selection)}}};class bs{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Pve=20;function Lve(e,t,n,r){let i=n.getMeta(_l),o;if(i)return i.historyState;n.getMeta($ve)&&(e=new bs(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(_l))return a.getMeta(_l).redo?new bs(e.done.addTransform(n,void 0,r,Gm(t)),e.undone,b2(n.mapping.maps),e.prevTime,e.prevComposition):new bs(e.done,e.undone.addTransform(n,void 0,r,Gm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=e.prevTime==0||!a&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!zve(n,e.prevRanges)),d=a?sw(e.prevRanges,n.mapping):b2(n.mapping.maps);return new bs(e.done.addTransform(n,u?t.selection.getBookmark():void 0,r,Gm(t)),fo.empty,d,n.time,l??e.prevComposition)}else return(o=n.getMeta("rebased"))?new bs(e.done.rebased(n,o),e.undone.rebased(n,o),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new bs(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function zve(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function b2(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,a)=>t.push(o,a));return t}function sw(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function Ive(e,t,n){let r=Gm(t),i=_l.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let a=o.selection.resolve(o.transform.doc),l=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),u=new bs(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(a).setMeta(_l,{redo:n,historyState:u})}let lw=!1,x2=null;function Gm(e){let t=e.plugins;if(x2!=t){lw=!1,x2=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){lw=!0;break}}return lw}const _l=new yr("history"),$ve=new yr("closeHistory");function Fve(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new In({key:_l,state:{init(){return new bs(fo.empty,fo.empty,null,0,-1)},apply(t,n,r){return Lve(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?rF:r=="historyRedo"?iF:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function nF(e,t){return(n,r)=>{let i=_l.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=Ive(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const rF=nF(!1,!0),iF=nF(!0,!0);qn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new In({key:new yr("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const i=this.options.limit;if(i==null||i===0){e=!0;return}const o=this.storage.characters({node:r.doc});if(o>i){const a=o-i,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,u);return e=!0,d}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;if(i>r&&o>r&&o>i||!t.getMeta("paste"))return!1;const l=t.selection.$head.pos,u=o-r,d=l-u,h=l;return t.deleteRange(d,h),!(this.storage.characters({node:t.doc})>r)}})]}});var Bve=qn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Cve(this.options)]}});qn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new In({key:new yr("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return Mn.create(e,[]);let a=0;this.options.mode==="deepest"&&e.descendants((u,d)=>{if(u.isText)return;if(!(i>=d&&i<=d+u.nodeSize-1))return!1;a+=1});let l=0;return e.descendants((u,d)=>{if(u.isText||!(i>=d&&i<=d+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";o.push(zr.node(d,d+u.nodeSize,{class:this.options.className}))}),Mn.create(e,o)}}})]}});var Hve=qn.create({name:"gapCursor",addProseMirrorPlugins(){return[Ove()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Yt(Qe(e,"allowGapCursor",n)))!=null?t:null}}});qn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new In({key:new yr("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,d=!a.isLeaf&&Ev(a);if((u||!this.options.showOnlyCurrent)&&d){const h=[this.options.emptyNodeClass];o&&h.push(this.options.emptyEditorClass);const p=zr.node(l,l+a.nodeSize,{class:h.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),Mn.create(e,i)}}})]}});qn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new In({key:new yr("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||g3(n.selection)||e.view.dragging?null:Mn.create(n.doc,[zr.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function w2({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Uve=qn.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new yr(this.name),n=((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||this.options.node||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new In({key:t,appendTransaction:(i,o,a)=>{const{doc:l,tr:u,schema:d}=a,h=t.getState(a),p=l.content.size,g=d.nodes[n];if(h)return u.insert(p,g.create())},state:{init:(i,o)=>{const a=o.tr.doc.lastChild;return!w2({node:a,types:r})},apply:(i,o)=>{if(!i.docChanged)return o;const a=i.doc.lastChild;return!w2({node:a,types:r})}}})]}}),Vve=qn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>rF(e,t),redo:()=>({state:e,dispatch:t})=>iF(e,t)}},addProseMirrorPlugins(){return[Fve(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),qve=qn.create({name:"starterKit",addExtensions(){var e,t,n,r;const i=[];return this.options.bold!==!1&&i.push(Vye.configure(this.options.bold)),this.options.blockquote!==!1&&i.push($ye.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(V3.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Kye.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Gye.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Xye.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(Bve.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(Hve.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Qye.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Jye.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(Vve.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(eve.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(ove.configure(this.options.italic)),this.options.listItem!==!1&&i.push(q3.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(X3.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&i.push(B3.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&i.push(J3.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(vve.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(wve.configure(this.options.strike)),this.options.text!==!1&&i.push(Sve.configure(this.options.text)),this.options.underline!==!1&&i.push(H3.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(Uve.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),Wve="Separator",S2="horizontal",Kve=["horizontal","vertical"],oF=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=S2,...i}=e,o=Yve(r)?r:S2,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return x.jsx(Ge.div,{"data-orientation":o,...l,...i,ref:t})});oF.displayName=Wve;function Yve(e){return Kve.includes(e)}var Zve=oF;function C2({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(Zve,{"data-slot":"separator",decorative:n,orientation:t,className:we("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var aF="Toggle",sF=w.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[a,l]=qo({prop:n,onChange:i,defaultProp:r??!1,caller:aF});return x.jsx(Ge.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:_e(e.onClick,()=>{e.disabled||l(!a)})})});sF.displayName=aF;var Gve=sF;const Xve=ec("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-stone-700 data-[state=on]:text-white [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-8 px-1.5 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-9 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Am({className:e,variant:t,size:n,...r}){return x.jsx(Gve,{"data-slot":"toggle",className:we(Xve({variant:t,size:n,className:e})),...r})}function E2(e,[t,n]){return Math.min(n,Math.max(t,e))}function Qve(e){const t=Jve(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,l=w.Children.toArray(o),u=l.find(tbe);if(u){const d=u.props.children,h=l.map(p=>p===u?w.Children.count(d)>1?w.Children.only(null):w.isValidElement(d)?d.props.children:null:p);return x.jsx(t,{...a,ref:i,children:w.isValidElement(d)?w.cloneElement(d,void 0,h):null})}return x.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Jve(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=rbe(i),l=nbe(o,i.props);return i.type!==w.Fragment&&(l.ref=r?Ir(r,a):a),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ebe=Symbol("radix.slottable");function tbe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ebe}function nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const u=o(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function rbe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ibe=[" ","Enter","ArrowUp","ArrowDown"],obe=[" ","Enter"],Zl="Select",[Ov,Tv,abe]=vC(Zl),[ed,Axe]=Ti(Zl,[abe,qs]),Av=qs(),[sbe,Gs]=ed(Zl),[lbe,cbe]=ed(Zl),lF=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:l,onValueChange:u,dir:d,name:h,autoComplete:p,disabled:g,required:y,form:b}=e,C=Av(t),[E,k]=w.useState(null),[O,A]=w.useState(null),[N,D]=w.useState(!1),L=lv(d),[T,I]=qo({prop:r,defaultProp:i??!1,onChange:o,caller:Zl}),[G,te]=qo({prop:a,defaultProp:l,onChange:u,caller:Zl}),fe=w.useRef(null),Q=E?b||!!E.closest("form"):!0,[J,H]=w.useState(new Set),q=Array.from(J).map(R=>R.props.value).join(";");return x.jsx(Uy,{...C,children:x.jsxs(sbe,{required:y,scope:t,trigger:E,onTriggerChange:k,valueNode:O,onValueNodeChange:A,valueNodeHasChildren:N,onValueNodeHasChildrenChange:D,contentId:hr(),value:G,onValueChange:te,open:T,onOpenChange:I,dir:L,triggerPointerDownPosRef:fe,disabled:g,children:[x.jsx(Ov.Provider,{scope:t,children:x.jsx(lbe,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(R=>{H(F=>new Set(F).add(R))},[]),onNativeOptionRemove:w.useCallback(R=>{H(F=>{const z=new Set(F);return z.delete(R),z})},[]),children:n})}),Q?x.jsxs(DF,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:p,value:G,onChange:R=>te(R.target.value),disabled:g,form:b,children:[G===void 0?x.jsx("option",{value:""}):null,Array.from(J)]},q):null]})})};lF.displayName=Zl;var cF="SelectTrigger",uF=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Av(n),a=Gs(cF,n),l=a.disabled||r,u=Dt(t,a.onTriggerChange),d=Tv(n),h=w.useRef("touch"),[p,g,y]=NF(C=>{const E=d().filter(A=>!A.disabled),k=E.find(A=>A.value===a.value),O=_F(E,C,k);O!==void 0&&a.onValueChange(O.value)}),b=C=>{l||(a.onOpenChange(!0),y()),C&&(a.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return x.jsx(xh,{asChild:!0,...o,children:x.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":RF(a.value)?"":void 0,...i,ref:u,onClick:_e(i.onClick,C=>{C.currentTarget.focus(),h.current!=="mouse"&&b(C)}),onPointerDown:_e(i.onPointerDown,C=>{h.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(b(C),C.preventDefault())}),onKeyDown:_e(i.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&g(C.key),!(E&&C.key===" ")&&ibe.includes(C.key)&&(b(),C.preventDefault())})})})});uF.displayName=cF;var dF="SelectValue",fF=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...l}=e,u=Gs(dF,n),{onValueNodeHasChildrenChange:d}=u,h=o!==void 0,p=Dt(t,u.onValueNodeChange);return sr(()=>{d(h)},[d,h]),x.jsx(Ge.span,{...l,ref:p,style:{pointerEvents:"none"},children:RF(u.value)?x.jsx(x.Fragment,{children:a}):o})});fF.displayName=dF;var ube="SelectIcon",hF=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return x.jsx(Ge.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});hF.displayName=ube;var dbe="SelectPortal",pF=e=>x.jsx(Bu,{asChild:!0,...e});pF.displayName=dbe;var Gl="SelectContent",mF=w.forwardRef((e,t)=>{const n=Gs(Gl,e.__scopeSelect),[r,i]=w.useState();if(sr(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?sh.createPortal(x.jsx(gF,{scope:e.__scopeSelect,children:x.jsx(Ov.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),o):null}return x.jsx(yF,{...e,ref:t})});mF.displayName=Gl;var so=10,[gF,Xs]=ed(Gl),fbe="SelectContentImpl",hbe=Qve("SelectContent.RemoveScroll"),yF=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:u,align:d,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:b,hideWhenDetached:C,avoidCollisions:E,...k}=e,O=Gs(Gl,n),[A,N]=w.useState(null),[D,L]=w.useState(null),T=Dt(t,ne=>N(ne)),[I,G]=w.useState(null),[te,fe]=w.useState(null),Q=Tv(n),[J,H]=w.useState(!1),q=w.useRef(!1);w.useEffect(()=>{if(A)return ky(A)},[A]),Cy();const R=w.useCallback(ne=>{const[Ce,...Te]=Q().map(De=>De.ref.current),[ye]=Te.slice(-1),Se=document.activeElement;for(const De of ne)if(De===Se||(De?.scrollIntoView({block:"nearest"}),De===Ce&&D&&(D.scrollTop=0),De===ye&&D&&(D.scrollTop=D.scrollHeight),De?.focus(),document.activeElement!==Se))return},[Q,D]),F=w.useCallback(()=>R([I,A]),[R,I,A]);w.useEffect(()=>{J&&F()},[J,F]);const{onOpenChange:z,triggerPointerDownPosRef:B}=O;w.useEffect(()=>{if(A){let ne={x:0,y:0};const Ce=ye=>{ne={x:Math.abs(Math.round(ye.pageX)-(B.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(B.current?.y??0))}},Te=ye=>{ne.x<=10&&ne.y<=10?ye.preventDefault():A.contains(ye.target)||z(!1),document.removeEventListener("pointermove",Ce),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",Ce),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",Te,{capture:!0})}}},[A,z,B]),w.useEffect(()=>{const ne=()=>z(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[z]);const[U,P]=NF(ne=>{const Ce=Q().filter(Se=>!Se.disabled),Te=Ce.find(Se=>Se.ref.current===document.activeElement),ye=_F(Ce,ne,Te);ye&&setTimeout(()=>ye.ref.current.focus())}),j=w.useCallback((ne,Ce,Te)=>{const ye=!q.current&&!Te;(O.value!==void 0&&O.value===Ce||ye)&&(G(ne),ye&&(q.current=!0))},[O.value]),$=w.useCallback(()=>A?.focus(),[A]),K=w.useCallback((ne,Ce,Te)=>{const ye=!q.current&&!Te;(O.value!==void 0&&O.value===Ce||ye)&&fe(ne)},[O.value]),ee=r==="popper"?V1:vF,ge=ee===V1?{side:l,sideOffset:u,align:d,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:b,hideWhenDetached:C,avoidCollisions:E}:{};return x.jsx(gF,{scope:n,content:A,viewport:D,onViewportChange:L,itemRefCallback:j,selectedItem:I,onItemLeave:$,itemTextRefCallback:K,focusSelectedItem:F,selectedItemText:te,position:r,isPositioned:J,searchRef:U,children:x.jsx(ch,{as:hbe,allowPinchZoom:!0,children:x.jsx(lh,{asChild:!0,trapped:O.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:_e(i,ne=>{O.trigger?.focus({preventScroll:!0}),ne.preventDefault()}),children:x.jsx(Fu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:x.jsx(ee,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ne=>ne.preventDefault(),...k,...ge,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:_e(k.onKeyDown,ne=>{const Ce=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!Ce&&ne.key.length===1&&P(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ye=Q().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Se=ne.target,De=ye.indexOf(Se);ye=ye.slice(De+1)}setTimeout(()=>R(ye)),ne.preventDefault()}})})})})})})});yF.displayName=fbe;var pbe="SelectItemAlignedPosition",vF=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Gs(Gl,n),a=Xs(Gl,n),[l,u]=w.useState(null),[d,h]=w.useState(null),p=Dt(t,T=>h(T)),g=Tv(n),y=w.useRef(!1),b=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:k,focusSelectedItem:O}=a,A=w.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&d&&C&&E&&k){const T=o.trigger.getBoundingClientRect(),I=d.getBoundingClientRect(),G=o.valueNode.getBoundingClientRect(),te=k.getBoundingClientRect();if(o.dir!=="rtl"){const Se=te.left-I.left,De=G.left-Se,it=T.left-De,yt=T.width+it,ot=Math.max(yt,I.width),Nt=window.innerWidth-so,xt=E2(De,[so,Math.max(so,Nt-ot)]);l.style.minWidth=yt+"px",l.style.left=xt+"px"}else{const Se=I.right-te.right,De=window.innerWidth-G.right-Se,it=window.innerWidth-T.right-De,yt=T.width+it,ot=Math.max(yt,I.width),Nt=window.innerWidth-so,xt=E2(De,[so,Math.max(so,Nt-ot)]);l.style.minWidth=yt+"px",l.style.right=xt+"px"}const fe=g(),Q=window.innerHeight-so*2,J=C.scrollHeight,H=window.getComputedStyle(d),q=parseInt(H.borderTopWidth,10),R=parseInt(H.paddingTop,10),F=parseInt(H.borderBottomWidth,10),z=parseInt(H.paddingBottom,10),B=q+R+J+z+F,U=Math.min(E.offsetHeight*5,B),P=window.getComputedStyle(C),j=parseInt(P.paddingTop,10),$=parseInt(P.paddingBottom,10),K=T.top+T.height/2-so,ee=Q-K,ge=E.offsetHeight/2,ne=E.offsetTop+ge,Ce=q+R+ne,Te=B-Ce;if(Ce<=K){const Se=fe.length>0&&E===fe[fe.length-1].ref.current;l.style.bottom="0px";const De=d.clientHeight-C.offsetTop-C.offsetHeight,it=Math.max(ee,ge+(Se?$:0)+De+F),yt=Ce+it;l.style.height=yt+"px"}else{const Se=fe.length>0&&E===fe[0].ref.current;l.style.top="0px";const it=Math.max(K,q+C.offsetTop+(Se?j:0)+ge)+Te;l.style.height=it+"px",C.scrollTop=Ce-K+C.offsetTop}l.style.margin=`${so}px 0`,l.style.minHeight=U+"px",l.style.maxHeight=Q+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,l,d,C,E,k,o.dir,r]);sr(()=>A(),[A]);const[N,D]=w.useState();sr(()=>{d&&D(window.getComputedStyle(d).zIndex)},[d]);const L=w.useCallback(T=>{T&&b.current===!0&&(A(),O?.(),b.current=!1)},[A,O]);return x.jsx(gbe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:L,children:x.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:x.jsx(Ge.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});vF.displayName=pbe;var mbe="SelectPopperPosition",V1=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=so,...o}=e,a=Av(n);return x.jsx(Vy,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});V1.displayName=mbe;var[gbe,mE]=ed(Gl,{}),q1="SelectViewport",bF=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Xs(q1,n),a=mE(q1,n),l=Dt(t,o.onViewportChange),u=w.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(Ov.Slot,{scope:n,children:x.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:_e(i.onScroll,d=>{const h=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g?.current&&p){const y=Math.abs(u.current-h.scrollTop);if(y>0){const b=window.innerHeight-so*2,C=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),k=Math.max(C,E);if(k<b){const O=k+y,A=Math.min(b,O),N=O-A;p.style.height=A+"px",p.style.bottom==="0px"&&(h.scrollTop=N>0?N:0,p.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})});bF.displayName=q1;var xF="SelectGroup",[ybe,vbe]=ed(xF),bbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hr();return x.jsx(ybe,{scope:n,id:i,children:x.jsx(Ge.div,{role:"group","aria-labelledby":i,...r,ref:t})})});bbe.displayName=xF;var wF="SelectLabel",xbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=vbe(wF,n);return x.jsx(Ge.div,{id:i.id,...r,ref:t})});xbe.displayName=wF;var gy="SelectItem",[wbe,SF]=ed(gy),CF=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,l=Gs(gy,n),u=Xs(gy,n),d=l.value===r,[h,p]=w.useState(o??""),[g,y]=w.useState(!1),b=Dt(t,O=>u.itemRefCallback?.(O,r,i)),C=hr(),E=w.useRef("touch"),k=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(wbe,{scope:n,value:r,disabled:i,textId:C,isSelected:d,onItemTextChange:w.useCallback(O=>{p(A=>A||(O?.textContent??"").trim())},[]),children:x.jsx(Ov.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:x.jsx(Ge.div,{role:"option","aria-labelledby":C,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:b,onFocus:_e(a.onFocus,()=>y(!0)),onBlur:_e(a.onBlur,()=>y(!1)),onClick:_e(a.onClick,()=>{E.current!=="mouse"&&k()}),onPointerUp:_e(a.onPointerUp,()=>{E.current==="mouse"&&k()}),onPointerDown:_e(a.onPointerDown,O=>{E.current=O.pointerType}),onPointerMove:_e(a.onPointerMove,O=>{E.current=O.pointerType,i?u.onItemLeave?.():E.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(a.onPointerLeave,O=>{O.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:_e(a.onKeyDown,O=>{u.searchRef?.current!==""&&O.key===" "||(obe.includes(O.key)&&k(),O.key===" "&&O.preventDefault())})})})})});CF.displayName=gy;var mf="SelectItemText",EF=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Gs(mf,n),l=Xs(mf,n),u=SF(mf,n),d=cbe(mf,n),[h,p]=w.useState(null),g=Dt(t,k=>p(k),u.onItemTextChange,k=>l.itemTextRefCallback?.(k,u.value,u.disabled)),y=h?.textContent,b=w.useMemo(()=>x.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value),[u.disabled,u.value,y]),{onNativeOptionAdd:C,onNativeOptionRemove:E}=d;return sr(()=>(C(b),()=>E(b)),[C,E,b]),x.jsxs(x.Fragment,{children:[x.jsx(Ge.span,{id:u.textId,...o,ref:g}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?sh.createPortal(o.children,a.valueNode):null]})});EF.displayName=mf;var kF="SelectItemIndicator",MF=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return SF(kF,n).isSelected?x.jsx(Ge.span,{"aria-hidden":!0,...r,ref:t}):null});MF.displayName=kF;var W1="SelectScrollUpButton",OF=w.forwardRef((e,t)=>{const n=Xs(W1,e.__scopeSelect),r=mE(W1,e.__scopeSelect),[i,o]=w.useState(!1),a=Dt(t,r.onScrollButtonChange);return sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=u.scrollTop>0;o(d)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(AF,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});OF.displayName=W1;var K1="SelectScrollDownButton",TF=w.forwardRef((e,t)=>{const n=Xs(K1,e.__scopeSelect),r=mE(K1,e.__scopeSelect),[i,o]=w.useState(!1),a=Dt(t,r.onScrollButtonChange);return sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<d;o(h)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(AF,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});TF.displayName=K1;var AF=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Xs("SelectScrollButton",n),a=w.useRef(null),l=Tv(n),u=w.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return w.useEffect(()=>()=>u(),[u]),sr(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),x.jsx(Ge.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:_e(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:_e(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:_e(i.onPointerLeave,()=>{u()})})}),Sbe="SelectSeparator",Cbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(Ge.div,{"aria-hidden":!0,...r,ref:t})});Cbe.displayName=Sbe;var Y1="SelectArrow",Ebe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Av(n),o=Gs(Y1,n),a=Xs(Y1,n);return o.open&&a.position==="popper"?x.jsx(qy,{...i,...r,ref:t}):null});Ebe.displayName=Y1;var kbe="SelectBubbleInput",DF=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),o=Dt(r,i),a=vP(t);return w.useEffect(()=>{const l=i.current;if(!l)return;const u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&h){const p=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(p)}},[a,t]),x.jsx(Ge.select,{...n,style:{...dL,...n.style},ref:o,defaultValue:t})});DF.displayName=kbe;function RF(e){return e===""||e===void 0}function NF(e){const t=Qi(e),n=w.useRef(""),r=w.useRef(0),i=w.useCallback(a=>{const l=n.current+a;t(l),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(l)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function _F(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Mbe(e,Math.max(o,0));i.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function Mbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Obe=lF,Tbe=uF,Abe=fF,Dbe=hF,Rbe=pF,Nbe=mF,_be=bF,jbe=CF,Pbe=EF,Lbe=MF,zbe=OF,Ibe=TF;function jF({...e}){return x.jsx(Obe,{"data-slot":"select",...e})}function $be({...e}){return x.jsx(Abe,{"data-slot":"select-value",...e})}function PF({className:e,size:t="default",children:n,...r}){return x.jsxs(Tbe,{"data-slot":"select-trigger","data-size":t,className:we("border-input hover:border-slate-300 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,x.jsx(Dbe,{asChild:!0,children:x.jsx(yh,{className:"size-4 opacity-50"})})]})}function LF({className:e,children:t,position:n="popper",align:r="center",...i}){return x.jsx(Rbe,{children:x.jsxs(Nbe,{"data-slot":"select-content",className:we("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md shadow-foreground/5",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[x.jsx(Fbe,{}),x.jsx(_be,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),x.jsx(Bbe,{})]})})}function zF({className:e,children:t,...n}){return x.jsxs(jbe,{"data-slot":"select-item",className:we("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[x.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:x.jsx(Lbe,{children:x.jsx(yP,{className:"size-4"})})}),x.jsx(Pbe,{children:t})]})}function Fbe({className:e,...t}){return x.jsx(zbe,{"data-slot":"select-scroll-up-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(qZ,{className:"size-4"})})}function Bbe({className:e,...t}){return x.jsx(Ibe,{"data-slot":"select-scroll-down-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(yh,{className:"size-4"})})}function Hbe(e){return e?.isActive("codeBlock")?"codeBlock":e?.isActive("blockquote")?"blockquote":e?.isActive("heading",{level:1})?"heading1":e?.isActive("heading",{level:2})?"heading2":e?.isActive("heading",{level:3})?"heading3":e?.isActive("heading",{level:4})?"heading4":e?.isActive("heading",{level:5})?"heading5":e?.isActive("heading",{level:6})?"heading6":"paragraph"}const Ube=["heading1","heading2","heading3","heading4","heading5","heading6","paragraph","blockquote","codeBlock"];function Vbe({editor:e}){const{t}=cn(),n=e?Hbe(e):void 0;return x.jsxs(jF,{value:n,onValueChange:r=>{const i=e.chain().focus().clearNodes();r.startsWith("heading")&&i.setHeading({level:Number(r.at(-1))}).run(),r==="blockquote"&&i.setBlockquote().run(),r==="codeBlock"&&i.setCodeBlock().run(),r==="paragraph"&&i.setParagraph().run()},children:[x.jsx(PF,{children:t(`widgets.rich_text_widget.${n}`)}),x.jsx(LF,{children:Ube.map(r=>x.jsx(zF,{value:r,children:t(`widgets.rich_text_widget.${r}`)},r))})]})}function qbe({editor:e}){const{t}=cn(),[n,r]=w.useState(!1),i=!zn(e.view.state.selection.content().toJSON());return x.jsxs(x.Fragment,{children:[n&&x.jsx(Wbe,{editor:e,onClose:()=>r(!1)}),x.jsxs(SL,{children:[x.jsx(EL,{children:e.isActive("link")?t("widgets.rich_text_widget.update_link"):t("widgets.rich_text_widget.set_link")}),x.jsx(CL,{asChild:!0,children:x.jsx(on,{size:"sm",variant:"ghost",disabled:!i&&!e.isActive("link"),onClick:()=>r(!0),children:x.jsx(DG,{})})})]})]})}const Wbe=({editor:e,onClose:t})=>{const{t:n}=cn(),[r,i]=w.useState(e.getAttributes("link").href??""),o=e.isActive("link");return x.jsx(Zu,{open:!0,onOpenChange:a=>{a||t()},children:x.jsxs(Gu,{children:[x.jsx(XS,{children:x.jsx(QS,{children:n(o?"widgets.rich_text_widget.update_link":"widgets.rich_text_widget.set_link")})}),x.jsx("div",{className:"py-6",children:x.jsx(Mr,{placeholder:"https://",value:r,onChange:a=>i(a.target.value)})}),x.jsxs(mJ,{children:[o&&x.jsx(on,{variant:"destructive",className:"mr-auto",onClick:()=>{e.chain().focus().unsetLink().run(),t()},children:n("widgets.rich_text_widget.remove_link")}),x.jsx(on,{variant:"ghost",onClick:()=>t(),children:n("common.cancel")}),x.jsx(on,{onClick:()=>{e.chain().focus().extendMarkRange("link").setLink({href:r}).run(),t()},children:n(o?"widgets.rich_text_widget.update_link":"widgets.rich_text_widget.set_link")})]})]})})};function Kbe({editor:e}){return e&&x.jsxs("div",{className:"border-b flex items-center gap-2 p-1 overflow-x-auto overflow-y-hidden",children:[x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().undo().run(),children:x.jsx(SG,{})}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().redo().run(),children:x.jsx(CG,{})}),x.jsx("div",{className:"w-[140px]",children:x.jsx(Vbe,{editor:e})}),x.jsx(Am,{pressed:e?.isActive("bold"),onPressedChange:()=>e?.chain().focus().toggleBold().run(),children:x.jsx(jG,{})}),x.jsx(Am,{pressed:e?.isActive("italic"),onPressedChange:()=>e?.chain().focus().toggleItalic().run(),children:x.jsx(PG,{})}),x.jsx(Am,{pressed:e?.isActive("underline"),onPressedChange:()=>e?.chain().focus().toggleUnderline().run(),children:x.jsx(zG,{})}),x.jsx(Am,{pressed:e?.isActive("strike"),onPressedChange:()=>e?.chain().focus().toggleStrike().run(),children:x.jsx(LG,{})}),x.jsx(C2,{orientation:"vertical",className:"h-auto self-stretch"}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().toggleOrderedList().run(),children:x.jsx(RG,{})}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().toggleBulletList().run(),children:x.jsx(NG,{})}),x.jsx(C2,{orientation:"vertical",className:"h-auto self-stretch"}),x.jsx(qbe,{editor:e})]})}const Ybe=[qve,mye,B3.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),H3,Sge.configure({HTMLAttributes:{class:"rich-text-image"}})];function Zbe({value:e,onChange:t,disabled:n}){const r=jye({extensions:Ybe,content:e,editable:!n,editorProps:{attributes:{class:"rich-text-field"}},onUpdate({editor:i}){t?.(i.getHTML())}});return w.useEffect(()=>{e!==r.getHTML()&&r.commands.setContent(e??"")},[e,r]),zn(e)?null:x.jsxs("div",{className:"border border-solid rounded-md bg-background focus-within:border-ring",children:[x.jsx(Kbe,{editor:r}),x.jsx("div",{className:"max-h-[600px] overflow-y-auto scrollbar",children:x.jsx(Oye,{editor:r})})]})}function Gbe({field:e,value:t,onChange:n}){return x.jsxs(jF,{value:t,onValueChange:n,children:[x.jsx(PF,{children:x.jsx($be,{})}),x.jsx(LF,{children:e.choices?.map(([r,i])=>x.jsx(zF,{value:r,children:i}))})]})}function Xbe({value:e,onChange:t}){return x.jsx("div",{children:x.jsx(Mr,{value:e,onChange:n=>t(n.target.value.toLowerCase().replace(/[^0-9a-z_-]/g,"-"))})})}function Qbe({value:e,onChange:t}){return x.jsx("div",{children:x.jsx(Cce,{value:e,onChange:n=>t(n.target.value)})})}function Jbe({value:e="",onChange:t}){const[n,r]=e.split(":"),i=w.useRef(null);return x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Mr,{value:n,maxLength:2,max:24,inputMode:"decimal",className:"w-12",placeholder:"HH",onFocus:o=>o.target.select(),onChange:o=>{const a=o.target.value;t(`${a}:${r}`),a.length===2&&i.current&&i.current.focus()}}),x.jsx("span",{children:":"}),x.jsx(Mr,{value:r,maxLength:2,inputMode:"decimal",className:"w-12",placeholder:"mm",ref:i,onFocus:o=>o.target.select(),onChange:o=>t(`${n}:${o.target.value}`)})]})}function e0e({value:e,onChange:t}){return x.jsx("div",{children:x.jsxs(xI,{children:[x.jsx(c1,{children:"/"}),x.jsx(wI,{value:e.replace(/^\//,""),onChange:n=>t(`/${n.target.value.toLowerCase().replace(/[^0-9a-z_/-]/g,"-")}`)})]})})}function t0e({value:e,onChange:t,field:n}){const{data:r}=gh(),i=n.widget_class??r?.widgets[n.type]?.name??null,o=w.useMemo(()=>kS([[zn,Rt(TR)],[()=>n.type===Py.CharField&&!zn(n.choices),Rt(Gbe)],[sn(ti.DateWidget),Rt(Fse)],[sn(ti.ForeignKeyWidget),Rt(Use)],[sn(ti.InputWidget),Rt(TR)],[sn(ti.JSONSchemaWidget),Rt(Vse)],[sn(ti.ManyToManyWidget),Rt(Cle)],[sn(ti.MediaWidget),Rt(mde)],[sn(ti.MultiSelectWidget),Rt(xde)],[sn(ti.RichTextWidget),Rt(Zbe)],[sn(ti.TextAreaWidget),Rt(Qbe)],[sn(ti.SlugWidget),Rt(Xbe)],[sn(ti.URLPathWidget),Rt(e0e)],[sn(ti.CheckboxWidget),Rt(zre)],[sn(ti.TimeWidget),Rt(Jbe)],[wS,Rt(Bse)]])(i),[n.choices,n.type,i]);return x.jsx(o,{value:e,onChange:t,field:n})}function k2({formField:e,model:t}){const n=Xu(),r=t.fields[e.name];return x.jsx("div",{children:x.jsx(of,{control:n.control,name:e.name,render:({field:i})=>x.jsxs(af,{children:[x.jsx(Vm,{children:e.label||r?.verbose_name}),!r||r.readonly?x.jsx(GS,{value:i.value,field:r}):x.jsx(sf,{children:x.jsx(t0e,{field:r,...i})}),r&&x.jsx(Lre,{children:r.help_text}),x.jsx(lf,{})]})})})}function IF({formSet:e,model:t,hiddenFields:n=[]}){return x.jsxs("div",{children:[x.jsxs("div",{className:"mb-4 empty:hidden",children:[e.title&&x.jsx("h4",{className:"font-semibold",children:e.title}),e.description?x.jsx("div",{className:"text-sm text-muted-foreground",children:e.description}):null]}),x.jsx("div",{className:"space-y-3",children:e.fields.map((r,i)=>GW("fields",r)?x.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:`repeat(${r.fields.length}, 1fr)`},children:r.fields.filter(o=>!n.includes(o.name)).map(o=>x.jsx(k2,{formField:o,model:t},i))}):!n.includes(r.name)&&x.jsx(k2,{formField:r,model:t},i))})]})}function n0e({model:e,hiddenFields:t}){const{admin:{edit:{sidebar:n}}}=e;return!ks(n)&&!zn(n)&&x.jsx("aside",{className:"space-y-4",children:n.map((i,o)=>x.jsx("section",{className:"border rounded-lg p-4 w-full",children:x.jsx(IF,{model:e,formSet:i,hiddenFields:t})},o))})}var Dv="DropdownMenu",[r0e,Dxe]=Ti(Dv,[uv]),Vr=uv(),[i0e,$F]=r0e(Dv),FF=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=Vr(t),d=w.useRef(null),[h,p]=qo({prop:i,defaultProp:o??!1,onChange:a,caller:Dv});return x.jsx(i0e,{scope:t,triggerId:hr(),triggerRef:d,contentId:hr(),open:h,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(g=>!g),[p]),modal:l,children:x.jsx(XI,{...u,open:h,onOpenChange:p,dir:r,modal:l,children:n})})};FF.displayName=Dv;var BF="DropdownMenuTrigger",HF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=$F(BF,n),a=Vr(n);return x.jsx(QI,{asChild:!0,...a,children:x.jsx(Ge.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ir(t,o.triggerRef),onPointerDown:_e(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:_e(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});HF.displayName=BF;var o0e="DropdownMenuPortal",UF=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Vr(t);return x.jsx(JI,{...r,...n})};UF.displayName=o0e;var VF="DropdownMenuContent",qF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$F(VF,n),o=Vr(n),a=w.useRef(!1);return x.jsx(e4,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:_e(e.onCloseAutoFocus,l=>{a.current||i.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:_e(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,h=u.button===2||d;(!i.modal||h)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qF.displayName=VF;var a0e="DropdownMenuGroup",s0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(t4,{...i,...r,ref:t})});s0e.displayName=a0e;var l0e="DropdownMenuLabel",c0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(n4,{...i,...r,ref:t})});c0e.displayName=l0e;var u0e="DropdownMenuItem",WF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(r4,{...i,...r,ref:t})});WF.displayName=u0e;var d0e="DropdownMenuCheckboxItem",f0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(i4,{...i,...r,ref:t})});f0e.displayName=d0e;var h0e="DropdownMenuRadioGroup",p0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(o4,{...i,...r,ref:t})});p0e.displayName=h0e;var m0e="DropdownMenuRadioItem",g0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(a4,{...i,...r,ref:t})});g0e.displayName=m0e;var y0e="DropdownMenuItemIndicator",v0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(s4,{...i,...r,ref:t})});v0e.displayName=y0e;var b0e="DropdownMenuSeparator",x0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(l4,{...i,...r,ref:t})});x0e.displayName=b0e;var w0e="DropdownMenuArrow",S0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(c4,{...i,...r,ref:t})});S0e.displayName=w0e;var C0e="DropdownMenuSubTrigger",E0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(u4,{...i,...r,ref:t})});E0e.displayName=C0e;var k0e="DropdownMenuSubContent",M0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(d4,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});M0e.displayName=k0e;var O0e=FF,T0e=HF,A0e=UF,D0e=qF,R0e=WF;function KF({...e}){return x.jsx(O0e,{"data-slot":"dropdown-menu",...e})}function YF({...e}){return x.jsx(T0e,{"data-slot":"dropdown-menu-trigger",...e})}function ZF({className:e,sideOffset:t=4,...n}){return x.jsx(A0e,{children:x.jsx(D0e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:we("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function GF({className:e,inset:t,variant:n="default",...r}){return x.jsx(R0e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:we("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function N0e({model:e,resource:t,isSaving:n,onSave:r,onDelete:i,onClose:o}){const{t:a}=cn(),l=Vn(),{data:u}=gh(),d=OC(),h=Xu(),p=!t?.id,g=e?.admin.is_singleton??!1,{isDirty:y}=h.formState,b=t&&u?t[u.settings.edited_at_attr]:null,C=xo(),{mutateAsync:E}=Us({async mutationFn(k){await l.delete(`/content/${e.label}/${k}`)},async onSuccess(){await C.invalidateQueries({queryKey:["resources",e.label]})}});return e&&x.jsx(x.Fragment,{children:x.jsxs(XS,{className:"border-b flex-row items-center gap-6 p-5",children:[x.jsx(on,{variant:"outline",size:"icon",disabled:n,onClick:async()=>{if(!y)return o?.();await d({description:a("editor.unsaved_alert")})&&o?.()},children:x.jsx(HG,{})}),x.jsxs("div",{className:"select-none",children:[x.jsx(QS,{children:`${a(p?"editor.title_create":"editor.title_edit",{modelName:e.verbose_name.toLowerCase()})}`}),x.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:t?.__str__})]}),x.jsxs("div",{className:"flex-1 flex items-center justify-end gap-2",children:[b?x.jsx("div",{className:"text-muted-foreground text-sm font-medium mr-4 select-none",children:`${a("editor.last_edited")} ${Ko(b).fromNow()}`}):null,x.jsx(on,{onClick:async()=>{try{await r()}catch{}},isLoading:n,children:a(p?"common.create":"common.save")}),!g&&!p&&x.jsxs(KF,{children:[x.jsx(YF,{asChild:!0,children:x.jsx(on,{size:"icon",variant:"ghost",children:x.jsx(NP,{})})}),x.jsx(ZF,{align:"end",children:x.jsx(GF,{className:"text-destructive",onSelect:async()=>{await d({title:a("common.delete_confirm_title"),description:a("common.delete_confirm_description")})&&(await E(t.id),i?.())},children:a("common.delete")})})]})]})]})})}var Rv="Tabs",[_0e,Rxe]=Ti(Rv,[cv]),XF=cv(),[j0e,gE]=_0e(Rv),QF=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:l,activationMode:u="automatic",...d}=e,h=lv(l),[p,g]=qo({prop:r,onChange:i,defaultProp:o??"",caller:Rv});return x.jsx(j0e,{scope:n,baseId:hr(),value:p,onValueChange:g,orientation:a,dir:h,activationMode:u,children:x.jsx(Ge.div,{dir:h,"data-orientation":a,...d,ref:t})})});QF.displayName=Rv;var JF="TabsList",eB=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=gE(JF,n),a=XF(n);return x.jsx(OI,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:x.jsx(Ge.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});eB.displayName=JF;var tB="TabsTrigger",nB=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=gE(tB,n),l=XF(n),u=oB(a.baseId,r),d=aB(a.baseId,r),h=r===a.value;return x.jsx(TI,{asChild:!0,...l,focusable:!i,active:h,children:x.jsx(Ge.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:_e(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?a.onValueChange(r):p.preventDefault()}),onKeyDown:_e(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&a.onValueChange(r)}),onFocus:_e(e.onFocus,()=>{const p=a.activationMode!=="manual";!h&&!i&&p&&a.onValueChange(r)})})})});nB.displayName=tB;var rB="TabsContent",iB=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,l=gE(rB,n),u=oB(l.baseId,r),d=aB(l.baseId,r),h=r===l.value,p=w.useRef(h);return w.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),x.jsx(li,{present:i||h,children:({present:g})=>x.jsx(Ge.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!g,id:d,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&o})})});iB.displayName=rB;function oB(e,t){return`${e}-trigger-${t}`}function aB(e,t){return`${e}-content-${t}`}var P0e=QF,L0e=eB,z0e=nB,I0e=iB;function $0e({className:e,...t}){return x.jsx(P0e,{"data-slot":"tabs",className:we("flex flex-col gap-2",e),...t})}function F0e({className:e,...t}){return x.jsx(L0e,{"data-slot":"tabs-list",className:we("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function cw({className:e,...t}){return x.jsx(z0e,{"data-slot":"tabs-trigger",className:we("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function M2({className:e,...t}){return x.jsx(I0e,{"data-slot":"tabs-content",className:we("flex-1 outline-none",e),...t})}function B0e({relModel:e,relId:t,model:n,adminModel:r}){const{t:i}=cn(),o=Vn(),[a,l]=w.useState(!1),[u,d]=w.useState(1),h=!n.admin,p=PL({name:"__str__"}),{data:g}=Oi({retry:!1,refetchOnWindowFocus:!0,placeholderData:Ql,queryKey:["resources",e,n.label,r.fk_name,t,u],async queryFn(){const{data:y}=await o.get(`/inlines/${e}/${n.label}`,{params:{[`${r.fk_name}_id`]:t,page:u}});return y}});return x.jsxs("div",{className:"space-y-4",children:[x.jsx(Zu,{open:a,onOpenChange:l,children:x.jsx(Gu,{className:"p-0 sm:max-w-5xl",showCloseButton:!1,children:x.jsx(yE,{modelLabel:n.label,initialValues:{[r.fk_name]:{id:t,__str__:p}},onSave:()=>l(!1),onClose:()=>l(!1)})})}),x.jsx("div",{className:"border rounded-lg scrollbar",children:x.jsxs(kL,{children:[x.jsx(ML,{children:x.jsx(mg,{children:r.list_display?.map(y=>x.jsx(TL,{children:x.jsx("div",{className:"flex items-center",children:n.fields[y]?.verbose_name})},y))})}),x.jsx(OL,{children:g?.results.map(y=>x.jsx(H0e,{resource:y,model:n,adminModel:r,relId:t,relName:p,readOnly:h},y.id))})]})}),g?.pagination&&x.jsx("div",{className:"flex justify-center",children:x.jsx(vh,{current:g.pagination.current,pages:g.pagination.pages,onPageChange:d})}),x.jsx("div",{className:"flex justify-center",children:x.jsxs(on,{size:"sm",variant:"outline",onClick:()=>l(!0),children:[x.jsx(jP,{}),i("common.create")]})})]})}function H0e({resource:e,readOnly:t,model:n,adminModel:r,relId:i,relName:o}){const[a,l]=w.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsx(Zu,{open:a,onOpenChange:l,children:!t&&x.jsx(Gu,{className:"p-0 sm:max-w-5xl",showCloseButton:!1,children:x.jsx(yE,{modelLabel:n.label,id:e.id,initialValues:{[r.fk_name]:{id:i,__str__:o}},onSave:()=>l(!1),onClose:()=>l(!1),onDelete:()=>l(!1)})})},e.id),x.jsx(mg,{onClick:()=>!t&&l(!0),className:we({"hover:bg-transparent":t}),children:r.list_display?.map(u=>x.jsx(AL,{children:x.jsx(GS,{value:e[u],field:n.fields[u]})},u))})]})}function U0e({model:e,id:t,hiddenFields:n}){const{t:r}=cn(),{data:i}=Ai(),{admin:{edit:{main:o,inlines:a}}}=e,l=o.length>1||!ks(o[0]?.label)||!ks(a),u=o.filter(ES("label"));return x.jsx("div",{children:x.jsxs($0e,{defaultValue:u[0]?.label||"default",children:[l&&x.jsxs(F0e,{className:"w-full",children:[u.map((d,h)=>x.jsx(cw,{value:d.label,children:d.label},h)),ks(u)&&!ks(a)&&x.jsx(cw,{value:"default",children:r("common.general")}),t?a.map(d=>x.jsx(cw,{value:d.model,children:i?.models.find(Wo({label:d.model}))?.verbose_name_plural},d.model)):null]}),o.map((d,h)=>x.jsx(M2,{value:d.label||"default",className:"space-y-4",children:d.formsets.map((p,g)=>x.jsx("section",{className:"border rounded-lg p-4 w-full",children:x.jsx(IF,{model:e,formSet:p,hiddenFields:n})},g))},h)),t?a.map(d=>{const h=i?.models.find(Wo({label:d.model}));return h?x.jsx(M2,{value:d.model,children:x.jsx(B0e,{relModel:e.label,relId:t,model:h,adminModel:d})},d.model):null}):null]})})}function yE({modelLabel:e,id:t,initialValues:n={},onDelete:r,onSave:i,onClose:o}){const a=xo(),l=Vn(),{data:u}=Ai(),d=u?.models.find(Wo({label:e})),h=d?.admin.is_singleton??!1,p=Object.keys(n),g=Object.entries(d?.fields??{}).reduce((A,[N,D])=>({...A,[N]:D.default}),{}),y=oz({id:Qw().readonly().optional(),__str__:Qw().readonly().optional()}),b=HL({resolver:rz(y),mode:"onChange",defaultValues:i7(n,g)}),{data:C}=Oi({enabled:!zn(t)||h,retry:!1,queryKey:["resources",e,t||h],async queryFn(){const{data:A}=await l.get(`/content/${e}${h?"":`/${t}`}`);return b.reset(A),A}}),{mutateAsync:E,isPending:k}=Us({async mutationFn(A){await l[A.id?"put":"post"](`/content/${e}${A.id?`/${A.id}`:""}`,A)},async onSuccess(){await a.invalidateQueries({queryKey:["resources",e]})}});async function O(A){await E(A)}return d&&x.jsx(lz,{...b,children:x.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x.jsx(N0e,{model:d,resource:C,isSaving:k,onSave:async()=>{await b.handleSubmit(O)(),i?.()},onDelete:r,onClose:o}),x.jsxs("div",{className:"flex flex-1 justify-center overflow-y-auto",children:[x.jsx("div",{className:"w-full max-w-3xl",children:x.jsx("div",{className:"p-5",children:x.jsx(U0e,{model:d,id:t,hiddenFields:p})})}),x.jsx("div",{className:"w-full max-w-[360px]",children:x.jsx("div",{className:"p-5",children:x.jsx(n0e,{model:d,hiddenFields:p})})})]})]})})}function V0e(){const e=bo(),t=zu(),[n,r,i]=e.hash.split(":");return x.jsx(Zu,{open:e.hash.startsWith("#editor:"),onOpenChange:o=>{o||t({hash:""})},children:x.jsx(Gu,{showCloseButton:!1,className:"sm:max-w-none w-screen h-screen rounded-none p-0",onOpenAutoFocus:o=>o.preventDefault(),children:x.jsx(yE,{modelLabel:r,id:i,onClose:()=>t({hash:""}),onSave:()=>t({hash:""}),onDelete:()=>t({hash:""})})})})}function q0e(){const e=Vn();return Oi({retry:!1,queryKey:["me"],async queryFn(){const{data:t}=await e.get("/me");return t}})}function W0e(){const{t:e}=cn(),t=zu(),{setToken:n}=_S(),{data:r}=gh(),{data:i}=q0e(),{data:o}=Ai(),[a,l]=w.useState("");return x.jsxs("nav",{className:"w-[240px] shrink-0 flex flex-col bg-stone-50 border-r",children:[r&&x.jsxs("div",{className:"flex items-center gap-2 border-b p-3",children:[x.jsx("div",{className:"bg-gradient-to-tl from-stone-900 to-stone-600 size-7 rounded flex items-center justify-center text-white font-black shrink-0",children:r.site_header[0]}),x.jsx("h2",{className:"line-clamp-1 break-all text-base font-semibold",children:r.site_header})]}),x.jsx("div",{className:"p-3 border-b",children:x.jsx(Mr,{variant:"secondary",className:"border",placeholder:e("common.search"),value:a,onChange:u=>l(u.target.value)})}),x.jsxs("div",{className:"flex-1 p-2 space-y-1 overflow-y-auto scrollbar",children:[x.jsx(nf,{to:"/",color:"slate",icon:x.jsx(AG,{}),label:e("main_menu.dashboard")}),o?.media_library.enabled&&x.jsx(nf,{to:"/media-library",color:"pink",icon:x.jsx(_P,{}),label:e("main_menu.media_library")}),x.jsx("div",{className:"h-4",role:"separator"}),o?.model_groups.map(u=>x.jsx(nf,{color:u.color??"blue",icon:u.icon??x.jsx($w,{}),label:u.label,children:u.models.map(d=>{const h=o.models.find(Wo({label:d}));return h?x.jsx(nf,{to:h.admin.is_singleton?{hash:`editor:${h.label}`}:`/content/${h.label}`,label:h.verbose_name_plural,icon:h.admin.icon??x.jsx($w,{})},d):null}).filter(d=>!zn(d))},u.name)),x.jsx("div",{className:"h-4",role:"separator"}),x.jsx(nf,{to:"/",icon:x.jsx(_G,{}),label:e("main_menu.settings")})]}),x.jsx("div",{className:"p-1 border-t",children:i&&x.jsxs(KF,{children:[x.jsx(ZF,{side:"right",align:"start",children:x.jsxs(GF,{onClick:()=>{n(null),t("/login")},children:[x.jsx(FG,{}),e("main_menu.log_out")]})}),x.jsxs(YF,{className:"flex items-center text-left w-full gap-3 hover:bg-stone-200 p-2 rounded-md select-none",children:[x.jsxs("div",{className:"relative rounded-full size-8 bg-indigo-500 text-indigo-100 flex items-center justify-center font-bold shrink-0 text-xs",children:[`${i.first_name??""}${i.last_name??""}${i.username??""}`.trim().replace(/\s/g,"").slice(0,2).toUpperCase(),x.jsx("div",{className:"bg-emerald-500 size-2 rounded-full absolute bottom-px right-px"})]}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-sm font-medium",children:`${i.first_name??""} ${i.last_name??""}`.trim()}),x.jsx("div",{className:"text-xs text-muted-foreground",children:i.username})]})]})]})})]})}const K0e={slate:"bg-slate-200 text-slate-600",gray:"bg-gray-200 text-gray-600",zinc:"bg-zinc-200 text-zinc-600",neutral:"bg-neutral-200 text-neutral-600",stone:"bg-stone-200 text-stone-600",red:"bg-red-100 text-red-600",orange:"bg-orange-100 text-orange-600",amber:"bg-amber-100 text-amber-600",yellow:"bg-yellow-100 text-yellow-600",lime:"bg-lime-100 text-lime-600",green:"bg-green-100 text-green-600",emerald:"bg-emerald-100 text-emerald-600",teal:"bg-teal-100 text-teal-600",cyan:"bg-cyan-100 text-cyan-600",sky:"bg-sky-100 text-sky-600",blue:"bg-blue-100 text-blue-600",indigo:"bg-indigo-100 text-indigo-600",violet:"bg-violet-100 text-violet-600",purple:"bg-purple-100 text-purple-600",fuchsia:"bg-fuchsia-100 text-fuchsia-600",pink:"bg-pink-100 text-pink-600",rose:"bg-rose-100 text-rose-600"};function nf({label:e,icon:t,to:n,color:r,children:i}){const o=n?Iu:"button",[a,l]=w.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsxs(o,{to:n??void 0,className:"flex items-center w-full text-sm font-medium gap-2 h-8 px-2 hover:bg-stone-100 rounded hover:cursor-default",onClick:()=>{i&&l(!a)},children:[t&&x.jsx("span",{className:we("size-5 rounded flex items-center justify-center",r?K0e[r]:"text-stone-500"),children:typeof t=="string"?x.jsx("span",{className:we(t)}):t}),x.jsxs("span",{className:"flex items-center justify-between flex-1",children:[x.jsx("span",{className:"first-letter:uppercase line-clamp-1 break-all",children:e}),i?a?x.jsx(kG,{}):x.jsx(DP,{}):null]})]}),i&&a?x.jsx("div",{className:"pl-3",children:i}):null]})}function Y0e(){return x.jsxs("div",{className:"h-screen flex items-stretch",children:[x.jsx(W0e,{}),x.jsx(V0e,{}),x.jsx("div",{className:"flex-1 bg-[#FDFDFD] flex flex-col overflow-y-auto scrollbar",children:x.jsx(ah,{})})]})}function Z0e({filters:e,onFilterChange:t}){const{t:n}=cn();return x.jsx("div",{children:x.jsx(Mr,{variant:"secondary",value:e.search,onChange:r=>t({search:r.target.value}),placeholder:n("common.search")})})}function G0e({items:e}){const{data:t}=Ai();return t?.media_library.models.media_model&&x.jsx("div",{className:"grid grid-cols-4 gap-4",children:e.map(r=>x.jsx(E4,{item:r},r.id))})}function X0e(){const{t:e}=cn(),{data:t}=Ai(),n=t?.media_library.models.media_model,[r,i]=aS(),o=Number(r.get("page")??"1"),a=r.get("folder"),[l,u]=w.useState({search:""}),{data:d}=M4({folder:a,page:o,filters:l});return n&&d?x.jsxs("div",{className:"flex flex-col overflow-hidden",children:[x.jsxs("div",{className:"flex items-center gap-4 mb-6 py-3 px-5 border-b",children:[x.jsx(_P,{size:24,className:"text-muted-foreground shrink-0"}),x.jsxs("div",{className:"flex-1",children:[x.jsx("h1",{className:"text-xl/tight font-semibold mb-0.5",children:e("media-library.title")}),t.media_library.folders?x.jsx(bI,{folder:a,onSelect:h=>i(p=>(h?p.set("folder",h):p.delete("folder"),p))}):x.jsx("div",{className:"text-muted-foreground",children:e("media-library.description")})]})]}),x.jsx("div",{className:"mb-8 px-5",children:x.jsx(Z0e,{filters:l,onFilterChange:u})}),t.media_library.folders&&x.jsx("div",{className:"mb-4 px-5",children:x.jsx(C4,{parent:a,onSelect:h=>i(p=>(h?p.set("folder",h):p.delete("folder"),p))})}),x.jsxs("div",{className:"px-5 overflow-y-auto scrollbar flex-1",children:[x.jsx(G0e,{items:d.results}),x.jsx("div",{className:"py-5",children:x.jsx(vh,{current:d.pagination.current,pages:d.pagination.pages,onPageChange:h=>i(p=>(p.set("page",`${h}`),p))})})]})]}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsx(Iy,{})})}const Q0e=R8([{element:x.jsx(QK,{}),children:[{element:x.jsx(RZ,{}),children:[{element:x.jsx(Y0e,{}),children:[{path:"",element:x.jsx(xG,{})},{path:"/media-library",element:x.jsx(X0e,{})},{path:"/content/:model",element:x.jsx(wG,{}),children:[{path:"",element:x.jsx(dJ,{})}]}]}]},{element:x.jsx(NZ,{}),children:[{path:"login",element:x.jsx(pG,{})}]}]}],{basename:window.DCS_BASENAME}),J0e=document.getElementById("root");E6.createRoot(J0e).render(x.jsx(DZ,{children:x.jsx(r8,{router:Q0e})}));export{exe as c,yo as g};
228
+ `):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;const n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){const r=o=>{const a=N1(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,u)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:u}),customNestedParser:r},n);return a?[{type:"taskList",raw:a.raw,items:a.items}]:n.blockTokens(o)},i=N1(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,a)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:a}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});qn.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(V3.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(q3.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(X3.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(J3.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(gve.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(yve.configure(this.options.taskList)),e}});var vve=ci.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Un(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{const n=e.tokens||[];return n.length===1&&n[0].type==="image"?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>!e||!Array.isArray(e.content)?"":t.renderChildren(e.content),addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),bve=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,xve=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wve=ac.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Un(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[_u({find:bve,type:this.type})]},addPasteRules(){return[Yl({find:xve,type:this.type})]}}),Sve=ci.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});function Cve(e={}){return new In({view(t){return new Eve(t,e)}})}class Eve{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=a=>{this[i](a)};return t.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,i=this.editorView.dom,o=i.getBoundingClientRect(),a=o.width/i.offsetWidth,l=o.height/i.offsetHeight;if(n){let p=t.nodeBefore,g=t.nodeAfter;if(p||g){let y=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(y){let b=y.getBoundingClientRect(),C=p?b.bottom:b.top;p&&g&&(C=(C+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let E=this.width/2*l;r={left:b.left,right:b.right,top:C-E,bottom:C+E}}}}if(!r){let p=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*a;r={left:p.left-g,right:p.left+g,top:p.top,bottom:p.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let d,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")d=-pageXOffset,h=-pageYOffset;else{let p=u.getBoundingClientRect(),g=p.width/u.offsetWidth,y=p.height/u.offsetHeight;d=p.left-u.scrollLeft*g,h=p.top-u.scrollTop*y}this.element.style.left=(r.left-d)/a+"px",this.element.style.top=(r.top-h)/l+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!o){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=e$(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class jn extends gt{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return jn.valid(r)?new jn(r):gt.near(r)}content(){return Le.empty}eq(t){return t instanceof jn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new jn(t.resolve(n.pos))}getBookmark(){return new pE(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!kve(t)||!Mve(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&jn.valid(t))return t;let i=t.pos,o=null;for(let a=t.depth;;a--){let l=t.node(a);if(n>0?t.indexAfter(a)<l.childCount:t.index(a)>0){o=l.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;i+=n;let u=t.doc.resolve(i);if(jn.valid(u))return u}for(;;){let a=n>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!Je.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=a,i+=n;let l=t.doc.resolve(i);if(jn.valid(l))return l}return null}}}jn.prototype.visible=!1;jn.findFrom=jn.findGapCursorFrom;gt.jsonID("gapcursor",jn);class pE{constructor(t){this.pos=t}map(t){return new pE(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return jn.valid(n)?new jn(n):gt.near(n)}}function kve(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Mve(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Ove(){return new In({props:{decorations:Rve,createSelectionBetween(e,t,n){return t.pos==n.pos&&jn.valid(n)?new jn(n):null},handleClick:Ave,handleKeyDown:Tve,handleDOMEvents:{beforeinput:Dve}}})}const Tve=e3({ArrowLeft:Tm("horiz",-1),ArrowRight:Tm("horiz",1),ArrowUp:Tm("vert",-1),ArrowDown:Tm("vert",1)});function Tm(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,o){let a=r.selection,l=t>0?a.$to:a.$from,u=a.empty;if(a instanceof st){if(!o.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(t>0?l.after():l.before())}let d=jn.findGapCursorFrom(l,t,u);return d?(i&&i(r.tr.setSelection(new jn(d))),!0):!1}}function Ave(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!jn.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Je.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new jn(r))),!0)}function Dve(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof jn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=Me.empty;for(let a=r.length-1;a>=0;a--)i=Me.from(r[a].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Le(i,0,0));return o.setSelection(st.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Rve(e){if(!(e.selection instanceof jn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Mn.create(e.doc,[zr.widget(e.selection.head,t,{key:"gapcursor"})])}var my=200,mr=function(){};mr.prototype.append=function(t){return t.length?(t=mr.from(t),!this.length&&t||t.length<my&&this.leafAppend(t)||this.length<my&&t.leafPrepend(this)||this.appendInner(t)):this};mr.prototype.prepend=function(t){return t.length?mr.from(t).append(this):this};mr.prototype.appendInner=function(t){return new Nve(this,t)};mr.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?mr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};mr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};mr.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};mr.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(t(o,a))},n,r),i};mr.from=function(t){return t instanceof mr?t:t&&t.length?new eF(t):mr.empty};var eF=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,a,l){for(var u=o;u<a;u++)if(i(this.values[u],l+u)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,a,l){for(var u=o-1;u>=a;u--)if(i(this.values[u],l+u)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=my)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=my)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(mr);mr.empty=new eF([]);var Nve=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,a){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(o,l),a)===!1||o>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,a){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,a+l)===!1||o<l&&this.left.forEachInvertedInner(r,Math.min(i,l),o,a)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(mr);const _ve=500;class fo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=t.tr,l,u,d=[],h=[];return this.items.forEach((p,g)=>{if(!p.step){i||(i=this.remapping(r,g+1),o=i.maps.length),o--,h.push(p);return}if(i){h.push(new hs(p.map));let y=p.step.map(i.slice(o)),b;y&&a.maybeStep(y).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],d.push(new hs(b,void 0,void 0,d.length+h.length))),o--,b&&i.appendMap(b,o)}else a.maybeStep(p.step);if(p.selection)return l=i?p.selection.map(i.slice(o)):p.selection,u=new fo(this.items.slice(0,r).append(h.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(t,n,r,i){let o=[],a=this.eventCount,l=this.items,u=!i&&l.length?l.get(l.length-1):null;for(let h=0;h<t.steps.length;h++){let p=t.steps[h].invert(t.docs[h]),g=new hs(t.mapping.maps[h],p,n),y;(y=u&&u.merge(g))&&(g=y,h?o.pop():l=l.slice(0,l.length-1)),o.push(g),n&&(a++,n=void 0),i||(u=g)}let d=a-r.depth;return d>Pve&&(l=jve(l,d),a-=d),new fo(l.append(o),a)}remapping(t,n){let r=new Zf;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new fo(this.items.append(t.map(n=>new hs(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,a=t.steps.length,l=this.eventCount;this.items.forEach(g=>{g.selection&&l--},i);let u=n;this.items.forEach(g=>{let y=o.getMirror(--u);if(y==null)return;a=Math.min(a,y);let b=o.maps[y];if(g.step){let C=t.steps[y].invert(t.docs[y]),E=g.selection&&g.selection.map(o.slice(u+1,y));E&&l++,r.push(new hs(b,C,E))}else r.push(new hs(b))},i);let d=[];for(let g=n;g<a;g++)d.push(new hs(o.maps[g]));let h=this.items.slice(0,i).append(d).append(r),p=new fo(h,l);return p.emptyItemCount()>_ve&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((a,l)=>{if(l>=t)i.push(a),a.selection&&o++;else if(a.step){let u=a.step.map(n.slice(r)),d=u&&u.getMap();if(r--,d&&n.appendMap(d,r),u){let h=a.selection&&a.selection.map(n.slice(r));h&&o++;let p=new hs(d.invert(),u,h),g,y=i.length-1;(g=i.length&&i[y].merge(p))?i[y]=g:i.push(p)}}else a.map&&r--},this.items.length,0),new fo(mr.from(i.reverse()),o)}}fo.empty=new fo(mr.empty,0);function jve(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}let hs=class tF{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new tF(n.getMap().invert(),n,this.selection)}}};class bs{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Pve=20;function Lve(e,t,n,r){let i=n.getMeta(_l),o;if(i)return i.historyState;n.getMeta($ve)&&(e=new bs(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(_l))return a.getMeta(_l).redo?new bs(e.done.addTransform(n,void 0,r,Gm(t)),e.undone,b2(n.mapping.maps),e.prevTime,e.prevComposition):new bs(e.done,e.undone.addTransform(n,void 0,r,Gm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=e.prevTime==0||!a&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!zve(n,e.prevRanges)),d=a?sw(e.prevRanges,n.mapping):b2(n.mapping.maps);return new bs(e.done.addTransform(n,u?t.selection.getBookmark():void 0,r,Gm(t)),fo.empty,d,n.time,l??e.prevComposition)}else return(o=n.getMeta("rebased"))?new bs(e.done.rebased(n,o),e.undone.rebased(n,o),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new bs(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function zve(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function b2(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,a)=>t.push(o,a));return t}function sw(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function Ive(e,t,n){let r=Gm(t),i=_l.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let a=o.selection.resolve(o.transform.doc),l=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),u=new bs(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(a).setMeta(_l,{redo:n,historyState:u})}let lw=!1,x2=null;function Gm(e){let t=e.plugins;if(x2!=t){lw=!1,x2=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){lw=!0;break}}return lw}const _l=new yr("history"),$ve=new yr("closeHistory");function Fve(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new In({key:_l,state:{init(){return new bs(fo.empty,fo.empty,null,0,-1)},apply(t,n,r){return Lve(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?rF:r=="historyRedo"?iF:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function nF(e,t){return(n,r)=>{let i=_l.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=Ive(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const rF=nF(!1,!0),iF=nF(!0,!0);qn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new In({key:new yr("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const i=this.options.limit;if(i==null||i===0){e=!0;return}const o=this.storage.characters({node:r.doc});if(o>i){const a=o-i,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,u);return e=!0,d}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;if(i>r&&o>r&&o>i||!t.getMeta("paste"))return!1;const l=t.selection.$head.pos,u=o-r,d=l-u,h=l;return t.deleteRange(d,h),!(this.storage.characters({node:t.doc})>r)}})]}});var Bve=qn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Cve(this.options)]}});qn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new In({key:new yr("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return Mn.create(e,[]);let a=0;this.options.mode==="deepest"&&e.descendants((u,d)=>{if(u.isText)return;if(!(i>=d&&i<=d+u.nodeSize-1))return!1;a+=1});let l=0;return e.descendants((u,d)=>{if(u.isText||!(i>=d&&i<=d+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";o.push(zr.node(d,d+u.nodeSize,{class:this.options.className}))}),Mn.create(e,o)}}})]}});var Hve=qn.create({name:"gapCursor",addProseMirrorPlugins(){return[Ove()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Yt(Qe(e,"allowGapCursor",n)))!=null?t:null}}});qn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new In({key:new yr("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,d=!a.isLeaf&&Ev(a);if((u||!this.options.showOnlyCurrent)&&d){const h=[this.options.emptyNodeClass];o&&h.push(this.options.emptyEditorClass);const p=zr.node(l,l+a.nodeSize,{class:h.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),Mn.create(e,i)}}})]}});qn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new In({key:new yr("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||g3(n.selection)||e.view.dragging?null:Mn.create(n.doc,[zr.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function w2({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Uve=qn.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new yr(this.name),n=((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||this.options.node||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new In({key:t,appendTransaction:(i,o,a)=>{const{doc:l,tr:u,schema:d}=a,h=t.getState(a),p=l.content.size,g=d.nodes[n];if(h)return u.insert(p,g.create())},state:{init:(i,o)=>{const a=o.tr.doc.lastChild;return!w2({node:a,types:r})},apply:(i,o)=>{if(!i.docChanged)return o;const a=i.doc.lastChild;return!w2({node:a,types:r})}}})]}}),Vve=qn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>rF(e,t),redo:()=>({state:e,dispatch:t})=>iF(e,t)}},addProseMirrorPlugins(){return[Fve(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),qve=qn.create({name:"starterKit",addExtensions(){var e,t,n,r;const i=[];return this.options.bold!==!1&&i.push(Vye.configure(this.options.bold)),this.options.blockquote!==!1&&i.push($ye.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(V3.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Kye.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Gye.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Xye.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(Bve.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(Hve.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Qye.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Jye.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(Vve.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(eve.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(ove.configure(this.options.italic)),this.options.listItem!==!1&&i.push(q3.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(X3.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&i.push(B3.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&i.push(J3.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(vve.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(wve.configure(this.options.strike)),this.options.text!==!1&&i.push(Sve.configure(this.options.text)),this.options.underline!==!1&&i.push(H3.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(Uve.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),Wve="Separator",S2="horizontal",Kve=["horizontal","vertical"],oF=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=S2,...i}=e,o=Yve(r)?r:S2,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return x.jsx(Ge.div,{"data-orientation":o,...l,...i,ref:t})});oF.displayName=Wve;function Yve(e){return Kve.includes(e)}var Zve=oF;function C2({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(Zve,{"data-slot":"separator",decorative:n,orientation:t,className:we("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}var aF="Toggle",sF=w.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[a,l]=qo({prop:n,onChange:i,defaultProp:r??!1,caller:aF});return x.jsx(Ge.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:_e(e.onClick,()=>{e.disabled||l(!a)})})});sF.displayName=aF;var Gve=sF;const Xve=ec("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-stone-700 data-[state=on]:text-white [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-8 px-1.5 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-9 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Am({className:e,variant:t,size:n,...r}){return x.jsx(Gve,{"data-slot":"toggle",className:we(Xve({variant:t,size:n,className:e})),...r})}function E2(e,[t,n]){return Math.min(n,Math.max(t,e))}function Qve(e){const t=Jve(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,l=w.Children.toArray(o),u=l.find(tbe);if(u){const d=u.props.children,h=l.map(p=>p===u?w.Children.count(d)>1?w.Children.only(null):w.isValidElement(d)?d.props.children:null:p);return x.jsx(t,{...a,ref:i,children:w.isValidElement(d)?w.cloneElement(d,void 0,h):null})}return x.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Jve(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=rbe(i),l=nbe(o,i.props);return i.type!==w.Fragment&&(l.ref=r?Ir(r,a):a),w.cloneElement(i,l)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ebe=Symbol("radix.slottable");function tbe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ebe}function nbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const u=o(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function rbe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ibe=[" ","Enter","ArrowUp","ArrowDown"],obe=[" ","Enter"],Zl="Select",[Ov,Tv,abe]=vC(Zl),[ed,Axe]=Ti(Zl,[abe,qs]),Av=qs(),[sbe,Gs]=ed(Zl),[lbe,cbe]=ed(Zl),lF=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:l,onValueChange:u,dir:d,name:h,autoComplete:p,disabled:g,required:y,form:b}=e,C=Av(t),[E,k]=w.useState(null),[O,A]=w.useState(null),[N,D]=w.useState(!1),L=lv(d),[T,I]=qo({prop:r,defaultProp:i??!1,onChange:o,caller:Zl}),[G,te]=qo({prop:a,defaultProp:l,onChange:u,caller:Zl}),fe=w.useRef(null),Q=E?b||!!E.closest("form"):!0,[J,H]=w.useState(new Set),q=Array.from(J).map(R=>R.props.value).join(";");return x.jsx(Uy,{...C,children:x.jsxs(sbe,{required:y,scope:t,trigger:E,onTriggerChange:k,valueNode:O,onValueNodeChange:A,valueNodeHasChildren:N,onValueNodeHasChildrenChange:D,contentId:hr(),value:G,onValueChange:te,open:T,onOpenChange:I,dir:L,triggerPointerDownPosRef:fe,disabled:g,children:[x.jsx(Ov.Provider,{scope:t,children:x.jsx(lbe,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(R=>{H(F=>new Set(F).add(R))},[]),onNativeOptionRemove:w.useCallback(R=>{H(F=>{const z=new Set(F);return z.delete(R),z})},[]),children:n})}),Q?x.jsxs(DF,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:p,value:G,onChange:R=>te(R.target.value),disabled:g,form:b,children:[G===void 0?x.jsx("option",{value:""}):null,Array.from(J)]},q):null]})})};lF.displayName=Zl;var cF="SelectTrigger",uF=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Av(n),a=Gs(cF,n),l=a.disabled||r,u=Dt(t,a.onTriggerChange),d=Tv(n),h=w.useRef("touch"),[p,g,y]=NF(C=>{const E=d().filter(A=>!A.disabled),k=E.find(A=>A.value===a.value),O=_F(E,C,k);O!==void 0&&a.onValueChange(O.value)}),b=C=>{l||(a.onOpenChange(!0),y()),C&&(a.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return x.jsx(xh,{asChild:!0,...o,children:x.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":RF(a.value)?"":void 0,...i,ref:u,onClick:_e(i.onClick,C=>{C.currentTarget.focus(),h.current!=="mouse"&&b(C)}),onPointerDown:_e(i.onPointerDown,C=>{h.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(b(C),C.preventDefault())}),onKeyDown:_e(i.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&g(C.key),!(E&&C.key===" ")&&ibe.includes(C.key)&&(b(),C.preventDefault())})})})});uF.displayName=cF;var dF="SelectValue",fF=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...l}=e,u=Gs(dF,n),{onValueNodeHasChildrenChange:d}=u,h=o!==void 0,p=Dt(t,u.onValueNodeChange);return sr(()=>{d(h)},[d,h]),x.jsx(Ge.span,{...l,ref:p,style:{pointerEvents:"none"},children:RF(u.value)?x.jsx(x.Fragment,{children:a}):o})});fF.displayName=dF;var ube="SelectIcon",hF=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return x.jsx(Ge.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});hF.displayName=ube;var dbe="SelectPortal",pF=e=>x.jsx(Bu,{asChild:!0,...e});pF.displayName=dbe;var Gl="SelectContent",mF=w.forwardRef((e,t)=>{const n=Gs(Gl,e.__scopeSelect),[r,i]=w.useState();if(sr(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?sh.createPortal(x.jsx(gF,{scope:e.__scopeSelect,children:x.jsx(Ov.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),o):null}return x.jsx(yF,{...e,ref:t})});mF.displayName=Gl;var so=10,[gF,Xs]=ed(Gl),fbe="SelectContentImpl",hbe=Qve("SelectContent.RemoveScroll"),yF=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:u,align:d,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:b,hideWhenDetached:C,avoidCollisions:E,...k}=e,O=Gs(Gl,n),[A,N]=w.useState(null),[D,L]=w.useState(null),T=Dt(t,ne=>N(ne)),[I,G]=w.useState(null),[te,fe]=w.useState(null),Q=Tv(n),[J,H]=w.useState(!1),q=w.useRef(!1);w.useEffect(()=>{if(A)return ky(A)},[A]),Cy();const R=w.useCallback(ne=>{const[Ce,...Te]=Q().map(De=>De.ref.current),[ye]=Te.slice(-1),Se=document.activeElement;for(const De of ne)if(De===Se||(De?.scrollIntoView({block:"nearest"}),De===Ce&&D&&(D.scrollTop=0),De===ye&&D&&(D.scrollTop=D.scrollHeight),De?.focus(),document.activeElement!==Se))return},[Q,D]),F=w.useCallback(()=>R([I,A]),[R,I,A]);w.useEffect(()=>{J&&F()},[J,F]);const{onOpenChange:z,triggerPointerDownPosRef:B}=O;w.useEffect(()=>{if(A){let ne={x:0,y:0};const Ce=ye=>{ne={x:Math.abs(Math.round(ye.pageX)-(B.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(B.current?.y??0))}},Te=ye=>{ne.x<=10&&ne.y<=10?ye.preventDefault():A.contains(ye.target)||z(!1),document.removeEventListener("pointermove",Ce),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",Ce),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",Te,{capture:!0})}}},[A,z,B]),w.useEffect(()=>{const ne=()=>z(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[z]);const[U,P]=NF(ne=>{const Ce=Q().filter(Se=>!Se.disabled),Te=Ce.find(Se=>Se.ref.current===document.activeElement),ye=_F(Ce,ne,Te);ye&&setTimeout(()=>ye.ref.current.focus())}),j=w.useCallback((ne,Ce,Te)=>{const ye=!q.current&&!Te;(O.value!==void 0&&O.value===Ce||ye)&&(G(ne),ye&&(q.current=!0))},[O.value]),$=w.useCallback(()=>A?.focus(),[A]),K=w.useCallback((ne,Ce,Te)=>{const ye=!q.current&&!Te;(O.value!==void 0&&O.value===Ce||ye)&&fe(ne)},[O.value]),ee=r==="popper"?V1:vF,ge=ee===V1?{side:l,sideOffset:u,align:d,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:b,hideWhenDetached:C,avoidCollisions:E}:{};return x.jsx(gF,{scope:n,content:A,viewport:D,onViewportChange:L,itemRefCallback:j,selectedItem:I,onItemLeave:$,itemTextRefCallback:K,focusSelectedItem:F,selectedItemText:te,position:r,isPositioned:J,searchRef:U,children:x.jsx(ch,{as:hbe,allowPinchZoom:!0,children:x.jsx(lh,{asChild:!0,trapped:O.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:_e(i,ne=>{O.trigger?.focus({preventScroll:!0}),ne.preventDefault()}),children:x.jsx(Fu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:x.jsx(ee,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ne=>ne.preventDefault(),...k,...ge,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:_e(k.onKeyDown,ne=>{const Ce=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!Ce&&ne.key.length===1&&P(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ye=Q().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Se=ne.target,De=ye.indexOf(Se);ye=ye.slice(De+1)}setTimeout(()=>R(ye)),ne.preventDefault()}})})})})})})});yF.displayName=fbe;var pbe="SelectItemAlignedPosition",vF=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Gs(Gl,n),a=Xs(Gl,n),[l,u]=w.useState(null),[d,h]=w.useState(null),p=Dt(t,T=>h(T)),g=Tv(n),y=w.useRef(!1),b=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:k,focusSelectedItem:O}=a,A=w.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&d&&C&&E&&k){const T=o.trigger.getBoundingClientRect(),I=d.getBoundingClientRect(),G=o.valueNode.getBoundingClientRect(),te=k.getBoundingClientRect();if(o.dir!=="rtl"){const Se=te.left-I.left,De=G.left-Se,it=T.left-De,yt=T.width+it,ot=Math.max(yt,I.width),Nt=window.innerWidth-so,xt=E2(De,[so,Math.max(so,Nt-ot)]);l.style.minWidth=yt+"px",l.style.left=xt+"px"}else{const Se=I.right-te.right,De=window.innerWidth-G.right-Se,it=window.innerWidth-T.right-De,yt=T.width+it,ot=Math.max(yt,I.width),Nt=window.innerWidth-so,xt=E2(De,[so,Math.max(so,Nt-ot)]);l.style.minWidth=yt+"px",l.style.right=xt+"px"}const fe=g(),Q=window.innerHeight-so*2,J=C.scrollHeight,H=window.getComputedStyle(d),q=parseInt(H.borderTopWidth,10),R=parseInt(H.paddingTop,10),F=parseInt(H.borderBottomWidth,10),z=parseInt(H.paddingBottom,10),B=q+R+J+z+F,U=Math.min(E.offsetHeight*5,B),P=window.getComputedStyle(C),j=parseInt(P.paddingTop,10),$=parseInt(P.paddingBottom,10),K=T.top+T.height/2-so,ee=Q-K,ge=E.offsetHeight/2,ne=E.offsetTop+ge,Ce=q+R+ne,Te=B-Ce;if(Ce<=K){const Se=fe.length>0&&E===fe[fe.length-1].ref.current;l.style.bottom="0px";const De=d.clientHeight-C.offsetTop-C.offsetHeight,it=Math.max(ee,ge+(Se?$:0)+De+F),yt=Ce+it;l.style.height=yt+"px"}else{const Se=fe.length>0&&E===fe[0].ref.current;l.style.top="0px";const it=Math.max(K,q+C.offsetTop+(Se?j:0)+ge)+Te;l.style.height=it+"px",C.scrollTop=Ce-K+C.offsetTop}l.style.margin=`${so}px 0`,l.style.minHeight=U+"px",l.style.maxHeight=Q+"px",r?.(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,l,d,C,E,k,o.dir,r]);sr(()=>A(),[A]);const[N,D]=w.useState();sr(()=>{d&&D(window.getComputedStyle(d).zIndex)},[d]);const L=w.useCallback(T=>{T&&b.current===!0&&(A(),O?.(),b.current=!1)},[A,O]);return x.jsx(gbe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:L,children:x.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:x.jsx(Ge.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});vF.displayName=pbe;var mbe="SelectPopperPosition",V1=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=so,...o}=e,a=Av(n);return x.jsx(Vy,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});V1.displayName=mbe;var[gbe,mE]=ed(Gl,{}),q1="SelectViewport",bF=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Xs(q1,n),a=mE(q1,n),l=Dt(t,o.onViewportChange),u=w.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(Ov.Slot,{scope:n,children:x.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:_e(i.onScroll,d=>{const h=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g?.current&&p){const y=Math.abs(u.current-h.scrollTop);if(y>0){const b=window.innerHeight-so*2,C=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),k=Math.max(C,E);if(k<b){const O=k+y,A=Math.min(b,O),N=O-A;p.style.height=A+"px",p.style.bottom==="0px"&&(h.scrollTop=N>0?N:0,p.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})});bF.displayName=q1;var xF="SelectGroup",[ybe,vbe]=ed(xF),bbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hr();return x.jsx(ybe,{scope:n,id:i,children:x.jsx(Ge.div,{role:"group","aria-labelledby":i,...r,ref:t})})});bbe.displayName=xF;var wF="SelectLabel",xbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=vbe(wF,n);return x.jsx(Ge.div,{id:i.id,...r,ref:t})});xbe.displayName=wF;var gy="SelectItem",[wbe,SF]=ed(gy),CF=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,l=Gs(gy,n),u=Xs(gy,n),d=l.value===r,[h,p]=w.useState(o??""),[g,y]=w.useState(!1),b=Dt(t,O=>u.itemRefCallback?.(O,r,i)),C=hr(),E=w.useRef("touch"),k=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(wbe,{scope:n,value:r,disabled:i,textId:C,isSelected:d,onItemTextChange:w.useCallback(O=>{p(A=>A||(O?.textContent??"").trim())},[]),children:x.jsx(Ov.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:x.jsx(Ge.div,{role:"option","aria-labelledby":C,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:b,onFocus:_e(a.onFocus,()=>y(!0)),onBlur:_e(a.onBlur,()=>y(!1)),onClick:_e(a.onClick,()=>{E.current!=="mouse"&&k()}),onPointerUp:_e(a.onPointerUp,()=>{E.current==="mouse"&&k()}),onPointerDown:_e(a.onPointerDown,O=>{E.current=O.pointerType}),onPointerMove:_e(a.onPointerMove,O=>{E.current=O.pointerType,i?u.onItemLeave?.():E.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(a.onPointerLeave,O=>{O.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:_e(a.onKeyDown,O=>{u.searchRef?.current!==""&&O.key===" "||(obe.includes(O.key)&&k(),O.key===" "&&O.preventDefault())})})})})});CF.displayName=gy;var mf="SelectItemText",EF=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Gs(mf,n),l=Xs(mf,n),u=SF(mf,n),d=cbe(mf,n),[h,p]=w.useState(null),g=Dt(t,k=>p(k),u.onItemTextChange,k=>l.itemTextRefCallback?.(k,u.value,u.disabled)),y=h?.textContent,b=w.useMemo(()=>x.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value),[u.disabled,u.value,y]),{onNativeOptionAdd:C,onNativeOptionRemove:E}=d;return sr(()=>(C(b),()=>E(b)),[C,E,b]),x.jsxs(x.Fragment,{children:[x.jsx(Ge.span,{id:u.textId,...o,ref:g}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?sh.createPortal(o.children,a.valueNode):null]})});EF.displayName=mf;var kF="SelectItemIndicator",MF=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return SF(kF,n).isSelected?x.jsx(Ge.span,{"aria-hidden":!0,...r,ref:t}):null});MF.displayName=kF;var W1="SelectScrollUpButton",OF=w.forwardRef((e,t)=>{const n=Xs(W1,e.__scopeSelect),r=mE(W1,e.__scopeSelect),[i,o]=w.useState(!1),a=Dt(t,r.onScrollButtonChange);return sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=u.scrollTop>0;o(d)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(AF,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});OF.displayName=W1;var K1="SelectScrollDownButton",TF=w.forwardRef((e,t)=>{const n=Xs(K1,e.__scopeSelect),r=mE(K1,e.__scopeSelect),[i,o]=w.useState(!1),a=Dt(t,r.onScrollButtonChange);return sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<d;o(h)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(AF,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});TF.displayName=K1;var AF=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Xs("SelectScrollButton",n),a=w.useRef(null),l=Tv(n),u=w.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return w.useEffect(()=>()=>u(),[u]),sr(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),x.jsx(Ge.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:_e(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:_e(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:_e(i.onPointerLeave,()=>{u()})})}),Sbe="SelectSeparator",Cbe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(Ge.div,{"aria-hidden":!0,...r,ref:t})});Cbe.displayName=Sbe;var Y1="SelectArrow",Ebe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Av(n),o=Gs(Y1,n),a=Xs(Y1,n);return o.open&&a.position==="popper"?x.jsx(qy,{...i,...r,ref:t}):null});Ebe.displayName=Y1;var kbe="SelectBubbleInput",DF=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),o=Dt(r,i),a=vP(t);return w.useEffect(()=>{const l=i.current;if(!l)return;const u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&h){const p=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(p)}},[a,t]),x.jsx(Ge.select,{...n,style:{...dL,...n.style},ref:o,defaultValue:t})});DF.displayName=kbe;function RF(e){return e===""||e===void 0}function NF(e){const t=Qi(e),n=w.useRef(""),r=w.useRef(0),i=w.useCallback(a=>{const l=n.current+a;t(l),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(l)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function _F(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Mbe(e,Math.max(o,0));i.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function Mbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Obe=lF,Tbe=uF,Abe=fF,Dbe=hF,Rbe=pF,Nbe=mF,_be=bF,jbe=CF,Pbe=EF,Lbe=MF,zbe=OF,Ibe=TF;function jF({...e}){return x.jsx(Obe,{"data-slot":"select",...e})}function $be({...e}){return x.jsx(Abe,{"data-slot":"select-value",...e})}function PF({className:e,size:t="default",children:n,...r}){return x.jsxs(Tbe,{"data-slot":"select-trigger","data-size":t,className:we("border-input hover:border-slate-300 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,x.jsx(Dbe,{asChild:!0,children:x.jsx(yh,{className:"size-4 opacity-50"})})]})}function LF({className:e,children:t,position:n="popper",align:r="center",...i}){return x.jsx(Rbe,{children:x.jsxs(Nbe,{"data-slot":"select-content",className:we("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md shadow-foreground/5",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[x.jsx(Fbe,{}),x.jsx(_be,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),x.jsx(Bbe,{})]})})}function zF({className:e,children:t,...n}){return x.jsxs(jbe,{"data-slot":"select-item",className:we("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[x.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:x.jsx(Lbe,{children:x.jsx(yP,{className:"size-4"})})}),x.jsx(Pbe,{children:t})]})}function Fbe({className:e,...t}){return x.jsx(zbe,{"data-slot":"select-scroll-up-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(qZ,{className:"size-4"})})}function Bbe({className:e,...t}){return x.jsx(Ibe,{"data-slot":"select-scroll-down-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(yh,{className:"size-4"})})}function Hbe(e){return e?.isActive("codeBlock")?"codeBlock":e?.isActive("blockquote")?"blockquote":e?.isActive("heading",{level:1})?"heading1":e?.isActive("heading",{level:2})?"heading2":e?.isActive("heading",{level:3})?"heading3":e?.isActive("heading",{level:4})?"heading4":e?.isActive("heading",{level:5})?"heading5":e?.isActive("heading",{level:6})?"heading6":"paragraph"}const Ube=["heading1","heading2","heading3","heading4","heading5","heading6","paragraph","blockquote","codeBlock"];function Vbe({editor:e}){const{t}=cn(),n=e?Hbe(e):void 0;return x.jsxs(jF,{value:n,onValueChange:r=>{const i=e.chain().focus().clearNodes();r.startsWith("heading")&&i.setHeading({level:Number(r.at(-1))}).run(),r==="blockquote"&&i.setBlockquote().run(),r==="codeBlock"&&i.setCodeBlock().run(),r==="paragraph"&&i.setParagraph().run()},children:[x.jsx(PF,{children:t(`widgets.rich_text_widget.${n}`)}),x.jsx(LF,{children:Ube.map(r=>x.jsx(zF,{value:r,children:t(`widgets.rich_text_widget.${r}`)},r))})]})}function qbe({editor:e}){const{t}=cn(),[n,r]=w.useState(!1),i=!zn(e.view.state.selection.content().toJSON());return x.jsxs(x.Fragment,{children:[n&&x.jsx(Wbe,{editor:e,onClose:()=>r(!1)}),x.jsxs(SL,{children:[x.jsx(EL,{children:e.isActive("link")?t("widgets.rich_text_widget.update_link"):t("widgets.rich_text_widget.set_link")}),x.jsx(CL,{asChild:!0,children:x.jsx(on,{size:"sm",variant:"ghost",disabled:!i&&!e.isActive("link"),onClick:()=>r(!0),children:x.jsx(DG,{})})})]})]})}const Wbe=({editor:e,onClose:t})=>{const{t:n}=cn(),[r,i]=w.useState(e.getAttributes("link").href??""),o=e.isActive("link");return x.jsx(Zu,{open:!0,onOpenChange:a=>{a||t()},children:x.jsxs(Gu,{children:[x.jsx(XS,{children:x.jsx(QS,{children:n(o?"widgets.rich_text_widget.update_link":"widgets.rich_text_widget.set_link")})}),x.jsx("div",{className:"py-6",children:x.jsx(Mr,{placeholder:"https://",value:r,onChange:a=>i(a.target.value)})}),x.jsxs(mJ,{children:[o&&x.jsx(on,{variant:"destructive",className:"mr-auto",onClick:()=>{e.chain().focus().unsetLink().run(),t()},children:n("widgets.rich_text_widget.remove_link")}),x.jsx(on,{variant:"ghost",onClick:()=>t(),children:n("common.cancel")}),x.jsx(on,{onClick:()=>{e.chain().focus().extendMarkRange("link").setLink({href:r}).run(),t()},children:n(o?"widgets.rich_text_widget.update_link":"widgets.rich_text_widget.set_link")})]})]})})};function Kbe({editor:e}){return e&&x.jsxs("div",{className:"border-b flex items-center gap-2 p-1 overflow-x-auto overflow-y-hidden",children:[x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().undo().run(),children:x.jsx(SG,{})}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().redo().run(),children:x.jsx(CG,{})}),x.jsx("div",{className:"w-[140px]",children:x.jsx(Vbe,{editor:e})}),x.jsx(Am,{pressed:e?.isActive("bold"),onPressedChange:()=>e?.chain().focus().toggleBold().run(),children:x.jsx(jG,{})}),x.jsx(Am,{pressed:e?.isActive("italic"),onPressedChange:()=>e?.chain().focus().toggleItalic().run(),children:x.jsx(PG,{})}),x.jsx(Am,{pressed:e?.isActive("underline"),onPressedChange:()=>e?.chain().focus().toggleUnderline().run(),children:x.jsx(zG,{})}),x.jsx(Am,{pressed:e?.isActive("strike"),onPressedChange:()=>e?.chain().focus().toggleStrike().run(),children:x.jsx(LG,{})}),x.jsx(C2,{orientation:"vertical",className:"h-auto self-stretch"}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().toggleOrderedList().run(),children:x.jsx(RG,{})}),x.jsx(on,{size:"sm",variant:"ghost",onClick:()=>e?.chain().focus().toggleBulletList().run(),children:x.jsx(NG,{})}),x.jsx(C2,{orientation:"vertical",className:"h-auto self-stretch"}),x.jsx(qbe,{editor:e})]})}const Ybe=[qve,mye,B3.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),H3,Sge.configure({HTMLAttributes:{class:"rich-text-image"}})];function Zbe({value:e,onChange:t,disabled:n}){const r=jye({extensions:Ybe,content:e,editable:!n,editorProps:{attributes:{class:"rich-text-field"}},onUpdate({editor:i}){t?.(i.getHTML())}});return w.useEffect(()=>{e!==r.getHTML()&&r.commands.setContent(e??"")},[e,r]),zn(e)?null:x.jsxs("div",{className:"border border-solid rounded-md bg-background focus-within:border-ring",children:[x.jsx(Kbe,{editor:r}),x.jsx("div",{className:"max-h-[600px] overflow-y-auto scrollbar",children:x.jsx(Oye,{editor:r})})]})}function Gbe({field:e,value:t,onChange:n}){return x.jsxs(jF,{value:t,onValueChange:n,children:[x.jsx(PF,{children:x.jsx($be,{})}),x.jsx(LF,{children:e.choices?.map(([r,i])=>x.jsx(zF,{value:r,children:i}))})]})}function Xbe({value:e,onChange:t}){return x.jsx("div",{children:x.jsx(Mr,{value:e,onChange:n=>t(n.target.value.toLowerCase().replace(/[^0-9a-z_-]/g,"-"))})})}function Qbe({value:e,onChange:t}){return x.jsx("div",{children:x.jsx(Cce,{value:e,onChange:n=>t(n.target.value)})})}function Jbe({value:e="",onChange:t}){const[n,r]=e.split(":"),i=w.useRef(null);return x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Mr,{value:n,maxLength:2,max:24,inputMode:"decimal",className:"w-12",placeholder:"HH",onFocus:o=>o.target.select(),onChange:o=>{const a=o.target.value;t(`${a}:${r}`),a.length===2&&i.current&&i.current.focus()}}),x.jsx("span",{children:":"}),x.jsx(Mr,{value:r,maxLength:2,inputMode:"decimal",className:"w-12",placeholder:"mm",ref:i,onFocus:o=>o.target.select(),onChange:o=>t(`${n}:${o.target.value}`)})]})}function e0e({value:e,onChange:t}){return x.jsx("div",{children:x.jsxs(xI,{children:[x.jsx(c1,{children:"/"}),x.jsx(wI,{value:e.replace(/^\//,""),onChange:n=>t(`/${n.target.value.toLowerCase().replace(/[^0-9a-z_/-]/g,"-")}`)})]})})}function t0e({value:e,onChange:t,field:n}){const{data:r}=gh(),i=n.widget_class??r?.widgets[n.type]?.name??null,o=w.useMemo(()=>kS([[zn,Rt(TR)],[()=>n.type===Py.CharField&&!zn(n.choices),Rt(Gbe)],[sn(ti.DateWidget),Rt(Fse)],[sn(ti.ForeignKeyWidget),Rt(Use)],[sn(ti.InputWidget),Rt(TR)],[sn(ti.JSONSchemaWidget),Rt(Vse)],[sn(ti.ManyToManyWidget),Rt(Cle)],[sn(ti.MediaWidget),Rt(mde)],[sn(ti.MultiSelectWidget),Rt(xde)],[sn(ti.RichTextWidget),Rt(Zbe)],[sn(ti.TextAreaWidget),Rt(Qbe)],[sn(ti.SlugWidget),Rt(Xbe)],[sn(ti.URLPathWidget),Rt(e0e)],[sn(ti.CheckboxWidget),Rt(zre)],[sn(ti.TimeWidget),Rt(Jbe)],[wS,Rt(Bse)]])(i),[n.choices,n.type,i]);return x.jsx(o,{value:e,onChange:t,field:n})}function k2({formField:e,model:t}){const n=Xu(),r=t.fields[e.name];return x.jsx("div",{children:x.jsx(of,{control:n.control,name:e.name,render:({field:i})=>x.jsxs(af,{children:[x.jsx(Vm,{children:e.label||r?.verbose_name}),!r||r.readonly?x.jsx(GS,{value:i.value,field:r}):x.jsx(sf,{children:x.jsx(t0e,{field:r,...i})}),r&&x.jsx(Lre,{children:r.help_text}),x.jsx(lf,{})]})})})}function IF({formSet:e,model:t,hiddenFields:n=[]}){return x.jsxs("div",{children:[x.jsxs("div",{className:"mb-4 empty:hidden",children:[e.title&&x.jsx("h4",{className:"font-semibold",children:e.title}),e.description?x.jsx("div",{className:"text-sm text-muted-foreground",children:e.description}):null]}),x.jsx("div",{className:"space-y-3",children:e.fields.map((r,i)=>GW("fields",r)?x.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:`repeat(${r.fields.length}, 1fr)`},children:r.fields.filter(o=>!n.includes(o.name)).map(o=>x.jsx(k2,{formField:o,model:t},i))}):!n.includes(r.name)&&x.jsx(k2,{formField:r,model:t},i))})]})}function n0e({model:e,hiddenFields:t}){const{admin:{edit:{sidebar:n}}}=e;return!ks(n)&&!zn(n)&&x.jsx("aside",{className:"space-y-4",children:n.map((i,o)=>x.jsx("section",{className:"border rounded-lg p-4 w-full",children:x.jsx(IF,{model:e,formSet:i,hiddenFields:t})},o))})}var Dv="DropdownMenu",[r0e,Dxe]=Ti(Dv,[uv]),Vr=uv(),[i0e,$F]=r0e(Dv),FF=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=Vr(t),d=w.useRef(null),[h,p]=qo({prop:i,defaultProp:o??!1,onChange:a,caller:Dv});return x.jsx(i0e,{scope:t,triggerId:hr(),triggerRef:d,contentId:hr(),open:h,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(g=>!g),[p]),modal:l,children:x.jsx(XI,{...u,open:h,onOpenChange:p,dir:r,modal:l,children:n})})};FF.displayName=Dv;var BF="DropdownMenuTrigger",HF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=$F(BF,n),a=Vr(n);return x.jsx(QI,{asChild:!0,...a,children:x.jsx(Ge.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ir(t,o.triggerRef),onPointerDown:_e(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:_e(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});HF.displayName=BF;var o0e="DropdownMenuPortal",UF=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Vr(t);return x.jsx(JI,{...r,...n})};UF.displayName=o0e;var VF="DropdownMenuContent",qF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$F(VF,n),o=Vr(n),a=w.useRef(!1);return x.jsx(e4,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:_e(e.onCloseAutoFocus,l=>{a.current||i.triggerRef.current?.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:_e(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,h=u.button===2||d;(!i.modal||h)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qF.displayName=VF;var a0e="DropdownMenuGroup",s0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(t4,{...i,...r,ref:t})});s0e.displayName=a0e;var l0e="DropdownMenuLabel",c0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(n4,{...i,...r,ref:t})});c0e.displayName=l0e;var u0e="DropdownMenuItem",WF=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(r4,{...i,...r,ref:t})});WF.displayName=u0e;var d0e="DropdownMenuCheckboxItem",f0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(i4,{...i,...r,ref:t})});f0e.displayName=d0e;var h0e="DropdownMenuRadioGroup",p0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(o4,{...i,...r,ref:t})});p0e.displayName=h0e;var m0e="DropdownMenuRadioItem",g0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(a4,{...i,...r,ref:t})});g0e.displayName=m0e;var y0e="DropdownMenuItemIndicator",v0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(s4,{...i,...r,ref:t})});v0e.displayName=y0e;var b0e="DropdownMenuSeparator",x0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(l4,{...i,...r,ref:t})});x0e.displayName=b0e;var w0e="DropdownMenuArrow",S0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(c4,{...i,...r,ref:t})});S0e.displayName=w0e;var C0e="DropdownMenuSubTrigger",E0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(u4,{...i,...r,ref:t})});E0e.displayName=C0e;var k0e="DropdownMenuSubContent",M0e=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Vr(n);return x.jsx(d4,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});M0e.displayName=k0e;var O0e=FF,T0e=HF,A0e=UF,D0e=qF,R0e=WF;function KF({...e}){return x.jsx(O0e,{"data-slot":"dropdown-menu",...e})}function YF({...e}){return x.jsx(T0e,{"data-slot":"dropdown-menu-trigger",...e})}function ZF({className:e,sideOffset:t=4,...n}){return x.jsx(A0e,{children:x.jsx(D0e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:we("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function GF({className:e,inset:t,variant:n="default",...r}){return x.jsx(R0e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:we("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function N0e({model:e,resource:t,isSaving:n,onSave:r,onDelete:i,onClose:o}){const{t:a}=cn(),l=Vn(),{data:u}=gh(),d=OC(),h=Xu(),p=!t?.id,g=e?.admin.is_singleton??!1,{isDirty:y}=h.formState,b=t&&u?t[u.settings.edited_at_attr]:null,C=xo(),{mutateAsync:E}=Us({async mutationFn(k){await l.delete(`/content/${e.label}/${k}`)},async onSuccess(){await C.invalidateQueries({queryKey:["resources",e.label]})}});return e&&x.jsx(x.Fragment,{children:x.jsxs(XS,{className:"border-b flex-row items-center gap-6 p-5",children:[x.jsx(on,{variant:"outline",size:"icon",disabled:n,onClick:async()=>{if(!y)return o?.();await d({description:a("editor.unsaved_alert")})&&o?.()},children:x.jsx(HG,{})}),x.jsxs("div",{className:"select-none",children:[x.jsx(QS,{children:`${a(p?"editor.title_create":"editor.title_edit",{modelName:e.verbose_name.toLowerCase()})}`}),x.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:t?.__str__})]}),x.jsxs("div",{className:"flex-1 flex items-center justify-end gap-2",children:[b?x.jsx("div",{className:"text-muted-foreground text-sm font-medium mr-4 select-none",children:`${a("editor.last_edited")} ${Ko(b).fromNow()}`}):null,x.jsx(on,{onClick:async()=>{try{await r()}catch{}},isLoading:n,children:a(p?"common.create":"common.save")}),!g&&!p&&x.jsxs(KF,{children:[x.jsx(YF,{asChild:!0,children:x.jsx(on,{size:"icon",variant:"ghost",children:x.jsx(NP,{})})}),x.jsx(ZF,{align:"end",children:x.jsx(GF,{className:"text-destructive",onSelect:async()=>{await d({title:a("common.delete_confirm_title"),description:a("common.delete_confirm_description")})&&(await E(t.id),i?.())},children:a("common.delete")})})]})]})]})})}var Rv="Tabs",[_0e,Rxe]=Ti(Rv,[cv]),XF=cv(),[j0e,gE]=_0e(Rv),QF=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:l,activationMode:u="automatic",...d}=e,h=lv(l),[p,g]=qo({prop:r,onChange:i,defaultProp:o??"",caller:Rv});return x.jsx(j0e,{scope:n,baseId:hr(),value:p,onValueChange:g,orientation:a,dir:h,activationMode:u,children:x.jsx(Ge.div,{dir:h,"data-orientation":a,...d,ref:t})})});QF.displayName=Rv;var JF="TabsList",eB=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=gE(JF,n),a=XF(n);return x.jsx(OI,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:x.jsx(Ge.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});eB.displayName=JF;var tB="TabsTrigger",nB=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=gE(tB,n),l=XF(n),u=oB(a.baseId,r),d=aB(a.baseId,r),h=r===a.value;return x.jsx(TI,{asChild:!0,...l,focusable:!i,active:h,children:x.jsx(Ge.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:_e(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?a.onValueChange(r):p.preventDefault()}),onKeyDown:_e(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&a.onValueChange(r)}),onFocus:_e(e.onFocus,()=>{const p=a.activationMode!=="manual";!h&&!i&&p&&a.onValueChange(r)})})})});nB.displayName=tB;var rB="TabsContent",iB=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,l=gE(rB,n),u=oB(l.baseId,r),d=aB(l.baseId,r),h=r===l.value,p=w.useRef(h);return w.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),x.jsx(li,{present:i||h,children:({present:g})=>x.jsx(Ge.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!g,id:d,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&o})})});iB.displayName=rB;function oB(e,t){return`${e}-trigger-${t}`}function aB(e,t){return`${e}-content-${t}`}var P0e=QF,L0e=eB,z0e=nB,I0e=iB;function $0e({className:e,...t}){return x.jsx(P0e,{"data-slot":"tabs",className:we("flex flex-col gap-2",e),...t})}function F0e({className:e,...t}){return x.jsx(L0e,{"data-slot":"tabs-list",className:we("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function cw({className:e,...t}){return x.jsx(z0e,{"data-slot":"tabs-trigger",className:we("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function M2({className:e,...t}){return x.jsx(I0e,{"data-slot":"tabs-content",className:we("flex-1 outline-none",e),...t})}function B0e({relModel:e,relId:t,model:n,adminModel:r}){const{t:i}=cn(),o=Vn(),[a,l]=w.useState(!1),[u,d]=w.useState(1),h=!n.admin,p=PL({name:"__str__"}),{data:g}=Oi({retry:!1,refetchOnWindowFocus:!0,placeholderData:Ql,queryKey:["resources",e,n.label,r.fk_name,t,u],async queryFn(){const{data:y}=await o.get(`/inlines/${e}/${n.label}`,{params:{[`${r.fk_name}_id`]:t,page:u}});return y}});return x.jsxs("div",{className:"space-y-4",children:[x.jsx(Zu,{open:a,onOpenChange:l,children:x.jsx(Gu,{className:"p-0 sm:max-w-5xl",showCloseButton:!1,children:x.jsx(yE,{modelLabel:n.label,initialValues:{[r.fk_name]:{id:t,__str__:p}},onSave:()=>l(!1),onClose:()=>l(!1)})})}),x.jsx("div",{className:"border rounded-lg scrollbar",children:x.jsxs(kL,{children:[x.jsx(ML,{children:x.jsx(mg,{children:r.list_display?.map(y=>x.jsx(TL,{children:x.jsx("div",{className:"flex items-center",children:n.fields[y]?.verbose_name})},y))})}),x.jsx(OL,{children:g?.results.map(y=>x.jsx(H0e,{resource:y,model:n,adminModel:r,relId:t,relName:p,readOnly:h},y.id))})]})}),g?.pagination&&x.jsx("div",{className:"flex justify-center",children:x.jsx(vh,{current:g.pagination.current,pages:g.pagination.pages,onPageChange:d})}),x.jsx("div",{className:"flex justify-center",children:x.jsxs(on,{size:"sm",variant:"outline",onClick:()=>l(!0),children:[x.jsx(jP,{}),i("common.create")]})})]})}function H0e({resource:e,readOnly:t,model:n,adminModel:r,relId:i,relName:o}){const[a,l]=w.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsx(Zu,{open:a,onOpenChange:l,children:!t&&x.jsx(Gu,{className:"p-0 sm:max-w-5xl",showCloseButton:!1,children:x.jsx(yE,{modelLabel:n.label,id:e.id,initialValues:{[r.fk_name]:{id:i,__str__:o}},onSave:()=>l(!1),onClose:()=>l(!1),onDelete:()=>l(!1)})})},e.id),x.jsx(mg,{onClick:()=>!t&&l(!0),className:we({"hover:bg-transparent":t}),children:r.list_display?.map(u=>x.jsx(AL,{children:x.jsx(GS,{value:e[u],field:n.fields[u]})},u))})]})}function U0e({model:e,id:t,hiddenFields:n}){const{t:r}=cn(),{data:i}=Ai(),{admin:{edit:{main:o,inlines:a}}}=e,l=o.length>1||!ks(o[0]?.label)||!ks(a),u=o.filter(ES("label"));return x.jsx("div",{children:x.jsxs($0e,{defaultValue:u[0]?.label||"default",children:[l&&x.jsxs(F0e,{className:"w-full",children:[u.map((d,h)=>x.jsx(cw,{value:d.label,children:d.label},h)),ks(u)&&!ks(a)&&x.jsx(cw,{value:"default",children:r("common.general")}),t?a.map(d=>x.jsx(cw,{value:d.model,children:i?.models.find(Wo({label:d.model}))?.verbose_name_plural},d.model)):null]}),o.map((d,h)=>x.jsx(M2,{value:d.label||"default",className:"space-y-4",children:d.formsets.map((p,g)=>x.jsx("section",{className:"border rounded-lg p-4 w-full",children:x.jsx(IF,{model:e,formSet:p,hiddenFields:n})},g))},h)),t?a.map(d=>{const h=i?.models.find(Wo({label:d.model}));return h?x.jsx(M2,{value:d.model,children:x.jsx(B0e,{relModel:e.label,relId:t,model:h,adminModel:d})},d.model):null}):null]})})}function yE({modelLabel:e,id:t,initialValues:n={},onDelete:r,onSave:i,onClose:o}){const a=xo(),l=Vn(),{data:u}=Ai(),d=u?.models.find(Wo({label:e})),h=d?.admin.is_singleton??!1,p=Object.keys(n),g=Object.entries(d?.fields??{}).reduce((A,[N,D])=>({...A,[N]:D.default}),{}),y=oz({id:Qw().readonly().optional(),__str__:Qw().readonly().optional()}),b=HL({resolver:rz(y),mode:"onChange",defaultValues:i7(n,g)}),{data:C}=Oi({enabled:!zn(t)||h,retry:!1,queryKey:["resources",e,t||h],async queryFn(){const{data:A}=await l.get(`/content/${e}${h?"":`/${t}`}`);return b.reset(A),A}}),{mutateAsync:E,isPending:k}=Us({async mutationFn(A){await l[A.id?"put":"post"](`/content/${e}${A.id?`/${A.id}`:""}`,A)},async onSuccess(){await a.invalidateQueries({queryKey:["resources",e]})}});async function O(A){await E(A)}return d&&x.jsx(lz,{...b,children:x.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x.jsx(N0e,{model:d,resource:C,isSaving:k,onSave:async()=>{await b.handleSubmit(O)(),i?.()},onDelete:r,onClose:o}),x.jsxs("div",{className:"flex flex-1 justify-center overflow-y-auto",children:[x.jsx("div",{className:"w-full max-w-3xl",children:x.jsx("div",{className:"p-5",children:x.jsx(U0e,{model:d,id:t,hiddenFields:p})})}),x.jsx("div",{className:"w-full max-w-[360px]",children:x.jsx("div",{className:"p-5",children:x.jsx(n0e,{model:d,hiddenFields:p})})})]})]})})}function V0e(){const e=bo(),t=zu(),[n,r,i]=e.hash.split(":");return x.jsx(Zu,{open:e.hash.startsWith("#editor:"),onOpenChange:o=>{o||t({hash:""})},children:x.jsx(Gu,{showCloseButton:!1,className:"sm:max-w-none w-screen h-screen rounded-none p-0",onOpenAutoFocus:o=>o.preventDefault(),children:x.jsx(yE,{modelLabel:r,id:i,onClose:()=>t({hash:""}),onSave:()=>t({hash:""}),onDelete:()=>t({hash:""})})})})}function q0e(){const e=Vn();return Oi({retry:!1,queryKey:["me"],async queryFn(){const{data:t}=await e.get("/me");return t}})}function W0e(){const{t:e}=cn(),t=zu(),{setToken:n}=_S(),{data:r}=gh(),{data:i}=q0e(),{data:o}=Ai(),[a,l]=w.useState("");return x.jsxs("nav",{className:"w-[240px] shrink-0 flex flex-col bg-stone-50 border-r",children:[r&&x.jsxs("div",{className:"flex items-center gap-2 border-b p-3",children:[x.jsx("div",{className:"bg-gradient-to-tl from-stone-900 to-stone-600 size-7 rounded flex items-center justify-center text-white font-black shrink-0",children:r.site_header[0]}),x.jsx("h2",{className:"line-clamp-1 break-all text-base font-semibold",children:r.site_header})]}),x.jsx("div",{className:"p-3 border-b",children:x.jsx(Mr,{variant:"secondary",className:"border",placeholder:e("common.search"),value:a,onChange:u=>l(u.target.value)})}),x.jsxs("div",{className:"flex-1 p-2 space-y-1 overflow-y-auto scrollbar",children:[x.jsx(nf,{to:"/",color:"slate",icon:x.jsx(AG,{}),label:e("main_menu.dashboard")}),o?.media_library.enabled&&x.jsx(nf,{to:"/media-library",color:"pink",icon:x.jsx(_P,{}),label:e("main_menu.media_library")}),x.jsx("div",{className:"h-4",role:"separator"}),o?.model_groups.map(u=>x.jsx(nf,{color:u.color??"blue",icon:u.icon??x.jsx($w,{}),label:u.label,children:u.models.map(d=>{const h=o.models.find(Wo({label:d}));return h?x.jsx(nf,{to:h.admin.is_singleton?{hash:`editor:${h.label}`}:`/content/${h.label}`,label:h.verbose_name_plural,icon:h.admin.icon??x.jsx($w,{})},d):null}).filter(d=>!zn(d))},u.name)),x.jsx("div",{className:"h-4",role:"separator"}),x.jsx(nf,{to:"/",icon:x.jsx(_G,{}),label:e("main_menu.settings")})]}),x.jsx("div",{className:"p-1 border-t",children:i&&x.jsxs(KF,{children:[x.jsx(ZF,{side:"right",align:"start",children:x.jsxs(GF,{onClick:()=>{n(null),t("/login")},children:[x.jsx(FG,{}),e("main_menu.log_out")]})}),x.jsxs(YF,{className:"flex items-center text-left w-full gap-3 hover:bg-stone-200 p-2 rounded-md select-none",children:[x.jsxs("div",{className:"relative rounded-full size-8 bg-indigo-500 text-indigo-100 flex items-center justify-center font-bold shrink-0 text-xs",children:[`${i.first_name??""}${i.last_name??""}${i.username??""}`.trim().replace(/\s/g,"").slice(0,2).toUpperCase(),x.jsx("div",{className:"bg-emerald-500 size-2 rounded-full absolute bottom-px right-px"})]}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-sm font-medium",children:`${i.first_name??""} ${i.last_name??""}`.trim()}),x.jsx("div",{className:"text-xs text-muted-foreground",children:i.username})]})]})]})})]})}const K0e={slate:"bg-slate-200 text-slate-600",gray:"bg-gray-200 text-gray-600",zinc:"bg-zinc-200 text-zinc-600",neutral:"bg-neutral-200 text-neutral-600",stone:"bg-stone-200 text-stone-600",red:"bg-red-100 text-red-600",orange:"bg-orange-100 text-orange-600",amber:"bg-amber-100 text-amber-600",yellow:"bg-yellow-100 text-yellow-600",lime:"bg-lime-100 text-lime-600",green:"bg-green-100 text-green-600",emerald:"bg-emerald-100 text-emerald-600",teal:"bg-teal-100 text-teal-600",cyan:"bg-cyan-100 text-cyan-600",sky:"bg-sky-100 text-sky-600",blue:"bg-blue-100 text-blue-600",indigo:"bg-indigo-100 text-indigo-600",violet:"bg-violet-100 text-violet-600",purple:"bg-purple-100 text-purple-600",fuchsia:"bg-fuchsia-100 text-fuchsia-600",pink:"bg-pink-100 text-pink-600",rose:"bg-rose-100 text-rose-600"};function nf({label:e,icon:t,to:n,color:r,children:i}){const o=n?Iu:"button",[a,l]=w.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsxs(o,{to:n??void 0,className:"flex items-center w-full text-sm font-medium gap-2 h-8 px-2 hover:bg-stone-100 rounded hover:cursor-default",onClick:()=>{i&&l(!a)},children:[t&&x.jsx("span",{className:we("size-5 rounded flex items-center justify-center",r?K0e[r]:"text-stone-500"),children:typeof t=="string"?x.jsx("span",{className:we(t)}):t}),x.jsxs("span",{className:"flex items-center justify-between flex-1",children:[x.jsx("span",{className:"first-letter:uppercase line-clamp-1 break-all",children:e}),i?a?x.jsx(kG,{}):x.jsx(DP,{}):null]})]}),i&&a?x.jsx("div",{className:"pl-3",children:i}):null]})}function Y0e(){return x.jsxs("div",{className:"h-screen flex items-stretch",children:[x.jsx(W0e,{}),x.jsx(V0e,{}),x.jsx("div",{className:"flex-1 bg-[#FDFDFD] flex flex-col overflow-y-auto scrollbar",children:x.jsx(ah,{})})]})}function Z0e({filters:e,onFilterChange:t}){const{t:n}=cn();return x.jsx("div",{children:x.jsx(Mr,{variant:"secondary",value:e.search,onChange:r=>t({search:r.target.value}),placeholder:n("common.search")})})}function G0e({items:e}){const{data:t}=Ai();return t?.media_library.models.media_model&&x.jsx("div",{className:"grid grid-cols-4 gap-4",children:e.map(r=>x.jsx(E4,{item:r},r.id))})}function X0e(){const{t:e}=cn(),{data:t}=Ai(),n=t?.media_library.models.media_model,[r,i]=aS(),o=Number(r.get("page")??"1"),a=r.get("folder"),[l,u]=w.useState({search:""}),{data:d}=M4({folder:a,page:o,filters:l});return n&&d?x.jsxs("div",{className:"flex flex-col overflow-hidden",children:[x.jsxs("div",{className:"flex items-center gap-4 mb-6 py-3 px-5 border-b",children:[x.jsx(_P,{size:24,className:"text-muted-foreground shrink-0"}),x.jsxs("div",{className:"flex-1",children:[x.jsx("h1",{className:"text-xl/tight font-semibold mb-0.5",children:e("media-library.title")}),t.media_library.folders?x.jsx(bI,{folder:a,onSelect:h=>i(p=>(h?p.set("folder",h):p.delete("folder"),p))}):x.jsx("div",{className:"text-muted-foreground",children:e("media-library.description")})]})]}),x.jsx("div",{className:"mb-8 px-5",children:x.jsx(Z0e,{filters:l,onFilterChange:u})}),t.media_library.folders&&x.jsx("div",{className:"mb-4 px-5",children:x.jsx(C4,{parent:a,onSelect:h=>i(p=>(h?p.set("folder",h):p.delete("folder"),p))})}),x.jsxs("div",{className:"px-5 overflow-y-auto scrollbar flex-1",children:[x.jsx(G0e,{items:d.results}),x.jsx("div",{className:"py-5",children:x.jsx(vh,{current:d.pagination.current,pages:d.pagination.pages,onPageChange:h=>i(p=>(p.set("page",`${h}`),p))})})]})]}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsx(Iy,{})})}const Q0e=R8([{path:"/",element:x.jsx(QK,{}),children:[{element:x.jsx(RZ,{}),children:[{element:x.jsx(Y0e,{}),children:[{index:!0,element:x.jsx(xG,{})},{path:"media-library",element:x.jsx(X0e,{})},{path:"content/:model",element:x.jsx(wG,{}),children:[{index:!0,element:x.jsx(dJ,{})}]}]}]},{element:x.jsx(NZ,{}),children:[{path:"login",element:x.jsx(pG,{})}]}]}],{basename:window.DCS_BASENAME}),J0e=document.getElementById("root");E6.createRoot(J0e).render(x.jsx(DZ,{children:x.jsx(r8,{router:Q0e})}));export{exe as c,yo as g};
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-content-studio
3
- Version: 1.0.0b2.post2
3
+ Version: 1.0.0b2.post3
4
4
  Summary: Modern & flexible Django admin
5
5
  License: MIT
6
6
  Author: Leon van der Grient
@@ -17,7 +17,7 @@ content_studio/serializers.py,sha256=k5QLRiaa85jEiyljz2QdyTFcWY4gT8Lb28dBZsdEcsQ
17
17
  content_studio/settings.py,sha256=6U0o-DxwpFQo-1LLumr3U4FCVTHiBzySK7M77HWvpf4,4510
18
18
  content_studio/static/content_studio/assets/browser-ponyfill-Ct7s-5jI.js,sha256=ka_XS-3zL9SFKN25BR2iVt7ZrWLHsY-13dDUJinsL10,10281
19
19
  content_studio/static/content_studio/assets/index.css,sha256=pCXaVMjDgaSBb7MFmZxGqmD7J5bIQq8_oEoqlmQSLfM,85008
20
- content_studio/static/content_studio/assets/index.js,sha256=dF6FHqC6dxOzUU6JjGMjbowqBegBs7Gn7gcplaEZhyY,1369923
20
+ content_studio/static/content_studio/assets/index.js,sha256=b2jDofu00bBNJ551-q1KvuozIJO3UKC68e0g7mfkJss,1369932
21
21
  content_studio/static/content_studio/assets/inter-cyrillic-ext-wght-normal.woff2,sha256=yhVwYzOaxK1BjyFPOr_tEZsHmKtNN3OGzlyeWnpDXr0,25960
22
22
  content_studio/static/content_studio/assets/inter-cyrillic-wght-normal.woff2,sha256=cdXuk8wenx1SCjqLZkVt4Yx4edjfCdV_zS6v91_vAHU,18748
23
23
  content_studio/static/content_studio/assets/inter-greek-ext-wght-normal.woff2,sha256=bp4CCiX5tW1BjywIWx08CXJaTaI_5pOltGMGRgZzIZA,11232
@@ -43,7 +43,7 @@ content_studio/utils.py,sha256=xOolXd9Zmty6B6_2febvM8TmZhZ0JRc2nCLj3VooHkM,1488
43
43
  content_studio/views.py,sha256=GbANmQY_VyzQPD4Hw3MEfWF3pOr2G6a61Ktvu2Bw6d8,5370
44
44
  content_studio/viewsets.py,sha256=GrgtiK-HlrAfi4ubpLrBADszJMWxAupkBfIoS6OyIeA,3380
45
45
  content_studio/widgets.py,sha256=OlFKCAYNhkj2Ww9S_hvQTzUjcSnYXocmi04zusKrOTo,1071
46
- django_content_studio-1.0.0b2.post2.dist-info/LICENSE,sha256=Wnx2EJhtSNnXE5Qs80i1HTBNFZTi8acEtC5TYqtFlnQ,1075
47
- django_content_studio-1.0.0b2.post2.dist-info/METADATA,sha256=LAGlV2ogq0pgSKr7SR33OXxQqbjAws-7WOCOqXQthrE,2518
48
- django_content_studio-1.0.0b2.post2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
49
- django_content_studio-1.0.0b2.post2.dist-info/RECORD,,
46
+ django_content_studio-1.0.0b2.post3.dist-info/LICENSE,sha256=Wnx2EJhtSNnXE5Qs80i1HTBNFZTi8acEtC5TYqtFlnQ,1075
47
+ django_content_studio-1.0.0b2.post3.dist-info/METADATA,sha256=_Fh6dUBvEQ0AAyjvr6Th4IbTxUksYk58EmQoxU3U5Hk,2518
48
+ django_content_studio-1.0.0b2.post3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
49
+ django_content_studio-1.0.0b2.post3.dist-info/RECORD,,