From 3385d2e3e99e54b162630d1f0e8be7dded6b789e Mon Sep 17 00:00:00 2001 From: mush42 Date: Sun, 28 Apr 2024 23:03:44 +0200 Subject: [PATCH] Update documentation --- .nojekyll | 0 assets/{index-3475f2a8.css => index-24636c18.css} | 2 +- assets/{index-4172fec0.js => index-c53336b9.js} | 2 +- index.html | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .nojekyll rename assets/{index-3475f2a8.css => index-24636c18.css} (61%) rename assets/{index-4172fec0.js => index-c53336b9.js} (72%) diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/index-3475f2a8.css b/assets/index-24636c18.css similarity index 61% rename from assets/index-3475f2a8.css rename to assets/index-24636c18.css index ae685c9..9d8d83c 100755 --- a/assets/index-3475f2a8.css +++ b/assets/index-24636c18.css @@ -1 +1 @@ -:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#222;background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;display:flex;align-items:center;min-height:100vh}#app{max-width:1280px;margin:0 auto;text-align:center}img{margin-bottom:1.5rem}img:hover{filter:drop-shadow(0 0 2em #673ab8aa)}section{margin-top:5rem;display:grid;grid-template-columns:repeat(3,1fr);column-gap:1.5rem}.resource{padding:.75rem 1.5rem;border-radius:.5rem;text-align:left;text-decoration:none;color:#222;background-color:#f1f1f1;border:1px solid transparent}.resource:hover{border:1px solid #000;box-shadow:0 25px 50px -12px #673ab888}@media (max-width: 639px){#app{margin:2rem}section{margin-top:5rem;grid-template-columns:1fr;row-gap:1rem}}@media (prefers-color-scheme: dark){:root{color:#ccc;background-color:#1a1a1a}.resource{color:#ccc;background-color:#161616}.resource:hover{border:1px solid #bbb}} +:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#222;background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;display:flex;align-items:center;min-height:100vh}#app{max-width:1280px;margin:0 auto;text-align:center}img{margin-bottom:1.5rem}img:hover{filter:drop-shadow(0 0 2em #673ab8aa)}section{margin-top:5rem;display:grid;grid-template-columns:repeat(3,1fr);column-gap:1.5rem}.resource{padding:.75rem 1.5rem;border-radius:.5rem;text-align:left;text-decoration:none;color:#222;background-color:#f1f1f1;border:1px solid transparent}.interactive{margin-top:3rem;grid-template-columns:1fr;row-gap:1rem}.resource:hover{border:1px solid #000;box-shadow:0 25px 50px -12px #673ab888}@media (max-width: 639px){#app{margin:2rem}section{margin-top:5rem;grid-template-columns:1fr;row-gap:1rem}}@media (prefers-color-scheme: dark){:root{color:#ccc;background-color:#1a1a1a}.resource{color:#ccc;background-color:#161616}.resource:hover{border:1px solid #bbb}} diff --git a/assets/index-4172fec0.js b/assets/index-c53336b9.js similarity index 72% rename from assets/index-4172fec0.js rename to assets/index-c53336b9.js index 4663898..60d2b5d 100755 --- a/assets/index-4172fec0.js +++ b/assets/index-c53336b9.js @@ -1 +1 @@ -var Y_=(Y,N)=>()=>(N||Y((N={exports:{}}).exports,N),N.exports);var Z_=Y_((_n,he)=>{(async()=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))n(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function _(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(t){if(t.ep)return;t.ep=!0;const r=_(t);fetch(t.href,r)}})();const Y="/libtashkeel/assets/libtashkeel_wasm_bg-cb1b0f80.wasm",N=async(e={},_)=>{let n;if(_.startsWith("data:")){const t=_.replace(/^data:.*?base64,/,"");let r;if(typeof Buffer=="function"&&typeof Buffer.from=="function")r=Buffer.from(t,"base64");else if(typeof atob=="function"){const o=atob(t);r=new Uint8Array(o.length);for(let l=0;l"u"?(0,he.require)("util").TextDecoder:TextDecoder;let ye=new $e("utf-8",{ignoreBOM:!0,fatal:!0});ye.decode();let j=null;function W(){return(j===null||j.byteLength===0)&&(j=new Uint8Array(x.memory.buffer)),j}function Z(e,_){return e=e>>>0,ye.decode(W().subarray(e,e+_))}let F=0;const Ge=typeof TextEncoder>"u"?(0,he.require)("util").TextEncoder:TextEncoder;let M=new Ge("utf-8");const Je=typeof M.encodeInto=="function"?function(e,_){return M.encodeInto(e,_)}:function(e,_){const n=M.encode(e);return _.set(n),{read:e.length,written:n.length}};function ve(e,_,n){if(n===void 0){const c=M.encode(e),s=_(c.length,1)>>>0;return W().subarray(s,s+c.length).set(c),F=c.length,s}let t=e.length,r=_(t,1)>>>0;const o=W();let l=0;for(;l127)break;o[r+l]=c}if(l!==t){l!==0&&(e=e.slice(l)),r=n(r,t,t=l+e.length*3,1)>>>0;const c=W().subarray(r+l,r+t),s=Je(e,c);l+=s.written,r=n(r,t,l,1)>>>0}return F=l,r}function ee(e){return e==null}let z=null;function B(){return(z===null||z.byteLength===0)&&(z=new Int32Array(x.memory.buffer)),z}function Ke(e,_,n){let t,r;try{const c=x.__wbindgen_add_to_stack_pointer(-16),s=ve(e,x.__wbindgen_malloc,x.__wbindgen_realloc),u=F;x.do_tashkeel(c,s,u,!ee(_),ee(_)?0:_,ee(n)?16777215:n?1:0);var o=B()[c/4+0],l=B()[c/4+1];return t=o,r=l,Z(o,l)}finally{x.__wbindgen_add_to_stack_pointer(16),x.__wbindgen_free(t,r,1)}}function Qe(e){U===P.length&&P.push(P.length+1);const _=U;return U=P[_],P[_]=e,_}function Xe(){const e=new Error;return Qe(e)}function Ye(e,_){const n=me(_).stack,t=ve(n,x.__wbindgen_malloc,x.__wbindgen_realloc),r=F;B()[e/4+1]=r,B()[e/4+0]=t}function Ze(e,_){let n,t;try{n=e,t=_,console.error(Z(e,_))}finally{x.__wbindgen_free(n,t,1)}}function e_(e){Ve(e)}function __(){return Date.now()}function n_(e,_){throw new Error(Z(e,_))}URL=globalThis.URL;const d=await N({"./libtashkeel_wasm_bg.js":{__wbg_new_abda76e883ba8a5f:Xe,__wbg_stack_658279fe44541cf6:Ye,__wbg_error_f851667af71bcfc6:Ze,__wbindgen_object_drop_ref:e_,__wbg_now_3014639a94423537:__,__wbindgen_throw:n_}},Y),t_=d.memory,r_=d._initialize,o_=d.do_tashkeel,i_=d.strftime_l,l_=d._tzset_js,c_=d._mktime_js,u_=d._localtime_js,s_=d._gmtime_js,a_=d.__libc_malloc,f_=d.__libc_calloc,d_=d.__libc_free,p_=d.posix_memalign,h_=d.realloc,m_=d.abort,y_=d.__wasi_environ_sizes_get,v_=d.__wasi_environ_get,g_=d.__wasi_fd_seek,b_=d.__wasi_fd_read,w_=d.__wasi_fd_close,k_=d.emscripten_memcpy_js,x_=d.emscripten_get_heap_max,E_=d.emscripten_date_now,S_=d._emscripten_get_now_is_monotonic,P_=d.emscripten_builtin_malloc,C_=d.__cxa_throw,T_=d.emscripten_errn,A_=d.malloc,H_=d.emscripten_get_now,N_=d.__wasi_fd_write,U_=d.free,L_=d.__wbindgen_add_to_stack_pointer,D_=d.__wbindgen_malloc,j_=d.__wbindgen_realloc,W_=d.__wbindgen_free,F_=Object.freeze(Object.defineProperty({__proto__:null,__cxa_throw:C_,__libc_calloc:f_,__libc_free:d_,__libc_malloc:a_,__wasi_environ_get:v_,__wasi_environ_sizes_get:y_,__wasi_fd_close:w_,__wasi_fd_read:b_,__wasi_fd_seek:g_,__wasi_fd_write:N_,__wbindgen_add_to_stack_pointer:L_,__wbindgen_free:W_,__wbindgen_malloc:D_,__wbindgen_realloc:j_,_emscripten_get_now_is_monotonic:S_,_gmtime_js:s_,_initialize:r_,_localtime_js:u_,_mktime_js:c_,_tzset_js:l_,abort:m_,do_tashkeel:o_,emscripten_builtin_malloc:P_,emscripten_date_now:E_,emscripten_errn:T_,emscripten_get_heap_max:x_,emscripten_get_now:H_,emscripten_memcpy_js:k_,free:U_,malloc:A_,memory:t_,posix_memalign:p_,realloc:h_,strftime_l:i_},Symbol.toStringTag,{value:"Module"}));Re(F_);var I,h,ge,A,be,we,_e,ne,te,re,L={},ke=[],M_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oe=Array.isArray;function C(e,_){for(var n in _)e[n]=_[n];return e}function xe(e){var _=e.parentNode;_&&_.removeChild(e)}function z_(e,_,n){var t,r,o,l={};for(o in _)o=="key"?t=_[o]:o=="ref"?r=_[o]:l[o]=_[o];if(arguments.length>2&&(l.children=arguments.length>3?I.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)l[o]===void 0&&(l[o]=e.defaultProps[o]);return O(e,l,t,r,null)}function O(e,_,n,t,r){var o={type:e,props:_,key:n,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++ge,__i:-1,__u:0};return r==null&&h.vnode!=null&&h.vnode(o),o}function R(e){return e.children}function q(e,_){this.props=e,this.context=_}function H(e,_){if(_==null)return e.__?H(e.__,e.__i+1):null;for(var n;__&&A.sort(_e));V.__r=0}function Pe(e,_,n,t,r,o,l,c,s,u,f){var i,p,a,g,S,b=t&&t.__k||ke,m=_.length;for(n.__d=s,B_(n,_,b),s=n.__d,i=0;i0?O(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,c=I_(r,n,l,f),r.__i=c,o=null,c!==-1&&(f--,(o=n[c])&&(o.__u|=131072)),o==null||o.__v===null?(c==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):c!==l&&(c===l+1?i++:c>l?f>s-l?i+=c-l:i--:c(s!=null&&!(131072&s.__u)?1:0))for(;l>=0||c<_.length;){if(l>=0){if((s=_[l])&&!(131072&s.__u)&&r==s.key&&o===s.type)return l;l--}if(c<_.length){if((s=_[c])&&!(131072&s.__u)&&r==s.key&&o===s.type)return c;c++}}return-1}function Te(e,_,n){_[0]==="-"?e.setProperty(_,n??""):e[_]=n==null?"":typeof n!="number"||M_.test(_)?n:n+"px"}function $(e,_,n,t,r){var o;e:if(_==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof t=="string"&&(e.style.cssText=t=""),t)for(_ in t)n&&_ in n||Te(e.style,_,"");if(n)for(_ in n)t&&n[_]===t[_]||Te(e.style,_,n[_])}else if(_[0]==="o"&&_[1]==="n")o=_!==(_=_.replace(/(PointerCapture)$|Capture$/i,"$1")),_=_.toLowerCase()in e||_==="onFocusOut"||_==="onFocusIn"?_.toLowerCase().slice(2):_.slice(2),e.l||(e.l={}),e.l[_+o]=n,n?t?n.u=t.u:(n.u=ne,e.addEventListener(_,o?re:te,o)):e.removeEventListener(_,o?re:te,o);else{if(r)_=_.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(_!="width"&&_!="height"&&_!="href"&&_!="list"&&_!="form"&&_!="tabIndex"&&_!="download"&&_!="rowSpan"&&_!="colSpan"&&_!="role"&&_ in e)try{e[_]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&_[4]!=="-"?e.removeAttribute(_):e.setAttribute(_,n))}}function Ae(e){return function(_){if(this.l){var n=this.l[_.type+e];if(_.t==null)_.t=ne++;else if(_.t=n.__.length&&n.__.push({__V:G}),n.__[e]}function ze(e){return ae=1,$_(Ie,e)}function $_(e,_,n){var t=V_(ue++,2);if(t.t=e,!t.__c&&(t.__=[n?n(_):Ie(void 0,_),function(c){var s=t.__N?t.__N[0]:t.__[0],u=t.t(s,c);s!==u&&(t.__N=[u,t.__[1]],t.__c.setState({}))}],t.__c=y,!y.u)){var r=function(c,s,u){if(!t.__c.__H)return!0;var f=t.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,c,s,u);var i=!1;return f.forEach(function(p){if(p.__N){var a=p.__[0];p.__=p.__N,p.__N=void 0,a!==p.__[0]&&(i=!0)}}),!(!i&&t.__c.props===c)&&(!o||o.call(this,c,s,u))};y.u=!0;var o=y.shouldComponentUpdate,l=y.componentWillUpdate;y.componentWillUpdate=function(c,s,u){if(this.__e){var f=o;o=void 0,r(c,s,u),o=f}l&&l.call(this,c,s,u)},y.shouldComponentUpdate=r}return t.__N||t.__}function G_(){for(var e;e=Ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(J),e.__H.__h.forEach(fe),e.__H.__h=[]}catch(_){e.__H.__h=[],v.__e(_,e.__v)}}v.__b=function(e){y=null,Le&&Le(e)},v.__=function(e,_){e&&_.__k&&_.__k.__m&&(e.__m=_.__k.__m),Me&&Me(e,_)},v.__r=function(e){De&&De(e),ue=0;var _=(y=e.__c).__H;_&&(se===y?(_.__h=[],y.__h=[],_.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=G,n.__N=n.i=void 0})):(_.__h.forEach(J),_.__h.forEach(fe),_.__h=[],ue=0)),se=y},v.diffed=function(e){je&&je(e);var _=e.__c;_&&_.__H&&(_.__H.__h.length&&(Ue.push(_)!==1&&Ne===v.requestAnimationFrame||((Ne=v.requestAnimationFrame)||J_)(G_)),_.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==G&&(n.__=n.__V),n.i=void 0,n.__V=G})),se=y=null},v.__c=function(e,_){_.some(function(n){try{n.__h.forEach(J),n.__h=n.__h.filter(function(t){return!t.__||fe(t)})}catch(t){_.some(function(r){r.__h&&(r.__h=[])}),_=[],v.__e(t,n.__v)}}),We&&We(e,_)},v.unmount=function(e){Fe&&Fe(e);var _,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{J(t)}catch(r){_=r}}),n.__H=void 0,_&&v.__e(_,n.__v))};var Be=typeof requestAnimationFrame=="function";function J_(e){var _,n=function(){clearTimeout(t),Be&&cancelAnimationFrame(_),setTimeout(e)},t=setTimeout(n,100);Be&&(_=requestAnimationFrame(n))}function J(e){var _=y,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),y=_}function fe(e){var _=y;e.__c=e.__(),y=_}function Ie(e,_){return typeof _=="function"?_(e):_}const K_="/libtashkeel/assets/logo-110110d0.jpeg";var Q_=0;function k(e,_,n,t,r,o){var l,c,s={};for(c in _)c=="ref"?l=_[c]:s[c]=_[c];var u={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Q_,__i:-1,__u:0,__source:r,__self:o};if(typeof e=="function"&&(l=e.defaultProps))for(c in l)s[c]===void 0&&(s[c]=l[c]);return h.vnode&&h.vnode(u),u}function X_(){const[e,_]=ze(""),[n,t]=ze(""),r=()=>{const o=Ke(e);t(o),document.getElementById("output").focus()};return k("div",{children:[k("a",{href:"https://github.com/mush42/libtashkeel",target:"_blank",children:k("img",{src:K_,alt:"A generated image of an Arabian coffee pot",height:"100",width:"100",style:"border-radius: 50%;"})}),k("h3",{children:"Libtashkeel: Diacritize Arabic Text "}),k("section",{children:[k(de,{title:"GitHub",description:"Main repository",href:"https://github.com/mush42/libtashkeel"}),k(de,{title:"Libtashkeel Crate",description:"use from Rust",href:"https://crates.io/crates/libtashkeel_base"}),k(de,{title:"npm Package",description:"Use from JavaScript",href:"https://www.npmjs.com/package/libtashkeel-wasm"})]}),k("textarea",{value:e,onChange:o=>_(o.target.value),style:{direction:"rtl"},rows:5,placeholder:"Enter text to diacritize..."}),k("button",{onClick:r,children:"Diacritize"}),k("textarea",{id:"output",value:n,style:{direction:"rtl"},rows:5,placeholder:"Diacritized text...",readOnly:!0})]})}function de(e){return k("a",{href:e.href,target:"_blank",class:"resource",children:[k("h2",{children:e.title}),k("p",{children:e.description})]})}q_(k(X_,{}),document.getElementById("app"))})()});export default Z_(); +var Y_=(Y,N)=>()=>(N||Y((N={exports:{}}).exports,N),N.exports);var Z_=Y_((_n,he)=>{(async()=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))n(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function _(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(t){if(t.ep)return;t.ep=!0;const r=_(t);fetch(t.href,r)}})();const Y="/libtashkeel/assets/libtashkeel_wasm_bg-cb1b0f80.wasm",N=async(e={},_)=>{let n;if(_.startsWith("data:")){const t=_.replace(/^data:.*?base64,/,"");let r;if(typeof Buffer=="function"&&typeof Buffer.from=="function")r=Buffer.from(t,"base64");else if(typeof atob=="function"){const o=atob(t);r=new Uint8Array(o.length);for(let l=0;l"u"?(0,he.require)("util").TextDecoder:TextDecoder;let ve=new $e("utf-8",{ignoreBOM:!0,fatal:!0});ve.decode();let j=null;function W(){return(j===null||j.byteLength===0)&&(j=new Uint8Array(x.memory.buffer)),j}function Z(e,_){return e=e>>>0,ve.decode(W().subarray(e,e+_))}let F=0;const Ge=typeof TextEncoder>"u"?(0,he.require)("util").TextEncoder:TextEncoder;let M=new Ge("utf-8");const Je=typeof M.encodeInto=="function"?function(e,_){return M.encodeInto(e,_)}:function(e,_){const n=M.encode(e);return _.set(n),{read:e.length,written:n.length}};function ge(e,_,n){if(n===void 0){const c=M.encode(e),s=_(c.length,1)>>>0;return W().subarray(s,s+c.length).set(c),F=c.length,s}let t=e.length,r=_(t,1)>>>0;const o=W();let l=0;for(;l127)break;o[r+l]=c}if(l!==t){l!==0&&(e=e.slice(l)),r=n(r,t,t=l+e.length*3,1)>>>0;const c=W().subarray(r+l,r+t),s=Je(e,c);l+=s.written,r=n(r,t,l,1)>>>0}return F=l,r}function ee(e){return e==null}let z=null;function B(){return(z===null||z.byteLength===0)&&(z=new Int32Array(x.memory.buffer)),z}function Ke(e,_,n){let t,r;try{const c=x.__wbindgen_add_to_stack_pointer(-16),s=ge(e,x.__wbindgen_malloc,x.__wbindgen_realloc),u=F;x.do_tashkeel(c,s,u,!ee(_),ee(_)?0:_,ee(n)?16777215:n?1:0);var o=B()[c/4+0],l=B()[c/4+1];return t=o,r=l,Z(o,l)}finally{x.__wbindgen_add_to_stack_pointer(16),x.__wbindgen_free(t,r,1)}}function Qe(e){U===P.length&&P.push(P.length+1);const _=U;return U=P[_],P[_]=e,_}function Xe(){const e=new Error;return Qe(e)}function Ye(e,_){const n=me(_).stack,t=ge(n,x.__wbindgen_malloc,x.__wbindgen_realloc),r=F;B()[e/4+1]=r,B()[e/4+0]=t}function Ze(e,_){let n,t;try{n=e,t=_,console.error(Z(e,_))}finally{x.__wbindgen_free(n,t,1)}}function e_(e){Ve(e)}function __(){return Date.now()}function n_(e,_){throw new Error(Z(e,_))}URL=globalThis.URL;const d=await N({"./libtashkeel_wasm_bg.js":{__wbg_new_abda76e883ba8a5f:Xe,__wbg_stack_658279fe44541cf6:Ye,__wbg_error_f851667af71bcfc6:Ze,__wbindgen_object_drop_ref:e_,__wbg_now_3014639a94423537:__,__wbindgen_throw:n_}},Y),t_=d.memory,r_=d._initialize,o_=d.do_tashkeel,i_=d.strftime_l,l_=d._tzset_js,c_=d._mktime_js,u_=d._localtime_js,s_=d._gmtime_js,a_=d.__libc_malloc,f_=d.__libc_calloc,d_=d.__libc_free,p_=d.posix_memalign,h_=d.realloc,m_=d.abort,v_=d.__wasi_environ_sizes_get,g_=d.__wasi_environ_get,y_=d.__wasi_fd_seek,b_=d.__wasi_fd_read,w_=d.__wasi_fd_close,k_=d.emscripten_memcpy_js,x_=d.emscripten_get_heap_max,E_=d.emscripten_date_now,S_=d._emscripten_get_now_is_monotonic,P_=d.emscripten_builtin_malloc,C_=d.__cxa_throw,T_=d.emscripten_errn,A_=d.malloc,H_=d.emscripten_get_now,N_=d.__wasi_fd_write,U_=d.free,L_=d.__wbindgen_add_to_stack_pointer,D_=d.__wbindgen_malloc,j_=d.__wbindgen_realloc,W_=d.__wbindgen_free,F_=Object.freeze(Object.defineProperty({__proto__:null,__cxa_throw:C_,__libc_calloc:f_,__libc_free:d_,__libc_malloc:a_,__wasi_environ_get:g_,__wasi_environ_sizes_get:v_,__wasi_fd_close:w_,__wasi_fd_read:b_,__wasi_fd_seek:y_,__wasi_fd_write:N_,__wbindgen_add_to_stack_pointer:L_,__wbindgen_free:W_,__wbindgen_malloc:D_,__wbindgen_realloc:j_,_emscripten_get_now_is_monotonic:S_,_gmtime_js:s_,_initialize:r_,_localtime_js:u_,_mktime_js:c_,_tzset_js:l_,abort:m_,do_tashkeel:o_,emscripten_builtin_malloc:P_,emscripten_date_now:E_,emscripten_errn:T_,emscripten_get_heap_max:x_,emscripten_get_now:H_,emscripten_memcpy_js:k_,free:U_,malloc:A_,memory:t_,posix_memalign:p_,realloc:h_,strftime_l:i_},Symbol.toStringTag,{value:"Module"}));Re(F_);var I,h,ye,A,be,we,_e,ne,te,re,L={},ke=[],M_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oe=Array.isArray;function C(e,_){for(var n in _)e[n]=_[n];return e}function xe(e){var _=e.parentNode;_&&_.removeChild(e)}function z_(e,_,n){var t,r,o,l={};for(o in _)o=="key"?t=_[o]:o=="ref"?r=_[o]:l[o]=_[o];if(arguments.length>2&&(l.children=arguments.length>3?I.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)l[o]===void 0&&(l[o]=e.defaultProps[o]);return O(e,l,t,r,null)}function O(e,_,n,t,r){var o={type:e,props:_,key:n,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++ye,__i:-1,__u:0};return r==null&&h.vnode!=null&&h.vnode(o),o}function R(e){return e.children}function q(e,_){this.props=e,this.context=_}function H(e,_){if(_==null)return e.__?H(e.__,e.__i+1):null;for(var n;__&&A.sort(_e));V.__r=0}function Pe(e,_,n,t,r,o,l,c,s,u,f){var i,p,a,b,S,w=t&&t.__k||ke,m=_.length;for(n.__d=s,B_(n,_,w),s=n.__d,i=0;i0?O(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,c=I_(r,n,l,f),r.__i=c,o=null,c!==-1&&(f--,(o=n[c])&&(o.__u|=131072)),o==null||o.__v===null?(c==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):c!==l&&(c===l+1?i++:c>l?f>s-l?i+=c-l:i--:c(s!=null&&!(131072&s.__u)?1:0))for(;l>=0||c<_.length;){if(l>=0){if((s=_[l])&&!(131072&s.__u)&&r==s.key&&o===s.type)return l;l--}if(c<_.length){if((s=_[c])&&!(131072&s.__u)&&r==s.key&&o===s.type)return c;c++}}return-1}function Te(e,_,n){_[0]==="-"?e.setProperty(_,n??""):e[_]=n==null?"":typeof n!="number"||M_.test(_)?n:n+"px"}function $(e,_,n,t,r){var o;e:if(_==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof t=="string"&&(e.style.cssText=t=""),t)for(_ in t)n&&_ in n||Te(e.style,_,"");if(n)for(_ in n)t&&n[_]===t[_]||Te(e.style,_,n[_])}else if(_[0]==="o"&&_[1]==="n")o=_!==(_=_.replace(/(PointerCapture)$|Capture$/i,"$1")),_=_.toLowerCase()in e||_==="onFocusOut"||_==="onFocusIn"?_.toLowerCase().slice(2):_.slice(2),e.l||(e.l={}),e.l[_+o]=n,n?t?n.u=t.u:(n.u=ne,e.addEventListener(_,o?re:te,o)):e.removeEventListener(_,o?re:te,o);else{if(r)_=_.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(_!="width"&&_!="height"&&_!="href"&&_!="list"&&_!="form"&&_!="tabIndex"&&_!="download"&&_!="rowSpan"&&_!="colSpan"&&_!="role"&&_ in e)try{e[_]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&_[4]!=="-"?e.removeAttribute(_):e.setAttribute(_,n))}}function Ae(e){return function(_){if(this.l){var n=this.l[_.type+e];if(_.t==null)_.t=ne++;else if(_.t=n.__.length&&n.__.push({__V:G}),n.__[e]}function ze(e){return ae=1,$_(Ie,e)}function $_(e,_,n){var t=V_(ue++,2);if(t.t=e,!t.__c&&(t.__=[n?n(_):Ie(void 0,_),function(c){var s=t.__N?t.__N[0]:t.__[0],u=t.t(s,c);s!==u&&(t.__N=[u,t.__[1]],t.__c.setState({}))}],t.__c=v,!v.u)){var r=function(c,s,u){if(!t.__c.__H)return!0;var f=t.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!o||o.call(this,c,s,u);var i=!1;return f.forEach(function(p){if(p.__N){var a=p.__[0];p.__=p.__N,p.__N=void 0,a!==p.__[0]&&(i=!0)}}),!(!i&&t.__c.props===c)&&(!o||o.call(this,c,s,u))};v.u=!0;var o=v.shouldComponentUpdate,l=v.componentWillUpdate;v.componentWillUpdate=function(c,s,u){if(this.__e){var f=o;o=void 0,r(c,s,u),o=f}l&&l.call(this,c,s,u)},v.shouldComponentUpdate=r}return t.__N||t.__}function G_(){for(var e;e=Ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(J),e.__H.__h.forEach(fe),e.__H.__h=[]}catch(_){e.__H.__h=[],g.__e(_,e.__v)}}g.__b=function(e){v=null,Le&&Le(e)},g.__=function(e,_){e&&_.__k&&_.__k.__m&&(e.__m=_.__k.__m),Me&&Me(e,_)},g.__r=function(e){De&&De(e),ue=0;var _=(v=e.__c).__H;_&&(se===v?(_.__h=[],v.__h=[],_.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=G,n.__N=n.i=void 0})):(_.__h.forEach(J),_.__h.forEach(fe),_.__h=[],ue=0)),se=v},g.diffed=function(e){je&&je(e);var _=e.__c;_&&_.__H&&(_.__H.__h.length&&(Ue.push(_)!==1&&Ne===g.requestAnimationFrame||((Ne=g.requestAnimationFrame)||J_)(G_)),_.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==G&&(n.__=n.__V),n.i=void 0,n.__V=G})),se=v=null},g.__c=function(e,_){_.some(function(n){try{n.__h.forEach(J),n.__h=n.__h.filter(function(t){return!t.__||fe(t)})}catch(t){_.some(function(r){r.__h&&(r.__h=[])}),_=[],g.__e(t,n.__v)}}),We&&We(e,_)},g.unmount=function(e){Fe&&Fe(e);var _,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{J(t)}catch(r){_=r}}),n.__H=void 0,_&&g.__e(_,n.__v))};var Be=typeof requestAnimationFrame=="function";function J_(e){var _,n=function(){clearTimeout(t),Be&&cancelAnimationFrame(_),setTimeout(e)},t=setTimeout(n,100);Be&&(_=requestAnimationFrame(n))}function J(e){var _=v,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),v=_}function fe(e){var _=v;e.__c=e.__(),v=_}function Ie(e,_){return typeof _=="function"?_(e):_}const K_="/libtashkeel/assets/logo-110110d0.jpeg";var Q_=0;function y(e,_,n,t,r,o){var l,c,s={};for(c in _)c=="ref"?l=_[c]:s[c]=_[c];var u={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Q_,__i:-1,__u:0,__source:r,__self:o};if(typeof e=="function"&&(l=e.defaultProps))for(c in l)s[c]===void 0&&(s[c]=l[c]);return h.vnode&&h.vnode(u),u}function X_(){const[e,_]=ze(""),[n,t]=ze(""),r=()=>{const o=Ke(e);t(o),document.getElementById("output").focus()};return y("div",{children:[y("a",{href:"https://github.com/mush42/libtashkeel",target:"_blank",children:y("img",{src:K_,alt:"A generated image of an Arabian coffee pot",height:"100",width:"100",style:"border-radius: 50%;"})}),y("h3",{children:"Libtashkeel: Diacritize Arabic Text "}),y("section",{children:[y(de,{title:"GitHub",description:"Main repository",href:"https://github.com/mush42/libtashkeel"}),y(de,{title:"Libtashkeel Crate",description:"use from Rust",href:"https://crates.io/crates/libtashkeel_base"}),y(de,{title:"npm Package",description:"Use from JavaScript",href:"https://www.npmjs.com/package/libtashkeel-wasm"})]}),y("div",{class:"interactive",children:[y("div",{class:"row",children:y("textarea",{value:e,onChange:o=>_(o.target.value),style:{direction:"rtl"},rows:5,placeholder:"Enter text to diacritize..."})}),y("div",{class:"row",children:y("button",{onClick:r,children:"Diacritize"})}),y("div",{class:"row",children:y("textarea",{id:"output",value:n,style:{direction:"rtl"},rows:5,placeholder:"Diacritized text...",readOnly:!0})})]})]})}function de(e){return y("a",{href:e.href,target:"_blank",class:"resource",children:[y("h2",{children:e.title}),y("p",{children:e.description})]})}q_(y(X_,{}),document.getElementById("app"))})()});export default Z_(); diff --git a/index.html b/index.html index a9088fe..5331d9c 100755 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Libtashkeel Online Demo - - + +