@inntechcorp/it-design 3.1.4 → 3.1.5

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/dist/index.d.ts CHANGED
@@ -1455,6 +1455,10 @@ type UploadProps = {
1455
1455
  extraQueryString?: {};
1456
1456
  extraHeader?: {};
1457
1457
  disabled?: boolean;
1458
+ /** Minimum image width required for upload (in pixels). Smaller images will be rejected. */
1459
+ minImageWidth?: number;
1460
+ /** Minimum image height required for upload (in pixels). Smaller images will be rejected. */
1461
+ minImageHeight?: number;
1458
1462
  /** Enable image cropping before upload */
1459
1463
  enableCrop?: boolean;
1460
1464
  /** Aspect ratio for crop (e.g., 1 for square, 16/9 for widescreen). Undefined = free crop */
@@ -1751,6 +1755,10 @@ declare const resources: {
1751
1755
  cropImage: string;
1752
1756
  crop: string;
1753
1757
  cancel: string;
1758
+ width: string;
1759
+ height: string;
1760
+ imageTooSmall: string;
1761
+ imageTooSmallMessage: string;
1754
1762
  };
1755
1763
  results: {
1756
1764
  authentication: {
@@ -2053,6 +2061,10 @@ declare const resources: {
2053
2061
  cropImage: string;
2054
2062
  crop: string;
2055
2063
  cancel: string;
2064
+ width: string;
2065
+ height: string;
2066
+ imageTooSmall: string;
2067
+ imageTooSmallMessage: string;
2056
2068
  };
2057
2069
  results: {
2058
2070
  authentication: {
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import e from"i18next";import{useTranslation as t,initReactI18next as r}from"react-i18next";import{jsx as n,Fragment as i,jsxs as o}from"react/jsx-runtime";import*as a from"react";import l,{useState as s,useEffect as d,useRef as c,useContext as u,useMemo as p,memo as h,isValidElement as f,cloneElement as g,createContext as m,useCallback as b,useLayoutEffect as v,forwardRef as x,useImperativeHandle as y,Children as w,createRef as A,Suspense as k,createElement as _}from"react";import{createPortal as S,unstable_batchedUpdates as E}from"react-dom";import{CSSTransition as C}from"react-transition-group";import{useSearchParams as $,useNavigate as L,createSearchParams as F,NavLink as z,useLocation as N}from"react-router-dom";import D from"axios";import M,{keyframes as T,css as O}from"styled-components";import I from"dayjs";import R from"dayjs/plugin/customParseFormat";import P from"dayjs/plugin/localizedFormat";import{getChildrenDeep as B}from"react-nanny";var V,j,H,U,G,Y,W,q,X,K={success:"Başarılı",error:"Hata",table:{noData:"Veri Yok"},placeholders:{username:"Kullanıcı adı",email:"E-Posta",password:"Şifre",confirmPassword:"Şifre tekrar",typeYourNoteHere:"Notunuzu buraya yazınız",selectGender:"Cinsiyet Seçin",selectCurrency:"Para Birimi Seçin",selectLanguage:"Dil Seçin",selectCountry:"Ülke Seçin",birthday:"Doğum Tarihi",multipleSelection:"Seçili ({{- count}})"},options:{all:"Hepsi",male:"Erkek",female:"Kadın",languages:{turkish:"Türkçe",english:"İngilizce"},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"}},buttons:{submit:"Gönder",reset:"Temizle"},errors:{required:"Bu alan zorunludur!",minLength:"En az {{- length}} karakter olmalıdır",maxLength:"Çok uzun. Maks uzunluk {{- length}} karakter olmalıdır.",exactLength:"This field must be {{- length}} characters long.",passwordRule:"Şifreniz en az 8 harf olmalı, bir rakam, bir büyük ve bir küçük harf, bir özel karakter içermeli ve boşluk kullanılmamalıdır.",invalidEmailAddress:"Geçersiz e-posta adresi",passwordsDontMatch:"Girdiğiniz şifreler birbirleriyle uyuşmuyor!",usernameRule:"Sadece İngilizce harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine izin verilmez.",wrongTCIdentity:"TC Kimlik Numarası Yanlış",fieldMustBeTheSame:"Bu alan şunlarla aynı olmalıdır: {{- fields}}",siteUsernameRule:"Sadece İngilizce küçük harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine ve büyük harflere izin verilmez.",adminUsernameRule:"Sadece ingilizce harflerden ve rakamlardan oluşmalıdır. Semboller (-_. vs) ve boşluk karakteri kullanılamaz.",invalidURL:"Geçersiz URL",fieldMustBeDifferent:"Bu alan şunlarla aynı olmamalıdır: {{- fields}}",forbiddenWords:"Bu alan içerisinde bu kelimeyi kullanamazsınız."},uploader:{header:"Bir resmi sürükleyip bırakın",hint:"ya da bir dosya seçmek için tıklayın.",fileUploading:"Dosya yükleniyor...",info:"Toplam: {{- total}} - {{- estimated}} sn kaldı.",delete:"Sil",preview:"Önizleme",error:"Hata",fileFormatError:"Yalnızca {{fileFormat}} dosyası yükleyebilirsiniz.",fileSizeError:"Dosya boyutu {{fileSize}}'den küçük olmalıdır.",fileUploadSuccess:"Dosya başarıyla yüklendi.",fileUploadFailed:"Dosya yüklenemedi!",removeFileSuccess:"Dosya başarıyla silindi!",browserDoesntSupportDND:"Tarayıcı taşı&bırak özelliğini desteklemiyor!",calculating:"Hesaplanıyor...",removeFile:"Dosya Silme",areYouSureToDeleteThisFile:"Bu dosyayı silmek istediğinize emin misiniz?",yes:"Evet",no:"Hayır",cropImage:"Görseli Kırp",crop:"Kırp",cancel:"İptal"},results:{authentication:{title:"Üye Girişi Gerekiyor",subtitle:"Bu bölüme ulaşmanız için üye girişi yapmanız gerekiyor. Aşağıdaki tuşa tıklayarak lütfen üye girişi yapınız.",button:"GİRİŞ YAP"}},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"},countries:{af:"Afganistan",al:"Arnavutluk",dz:"Cezayir",ad:"Andorra",ao:"Angola",ag:"Antigua ve Barbuda",ar:"Arjantin",am:"Ermenistan",au:"Avustralya",at:"Avusturya",az:"Azerbaycan",bs:"Bahamalar",bh:"Bahreyn",bd:"Bangladeş",bb:"Barbados",by:"Beyaz Rusya",be:"Belçika",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivya",ba:"Bosna-Hersek",bw:"Botsvana",br:"Brezilya",bn:"Brunei",bg:"Bulgaristan",bf:"Burkina Faso",bi:"Burundi",cv:"Yeşil Burun Adaları",kh:"Kamboçya",cm:"Kamerun",ca:"Kanada",cf:"Orta Afrika Cumhuriyeti",td:"Çad",cl:"Şili",cn:"Çin Halk Cumhuriyeti",co:"Kolombiya",km:"Komorlar",cg:"Kongo Cumhuriyeti",cd:"Demokratik Kongo",cr:"Kosta Rika",ci:"Fildişi Sahili",hr:"Hırvatistan",cu:"Küba",cw:"Curaçao",cy:"Güney Kıbrıs",cz:"Çek Cumhuriyeti",dk:"Danimarka",dj:"Cibuti",dm:"Dominika",do:"Dominik Cumhuriyeti",ec:"Ekvador",eg:"Mısır",sv:"El Salvador",gq:"Ekvator Ginesi",er:"Eritre",ee:"Estonya",sz:"Esvati̇ni̇",et:"Etiyopya",fj:"Fiji",fi:"Finlandiya",fr:"Fransa",ga:"Gabon",gm:"Gambia",ge:"Gürcistan",de:"Almanya",gh:"Gana",gr:"Yunanistan",gd:"Grenada",gt:"Guatemala",gn:"Gine",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Macaristan",is:"İzlanda",in:"Hindistan",id:"Endonezya",ir:"İran",iq:"Irak",ie:"Ireland",il:"İrlanda",it:"İtalya",jm:"Jamaika",jp:"Japonya",jo:"Ürdün",kz:"Kazakistan",ke:"Kenya",ki:"Kiribati",kp:"Kuzey Kore",kr:"Güney Kore",kw:"Kuveyt",kg:"Kırgızistan",la:"Laos",lv:"Letonya",lb:"Lübnan",ls:"Lesotho",lr:"Liberya",ly:"Libya",li:"Lihtenştayn",lt:"Litvanya",lu:"Lüksemburg",mg:"Madagaskar",mw:"Malavi",my:"Malezya",mv:"Maldivler",ml:"Mali",mt:"Malta",mh:"Marshall Adaları",mr:"Moritanya",mu:"Mauritius",mx:"Meksika",fm:"Mikronezya",md:"Moldova",mc:"Monako",mn:"Moğolistan",me:"Karadağ",ma:"Fas",mz:"Mozambik",mm:"Myanmar",na:"Namibya",nr:"Nauru",np:"Nepal",nl:"Hollanda",nz:"Yeni Zelanda",ni:"Nikaragua",ne:"Nijer",ng:"Nijerya",mk:"Makedonya",no:"Norveç",om:"Umman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua Yeni Gine",py:"Paraguay",pe:"Peru",ph:"Filipinler",pl:"Polonya",pt:"Portekiz",qa:"Katar",ro:"Romanya",ru:"Rusya",rw:"Ruanda",kn:"Saint Kitts ve Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Suudi Arabistan",sn:"Senegal",rs:"Sırbistan",sc:"Seyşeller",sl:"Sierra Leone",sg:"Singapur",sk:"Slovakya",si:"Slovenya",sb:"Solomon Adaları",so:"Somali",za:"Güney Afrika",ss:"Güney Sudan",es:"İspanya",lk:"Sri Lanka",sd:"Sudan",sr:"Surinam",se:"İsveç",ch:"İsviçre",sy:"Suriye",tj:"Tacikistan",tw:"Tayvan",tz:"Tanzanya",th:"Tayland",tl:"Doğu Timor",tg:"Togo",to:"Tonga",tt:"Trinidad ve Tobago",tn:"Tunus",tr:"Türkiye",tm:"Türkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukrayna",ae:"Birleşik Arap Emirlikleri",gb:"Birleşik Krallık",us:"Amerika Birleşik Devletleri",uy:"Uruguay",uz:"Özbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Vietnam",ye:"Yemen",zm:"Zambiya",zw:"Zimbabve"},calendar:{weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"}},J={success:"Success",error:"Error",table:{noData:"No Data"},placeholders:{username:"Username",email:"E-Mail",password:"Password",confirmPassword:"Confirm password",typeYourNoteHere:"Type your note here",selectGender:"Select Gender",selectCurrency:"Select Currency",selectLanguage:"Select Language",selectCountry:"Select Country",birthday:"Birthday",multipleSelection:"Selected ({{- count}})"},options:{all:"All",male:"Male",female:"Female",languages:{turkish:"Turkish",english:"English"},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"}},buttons:{submit:"Submit",reset:"Reset"},errors:{required:"This field is required!",minLength:"Should contain at least {{- length}} characters",maxLength:"Is too long. Max size is {{- length}}",passwordRule:"Your password must be at least 8 characters long, contain at least one digit, one uppercase letter, one lowercase letter, one special character, and must not contain spaces.",invalidEmailAddress:"Invalid email address",passwordsDontMatch:"The two passwords that you entered do not match!",usernameRule:"Only English letters, digits and symbols (-_.). No space is allowed",wrongTCIdentity:"Wrong TC Identity Number",fieldMustBeTheSame:"This field must be the same as: {{- fields}}",siteUsernameRule:"Only English lowercase letters, digits and symbols (-_.). No space is allowed, no uppercase letters are allowed",adminUsernameRule:"Only English letters and digits. No symbols (-_. vs) and no space is allowed",invalidURL:"Invalid URL",fieldMustBeDifferent:"This field must be different from: {{- fields}}",forbiddenWords:"You cannot use this word in this field."},uploader:{header:"Drag and drop an file",hint:"or Browse to choose a file",fileUploading:"File uploading...",info:"Total: {{- total}} - {{- estimated}} s remaining.",delete:"Delete",preview:"Preview",error:"Error",fileFormatError:"You can only upload {{fileFormat}} file",fileSizeError:"File must smaller than {{fileSize}}",fileUploadSuccess:"File successfully uploaded.",fileUploadFailed:"File upload failed!",removeFileSuccess:"File successfully delete!",browserDoesntSupportDND:"Browser doesn't support drag and drop!",calculating:"Calculating...",removeFile:"Remove File",areYouSureToDeleteThisFile:"Are you sure to delete this file?",yes:"Yes",no:"No",cropImage:"Crop Image",crop:"Crop",cancel:"Cancel"},results:{authentication:{title:"You Need To Sign In",subtitle:"You need to login to access this page. Please login by clicking the button below.",button:"LOGIN"}},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"},countries:{af:"Afghanistan",al:"Albania",dz:"Algeria",ad:"Andorra",ao:"Angola",ag:"Antigua and Barbuda",ar:"Argentina",am:"Armenia",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivia",ba:"Bosnia and Herzegovina",bw:"Botswana",br:"Brazil",bn:"Brunei Darussalam",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",cv:"Cabo Verde",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",co:"Colombia",km:"Comoros",cg:"Congo",cd:"Congo, Democratic",cr:"Costa Rica",ci:"Côte d'Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curacao",cy:"Cyprus",cz:"Czechia",dk:"Denmark",dj:"Djibouti",dm:"Dominica",do:"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",sz:"Eswatini",et:"Ethiopia",fj:"Fiji",fi:"Finland",fr:"France",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gr:"Greece",gd:"Grenada",gt:"Guatemala",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Hungary",is:"Iceland",in:"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kp:"North Korea",kr:"South Korea",kw:"Kuwait",kg:"Kyrgyzstan",la:"Lao People's",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mr:"Mauritania",mu:"Mauritius",mx:"Mexico",fm:"Micronesia",md:"Moldova, Republic of",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ma:"Morocco",mz:"Mozambique",mm:"Myanmar",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",mk:"North Macedonia",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pl:"Poland",pt:"Portugal",qa:"Qatar",ro:"Romania",ru:"Russian Federation",rw:"Rwanda",kn:"Saint Kitts and Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",sd:"Sudan",sr:"Suriname",se:"Sweden",ch:"Switzerland",sy:"Syrian Arab Republic",tj:"Tajikistan",tw:"Taiwan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",to:"Tonga",tt:"Trinidad and Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom",us:"United States of America",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Viet Nam",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe"},calendar:{weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"}},Z={weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},Q={weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"};!function(e){e.NOT_SHOW="modal-not-show",e.BEGIN="modal-begin",e.ENTERING="modal-entering",e.ENTERED="modal-entered",e.EXITING="modal-exiting",e.EXITED="modal-exited",e.REMOVED="modal-removed",e.OK_CLICK="modal-ok-button-click",e.CANCEL_CLICK="modal-cancel-button-click",e.CLOSE_CLICK="modal-close-button-click",e.OUTSIDE_CLICK="modal-outside-click",e.ESC_CLICK="modal-esc-click",e.ALL_REMOVED="modal-all-removed"}(V||(V={})),function(e){e.SVG="image/svg+xml",e.PNG="image/png",e.JPG="image/jpeg",e.JPEG="image/jpeg",e.GIF="image/gif",e.WEBP="image/webp",e.PDF="application/pdf",e.OTF="font/otf"}(j||(j={})),function(e){e.SVG=".svg",e.PNG=".png",e.JPG=".jpg",e.GIF=".gif",e.WEBP=".webp",e.PDF=".pdf",e.OTF=".otf"}(H||(H={})),function(e){e.REQUIRED="required",e.TYPE="type"}(U||(U={})),function(e){e.MIN_LENGTH="minLength",e.MAX_LENGTH="maxLength",e.EXACT_LENGTH="exactLength",e.SAME="same",e.NOT_SAME="notSame",e.TC_IDENTITY="TCIdentity",e.PASSWORD="password",e.EMAIL="email",e.USERNAME="username",e.SITE_USERNAME="siteUsername",e.ADMIN_USERNAME="adminUsername",e.URL="url",e.FORBIDDEN_WORDS="forbiddenWords"}(G||(G={})),function(e){e.ONLINE="online",e.OFFLINE="offline"}(Y||(Y={})),function(e){e.X_SMALL="x-small",e.SMALL="small",e.MEDIUM="medium",e.DEFAULT="default",e.LARGE="large",e.X_LARGE="x-large"}(W||(W={})),function(e){e.X_SMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.DEFAULT="df",e.LARGE="lg",e.X_LARGE="xlg"}(q||(q={})),function(e){e.LEFT="left",e.RIGHT="right"}(X||(X={}));const ee=["background: #27C13A","color: #2b2b2b","line-height: 20px","border-radius: 20px"].join(";"),te=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),re=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),ne=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),ie=["background: #27C13A","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),oe=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),ae=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),le=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),se=["background: #2B2B2B","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),de=["background-image: url('//i.giphy.com/XKCdA6ERnXp6M.webp')","background-size: 280px 200px","background-repeat: no-repeat","color: #000000","padding: 0px 75px 0 0","line-height: 200px"].join(";");let ce={single:(e,t="info")=>{if("fatal-error"!==t){var r="";"info"===t&&(r=ee),"warning"===t&&(r=re),"debug"===t&&(r=te),"error"===t&&(r=ne),console.log("%c "+e+" ",r)}else console.log("%c "+e,de)},double:(e,t,r="info")=>{if("fatal-error"!==r){var n="";"info"===r&&(n=ie),"warning"===r&&(n=ae),"debug"===r&&(n=oe),"error"===r&&(n=le),console.log("%c "+e+": %c "+t+" ",n,se)}else console.log("%c "+e+": %c "+t+" ",n,de)},table:e=>{console.table(e)}};const ue=e=>{let t;const[r,n]=s("");d(()=>()=>{document.body.removeChild(t)},[]);return{loadReCaptcha:e=>{t=document.createElement("script"),t.src="https://www.google.com/recaptcha/api.js?render="+e,t.onload=function(){n(e)},document.body.appendChild(t)},executeReCaptcha:()=>{if(""===r)return ce.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready(t=>{try{window.grecaptcha.execute(r,{action:"login"}).then(t=>{ce.double("ReCaptcha V3","Token is valid"),console.log("token: "+t),e&&e(t)})}catch(e){ce.double("ReCaptcha V3","Token is invalid","error")}})}}},pe=(e=()=>{})=>{const[t,r]=s(!1);t||(e(),r(!0))},he=(e,t=!1)=>{d(()=>{var n=!1,i=document.head,o=r();return document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&(n=!0)}),n||i.appendChild(o),()=>{t&&document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&document.head.removeChild(t)})}},[e]);const r=()=>{var t=document.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,t}},fe=(e,t)=>{d(()=>{const r=r=>{if(!r.target)return;if(0!==r.button)return r.stopPropagation(),void r.preventDefault();if(!e)return;if(!e.current)return;(e=>{const t=e.target.getBoundingClientRect();return e.clientX>t.right-20})(r)||e.current.contains(r.target)||t(r)};return document.addEventListener("pointerdown",r),()=>{document.removeEventListener("pointerdown",r)}},[e,t])},ge=e=>{d(()=>{const t=t=>{27===t.keyCode&&e(t)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},me=()=>{const[e,t]=$();return{set:(r="",n)=>{if(""===n||null===n||Array.isArray(n)&&0===n.length)e.delete(r);else if(Array.isArray(n)){const t=n.map(e=>encodeURIComponent(e.toString())).join(",");e.set(r,t)}else"boolean"==typeof n?e.set(r,n?"true":"false"):e.set(r,encodeURIComponent(n.toString()));t(e)},get:function(t="search",r,n){const i=e.get(t);if(null!==i){const e=decodeURIComponent(i);if(e.includes("&")){const i=((e,t)=>{const r={};return e.split("&").forEach((e,n)=>{if(e.includes("=")){const[t,n]=e.split("=");t&&void 0!==n&&(r[t]=n)}else 0===n&&e&&(r[t]=e)}),r})(e,t);if(!i[t])return r;{const e=i[t];if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if("string"==typeof r)return e;if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&r}}}if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if(Array.isArray(r))try{return e.includes(",")?e.split(","):[e]}catch(e){return console.warn("Invalid array format, returning default value."),r}if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&(console.warn("Invalid boolean format, returning default value."),r)}if("string"==typeof r)return e}return r},remove:(r="")=>{e.delete(r),t(e)},isEmpty:()=>0===Array.from(e.values()).length}},be=()=>{const[e,t]=$(),r=L();return{set:(n=[{type:"",value:""}])=>{n.forEach(t=>{""===t.value||void 0===t.value||null===t.value?e.delete(t.type):Array.isArray(t.value)?0===t.value.length?e.delete(t.type):e.set(t.type,decodeURIComponent(t.value.join()).toString()):e.set(t.type,t.value)}),t(e),r({search:F(e).toString()},{replace:!0})}}},ve=e=>{d(()=>{const t=t=>{e(t)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])},xe=e=>{d(()=>{const t=t=>{e(Y.ONLINE,t)},r=t=>{e(Y.OFFLINE,t)};return window.addEventListener(Y.ONLINE,t),window.addEventListener(Y.OFFLINE,r),()=>{window.removeEventListener(Y.ONLINE,t),window.removeEventListener(Y.OFFLINE,r)}},[e])},ye=e=>{const[t,r]=s({width:0,height:0});return d(()=>{if(!e.current)return;const t=new ResizeObserver(e=>{e.forEach(({target:e})=>{r({width:e.clientWidth,height:e.clientHeight})})});return t.observe(e.current),()=>t.disconnect()},[e]),[t]},we=()=>{const e=c(null);return{fetch:async({action:t="",requestMethod:r="",addOrigin:n=!0,params:i={},queries:o={},headers:a={},cancelable:l=!0,onFetched:s,onError:d,onCanceled:c,onProgress:u})=>{let p="",h={};Object.keys(o).forEach(e=>{p+="&"+e+"="+o[e]}),h["Content-Type"]="put"===r?"multipart/form-data":"application/json",n&&(h["Access-Control-Allow-Headers"]="Origin, X-Requested-With, Content-Type, Accept"),h={...h,...a};let f=D.post;"post"===r.toLocaleLowerCase()?f=D.post:"get"===r.toLocaleLowerCase()?f=D.get:"put"===r.toLocaleLowerCase()?f=D.put:"patch"===r.toLocaleLowerCase()&&(f=D.patch),await f(t+p,i,{headers:a,cancelToken:!!l&&(e.current=D.CancelToken.source(),e.current.token),onUploadProgress:e=>{u&&u(e)}}).then(e=>{s&&s(e)}).catch(e=>{console.log("error",e),console.log("error.message",e.message),D.isCancel(e.message)?c&&c(e.message):d&&d(e.message,0)})},cancel:()=>{e.current&&e.current.cancel("manually canceled!")}}},Ae=(...e)=>{if(0===e.length)return({children:e})=>n(i,{children:e});const t=e.map(u),r=c(t);return r.current=t,p(()=>({children:t})=>e.reduceRight((e,t,i)=>n(t.Provider,{value:r.current[i],children:e}),t),[])},ke=({key:e,onKeyPressed:t})=>{d(()=>{function r(r){r.key===e&&(r.preventDefault(),t())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,t])},_e=()=>{if(!("undefined"!=typeof window))return"landscape";const e=window.screen&&window.screen.orientation;if(e&&"string"==typeof e.type)return e.type.startsWith("portrait")?"portrait":"landscape";if("function"==typeof window.matchMedia)try{return window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}catch(e){}return window.innerHeight>=window.innerWidth?"portrait":"landscape"},Se=()=>{const[e,t]=s(()=>_e());return d(()=>{if(!("undefined"!=typeof window))return;const e=window.screen&&window.screen.orientation,r=()=>t(_e());if(e&&"function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof window.matchMedia){const e=window.matchMedia("(orientation: portrait)"),r=e=>{const r=e.matches;t(r?"portrait":"landscape")};if("function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof e.addListener)return e.addListener(r),()=>e.removeListener(r)}return window.addEventListener("orientationchange",r),window.addEventListener("resize",r),()=>{window.removeEventListener("orientationchange",r),window.removeEventListener("resize",r)}},[]),e},Ee=({obstacles:e=[".chat-bubble",".whatsapp-button",".cookie-consent","[data-fixed-obstacle='true']"],corner:t="bottom-right",autoAvoid:r=!0,extraBottom:n=0,minGap:i=8}={})=>{const[o,a]=s(n),l=p(()=>{let o=0;const l=()=>{if(!r)return void a(n);const o=window.innerHeight;let l=0;e.flatMap(e=>Array.from(document.querySelectorAll(e))).forEach(e=>{const r=getComputedStyle(e),n="none"===r.display||"hidden"===r.visibility||"0"===r.opacity,a="fixed"===r.position||"sticky"===r.position;if(n||!a)return;const s=e.getBoundingClientRect(),d=Math.max(0,o-s.top),c=Math.min(d,s.height),u=(()=>{const e=window.innerWidth/2;return"bottom-right"===t?s.right>e:"bottom-left"===t?s.left<e:s.left<=e&&s.right>=e})();c>0&&u&&(l=Math.max(l,Math.ceil(c+i)))}),a(l+n)};return{schedule:()=>{cancelAnimationFrame(o),o=requestAnimationFrame(l)},cancel:()=>cancelAnimationFrame(o)}},[e,t,r,n,i]);return d(()=>{l.schedule();const e=()=>l.schedule(),t=()=>l.schedule();window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0});const r=new MutationObserver(()=>l.schedule());r.observe(document.body,{childList:!0,subtree:!0,attributes:!0});const n=new ResizeObserver(()=>l.schedule());return n.observe(document.body),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t),r.disconnect(),n.disconnect(),l.cancel()}},[l]),{bottomOffset:o}},Ce=T`
1
+ import e from"i18next";import{useTranslation as t,initReactI18next as r}from"react-i18next";import{jsx as n,Fragment as i,jsxs as o}from"react/jsx-runtime";import*as a from"react";import l,{useState as s,useEffect as d,useRef as c,useContext as u,useMemo as p,memo as h,isValidElement as f,cloneElement as g,createContext as m,useCallback as b,useLayoutEffect as v,forwardRef as x,useImperativeHandle as y,Children as w,createRef as A,Suspense as k,createElement as _}from"react";import{createPortal as S,unstable_batchedUpdates as E}from"react-dom";import{CSSTransition as C}from"react-transition-group";import{useSearchParams as $,useNavigate as L,createSearchParams as F,NavLink as z,useLocation as N}from"react-router-dom";import D from"axios";import M,{keyframes as T,css as O}from"styled-components";import I from"dayjs";import R from"dayjs/plugin/customParseFormat";import P from"dayjs/plugin/localizedFormat";import{getChildrenDeep as B}from"react-nanny";var V,j,H,U,G,Y,W,q,X,K={success:"Başarılı",error:"Hata",table:{noData:"Veri Yok"},placeholders:{username:"Kullanıcı adı",email:"E-Posta",password:"Şifre",confirmPassword:"Şifre tekrar",typeYourNoteHere:"Notunuzu buraya yazınız",selectGender:"Cinsiyet Seçin",selectCurrency:"Para Birimi Seçin",selectLanguage:"Dil Seçin",selectCountry:"Ülke Seçin",birthday:"Doğum Tarihi",multipleSelection:"Seçili ({{- count}})"},options:{all:"Hepsi",male:"Erkek",female:"Kadın",languages:{turkish:"Türkçe",english:"İngilizce"},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"}},buttons:{submit:"Gönder",reset:"Temizle"},errors:{required:"Bu alan zorunludur!",minLength:"En az {{- length}} karakter olmalıdır",maxLength:"Çok uzun. Maks uzunluk {{- length}} karakter olmalıdır.",exactLength:"This field must be {{- length}} characters long.",passwordRule:"Şifreniz en az 8 harf olmalı, bir rakam, bir büyük ve bir küçük harf, bir özel karakter içermeli ve boşluk kullanılmamalıdır.",invalidEmailAddress:"Geçersiz e-posta adresi",passwordsDontMatch:"Girdiğiniz şifreler birbirleriyle uyuşmuyor!",usernameRule:"Sadece İngilizce harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine izin verilmez.",wrongTCIdentity:"TC Kimlik Numarası Yanlış",fieldMustBeTheSame:"Bu alan şunlarla aynı olmalıdır: {{- fields}}",siteUsernameRule:"Sadece İngilizce küçük harfler, rakamlar ve semboller (-_.) kullanılabilir. Boşluk karakterine ve büyük harflere izin verilmez.",adminUsernameRule:"Sadece ingilizce harflerden ve rakamlardan oluşmalıdır. Semboller (-_. vs) ve boşluk karakteri kullanılamaz.",invalidURL:"Geçersiz URL",fieldMustBeDifferent:"Bu alan şunlarla aynı olmamalıdır: {{- fields}}",forbiddenWords:"Bu alan içerisinde bu kelimeyi kullanamazsınız."},uploader:{header:"Bir resmi sürükleyip bırakın",hint:"ya da bir dosya seçmek için tıklayın.",fileUploading:"Dosya yükleniyor...",info:"Toplam: {{- total}} - {{- estimated}} sn kaldı.",delete:"Sil",preview:"Önizleme",error:"Hata",fileFormatError:"Yalnızca {{fileFormat}} dosyası yükleyebilirsiniz.",fileSizeError:"Dosya boyutu {{fileSize}}'den küçük olmalıdır.",fileUploadSuccess:"Dosya başarıyla yüklendi.",fileUploadFailed:"Dosya yüklenemedi!",removeFileSuccess:"Dosya başarıyla silindi!",browserDoesntSupportDND:"Tarayıcı taşı&bırak özelliğini desteklemiyor!",calculating:"Hesaplanıyor...",removeFile:"Dosya Silme",areYouSureToDeleteThisFile:"Bu dosyayı silmek istediğinize emin misiniz?",yes:"Evet",no:"Hayır",cropImage:"Görseli Kırp",crop:"Kırp",cancel:"İptal",width:"genişlik",height:"yükseklik",imageTooSmall:"Görsel Çok Küçük",imageTooSmallMessage:"Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."},results:{authentication:{title:"Üye Girişi Gerekiyor",subtitle:"Bu bölüme ulaşmanız için üye girişi yapmanız gerekiyor. Aşağıdaki tuşa tıklayarak lütfen üye girişi yapınız.",button:"GİRİŞ YAP"}},currencies:{TRY:"Türk Lirası",EUR:"Euro",USD:"Dolar"},countries:{af:"Afganistan",al:"Arnavutluk",dz:"Cezayir",ad:"Andorra",ao:"Angola",ag:"Antigua ve Barbuda",ar:"Arjantin",am:"Ermenistan",au:"Avustralya",at:"Avusturya",az:"Azerbaycan",bs:"Bahamalar",bh:"Bahreyn",bd:"Bangladeş",bb:"Barbados",by:"Beyaz Rusya",be:"Belçika",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivya",ba:"Bosna-Hersek",bw:"Botsvana",br:"Brezilya",bn:"Brunei",bg:"Bulgaristan",bf:"Burkina Faso",bi:"Burundi",cv:"Yeşil Burun Adaları",kh:"Kamboçya",cm:"Kamerun",ca:"Kanada",cf:"Orta Afrika Cumhuriyeti",td:"Çad",cl:"Şili",cn:"Çin Halk Cumhuriyeti",co:"Kolombiya",km:"Komorlar",cg:"Kongo Cumhuriyeti",cd:"Demokratik Kongo",cr:"Kosta Rika",ci:"Fildişi Sahili",hr:"Hırvatistan",cu:"Küba",cw:"Curaçao",cy:"Güney Kıbrıs",cz:"Çek Cumhuriyeti",dk:"Danimarka",dj:"Cibuti",dm:"Dominika",do:"Dominik Cumhuriyeti",ec:"Ekvador",eg:"Mısır",sv:"El Salvador",gq:"Ekvator Ginesi",er:"Eritre",ee:"Estonya",sz:"Esvati̇ni̇",et:"Etiyopya",fj:"Fiji",fi:"Finlandiya",fr:"Fransa",ga:"Gabon",gm:"Gambia",ge:"Gürcistan",de:"Almanya",gh:"Gana",gr:"Yunanistan",gd:"Grenada",gt:"Guatemala",gn:"Gine",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Macaristan",is:"İzlanda",in:"Hindistan",id:"Endonezya",ir:"İran",iq:"Irak",ie:"Ireland",il:"İrlanda",it:"İtalya",jm:"Jamaika",jp:"Japonya",jo:"Ürdün",kz:"Kazakistan",ke:"Kenya",ki:"Kiribati",kp:"Kuzey Kore",kr:"Güney Kore",kw:"Kuveyt",kg:"Kırgızistan",la:"Laos",lv:"Letonya",lb:"Lübnan",ls:"Lesotho",lr:"Liberya",ly:"Libya",li:"Lihtenştayn",lt:"Litvanya",lu:"Lüksemburg",mg:"Madagaskar",mw:"Malavi",my:"Malezya",mv:"Maldivler",ml:"Mali",mt:"Malta",mh:"Marshall Adaları",mr:"Moritanya",mu:"Mauritius",mx:"Meksika",fm:"Mikronezya",md:"Moldova",mc:"Monako",mn:"Moğolistan",me:"Karadağ",ma:"Fas",mz:"Mozambik",mm:"Myanmar",na:"Namibya",nr:"Nauru",np:"Nepal",nl:"Hollanda",nz:"Yeni Zelanda",ni:"Nikaragua",ne:"Nijer",ng:"Nijerya",mk:"Makedonya",no:"Norveç",om:"Umman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua Yeni Gine",py:"Paraguay",pe:"Peru",ph:"Filipinler",pl:"Polonya",pt:"Portekiz",qa:"Katar",ro:"Romanya",ru:"Rusya",rw:"Ruanda",kn:"Saint Kitts ve Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Suudi Arabistan",sn:"Senegal",rs:"Sırbistan",sc:"Seyşeller",sl:"Sierra Leone",sg:"Singapur",sk:"Slovakya",si:"Slovenya",sb:"Solomon Adaları",so:"Somali",za:"Güney Afrika",ss:"Güney Sudan",es:"İspanya",lk:"Sri Lanka",sd:"Sudan",sr:"Surinam",se:"İsveç",ch:"İsviçre",sy:"Suriye",tj:"Tacikistan",tw:"Tayvan",tz:"Tanzanya",th:"Tayland",tl:"Doğu Timor",tg:"Togo",to:"Tonga",tt:"Trinidad ve Tobago",tn:"Tunus",tr:"Türkiye",tm:"Türkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukrayna",ae:"Birleşik Arap Emirlikleri",gb:"Birleşik Krallık",us:"Amerika Birleşik Devletleri",uy:"Uruguay",uz:"Özbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Vietnam",ye:"Yemen",zm:"Zambiya",zw:"Zimbabve"},calendar:{weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"}},J={success:"Success",error:"Error",table:{noData:"No Data"},placeholders:{username:"Username",email:"E-Mail",password:"Password",confirmPassword:"Confirm password",typeYourNoteHere:"Type your note here",selectGender:"Select Gender",selectCurrency:"Select Currency",selectLanguage:"Select Language",selectCountry:"Select Country",birthday:"Birthday",multipleSelection:"Selected ({{- count}})"},options:{all:"All",male:"Male",female:"Female",languages:{turkish:"Turkish",english:"English"},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"}},buttons:{submit:"Submit",reset:"Reset"},errors:{required:"This field is required!",minLength:"Should contain at least {{- length}} characters",maxLength:"Is too long. Max size is {{- length}}",passwordRule:"Your password must be at least 8 characters long, contain at least one digit, one uppercase letter, one lowercase letter, one special character, and must not contain spaces.",invalidEmailAddress:"Invalid email address",passwordsDontMatch:"The two passwords that you entered do not match!",usernameRule:"Only English letters, digits and symbols (-_.). No space is allowed",wrongTCIdentity:"Wrong TC Identity Number",fieldMustBeTheSame:"This field must be the same as: {{- fields}}",siteUsernameRule:"Only English lowercase letters, digits and symbols (-_.). No space is allowed, no uppercase letters are allowed",adminUsernameRule:"Only English letters and digits. No symbols (-_. vs) and no space is allowed",invalidURL:"Invalid URL",fieldMustBeDifferent:"This field must be different from: {{- fields}}",forbiddenWords:"You cannot use this word in this field."},uploader:{header:"Drag and drop an file",hint:"or Browse to choose a file",fileUploading:"File uploading...",info:"Total: {{- total}} - {{- estimated}} s remaining.",delete:"Delete",preview:"Preview",error:"Error",fileFormatError:"You can only upload {{fileFormat}} file",fileSizeError:"File must smaller than {{fileSize}}",fileUploadSuccess:"File successfully uploaded.",fileUploadFailed:"File upload failed!",removeFileSuccess:"File successfully delete!",browserDoesntSupportDND:"Browser doesn't support drag and drop!",calculating:"Calculating...",removeFile:"Remove File",areYouSureToDeleteThisFile:"Are you sure to delete this file?",yes:"Yes",no:"No",cropImage:"Crop Image",crop:"Crop",cancel:"Cancel",width:"width",height:"height",imageTooSmall:"Image Too Small",imageTooSmallMessage:"Minimum required size is {{required}}. Your image is {{actual}}."},results:{authentication:{title:"You Need To Sign In",subtitle:"You need to login to access this page. Please login by clicking the button below.",button:"LOGIN"}},currencies:{TRY:"Turkish Lira",EUR:"Euro",USD:"Dollar"},countries:{af:"Afghanistan",al:"Albania",dz:"Algeria",ad:"Andorra",ao:"Angola",ag:"Antigua and Barbuda",ar:"Argentina",am:"Armenia",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bt:"Bhutan",bo:"Bolivia",ba:"Bosnia and Herzegovina",bw:"Botswana",br:"Brazil",bn:"Brunei Darussalam",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",cv:"Cabo Verde",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",co:"Colombia",km:"Comoros",cg:"Congo",cd:"Congo, Democratic",cr:"Costa Rica",ci:"Côte d'Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curacao",cy:"Cyprus",cz:"Czechia",dk:"Denmark",dj:"Djibouti",dm:"Dominica",do:"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",sz:"Eswatini",et:"Ethiopia",fj:"Fiji",fi:"Finland",fr:"France",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gr:"Greece",gd:"Grenada",gt:"Guatemala",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hn:"Honduras",hu:"Hungary",is:"Iceland",in:"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kp:"North Korea",kr:"South Korea",kw:"Kuwait",kg:"Kyrgyzstan",la:"Lao People's",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mr:"Mauritania",mu:"Mauritius",mx:"Mexico",fm:"Micronesia",md:"Moldova, Republic of",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ma:"Morocco",mz:"Mozambique",mm:"Myanmar",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",mk:"North Macedonia",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pl:"Poland",pt:"Portugal",qa:"Qatar",ro:"Romania",ru:"Russian Federation",rw:"Rwanda",kn:"Saint Kitts and Nevis",lc:"Saint Lucia",vc:"Saint Vincent",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",sd:"Sudan",sr:"Suriname",se:"Sweden",ch:"Switzerland",sy:"Syrian Arab Republic",tj:"Tajikistan",tw:"Taiwan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",to:"Tonga",tt:"Trinidad and Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tv:"Tuvalu",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom",us:"United States of America",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Viet Nam",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe"},calendar:{weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"}},Z={weekdaysLong:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pt","Sa","Ça","Pe","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],firstDay:1,format:"DD/MM/YYYY"},Q={weekdaysLong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:0,format:"MM/DD/YYYY"};!function(e){e.NOT_SHOW="modal-not-show",e.BEGIN="modal-begin",e.ENTERING="modal-entering",e.ENTERED="modal-entered",e.EXITING="modal-exiting",e.EXITED="modal-exited",e.REMOVED="modal-removed",e.OK_CLICK="modal-ok-button-click",e.CANCEL_CLICK="modal-cancel-button-click",e.CLOSE_CLICK="modal-close-button-click",e.OUTSIDE_CLICK="modal-outside-click",e.ESC_CLICK="modal-esc-click",e.ALL_REMOVED="modal-all-removed"}(V||(V={})),function(e){e.SVG="image/svg+xml",e.PNG="image/png",e.JPG="image/jpeg",e.JPEG="image/jpeg",e.GIF="image/gif",e.WEBP="image/webp",e.PDF="application/pdf",e.OTF="font/otf"}(j||(j={})),function(e){e.SVG=".svg",e.PNG=".png",e.JPG=".jpg",e.GIF=".gif",e.WEBP=".webp",e.PDF=".pdf",e.OTF=".otf"}(H||(H={})),function(e){e.REQUIRED="required",e.TYPE="type"}(U||(U={})),function(e){e.MIN_LENGTH="minLength",e.MAX_LENGTH="maxLength",e.EXACT_LENGTH="exactLength",e.SAME="same",e.NOT_SAME="notSame",e.TC_IDENTITY="TCIdentity",e.PASSWORD="password",e.EMAIL="email",e.USERNAME="username",e.SITE_USERNAME="siteUsername",e.ADMIN_USERNAME="adminUsername",e.URL="url",e.FORBIDDEN_WORDS="forbiddenWords"}(G||(G={})),function(e){e.ONLINE="online",e.OFFLINE="offline"}(Y||(Y={})),function(e){e.X_SMALL="x-small",e.SMALL="small",e.MEDIUM="medium",e.DEFAULT="default",e.LARGE="large",e.X_LARGE="x-large"}(W||(W={})),function(e){e.X_SMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.DEFAULT="df",e.LARGE="lg",e.X_LARGE="xlg"}(q||(q={})),function(e){e.LEFT="left",e.RIGHT="right"}(X||(X={}));const ee=["background: #27C13A","color: #2b2b2b","line-height: 20px","border-radius: 20px"].join(";"),te=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),re=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),ne=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),ie=["background: #27C13A","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),oe=["background: #3598FE","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),ae=["background: #EAB62C","color: #2B2B2B","line-height: 20px","border-radius: 20px"].join(";"),le=["background: #C12727","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),se=["background: #2B2B2B","color: #cccccc","line-height: 20px","border-radius: 20px"].join(";"),de=["background-image: url('//i.giphy.com/XKCdA6ERnXp6M.webp')","background-size: 280px 200px","background-repeat: no-repeat","color: #000000","padding: 0px 75px 0 0","line-height: 200px"].join(";");let ce={single:(e,t="info")=>{if("fatal-error"!==t){var r="";"info"===t&&(r=ee),"warning"===t&&(r=re),"debug"===t&&(r=te),"error"===t&&(r=ne),console.log("%c "+e+" ",r)}else console.log("%c "+e,de)},double:(e,t,r="info")=>{if("fatal-error"!==r){var n="";"info"===r&&(n=ie),"warning"===r&&(n=ae),"debug"===r&&(n=oe),"error"===r&&(n=le),console.log("%c "+e+": %c "+t+" ",n,se)}else console.log("%c "+e+": %c "+t+" ",n,de)},table:e=>{console.table(e)}};const ue=e=>{let t;const[r,n]=s("");d(()=>()=>{document.body.removeChild(t)},[]);return{loadReCaptcha:e=>{t=document.createElement("script"),t.src="https://www.google.com/recaptcha/api.js?render="+e,t.onload=function(){n(e)},document.body.appendChild(t)},executeReCaptcha:()=>{if(""===r)return ce.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready(t=>{try{window.grecaptcha.execute(r,{action:"login"}).then(t=>{ce.double("ReCaptcha V3","Token is valid"),console.log("token: "+t),e&&e(t)})}catch(e){ce.double("ReCaptcha V3","Token is invalid","error")}})}}},pe=(e=()=>{})=>{const[t,r]=s(!1);t||(e(),r(!0))},he=(e,t=!1)=>{d(()=>{var n=!1,i=document.head,o=r();return document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&(n=!0)}),n||i.appendChild(o),()=>{t&&document.querySelectorAll("head > link").forEach(t=>{-1!==t.href.indexOf(e)&&document.head.removeChild(t)})}},[e]);const r=()=>{var t=document.createElement("link");return t.type="text/css",t.rel="stylesheet",t.href=e,t}},fe=(e,t)=>{d(()=>{const r=r=>{if(!r.target)return;if(0!==r.button)return r.stopPropagation(),void r.preventDefault();if(!e)return;if(!e.current)return;(e=>{const t=e.target.getBoundingClientRect();return e.clientX>t.right-20})(r)||e.current.contains(r.target)||t(r)};return document.addEventListener("pointerdown",r),()=>{document.removeEventListener("pointerdown",r)}},[e,t])},ge=e=>{d(()=>{const t=t=>{27===t.keyCode&&e(t)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},me=()=>{const[e,t]=$();return{set:(r="",n)=>{if(""===n||null===n||Array.isArray(n)&&0===n.length)e.delete(r);else if(Array.isArray(n)){const t=n.map(e=>encodeURIComponent(e.toString())).join(",");e.set(r,t)}else"boolean"==typeof n?e.set(r,n?"true":"false"):e.set(r,encodeURIComponent(n.toString()));t(e)},get:function(t="search",r,n){const i=e.get(t);if(null!==i){const e=decodeURIComponent(i);if(e.includes("&")){const i=((e,t)=>{const r={};return e.split("&").forEach((e,n)=>{if(e.includes("=")){const[t,n]=e.split("=");t&&void 0!==n&&(r[t]=n)}else 0===n&&e&&(r[t]=e)}),r})(e,t);if(!i[t])return r;{const e=i[t];if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if("string"==typeof r)return e;if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&r}}}if(void 0!==n&&e.length<n)return console.warn(`Parameter is shorter than the minimum length of ${n}. Returning default value.`),r;if(Array.isArray(r))try{return e.includes(",")?e.split(","):[e]}catch(e){return console.warn("Invalid array format, returning default value."),r}if("number"==typeof r){const t=Number(e);return isNaN(t)?r:t}if("boolean"==typeof r){const t=e.toLowerCase();return"true"===t||"false"!==t&&(console.warn("Invalid boolean format, returning default value."),r)}if("string"==typeof r)return e}return r},remove:(r="")=>{e.delete(r),t(e)},isEmpty:()=>0===Array.from(e.values()).length}},be=()=>{const[e,t]=$(),r=L();return{set:(n=[{type:"",value:""}])=>{n.forEach(t=>{""===t.value||void 0===t.value||null===t.value?e.delete(t.type):Array.isArray(t.value)?0===t.value.length?e.delete(t.type):e.set(t.type,decodeURIComponent(t.value.join()).toString()):e.set(t.type,t.value)}),t(e),r({search:F(e).toString()},{replace:!0})}}},ve=e=>{d(()=>{const t=t=>{e(t)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])},xe=e=>{d(()=>{const t=t=>{e(Y.ONLINE,t)},r=t=>{e(Y.OFFLINE,t)};return window.addEventListener(Y.ONLINE,t),window.addEventListener(Y.OFFLINE,r),()=>{window.removeEventListener(Y.ONLINE,t),window.removeEventListener(Y.OFFLINE,r)}},[e])},ye=e=>{const[t,r]=s({width:0,height:0});return d(()=>{if(!e.current)return;const t=new ResizeObserver(e=>{e.forEach(({target:e})=>{r({width:e.clientWidth,height:e.clientHeight})})});return t.observe(e.current),()=>t.disconnect()},[e]),[t]},we=()=>{const e=c(null);return{fetch:async({action:t="",requestMethod:r="",addOrigin:n=!0,params:i={},queries:o={},headers:a={},cancelable:l=!0,onFetched:s,onError:d,onCanceled:c,onProgress:u})=>{let p="",h={};Object.keys(o).forEach(e=>{p+="&"+e+"="+o[e]}),h["Content-Type"]="put"===r?"multipart/form-data":"application/json",n&&(h["Access-Control-Allow-Headers"]="Origin, X-Requested-With, Content-Type, Accept"),h={...h,...a};let f=D.post;"post"===r.toLocaleLowerCase()?f=D.post:"get"===r.toLocaleLowerCase()?f=D.get:"put"===r.toLocaleLowerCase()?f=D.put:"patch"===r.toLocaleLowerCase()&&(f=D.patch),await f(t+p,i,{headers:a,cancelToken:!!l&&(e.current=D.CancelToken.source(),e.current.token),onUploadProgress:e=>{u&&u(e)}}).then(e=>{s&&s(e)}).catch(e=>{console.log("error",e),console.log("error.message",e.message),D.isCancel(e.message)?c&&c(e.message):d&&d(e.message,0)})},cancel:()=>{e.current&&e.current.cancel("manually canceled!")}}},Ae=(...e)=>{if(0===e.length)return({children:e})=>n(i,{children:e});const t=e.map(u),r=c(t);return r.current=t,p(()=>({children:t})=>e.reduceRight((e,t,i)=>n(t.Provider,{value:r.current[i],children:e}),t),[])},ke=({key:e,onKeyPressed:t})=>{d(()=>{function r(r){r.key===e&&(r.preventDefault(),t())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,t])},_e=()=>{if(!("undefined"!=typeof window))return"landscape";const e=window.screen&&window.screen.orientation;if(e&&"string"==typeof e.type)return e.type.startsWith("portrait")?"portrait":"landscape";if("function"==typeof window.matchMedia)try{return window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}catch(e){}return window.innerHeight>=window.innerWidth?"portrait":"landscape"},Se=()=>{const[e,t]=s(()=>_e());return d(()=>{if(!("undefined"!=typeof window))return;const e=window.screen&&window.screen.orientation,r=()=>t(_e());if(e&&"function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof window.matchMedia){const e=window.matchMedia("(orientation: portrait)"),r=e=>{const r=e.matches;t(r?"portrait":"landscape")};if("function"==typeof e.addEventListener)return e.addEventListener("change",r),()=>e.removeEventListener("change",r);if("function"==typeof e.addListener)return e.addListener(r),()=>e.removeListener(r)}return window.addEventListener("orientationchange",r),window.addEventListener("resize",r),()=>{window.removeEventListener("orientationchange",r),window.removeEventListener("resize",r)}},[]),e},Ee=({obstacles:e=[".chat-bubble",".whatsapp-button",".cookie-consent","[data-fixed-obstacle='true']"],corner:t="bottom-right",autoAvoid:r=!0,extraBottom:n=0,minGap:i=8}={})=>{const[o,a]=s(n),l=p(()=>{let o=0;const l=()=>{if(!r)return void a(n);const o=window.innerHeight;let l=0;e.flatMap(e=>Array.from(document.querySelectorAll(e))).forEach(e=>{const r=getComputedStyle(e),n="none"===r.display||"hidden"===r.visibility||"0"===r.opacity,a="fixed"===r.position||"sticky"===r.position;if(n||!a)return;const s=e.getBoundingClientRect(),d=Math.max(0,o-s.top),c=Math.min(d,s.height),u=(()=>{const e=window.innerWidth/2;return"bottom-right"===t?s.right>e:"bottom-left"===t?s.left<e:s.left<=e&&s.right>=e})();c>0&&u&&(l=Math.max(l,Math.ceil(c+i)))}),a(l+n)};return{schedule:()=>{cancelAnimationFrame(o),o=requestAnimationFrame(l)},cancel:()=>cancelAnimationFrame(o)}},[e,t,r,n,i]);return d(()=>{l.schedule();const e=()=>l.schedule(),t=()=>l.schedule();window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0});const r=new MutationObserver(()=>l.schedule());r.observe(document.body,{childList:!0,subtree:!0,attributes:!0});const n=new ResizeObserver(()=>l.schedule());return n.observe(document.body),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t),r.disconnect(),n.disconnect(),l.cancel()}},[l]),{bottomOffset:o}},Ce=T`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -4136,7 +4136,7 @@ import e from"i18next";import{useTranslation as t,initReactI18next as r}from"rea
4136
4136
 
4137
4137
  }
