@ckbox/i18n 2.9.0-rc.0 → 2.9.0-rc.2

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.
package/README.md CHANGED
@@ -13,7 +13,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
13
13
  To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
14
14
 
15
15
  ```html
16
- <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/ckbox.js"></script>
16
+ <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.2/ckbox.js"></script>
17
17
  ```
18
18
 
19
19
  Quick implementation example:
@@ -23,7 +23,7 @@ Quick implementation example:
23
23
  <html>
24
24
  <head>
25
25
  <meta charset="UTF-8" />
26
- <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/ckbox.js"></script>
26
+ <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.2/ckbox.js"></script>
27
27
  </head>
28
28
  <body>
29
29
  <div id="ckbox"></div>
@@ -48,10 +48,10 @@ The code snippet below presents the simplest scenario for integration of CKEdito
48
48
  <html>
49
49
  <head>
50
50
  <meta charset="UTF-8" />
51
- <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/ckbox.js"></script>
51
+ <script src="https://cdn.ckbox.io/ckbox/2.9.0-rc.2/ckbox.js"></script>
52
52
  <link
53
53
  rel="stylesheet"
54
- href="https://cdn.ckbox.io/ckbox/2.9.0-rc.0/styles/themes/lark.css"
54
+ href="https://cdn.ckbox.io/ckbox/2.9.0-rc.2/styles/themes/lark.css"
55
55
  />
56
56
  <link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/42.0.0/ckeditor5.css" />
