@jjlmoya/utils-finance 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +159 -0
  3. package/src/category/i18n/es.ts +159 -0
  4. package/src/category/i18n/fr.ts +159 -0
  5. package/src/category/index.ts +24 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +32 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +39 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +23 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/compoundInterest/bibliography.astro +14 -0
  25. package/src/tool/compoundInterest/component.astro +697 -0
  26. package/src/tool/compoundInterest/i18n/en.ts +212 -0
  27. package/src/tool/compoundInterest/i18n/es.ts +212 -0
  28. package/src/tool/compoundInterest/i18n/fr.ts +212 -0
  29. package/src/tool/compoundInterest/index.ts +34 -0
  30. package/src/tool/compoundInterest/logic.ts +40 -0
  31. package/src/tool/compoundInterest/seo.astro +14 -0
  32. package/src/tool/compoundInterest/ui.ts +19 -0
  33. package/src/tool/courtFeeCalculator/bibliography.astro +14 -0
  34. package/src/tool/courtFeeCalculator/component.astro +427 -0
  35. package/src/tool/courtFeeCalculator/i18n/en.ts +268 -0
  36. package/src/tool/courtFeeCalculator/i18n/es.ts +268 -0
  37. package/src/tool/courtFeeCalculator/i18n/fr.ts +268 -0
  38. package/src/tool/courtFeeCalculator/index.ts +33 -0
  39. package/src/tool/courtFeeCalculator/logic.ts +86 -0
  40. package/src/tool/courtFeeCalculator/seo.astro +14 -0
  41. package/src/tool/courtFeeCalculator/ui.ts +31 -0
  42. package/src/tool/debtSnowball/bibliography.astro +14 -0
  43. package/src/tool/debtSnowball/component.astro +1052 -0
  44. package/src/tool/debtSnowball/i18n/en.ts +288 -0
  45. package/src/tool/debtSnowball/i18n/es.ts +288 -0
  46. package/src/tool/debtSnowball/i18n/fr.ts +288 -0
  47. package/src/tool/debtSnowball/index.ts +37 -0
  48. package/src/tool/debtSnowball/logic.ts +156 -0
  49. package/src/tool/debtSnowball/seo.astro +14 -0
  50. package/src/tool/debtSnowball/ui.ts +49 -0
  51. package/src/tool/fireCalculator/bibliography.astro +14 -0
  52. package/src/tool/fireCalculator/component.astro +689 -0
  53. package/src/tool/fireCalculator/i18n/en.ts +261 -0
  54. package/src/tool/fireCalculator/i18n/es.ts +261 -0
  55. package/src/tool/fireCalculator/i18n/fr.ts +261 -0
  56. package/src/tool/fireCalculator/index.ts +33 -0
  57. package/src/tool/fireCalculator/logic.ts +108 -0
  58. package/src/tool/fireCalculator/seo.astro +14 -0
  59. package/src/tool/fireCalculator/ui.ts +33 -0
  60. package/src/tool/ibanBicSwiftConverter/bibliography.astro +14 -0
  61. package/src/tool/ibanBicSwiftConverter/component.astro +581 -0
  62. package/src/tool/ibanBicSwiftConverter/i18n/en.ts +167 -0
  63. package/src/tool/ibanBicSwiftConverter/i18n/es.ts +216 -0
  64. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +167 -0
  65. package/src/tool/ibanBicSwiftConverter/index.ts +33 -0
  66. package/src/tool/ibanBicSwiftConverter/logic.ts +101 -0
  67. package/src/tool/ibanBicSwiftConverter/seo.astro +14 -0
  68. package/src/tool/ibanBicSwiftConverter/ui.ts +17 -0
  69. package/src/tool/inflation/bibliography.astro +14 -0
  70. package/src/tool/inflation/component.astro +400 -0
  71. package/src/tool/inflation/i18n/en.ts +301 -0
  72. package/src/tool/inflation/i18n/es.ts +301 -0
  73. package/src/tool/inflation/i18n/fr.ts +301 -0
  74. package/src/tool/inflation/index.ts +34 -0
  75. package/src/tool/inflation/logic.ts +92 -0
  76. package/src/tool/inflation/seo.astro +14 -0
  77. package/src/tool/inflation/ui.ts +17 -0
  78. package/src/tool/lateInterest/bibliography.astro +14 -0
  79. package/src/tool/lateInterest/component.astro +655 -0
  80. package/src/tool/lateInterest/i18n/en.ts +255 -0
  81. package/src/tool/lateInterest/i18n/es.ts +224 -0
  82. package/src/tool/lateInterest/i18n/fr.ts +224 -0
  83. package/src/tool/lateInterest/index.ts +34 -0
  84. package/src/tool/lateInterest/logic.ts +89 -0
  85. package/src/tool/lateInterest/seo.astro +14 -0
  86. package/src/tool/lateInterest/ui.ts +33 -0
  87. package/src/tool/legalInterestRate/bibliography.astro +14 -0
  88. package/src/tool/legalInterestRate/component.astro +650 -0
  89. package/src/tool/legalInterestRate/i18n/en.ts +159 -0
  90. package/src/tool/legalInterestRate/i18n/es.ts +159 -0
  91. package/src/tool/legalInterestRate/i18n/fr.ts +159 -0
  92. package/src/tool/legalInterestRate/index.ts +33 -0
  93. package/src/tool/legalInterestRate/logic.ts +29 -0
  94. package/src/tool/legalInterestRate/seo.astro +14 -0
  95. package/src/tool/legalInterestRate/ui.ts +23 -0
  96. package/src/tool/lotteryOptimizer/bibliography.astro +14 -0
  97. package/src/tool/lotteryOptimizer/component.astro +863 -0
  98. package/src/tool/lotteryOptimizer/i18n/en.ts +188 -0
  99. package/src/tool/lotteryOptimizer/i18n/es.ts +281 -0
  100. package/src/tool/lotteryOptimizer/i18n/fr.ts +188 -0
  101. package/src/tool/lotteryOptimizer/index.ts +33 -0
  102. package/src/tool/lotteryOptimizer/logic.ts +133 -0
  103. package/src/tool/lotteryOptimizer/seo.astro +14 -0
  104. package/src/tool/lotteryOptimizer/ui.ts +33 -0
  105. package/src/tool/mortgage/bibliography.astro +14 -0
  106. package/src/tool/mortgage/component.astro +1030 -0
  107. package/src/tool/mortgage/i18n/en.ts +227 -0
  108. package/src/tool/mortgage/i18n/es.ts +227 -0
  109. package/src/tool/mortgage/i18n/fr.ts +227 -0
  110. package/src/tool/mortgage/index.ts +34 -0
  111. package/src/tool/mortgage/logic.ts +118 -0
  112. package/src/tool/mortgage/seo.astro +14 -0
  113. package/src/tool/mortgage/ui.ts +35 -0
  114. package/src/tool/percentageCalculator/bibliography.astro +14 -0
  115. package/src/tool/percentageCalculator/component.astro +640 -0
  116. package/src/tool/percentageCalculator/i18n/en.ts +233 -0
  117. package/src/tool/percentageCalculator/i18n/es.ts +233 -0
  118. package/src/tool/percentageCalculator/i18n/fr.ts +233 -0
  119. package/src/tool/percentageCalculator/index.ts +34 -0
  120. package/src/tool/percentageCalculator/logic.ts +48 -0
  121. package/src/tool/percentageCalculator/seo.astro +14 -0
  122. package/src/tool/percentageCalculator/ui.ts +30 -0
  123. package/src/tool/rentIncreaseCalculator/bibliography.astro +14 -0
  124. package/src/tool/rentIncreaseCalculator/component.astro +587 -0
  125. package/src/tool/rentIncreaseCalculator/i18n/en.ts +159 -0
  126. package/src/tool/rentIncreaseCalculator/i18n/es.ts +220 -0
  127. package/src/tool/rentIncreaseCalculator/i18n/fr.ts +159 -0
  128. package/src/tool/rentIncreaseCalculator/index.ts +33 -0
  129. package/src/tool/rentIncreaseCalculator/logic.ts +43 -0
  130. package/src/tool/rentIncreaseCalculator/seo.astro +14 -0
  131. package/src/tool/rentIncreaseCalculator/ui.ts +19 -0
  132. package/src/tools.ts +16 -0
  133. package/src/types.ts +74 -0