4138
4138
 
4139
- `,vh=x(({id:e="itd-upload-"+qe(),resultFileName:r=null,action:i="",filePath:a="",binaryName:l="file",showDeleteIcon:u=!1,showPreviewIcon:p=!1,buttonsPosition:h="default",padding:f=10,fluid:g=!0,fileWidth:m="100%",fileHeight:b="auto",maxFileWidth:v="none",maxFileHeight:x="none",containerWidth:w="100%",containerHeight:A="auto",previewFileWidth:k="100%",previewFileHeight:_="100%",previewFilePadding:S="0",requestMethod:E="put",maxFileSize:C=1024,disabled:$=!1,extraFormData:L={},extraQueryString:F={},extraHeader:z={},fileTypes:N=[j.JPG,j.PNG,j.SVG,j.PDF],removeAction:D="",removeExtraFormData:M={},removeExtraQueryString:T={},removeExtraHeader:O={},enableCrop:I=!1,cropAspectRatio:R,cropMinWidth:P=50,cropMinHeight:B=50,cropQuality:V=.9,cropModalTitle:H,onUpdate:U,onUploadSuccess:G,onUploadFailed:Y,onRemoveFileSuccess:q,onRemoveFileFailed:X},K)=>{const J=c(null),{addNotification:Z}=ho.useNotifications(),{showModal:Q}=Tt.useModal(),{fetch:ee,cancel:te}=we(),{t:re}=t("itd"),[ne,ie]=s(!1),[oe,ae]=s(!1),[le,se]=s(".svg, .png, .jpg"),[de,ce]=s(!1),[ue,pe]=s(!1),[he,fe]=s(!1),[ge,me]=s(null),[be,ve]=s(null),[xe,ye]=s(""),[Ae,ke]=s(!1),[_e,Se]=s(!1),[Ee,Ce]=s(null),[$e,Le]=s(!1),[Fe,ze]=s(null),[Ne,De]=s(null);d(()=>()=>{te()},[]),d(()=>{ae($)},[$]),d(()=>{ve(a?a.split("?")[0]:"")},[a]),d(()=>{null!==be&&(void 0!==be?Oe():ie(!1))},[be]),d(()=>{let e=[];N.map(t=>{e.push(Ro(t))}),se(e.join(", "))},[N]);const Me=(e,t)=>{Z({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},Te=(e,t=!0,r=!0)=>{U&&U(e,t,r)};y(K,()=>({setFocus(){fe(!0)},reset(e=!1,t=!1){Ie(),ve(null),ye(""),Te("",e,t)},setValue(e,t=!0,r=!0){ve(e),Te(e,t,r)},getValue:()=>be||"",setError(e){ye(e)},forceUpdate(){Te(be||"")},clear(){ve("")}}));const Oe=async()=>{let e=!1;be&&(e=await To(be),me(e),e?Te(be):Te("",!0,!0),ne||ie(!0)),""!==be||ne||ie(!0),""===be&&ne&&Te("",!0,!0)},Ie=()=>{ze(null),Ce(null),Le(!1),me(null)},Re=async()=>{ae(!0),Q({content:n("div",{children:re("uploader.areYouSureToDeleteThisFile")}),title:re("uploader.removeFile"),okButtonText:re("uploader.yes"),cancelButtonText:re("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(D?ee({action:D,params:M,queries:T,headers:O,onFetched:e=>{e.data.success?(Ie(),Te("",!0,!0),q&&q(e.data.data)):X&&X()},onError:()=>{X&&X()}}):(Ie(),Te("",!0,!0),q&&q()),ae(!1),!0),onCancel:()=>(ae(!1),!0)})},Pe=e=>{e.preventDefault(),_e||pe(!0)},Be=e=>{e.preventDefault(),_e||pe(!1)},Ve=e=>{e.preventDefault(),_e||(pe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?Ge(e.dataTransfer.files[0]):console.log(re("uploader.browserDoesntSupportDND")))},je=e=>{pe(!1);const t=e.target.files[0];Ge(t)},He=async({path:e,errorMessage:t,errorCode:r})=>{await Po(1e3),Ce(null),Se(!1),await Po(1500),Le(!1),e?G&&G(e):t&&Y&&Y(t,r||0)},Ue=async e=>{if(!e)return;let t=new FormData;t.append(l,e),r&&t.append("name",r),Object.keys(L).forEach(e=>{t.append(e,L[e])}),ee({action:i,requestMethod:E,params:t,queries:F,headers:z,onFetched:e=>{e.data.success?(ze({message:re("uploader.fileUploadSuccess"),status:"success"}),Le(!0),ve(e.data.data.url),He({path:e.data.data.url})):(ze({message:re("uploader.fileUploadFailed"),status:"error"}),Te("",!0,!0),He({errorMessage:re("uploader.fileUploadFailed")}))},onError:(e,t)=>{ze({message:re("uploader.fileUploadFailed"),status:"error"}),Te("",!0,!0),He({errorMessage:e,errorCode:t})},onProgress:e=>{Ce({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?Io(e.bytes):"",total:e.total?Io(e.total):""})}})},Ge=e=>{if(e&&(e=>!!N.includes(e.type)||(Me(re("uploader.error"),re("uploader.fileFormatError",{fileFormat:le})),!1))(e)&&(e=>!(e.size>1024*C&&(Me(re("uploader.error"),re("uploader.fileSizeError",{fileSize:Io(1024*C)})),1)))(e)){if(r){const t=Ro(e.type);e=new File([e],r+t,{type:t,lastModified:e.lastModified})}if(I&&e.type.startsWith("image/")&&e.type!==j.SVG){De(e);const t=new FileReader;return t.onload=t=>{Ye(t.target?.result,e)},void t.readAsDataURL(e)}Ue(e),Se(!0)}},Ye=(e,t)=>{let i=null,a=null;const l=t.type===j.PNG?"image/png":"image/webp"===t.type?"image/webp":"image/jpeg",s=async()=>{if(!i)return;const e=await i.getCroppedFile(r||Ne?.name.split(".")[0]||"cropped");e&&(De(null),a?.(),Ue(e),Se(!0))},d=()=>{De(null),J.current&&(J.current.value=""),a?.()};Q({title:H||re("uploader.cropImage"),content:n(({hideCurrentModal:t})=>(a=t||null,o("div",{style:{width:"100%"},children:[n("div",{style:{minHeight:"400px",marginBottom:"20px"},children:n(Sh,{ref:e=>{i=e},src:e,aspectRatio:R,minWidth:P,minHeight:B,quality:V,outputFormat:l,width:"100%",height:"400px"})}),o(lg,{justify:"flex-end",gap:"small",children:[n(Qe,{variant:"ghost",onClick:d,children:re("uploader.cancel")}),n(Qe,{variant:"solid",onClick:s,children:re("uploader.crop")})]})]})),{}),showOkButton:!1,showCancelButton:!1,closeOnClickOutside:!1,showCloseButton:!0,width:"600px",onCancel:()=>(d(),!0)})},We=()=>{ae(!0),Q({content:n(uh,{className:"itd-upload-preview-content",$width:k,$height:_,$padding:S,children:n(Ua,{src:be||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(ae(!1),!0)})},Xe=()=>{if(u&&be&&!_e&&ge)return n("span",{className:"delete-icon",children:n(Qe,{variant:"solid",size:W.SMALL,type:"button",circle:!0,onClick:Re,disabled:oe,icon:n(pa,{width:16,height:16}),className:"itd-upload-delete-button"})})},Ke=()=>{if(p&&be&&!_e&&ge)return n("span",{className:"preview-icon",children:n(Qe,{variant:"solid",size:W.SMALL,type:"button",circle:!0,onClick:We,disabled:oe,icon:n(ha,{width:16,height:16}),className:"itd-upload-preview-button"})})},Je=n("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:n("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:o("g",{id:"ErrorGroup",fillRule:"nonzero",children:[n("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),n("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),Ze=()=>{if(""===xe||_e)return;return o(mh,{...{className:"itd-upload-failed itd-failed-status",onPointerOver:()=>ke(!0),onPointerOut:()=>ke(!1)},children:[Ae?n(bh,{className:"itd-upload-error-tooltip itd-error-tooltip",children:xe}):null,Je]})},et=()=>{if(ne)return null===ge?n(sa,{width:24,height:24}):!1===ge?n(ga,{width:40,height:40}):n(Ua,{src:be||"",width:qo(m),height:qo(b)})},tt=()=>{let e=(de||ue)&&!_e&&!oe;return n(hh,{$isHover:e,className:"itd-upload-overlay",children:o(ph,{$isHover:e,className:"itd-upload-overlay-content",children:[n("span",{className:"itd-upload-header",children:re("uploader.header")}),n("span",{className:"itd-upload-hint",children:re("uploader.hint")})]})})};return o(lh,{className:"itd-upload",$fluid:g,children:[n("input",{type:"file",id:e,accept:le,onChange:je,onFocus:e=>{e.target.matches(":focus-visible")&&fe(!0)},onBlur:()=>fe(!1),onPointerOver:()=>{!ue&&ce(!0)},onPointerOut:()=>{!ue&&ce(!1)},onDragOver:Pe,onDragLeave:Be,onDrop:Ve,disabled:_e||oe,ref:J}),n(dh,{$showFocus:he,className:"itd-upload-label",children:o(sh,{$showBorder:(ue||de)&&!_e,$padding:f,$disabled:$,$hasError:""!==xe&&!_e,$fileWidth:m,$fileHeight:b,$maxFileWidth:v,$maxFileHeight:x,$containerWidth:w,$containerHeight:A,className:"itd-upload-content",children:[et(),o(fh,{className:"itd-upload-status",$isActive:_e,$complete:"success"===Fe?.status,$error:"error"===Fe?.status,children:[n(gh,{className:"itd-upload-status-box",$progress:Ee?Ee.progress:0,$complete:"success"===Fe?.status,$error:"error"===Fe?.status}),n("span",{className:"itd-upload-status-message",children:re($e||Fe?String(Fe?.message):"uploader.fileUploading")}),n("span",Ee?{className:"itd-upload-status-info",children:re("uploader.info",{total:Ee.total,estimated:Ee.estimated})}:{className:"itd-upload-status-calculating",children:re("uploader.calculating")})]}),tt(),o(ch,{$position:""===xe?h:"default",children:[o(lg,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Xe(),Ke()]}),Ze()]})]})})]})}),xh=M.div`
4139
+ `,vh=x(({id:e="itd-upload-"+qe(),resultFileName:r=null,action:i="",filePath:a="",binaryName:l="file",showDeleteIcon:u=!1,showPreviewIcon:p=!1,buttonsPosition:h="default",padding:f=10,fluid:g=!0,fileWidth:m="100%",fileHeight:b="auto",maxFileWidth:v="none",maxFileHeight:x="none",containerWidth:w="100%",containerHeight:A="auto",previewFileWidth:k="100%",previewFileHeight:_="100%",previewFilePadding:S="0",requestMethod:E="put",maxFileSize:C=1024,disabled:$=!1,extraFormData:L={},extraQueryString:F={},extraHeader:z={},fileTypes:N=[j.JPG,j.PNG,j.SVG,j.PDF],removeAction:D="",removeExtraFormData:M={},removeExtraQueryString:T={},removeExtraHeader:O={},minImageWidth:I,minImageHeight:R,enableCrop:P=!1,cropAspectRatio:B,cropMinWidth:V=50,cropMinHeight:H=50,cropQuality:U=.9,cropModalTitle:G,onUpdate:Y,onUploadSuccess:q,onUploadFailed:X,onRemoveFileSuccess:K,onRemoveFileFailed:J},Z)=>{const Q=c(null),{addNotification:ee}=ho.useNotifications(),{showModal:te}=Tt.useModal(),{fetch:re,cancel:ne}=we(),{t:ie}=t("itd"),[oe,ae]=s(!1),[le,se]=s(!1),[de,ce]=s(".svg, .png, .jpg"),[ue,pe]=s(!1),[he,fe]=s(!1),[ge,me]=s(!1),[be,ve]=s(null),[xe,ye]=s(null),[Ae,ke]=s(""),[_e,Se]=s(!1),[Ee,Ce]=s(!1),[$e,Le]=s(null),[Fe,ze]=s(!1),[Ne,De]=s(null),[Me,Te]=s(null);d(()=>()=>{ne()},[]),d(()=>{se($)},[$]),d(()=>{ye(a?a.split("?")[0]:"")},[a]),d(()=>{null!==xe&&(void 0!==xe?Re():ae(!1))},[xe]),d(()=>{let e=[];N.map(t=>{e.push(Ro(t))}),ce(e.join(", "))},[N]);const Oe=(e,t)=>{ee({title:e,description:t,placement:"topRight",autoHide:!0,delay:5e3,type:"error"})},Ie=(e,t=!0,r=!0)=>{Y&&Y(e,t,r)};y(Z,()=>({setFocus(){me(!0)},reset(e=!1,t=!1){Pe(),ye(null),ke(""),Ie("",e,t)},setValue(e,t=!0,r=!0){ye(e),Ie(e,t,r)},getValue:()=>xe||"",setError(e){ke(e)},forceUpdate(){Ie(xe||"")},clear(){ye("")}}));const Re=async()=>{let e=!1;xe&&(e=await To(xe),ve(e),e?Ie(xe):Ie("",!0,!0),oe||ae(!0)),""!==xe||oe||ae(!0),""===xe&&oe&&Ie("",!0,!0)},Pe=()=>{De(null),Le(null),ze(!1),ve(null)},Be=async()=>{se(!0),te({content:n("div",{children:ie("uploader.areYouSureToDeleteThisFile")}),title:ie("uploader.removeFile"),okButtonText:ie("uploader.yes"),cancelButtonText:ie("uploader.no"),okButtonProps:{variant:"statable",state:"reject"},closeOnClickOutside:!1,showCloseButton:!1,onOk:()=>(D?re({action:D,params:M,queries:T,headers:O,onFetched:e=>{e.data.success?(Pe(),Ie("",!0,!0),K&&K(e.data.data)):J&&J()},onError:()=>{J&&J()}}):(Pe(),Ie("",!0,!0),K&&K()),se(!1),!0),onCancel:()=>(se(!1),!0)})},Ve=e=>{e.preventDefault(),Ee||fe(!0)},je=e=>{e.preventDefault(),Ee||fe(!1)},He=e=>{e.preventDefault(),Ee||(fe(!1),e.dataTransfer&&0!==e.dataTransfer.files.length?We(e.dataTransfer.files[0]):console.log(ie("uploader.browserDoesntSupportDND")))},Ue=e=>{fe(!1);const t=e.target.files[0];We(t)},Ge=async({path:e,errorMessage:t,errorCode:r})=>{await Po(1e3),Le(null),Ce(!1),await Po(1500),ze(!1),e?q&&q(e):t&&X&&X(t,r||0)},Ye=async e=>{if(!e)return;let t=new FormData;t.append(l,e),r&&t.append("name",r),Object.keys(L).forEach(e=>{t.append(e,L[e])}),re({action:i,requestMethod:E,params:t,queries:F,headers:z,onFetched:e=>{e.data.success?(De({message:ie("uploader.fileUploadSuccess"),status:"success"}),ze(!0),ye(e.data.data.url),Ge({path:e.data.data.url})):(De({message:ie("uploader.fileUploadFailed"),status:"error"}),Ie("",!0,!0),Ge({errorMessage:ie("uploader.fileUploadFailed")}))},onError:(e,t)=>{De({message:ie("uploader.fileUploadFailed"),status:"error"}),Ie("",!0,!0),Ge({errorMessage:e,errorCode:t})},onProgress:e=>{Le({estimated:e.estimated?(Math.round(100*e.estimated)/100).toFixed(2):"0",progress:e.progress?Math.round(100*e.progress):0,bytes:e.bytes?Io(e.bytes):"",total:e.total?Io(e.total):""})}})},We=async e=>{if(!e)return;if(!(e=>!!N.includes(e.type)||(Oe(ie("uploader.error"),ie("uploader.fileFormatError",{fileFormat:de})),!1))(e))return;if(!(e=>!(e.size>1024*C&&(Oe(ie("uploader.error"),ie("uploader.fileSizeError",{fileSize:Io(1024*C)})),1)))(e))return;const t=await(e=>new Promise(t=>{if(!e.type.startsWith("image/")||e.type===j.SVG)return void t(!0);if(!I&&!R)return void t(!0);const r=new window.Image,n=URL.createObjectURL(e);r.onload=()=>{URL.revokeObjectURL(n);const e=!I||r.naturalWidth>=I,i=!R||r.naturalHeight>=R;if(!e||!i){const e=I&&R?`${I}x${R}`:I?`${I}px ${ie("uploader.width")}`:`${R}px ${ie("uploader.height")}`,n=`${r.naturalWidth}x${r.naturalHeight}`;return Oe(ie("uploader.imageTooSmall"),ie("uploader.imageTooSmallMessage",{required:e,actual:n})),Q.current&&(Q.current.value=""),void t(!1)}t(!0)},r.onerror=()=>{URL.revokeObjectURL(n),t(!0)},r.src=n}))(e);if(t){if(r){const t=Ro(e.type);e=new File([e],r+t,{type:t,lastModified:e.lastModified})}if(P&&e.type.startsWith("image/")&&e.type!==j.SVG){Te(e);const t=new FileReader;return t.onload=t=>{Xe(t.target?.result,e)},void t.readAsDataURL(e)}Ye(e),Ce(!0)}},Xe=(e,t)=>{let i=null,a=null;const l=t.type===j.PNG?"image/png":"image/webp"===t.type?"image/webp":"image/jpeg",s=async()=>{if(!i)return;const e=await i.getCroppedFile(r||Me?.name.split(".")[0]||"cropped");e&&(Te(null),a?.(),Ye(e),Ce(!0))},d=()=>{Te(null),Q.current&&(Q.current.value=""),a?.()};te({title:G||ie("uploader.cropImage"),content:n(({hideCurrentModal:t})=>(a=t||null,o("div",{style:{width:"100%"},children:[n("div",{style:{minHeight:"400px",marginBottom:"20px"},children:n(Sh,{ref:e=>{i=e},src:e,aspectRatio:B,minWidth:V,minHeight:H,quality:U,outputFormat:l,width:"100%",height:"400px"})}),o(lg,{justify:"flex-end",gap:"small",children:[n(Qe,{variant:"ghost",onClick:d,children:ie("uploader.cancel")}),n(Qe,{variant:"solid",onClick:s,children:ie("uploader.crop")})]})]})),{}),showOkButton:!1,showCancelButton:!1,closeOnClickOutside:!1,showCloseButton:!0,width:"600px",onCancel:()=>(d(),!0)})},Ke=()=>{se(!0),te({content:n(uh,{className:"itd-upload-preview-content",$width:k,$height:_,$padding:S,children:n(Ua,{src:xe||""})}),showOkButton:!1,showCancelButton:!1,contentPadding:"0px",width:"max-content",onCancel:()=>(se(!1),!0)})},Je=()=>{if(u&&xe&&!Ee&&be)return n("span",{className:"delete-icon",children:n(Qe,{variant:"solid",size:W.SMALL,type:"button",circle:!0,onClick:Be,disabled:le,icon:n(pa,{width:16,height:16}),className:"itd-upload-delete-button"})})},Ze=()=>{if(p&&xe&&!Ee&&be)return n("span",{className:"preview-icon",children:n(Qe,{variant:"solid",size:W.SMALL,type:"button",circle:!0,onClick:Ke,disabled:le,icon:n(ha,{width:16,height:16}),className:"itd-upload-preview-button"})})},et=n("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:n("g",{id:"Error",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:o("g",{id:"ErrorGroup",fillRule:"nonzero",children:[n("circle",{id:"ErrorBackground",fill:"#F8285A",cx:"10",cy:"10",r:"10"}),n("path",{d:"M10.0355339,8.6213203 L12.863961,5.79289322 C13.2544853,5.40236893 13.8876503,5.40236893 14.2781746,5.79289322 C14.6686989,6.18341751 14.6686989,6.81658249 14.2781746,7.20710678 L11.4497475,10.0355339 \n L14.2781746,12.863961 C14.6686989,13.2544853 14.6686989,13.8876503 14.2781746,14.2781746 C13.8876503,14.6686989 13.2544853,14.6686989 12.863961,14.2781746 L10.0355339,11.4497475 L7.20710678,14.2781746\n C6.81658249,14.6686989 6.18341751,14.6686989 5.79289322,14.2781746 C5.40236893,13.8876503 5.40236893,13.2544853 5.79289322,12.863961 L8.6213203,10.0355339 L5.79289322,7.20710678 C5.40236893,6.81658249\n 5.40236893,6.18341751 5.79289322,5.79289322 C6.18341751,5.40236893 6.81658249,5.40236893 7.20710678,5.79289322 L10.0355339,8.6213203 Z",id:"ErrorIcon",fill:"#FFFFFF"})]})})}),tt=()=>{if(""===Ae||Ee)return;return o(mh,{...{className:"itd-upload-failed itd-failed-status",onPointerOver:()=>Se(!0),onPointerOut:()=>Se(!1)},children:[_e?n(bh,{className:"itd-upload-error-tooltip itd-error-tooltip",children:Ae}):null,et]})},rt=()=>{if(oe)return null===be?n(sa,{width:24,height:24}):!1===be?n(ga,{width:40,height:40}):n(Ua,{src:xe||"",width:qo(m),height:qo(b)})},nt=()=>{let e=(ue||he)&&!Ee&&!le;return n(hh,{$isHover:e,className:"itd-upload-overlay",children:o(ph,{$isHover:e,className:"itd-upload-overlay-content",children:[n("span",{className:"itd-upload-header",children:ie("uploader.header")}),n("span",{className:"itd-upload-hint",children:ie("uploader.hint")})]})})};return o(lh,{className:"itd-upload",$fluid:g,children:[n("input",{type:"file",id:e,accept:de,onChange:Ue,onFocus:e=>{e.target.matches(":focus-visible")&&me(!0)},onBlur:()=>me(!1),onPointerOver:()=>{!he&&pe(!0)},onPointerOut:()=>{!he&&pe(!1)},onDragOver:Ve,onDragLeave:je,onDrop:He,disabled:Ee||le,ref:Q}),n(dh,{$showFocus:ge,className:"itd-upload-label",children:o(sh,{$showBorder:(he||ue)&&!Ee,$padding:f,$disabled:$,$hasError:""!==Ae&&!Ee,$fileWidth:m,$fileHeight:b,$maxFileWidth:v,$maxFileHeight:x,$containerWidth:w,$containerHeight:A,className:"itd-upload-content",children:[rt(),o(fh,{className:"itd-upload-status",$isActive:Ee,$complete:"success"===Ne?.status,$error:"error"===Ne?.status,children:[n(gh,{className:"itd-upload-status-box",$progress:$e?$e.progress:0,$complete:"success"===Ne?.status,$error:"error"===Ne?.status}),n("span",{className:"itd-upload-status-message",children:ie(Fe||Ne?String(Ne?.message):"uploader.fileUploading")}),n("span",$e?{className:"itd-upload-status-info",children:ie("uploader.info",{total:$e.total,estimated:$e.estimated})}:{className:"itd-upload-status-calculating",children:ie("uploader.calculating")})]}),nt(),o(ch,{$position:""===Ae?h:"default",children:[o(lg,{vertical:!0,gap:"small",className:"itd-upload-icons",children:[Je(),Ze()]}),tt()]})]})})]})}),xh=M.div`
4140
4140
  position: relative;
