font-controls 1.0.0

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.
@@ -0,0 +1,74 @@
1
+ (function(he,ne){typeof exports=="object"&&typeof module<"u"?ne(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],ne):(he=typeof globalThis<"u"?globalThis:he||self,ne(he.FontControls={},he.React,he.ReactDOM))})(this,function(he,ne,dt){"use strict";function or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}},Ne={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var pt;function ar(){if(pt)return Ne;pt=1;var e=ne,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function p(f,d,m){var g,T={},A=null,Y=null;m!==void 0&&(A=""+m),d.key!==void 0&&(A=""+d.key),d.ref!==void 0&&(Y=d.ref);for(g in d)o.call(d,g)&&!u.hasOwnProperty(g)&&(T[g]=d[g]);if(f&&f.defaultProps)for(g in d=f.defaultProps,d)T[g]===void 0&&(T[g]=d[g]);return{$$typeof:t,type:f,key:A,ref:Y,props:T,_owner:a.current}}return Ne.Fragment=r,Ne.jsx=p,Ne.jsxs=p,Ne}var Me={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ht;function ir(){return ht||(ht=1,process.env.NODE_ENV!=="production"&&function(){var e=ne,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),B=Symbol.iterator,X="@@iterator";function _(n){if(n===null||typeof n!="object")return null;var s=B&&n[B]||n[X];return typeof s=="function"?s:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(n){{for(var s=arguments.length,v=new Array(s>1?s-1:0),E=1;E<s;E++)v[E-1]=arguments[E];C("error",n,v)}}function C(n,s,v){{var E=x.ReactDebugCurrentFrame,U=E.getStackAddendum();U!==""&&(s+="%s",v=v.concat([U]));var V=v.map(function(I){return String(I)});V.unshift("Warning: "+s),Function.prototype.apply.call(console[n],console,V)}}var S=!1,i=!1,k=!1,Q=!1,ee=!1,G;G=Symbol.for("react.module.reference");function J(n){return!!(typeof n=="string"||typeof n=="function"||n===o||n===u||ee||n===a||n===m||n===g||Q||n===Y||S||i||k||typeof n=="object"&&n!==null&&(n.$$typeof===A||n.$$typeof===T||n.$$typeof===p||n.$$typeof===f||n.$$typeof===d||n.$$typeof===G||n.getModuleId!==void 0))}function Se(n,s,v){var E=n.displayName;if(E)return E;var U=s.displayName||s.name||"";return U!==""?v+"("+U+")":v}function Te(n){return n.displayName||"Context"}function ie(n){if(n==null)return null;if(typeof n.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case o:return"Fragment";case r:return"Portal";case u:return"Profiler";case a:return"StrictMode";case m:return"Suspense";case g:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case f:var s=n;return Te(s)+".Consumer";case p:var v=n;return Te(v._context)+".Provider";case d:return Se(n,n.render,"ForwardRef");case T:var E=n.displayName||null;return E!==null?E:ie(n.type)||"Memo";case A:{var U=n,V=U._payload,I=U._init;try{return ie(I(V))}catch{return null}}}return null}var K=Object.assign,me=0,te,fe,be,_e,l,y,O;function j(){}j.__reactDisabledLog=!0;function w(){{if(me===0){te=console.log,fe=console.info,be=console.warn,_e=console.error,l=console.group,y=console.groupCollapsed,O=console.groupEnd;var n={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}me++}}function F(){{if(me--,me===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},n,{value:te}),info:K({},n,{value:fe}),warn:K({},n,{value:be}),error:K({},n,{value:_e}),group:K({},n,{value:l}),groupCollapsed:K({},n,{value:y}),groupEnd:K({},n,{value:O})})}me<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var P=x.ReactCurrentDispatcher,R;function D(n,s,v){{if(R===void 0)try{throw Error()}catch(U){var E=U.stack.trim().match(/\n( *(at )?)/);R=E&&E[1]||""}return`
18
+ `+R+n}}var $=!1,N;{var re=typeof WeakMap=="function"?WeakMap:Map;N=new re}function h(n,s){if(!n||$)return"";{var v=N.get(n);if(v!==void 0)return v}var E;$=!0;var U=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var V;V=P.current,P.current=null,w();try{if(s){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(le){E=le}Reflect.construct(n,[],I)}else{try{I.call()}catch(le){E=le}n.call(I.prototype)}}else{try{throw Error()}catch(le){E=le}n()}}catch(le){if(le&&E&&typeof le.stack=="string"){for(var M=le.stack.split(`
19
+ `),se=E.stack.split(`
20
+ `),q=M.length-1,z=se.length-1;q>=1&&z>=0&&M[q]!==se[z];)z--;for(;q>=1&&z>=0;q--,z--)if(M[q]!==se[z]){if(q!==1||z!==1)do if(q--,z--,z<0||M[q]!==se[z]){var pe=`
21
+ `+M[q].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),typeof n=="function"&&N.set(n,pe),pe}while(q>=1&&z>=0);break}}}finally{$=!1,P.current=V,F(),Error.prepareStackTrace=U}var De=n?n.displayName||n.name:"",Pe=De?D(De):"";return typeof n=="function"&&N.set(n,Pe),Pe}function de(n,s,v){return h(n,!1)}function je(n){var s=n.prototype;return!!(s&&s.isReactComponent)}function we(n,s,v){if(n==null)return"";if(typeof n=="function")return h(n,je(n));if(typeof n=="string")return D(n);switch(n){case m:return D("Suspense");case g:return D("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case d:return de(n.render);case T:return we(n.type,s,v);case A:{var E=n,U=E._payload,V=E._init;try{return we(V(U),s,v)}catch{}}}return""}var ke=Object.prototype.hasOwnProperty,Bt={},Vt=x.ReactDebugCurrentFrame;function Ue(n){if(n){var s=n._owner,v=we(n.type,n._source,s?s.type:null);Vt.setExtraStackFrame(v)}else Vt.setExtraStackFrame(null)}function yn(n,s,v,E,U){{var V=Function.call.bind(ke);for(var I in n)if(V(n,I)){var M=void 0;try{if(typeof n[I]!="function"){var se=Error((E||"React class")+": "+v+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw se.name="Invariant Violation",se}M=n[I](s,I,E,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){M=q}M&&!(M instanceof Error)&&(Ue(U),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",v,I,typeof M),Ue(null)),M instanceof Error&&!(M.message in Bt)&&(Bt[M.message]=!0,Ue(U),b("Failed %s type: %s",v,M.message),Ue(null))}}}var mn=Array.isArray;function st(n){return mn(n)}function bn(n){{var s=typeof Symbol=="function"&&Symbol.toStringTag,v=s&&n[Symbol.toStringTag]||n.constructor.name||"Object";return v}}function Sn(n){try{return Ht(n),!1}catch{return!0}}function Ht(n){return""+n}function qt(n){if(Sn(n))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bn(n)),Ht(n)}var zt=x.ReactCurrentOwner,xn={key:!0,ref:!0,__self:!0,__source:!0},Gt,Jt;function En(n){if(ke.call(n,"ref")){var s=Object.getOwnPropertyDescriptor(n,"ref").get;if(s&&s.isReactWarning)return!1}return n.ref!==void 0}function Tn(n){if(ke.call(n,"key")){var s=Object.getOwnPropertyDescriptor(n,"key").get;if(s&&s.isReactWarning)return!1}return n.key!==void 0}function _n(n,s){typeof n.ref=="string"&&zt.current}function Cn(n,s){{var v=function(){Gt||(Gt=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};v.isReactWarning=!0,Object.defineProperty(n,"key",{get:v,configurable:!0})}}function wn(n,s){{var v=function(){Jt||(Jt=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};v.isReactWarning=!0,Object.defineProperty(n,"ref",{get:v,configurable:!0})}}var Pn=function(n,s,v,E,U,V,I){var M={$$typeof:t,type:n,key:s,ref:v,props:I,_owner:V};return M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty(M,"_source",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M};function Rn(n,s,v,E,U){{var V,I={},M=null,se=null;v!==void 0&&(qt(v),M=""+v),Tn(s)&&(qt(s.key),M=""+s.key),En(s)&&(se=s.ref,_n(s,U));for(V in s)ke.call(s,V)&&!xn.hasOwnProperty(V)&&(I[V]=s[V]);if(n&&n.defaultProps){var q=n.defaultProps;for(V in q)I[V]===void 0&&(I[V]=q[V])}if(M||se){var z=typeof n=="function"?n.displayName||n.name||"Unknown":n;M&&Cn(I,z),se&&wn(I,z)}return Pn(n,M,se,U,E,zt.current,I)}}var lt=x.ReactCurrentOwner,Kt=x.ReactDebugCurrentFrame;function Oe(n){if(n){var s=n._owner,v=we(n.type,n._source,s?s.type:null);Kt.setExtraStackFrame(v)}else Kt.setExtraStackFrame(null)}var ut;ut=!1;function ct(n){return typeof n=="object"&&n!==null&&n.$$typeof===t}function Zt(){{if(lt.current){var n=ie(lt.current.type);if(n)return`
22
+
23
+ Check the render method of \``+n+"`."}return""}}function jn(n){return""}var Qt={};function On(n){{var s=Zt();if(!s){var v=typeof n=="string"?n:n.displayName||n.name;v&&(s=`
24
+
25
+ Check the top-level render call using <`+v+">.")}return s}}function er(n,s){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var v=On(s);if(Qt[v])return;Qt[v]=!0;var E="";n&&n._owner&&n._owner!==lt.current&&(E=" It was passed a child from "+ie(n._owner.type)+"."),Oe(n),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,E),Oe(null)}}function tr(n,s){{if(typeof n!="object")return;if(st(n))for(var v=0;v<n.length;v++){var E=n[v];ct(E)&&er(E,s)}else if(ct(n))n._store&&(n._store.validated=!0);else if(n){var U=_(n);if(typeof U=="function"&&U!==n.entries)for(var V=U.call(n),I;!(I=V.next()).done;)ct(I.value)&&er(I.value,s)}}}function Dn(n){{var s=n.type;if(s==null||typeof s=="string")return;var v;if(typeof s=="function")v=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===d||s.$$typeof===T))v=s.propTypes;else return;if(v){var E=ie(s);yn(v,n.props,"prop",E,n)}else if(s.PropTypes!==void 0&&!ut){ut=!0;var U=ie(s);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",U||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nn(n){{for(var s=Object.keys(n.props),v=0;v<s.length;v++){var E=s[v];if(E!=="children"&&E!=="key"){Oe(n),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),Oe(null);break}}n.ref!==null&&(Oe(n),b("Invalid attribute `ref` supplied to `React.Fragment`."),Oe(null))}}var rr={};function nr(n,s,v,E,U,V){{var I=J(n);if(!I){var M="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var se=jn();se?M+=se:M+=Zt();var q;n===null?q="null":st(n)?q="array":n!==void 0&&n.$$typeof===t?(q="<"+(ie(n.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):q=typeof n,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,M)}var z=Rn(n,s,v,U,V);if(z==null)return z;if(I){var pe=s.children;if(pe!==void 0)if(E)if(st(pe)){for(var De=0;De<pe.length;De++)tr(pe[De],n);Object.freeze&&Object.freeze(pe)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tr(pe,n)}if(ke.call(s,"key")){var Pe=ie(n),le=Object.keys(s).filter(function($n){return $n!=="key"}),ft=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!rr[Pe+ft]){var In=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,ft,Pe,In,Pe),rr[Pe+ft]=!0}}return n===o?Nn(z):Dn(z),z}}function Mn(n,s,v){return nr(n,s,v,!0)}function An(n,s,v){return nr(n,s,v,!1)}var kn=An,Fn=Mn;Me.Fragment=o,Me.jsx=kn,Me.jsxs=Fn}()),Me}process.env.NODE_ENV==="production"?Xe.exports=ar():Xe.exports=ir();var c=Xe.exports,Fe={exports:{}},vt={},Be={exports:{}},Ie={exports:{}},W={};/** @license React v16.13.1
31
+ * react-is.production.min.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */var gt;function sr(){if(gt)return W;gt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,T=e?Symbol.for("react.suspense"):60113,A=e?Symbol.for("react.suspense_list"):60120,Y=e?Symbol.for("react.memo"):60115,B=e?Symbol.for("react.lazy"):60116,X=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function C(i){if(typeof i=="object"&&i!==null){var k=i.$$typeof;switch(k){case t:switch(i=i.type,i){case d:case m:case o:case u:case a:case T:return i;default:switch(i=i&&i.$$typeof,i){case f:case g:case B:case Y:case p:return i;default:return k}}case r:return k}}}function S(i){return C(i)===m}return W.AsyncMode=d,W.ConcurrentMode=m,W.ContextConsumer=f,W.ContextProvider=p,W.Element=t,W.ForwardRef=g,W.Fragment=o,W.Lazy=B,W.Memo=Y,W.Portal=r,W.Profiler=u,W.StrictMode=a,W.Suspense=T,W.isAsyncMode=function(i){return S(i)||C(i)===d},W.isConcurrentMode=S,W.isContextConsumer=function(i){return C(i)===f},W.isContextProvider=function(i){return C(i)===p},W.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===t},W.isForwardRef=function(i){return C(i)===g},W.isFragment=function(i){return C(i)===o},W.isLazy=function(i){return C(i)===B},W.isMemo=function(i){return C(i)===Y},W.isPortal=function(i){return C(i)===r},W.isProfiler=function(i){return C(i)===u},W.isStrictMode=function(i){return C(i)===a},W.isSuspense=function(i){return C(i)===T},W.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===o||i===m||i===u||i===a||i===T||i===A||typeof i=="object"&&i!==null&&(i.$$typeof===B||i.$$typeof===Y||i.$$typeof===p||i.$$typeof===f||i.$$typeof===g||i.$$typeof===_||i.$$typeof===x||i.$$typeof===b||i.$$typeof===X)},W.typeOf=C,W}var L={};/** @license React v16.13.1
38
+ * react-is.development.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */var yt;function lr(){return yt||(yt=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,u=e?Symbol.for("react.profiler"):60114,p=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,T=e?Symbol.for("react.suspense"):60113,A=e?Symbol.for("react.suspense_list"):60120,Y=e?Symbol.for("react.memo"):60115,B=e?Symbol.for("react.lazy"):60116,X=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function C(h){return typeof h=="string"||typeof h=="function"||h===o||h===m||h===u||h===a||h===T||h===A||typeof h=="object"&&h!==null&&(h.$$typeof===B||h.$$typeof===Y||h.$$typeof===p||h.$$typeof===f||h.$$typeof===g||h.$$typeof===_||h.$$typeof===x||h.$$typeof===b||h.$$typeof===X)}function S(h){if(typeof h=="object"&&h!==null){var de=h.$$typeof;switch(de){case t:var je=h.type;switch(je){case d:case m:case o:case u:case a:case T:return je;default:var we=je&&je.$$typeof;switch(we){case f:case g:case B:case Y:case p:return we;default:return de}}case r:return de}}}var i=d,k=m,Q=f,ee=p,G=t,J=g,Se=o,Te=B,ie=Y,K=r,me=u,te=a,fe=T,be=!1;function _e(h){return be||(be=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),l(h)||S(h)===d}function l(h){return S(h)===m}function y(h){return S(h)===f}function O(h){return S(h)===p}function j(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function w(h){return S(h)===g}function F(h){return S(h)===o}function P(h){return S(h)===B}function R(h){return S(h)===Y}function D(h){return S(h)===r}function $(h){return S(h)===u}function N(h){return S(h)===a}function re(h){return S(h)===T}L.AsyncMode=i,L.ConcurrentMode=k,L.ContextConsumer=Q,L.ContextProvider=ee,L.Element=G,L.ForwardRef=J,L.Fragment=Se,L.Lazy=Te,L.Memo=ie,L.Portal=K,L.Profiler=me,L.StrictMode=te,L.Suspense=fe,L.isAsyncMode=_e,L.isConcurrentMode=l,L.isContextConsumer=y,L.isContextProvider=O,L.isElement=j,L.isForwardRef=w,L.isFragment=F,L.isLazy=P,L.isMemo=R,L.isPortal=D,L.isProfiler=$,L.isStrictMode=N,L.isSuspense=re,L.isValidElementType=C,L.typeOf=S}()),L}var mt;function bt(){return mt||(mt=1,process.env.NODE_ENV==="production"?Ie.exports=sr():Ie.exports=lr()),Ie.exports}/*
45
+ object-assign
46
+ (c) Sindre Sorhus
47
+ @license MIT
48
+ */var Ve,St;function ur(){if(St)return Ve;St=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function a(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var p={},f=0;f<10;f++)p["_"+String.fromCharCode(f)]=f;var d=Object.getOwnPropertyNames(p).map(function(g){return p[g]});if(d.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(g){m[g]=g}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ve=a()?Object.assign:function(u,p){for(var f,d=o(u),m,g=1;g<arguments.length;g++){f=Object(arguments[g]);for(var T in f)t.call(f,T)&&(d[T]=f[T]);if(e){m=e(f);for(var A=0;A<m.length;A++)r.call(f,m[A])&&(d[m[A]]=f[m[A]])}}return d},Ve}var He,xt;function qe(){if(xt)return He;xt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return He=e,He}var ze,Et;function Tt(){return Et||(Et=1,ze=Function.call.bind(Object.prototype.hasOwnProperty)),ze}var Ge,_t;function cr(){if(_t)return Ge;_t=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qe(),r={},o=Tt();e=function(u){var p="Warning: "+u;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}}}function a(u,p,f,d,m){if(process.env.NODE_ENV!=="production"){for(var g in u)if(o(u,g)){var T;try{if(typeof u[g]!="function"){var A=Error((d||"React class")+": "+f+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}T=u[g](p,g,d,f,null,t)}catch(B){T=B}if(T&&!(T instanceof Error)&&e((d||"React class")+": type specification of "+f+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof T+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),T instanceof Error&&!(T.message in r)){r[T.message]=!0;var Y=m?m():"";e("Failed "+f+" type: "+T.message+(Y??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ge=a,Ge}var Je,Ct;function fr(){if(Ct)return Je;Ct=1;var e=bt(),t=ur(),r=qe(),o=Tt(),a=cr(),u=function(){};process.env.NODE_ENV!=="production"&&(u=function(f){var d="Warning: "+f;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function p(){return null}return Je=function(f,d){var m=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function T(l){var y=l&&(m&&l[m]||l[g]);if(typeof y=="function")return y}var A="<<anonymous>>",Y={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:b(),arrayOf:C,element:S(),elementType:i(),instanceOf:k,node:J(),objectOf:ee,oneOf:Q,oneOfType:G,shape:Te,exact:ie};function B(l,y){return l===y?l!==0||1/l===1/y:l!==l&&y!==y}function X(l,y){this.message=l,this.data=y&&typeof y=="object"?y:{},this.stack=""}X.prototype=Error.prototype;function _(l){if(process.env.NODE_ENV!=="production")var y={},O=0;function j(F,P,R,D,$,N,re){if(D=D||A,N=N||R,re!==r){if(d){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=D+":"+R;!y[de]&&O<3&&(u("You are manually calling a React.PropTypes validation function for the `"+N+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[de]=!0,O++)}}return P[R]==null?F?P[R]===null?new X("The "+$+" `"+N+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new X("The "+$+" `"+N+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:l(P,R,D,$,N)}var w=j.bind(null,!1);return w.isRequired=j.bind(null,!0),w}function x(l){function y(O,j,w,F,P,R){var D=O[j],$=te(D);if($!==l){var N=fe(D);return new X("Invalid "+F+" `"+P+"` of type "+("`"+N+"` supplied to `"+w+"`, expected ")+("`"+l+"`."),{expectedType:l})}return null}return _(y)}function b(){return _(p)}function C(l){function y(O,j,w,F,P){if(typeof l!="function")return new X("Property `"+P+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var R=O[j];if(!Array.isArray(R)){var D=te(R);return new X("Invalid "+F+" `"+P+"` of type "+("`"+D+"` supplied to `"+w+"`, expected an array."))}for(var $=0;$<R.length;$++){var N=l(R,$,w,F,P+"["+$+"]",r);if(N instanceof Error)return N}return null}return _(y)}function S(){function l(y,O,j,w,F){var P=y[O];if(!f(P)){var R=te(P);return new X("Invalid "+w+" `"+F+"` of type "+("`"+R+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return _(l)}function i(){function l(y,O,j,w,F){var P=y[O];if(!e.isValidElementType(P)){var R=te(P);return new X("Invalid "+w+" `"+F+"` of type "+("`"+R+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return _(l)}function k(l){function y(O,j,w,F,P){if(!(O[j]instanceof l)){var R=l.name||A,D=_e(O[j]);return new X("Invalid "+F+" `"+P+"` of type "+("`"+D+"` supplied to `"+w+"`, expected ")+("instance of `"+R+"`."))}return null}return _(y)}function Q(l){if(!Array.isArray(l))return process.env.NODE_ENV!=="production"&&(arguments.length>1?u("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):u("Invalid argument supplied to oneOf, expected an array.")),p;function y(O,j,w,F,P){for(var R=O[j],D=0;D<l.length;D++)if(B(R,l[D]))return null;var $=JSON.stringify(l,function(re,h){var de=fe(h);return de==="symbol"?String(h):h});return new X("Invalid "+F+" `"+P+"` of value `"+String(R)+"` "+("supplied to `"+w+"`, expected one of "+$+"."))}return _(y)}function ee(l){function y(O,j,w,F,P){if(typeof l!="function")return new X("Property `"+P+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var R=O[j],D=te(R);if(D!=="object")return new X("Invalid "+F+" `"+P+"` of type "+("`"+D+"` supplied to `"+w+"`, expected an object."));for(var $ in R)if(o(R,$)){var N=l(R,$,w,F,P+"."+$,r);if(N instanceof Error)return N}return null}return _(y)}function G(l){if(!Array.isArray(l))return process.env.NODE_ENV!=="production"&&u("Invalid argument supplied to oneOfType, expected an instance of array."),p;for(var y=0;y<l.length;y++){var O=l[y];if(typeof O!="function")return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+be(O)+" at index "+y+"."),p}function j(w,F,P,R,D){for(var $=[],N=0;N<l.length;N++){var re=l[N],h=re(w,F,P,R,D,r);if(h==null)return null;h.data&&o(h.data,"expectedType")&&$.push(h.data.expectedType)}var de=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new X("Invalid "+R+" `"+D+"` supplied to "+("`"+P+"`"+de+"."))}return _(j)}function J(){function l(y,O,j,w,F){return K(y[O])?null:new X("Invalid "+w+" `"+F+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return _(l)}function Se(l,y,O,j,w){return new X((l||"React class")+": "+y+" type `"+O+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function Te(l){function y(O,j,w,F,P){var R=O[j],D=te(R);if(D!=="object")return new X("Invalid "+F+" `"+P+"` of type `"+D+"` "+("supplied to `"+w+"`, expected `object`."));for(var $ in l){var N=l[$];if(typeof N!="function")return Se(w,F,P,$,fe(N));var re=N(R,$,w,F,P+"."+$,r);if(re)return re}return null}return _(y)}function ie(l){function y(O,j,w,F,P){var R=O[j],D=te(R);if(D!=="object")return new X("Invalid "+F+" `"+P+"` of type `"+D+"` "+("supplied to `"+w+"`, expected `object`."));var $=t({},O[j],l);for(var N in $){var re=l[N];if(o(l,N)&&typeof re!="function")return Se(w,F,P,N,fe(re));if(!re)return new X("Invalid "+F+" `"+P+"` key `"+N+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(O[j],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(l),null," "));var h=re(R,N,w,F,P+"."+N,r);if(h)return h}return null}return _(y)}function K(l){switch(typeof l){case"number":case"string":case"undefined":return!0;case"boolean":return!l;case"object":if(Array.isArray(l))return l.every(K);if(l===null||f(l))return!0;var y=T(l);if(y){var O=y.call(l),j;if(y!==l.entries){for(;!(j=O.next()).done;)if(!K(j.value))return!1}else for(;!(j=O.next()).done;){var w=j.value;if(w&&!K(w[1]))return!1}}else return!1;return!0;default:return!1}}function me(l,y){return l==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function te(l){var y=typeof l;return Array.isArray(l)?"array":l instanceof RegExp?"object":me(y,l)?"symbol":y}function fe(l){if(typeof l>"u"||l===null)return""+l;var y=te(l);if(y==="object"){if(l instanceof Date)return"date";if(l instanceof RegExp)return"regexp"}return y}function be(l){var y=fe(l);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function _e(l){return!l.constructor||!l.constructor.name?A:l.constructor.name}return Y.checkPropTypes=a,Y.resetWarningCache=a.resetWarningCache,Y.PropTypes=Y,Y},Je}var Ke,wt;function dr(){if(wt)return Ke;wt=1;var e=qe();function t(){}function r(){}return r.resetWarningCache=t,Ke=function(){function o(p,f,d,m,g,T){if(T!==e){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}}o.isRequired=o;function a(){return o}var u={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return u.PropTypes=u,u},Ke}if(process.env.NODE_ENV!=="production"){var pr=bt(),hr=!0;Be.exports=fr()(pr.isElement,hr)}else Be.exports=dr()();var Pt=Be.exports,Ze={exports:{}};function Rt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Rt(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function jt(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Rt(e))&&(o&&(o+=" "),o+=t);return o}Ze.exports=jt,Ze.exports.clsx=jt;var vr=Ze.exports,H={},ge={};Object.defineProperty(ge,"__esModule",{value:!0}),ge.dontSetMe=Sr,ge.findInArray=gr,ge.int=br,ge.isFunction=yr,ge.isNum=mr;function gr(e,t){for(let r=0,o=e.length;r<o;r++)if(t.apply(t,[e[r],r,e]))return e[r]}function yr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function mr(e){return typeof e=="number"&&!isNaN(e)}function br(e){return parseInt(e,10)}function Sr(e,t,r){if(e[t])return new Error(`Invalid prop ${t} passed to ${r} - do not set this, set it on the child.`)}var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.browserPrefixToKey=Dt,Ce.browserPrefixToStyle=xr,Ce.default=void 0,Ce.getPrefix=Ot;const Qe=["Moz","Webkit","O","ms"];function Ot(){var r,o;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const t=(o=(r=window.document)==null?void 0:r.documentElement)==null?void 0:o.style;if(!t||e in t)return"";for(let a=0;a<Qe.length;a++)if(Dt(e,Qe[a])in t)return Qe[a];return""}function Dt(e,t){return t?`${t}${Er(e)}`:e}function xr(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function Er(e){let t="",r=!0;for(let o=0;o<e.length;o++)r?(t+=e[o].toUpperCase(),r=!1):e[o]==="-"?r=!0:t+=e[o];return t}Ce.default=Ot(),Object.defineProperty(H,"__esModule",{value:!0}),H.addClassName=Ft,H.addEvent=_r,H.addUserSelectStyles=kr,H.createCSSTransform=Dr,H.createSVGTransform=Nr,H.getTouch=Mr,H.getTouchIdentifier=Ar,H.getTranslation=et,H.innerHeight=Rr,H.innerWidth=jr,H.matchesSelector=At,H.matchesSelectorAndParentsTo=Tr,H.offsetXYFromParent=Or,H.outerHeight=wr,H.outerWidth=Pr,H.removeClassName=It,H.removeEvent=Cr,H.scheduleRemoveUserSelectStyles=Fr;var ue=ge,Nt=Mt(Ce);function Mt(e,t){if(typeof WeakMap=="function")var r=new WeakMap,o=new WeakMap;return(Mt=function(a,u){if(!u&&a&&a.__esModule)return a;var p,f,d={__proto__:null,default:a};if(a===null||typeof a!="object"&&typeof a!="function")return d;if(p=u?o:r){if(p.has(a))return p.get(a);p.set(a,d)}for(const m in a)m!=="default"&&{}.hasOwnProperty.call(a,m)&&((f=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(a,m))&&(f.get||f.set)?p(d,m,f):d[m]=a[m]);return d})(e,t)}let $e="";function At(e,t){return $e||($e=(0,ue.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(r){return(0,ue.isFunction)(e[r])})),(0,ue.isFunction)(e[$e])?e[$e](t):!1}function Tr(e,t,r){let o=e;do{if(At(o,t))return!0;if(o===r)return!1;o=o.parentNode}while(o);return!1}function _r(e,t,r,o){if(!e)return;const a={capture:!0,...o};e.addEventListener?e.addEventListener(t,r,a):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r}function Cr(e,t,r,o){if(!e)return;const a={capture:!0,...o};e.removeEventListener?e.removeEventListener(t,r,a):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null}function wr(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ue.int)(r.borderTopWidth),t+=(0,ue.int)(r.borderBottomWidth),t}function Pr(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ue.int)(r.borderLeftWidth),t+=(0,ue.int)(r.borderRightWidth),t}function Rr(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ue.int)(r.paddingTop),t-=(0,ue.int)(r.paddingBottom),t}function jr(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ue.int)(r.paddingLeft),t-=(0,ue.int)(r.paddingRight),t}function Or(e,t,r){const a=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),u=(e.clientX+t.scrollLeft-a.left)/r,p=(e.clientY+t.scrollTop-a.top)/r;return{x:u,y:p}}function Dr(e,t){const r=et(e,t,"px");return{[(0,Nt.browserPrefixToKey)("transform",Nt.default)]:r}}function Nr(e,t){return et(e,t,"")}function et(e,t,r){let{x:o,y:a}=e,u=`translate(${o}${r},${a}${r})`;if(t){const p=`${typeof t.x=="string"?t.x:t.x+r}`,f=`${typeof t.y=="string"?t.y:t.y+r}`;u=`translate(${p}, ${f})`+u}return u}function Mr(e,t){return e.targetTouches&&(0,ue.findInArray)(e.targetTouches,r=>t===r.identifier)||e.changedTouches&&(0,ue.findInArray)(e.changedTouches,r=>t===r.identifier)}function Ar(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function kr(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
+ `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
+ `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&Ft(e.body,"react-draggable-transparent-selection")}function Fr(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{kt(e)}):kt(e)}function kt(e){if(e)try{if(e.body&&It(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function Ft(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function It(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.canDragX=Yr,ye.canDragY=Wr,ye.createCoreData=Ur,ye.createDraggableData=Xr,ye.getBoundPosition=Ir,ye.getControlPosition=Lr,ye.snapToGrid=$r;var ce=ge,Re=H;function Ir(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:o}=e.props;o=typeof o=="string"?o:Br(o);const a=tt(e);if(typeof o=="string"){const{ownerDocument:u}=a,p=u.defaultView;let f;if(o==="parent"?f=a.parentNode:f=a.getRootNode().querySelector(o),!(f instanceof p.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const d=f,m=p.getComputedStyle(a),g=p.getComputedStyle(d);o={left:-a.offsetLeft+(0,ce.int)(g.paddingLeft)+(0,ce.int)(m.marginLeft),top:-a.offsetTop+(0,ce.int)(g.paddingTop)+(0,ce.int)(m.marginTop),right:(0,Re.innerWidth)(d)-(0,Re.outerWidth)(a)-a.offsetLeft+(0,ce.int)(g.paddingRight)-(0,ce.int)(m.marginRight),bottom:(0,Re.innerHeight)(d)-(0,Re.outerHeight)(a)-a.offsetTop+(0,ce.int)(g.paddingBottom)-(0,ce.int)(m.marginBottom)}}return(0,ce.isNum)(o.right)&&(t=Math.min(t,o.right)),(0,ce.isNum)(o.bottom)&&(r=Math.min(r,o.bottom)),(0,ce.isNum)(o.left)&&(t=Math.max(t,o.left)),(0,ce.isNum)(o.top)&&(r=Math.max(r,o.top)),[t,r]}function $r(e,t,r){const o=Math.round(t/e[0])*e[0],a=Math.round(r/e[1])*e[1];return[o,a]}function Yr(e){return e.props.axis==="both"||e.props.axis==="x"}function Wr(e){return e.props.axis==="both"||e.props.axis==="y"}function Lr(e,t,r){const o=typeof t=="number"?(0,Re.getTouch)(e,t):null;if(typeof t=="number"&&!o)return null;const a=tt(r),u=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,Re.offsetXYFromParent)(o||e,u,r.props.scale)}function Ur(e,t,r){const o=!(0,ce.isNum)(e.lastX),a=tt(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:a,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function Xr(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function Br(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function tt(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Ye={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.default=Vr;function Vr(){}Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.default=void 0;var rt=$t(ne),oe=ot(Pt),Hr=ot(dt),Z=H,xe=ye,nt=ge,Ae=ot(We);function ot(e){return e&&e.__esModule?e:{default:e}}function $t(e,t){if(typeof WeakMap=="function")var r=new WeakMap,o=new WeakMap;return($t=function(a,u){if(!u&&a&&a.__esModule)return a;var p,f,d={__proto__:null,default:a};if(a===null||typeof a!="object"&&typeof a!="function")return d;if(p=u?o:r){if(p.has(a))return p.get(a);p.set(a,d)}for(const m in a)m!=="default"&&{}.hasOwnProperty.call(a,m)&&((f=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(a,m))&&(f.get||f.set)?p(d,m,f):d[m]=a[m]);return d})(e,t)}function ae(e,t,r){return(t=qr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qr(e){var t=zr(e,"string");return typeof t=="symbol"?t:t+""}function zr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const ve={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let Ee=ve.mouse,Le=class extends rt.Component{constructor(){super(...arguments),ae(this,"dragging",!1),ae(this,"lastX",NaN),ae(this,"lastY",NaN),ae(this,"touchIdentifier",null),ae(this,"mounted",!1),ae(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const r=this.findDOMNode();if(!r||!r.ownerDocument||!r.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:o}=r;if(this.props.disabled||!(t.target instanceof o.defaultView.Node)||this.props.handle&&!(0,Z.matchesSelectorAndParentsTo)(t.target,this.props.handle,r)||this.props.cancel&&(0,Z.matchesSelectorAndParentsTo)(t.target,this.props.cancel,r))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();const a=(0,Z.getTouchIdentifier)(t);this.touchIdentifier=a;const u=(0,xe.getControlPosition)(t,a,this);if(u==null)return;const{x:p,y:f}=u,d=(0,xe.createCoreData)(this,p,f);(0,Ae.default)("DraggableCore: handleDragStart: %j",d),(0,Ae.default)("calling",this.props.onStart),!(this.props.onStart(t,d)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Z.addUserSelectStyles)(o),this.dragging=!0,this.lastX=p,this.lastY=f,(0,Z.addEvent)(o,Ee.move,this.handleDrag),(0,Z.addEvent)(o,Ee.stop,this.handleDragStop))}),ae(this,"handleDrag",t=>{const r=(0,xe.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:o,y:a}=r;if(Array.isArray(this.props.grid)){let f=o-this.lastX,d=a-this.lastY;if([f,d]=(0,xe.snapToGrid)(this.props.grid,f,d),!f&&!d)return;o=this.lastX+f,a=this.lastY+d}const u=(0,xe.createCoreData)(this,o,a);if((0,Ae.default)("DraggableCore: handleDrag: %j",u),this.props.onDrag(t,u)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(d)}return}this.lastX=o,this.lastY=a}),ae(this,"handleDragStop",t=>{if(!this.dragging)return;const r=(0,xe.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:o,y:a}=r;if(Array.isArray(this.props.grid)){let d=o-this.lastX||0,m=a-this.lastY||0;[d,m]=(0,xe.snapToGrid)(this.props.grid,d,m),o=this.lastX+d,a=this.lastY+m}const u=(0,xe.createCoreData)(this,o,a);if(this.props.onStop(t,u)===!1||this.mounted===!1)return!1;const f=this.findDOMNode();f&&this.props.enableUserSelectHack&&(0,Z.scheduleRemoveUserSelectStyles)(f.ownerDocument),(0,Ae.default)("DraggableCore: handleDragStop: %j",u),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,f&&((0,Ae.default)("DraggableCore: Removing handlers"),(0,Z.removeEvent)(f.ownerDocument,Ee.move,this.handleDrag),(0,Z.removeEvent)(f.ownerDocument,Ee.stop,this.handleDragStop))}),ae(this,"onMouseDown",t=>(Ee=ve.mouse,this.handleDragStart(t))),ae(this,"onMouseUp",t=>(Ee=ve.mouse,this.handleDragStop(t))),ae(this,"onTouchStart",t=>(Ee=ve.touch,this.handleDragStart(t))),ae(this,"onTouchEnd",t=>(Ee=ve.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Z.addEvent)(t,ve.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:r}=t;(0,Z.removeEvent)(r,ve.mouse.move,this.handleDrag),(0,Z.removeEvent)(r,ve.touch.move,this.handleDrag),(0,Z.removeEvent)(r,ve.mouse.stop,this.handleDragStop),(0,Z.removeEvent)(r,ve.touch.stop,this.handleDragStop),(0,Z.removeEvent)(t,ve.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Z.scheduleRemoveUserSelectStyles)(r)}}findDOMNode(){var t,r,o;return(t=this.props)!=null&&t.nodeRef?(o=(r=this.props)==null?void 0:r.nodeRef)==null?void 0:o.current:Hr.default.findDOMNode(this)}render(){return rt.cloneElement(rt.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Ye.default=Le,ae(Le,"displayName","DraggableCore"),ae(Le,"propTypes",{allowAnyClick:oe.default.bool,allowMobileScroll:oe.default.bool,children:oe.default.node.isRequired,disabled:oe.default.bool,enableUserSelectHack:oe.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:oe.default.arrayOf(oe.default.number),handle:oe.default.string,cancel:oe.default.string,nodeRef:oe.default.object,onStart:oe.default.func,onDrag:oe.default.func,onStop:oe.default.func,onMouseDown:oe.default.func,scale:oe.default.number,className:nt.dontSetMe,style:nt.dontSetMe,transform:nt.dontSetMe}),ae(Le,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=T(ne),r=g(Pt),o=g(dt),a=vr,u=H,p=ye,f=ge,d=g(Ye),m=g(We);function g(x){return x&&x.__esModule?x:{default:x}}function T(x,b){if(typeof WeakMap=="function")var C=new WeakMap,S=new WeakMap;return(T=function(i,k){if(!k&&i&&i.__esModule)return i;var Q,ee,G={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return G;if(Q=k?S:C){if(Q.has(i))return Q.get(i);Q.set(i,G)}for(const J in i)J!=="default"&&{}.hasOwnProperty.call(i,J)&&((ee=(Q=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,J))&&(ee.get||ee.set)?Q(G,J,ee):G[J]=i[J]);return G})(x,b)}function A(){return A=Object.assign?Object.assign.bind():function(x){for(var b=1;b<arguments.length;b++){var C=arguments[b];for(var S in C)({}).hasOwnProperty.call(C,S)&&(x[S]=C[S])}return x},A.apply(null,arguments)}function Y(x,b,C){return(b=B(b))in x?Object.defineProperty(x,b,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[b]=C,x}function B(x){var b=X(x,"string");return typeof b=="symbol"?b:b+""}function X(x,b){if(typeof x!="object"||!x)return x;var C=x[Symbol.toPrimitive];if(C!==void 0){var S=C.call(x,b);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(x)}class _ extends t.Component{static getDerivedStateFromProps(b,C){let{position:S}=b,{prevPropsPosition:i}=C;return S&&(!i||S.x!==i.x||S.y!==i.y)?((0,m.default)("Draggable: getDerivedStateFromProps %j",{position:S,prevPropsPosition:i}),{x:S.x,y:S.y,prevPropsPosition:{...S}}):null}constructor(b){super(b),Y(this,"onDragStart",(C,S)=>{if((0,m.default)("Draggable: onDragStart: %j",S),this.props.onStart(C,(0,p.createDraggableData)(this,S))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Y(this,"onDrag",(C,S)=>{if(!this.state.dragging)return!1;(0,m.default)("Draggable: onDrag: %j",S);const i=(0,p.createDraggableData)(this,S),k={x:i.x,y:i.y,slackX:0,slackY:0};if(this.props.bounds){const{x:ee,y:G}=k;k.x+=this.state.slackX,k.y+=this.state.slackY;const[J,Se]=(0,p.getBoundPosition)(this,k.x,k.y);k.x=J,k.y=Se,k.slackX=this.state.slackX+(ee-k.x),k.slackY=this.state.slackY+(G-k.y),i.x=k.x,i.y=k.y,i.deltaX=k.x-this.state.x,i.deltaY=k.y-this.state.y}if(this.props.onDrag(C,i)===!1)return!1;this.setState(k)}),Y(this,"onDragStop",(C,S)=>{if(!this.state.dragging||this.props.onStop(C,(0,p.createDraggableData)(this,S))===!1)return!1;(0,m.default)("Draggable: onDragStop: %j",S);const k={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:ee,y:G}=this.props.position;k.x=ee,k.y=G}this.setState(k)}),this.state={dragging:!1,dragged:!1,x:b.position?b.position.x:b.defaultPosition.x,y:b.position?b.position.y:b.defaultPosition.y,prevPropsPosition:{...b.position},slackX:0,slackY:0,isElementSVG:!1},b.position&&!(b.onDrag||b.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var b,C;return((C=(b=this.props)==null?void 0:b.nodeRef)==null?void 0:C.current)??o.default.findDOMNode(this)}render(){const{axis:b,bounds:C,children:S,defaultPosition:i,defaultClassName:k,defaultClassNameDragging:Q,defaultClassNameDragged:ee,position:G,positionOffset:J,scale:Se,...Te}=this.props;let ie={},K=null;const te=!!!G||this.state.dragging,fe=G||i,be={x:(0,p.canDragX)(this)&&te?this.state.x:fe.x,y:(0,p.canDragY)(this)&&te?this.state.y:fe.y};this.state.isElementSVG?K=(0,u.createSVGTransform)(be,J):ie=(0,u.createCSSTransform)(be,J);const _e=(0,a.clsx)(S.props.className||"",k,{[Q]:this.state.dragging,[ee]:this.state.dragged});return t.createElement(d.default,A({},Te,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(S),{className:_e,style:{...S.props.style,...ie},transform:K}))}}e.default=_,Y(_,"displayName","Draggable"),Y(_,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe}),Y(_,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(vt);const{default:Yt,DraggableCore:Gr}=vt;Fe.exports=Yt,Fe.exports.default=Yt,Fe.exports.DraggableCore=Gr;var Jr=Fe.exports;const Kr=or(Jr),Zr=({title:e,collapsed:t=!1,draggable:r=!0,position:o={x:20,y:20},children:a})=>{const[u,p]=ne.useState(t);return c.jsx(Kr,{handle:".font-controls-header",disabled:!r,defaultPosition:o,bounds:"parent",children:c.jsxs("div",{className:"font-controls-panel",children:[c.jsxs("div",{className:"font-controls-header",children:[c.jsx("h3",{className:"font-controls-title",children:e}),c.jsx("button",{className:`font-controls-toggle ${u?"collapsed":""}`,onClick:()=>p(!u),type:"button","aria-label":u?"Expand":"Collapse",children:c.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),!u&&c.jsx("div",{className:"font-controls-content",children:a})]})})},Qr=({value:e,onChange:t,fontFamilies:r})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Font Family"}),c.jsx("select",{className:"font-control-input font-control-select",value:e,onChange:o=>t(o.target.value),style:{fontFamily:e},children:r.map(o=>c.jsx("option",{value:o,style:{fontFamily:o},children:o},o))})]}),en=({value:e,onChange:t,min:r,max:o,step:a})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Font Size"}),c.jsxs("div",{className:"font-control-slider-container",children:[c.jsx("input",{type:"range",className:"font-control-slider",min:r,max:o,step:a,value:e,onChange:u=>t(Number(u.target.value))}),c.jsx("input",{type:"number",className:"font-control-input font-control-number",min:r,max:o,step:a,value:e,onChange:u=>t(Number(u.target.value))})]})]}),tn=[{value:100,label:"Thin"},{value:200,label:"Extra Light"},{value:300,label:"Light"},{value:400,label:"Regular"},{value:500,label:"Medium"},{value:600,label:"Semi Bold"},{value:700,label:"Bold"},{value:800,label:"Extra Bold"},{value:900,label:"Black"}],rn=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Font Weight"}),c.jsx("select",{className:"font-control-input font-control-select",value:e,onChange:r=>t(Number(r.target.value)),children:tn.map(r=>c.jsxs("option",{value:r.value,children:[r.label," (",r.value,")"]},r.value))})]}),nn=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Line Height"}),c.jsxs("div",{className:"font-control-slider-container",children:[c.jsx("input",{type:"range",className:"font-control-slider",min:.5,max:3,step:.1,value:e,onChange:r=>t(Number(r.target.value))}),c.jsx("input",{type:"number",className:"font-control-input font-control-number",min:.5,max:3,step:.1,value:e,onChange:r=>t(Number(r.target.value))})]})]}),on=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Letter Spacing"}),c.jsxs("div",{className:"font-control-slider-container",children:[c.jsx("input",{type:"range",className:"font-control-slider",min:-5,max:10,step:.1,value:e,onChange:r=>t(Number(r.target.value))}),c.jsx("input",{type:"number",className:"font-control-input font-control-number",min:-5,max:10,step:.1,value:e,onChange:r=>t(Number(r.target.value))})]})]}),an=[{value:"none",label:"None"},{value:"uppercase",label:"UPPERCASE"},{value:"lowercase",label:"lowercase"},{value:"capitalize",label:"Capitalize"}],sn=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Text Transform"}),c.jsx("select",{className:"font-control-input font-control-select",value:e,onChange:r=>t(r.target.value),children:an.map(r=>c.jsx("option",{value:r.value,children:r.label},r.value))})]}),ln=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Text Color"}),c.jsxs("div",{className:"font-control-color-input",children:[c.jsx("div",{className:"font-control-color-preview",children:c.jsx("input",{type:"color",value:e,onChange:r=>t(r.target.value)})}),c.jsx("input",{type:"text",className:"font-control-input font-control-text-input",value:e,onChange:r=>t(r.target.value),placeholder:"#000000"})]})]}),un=[{value:"left",icon:"⬅"},{value:"center",icon:"↔"},{value:"right",icon:"➡"},{value:"justify",icon:"⬌"}],cn=({value:e,onChange:t})=>c.jsxs("div",{className:"font-control-group",children:[c.jsx("label",{className:"font-control-label",children:"Text Align"}),c.jsx("div",{className:"font-control-button-group",children:un.map(r=>c.jsx("button",{className:`font-control-button ${e===r.value?"active":""}`,onClick:()=>t(r.value),type:"button",children:r.icon},r.value))})]}),at=({title:e,code:t,language:r="css"})=>{const[o,a]=ne.useState(!1),u=async()=>{try{await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),2e3)}catch(p){console.error("Failed to copy:",p)}};return c.jsxs("div",{className:"font-control-code-block",children:[c.jsxs("div",{className:"font-control-code-header",children:[c.jsx("span",{className:"font-control-code-title",children:e}),c.jsx("button",{className:"font-control-copy-button",onClick:u,type:"button",children:o?c.jsxs(c.Fragment,{children:[c.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})}),"Copied!"]}):c.jsxs(c.Fragment,{children:[c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),c.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]}),c.jsx("pre",{className:"font-control-code-content",children:c.jsx("code",{className:`language-${r}`,children:t})})]})},Wt=new Set;function Lt(e){if(Wt.has(e))return;const t=document.createElement("link");t.rel="stylesheet",t.href=`https://fonts.googleapis.com/css2?family=${e.replace(/ /g,"+")}:wght@100;200;300;400;500;600;700;800;900&display=swap`,document.head.appendChild(t),Wt.add(e)}function Ut(e){if(!document.querySelector('link[href*="fonts.googleapis.com"]')){const t=document.createElement("link");t.rel="preconnect",t.href="https://fonts.googleapis.com";const r=document.createElement("link");r.rel="preconnect",r.href="https://fonts.gstatic.com",r.crossOrigin="anonymous",document.head.appendChild(t),document.head.appendChild(r)}e.forEach(Lt)}function fn(e){return["Arial","Helvetica","Times New Roman","Georgia","Verdana"].includes(e)?`<!-- ${e} is a system font, no import needed -->`:`<!-- Add this to your HTML <head> -->
52
+ <link rel="preconnect" href="https://fonts.googleapis.com">
53
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
54
+ <link href="${`https://fonts.googleapis.com/css2?family=${e.replace(/ /g,"+")}:wght@100;200;300;400;500;600;700;800;900&display=swap`}" rel="stylesheet">`}function dn(e){return`<h1 style={{
55
+ fontFamily: '${e.fontFamily}',
56
+ fontSize: '${e.fontSize}px',
57
+ fontWeight: ${e.fontWeight},
58
+ lineHeight: ${e.lineHeight},
59
+ letterSpacing: '${e.letterSpacing}px',
60
+ textTransform: '${e.textTransform}',
61
+ color: '${e.color}',
62
+ textAlign: '${e.textAlign}'
63
+ }}>
64
+ Your Text Here
65
+ </h1>`}function pn(e){return`.my-text {
66
+ font-family: '${e.fontFamily}', sans-serif;
67
+ font-size: ${e.fontSize}px;
68
+ font-weight: ${e.fontWeight};
69
+ line-height: ${e.lineHeight};
70
+ letter-spacing: ${e.letterSpacing}px;
71
+ text-transform: ${e.textTransform};
72
+ color: ${e.color};
73
+ text-align: ${e.textAlign};
74
+ }`}const hn=["Inter","Roboto","Open Sans","Lato","Montserrat","Poppins","Raleway","Work Sans","Nunito","Source Sans Pro","DM Sans","Playfair Display","Merriweather","Lora","Crimson Text","EB Garamond","Fira Code","JetBrains Mono","Inconsolata","Source Code Pro","Bebas Neue","Oswald","Righteous","Permanent Marker","Pacifico"],it={fontFamily:"Arial",fontSize:16,fontWeight:400,lineHeight:1.5,letterSpacing:0,textTransform:"none",color:"#000000",textAlign:"left"},vn=({value:e,onChange:t,fontFamilies:r=hn,minFontSize:o=8,maxFontSize:a=120,fontSizeStep:u=1,title:p="Font Controls",collapsed:f=!1,draggable:d=!0,position:m})=>{const[g,T]=ne.useState({...it,...e}),[A,Y]=ne.useState(!1);ne.useEffect(()=>{e&&T(_=>({..._,...e}))},[e]),ne.useEffect(()=>{Ut(r)},[r]);const B=(_,x)=>{const b={...g,[_]:x};T(b),t==null||t(b)},X=()=>{T(it),t==null||t(it)};return c.jsxs(Zr,{title:p,collapsed:f,draggable:d,position:m,children:[c.jsx(Qr,{value:g.fontFamily,onChange:_=>B("fontFamily",_),fontFamilies:r}),c.jsx(en,{value:g.fontSize,onChange:_=>B("fontSize",_),min:o,max:a,step:u}),c.jsx(rn,{value:g.fontWeight,onChange:_=>B("fontWeight",_)}),c.jsx(nn,{value:g.lineHeight,onChange:_=>B("lineHeight",_)}),c.jsx(on,{value:g.letterSpacing,onChange:_=>B("letterSpacing",_)}),c.jsx(sn,{value:g.textTransform,onChange:_=>B("textTransform",_)}),c.jsx(ln,{value:g.color,onChange:_=>B("color",_)}),c.jsx(cn,{value:g.textAlign,onChange:_=>B("textAlign",_)}),c.jsxs("button",{className:"font-control-reset-button",onClick:X,type:"button",children:[c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"1 4 1 10 7 10"}),c.jsx("polyline",{points:"23 20 23 14 17 14"}),c.jsx("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})]}),"Reset to Default"]}),c.jsxs("div",{className:"font-control-export-section",children:[c.jsxs("button",{className:"font-control-export-toggle",onClick:()=>Y(!A),type:"button",children:[c.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:A?"rotated":"",children:c.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Export Configuration"]}),A&&c.jsxs("div",{className:"font-control-export-content",children:[c.jsx(at,{title:"1. Google Fonts Import (HTML)",code:fn(g.fontFamily),language:"html"}),c.jsx(at,{title:"2. React/JSX Inline Styles",code:dn(g),language:"tsx"}),c.jsx(at,{title:"3. CSS Class",code:pn(g),language:"css"})]})]})]})},Xt={fontFamily:"Arial",fontSize:16,fontWeight:400,lineHeight:1.5,letterSpacing:0,textTransform:"none",color:"#000000",textAlign:"left"},gn=e=>{const[t,r]=ne.useState({...Xt,...e});return{config:t,setConfig:r,updateConfig:(u,p)=>{r(f=>({...f,[u]:p}))},resetConfig:()=>{r({...Xt,...e})}}};he.FontControls=vn,he.loadAllDefaultFonts=Ut,he.loadGoogleFont=Lt,he.useFontControls=gn,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,97 @@
1
+ import { default as default_2 } from 'react';
2
+ import { Dispatch } from 'react';
3
+ import { SetStateAction } from 'react';
4
+
5
+ export declare type ControlChangeHandler<T> = (value: T) => void;
6
+
7
+ export declare interface FontConfig {
8
+ fontFamily: string;
9
+ fontSize: number;
10
+ fontWeight: number;
11
+ lineHeight: number;
12
+ letterSpacing: number;
13
+ textTransform: "none" | "uppercase" | "lowercase" | "capitalize";
14
+ color: string;
15
+ textAlign: "left" | "center" | "right" | "justify";
16
+ }
17
+
18
+ export declare const FontControls: default_2.FC<FontControlsProps>;
19
+
20
+ export declare interface FontControlsProps {
21
+ /**
22
+ * Initial font configuration
23
+ */
24
+ value?: Partial<FontConfig>;
25
+ /**
26
+ * Callback fired when any font property changes
27
+ */
28
+ onChange?: (config: FontConfig) => void;
29
+ /**
30
+ * Custom list of font families to display
31
+ * @default ['Arial', 'Helvetica', 'Times New Roman', 'Georgia', 'Courier New', 'Verdana']
32
+ */
33
+ fontFamilies?: string[];
34
+ /**
35
+ * Minimum font size
36
+ * @default 8
37
+ */
38
+ minFontSize?: number;
39
+ /**
40
+ * Maximum font size
41
+ * @default 120
42
+ */
43
+ maxFontSize?: number;
44
+ /**
45
+ * Font size step
46
+ * @default 1
47
+ */
48
+ fontSizeStep?: number;
49
+ /**
50
+ * Panel title
51
+ * @default 'Font Controls'
52
+ */
53
+ title?: string;
54
+ /**
55
+ * Initial collapsed state
56
+ * @default false
57
+ */
58
+ collapsed?: boolean;
59
+ /**
60
+ * Enable drag to reposition
61
+ * @default true
62
+ */
63
+ draggable?: boolean;
64
+ /**
65
+ * Initial position (for draggable mode)
66
+ */
67
+ position?: {
68
+ x: number;
69
+ y: number;
70
+ };
71
+ }
72
+
73
+ /**
74
+ * Load all default Google Fonts used by the font controls
75
+ * @param fontFamilies - Array of font family names to load
76
+ */
77
+ export declare function loadAllDefaultFonts(fontFamilies: string[]): void;
78
+
79
+ /**
80
+ * Load a single Google Font dynamically
81
+ * @param fontFamily - The font family name (e.g., "Inter", "Roboto")
82
+ */
83
+ export declare function loadGoogleFont(fontFamily: string): void;
84
+
85
+ /**
86
+ * Custom hook for managing font configuration state
87
+ * @param initialConfig - Initial font configuration
88
+ * @returns Tuple of [config, setConfig, resetConfig]
89
+ */
90
+ export declare const useFontControls: (initialConfig?: Partial<FontConfig>) => {
91
+ config: FontConfig;
92
+ setConfig: Dispatch<SetStateAction<FontConfig>>;
93
+ updateConfig: <K extends keyof FontConfig>(key: K, value: FontConfig[K]) => void;
94
+ resetConfig: () => void;
95
+ };
96
+
97
+ export { }
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ :root{--fc-bg: rgba(255, 255, 255, .95);--fc-bg-hover: rgba(255, 255, 255, .98);--fc-border: rgba(0, 0, 0, .1);--fc-text: #1a1a1a;--fc-text-secondary: #666;--fc-accent: #3b82f6;--fc-accent-hover: #2563eb;--fc-input-bg: rgba(0, 0, 0, .03);--fc-input-border: rgba(0, 0, 0, .1);--fc-shadow: 0 8px 32px rgba(0, 0, 0, .1);--fc-shadow-lg: 0 20px 60px rgba(0, 0, 0, .15)}@media (prefers-color-scheme: dark){:root{--fc-bg: rgba(30, 30, 30, .95);--fc-bg-hover: rgba(40, 40, 40, .98);--fc-border: rgba(255, 255, 255, .1);--fc-text: #e5e5e5;--fc-text-secondary: #a0a0a0;--fc-accent: #60a5fa;--fc-accent-hover: #3b82f6;--fc-input-bg: rgba(255, 255, 255, .05);--fc-input-border: rgba(255, 255, 255, .1);--fc-shadow: 0 8px 32px rgba(0, 0, 0, .3);--fc-shadow-lg: 0 20px 60px rgba(0, 0, 0, .4)}}*{box-sizing:border-box;margin:0;padding:0}.font-controls-panel{position:fixed;top:0;left:0;width:320px;background:var(--fc-bg);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--fc-border);border-radius:12px;box-shadow:var(--fc-shadow);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;color:var(--fc-text);z-index:9999;-webkit-user-select:none;user-select:none}.font-controls-header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--fc-border);cursor:grab;transition:background .2s ease}.font-controls-header:active{cursor:grabbing}.font-controls-header:hover{background:var(--fc-input-bg)}.font-controls-title{font-weight:600;font-size:15px;margin:0;display:flex;align-items:center;gap:8px}.font-controls-toggle{background:none;border:none;color:var(--fc-text-secondary);cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .2s ease;border-radius:4px}.font-controls-toggle:hover{background:var(--fc-input-bg);color:var(--fc-text)}.font-controls-toggle svg{width:16px;height:16px;transition:transform .3s cubic-bezier(.4,0,.2,1)}.font-controls-toggle.collapsed svg{transform:rotate(-90deg)}.font-controls-content{padding:16px;display:flex;flex-direction:column;gap:16px;max-height:600px;overflow-y:auto;overflow-x:hidden}.font-controls-content::-webkit-scrollbar{width:6px}.font-controls-content::-webkit-scrollbar-track{background:transparent}.font-controls-content::-webkit-scrollbar-thumb{background:var(--fc-border);border-radius:3px}.font-controls-content::-webkit-scrollbar-thumb:hover{background:var(--fc-text-secondary)}.font-control-group{display:flex;flex-direction:column;gap:8px}.font-control-label{font-size:12px;font-weight:500;color:var(--fc-text-secondary);text-transform:uppercase;letter-spacing:.5px}.font-control-input{width:100%;padding:8px 12px;background:var(--fc-input-bg);border:1px solid var(--fc-input-border);border-radius:6px;color:var(--fc-text);font-size:14px;transition:all .2s ease;outline:none;font-family:inherit}.font-control-input:hover{background:var(--fc-bg-hover);border-color:var(--fc-accent)}.font-control-input:focus{border-color:var(--fc-accent);box-shadow:0 0 0 3px #3b82f61a}.font-control-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px;cursor:pointer}.font-control-slider-container{display:flex;gap:12px;align-items:center}.font-control-slider{flex:1;height:6px;background:var(--fc-input-bg);border-radius:3px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.font-control-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;background:var(--fc-accent);border-radius:50%;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000001a}.font-control-slider::-webkit-slider-thumb:hover{background:var(--fc-accent-hover);transform:scale(1.1)}.font-control-slider::-moz-range-thumb{width:16px;height:16px;background:var(--fc-accent);border-radius:50%;cursor:pointer;border:none;transition:all .2s ease;box-shadow:0 2px 4px #0000001a}.font-control-slider::-moz-range-thumb:hover{background:var(--fc-accent-hover);transform:scale(1.1)}.font-control-number{width:70px;text-align:center;padding:6px 8px}.font-control-color-input{display:flex;gap:8px;align-items:center}.font-control-color-preview{width:40px;height:40px;border-radius:6px;border:1px solid var(--fc-input-border);cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.font-control-color-preview:hover{transform:scale(1.05);border-color:var(--fc-accent)}.font-control-color-preview input[type=color]{position:absolute;width:200%;height:200%;top:-50%;left:-50%;border:none;cursor:pointer}.font-control-text-input{flex:1}.font-control-button-group{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.font-control-button{padding:8px;background:var(--fc-input-bg);border:1px solid var(--fc-input-border);border-radius:6px;color:var(--fc-text);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;font-size:14px}.font-control-button:hover{background:var(--fc-bg-hover);border-color:var(--fc-accent)}.font-control-button.active{background:var(--fc-accent);border-color:var(--fc-accent);color:#fff}.font-control-button svg{width:16px;height:16px}.font-control-reset-button{width:100%;padding:10px 16px;background:var(--fc-input-bg);border:1px solid var(--fc-input-border);border-radius:6px;color:var(--fc-text);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:500;font-family:inherit;margin-top:8px}.font-control-reset-button:hover{background:var(--fc-accent);border-color:var(--fc-accent);color:#fff;transform:translateY(-1px);box-shadow:0 4px 12px #3b82f633}.font-control-reset-button:active{transform:translateY(0)}.font-control-reset-button svg{width:16px;height:16px}.font-control-export-section{margin-top:16px;border-top:1px solid var(--fc-border);padding-top:16px}.font-control-export-toggle{width:100%;padding:10px 16px;background:var(--fc-input-bg);border:1px solid var(--fc-input-border);border-radius:6px;color:var(--fc-text);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:500;font-family:inherit}.font-control-export-toggle:hover{background:var(--fc-bg-hover);border-color:var(--fc-accent)}.font-control-export-toggle svg{width:14px;height:14px;transition:transform .3s ease}.font-control-export-toggle svg.rotated{transform:rotate(90deg)}.font-control-export-content{margin-top:12px;display:flex;flex-direction:column;gap:12px}.font-control-code-block{background:var(--fc-input-bg);border:1px solid var(--fc-input-border);border-radius:6px;overflow:hidden}.font-control-code-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#00000008;border-bottom:1px solid var(--fc-border)}@media (prefers-color-scheme: dark){.font-control-code-header{background:#ffffff08}}.font-control-code-title{font-size:11px;font-weight:600;color:var(--fc-text-secondary);text-transform:uppercase;letter-spacing:.5px}.font-control-copy-button{background:transparent;border:none;color:var(--fc-text-secondary);cursor:pointer;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:500;display:flex;align-items:center;gap:4px;transition:all .2s ease;font-family:inherit}.font-control-copy-button:hover{background:var(--fc-input-bg);color:var(--fc-accent)}.font-control-copy-button svg{width:12px;height:12px}.font-control-code-content{margin:0;padding:12px;overflow-x:auto;font-family:Fira Code,Consolas,Monaco,monospace;font-size:11px;line-height:1.6;color:var(--fc-text)}.font-control-code-content::-webkit-scrollbar{height:6px}.font-control-code-content::-webkit-scrollbar-track{background:transparent}.font-control-code-content::-webkit-scrollbar-thumb{background:var(--fc-border);border-radius:3px}.font-control-code-content code{font-family:inherit}@keyframes slideDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:600px}}@keyframes slideUp{0%{opacity:1;max-height:600px}to{opacity:0;max-height:0}}.font-controls-content.entering{animation:slideDown .3s cubic-bezier(.4,0,.2,1) forwards}.font-controls-content.exiting{animation:slideUp .3s cubic-bezier(.4,0,.2,1) forwards}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "font-controls",
3
+ "version": "1.0.0",
4
+ "description": "A beautiful, Leva-inspired font controls library for React",
5
+ "type": "module",
6
+ "main": "./dist/font-controls.umd.cjs",
7
+ "module": "./dist/font-controls.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/font-controls.js",
12
+ "require": "./dist/font-controls.umd.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./dist/style.css": "./dist/style.css"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "dev": "vite demo",
22
+ "build": "tsc && vite build",
23
+ "preview": "vite preview demo",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "keywords": [
27
+ "react",
28
+ "font",
29
+ "typography",
30
+ "controls",
31
+ "gui",
32
+ "leva",
33
+ "font-picker",
34
+ "design-tools"
35
+ ],
36
+ "author": "",
37
+ "license": "MIT",
38
+ "peerDependencies": {
39
+ "react": "^18.0.0",
40
+ "react-dom": "^18.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^25.0.9",
44
+ "@types/react": "^18.2.48",
45
+ "@types/react-dom": "^18.2.18",
46
+ "@vitejs/plugin-react": "^4.2.1",
47
+ "react": "^18.2.0",
48
+ "react-dom": "^18.2.0",
49
+ "typescript": "^5.3.3",
50
+ "vite": "^5.0.11",
51
+ "vite-plugin-dts": "^3.7.0"
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "https://github.com/yourusername/font-controls"
56
+ },
57
+ "dependencies": {
58
+ "react-draggable": "^4.5.0"
59
+ }
60
+ }