57
57
  </head>
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  */
4
- const _0x1670b1=_0x444f;function _0x1e25(){const _0x824918=['_one','623357ZsEoKJ','log','\x27\x20is\x20missing.','filter','_rules','30PROBCJ','isSupported','values','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','supportedLocalesOf','select','useEffect','1SjlBTS','warn','35nGTQGA','PluralRules','plural','153848laWHqq','includes','1392RFBgzV','map','getKey','push','698236qHyVWv','914856ZvcpRu','63VcSVIN','length','tag','slice','createElement','strong','620068fpADbh','65lyMWom','charAt','lang','exec','processTags','Plural\x20form\x20for\x20language\x20\x22','595380IVUqHT','42OnXfDr',']:\x20Translation\x20for\x20key\x20\x27','keys','indexOf'];_0x1e25=function(){return _0x824918;};return _0x1e25();}(function(_0x10ecd4,_0x255591){const _0x317177=_0x444f,_0x34a56b=_0x10ecd4();while(!![]){try{const _0x3406a9=parseInt(_0x317177(0x16a))/0x1*(parseInt(_0x317177(0x151))/0x2)+parseInt(_0x317177(0x14a))/0x3+-parseInt(_0x317177(0x16f))/0x4*(-parseInt(_0x317177(0x16c))/0x5)+parseInt(_0x317177(0x159))/0x6*(-parseInt(_0x317177(0x15e))/0x7)+parseInt(_0x317177(0x171))/0x8*(parseInt(_0x317177(0x14b))/0x9)+parseInt(_0x317177(0x163))/0xa*(-parseInt(_0x317177(0x175))/0xb)+parseInt(_0x317177(0x158))/0xc*(parseInt(_0x317177(0x152))/0xd);if(_0x3406a9===_0x255591)break;else _0x34a56b['push'](_0x34a56b['shift']());}catch(_0x1a5466){_0x34a56b['push'](_0x34a56b['shift']());}}}(_0x1e25,0x4e0f0));import*as _0x29980a from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x19a62a){const _0x1f8658=_0x444f;this[_0x1f8658(0x154)]=_0x19a62a;try{this[_0x1f8658(0x162)]=new Intl[(_0x1f8658(0x16d))](_0x19a62a);}catch(_0x34beda){console[_0x1f8658(0x16b)](_0x1f8658(0x166));}}[_0x1670b1(0x173)](_0x588746,_0xdaf734){const _0x5d8627=_0x1670b1;if(!this[_0x5d8627(0x162)])return _0x588746+_0x5d8627(0x15d);const _0x47b7b8=this['_rules'][_0x5d8627(0x168)](_0xdaf734);return _0x588746+'_'+_0x47b7b8;}}Plural[_0x1670b1(0x164)]=_0x3a1acd=>{const _0x5d0e88=_0x1670b1;try{return Intl[_0x5d0e88(0x16d)][_0x5d0e88(0x167)]([_0x3a1acd])[_0x5d0e88(0x14c)]>0x0;}catch(_0x3e0db3){return![];}};const I18nContext=_0x29980a['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x34eb36,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x2b8658=_0x1670b1;return _0x29980a[_0x2b8658(0x169)](()=>{const _0x510d5c=_0x2b8658,_0x2057a5=Plural['isSupported'](lang);!_0x2057a5&&console[_0x510d5c(0x16b)](_0x510d5c(0x157)+lang+'\x22\x20is\x20not\x20supported.');},[lang]),_0x29980a[_0x2b8658(0x14f)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x34eb36);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x1670b1(0x150),'code'],getMsg=(_0x44f799,_0x2c2ba0={},_0x1b722f)=>{const _0xa3adc3=_0x1670b1,_0x189368=_0x1b722f[_0xa3adc3(0x16e)];if(_0x2c2ba0[_0x44f799]&&_0x189368===undefined)return{'found':!![],'msg':_0x2c2ba0[_0x44f799]};const _0x6a7c8c=Object[_0xa3adc3(0x15b)](_0x2c2ba0)[_0xa3adc3(0x161)](_0x27e613=>_0x27e613[_0xa3adc3(0x15c)](_0x44f799)===0x0);if(_0x6a7c8c[_0xa3adc3(0x14c)]===0x0||_0x189368===undefined)return{'found':![],'msg':_0x44f799};const _0x4d62c0=_0x1b722f['pluralUtils'][_0xa3adc3(0x173)](_0x44f799,_0x189368);return{'found':!![],'msg':_0x2c2ba0[_0x4d62c0]};},parseMsgTags=_0xa88d04=>{const _0x523e16=_0x1670b1,_0x47596c=[];let _0x3724fd=0x0,_0x2fca07;while((_0x2fca07=TAG_REGEX[_0x523e16(0x155)](_0xa88d04))!==null){const _0x44325c=_0x2fca07[0x0],{index:_0x2c782d}=_0x2fca07,_0x4ef030=_0x44325c[_0x523e16(0x153)](0x1)==='/',_0x1f0160=_0x4ef030?_0x44325c[_0x523e16(0x14e)](0x2,-0x1):_0x44325c['slice'](0x1,-0x1),_0x44bef6=ALLOWED_TAGS[_0x523e16(0x170)](_0x1f0160);if(!_0x44bef6)continue;const _0x2a42c7=_0xa88d04[_0x523e16(0x14e)](_0x3724fd,_0x2c782d);if(!_0x2a42c7){_0x3724fd=_0x2c782d+_0x44325c[_0x523e16(0x14c)];continue;}_0x4ef030?_0x47596c[_0x523e16(0x174)]({'type':_0x523e16(0x14d),'name':_0x44325c[_0x523e16(0x14e)](0x2,-0x1),'content':_0x2a42c7}):_0x47596c['push']({'type':'text','content':_0x2a42c7}),_0x3724fd=_0x2c782d+_0x44325c[_0x523e16(0x14c)];}return _0x3724fd<_0xa88d04[_0x523e16(0x14c)]&&_0x47596c['push']({'type':'text','content':_0xa88d04[_0x523e16(0x14e)](_0x3724fd)}),_0x47596c;};function formatMsgWithTags(_0x467cc0){const _0x158d4b=_0x1670b1,_0x9a69c1=parseMsgTags(_0x467cc0),_0xbb973=_0x9a69c1[_0x158d4b(0x172)](({content:_0x424d51,type:_0x19730e,name:_0x527fcb},_0x4d6d17)=>{const _0x50b7ce=_0x19730e!=='text'&&_0x527fcb?_0x527fcb:_0x29980a['Fragment'];return _0x29980a['createElement'](_0x50b7ce,{'key':''+_0x4d6d17},_0x424d51);});return _0xbb973;}function formatMsg(_0x5a797f,_0x254eeb,_0x203e22){const _0x15bb6f=sprintf(_0x5a797f,..._0x254eeb!==null&&_0x254eeb!==void 0x0?_0x254eeb:[]);if(!_0x203e22)return _0x15bb6f;return formatMsgWithTags(_0x15bb6f);}const useTranslation=()=>{const {lang:_0x4f70e6,debug:_0x16cb18,pluralUtils:_0x5bacd2,resources:_0x59e235}=_0x29980a['useContext'](I18nContext);function _0x32d458(_0x3b95ff,_0x4d1aa6){const _0x547e8b=_0x444f,{found:_0x23eac7,msg:_0x2c2a37}=getMsg(_0x3b95ff,_0x59e235[_0x4f70e6],{'plural':_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x16e)],'pluralUtils':_0x5bacd2});_0x16cb18&&!_0x23eac7&&console[_0x547e8b(0x15f)]('['+_0x4f70e6+_0x547e8b(0x15a)+_0x3b95ff+_0x547e8b(0x160));if(_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x156)])return formatMsg(_0x2c2a37,_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x165)],!![]);return formatMsg(_0x2c2a37,_0x4d1aa6===null||_0x4d1aa6===void 0x0?void 0x0:_0x4d1aa6[_0x547e8b(0x165)],![]);}return{'t':_0x32d458,'lang':_0x4f70e6};};function _0x444f(_0xc1dced,_0x211b6e){const _0x1e255f=_0x1e25();return _0x444f=function(_0x444f45,_0x2ebbdb){_0x444f45=_0x444f45-0x14a;let _0x5df6c6=_0x1e255f[_0x444f45];return _0x5df6c6;},_0x444f(_0xc1dced,_0x211b6e);}export{I18nContext,I18nProvider,useTranslation};
4
+ const _0x3abbda=_0x23d1;function _0x23d1(_0x3a2a84,_0x3fbf75){const _0x3ab7ed=_0x3ab7();return _0x23d1=function(_0x23d195,_0x107b64){_0x23d195=_0x23d195-0x83;let _0x29d2df=_0x3ab7ed[_0x23d195];return _0x29d2df;},_0x23d1(_0x3a2a84,_0x3fbf75);}(function(_0x368cbc,_0xb004d6){const _0x2e2baf=_0x23d1,_0x4d9186=_0x368cbc();while(!![]){try{const _0x15fe20=-parseInt(_0x2e2baf(0x8c))/0x1*(-parseInt(_0x2e2baf(0xae))/0x2)+parseInt(_0x2e2baf(0x84))/0x3*(-parseInt(_0x2e2baf(0x94))/0x4)+-parseInt(_0x2e2baf(0xa8))/0x5*(-parseInt(_0x2e2baf(0x95))/0x6)+parseInt(_0x2e2baf(0x9c))/0x7*(parseInt(_0x2e2baf(0xa3))/0x8)+-parseInt(_0x2e2baf(0xa2))/0x9+-parseInt(_0x2e2baf(0x9a))/0xa*(parseInt(_0x2e2baf(0x8a))/0xb)+parseInt(_0x2e2baf(0x88))/0xc;if(_0x15fe20===_0xb004d6)break;else _0x4d9186['push'](_0x4d9186['shift']());}catch(_0x503d22){_0x4d9186['push'](_0x4d9186['shift']());}}}(_0x3ab7,0xec3cc));import*as _0x331f41 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x4618d2){const _0x22bc88=_0x23d1;this[_0x22bc88(0xab)]=_0x4618d2;try{this[_0x22bc88(0x89)]=new Intl['PluralRules'](_0x4618d2);}catch(_0x2561eb){console[_0x22bc88(0x8d)](_0x22bc88(0x9d));}}[_0x3abbda(0x85)](_0x104bcf,_0x21080c){const _0x36b35f=_0x3abbda;if(!this[_0x36b35f(0x89)])return _0x104bcf+_0x36b35f(0xaa);const _0x4d0319=this[_0x36b35f(0x89)][_0x36b35f(0x87)](_0x21080c);return _0x104bcf+'_'+_0x4d0319;}}Plural['isSupported']=_0x273833=>{const _0x4461d1=_0x3abbda;try{return Intl[_0x4461d1(0x98)][_0x4461d1(0xac)]([_0x273833])[_0x4461d1(0x90)]>0x0;}catch(_0x57175f){return![];}};const I18nContext=_0x331f41['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x7f701f,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x3685e4=_0x3abbda;return _0x331f41[_0x3685e4(0xa5)](()=>{const _0x46ca3b=_0x3685e4,_0x562bd7=Plural['isSupported'](lang);!_0x562bd7&&console['warn'](_0x46ca3b(0xa4)+lang+_0x46ca3b(0x97));},[lang]),_0x331f41[_0x3685e4(0x8f)](I18nContext['Provider'],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x7f701f);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x3abbda(0xa9),_0x3abbda(0x8e)],getMsg=(_0x275835,_0x251a85={},_0x2fbd66)=>{const _0x44e48a=_0x3abbda,_0x471224=_0x2fbd66[_0x44e48a(0x91)];if(_0x251a85[_0x275835]&&_0x471224===undefined)return{'found':!![],'msg':_0x251a85[_0x275835]};const _0x30db20=Object[_0x44e48a(0x96)](_0x251a85)['filter'](_0x56ea73=>_0x56ea73[_0x44e48a(0x9f)](_0x275835)===0x0);if(_0x30db20[_0x44e48a(0x90)]===0x0||_0x471224===undefined)return{'found':![],'msg':_0x275835};const _0x27c511=_0x2fbd66[_0x44e48a(0xad)][_0x44e48a(0x85)](_0x275835,_0x471224);return{'found':!![],'msg':_0x251a85[_0x27c511]};},parseMsgTags=_0x5a2fbb=>{const _0x454b7a=_0x3abbda,_0x4adbd7=[];let _0x5bbd65=0x0,_0x8b7861;while((_0x8b7861=TAG_REGEX[_0x454b7a(0x86)](_0x5a2fbb))!==null){const _0x3068fb=_0x8b7861[0x0],{index:_0x28d66d}=_0x8b7861,_0x52df2d=_0x3068fb[_0x454b7a(0x92)](0x1)==='/',_0x7cb5fd=_0x52df2d?_0x3068fb[_0x454b7a(0x99)](0x2,-0x1):_0x3068fb['slice'](0x1,-0x1),_0x1589a3=ALLOWED_TAGS['includes'](_0x7cb5fd);if(!_0x1589a3)continue;const _0x2d508f=_0x5a2fbb[_0x454b7a(0x99)](_0x5bbd65,_0x28d66d);if(!_0x2d508f){_0x5bbd65=_0x28d66d+_0x3068fb['length'];continue;}_0x52df2d?_0x4adbd7[_0x454b7a(0xa6)]({'type':_0x454b7a(0x8b),'name':_0x3068fb[_0x454b7a(0x99)](0x2,-0x1),'content':_0x2d508f}):_0x4adbd7[_0x454b7a(0xa6)]({'type':_0x454b7a(0x93),'content':_0x2d508f}),_0x5bbd65=_0x28d66d+_0x3068fb[_0x454b7a(0x90)];}return _0x5bbd65<_0x5a2fbb['length']&&_0x4adbd7[_0x454b7a(0xa6)]({'type':_0x454b7a(0x93),'content':_0x5a2fbb[_0x454b7a(0x99)](_0x5bbd65)}),_0x4adbd7;};function formatMsgWithTags(_0x2d6865){const _0x4a52a6=_0x3abbda,_0x4cda78=parseMsgTags(_0x2d6865),_0x4fa8b6=_0x4cda78[_0x4a52a6(0xa1)](({content:_0x15c68a,type:_0xea00c6,name:_0x37eadc},_0x2aa074)=>{const _0x585388=_0x4a52a6,_0x47c9d=_0xea00c6!==_0x585388(0x93)&&_0x37eadc?_0x37eadc:_0x331f41[_0x585388(0xa7)];return _0x331f41[_0x585388(0x8f)](_0x47c9d,{'key':''+_0x2aa074},_0x15c68a);});return _0x4fa8b6;}function formatMsg(_0x4bf2f3,_0x27a944,_0x3dff00){const _0x50713b=sprintf(_0x4bf2f3,..._0x27a944!==null&&_0x27a944!==void 0x0?_0x27a944:[]);if(!_0x3dff00)return _0x50713b;return formatMsgWithTags(_0x50713b);}const useTranslation=()=>{const _0x273216=_0x3abbda,{lang:_0x513136,debug:_0x3bcb11,pluralUtils:_0xb528e0,resources:_0xf2a7f1}=_0x331f41[_0x273216(0x83)](I18nContext);function _0x5f2d6c(_0x1fc027,_0x1470c7){const _0x41911f=_0x273216,{found:_0x1b8406,msg:_0x54c655}=getMsg(_0x1fc027,_0xf2a7f1[_0x513136],{'plural':_0x1470c7===null||_0x1470c7===void 0x0?void 0x0:_0x1470c7['plural'],'pluralUtils':_0xb528e0});_0x3bcb11&&!_0x1b8406&&console[_0x41911f(0xaf)]('['+_0x513136+']:\x20Translation\x20for\x20key\x20\x27'+_0x1fc027+_0x41911f(0xa0));if(_0x1470c7===null||_0x1470c7===void 0x0?void 0x0:_0x1470c7[_0x41911f(0x9e)])return formatMsg(_0x54c655,_0x1470c7===null||_0x1470c7===void 0x0?void 0x0:_0x1470c7[_0x41911f(0x9b)],!![]);return formatMsg(_0x54c655,_0x1470c7===null||_0x1470c7===void 0x0?void 0x0:_0x1470c7[_0x41911f(0x9b)],![]);}return{'t':_0x5f2d6c,'lang':_0x513136};};export{I18nContext,I18nProvider,useTranslation};function _0x3ab7(){const _0x298d71=['17042304TRSYmE','_rules','2211grdJxp','tag','41udMuco','warn','code','createElement','length','plural','charAt','text','4WobzUQ','96fLNvzq','keys','\x22\x20is\x20not\x20supported.','PluralRules','slice','36570CfaXdD','values','77UTwBoC','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','processTags','indexOf','\x27\x20is\x20missing.','map','9303264ETcyiC','928104hObJIu','Plural\x20form\x20for\x20language\x20\x22','useEffect','push','Fragment','50525ZSkLuP','strong','_one','lang','supportedLocalesOf','pluralUtils','8598YLuWSZ','log','useContext','893679GJGWMf','getKey','exec','select'];_0x3ab7=function(){return _0x298d71;};return _0x3ab7();}
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "license": "SEE LICENSE IN LICENSE.md",
24
24
  "name": "@ckbox/i18n",
25
- "version": "2.9.0-rc.0",
25
+ "version": "2.9.0-rc.2",
26
26
  "description": "I18n utils of CKBox",
27
27
  "main": "dist/index.js",
28
28
  "types": "dist/index.d.ts",