4141
4141
  width: ${({$width:e})=>"number"==typeof e?`${e}px`:e||"100%"};
4142
4142
  height: ${({$height:e})=>"number"==typeof e?`${e}px`:e||"400px"};
@@ -72,7 +72,11 @@
72
72
  "no": "No",
73
73
  "cropImage": "Crop Image",
74
74
  "crop": "Crop",
75
- "cancel": "Cancel"
75
+ "cancel": "Cancel",
76
+ "width": "width",
77
+ "height": "height",
78
+ "imageTooSmall": "Image Too Small",
79
+ "imageTooSmallMessage": "Minimum required size is {{required}}. Your image is {{actual}}."
76
80
  },
77
81
  "results": {
78
82
  "authentication": {
@@ -73,7 +73,11 @@
73
73
  "no": "Hayır",
74
74
  "cropImage": "Görseli Kırp",
75
75
  "crop": "Kırp",
76
- "cancel": "İptal"
76
+ "cancel": "İptal",
77
+ "width": "genişlik",
78
+ "height": "yükseklik",
79
+ "imageTooSmall": "Görsel Çok Küçük",
80
+ "imageTooSmallMessage": "Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."
77
81
  },
78
82
  "results": {
79
83
  "authentication": {
@@ -73,7 +73,11 @@
73
73
  "no": "Hayır",
74
74
  "cropImage": "Görseli Kırp",
75
75
  "crop": "Kırp",
76
- "cancel": "İptal"
76
+ "cancel": "İptal",
77
+ "width": "genişlik",
78
+ "height": "yükseklik",
79
+ "imageTooSmall": "Görsel Çok Küçük",
80
+ "imageTooSmallMessage": "Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."
77
81
  },
78
82
  "results": {
79
83
  "authentication": {
@@ -18,4 +18,5 @@ export declare const Disabled: Story;
18
18
  export declare const NoDefinedFile: Story;
19
19
  export declare const CropEnabled: Story;
20
20
  export declare const CropEnabled16x9: Story;
21
+ export declare const CropEnabledRetina: Story;
21
22
  export declare const Error: Story;
@@ -30,6 +30,10 @@ export type UploadProps = {
30
30
  extraQueryString?: {};
31
31
  extraHeader?: {};
32
32
  disabled?: boolean;
33
+ /** Minimum image width required for upload (in pixels). Smaller images will be rejected. */
34
+ minImageWidth?: number;
35
+ /** Minimum image height required for upload (in pixels). Smaller images will be rejected. */
36
+ minImageHeight?: number;
33
37
  /** Enable image cropping before upload */
34
38
  enableCrop?: boolean;
35
39
  /** Aspect ratio for crop (e.g., 1 for square, 16/9 for widescreen). Undefined = free crop */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",