@@ -0,0 +1,167 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { IBANBICSwiftUI } from '../ui';
4
+
5
+ const slug = 'iban-to-bic-swift-converter';
6
+ const title = 'IBAN to BIC SWIFT Converter and Bank Code Finder';
7
+ const description = 'Get the BIC/SWIFT code from any Spanish IBAN instantly. Bank account validator with official algorithm and updated records for international transfers.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'What is a BIC or SWIFT code?',
12
+ answer: 'It is the international identifier of your bank. It is necessary so that money knows which institution it should be directed to when traveling outside the SEPA zone (Europe).',
13
+ },
14
+ {
15
+ question: 'How do I know my bank\'s BIC code?',
16
+ answer: 'You can check it in your online banking or use our converter. For Spanish banks, just entering the IBAN, we extract the entity code and give you the corresponding BIC.',
17
+ },
18
+ {
19
+ question: 'Is it safe to enter my IBAN here?',
20
+ answer: 'Completely. Our tool validates the code locally in your browser. We do not store or send your banking data to any external server.',
21
+ },
22
+ {
23
+ question: 'Why does the Spanish IBAN have 24 characters?',
24
+ answer: 'It is an international standard. The first 4 identify the country and checksum, and the other 20 are the old Client Account Code (Entity, Branch, Control and Account Number).',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ {
30
+ name: 'Find your IBAN',
31
+ text: 'You will find it on your bank card, savings booklet or your online banking profile.',
32
+ },
33
+ {
34
+ name: 'Enter it in the validator',
35
+ text: 'Type or paste the complete code. Our system will automatically format it for easier reading.',
36
+ },
37
+ {
38
+ name: 'Press the conversion button',
39
+ text: 'The system will validate that the control digits are correct using the Module 97 algorithm.',
40
+ },
41
+ {
42
+ name: 'Copy the result',
43
+ text: 'You will get the BIC/SWIFT code and bank name ready to copy and use.',
44
+ },
45
+ ];
46
+
47
+ const bibliographyData = [
48
+ {
49
+ name: 'ISO 13616: International IBAN Standard',
50
+ url: 'https://www.iso.org/contents/data/standard/08/10/81090.html',
51
+ },
52
+ {
53
+ name: 'SWIFT: Global BIC Registry',
54
+ url: 'https://www.theswiftcodes.com',
55
+ },
56
+ {
57
+ name: 'Bank of Spain: Entity Registry',
58
+ url: 'https://www.bde.es/webbe/en/estadisticas/otras-clasificaciones/clasificacion-entidades/listas-instituciones-financieras/listas-instituciones-financieras-monetarias-pais/lista-mfi-es.html',
59
+ },
60
+ ];
61
+
62
+ const faqSchema: WithContext<FAQPage> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'FAQPage',
65
+ mainEntity: faqData.map((item) => ({
66
+ '@type': 'Question',
67
+ name: item.question,
68
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
69
+ })),
70
+ };
71
+
72
+ const howToSchema: WithContext<HowTo> = {
73
+ '@context': 'https://schema.org',
74
+ '@type': 'HowTo',
75
+ name: title,
76
+ description,
77
+ step: howToData.map((step, i) => ({
78
+ '@type': 'HowToStep',
79
+ position: i + 1,
80
+ name: step.name,
81
+ text: step.text,
82
+ })),
83
+ };
84
+
85
+ const appSchema: WithContext<SoftwareApplication> = {
86
+ '@context': 'https://schema.org',
87
+ '@type': 'SoftwareApplication',
88
+ name: title,
89
+ description,
90
+ applicationCategory: 'FinanceApplication',
91
+ offers: {
92
+ '@type': 'Offer',
93
+ price: '0',
94
+ priceCurrency: 'USD',
95
+ },
96
+ };
97
+
98
+ export const content: ToolLocaleContent<IBANBICSwiftUI> = {
99
+ slug,
100
+ title,
101
+ description,
102
+ faqTitle: 'Frequently Asked Questions',
103
+ faq: faqData,
104
+ bibliographyTitle: 'References and Sources',
105
+ bibliography: bibliographyData,
106
+ howTo: howToData,
107
+ schemas: [faqSchema, howToSchema, appSchema],
108
+ seo: [
109
+ {
110
+ type: 'title',
111
+ text: 'IBAN to BIC/SWIFT Converter: Instant Lookup',
112
+ level: 2,
113
+ },
114
+ {
115
+ type: 'paragraph',
116
+ html: 'The <strong>BIC/SWIFT code</strong> is your bank\'s international identifier, essential for international transfers outside the SEPA zone. Our converter automatically extracts the correct code from your Spanish IBAN in seconds.',
117
+ },
118
+ {
119
+ type: 'comparative',
120
+ columns: 2,
121
+ items: [
122
+ {
123
+ title: 'IBAN (Account Number)',
124
+ description: 'Unique international identifier for your bank account.',
125
+ points: [
126
+ 'International standard format (ISO 13616)',
127
+ '24 characters in Spain',
128
+ 'Includes country, checksum and account data',
129
+ 'Validatable using Module 97 algorithm',
130
+ ],
131
+ },
132
+ {
133
+ title: 'BIC/SWIFT (Bank Code)',
134
+ description: 'Unique international identifier for your banking institution.',
135
+ highlight: true,
136
+ points: [
137
+ '8 to 11 character code',
138
+ 'Required for international transfers',
139
+ 'Obtained from IBAN in Spanish banks',
140
+ 'Registered in the international SWIFT network',
141
+ ],
142
+ },
143
+ ],
144
+ },
145
+ {
146
+ type: 'paragraph',
147
+ html: 'The Spanish IBAN follows the format <strong>ES</strong> (country code) + <strong>2 check digits</strong> + <strong>4 entity digits</strong> + <strong>4 branch digits</strong> + <strong>2 check digits</strong> + <strong>10 account number digits</strong>. Totaling 24 characters containing all your account information.',
148
+ },
149
+ ],
150
+ ui: {
151
+ labelTitle: 'IBAN to BIC / SWIFT Converter',
152
+ labelDescription: 'Get the BIC code from any Spanish bank account instantly.',
153
+ labelInputIBAN: 'Enter your IBAN',
154
+ labelInputPlaceholder: 'ES00 0000 0000 0000 0000 0000',
155
+ labelButtonConvert: 'Get BIC Code',
156
+ labelBIC: 'BIC / SWIFT Code',
157
+ labelCountry: 'Country / Format',
158
+ labelBank: 'Banking Institution',
159
+ labelError: 'The IBAN entered does not appear to be valid. Check the digits.',
160
+ labelCopyButton: 'Copy',
161
+ labelCopied: 'Copied',
162
+ labelBankNotIdentified: 'Entity not identified',
163
+ labelBankOutsideSpain: 'Bank outside Spain (Limited data)',
164
+ labelInvalidIBAN: 'Invalid IBAN',
165
+ labelFormattingOK: 'Format OK',
166
+ },
167
+ };
@@ -0,0 +1,216 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { IBANBICSwiftUI } from '../ui';
4
+
5
+ const slug = 'conversor-iban-bic-swift';
6
+ const title = 'Conversor de IBAN a BIC SWIFT y Buscador de Bancos';
7
+ const description = 'Obtén el código BIC/SWIFT de cualquier IBAN español al instante. Validador de cuentas bancarias con algoritmo oficial y registros actualizados para transferencias.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: '¿Qué es el código BIC o SWIFT?',
12
+ answer: 'Es el identificador internacional de tu banco. Es necesario para que el dinero sepa a qué entidad debe dirigirse cuando viaja fuera de la zona SEPA (Europa).',
13
+ },
14
+ {
15
+ question: '¿Cómo sé cuál es el BIC de mi banco?',
16
+ answer: 'Puedes consultarlo en tu banca online o usar nuestro conversor. Para bancos españoles, solo introduciendo el IBAN, nosotros extraemos el código de entidad y te damos el BIC correspondiente.',
17
+ },
18
+ {
19
+ question: '¿Es seguro introducir mi IBAN aquí?',
20
+ answer: 'Totalmente. Nuestra herramienta valida el código de forma local en tu navegador. No guardamos ni enviamos tus datos bancarios a ningún servidor externo.',
21
+ },
22
+ {
23
+ question: '¿Por qué el IBAN tiene 24 caracteres en España?',
24
+ answer: 'Es una norma estándar. Los primeros 4 identifican el país y el control, y los otros 20 son el antiguo Código Cuenta Cliente (Entidad, Sucursal, Control y Número de Cuenta).',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ {
30
+ name: 'Busca tu IBAN',
31
+ text: 'Lo encontrarás en tu tarjeta de coordenadas, libreta de ahorros o el perfil de tu banca online.',
32
+ },
33
+ {
34
+ name: 'Introdúcelo en el validador',
35
+ text: 'Escribe o pega el código completo. Nuestro sistema lo formateará automáticamente para facilitar la lectura.',
36
+ },
37
+ {
38
+ name: 'Pulsa el botón de conversión',
39
+ text: 'El sistema validará que los dígitos de control sean correctos mediante el algoritmo Módulo 97.',
40
+ },
41
+ {
42
+ name: 'Copia el resultado',
43
+ text: 'Obtendrás el código BIC/SWIFT y el nombre de la entidad bancaria listos para copiar y usar.',
44
+ },
45
+ ];
46
+
47
+ const bibliographyData = [
48
+ {
49
+ name: 'ISO 13616: Estándar Internacional del IBAN',
50
+ url: 'https://www.iso.org/es/contents/data/standard/08/10/81090.html',
51
+ },
52
+ {
53
+ name: 'SWIFT: Registro Global de BIC',
54
+ url: 'https://www.theswiftcodes.com/es',
55
+ },
56
+ {
57
+ name: 'Banco de España: Registro de Entidades',
58
+ url: 'https://www.bde.es/webbe/es/estadisticas/otras-clasificaciones/clasificacion-entidades/listas-instituciones-financieras/listas-instituciones-financieras-monetarias-pais/lista-mfi-es.html',
59
+ },
60
+ ];
61
+
62
+ const faqSchema: WithContext<FAQPage> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'FAQPage',
65
+ mainEntity: faqData.map((item) => ({
66
+ '@type': 'Question',
67
+ name: item.question,
68
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
69
+ })),
70
+ };
71
+
72
+ const howToSchema: WithContext<HowTo> = {
73
+ '@context': 'https://schema.org',
74
+ '@type': 'HowTo',
75
+ name: title,
76
+ description,
77
+ step: howToData.map((step, i) => ({
78
+ '@type': 'HowToStep',
79
+ position: i + 1,
80
+ name: step.name,
81
+ text: step.text,
82
+ })),
83
+ };
84
+
85
+ const appSchema: WithContext<SoftwareApplication> = {
86
+ '@context': 'https://schema.org',
87
+ '@type': 'SoftwareApplication',
88
+ name: title,
89
+ description,
90
+ applicationCategory: 'FinanceApplication',
91
+ offers: {
92
+ '@type': 'Offer',
93
+ price: '0',
94
+ priceCurrency: 'EUR',
95
+ },
96
+ };
97
+
98
+ export const content: ToolLocaleContent<IBANBICSwiftUI> = {
99
+ slug,
100
+ title,
101
+ description,
102
+ faqTitle: 'Preguntas Frecuentes',
103
+ faq: faqData,
104
+ bibliographyTitle: 'Fuentes y Referencias',
105
+ bibliography: bibliographyData,
106
+ howTo: howToData,
107
+ schemas: [faqSchema, howToSchema, appSchema],
108
+ seo: [
109
+ {
110
+ type: 'title',
111
+ text: 'Conversor de IBAN a BIC/SWIFT: Todo lo que necesitas saber sobre tus códigos bancarios',
112
+ level: 2,
113
+ },
114
+ {
115
+ type: 'paragraph',
116
+ html: 'En el complejo mundo de las finanzas internacionales, dos acrónimos dominan cualquier operación de transferencia: <strong>IBAN</strong> y <strong>BIC</strong> (también conocido como SWIFT). Aunque en la zona SEPA cada vez es menos frecuente que los bancos nos lo pidan para operaciones nacionales, sigue siendo una pieza fundamental para identificar de forma unívoca a la entidad receptora de los fondos.',
117
+ },
118
+ {
119
+ type: 'paragraph',
120
+ html: 'Entender cómo funcionan estos códigos no solo es una cuestión de curiosidad técnica, sino una medida de seguridad financiera esencial. Errar en un solo dígito de tu cuenta bancaria o proporcionar un BIC incorrecto puede derivar en transferencias retenidas, devoluciones con comisiones elevadas o, en el peor de los casos, el envío de capital a una cuenta equivocada en el extranjero.',
121
+ },
122
+ {
123
+ type: 'title',
124
+ text: '¿Qué es el código IBAN y cómo se estructura?',
125
+ level: 3,
126
+ },
127
+ {
128
+ type: 'paragraph',
129
+ html: 'El IBAN (International Bank Account Number) es una norma internacional establecida por la ISO para identificar cuentas bancarias. Su objetivo es facilitar la automatización de los procesos de pago y reducir los errores en las transacciones transfronterizas. En España, el IBAN tiene una longitud fija de 24 caracteres.',
130
+ },
131
+ {
132
+ type: 'list',
133
+ items: [
134
+ '<strong>Código de país (2 letras):</strong> Identifica el país donde reside la cuenta (ES para España).',
135
+ '<strong>Dígitos de control (2 números):</strong> Un código de seguridad calculado para asegurar que el resto del IBAN ha sido introducido correctamente.',
136
+ '<strong>Entidad (4 números):</strong> El código asignado por el Banco de España a la institución financiera específica.',
137
+ '<strong>Sucursal (4 números):</strong> Indica la oficina bancaria donde se realizó la apertura de la cuenta.',
138
+ '<strong>Dígitos de control (2 números):</strong> Validación interna de la cuenta clásica española.',
139
+ '<strong>Número de cuenta (10 números):</strong> El identificador único personal de tu cuenta.',
140
+ ],
141
+ },
142
+ {
143
+ type: 'tip',
144
+ title: 'El Algoritmo del Módulo 97',
145
+ html: '<p>El algoritmo del IBAN utiliza una operación matemática conocida como Módulo 97. Este sistema es tan robusto que la probabilidad de que un error tipográfico pase desapercibido es prácticamente nula. Si al validar tu IBAN el resto de la división no es 1, el código es incorrecto.</p>',
146
+ },
147
+ {
148
+ type: 'title',
149
+ text: 'La Importancia del Sistema SWIFT y el Código BIC',
150
+ level: 3,
151
+ },
152
+ {
153
+ type: 'paragraph',
154
+ html: 'A diferencia del IBAN, que señala la "dirección exacta" de tu dinero, el <strong>BIC</strong> (Bank Identifier Code) señala el "edificio": el banco en sí. SWIFT es la red de comunicación global segura que conecta a miles de bancos en todo el mundo. Proporcionar el BIC correcto asegura que el banco emisor sepa exactamente a qué ventanilla internacional debe llamar para entregar los fondos.',
155
+ },
156
+ {
157
+ type: 'title',
158
+ text: 'Seguridad: ¿Qué Riesgos Tiene Compartir el IBAN?',
159
+ level: 3,
160
+ },
161
+ {
162
+ type: 'paragraph',
163
+ html: 'Una duda muy recurrente es si proporcionar el IBAN a terceros para recibir cobros es seguro. La respuesta corta es sí. El IBAN por sí solo no permite a nadie entrar en tu cuenta o sacar dinero por la fuerza. Para que una empresa pueda retirar fondos, necesita una autorización firmada (Mandato SEPA) que puedes revocar en cualquier momento desde tu banca online.',
164
+ },
165
+ {
166
+ type: 'title',
167
+ text: 'Transferencias SEPA vs. Internacionales',
168
+ level: 3,
169
+ },
170
+ {
171
+ type: 'list',
172
+ items: [
173
+ '<strong>SEPA:</strong> Comisiones nulas o reducidas, tiempo 24h, solo necesitas IBAN, mismo coste que nacional.',
174
+ '<strong>Resto Mundo:</strong> Comisiones altas, tiempo 2-5 días, requiere IBAN + BIC, posibles cambios de divisa.',
175
+ ],
176
+ },
177
+ {
178
+ type: 'title',
179
+ text: 'Principales Entidades Bancarias y sus BICs',
180
+ level: 3,
181
+ },
182
+ {
183
+ type: 'list',
184
+ items: [
185
+ '<strong>Banco Santander:</strong> BSCH ES MM XXX',
186
+ '<strong>BBVA:</strong> BBVA ES MM XXX',
187
+ '<strong>CaixaBank:</strong> CAIX ES BB XXX',
188
+ '<strong>Banco Sabadell:</strong> BSAB ES BB XXX',
189
+ '<strong>Bankinter:</strong> BKNM ES MM XXX',
190
+ '<strong>Openbank:</strong> OPNB ES MM XXX',
191
+ ],
192
+ },
193
+ {
194
+ type: 'tip',
195
+ title: 'Atención a los Gastos de Transferencia',
196
+ html: '<p>Cuando realices una transferencia internacional, te preguntarán quién paga las comisiones: <strong>SHA</strong> (compartidos), <strong>OUR</strong> (tú pagas todos) o <strong>BEN</strong> (el beneficiario paga). Asegúrate de acordarlo previamente.</p>',
197
+ },
198
+ ],
199
+ ui: {
200
+ labelTitle: 'Conversor IBAN a BIC / SWIFT',
201
+ labelDescription: 'Calcula el código BIC de cualquier cuenta bancaria española de forma instantánea.',
202
+ labelInputIBAN: 'Introduce tu IBAN',
203
+ labelInputPlaceholder: 'ES00 0000 0000 0000 0000 0000',
204
+ labelButtonConvert: 'Obtener Código BIC',
205
+ labelBIC: 'Código BIC / SWIFT',
206
+ labelCountry: 'País / Formato',
207
+ labelBank: 'Entidad Bancaria',
208
+ labelError: 'El IBAN introducido no parece ser válido. Revisa los dígitos.',
209
+ labelCopyButton: 'Copiar',
210
+ labelCopied: 'Copiado',
211
+ labelBankNotIdentified: 'Entidad no identificada',
212
+ labelBankOutsideSpain: 'Banco fuera de España (Datos limitados)',
213
+ labelInvalidIBAN: 'IBAN No Válido',
214
+ labelFormattingOK: 'Formato OK',
215
+ },
216
+ };
@@ -0,0 +1,167 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { IBANBICSwiftUI } from '../ui';
4
+
5
+ const slug = 'convertisseur-iban-bic-swift';
6
+ const title = 'Convertisseur IBAN en BIC SWIFT et Moteur de Recherche Bancaire';
7
+ const description = 'Obtenez le code BIC/SWIFT de n\'importe quel IBAN espagnol instantanément. Validateur de compte bancaire avec algorithme officiel et registres à jour pour les virements internationaux.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'Qu\'est-ce qu\'un code BIC ou SWIFT?',
12
+ answer: 'C\'est l\'identifiant international de votre banque. C\'est nécessaire pour que l\'argent sache vers quelle institution il doit être dirigé lorsqu\'il circule en dehors de la zone SEPA (Europe).',
13
+ },
14
+ {
15
+ question: 'Comment connaître le code BIC de ma banque?',
16
+ answer: 'Vous pouvez le consulter dans votre banque en ligne ou utiliser notre convertisseur. Pour les banques espagnoles, en entrant simplement l\'IBAN, nous extrayons le code d\'entité et vous donnons le BIC correspondant.',
17
+ },
18
+ {
19
+ question: 'Est-il sûr d\'entrer mon IBAN ici?',
20
+ answer: 'Complètement. Notre outil valide le code localement dans votre navigateur. Nous ne stockons ni n\'envoyons vos données bancaires à aucun serveur externe.',
21
+ },
22
+ {
23
+ question: 'Pourquoi l\'IBAN espagnol a-t-il 24 caractères?',
24
+ answer: 'C\'est une norme internationale. Les 4 premiers identifient le pays et la somme de contrôle, et les 20 autres sont l\'ancien Code Compte Client (Entité, Succursale, Contrôle et Numéro de Compte).',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ {
30
+ name: 'Trouvez votre IBAN',
31
+ text: 'Vous le trouverez sur votre carte bancaire, votre livret d\'épargne ou votre profil de banque en ligne.',
32
+ },
33
+ {
34
+ name: 'Entrez-le dans le validateur',
35
+ text: 'Tapez ou collez le code complet. Notre système le formatera automatiquement pour une lecture plus facile.',
36
+ },
37
+ {
38
+ name: 'Appuyez sur le bouton de conversion',
39
+ text: 'Le système validera que les chiffres de contrôle sont corrects à l\'aide de l\'algorithme Modulo 97.',
40
+ },
41
+ {
42
+ name: 'Copiez le résultat',
43
+ text: 'Vous obtiendrez le code BIC/SWIFT et le nom de la banque prêts à être copiés et utilisés.',
44
+ },
45
+ ];
46
+
47
+ const bibliographyData = [
48
+ {
49
+ name: 'ISO 13616 : Norme IBAN Internationale',
50
+ url: 'https://www.iso.org/contents/data/standard/08/10/81090.html',
51
+ },
52
+ {
53
+ name: 'SWIFT : Registre Mondial des BIC',
54
+ url: 'https://www.theswiftcodes.com/fr',
55
+ },
56
+ {
57
+ name: 'Banque d\'Espagne : Registre des Entités',
58
+ url: 'https://www.bde.es/webbe/fr/estadisticas/otras-clasificaciones/clasificacion-entidades/listas-instituciones-financieras/listas-instituciones-financieras-monetarias-pais/lista-mfi-es.html',
59
+ },
60
+ ];
61
+
62
+ const faqSchema: WithContext<FAQPage> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'FAQPage',
65
+ mainEntity: faqData.map((item) => ({
66
+ '@type': 'Question',
67
+ name: item.question,
68
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
69
+ })),
70
+ };
71
+
72
+ const howToSchema: WithContext<HowTo> = {
73
+ '@context': 'https://schema.org',
74
+ '@type': 'HowTo',
75
+ name: title,
76
+ description,
77
+ step: howToData.map((step, i) => ({
78
+ '@type': 'HowToStep',
79
+ position: i + 1,
80
+ name: step.name,
81
+ text: step.text,
82
+ })),
83
+ };
84
+
85
+ const appSchema: WithContext<SoftwareApplication> = {
86
+ '@context': 'https://schema.org',
87
+ '@type': 'SoftwareApplication',
88
+ name: title,
89
+ description,
90
+ applicationCategory: 'FinanceApplication',
91
+ offers: {
92
+ '@type': 'Offer',
93
+ price: '0',
94
+ priceCurrency: 'EUR',
95
+ },
96
+ };
97
+
98
+ export const content: ToolLocaleContent<IBANBICSwiftUI> = {
99
+ slug,
100
+ title,
101
+ description,
102
+ faqTitle: 'Questions Fréquemment Posées',
103
+ faq: faqData,
104
+ bibliographyTitle: 'Références et Sources',
105
+ bibliography: bibliographyData,
106
+ howTo: howToData,
107
+ schemas: [faqSchema, howToSchema, appSchema],
108
+ seo: [
109
+ {
110
+ type: 'title',
111
+ text: 'Convertisseur IBAN en BIC/SWIFT : Recherche Instantanée',
112
+ level: 2,
113
+ },
114
+ {
115
+ type: 'paragraph',
116
+ html: 'Le <strong>code BIC/SWIFT</strong> est l\'identifiant international de votre banque, essentiel pour les virements internationaux en dehors de la zone SEPA. Notre convertisseur extrait automatiquement le code correct de votre IBAN espagnol en quelques secondes.',
117
+ },
118
+ {
119
+ type: 'comparative',
120
+ columns: 2,
121
+ items: [
122
+ {
123
+ title: 'IBAN (Numéro de Compte)',
124
+ description: 'Identifiant unique international de votre compte bancaire.',
125
+ points: [
126
+ 'Format standard international (ISO 13616)',
127
+ '24 caractères en Espagne',
128
+ 'Inclut le pays, la somme de contrôle et les données du compte',
129
+ 'Validable à l\'aide de l\'algorithme Modulo 97',
130
+ ],
131
+ },
132
+ {
133
+ title: 'BIC/SWIFT (Code Bancaire)',
134
+ description: 'Identifiant unique international de votre institution bancaire.',
135
+ highlight: true,
136
+ points: [
137
+ 'Code de 8 à 11 caractères',
138
+ 'Nécessaire pour les virements internationaux',
139
+ 'Obtenu à partir de l\'IBAN dans les banques espagnoles',
140
+ 'Enregistré dans le réseau SWIFT international',
141
+ ],
142
+ },
143
+ ],
144
+ },
145
+ {
146
+ type: 'paragraph',
147
+ html: 'L\'IBAN espagnol suit le format <strong>ES</strong> (code pays) + <strong>2 chiffres de contrôle</strong> + <strong>4 chiffres d\'entité</strong> + <strong>4 chiffres de succursale</strong> + <strong>2 chiffres de contrôle</strong> + <strong>10 chiffres du numéro de compte</strong>. Au total 24 caractères contenant toutes les informations de votre compte.',
148
+ },
149
+ ],
150
+ ui: {
151
+ labelTitle: 'Convertisseur IBAN en BIC / SWIFT',
152
+ labelDescription: 'Obtenez le code BIC de n\'importe quel compte bancaire espagnol instantanément.',
153
+ labelInputIBAN: 'Entrez votre IBAN',
154
+ labelInputPlaceholder: 'ES00 0000 0000 0000 0000 0000',
155
+ labelButtonConvert: 'Obtenir le Code BIC',
156
+ labelBIC: 'Code BIC / SWIFT',
157
+ labelCountry: 'Pays / Format',
158
+ labelBank: 'Institution Bancaire',
159
+ labelError: 'L\'IBAN entré ne semble pas valide. Vérifiez les chiffres.',
160
+ labelCopyButton: 'Copier',
161
+ labelCopied: 'Copié',
162
+ labelBankNotIdentified: 'Entité non identifiée',
163
+ labelBankOutsideSpain: 'Banque en dehors de l\'Espagne (Données limitées)',
164
+ labelInvalidIBAN: 'IBAN Invalide',
165
+ labelFormattingOK: 'Format OK',
166
+ },
167
+ };
@@ -0,0 +1,33 @@
1
+ import type { FinanceToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import IBANBICSwiftComponent from './component.astro';
3
+ import IBANBICSwiftSEO from './seo.astro';
4
+ import IBANBICSwiftBibliography from './bibliography.astro';
5
+ import type { IBANBICSwiftUI } from './ui';
6
+
7
+ export type IBANBICSwiftLocaleContent = ToolLocaleContent<IBANBICSwiftUI>;
8
+
9
+ import { content as es } from './i18n/es';
10
+ import { content as en } from './i18n/en';
11
+ import { content as fr } from './i18n/fr';
12
+
13
+ export const ibanBicSwift: FinanceToolEntry<IBANBICSwiftUI> = {
14
+ id: 'conversor-iban-bic-swift',
15
+ icons: {
16
+ bg: 'mdi:bank-outline',
17
+ fg: 'mdi:credit-card-chip-outline',
18
+ },
19
+ i18n: {
20
+ es: async () => es,
21
+ en: async () => en,
22
+ fr: async () => fr,
23
+ },
24
+ };
25
+
26
+ export { IBANBICSwiftComponent, IBANBICSwiftSEO, IBANBICSwiftBibliography };
27
+
28
+ export const IBAN_BIC_SWIFT_TOOL: ToolDefinition = {
29
+ entry: ibanBicSwift,
30
+ Component: IBANBICSwiftComponent,
31
+ SEOComponent: IBANBICSwiftSEO,
32
+ BibliographyComponent: IBANBICSwiftBibliography,
33
+ };
@@ -0,0 +1,101 @@
1
+ export interface BankData {
2
+ name: string;
3
+ bic: string;
4
+ }
5
+
6
+ export interface IBANValidationResult {
7
+ isValid: boolean;
8
+ countryCode: string;
9
+ bankData?: BankData | null;
10
+ }
11
+
12
+ const SPANISH_BANKS: Record<string, BankData> = {
13
+ "0049": { name: "Banco Santander", bic: "BSCH ES MM XXX" },
14
+ "0182": { name: "BBVA (Banco Bilbao Vizcaya Argentaria)", bic: "BBVA ES MM XXX" },
15
+ "2100": { name: "CaixaBank", bic: "CAIX ES BB XXX" },
16
+ "0081": { name: "Banco Sabadell", bic: "BSAB ES BB XXX" },
17
+ "0128": { name: "Bankinter", bic: "BKNM ES MM XXX" },
18
+ "1465": { name: "ING Bank N.V., sucursal en España", bic: "INGD ES MM XXX" },
19
+ "2038": { name: "Bankia (absorbido por CaixaBank)", bic: "CAIX ES BB XXX" },
20
+ "0138": { name: "Abanca Corporación Bancaria", bic: "NCGA ES MM XXX" },
21
+ "2080": { name: "Abanca (Cajas Rurales)", bic: "NCGA ES MM XXX" },
22
+ "2103": { name: "Unicaja Banco", bic: "UNCA ES MM XXX" },
23
+ "2048": { name: "Liberbank (absorbido por Unicaja)", bic: "UNCA ES MM XXX" },
24
+ "2095": { name: "Kutxabank", bic: "KUTX ES BB XXX" },
25
+ "3058": { name: "Cajamar Caja Rural", bic: "CAJM ES MM XXX" },
26
+ "0239": { name: "EVO Banco (Grupo Bankinter)", bic: "EVOB ES MM XXX" },
27
+ "0019": { name: "Deutsche Bank SAE", bic: "DEUT ES MM XXX" },
28
+ "0075": { name: "Banco Popular (absorbido por Santander)", bic: "BSCH ES MM XXX" },
29
+ "0030": { name: "Banco de España", bic: "BESP ES MM XXX" },
30
+ "0216": { name: "Targobank", bic: "TARG ES MM XXX" },
31
+ "0240": { name: "Banco Caminos", bic: "CAMI ES MM XXX" },
32
+ "1491": { name: "Triodos Bank N.V. S.E.", bic: "TRID ES MM XXX" },
33
+ "3190": { name: "Caja Rural de Teruel", bic: "CRTE ES 22 XXX" },
34
+ "3183": { name: "Caja Rural de Navarra", bic: "CRNA ES MM XXX" },
35
+ "3017": { name: "Caja Rural de Soria", bic: "CRSO ES 22 XXX" },
36
+ "2085": { name: "Ibercaja Banco", bic: "CAJA ES MM XXX" },
37
+ "0061": { name: "Banca March", bic: "BAMR ES MM XXX" },
38
+ "0003": { name: "Banco de depósitos", bic: "BDEP ES MM XXX" },
39
+ "0198": { name: "Banco Cooperativo Español", bic: "BCES ES MM XXX" },
40
+ "0234": { name: "Banco de Sabadell (Bex)", bic: "BSAB ES BB XXX" },
41
+ "1544": { name: "Qonto S.A.", bic: "QNTO FR PP XXX" },
42
+ "1548": { name: "Revolut Bank UAB", bic: "REVO LT 22" },
43
+ };
44
+
45
+ export class IBANConverter {
46
+ static validateIBAN(iban: string): boolean {
47
+ const cleanIban = iban.toUpperCase().replace(/\s+/g, "");
48
+ if (!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{4,30}$/.test(cleanIban)) return false;
49
+
50
+ const rearranged = cleanIban.slice(4) + cleanIban.slice(0, 4);
51
+ const numeric = rearranged
52
+ .split("")
53
+ .map((c) => {
54
+ const code = c.charCodeAt(0);
55
+ return code >= 65 && code <= 90 ? (code - 55).toString() : c;
56
+ })
57
+ .join("");
58
+
59
+ let remainder = 0;
60
+ for (let i = 0; i < numeric.length; i += 7) {
61
+ const chunk = remainder.toString() + numeric.substring(i, i + 7);
62
+ remainder = parseInt(chunk, 10) % 97;
63
+ }
64
+
65
+ return remainder === 1;
66
+ }
67
+
68
+ static getBICFromIBAN(iban: string): BankData | null {
69
+ const cleanIban = iban.toUpperCase().replace(/\s+/g, "");
70
+ const country = cleanIban.slice(0, 2);
71
+
72
+ if (country === "ES") {
73
+ const bankCode = cleanIban.slice(4, 8);
74
+ return SPANISH_BANKS[bankCode] || null;
75
+ }
76
+
77
+ return null;
78
+ }
79
+
80
+ static validate(iban: string): IBANValidationResult {
81
+ const cleanIban = iban.toUpperCase().replace(/\s+/g, "");
82
+ const countryCode = cleanIban.slice(0, 2);
83
+ const isValid = this.validateIBAN(iban);
84
+
85
+ return {
86
+ isValid,
87
+ countryCode,
88
+ bankData: isValid ? this.getBICFromIBAN(iban) : null,
89
+ };
90
+ }
91
+
92
+ static formatIBAN(iban: string): string {
93
+ const clean = iban.toUpperCase().replace(/[^A-Z0-9]/g, "");
94
+ let formatted = "";
95
+ for (let i = 0; i < clean.length; i++) {
96
+ if (i > 0 && i % 4 === 0) formatted += " ";
97
+ formatted += clean[i];
98
+ }
99
+ return formatted;
100
+ }
101
+ }